Unknown parameters are forwarded to the upstream provider as-is. Errors for unsupported parameters (e.g. tools, response_format) come from the provider, not Routify.
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We recommend altering this or top_p but not both.
An alternative to sampling with temperature, called nucleus sampling, where the model considers only the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We recommend altering this or temperature but not both.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Routify","colors":{"primary":"#d4572c","light":"#e87050","dark":"#a33d1e"},"logo":{"light":"https://placehold.co/120x40/ffffff/d4572c?text=Routify","dark":"https://placehold.co/120x40/d4572c/ffffff?text=Routify"},"styling":{"latex":false},"navigation":{"languages":[{"language":"ru","default":true,"href":"getting-started"},{"language":"en","href":"en/getting-started"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"routify","hasAudioNarration":false,"actualSubdomain":"routify","customDomains":["docs.routify.ru"],"gitSource":{"type":"github","owner":"sady4850","repo":"routify","deployBranch":"main","contentDirectory":"mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21ebe87fd5f14b8ebb2ad9","collectionId":"a40a44b3-d926-4f58-b364-cf4106725259","schemaVersion":"v2"},"entitlements":{},"buildId":"6ae948eeb63426c73f14a051:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"ru","tag":"API Reference","count":5},{"language":"ru","tag":"Документация","count":5},{"language":"en","tag":"API Reference","count":4},{"language":"ru","tag":"Эндпоинты","count":3},{"language":"ru","tag":"Обзор","count":3},{"language":"en","tag":"Endpoints","count":3},{"language":"en","tag":"Docs","count":3},{"language":"ru","tag":"Основы","count":2},{"language":"ru","tag":"Гайды","count":2},{"language":"en","tag":"Overview","count":2},{"language":"en","tag":"Guides","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/api-reference/chat-completions","slug":"/en/api-reference/chat-completions","pageMetadata":{"title":"Chat Completions","description":"POST /v1/chat/completions — OpenAI-compatible chat","openapi":"POST /v1/chat/completions","href":"/en/api-reference/chat-completions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"POST /v1/chat/completions — OpenAI-compatible chat\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Note}=_components;if(!Note)_missingMdxReference(`Note`,true);return _jsx(Note,{children:_jsxs(_components.p,{children:[`Unknown parameters are forwarded to the upstream provider as-is. Errors for unsupported parameters (e.g. `,_jsx(_components.code,{children:`tools`}),`, `,_jsx(_components.code,{children:`response_format`}),`) come from the provider, not Routify.`]})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Chat Completions","description":"POST /v1/chat/completions — OpenAI-compatible chat","openapi":"POST /v1/chat/completions","href":"/en/api-reference/chat-completions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Chat"],"summary":"Create a chat completion","description":"POST /v1/chat/completions — OpenAI-compatible chat","x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl https://api.routify.ru/v1/chat/completions \\\n -H \"Authorization: Bearer $ROUTIFY_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4.1\",\n \"messages\": [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n }'\n"},{"lang":"python","label":"Python","source":"from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"$ROUTIFY_API_KEY\",\n base_url=\"https://api.routify.ru/v1\"\n)\n\nresponse = client.chat.completions.create(\n model=\"gpt-4.1\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\nprint(response.choices[0].message.content)\n"},{"lang":"javascript","label":"Node.js","source":"import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n apiKey: process.env.ROUTIFY_API_KEY,\n baseURL: \"https://api.routify.ru/v1\"\n});\n\nconst response = await client.chat.completions.create({\n model: \"gpt-4.1\",\n messages: [\n { role: \"system\", content: \"You are a helpful assistant.\" },\n { role: \"user\", content: \"Hello!\" }\n ]\n});\nconsole.log(response.choices[0].message.content);\n"}],"requestBody":"b4b8d4be-646c-4c55-8a94-b816220dd97c","responses":{"200":"2287b142-ab8a-4aa6-b8af-aae5a8aa7ff9","400":"9d471976-8db0-4401-83c1-277323623dab","401":"dec2aa4d-de90-47ac-aff3-c2931253e795","402":"27291f93-4be0-4e7e-a4c6-4770746076f4","404":"ba436de0-f9d9-4d24-8b4a-4f078bf57422","429":"8d9a3ecf-69ed-4f13-9cb1-599480583b82","502":"e367b394-7f30-4411-ab07-6a7adf7204bb"},"method":"post","type":"path","servers":["89cfd645-9e78-4fd0-9076-e901b4a7cbd1"],"security":["d0fcaa56-9b2b-4498-96da-48b1756427e4"],"path":"/v1/chat/completions","baseUrlOptions":["https://api.routify.ru"],"title":"Create a chat completion","codeSamples":[{"label":"cURL","lang":"curl","source":"curl https://api.routify.ru/v1/chat/completions \\\n -H \"Authorization: Bearer $ROUTIFY_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4.1\",\n \"messages\": [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n }'\n"},{"label":"Python","lang":"python","source":"from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"$ROUTIFY_API_KEY\",\n base_url=\"https://api.routify.ru/v1\"\n)\n\nresponse = client.chat.completions.create(\n model=\"gpt-4.1\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\nprint(response.choices[0].message.content)\n"},{"label":"Node.js","lang":"javascript","source":"import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n apiKey: process.env.ROUTIFY_API_KEY,\n baseURL: \"https://api.routify.ru/v1\"\n});\n\nconst response = await client.chat.completions.create({\n model: \"gpt-4.1\",\n messages: [\n { role: \"system\", content: \"You are a helpful assistant.\" },\n { role: \"user\", content: \"Hello!\" }\n ]\n});\nconsole.log(response.choices[0].message.content);\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string","description":"Model ID used to generate the response. Use `GET /v1/models` to list all available models.\n","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","minItems":1,"description":"A list of messages comprising the conversation so far.","items":{"type":"object","additionalProperties":false,"properties":{"role":{"type":"string","enum":["system","user","assistant","developer","tool"],"description":"The role of the message author.","isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","description":"The content of the message.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string"}},"required":["role","content"],"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"stream":{"type":"boolean","default":false,"description":"If set to true, the response is streamed to the client as it is generated using server-sent events. The stream ends with `data: [DONE]`.\n","uniqueKey":"stream","typeLabel":"boolean"},"max_tokens":{"type":"integer","minimum":1,"description":"An upper bound for the number of tokens that can be generated in the completion.\n","uniqueKey":"max_tokens","typeLabel":"integer"},"reasoning_effort":{"type":"string","enum":["low","medium","high","xhigh"],"description":"Constrains effort on reasoning for reasoning models (e.g. o3, o4-mini). Supported values: `low`, `medium`, `high`, `xhigh`. Lower effort reduces latency and cost; higher effort improves accuracy on complex tasks.\n","uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring>"},"verbosity":{"type":"string","enum":["low","medium","high"],"description":"Controls verbosity of the model response.","uniqueKey":"verbosity","typeLabel":"enum\u003cstring>"},"reasoningSummary":{"type":"string","enum":["auto","detail","concise"],"description":"Controls the format of reasoning summaries in the response. Supported values: `auto`, `detail`, `concise`.\n","uniqueKey":"reasoningSummary","typeLabel":"enum\u003cstring>"},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We recommend altering this or `top_p` but not both.\n","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers only the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We recommend altering this or `temperature` but not both.\n","uniqueKey":"top_p","typeLabel":"number"},"stop":{"oneOf":[{"type":"string","description":"Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.\n","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.\n","maxItems":4,"minItems":1,"uniqueKey":"stop.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"stop","typeLabel":"string | string[]"}},"required":["model","messages"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","messages":[{"content":"\u003cstring>"}],"stream":false,"max_tokens":2,"temperature":1,"top_p":0.5,"stop":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"2287b142-ab8a-4aa6-b8af-aae5a8aa7ff9":{"description":"Successful response (JSON or SSE stream)","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"A unique identifier for the chat completion.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","description":"The object type. Always `chat.completion`.","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created.","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","description":"The model used for the chat completion.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","minItems":1,"description":"A list of chat completion choices.","items":{"type":"object","additionalProperties":false,"properties":{"index":{"type":"integer","description":"The index of the choice in the list of generated choices.","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"finish_reason":{"type":"string","enum":["stop","length","content_filter","tool_calls","error"],"description":"The reason the model stopped generating tokens. `stop` means the model hit a natural stop point or a provided stop sequence. `length` means the maximum token count was reached. `content_filter` means content was omitted due to a policy. `tool_calls` means the model called a tool.\n","isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"},"message":{"type":"object","additionalProperties":false,"properties":{"role":{"type":"string","enum":["assistant"],"description":"The role of the author of this message. Always `assistant`.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","description":"The content of the message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string"}},"required":["role","content"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"}},"required":["index","finish_reason","message"],"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","additionalProperties":false,"properties":{"prompt_tokens":{"type":"integer","minimum":0,"description":"Number of tokens in the prompt.","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","minimum":0,"description":"Number of tokens in the generated completion.","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","minimum":0,"description":"Total number of tokens used (prompt + completion).","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","additionalProperties":false,"description":"Breakdown of tokens used in the prompt.","properties":{"cached_tokens":{"type":"integer","minimum":0,"description":"Tokens that were served from the prompt cache.","uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"},"cache_write_tokens":{"type":"integer","minimum":0,"description":"Tokens written to the prompt cache in this request.","uniqueKey":"usage.prompt_tokens_details.cache_write_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"isRequired":true,"uniqueKey":"usage","typeLabel":"object"}},"required":["id","object","created","model","choices","usage"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion","created":123,"model":"\u003cstring>","choices":[{"index":123,"finish_reason":"stop","message":{"role":"assistant","content":"\u003cstring>"}}],"usage":{"prompt_tokens":1,"completion_tokens":1,"total_tokens":1,"prompt_tokens_details":{"cached_tokens":1,"cache_write_tokens":1}}}}},"exampleType":"generated"},"text/event-stream":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion.chunk","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"properties":{"index":{"type":"integer","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"delta":{"type":"object","additionalProperties":false,"properties":{"role":{"type":"string","enum":["assistant"],"uniqueKey":"choices.items.[INDEX].delta.role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.content","typeLabel":"string"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].delta","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"string","enum":["stop","length","content_filter","tool_calls","error",null],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["stop","length","content_filter","tool_calls","error",null],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"}},"required":["index","delta","finish_reason"],"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"}},"required":["id","object","created","model","choices"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion.chunk","created":123,"model":"\u003cstring>","choices":[{"index":123,"delta":{"role":"assistant","content":"\u003cstring>"},"finish_reason":"stop"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"9d471976-8db0-4401-83c1-277323623dab":{"description":"Invalid request or unsupported field","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","auth_error","billing_error","rate_limit_error","provider_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"model is required","type":"invalid_request_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"model is required","type":"invalid_request_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"dec2aa4d-de90-47ac-aff3-c2931253e795":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","auth_error","billing_error","rate_limit_error","provider_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"invalid api key","type":"auth_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"invalid api key","type":"auth_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"27291f93-4be0-4e7e-a4c6-4770746076f4":{"description":"Insufficient balance","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","auth_error","billing_error","rate_limit_error","provider_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"insufficient balance","type":"billing_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"insufficient balance","type":"billing_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ba436de0-f9d9-4d24-8b4a-4f078bf57422":{"description":"Model or resource not found","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","auth_error","billing_error","rate_limit_error","provider_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"model not found","type":"invalid_request_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"model not found","type":"invalid_request_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8d9a3ecf-69ed-4f13-9cb1-599480583b82":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","auth_error","billing_error","rate_limit_error","provider_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"rate limit exceeded","type":"rate_limit_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"rate limit exceeded","type":"rate_limit_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e367b394-7f30-4411-ab07-6a7adf7204bb":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","auth_error","billing_error","rate_limit_error","provider_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"all providers unavailable","type":"provider_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"all providers unavailable","type":"provider_error"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"d0fcaa56-9b2b-4498-96da-48b1756427e4":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"token","description":"Bearer authentication header of the form `Authorization: Bearer $ROUTIFY_API_KEY`.\n","scopes":[]}}},"servers":{"89cfd645-9e78-4fd0-9076-e901b4a7cbd1":{"url":"https://api.routify.ru","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"token","description":"Bearer authentication header of the form `Authorization: Bearer $ROUTIFY_API_KEY`.\n","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Authorization: Bearer $ROUTIFY_API_KEY`.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"routify","siteName":"Routify","title":"Chat Completions - Routify","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"ru":{"href":"/api-reference/chat-completions","matchLevel":1},"en":{"href":"/en/api-reference/chat-completions","matchLevel":0}}},"lastModified":"2026-03-07T13:42:21.881Z","originalFileLocation":"en/api-reference/chat-completions.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"POST /v1/chat/completions — OpenAI-compatible chat\">\u003cmeta data-mint-head name=\"application-name\" content=\"Routify\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/routify/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/routify/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/routify/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/routify/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat Completions - Routify\">\u003cmeta data-mint-head property=\"og:description\" content=\"POST /v1/chat/completions — OpenAI-compatible chat\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Routify\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.routify.ru/en/api-reference/chat-completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://routify.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Chat+Completions\u0026amp;description=POST+%2Fv1%2Fchat%2Fcompletions+%E2%80%94+OpenAI-compatible+chat\u0026amp;theme=d87a71be49f868aa8674f9e0\u0026amp;signature=9d00c8607d8caaa55017c817ac44c9a2fbd59f76c3e7fd3ed1ab28e2cb42e590\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Chat Completions - Routify\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"POST /v1/chat/completions — OpenAI-compatible chat\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://routify.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Chat+Completions\u0026amp;description=POST+%2Fv1%2Fchat%2Fcompletions+%E2%80%94+OpenAI-compatible+chat\u0026amp;theme=d87a71be49f868aa8674f9e0\u0026amp;signature=9d00c8607d8caaa55017c817ac44c9a2fbd59f76c3e7fd3ed1ab28e2cb42e590\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/routify/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Routify\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#d4572c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.routify.ru/en/api-reference/chat-completions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/chat-completions.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.routify.ru/en/api-reference/chat-completions\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://docs.routify.ru/api-reference/chat-completions\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.routify.ru/api-reference/chat-completions\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.routify.ru/#organization\",\"name\":\"Routify\",\"url\":\"https://docs.routify.ru\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://placehold.co/120x40/ffffff/d4572c?text=Routify\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.routify.ru#website\",\"name\":\"Routify\",\"url\":\"https://docs.routify.ru\",\"publisher\":{\"@id\":\"https://docs.routify.ru/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.routify.ru/en/api-reference/chat-completions#webpage\",\"url\":\"https://docs.routify.ru/en/api-reference/chat-completions\",\"name\":\"Chat Completions\",\"description\":\"POST /v1/chat/completions — OpenAI-compatible chat\",\"dateModified\":\"2026-03-07T13:42:21.881Z\",\"isPartOf\":{\"@id\":\"https://docs.routify.ru#website\"},\"breadcrumb\":{\"@id\":\"https://docs.routify.ru/en/api-reference/chat-completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.routify.ru/en/api-reference/chat-completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Routify\",\"item\":\"https://docs.routify.ru\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat Completions\",\"item\":\"https://docs.routify.ru/en/api-reference/chat-completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.routify.ru/en/api-reference/chat-completions#apireference\",\"headline\":\"Chat Completions\",\"name\":\"Chat Completions\",\"description\":\"POST /v1/chat/completions — OpenAI-compatible chat\",\"url\":\"https://docs.routify.ru/en/api-reference/chat-completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.routify.ru/en/api-reference/chat-completions#webpage\"},\"dateModified\":\"2026-03-07T13:42:21.881Z\",\"publisher\":{\"@id\":\"https://docs.routify.ru/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.routify.ru#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Routify\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Routify","nav":{"global":null,"languages":[{"language":"ru","default":true,"pages":[{"title":"ru","href":"/api-reference/chat-completions"}]},{"language":"en","tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/en/getting-started"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"Introduction","description":"Routify provides an OpenAI-compatible API — no SDK changes needed.","href":"/en/api-reference/introduction"}]},{"group":"Endpoints","pages":[{"title":"Chat Completions","openapi":"POST /v1/chat/completions","href":"/en/api-reference/chat-completions"},{"title":"Responses API","description":"POST /v1/responses — native proxy to OpenAI Responses API","openapi":"POST /v1/responses","href":"/en/api-reference/responses"},{"title":"Models","openapi":"GET /v1/models","href":"/en/api-reference/models-endpoint"}]}]}]}]},"basePath":"","title":"Chat Completions - Routify","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}