# 01Router — Gateway API reference > A single REST API for image, video, audio and chat models across fal.ai, Replicate, WaveSpeedAI, KIE AI, APIMart, EvoLink, AtlasCloud, Vercel AI Gateway and OpenRouter. Base URL: https://01router.com/api/v1 Documentation: https://01router.com/docs Index: https://01router.com/docs/llms.txt?locale=en Full reference: https://01router.com/docs/llms-full.txt?locale=en Generation, task history, cancellation and chat require a key. Catalogs, prompts and quotes are public. Keep the API key on your server. Responses are illustrative. IDs, usage, prices and results depend on the actual request. ## Model reference Source: https://01router.com/docs/models/grok-4.7 # Grok 4.7 API xAI Grok 4.7: reasoning model with real-time knowledge and a 500K context. `POST /api/v1/chat/completions` Bearer API key ## Input parameters | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | model | string | yes | Model slug from the catalog. Project keys may use a project-specific model slug. | options: [ "grok-4.7" ] | | messages | object[] | yes | Non-empty message array with role and content; content may contain supported multimodal parts. | | | provider | string | no | Optional provider slug. Omit for automatic routing; project settings may pin the provider. | | | project | string | no | Optional project ID. Use its published model catalog and routing configuration. | | | stream | boolean | no | Default false. true returns text/event-stream chunks and ends with data: [DONE]. | default: false | | max_tokens | integer | no | Positive integer. Default 4096. Do not combine with max_completion_tokens. | default: 4096; min: 1 | | max_completion_tokens | integer | no | Positive integer. Default 4096. Do not combine with max_completion_tokens. | | | temperature | number | no | OpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported. | | | tools | object[] | no | OpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported. | | | response_format | object | no | OpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported. | | ## Response fields | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | id | string | — | Generation ID returned by the create request. | | | object | string | — | chat.completion / chat.completion.chunk | | | model | string | — | Model slug from the catalog. Project keys may use a project-specific model slug. | | | choices | array | — | Completion choices. Non-streaming replies use choices[].message; streaming chunks use choices[].delta. | | | usage | object | — | prompt_tokens, completion_tokens and total_tokens. Streaming includes usage when supplied by the provider. | | ## cURL ```bash curl 'https://01router.com/api/v1/chat/completions' \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "grok-4.7", "messages": [ { "role": "user", "content": "Hello!" } ], "max_tokens": 512, "stream": false }' ``` ## 200 · application/json ```json { "id": "chat_example", "object": "chat.completion", "model": "grok-4.7", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello!" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 2, "total_tokens": 10 } } ``` ## SSE · stream: true ```text data: {"id":"chat_example","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hello!"},"finish_reason":null}]} data: [DONE] ``` ## Usage notes - OpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported. ## Endpoints for this model - [POST /api/v1/chat/completions](https://01router.com/docs/llms-full.txt?locale=en§ion=chat): Chat completions - [GET /api/v1/models/{slug}](https://01router.com/docs/llms-full.txt?locale=en§ion=model-detail): Get one model For /generations and /quote, put these parameters inside input. For /images/generations, put them at the top level. Chat parameters go at the top level of /chat/completions. Select a provider to see its effective parameter limits. Automatic routing chooses a provider that supports your input. Examples include defaults and required inputs; replace example media URLs with accessible files. ### Provider parameter schemas ```json [ { "provider": "wavespeed", "params": [] }, { "provider": "kie", "params": [] }, { "provider": "apimart", "params": [] }, { "provider": "evolink", "params": [] }, { "provider": "atlascloud", "params": [] }, { "provider": "vercel", "params": [] }, { "provider": "openrouter", "params": [] } ] ``` ---