{"openapi":"3.1.0","info":{"title":"Converge AI Gateway","version":"2026-11-25","summary":"OpenAI-compatible and Anthropic-Messages-compatible access to the models of the Converge AI Gateway.","description":"The Converge AI Gateway gives one endpoint and one virtual key for the language models that Converge makes available. The gateway accepts the OpenAI Chat Completions, Completions and Responses formats, and the Anthropic Messages format. Each team has a spend budget. The gateway reports per-call spend and rate-limit state in response headers."},"servers":[{"url":"https://models.convergestudios.ai","description":"Converge AI Gateway"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Chat","description":"Generate text with the OpenAI and Anthropic request formats."},{"name":"Models","description":"Discover the models available to a key and their capabilities."},{"name":"Tokens","description":"Count tokens before a call."},{"name":"Health","description":"Liveness and readiness of the gateway. No key is necessary."}],"paths":{"/v1/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion","description":"Generates the next assistant message for a conversation, in the OpenAI Chat Completions format. The operation supports system messages, multi-turn conversations, sampling parameters, stop sequences, streaming, function calling, JSON output, image input and reasoning effort.","tags":["Chat"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from `GET /v1/models`, for example `gemini/gemini-3.1-flash-lite`."},"messages":{"type":"array","description":"The conversation. Each item has a `role` (`system`, `user`, `assistant` or `tool`) and `content`. `content` is a string, or an array of parts (`text`, `image_url`) for image input."},"max_tokens":{"type":"integer","description":"Maximum number of completion tokens. On reasoning models, hidden reasoning tokens count against this limit."},"temperature":{"type":"number","description":"Sampling temperature."},"top_p":{"type":"number","description":"Nucleus sampling probability mass."},"seed":{"type":"integer","description":"Seed for sampling."},"stop":{"type":"array","description":"Stop sequences. Generation ends before the first stop sequence, and the stop sequence is not part of the output."},"stream":{"type":"boolean","description":"When `true`, the response is a server-sent event stream of `chat.completion.chunk` objects that ends with `data: [DONE]`."},"stream_options":{"type":"object","description":"`{\"include_usage\": true}` adds a final chunk with `usage` before `data: [DONE]`."},"tools":{"type":"array","description":"Function definitions that the model can call."},"tool_choice":{"type":"object","description":"Forces a call to the named function."},"response_format":{"type":"object","description":"`{\"type\": \"json_object\"}` for JSON output, or `{\"type\": \"json_schema\", \"json_schema\": {...}}` for output that matches a JSON Schema."},"reasoning_effort":{"type":"string","description":"Reasoning effort for reasoning models. The values that each model accepts are in `supported_reasoning_efforts` of `GET /model_group/info`."},"n":{"type":"integer","description":"Number of choices. Only `1` is accepted; a larger value returns `400`."}},"required":["messages"]},"examples":{"chat-basic":{"summary":"Basic chat completion","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Reply with the single word: pong"}],"max_tokens":10},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with the single word: pong\"\n    }\n  ],\n  \"max_tokens\": 10\n}'"},"chat-system":{"summary":"System message","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"system","content":"You answer in UPPERCASE letters only."},{"role":"user","content":"Say hello to Manila in three words."}],"max_tokens":20,"temperature":0},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You answer in UPPERCASE letters only.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Say hello to Manila in three words.\"\n    }\n  ],\n  \"max_tokens\": 20,\n  \"temperature\": 0\n}'"},"chat-multiturn":{"summary":"Multi-turn conversation","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"My name is Ana."},{"role":"assistant","content":"Nice to meet you, Ana."},{"role":"user","content":"What is my name? Answer with one word."}],"max_tokens":10,"temperature":0},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"My name is Ana.\"\n    },\n    {\n      \"role\": \"assistant\",\n      \"content\": \"Nice to meet you, Ana.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"What is my name? Answer with one word.\"\n    }\n  ],\n  \"max_tokens\": 10,\n  \"temperature\": 0\n}'"},"chat-params":{"summary":"Sampling parameters; output cut at max_tokens","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Count from 1 to 50, separated by commas."}],"temperature":0,"top_p":0.9,"seed":7,"max_tokens":5},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Count from 1 to 50, separated by commas.\"\n    }\n  ],\n  \"temperature\": 0,\n  \"top_p\": 0.9,\n  \"seed\": 7,\n  \"max_tokens\": 5\n}'"},"chat-stop":{"summary":"Stop sequence","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Count from 1 to 10, separated by spaces. Output only the numbers."}],"stop":["5"],"max_tokens":30,"temperature":0},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Count from 1 to 10, separated by spaces. Output only the numbers.\"\n    }\n  ],\n  \"stop\": [\n    \"5\"\n  ],\n  \"max_tokens\": 30,\n  \"temperature\": 0\n}'"},"chat-stream":{"summary":"Streaming with usage","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Count from 1 to 5, separated by spaces."}],"max_tokens":20,"stream":true,"stream_options":{"include_usage":true}},"x-curl":"curl -sSN -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Count from 1 to 5, separated by spaces.\"\n    }\n  ],\n  \"max_tokens\": 20,\n  \"stream\": true,\n  \"stream_options\": {\n    \"include_usage\": true\n  }\n}'"},"chat-tools":{"summary":"Function calling: the model calls a tool","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"What is the weather in Manila right now?"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get the current weather for a city.","parameters":{"type":"object","properties":{"city":{"type":"string","description":"City name"}},"required":["city"]}}}],"tool_choice":{"type":"function","function":{"name":"get_weather"}},"max_tokens":50},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather in Manila right now?\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather for a city.\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"city\": {\n              \"type\": \"string\",\n              \"description\": \"City name\"\n            }\n          },\n          \"required\": [\n            \"city\"\n          ]\n        }\n      }\n    }\n  ],\n  \"tool_choice\": {\n    \"type\": \"function\",\n    \"function\": {\n      \"name\": \"get_weather\"\n    }\n  },\n  \"max_tokens\": 50\n}'"},"chat-tools-result":{"summary":"Function calling: the tool result goes back","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"What is the weather in Manila right now?"},{"role":"assistant","tool_calls":[{"index":0,"provider_specific_fields":{"thought_signature":"EqkBCqYBAWkU…[truncated 232 chars]"},"function":{"arguments":"{\"city\": \"Manila\"}","name":"get_weather"},"id":"call_example-1","type":"function"}],"images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"],"thinking_blocks":[]},"content":null},{"role":"tool","tool_call_id":"call_example-1","content":"{\"temp_c\":31,\"condition\":\"sunny\"}"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get the current weather for a city.","parameters":{"type":"object","properties":{"city":{"type":"string","description":"City name"}},"required":["city"]}}}],"max_tokens":40},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather in Manila right now?\"\n    },\n    {\n      \"role\": \"assistant\",\n      \"tool_calls\": [\n        {\n          \"index\": 0,\n          \"provider_specific_fields\": {\n            \"thought_signature\": \"EqkBCqYBAWkU…[truncated 232 chars]\"\n          },\n          \"function\": {\n            \"arguments\": \"{\\\"city\\\": \\\"Manila\\\"}\",\n            \"name\": \"get_weather\"\n          },\n          \"id\": \"call_example-1\",\n          \"type\": \"function\"\n        }\n      ],\n      \"images\": [],\n      \"thinking_blocks\": [],\n      \"provider_specific_fields\": {\n        \"thought_signatures\": [\n          \"EqkBCqYBAWkU…[truncated 232 chars]\"\n        ],\n        \"thinking_blocks\": []\n      },\n      \"content\": null\n    },\n    {\n      \"role\": \"tool\",\n      \"tool_call_id\": \"call_example-1\",\n      \"content\": \"{\\\"temp_c\\\":31,\\\"condition\\\":\\\"sunny\\\"}\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get the current weather for a city.\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"city\": {\n              \"type\": \"string\",\n              \"description\": \"City name\"\n            }\n          },\n          \"required\": [\n            \"city\"\n          ]\n        }\n      }\n    }\n  ],\n  \"max_tokens\": 40\n}'"},"chat-json-object":{"summary":"JSON output (json_object)","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Return a JSON object with the keys city and country for Manila."}],"response_format":{"type":"json_object"},"max_tokens":40},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Return a JSON object with the keys city and country for Manila.\"\n    }\n  ],\n  \"response_format\": {\n    \"type\": \"json_object\"\n  },\n  \"max_tokens\": 40\n}'"},"chat-json-schema":{"summary":"Structured output (json_schema)","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Give the city name and the approximate population of Manila city proper."}],"response_format":{"type":"json_schema","json_schema":{"name":"city_population","strict":true,"schema":{"type":"object","properties":{"city":{"type":"string"},"population":{"type":"integer"}},"required":["city","population"],"additionalProperties":false}}},"max_tokens":200},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Give the city name and the approximate population of Manila city proper.\"\n    }\n  ],\n  \"response_format\": {\n    \"type\": \"json_schema\",\n    \"json_schema\": {\n      \"name\": \"city_population\",\n      \"strict\": true,\n      \"schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"city\": {\n            \"type\": \"string\"\n          },\n          \"population\": {\n            \"type\": \"integer\"\n          }\n        },\n        \"required\": [\n          \"city\",\n          \"population\"\n        ],\n        \"additionalProperties\": false\n      }\n    }\n  },\n  \"max_tokens\": 200\n}'"},"chat-vision":{"summary":"Image input","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":[{"type":"text","text":"What colour is this image? Answer with one word."},{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFklEQVR42mP4z8BAEmIY1TCqYfhqAACQ+f8B8u7oVwAAAABJRU5ErkJggg=="}}]}],"max_tokens":10,"temperature":0},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"What colour is this image? Answer with one word.\"\n        },\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFklEQVR42mP4z8BAEmIY1TCqYfhqAACQ+f8B8u7oVwAAAABJRU5ErkJggg==\"\n          }\n        }\n      ]\n    }\n  ],\n  \"max_tokens\": 10,\n  \"temperature\": 0\n}'"},"chat-reasoning-effort":{"summary":"Reasoning effort","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"What is 17 * 23? Answer with the number only."}],"reasoning_effort":"low","max_tokens":400},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is 17 * 23? Answer with the number only.\"\n    }\n  ],\n  \"reasoning_effort\": \"low\",\n  \"max_tokens\": 400\n}'"}}}}},"responses":{"200":{"description":"The assistant message in `choices[0].message`, the reason that generation stopped in `choices[0].finish_reason` (`stop`, `length` or `tool_calls`), and token counts in `usage`.","headers":{"x-litellm-call-id":{"description":"Identifier of this call on the gateway. Quote it in a support request.","schema":{"type":"string"}},"x-litellm-model-group":{"description":"The model id that served the call, as sent in `model`.","schema":{"type":"string"},"example":"gemini/gemini-3.1-flash-lite"},"x-litellm-response-cost":{"description":"Spend of this call, as a decimal number in the unit of the team budget. Some responses do not carry this header, for example streamed responses.","schema":{"type":"string"}},"x-litellm-key-spend":{"description":"Approximate spend of the key, as a decimal number in the unit of the team budget. The value is the spend cached on the gateway replica that served the call, plus the spend of this call. The cached part lags behind the real total and can differ between replicas. Do not use it as an exact balance.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"Request limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"15"},"x-ratelimit-remaining-requests":{"description":"Requests that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"11"},"x-ratelimit-limit-tokens":{"description":"Token limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"250000"},"x-ratelimit-remaining-tokens":{"description":"Tokens that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"249982"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"created":{"type":"integer"},"model":{"type":"string"},"object":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"type":"string"},"index":{"type":"integer"},"message":{"type":"object","properties":{"content":{"type":["null","string"]},"role":{"type":"string"},"images":{"type":"array"},"thinking_blocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"thinking":{"type":"string"}}}},"provider_specific_fields":{"type":"object","properties":{"thought_signatures":{"type":"array","items":{"type":"string"}},"thinking_blocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"thinking":{"type":"string"}}}}}},"tool_calls":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"provider_specific_fields":{"type":"object","properties":{"thought_signature":{"type":"string"}}},"function":{"type":"object","properties":{"arguments":{"type":"string"},"name":{"type":"string"}}},"id":{"type":"string"},"type":{"type":"string"}}}},"reasoning_content":{"type":"string"}}},"provider_specific_fields":{"type":"object","properties":{"native_finish_reason":{"type":"string"}}}}}},"usage":{"type":"object","properties":{"completion_tokens":{"type":"integer"},"prompt_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"completion_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"}}},"prompt_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer"},"image_tokens":{"type":"integer"}}}}},"service_tier":{"type":"string"}}},"examples":{"chat-basic":{"summary":"Basic chat completion","value":{"id":"example-1","created":1795612209,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"pong","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"],"thinking_blocks":[]}},"provider_specific_fields":{}}],"usage":{"completion_tokens":1,"prompt_tokens":8,"total_tokens":9,"completion_tokens_details":{"text_tokens":1},"prompt_tokens_details":{"text_tokens":8}},"service_tier":"default"}},"chat-system":{"summary":"System message","value":{"id":"example-2","created":1795612295,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"HELLO MANILA CITY!","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"]}},"provider_specific_fields":{"native_finish_reason":"STOP"}}],"usage":{"completion_tokens":5,"prompt_tokens":17,"total_tokens":22,"completion_tokens_details":{"text_tokens":5},"prompt_tokens_details":{"text_tokens":17}},"service_tier":"default"}},"chat-multiturn":{"summary":"Multi-turn conversation","value":{"id":"example-3","created":1795612299,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Ana.","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"]}},"provider_specific_fields":{"native_finish_reason":"STOP"}}],"usage":{"completion_tokens":2,"prompt_tokens":25,"total_tokens":27,"completion_tokens_details":{"text_tokens":2},"prompt_tokens_details":{"text_tokens":25}},"service_tier":"default"}},"chat-params":{"summary":"Sampling parameters; output cut at max_tokens","value":{"id":"example-4","created":1795612304,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"length","index":0,"message":{"content":"1","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"]}},"provider_specific_fields":{"native_finish_reason":"MAX_TOKENS"}}],"usage":{"completion_tokens":1,"prompt_tokens":14,"total_tokens":15,"completion_tokens_details":{"text_tokens":1},"prompt_tokens_details":{"text_tokens":14}},"service_tier":"default"}},"chat-stop":{"summary":"Stop sequence","value":{"id":"example-11","created":1795612240,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"1 2 3 4 ","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"],"thinking_blocks":[]}},"provider_specific_fields":{}}],"usage":{"completion_tokens":8,"prompt_tokens":19,"total_tokens":27,"completion_tokens_details":{"text_tokens":8},"prompt_tokens_details":{"text_tokens":19}},"service_tier":"default"}},"chat-tools":{"summary":"Function calling: the model calls a tool","value":{"id":"example-6","created":1795612218,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"tool_calls","index":0,"message":{"role":"assistant","tool_calls":[{"index":0,"provider_specific_fields":{"thought_signature":"EqkBCqYBAWkU…[truncated 232 chars]"},"function":{"arguments":"{\"city\": \"Manila\"}","name":"get_weather"},"id":"call_example-1","type":"function"}],"images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"],"thinking_blocks":[]},"content":null},"provider_specific_fields":{}}],"usage":{"completion_tokens":17,"prompt_tokens":62,"total_tokens":79,"completion_tokens_details":{"text_tokens":17},"prompt_tokens_details":{"text_tokens":62}},"service_tier":"default"}},"chat-tools-result":{"summary":"Function calling: the tool result goes back","value":{"id":"example-7","created":1795612317,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"The weather in Manila is currently sunny with a temperature of 31°C.","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"]}},"provider_specific_fields":{"native_finish_reason":"STOP"}}],"usage":{"completion_tokens":17,"prompt_tokens":100,"total_tokens":117,"completion_tokens_details":{"text_tokens":17},"prompt_tokens_details":{"text_tokens":100}},"service_tier":"default"}},"chat-json-object":{"summary":"JSON output (json_object)","value":{"id":"example-8","created":1795612322,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"{\n  \"city\": \"Manila\",\n  \"country\": \"Philippines\"\n}","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"]}},"provider_specific_fields":{"native_finish_reason":"STOP"}}],"usage":{"completion_tokens":20,"prompt_tokens":14,"total_tokens":34,"completion_tokens_details":{"text_tokens":20},"prompt_tokens_details":{"text_tokens":14}},"service_tier":"default"}},"chat-json-schema":{"summary":"Structured output (json_schema)","value":{"id":"example-9","created":1795612326,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"{\n  \"city\": \"Manila\",\n  \"population\": 1846513\n}","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"]}},"provider_specific_fields":{"native_finish_reason":"STOP"}}],"usage":{"completion_tokens":25,"prompt_tokens":14,"total_tokens":39,"completion_tokens_details":{"text_tokens":25},"prompt_tokens_details":{"text_tokens":14}},"service_tier":"default"}},"chat-vision":{"summary":"Image input","value":{"id":"example-10","created":1795612231,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"Red","role":"assistant","images":[],"thinking_blocks":[],"provider_specific_fields":{"thought_signatures":["EqkBCqYBAWkU…[truncated 232 chars]"],"thinking_blocks":[]}},"provider_specific_fields":{}}],"usage":{"completion_tokens":1,"prompt_tokens":1101,"total_tokens":1102,"completion_tokens_details":{"text_tokens":1},"prompt_tokens_details":{"text_tokens":12,"image_tokens":1089}},"service_tier":"default"}},"chat-reasoning-effort":{"summary":"Reasoning effort","value":{"id":"example-12","created":1795612245,"model":"gemini/gemini-3.1-flash-lite","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"391","role":"assistant","images":[],"reasoning_content":"Here's my thought process on this straightforward calculation:\n\n**Calculating the Product of 17 and 23**\n\nOkay, so the user wants the result of 17 multiplied by 23, and they're specifically asking for just the numerical answer. No problem.\n\nMy first step is to recognize the prompt and confirm the calculation needed. It's a simple multiplication, but I want to be sure I understand the intent, which is to return the product only.\n\nNext, I'll run the calculation. I'll use a distribution method which, although not the fastest for me, is useful to display the underlying steps.\n\nMy approach will be to break down 23 into (20 + 3), then multiply 17 by each part:\n\n*   17 * 20 = 340\n*   17 * 3 = 51\n\nFinally, I'll sum the results: 340 + 51, to get 391. I could have used a different method, such as carrying out the calculation directly. However, the distribution method provides good clarity.\n\n\n","thinking_blocks":[{"type":"thinking","thinking":"Here's my thought process on this straightforward calculation:\n\n**Calculating the Product of 17 and 23**\n\nOkay, so the user wants the result of 17 multiplied by 23, and they're specifically asking for just the numerical answer. No problem.\n\nMy first step is to recognize the prompt and confirm the calculation needed. It's a simple multiplication, but I want to be sure I understand the intent, which is to return the product only.\n\nNext, I'll run the calculation. I'll use a distribution method which, although not the fastest for me, is useful to display the underlying steps.\n\nMy approach will be to break down 23 into (20 + 3), then multiply 17 by each part:\n\n*   17 * 20 = 340\n*   17 * 3 = 51\n\nFinally, I'll sum the results: 340 + 51, to get 391. I could have used a different method, such as carrying out the calculation directly. However, the distribution method provides good clarity.\n\n\n"}],"provider_specific_fields":{"thought_signatures":["EoMECoAEAWkU…[truncated 692 chars]"],"thinking_blocks":[{"type":"thinking","thinking":"Here's my thought process on this straightforward calculation:\n\n**Calculating the Product of 17 and 23**\n\nOkay, so the user wants the result of 17 multiplied by 23, and they're specifically asking for just the numerical answer. No problem.\n\nMy first step is to recognize the prompt and confirm the calculation needed. It's a simple multiplication, but I want to be sure I understand the intent, which is to return the product only.\n\nNext, I'll run the calculation. I'll use a distribution method which, although not the fastest for me, is useful to display the underlying steps.\n\nMy approach will be to break down 23 into (20 + 3), then multiply 17 by each part:\n\n*   17 * 20 = 340\n*   17 * 3 = 51\n\nFinally, I'll sum the results: 340 + 51, to get 391. I could have used a different method, such as carrying out the calculation directly. However, the distribution method provides good clarity.\n\n\n"}]}},"provider_specific_fields":{}}],"usage":{"completion_tokens":142,"prompt_tokens":17,"total_tokens":159,"completion_tokens_details":{"reasoning_tokens":139,"text_tokens":3},"prompt_tokens_details":{"text_tokens":17}},"service_tier":"default"}}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events. Each event is `data: <chat.completion.chunk JSON>`; the last event is `data: [DONE]`."},"examples":{"chat-stream":{"summary":"Streaming with usage","value":"data: {\"id\":\"example-5\",\"object\":\"chat.completion.chunk\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"1 \"}}]}\n\ndata: {\"id\":\"example-5\",\"object\":\"chat.completion.chunk\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2 \"}}]}\n\ndata: {\"id\":\"example-5\",\"object\":\"chat.completion.chunk\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3 \"}}]}\n\ndata: {\"id\":\"example-5\",\"object\":\"chat.completion.chunk\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"4 \"}}]}\n\ndata: {\"id\":\"example-5\",\"object\":\"chat.completion.chunk\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"5\"}}]}\n\ndata: {\"id\":\"example-5\",\"object\":\"chat.completion.chunk\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"example-5\",\"created\":1795612308,\"model\":\"gemini/gemini-3.1-flash-lite\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{}}],\"usage\":{\"completion_tokens\":9,\"prompt_tokens\":13,\"total_tokens\":22,\"completion_tokens_details\":{\"reasoning_tokens\":0,\"text_tokens\":9},\"cost\":\"<number>\"}}\n\ndata: [DONE]\n"}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":["null","string"]},"code":{"type":"string"}}}}},"examples":{"error-malformed-json":{"summary":"The body is not valid JSON","value":{"error":{"message":"Invalid JSON payload: unexpected end of data: line 1 column 52 (char 51)","type":"invalid_request_error","param":"request_body","code":"400"}},"x-request":"{\"model\":\"gemini/gemini-3.1-flash-lite\",\"messages\":"},"error-missing-messages":{"summary":"A required parameter is missing","value":{"error":{"message":"/chat/completions: Missing required parameter: 'messages'.","type":"invalid_request_error","param":"messages","code":"400"}},"x-request":{"model":"gemini/gemini-3.1-flash-lite"}},"chat-n":{"summary":"n is larger than 1","value":{"error":{"message":"Multiple candidates is not enabled for this model","type":"invalid_request_error","param":null,"code":"400"}},"x-request":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Name one colour. One word."}],"n":2,"max_tokens":5,"temperature":1}}}}}},"401":{"description":"The key is missing or unknown.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":"string"},"code":{"type":"string"}}}}},"examples":{"error-no-auth":{"summary":"No key","value":{"error":{"message":"Authentication Error, No api key passed in.","type":"auth_error","param":"None","code":"401"}},"x-request":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"hi"}],"max_tokens":5}},"error-bad-key":{"summary":"Unknown key","value":{"error":{"message":"Authentication Error, Invalid proxy server token passed.","type":"token_not_found_in_db","param":"key","code":"401"}},"x-request":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"hi"}],"max_tokens":5}}}}}},"403":{"description":"The key cannot use the requested model or route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":"string"},"code":{"type":"string"}}}}},"examples":{"error-unknown-model":{"summary":"Model not available to the key","value":{"error":{"message":"The requested model 'no-such-model' is not available for this API key, or the model name is invalid. Check the models available to you and try again.","type":"team_model_access_denied","param":"model","code":"403"}},"x-request":{"model":"no-such-model","messages":[{"role":"user","content":"hi"}],"max_tokens":5}}}}}},"422":{"description":"The team budget is exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":"null"},"code":{"type":"string"}}}}},"examples":{"budget-2":{"summary":"Team budget exceeded","value":{"error":{"message":"Budget has been exceeded! Team=<team id> Current cost: <spend>, Max budget: <budget>","type":"budget_exceeded","param":null,"code":"422"}}}}}}}},"x-gateway-slug":"chat-completions","x-gateway-aliases":[{"path":"/chat/completions","evidence":"chat-no-v1"}],"x-gateway-facts":["tool-call-round-trip","reasoning-tokens-count-against-max-tokens","reasoning-effort-none","stream-usage-chunk"],"x-gateway-param-evidence":{"model":{"cases":["chat-basic"]},"messages":{"cases":["chat-basic","chat-system","chat-multiturn","chat-vision","chat-tools-result"],"required":"error-missing-messages"},"max_tokens":{"cases":["chat-basic","chat-params"]},"temperature":{"cases":["chat-params","chat-system"]},"top_p":{"cases":["chat-params"]},"seed":{"cases":["chat-params"]},"stop":{"cases":["chat-stop"]},"stream":{"cases":["chat-stream"]},"stream_options":{"cases":["chat-stream"]},"tools":{"cases":["chat-tools","chat-tools-result"]},"tool_choice":{"cases":["chat-tools"]},"response_format":{"cases":["chat-json-object","chat-json-schema"]},"reasoning_effort":{"cases":["chat-reasoning-effort"]},"n":{"cases":["chat-n"]}}}},"/v1/completions":{"post":{"operationId":"createCompletion","summary":"Create a text completion","description":"Completes a text prompt, in the legacy OpenAI Completions format.","tags":["Chat"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from `GET /v1/models`."},"prompt":{"type":"string","description":"The text to complete."},"max_tokens":{"type":"integer","description":"Maximum number of completion tokens."}}},"examples":{"completions":{"summary":"Text completion","value":{"model":"gemini/gemini-3.1-flash-lite","prompt":"Say hi","max_tokens":10},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/completions \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"prompt\": \"Say hi\",\n  \"max_tokens\": 10\n}'"}}}}},"responses":{"200":{"description":"The completion in `choices[0].text` and token counts in `usage`.","headers":{"x-litellm-call-id":{"description":"Identifier of this call on the gateway. Quote it in a support request.","schema":{"type":"string"}},"x-litellm-model-group":{"description":"The model id that served the call, as sent in `model`.","schema":{"type":"string"},"example":"gemini/gemini-3.1-flash-lite"},"x-litellm-response-cost":{"description":"Spend of this call, as a decimal number in the unit of the team budget. Some responses do not carry this header, for example streamed responses.","schema":{"type":"string"}},"x-litellm-key-spend":{"description":"Approximate spend of the key, as a decimal number in the unit of the team budget. The value is the spend cached on the gateway replica that served the call, plus the spend of this call. The cached part lags behind the real total and can differ between replicas. Do not use it as an exact balance.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"Request limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"15"},"x-ratelimit-remaining-requests":{"description":"Requests that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"8"},"x-ratelimit-limit-tokens":{"description":"Token limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"250000"},"x-ratelimit-remaining-tokens":{"description":"Tokens that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"248630"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"finish_reason":{"type":"string"},"index":{"type":"integer"},"text":{"type":"string"},"logprobs":{"type":"null"}}}},"usage":{"type":"object","properties":{"completion_tokens":{"type":"integer"},"prompt_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"completion_tokens_details":{"type":"object","properties":{"accepted_prediction_tokens":{"type":"null"},"audio_tokens":{"type":"null"},"reasoning_tokens":{"type":"null"},"rejected_prediction_tokens":{"type":"null"},"text_tokens":{"type":"integer"},"image_tokens":{"type":"null"},"video_tokens":{"type":"null"}}},"prompt_tokens_details":{"type":"object","properties":{"audio_tokens":{"type":"null"},"cached_tokens":{"type":"null"},"text_tokens":{"type":"integer"},"image_tokens":{"type":"null"},"video_tokens":{"type":"null"}}},"cache_read_input_tokens":{"type":"null"}}}}},"examples":{"completions":{"summary":"Text completion","value":{"id":"example-13","object":"text_completion","created":1795611800,"model":"gemini/gemini-3.1-flash-lite","choices":[{"finish_reason":"length","index":0,"text":"Hi! How can I help","logprobs":null}],"usage":{"completion_tokens":6,"prompt_tokens":3,"total_tokens":9,"completion_tokens_details":{"accepted_prediction_tokens":null,"audio_tokens":null,"reasoning_tokens":null,"rejected_prediction_tokens":null,"text_tokens":6,"image_tokens":null,"video_tokens":null},"prompt_tokens_details":{"audio_tokens":null,"cached_tokens":null,"text_tokens":3,"image_tokens":null,"video_tokens":null},"cache_read_input_tokens":null}}}}}}}},"x-gateway-slug":"completions","x-gateway-param-evidence":{"model":{"cases":["completions"]},"prompt":{"cases":["completions"]},"max_tokens":{"cases":["completions"]}}}},"/v1/responses":{"post":{"operationId":"createResponse","summary":"Create a response","description":"Generates a model response in the OpenAI Responses format.","tags":["Chat"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from `GET /v1/models`."},"input":{"type":"string","description":"The input text."},"max_output_tokens":{"type":"integer","description":"Maximum number of output tokens."}}},"examples":{"responses":{"summary":"Response","value":{"model":"gemini/gemini-3.1-flash-lite","input":"Reply with the single word: pong","max_output_tokens":16},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/responses \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"input\": \"Reply with the single word: pong\",\n  \"max_output_tokens\": 16\n}'"}}}}},"responses":{"200":{"description":"A `response` object. The text is in `output[0].content[0].text` and token counts are in `usage`.","headers":{"x-litellm-call-id":{"description":"Identifier of this call on the gateway. Quote it in a support request.","schema":{"type":"string"}},"x-litellm-model-group":{"description":"The model id that served the call, as sent in `model`.","schema":{"type":"string"},"example":"gemini/gemini-3.1-flash-lite"},"x-litellm-response-cost":{"description":"Spend of this call, as a decimal number in the unit of the team budget. Some responses do not carry this header, for example streamed responses.","schema":{"type":"string"}},"x-litellm-key-spend":{"description":"Approximate spend of the key, as a decimal number in the unit of the team budget. The value is the spend cached on the gateway replica that served the call, plus the spend of this call. The cached part lags behind the real total and can differ between replicas. Do not use it as an exact balance.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"Request limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"15"},"x-ratelimit-remaining-requests":{"description":"Requests that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"10"},"x-ratelimit-limit-tokens":{"description":"Token limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"250000"},"x-ratelimit-remaining-tokens":{"description":"Tokens that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"248621"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"integer"},"error":{"type":"null"},"incomplete_details":{"type":"null"},"instructions":{"type":"null"},"metadata":{"type":"object","properties":{}},"model":{"type":"string"},"object":{"type":"string"},"output":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"status":{"type":"string"},"role":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"annotations":{"type":"array"}}}},"phase":{"type":"null"}}}},"parallel_tool_calls":{"type":"boolean"},"temperature":{"type":"null"},"tool_choice":{"type":"string"},"tools":{"type":"array"},"top_p":{"type":"null"},"max_output_tokens":{"type":"integer"},"previous_response_id":{"type":"null"},"reasoning":{"type":"null"},"status":{"type":"string"},"text":{"type":"object","properties":{}},"truncation":{"type":"null"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"audio_tokens":{"type":"null"},"cached_tokens":{"type":"integer"},"cached_tokens_details":{"type":"null"},"image_tokens":{"type":"null"},"text_tokens":{"type":"integer"},"video_tokens":{"type":"null"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"audio_tokens":{"type":"null"},"reasoning_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"},"cost":{"type":"null"}}},"user":{"type":"null"},"store":{"type":"null"}}},"examples":{"responses":{"summary":"Response","value":{"id":"resp_example-14","created_at":1795612353,"error":null,"incomplete_details":null,"instructions":null,"metadata":{},"model":"gemini/gemini-3.1-flash-lite","object":"response","output":[{"type":"message","id":"msg_example-15","status":"completed","role":"assistant","content":[{"type":"output_text","text":"pong","annotations":[]}],"phase":null}],"parallel_tool_calls":false,"temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"max_output_tokens":16,"previous_response_id":null,"reasoning":null,"status":"completed","text":{},"truncation":null,"usage":{"input_tokens":8,"input_tokens_details":{"audio_tokens":null,"cached_tokens":0,"cached_tokens_details":null,"image_tokens":null,"text_tokens":8,"video_tokens":null},"output_tokens":1,"output_tokens_details":{"audio_tokens":null,"reasoning_tokens":0,"text_tokens":1},"total_tokens":9,"cost":null},"user":null,"store":null}}}}}}},"x-gateway-slug":"responses","x-gateway-param-evidence":{"model":{"cases":["responses"]},"input":{"cases":["responses"]},"max_output_tokens":{"cases":["responses"]}}}},"/v1/messages":{"post":{"operationId":"createMessage","summary":"Create a message (Anthropic format)","description":"Generates the next assistant message in the Anthropic Messages format. Clients built on the Anthropic SDKs can use the gateway with the base URL changed. The key is accepted in `Authorization: Bearer` or in `x-api-key`.","tags":["Chat"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"anthropic-version","in":"header","description":"Anthropic API version, as the Anthropic SDKs send it.","schema":{"type":"string"},"example":"2023-06-01"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from `GET /v1/models`."},"max_tokens":{"type":"integer","description":"Maximum number of output tokens."},"messages":{"type":"array","description":"The conversation, as `role` and `content` pairs."}}},"examples":{"messages":{"summary":"Message, key in Authorization","value":{"model":"gemini/gemini-3.1-flash-lite","max_tokens":16,"messages":[{"role":"user","content":"Reply with the single word: pong"}]},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/messages \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H 'anthropic-version: 2023-06-01' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"max_tokens\": 16,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with the single word: pong\"\n    }\n  ]\n}'"},"messages-x-api-key":{"summary":"Message, key in x-api-key","value":{"model":"gemini/gemini-3.1-flash-lite","max_tokens":16,"messages":[{"role":"user","content":"Reply with the single word: pong"}]},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/messages \\\n  -H \"x-api-key: $GATEWAY_API_KEY\" \\\n  -H 'anthropic-version: 2023-06-01' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"max_tokens\": 16,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with the single word: pong\"\n    }\n  ]\n}'"}}}}},"responses":{"200":{"description":"A `message` object with the text in `content[0].text`, the reason that generation stopped in `stop_reason`, and token counts in `usage`.","headers":{"x-litellm-call-id":{"description":"Identifier of this call on the gateway. Quote it in a support request.","schema":{"type":"string"}},"x-litellm-model-group":{"description":"The model id that served the call, as sent in `model`.","schema":{"type":"string"},"example":"gemini/gemini-3.1-flash-lite"},"x-litellm-response-cost":{"description":"Spend of this call, as a decimal number in the unit of the team budget. Some responses do not carry this header, for example streamed responses.","schema":{"type":"string"}},"x-litellm-key-spend":{"description":"Approximate spend of the key, as a decimal number in the unit of the team budget. The value is the spend cached on the gateway replica that served the call, plus the spend of this call. The cached part lags behind the real total and can differ between replicas. Do not use it as an exact balance.","schema":{"type":"string"}},"x-ratelimit-limit-requests":{"description":"Request limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"15"},"x-ratelimit-remaining-requests":{"description":"Requests that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"6"},"x-ratelimit-limit-tokens":{"description":"Token limit per minute of the deployment that served the call.","schema":{"type":"string"},"example":"250000"},"x-ratelimit-remaining-tokens":{"description":"Tokens that remain in the current minute on the deployment that served the call.","schema":{"type":"string"},"example":"248612"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"},"model":{"type":"string"},"stop_sequence":{"type":"null"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}}}},"stop_reason":{"type":"string"},"stop_details":{"type":"null"}}},"examples":{"messages":{"summary":"Message, key in Authorization","value":{"id":"example-16","type":"message","role":"assistant","model":"gemini/gemini-3.1-flash-lite","stop_sequence":null,"usage":{"input_tokens":8,"output_tokens":1},"content":[{"type":"text","text":"pong"}],"stop_reason":"end_turn","stop_details":null}},"messages-x-api-key":{"summary":"Message, key in x-api-key","value":{"id":"example-16","type":"message","role":"assistant","model":"gemini/gemini-3.1-flash-lite","stop_sequence":null,"usage":{"input_tokens":8,"output_tokens":1},"content":[{"type":"text","text":"pong"}],"stop_reason":"end_turn","stop_details":null}}}}}}},"x-gateway-slug":"messages","x-gateway-param-evidence":{"model":{"cases":["messages"]},"max_tokens":{"cases":["messages"]},"messages":{"cases":["messages"]}}}},"/v1/messages/count_tokens":{"post":{"operationId":"countMessageTokens","summary":"Count tokens (Anthropic format)","description":"Counts the input tokens of an Anthropic Messages request without generating output.","tags":["Tokens"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from `GET /v1/models`."},"messages":{"type":"array","description":"The conversation to count."}}},"examples":{"messages-count-tokens":{"summary":"Count tokens","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Reply with the single word: pong"}]},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/v1/messages/count_tokens \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with the single word: pong\"\n    }\n  ]\n}'"}}}}},"responses":{"200":{"description":"`input_tokens`. `litellm_count_source` tells whether the model provider (`provider`) or a local estimate counted the tokens.","content":{"application/json":{"schema":{"type":"object","properties":{"input_tokens":{"type":"integer"},"litellm_count_source":{"type":"string"}}},"examples":{"messages-count-tokens":{"summary":"Count tokens","value":{"input_tokens":8,"litellm_count_source":"provider"}}}}}}},"x-gateway-slug":"messages-count-tokens","x-gateway-facts":["token-count-sources"],"x-gateway-param-evidence":{"model":{"cases":["messages-count-tokens"]},"messages":{"cases":["messages-count-tokens"]}}}},"/utils/token_counter":{"post":{"operationId":"countTokens","summary":"Count tokens","description":"Counts the tokens of a chat request without generating output.","tags":["Tokens"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from `GET /v1/models`."},"messages":{"type":"array","description":"The conversation to count."}}},"examples":{"token-counter":{"summary":"Count tokens","value":{"model":"gemini/gemini-3.1-flash-lite","messages":[{"role":"user","content":"Reply with the single word: pong"}]},"x-curl":"curl -sS -X POST https://models.convergestudios.ai/utils/token_counter \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"gemini/gemini-3.1-flash-lite\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Reply with the single word: pong\"\n    }\n  ]\n}'"}}}}},"responses":{"200":{"description":"`total_tokens`. `count_source` tells whether the model provider or a local estimate (`local_estimate`) counted the tokens.","content":{"application/json":{"schema":{"type":"object","properties":{"total_tokens":{"type":"integer"},"request_model":{"type":"string"},"model_used":{"type":"string"},"tokenizer_type":{"type":"string"},"count_source":{"type":"string"},"original_response":{"type":"null"},"error":{"type":"boolean"},"error_message":{"type":"null"},"status_code":{"type":"null"}}},"examples":{"token-counter":{"summary":"Count tokens","value":{"total_tokens":14,"request_model":"gemini/gemini-3.1-flash-lite","model_used":"gemini-3.1-flash-lite","tokenizer_type":"openai_tokenizer","count_source":"local_estimate","original_response":null,"error":false,"error_message":null,"status_code":null}}}}}}},"x-gateway-slug":"token-counter","x-gateway-facts":["token-count-sources"],"x-gateway-param-evidence":{"model":{"cases":["token-counter"]},"messages":{"cases":["token-counter"]}}}},"/v1/models":{"get":{"operationId":"listModels","summary":"List models","description":"Lists the model ids that the key can use, with the context window and the output limit of each.","tags":["Models"],"security":[{"bearerAuth":[]}],"x-gateway-request-examples":[{"id":"models-list","summary":"Models","curl":"curl -sS https://models.convergestudios.ai/v1/models \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\""}],"responses":{"200":{"description":"A `list` object. Each item has the model `id`, `mode`, `max_input_tokens` and `max_output_tokens`.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"integer"},"owned_by":{"type":"string"},"mode":{"type":"string"},"max_input_tokens":{"type":"integer"},"max_output_tokens":{"type":"integer"}}}},"object":{"type":"string"}}},"examples":{"models-list":{"summary":"Models","value":{"data":[{"id":"gemini/gemini-4-carbon","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":1048576},{"id":"gemini/gemini-4-hydrogen","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":1048576},{"id":"gemini/gemini-4-argon","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":1048576},{"id":"gemini/gemini-3.8-flash","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":65536},{"id":"gemini/gemini-3.6-flash","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":65536},{"id":"gemini/gemini-3.5-flash-lite","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":65536},{"id":"gemini/gemini-3.1-flash-lite","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":65536},{"id":"gemini/gemini-3.1-pro-preview","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":65536},{"id":"gemini/gemini-3-flash-preview","object":"model","created":1677610602,"owned_by":"openai","mode":"chat","max_input_tokens":1048576,"max_output_tokens":65536}],"object":"list"}}}}}}},"x-gateway-slug":"models","x-gateway-aliases":[{"path":"/models","evidence":"models-list-no-v1"}]}},"/model_group/info":{"get":{"operationId":"listModelGroups","summary":"Get model capabilities","description":"Lists the capabilities of each model: context window, output limit, image input, function calling, reasoning, the accepted reasoning efforts and the accepted OpenAI parameters.","tags":["Models"],"security":[{"bearerAuth":[]}],"x-gateway-request-examples":[{"id":"model-group-info","summary":"Model capabilities","curl":"curl -sS https://models.convergestudios.ai/model_group/info \\\n  -H \"Authorization: Bearer $GATEWAY_API_KEY\""}],"responses":{"200":{"description":"One item per model in `data`. `model_group` is the model id.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"model_group":{"type":"string"},"providers":{"type":"array","items":{"type":"string"}},"max_input_tokens":{"type":"integer"},"max_output_tokens":{"type":"integer"},"mode":{"type":"string"},"tpm":{"type":"integer"},"rpm":{"type":"integer"},"itpm":{"type":"null"},"otpm":{"type":"null"},"supports_parallel_function_calling":{"type":"boolean"},"supports_vision":{"type":"boolean"},"supports_web_search":{"type":"boolean"},"supports_url_context":{"type":"boolean"},"supports_reasoning":{"type":"boolean"},"supports_function_calling":{"type":"boolean"},"supports_fast_mode":{"type":"boolean"},"supported_reasoning_efforts":{"type":["array","null"],"items":{"type":"string"}},"supported_openai_params":{"type":"array","items":{"type":"string"}},"configurable_clientside_auth_params":{"type":"null"},"is_public_model_group":{"type":"boolean"},"health_status":{"type":"null"},"health_response_time":{"type":"null"},"health_checked_at":{"type":"null"}}}}}},"examples":{"model-group-info":{"summary":"Model capabilities","value":{"data":[{"model_group":"gemini/gemini-4-carbon","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":1048576,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":["none","low","medium","high"],"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-4-hydrogen","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":1048576,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":["none","low","medium","high"],"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-4-argon","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":1048576,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":["none","low","medium","high"],"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-3.8-flash","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":65536,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":["none","low","medium","high"],"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-3.6-flash","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":65536,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":null,"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-3.5-flash-lite","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":65536,"mode":"chat","tpm":250000,"rpm":15,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":null,"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-3.1-flash-lite","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":65536,"mode":"chat","tpm":250000,"rpm":15,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":null,"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-3.1-pro-preview","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":65536,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":false,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":null,"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null},{"model_group":"gemini/gemini-3-flash-preview","providers":["gemini"],"max_input_tokens":1048576,"max_output_tokens":65536,"mode":"chat","tpm":800000,"rpm":2000,"itpm":null,"otpm":null,"supports_parallel_function_calling":true,"supports_vision":true,"supports_web_search":true,"supports_url_context":true,"supports_reasoning":true,"supports_function_calling":true,"supports_fast_mode":false,"supported_reasoning_efforts":null,"supported_openai_params":["temperature","top_p","max_tokens","max_completion_tokens","stream","tools","tool_choice","functions","response_format","n","stop","logprobs","frequency_penalty","presence_penalty","seed","modalities","parallel_tool_calls","web_search_options","include_server_side_tool_invocations","service_tier","reasoning_effort","thinking"],"configurable_clientside_auth_params":null,"is_public_model_group":false,"health_status":null,"health_response_time":null,"health_checked_at":null}]}}}}}}},"x-gateway-slug":"model-group-info"}},"/health/liveliness":{"get":{"operationId":"getLiveliness","summary":"Liveness","description":"Tells whether the gateway process is running. No key is necessary.","tags":["Health"],"security":[],"x-gateway-request-examples":[{"id":"health-liveliness","summary":"Liveness","curl":"curl -sS https://models.convergestudios.ai/health/liveliness"}],"responses":{"200":{"description":"A JSON string.","content":{"application/json":{"schema":{"type":"string"},"examples":{"health-liveliness":{"summary":"Liveness","value":"I'm alive!"}}}}}},"x-gateway-slug":"health-liveliness"}},"/health/readiness":{"get":{"operationId":"getReadiness","summary":"Readiness","description":"Tells whether the gateway is ready to accept calls. No key is necessary.","tags":["Health"],"security":[],"x-gateway-request-examples":[{"id":"health-readiness","summary":"Readiness","curl":"curl -sS https://models.convergestudios.ai/health/readiness"}],"responses":{"200":{"description":"`status` is `healthy` when the gateway is ready.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"db":{"type":"string"}}},"examples":{"health-readiness":{"summary":"Readiness","value":{"status":"healthy","db":"connected"}}}}}}},"x-gateway-slug":"health-readiness"}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Converge AI Gateway virtual key, sent as `Authorization: Bearer <virtual key>`. The key is issued per team and is valid only for the model routes of the gateway."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"The same virtual key in the `x-api-key` header. Accepted on `POST /v1/messages`, as the Anthropic SDKs send it."}}},"x-gateway-models":[{"id":"gemini/gemini-4-carbon","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":1048576,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":["none","low","medium","high"],"responseFormat":true},{"id":"gemini/gemini-4-hydrogen","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":1048576,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":["none","low","medium","high"],"responseFormat":true},{"id":"gemini/gemini-4-argon","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":1048576,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":["none","low","medium","high"],"responseFormat":true},{"id":"gemini/gemini-3.8-flash","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":65536,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":["none","low","medium","high"],"responseFormat":true},{"id":"gemini/gemini-3.6-flash","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":65536,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":[],"responseFormat":true},{"id":"gemini/gemini-3.5-flash-lite","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":65536,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":[],"responseFormat":true},{"id":"gemini/gemini-3.1-flash-lite","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":65536,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":[],"responseFormat":true},{"id":"gemini/gemini-3.1-pro-preview","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":65536,"vision":true,"functionCalling":true,"parallelFunctionCalling":false,"reasoning":true,"reasoningEfforts":[],"responseFormat":true},{"id":"gemini/gemini-3-flash-preview","mode":"chat","maxInputTokens":1048576,"maxOutputTokens":65536,"vision":true,"functionCalling":true,"parallelFunctionCalling":true,"reasoning":true,"reasoningEfforts":[],"responseFormat":true}],"x-gateway-error-types":[{"type":"invalid_request_error","status":400,"param":"request_body","meaning":"The request is not valid: the body is not JSON, a required parameter is missing, or the model rejects a parameter value. `error.param` names the parameter when the gateway knows it.","operation":"POST /v1/chat/completions","evidence":"error-malformed-json"},{"type":"auth_error","status":401,"param":"None","meaning":"The request has no key. Send `Authorization: Bearer <virtual key>`.","operation":"POST /v1/chat/completions","evidence":"error-no-auth"},{"type":"token_not_found_in_db","status":401,"param":"key","meaning":"The key is not known to the gateway: it is mistyped, deleted or expired.","operation":"POST /v1/chat/completions","evidence":"error-bad-key"},{"type":"team_model_access_denied","status":403,"param":"model","meaning":"The model id is not available to the team of the key, or does not exist. `GET /v1/models` lists the model ids that the key can use.","operation":"POST /v1/chat/completions","evidence":"error-unknown-model"},{"type":"budget_exceeded","status":422,"param":null,"meaning":"The spend of the team has reached its budget. Model calls stay rejected until the budget is raised or reset.","operation":"POST /v1/chat/completions","evidence":"budget#2"}],"x-gateway-facts":[{"id":"tool-call-round-trip","title":"Send the assistant tool-call message back unchanged","text":"The assistant message that requests a tool call carries opaque signature data in `tool_calls[].id` and in `provider_specific_fields`. Send that message back exactly as received, followed by the `tool` message with the same `tool_call_id`. Do not rebuild the assistant message from its parts.","evidence":["chat-tools","chat-tools-result"]},{"id":"reasoning-tokens-count-against-max-tokens","title":"Hidden reasoning tokens count against max_tokens","text":"Reasoning models spend completion tokens on hidden reasoning before the visible answer. These tokens count against `max_tokens` and appear in `usage.completion_tokens_details.reasoning_tokens`. When `max_tokens` is small, a reasoning model can use the full limit on reasoning and return `finish_reason: \"length\"` with no content. Set `max_tokens` high enough for reasoning and the answer, or lower `reasoning_effort`.","evidence":["smoke-gemini-3.1-pro-preview","smoke-gemini-3.6-flash"]},{"id":"reasoning-effort-none","title":"reasoning_effort none does not always remove reasoning","text":"On some models, `reasoning_effort: \"none\"` still produces a small number of reasoning tokens.","evidence":["smoke-gemini-4-hydrogen"]},{"id":"stream-usage-chunk","title":"Token usage in a stream","text":"A streamed response has no `usage` unless the request sets `stream_options.include_usage` to `true`. With it, the last chunk before `data: [DONE]` carries `usage` and an empty `choices[0].delta`.","evidence":["chat-stream"]},{"id":"token-count-sources","title":"Two token counters","text":"`POST /v1/messages/count_tokens` returns the count of the model provider. `POST /utils/token_counter` can return a local estimate (`count_source: \"local_estimate\"`), which differs from the provider count for the same messages.","evidence":["messages-count-tokens","token-counter"]},{"id":"rate-limits-per-deployment","title":"Rate limits are per deployment","text":"The `x-ratelimit-*` headers give the limits and the remaining capacity of the deployment that served the call, not of the key. A model can be served by more than one deployment, each with its own counters, so consecutive responses for the same model can show different remaining values. The limits differ between models.","evidence":["chat-basic","chat-params","chat-stop","smoke-gemini-4-carbon"]},{"id":"budget-team-scope","title":"The budget belongs to the team","text":"Spend is limited by a budget on the team of the key. When the spend of the team reaches the budget, every model call with a key of that team returns `422` with `error.type` `budget_exceeded`, for all models.","evidence":["budget#2","budget#3"]},{"id":"budget-checked-before-call","title":"The budget is checked before a call","text":"The gateway compares the team spend with the budget before it sends a call to the model. A call that starts below the budget completes, even when its own spend takes the team over the budget. Spend can therefore end above the budget by the spend of the last call. The next model call is rejected.","evidence":["budget#1","budget#2"]},{"id":"budget-discovery-after","title":"Discovery routes answer after the budget is reached","text":"When the budget is exceeded, `GET /v1/models` still returns `200`. Only model calls are rejected.","evidence":["budget#4"]},{"id":"key-spend-approximate","title":"x-litellm-key-spend is approximate","text":"`x-litellm-key-spend` is the spend cached on the gateway replica that served the call, plus the spend of that call. The cached part lags, and different replicas can report different values for the same key. `x-litellm-response-cost` is the spend of the one call. Neither header gives the exact remaining budget.","evidence":["chat-basic","budget#1"]}],"x-gateway-limitations":[{"id":"no-embeddings","title":"No embeddings","text":"No model of the gateway supports embeddings. `POST /v1/embeddings` returns `404`.","requests":[{"method":"POST","path":"/v1/embeddings","status":404,"contentType":"application/json","body":{"error":{"message":"models/gemini-3.1-flash-lite is not found for API version v1beta, or is not supported for embedContent.","type":"invalid_request_error","param":null,"code":"404"}},"evidence":"embeddings-unsupported"}]},{"id":"no-model-retrieve","title":"No single-model lookup","text":"Model ids contain a slash, so `GET /v1/models/{model}` does not resolve and returns `404`. Use `GET /v1/models` or `GET /model_group/info` and select the model from the list.","requests":[{"method":"GET","path":"/v1/models/gemini/gemini-3.1-flash-lite","status":404,"contentType":"application/json","body":{"detail":"Not Found"},"evidence":"model-retrieve"}]},{"id":"single-choice","title":"One choice per call","text":"`n` greater than `1` returns `400`, although `GET /model_group/info` lists `n` in `supported_openai_params`. Send one call for each choice.","requests":[{"method":"POST","path":"/v1/chat/completions","status":400,"contentType":"application/json","body":{"error":{"message":"Multiple candidates is not enabled for this model","type":"invalid_request_error","param":null,"code":"400"}},"evidence":"chat-n"}]},{"id":"management-routes","title":"Management routes are closed to virtual keys","text":"A virtual key can call only the model routes. Management routes, for example `GET /key/info`, `GET /user/info`, `GET /spend/logs` and `GET /health`, return `403`. For health checks, use `GET /health/liveliness` and `GET /health/readiness`, which need no key. For spend, use the spend headers of each response.","requests":[{"method":"GET","path":"/key/info","status":403,"contentType":"application/json","body":{"detail":"Virtual key is not allowed to call this route. Only allowed to call routes: ['llm_api_routes']. Tried to call route: /key/info"},"evidence":"error-admin-route-key-info"},{"method":"GET","path":"/user/info","status":403,"contentType":"application/json","body":{"detail":"Virtual key is not allowed to call this route. Only allowed to call routes: ['llm_api_routes']. Tried to call route: /user/info"},"evidence":"error-admin-route-user-info"},{"method":"GET","path":"/spend/logs","status":403,"contentType":"application/json","body":{"detail":"Virtual key is not allowed to call this route. Only allowed to call routes: ['llm_api_routes']. Tried to call route: /spend/logs"},"evidence":"error-admin-route-spend-logs"},{"method":"GET","path":"/health","status":403,"contentType":"application/json","body":{"detail":"Virtual key is not allowed to call this route. Only allowed to call routes: ['llm_api_routes']. Tried to call route: /health"},"evidence":"error-admin-route-health"}]},{"id":"no-served-openapi","title":"The gateway does not serve its own OpenAPI document","text":"`GET /openapi.json` on the gateway returns `403` with a plain-text body. The OpenAPI document of the gateway is published on this portal.","requests":[{"method":"GET","path":"/openapi.json","status":403,"contentType":"text/plain","body":"Forbidden","evidence":"error-openapi-json"}]}]}