Gemini 4 Argon · Chat completions
Chat models (GPT, Claude, Gemini, Grok, DeepSeek…) use the OpenAI Chat Completions format, so the official OpenAI SDKs work with base URL https://01router.com/api/v1. Set "stream": true for server-sent events. Credits for the prompt plus max_tokens (4,096 when unset) are held first, then settled to the real token usage once the reply ends; the same request id appears in the X-Gateway-Request-Id header and the task log.
/api/v1/chat/completionsBearer API keyEndpoints for this model
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.
Request
curl 'https://01router.com/api/v1/chat/completions' \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-4-argon",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 512,
"stream": false
}'Input parameters
JSON bodymodelstringRequiredModel slug from the catalog. Project keys may use a project-specific model slug.
Allowed values:"gemini-4-argon"messagesobject[]RequiredNon-empty message array with role and content; content may contain supported multimodal parts.
providerstringOptionalOptional provider slug. Omit for automatic routing; project settings may pin the provider.
projectstringOptionalOptional project ID. Use its published model catalog and routing configuration.
streambooleanOptionalDefault false. true returns text/event-stream chunks and ends with data: [DONE].
Default:falsemax_tokensintegerOptionalPositive integer. Default 4096. Do not combine with max_completion_tokens.
Default:4096Minimum:1max_completion_tokensintegerOptionalPositive integer. Default 4096. Do not combine with max_completion_tokens.
temperaturenumberOptionalOpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported.
toolsobject[]OptionalOpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported.
response_formatobjectOptionalOpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported.
Response example
{
"id": "chat_example",
"object": "chat.completion",
"model": "gemini-4-argon",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 2,
"total_tokens": 10
}
}data: {"id":"chat_example","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hello!"},"finish_reason":null}]}
data: [DONE]Responses are illustrative. IDs, usage, prices and results depend on the actual request.
Response fields
idstringGeneration ID returned by the create request.
objectstringchat.completion / chat.completion.chunk
modelstringModel slug from the catalog. Project keys may use a project-specific model slug.
choicesarrayCompletion choices. Non-streaming replies use choices[].message; streaming chunks use choices[].delta.
usageobjectprompt_tokens, completion_tokens and total_tokens. Streaming includes usage when supplied by the provider.
Usage notes
- OpenAI-compatible sampling, tools and structured output fields depend on the selected model and provider. Only n = 1 is supported.
Use with AI
Give your coding assistant the documentation index or the full API reference, including live model parameters.