Translated to model and route-specific reasoning controls. A level the model lacks moves to the nearest one it has (ties to the lower), so max runs at the model's highest level. A model's reasoning field on GET /v1/models lists the levels that make a difference; the x-impossibl-reasoning response header reports what was applied.
Processing tier. Omitted, null, auto and default are standard processing at the model's normal rates. ultrafast is OpenAI's low-latency tier, available only for openai/gpt-6-astra and openai/gpt-6.1-sol: it is served only by OpenAI's own API (never another host, never a silent fallback to standard) and billed at Ultrafast rates. fast uses native Anthropic only for anthropic/claude-opus-5-5, billed at Fast rates; Foundry pins conflict with Fast. priority and flex return 400. See the Speed tiers guide.
Request-level Anthropic prompt-caching breakpoint. The gateway places one breakpoint on the last cacheable block and advances it as the conversation grows. A per-part cache_control anywhere in the request takes precedence and this is ignored. Non-Anthropic routes cache implicitly and ignore it.
Show child attributes
Response
A chat.completion object. When stream: true, the body is instead an
SSE stream of chat.completion.chunk objects terminated by data: [DONE].
Present only when the request set service_tier: the tier the provider reports it actually processed the request at: fast or standard for Anthropic, ultrafast or default for OpenAI. A confirmed standard downgrade is billed at standard rates. null when unreported; missing or unknown metadata bills the requested premium tier. Any reported string is preserved verbatim, including unknown values. The gateway never invents a delivered tier.
⌘I
{"docsConfig":{"theme":"willow","$schema":"https://mintlify.com/docs.json","name":"impossibl","description":"Use one API key for models across providers. Get started, connect your app, and manage usage and billing.","colors":{"primary":"#000000","light":"#FFFFFF","dark":"#000000"},"logo":{"light":"https://mintcdn.com/impossibl/3d3DRU0do26ni_Q1/logo-light-v2.png?fit=max\u0026auto=format\u0026n=3d3DRU0do26ni_Q1\u0026q=85\u0026s=c8f499ee9ee34ad48d6237725054f6d5","dark":"https://mintcdn.com/impossibl/3d3DRU0do26ni_Q1/logo-dark-v2.png?fit=max\u0026auto=format\u0026n=3d3DRU0do26ni_Q1\u0026q=85\u0026s=3d2870508f4e1d38ce884314bc45bf93"},"favicon":{"light":"https://mintcdn.com/impossibl/3d3DRU0do26ni_Q1/favicon-light.svg?fit=max\u0026auto=format\u0026n=3d3DRU0do26ni_Q1\u0026q=85\u0026s=e2f99d84d17cfc0ce1e8a69fa9ce22d7","dark":"https://mintcdn.com/impossibl/3d3DRU0do26ni_Q1/favicon-dark.svg?fit=max\u0026auto=format\u0026n=3d3DRU0do26ni_Q1\u0026q=85\u0026s=1478ca16d79753dfb3afa484f449af86"},"background":{"color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"https://impossibl.com/models","label":"Models"}],"primary":{"type":"button","label":"Console","href":"https://impossibl.com/dashboard"}},"seo":{"metatags":{"canonical":"https://impossibl.com/docs","og:site_name":"impossibl","twitter:site":"@Impossiblai","og:image":"https://impossibl.com/opengraph-image","twitter:image":"https://impossibl.com/opengraph-image","twitter:card":"summary_large_image"},"organization":{"name":"impossibl","url":"https://impossibl.com","logo":"https://impossibl.com/brand/impossibl-icon.png","sameAs":["https://x.com/Impossiblai","https://github.com/impossiblco"]}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"impossibl","hasAudioNarration":false,"actualSubdomain":"impossibl","customDomains":["impossibl.com"],"gitSource":{"type":"github","owner":"impossiblco","repo":"imp-monorepo","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"c3292231-1b34-4e3f-8585-5bedf8c02381","liveDeploymentHistoryId":"6adfa93e1421c8c54a042a7e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfa93e1421c8c54a042a7e"},"entitlements":{},"buildId":"6ae2f6b2eead52743c6f5e6e","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"API Reference","count":68},{"language":"default","tag":"Guides","count":27},{"language":"default","tag":"Build","count":8},{"language":"default","tag":"Modalities","count":8},{"language":"default","tag":"Get started","count":6},{"language":"default","tag":"Manage","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/create-a-chat-completion-openai-compatible","slug":"/api-reference/create-a-chat-completion-openai-compatible","pageMetadata":{"title":"Create a chat completion (OpenAI-compatible)","description":"Drop-in compatible with OpenAI's Chat Completions API. Set `stream: true` for SSE.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/chat/completions","href":"/api-reference/create-a-chat-completion-openai-compatible","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Drop-in compatible with OpenAI’s Chat Completions API. Set \", _jsx(_components.code, {\n children: \"stream: true\"\n }), \" for SSE.\"]\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{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a chat completion (OpenAI-compatible)","description":"Drop-in compatible with OpenAI's Chat Completions API. Set `stream: true` for SSE.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/chat/completions","href":"/api-reference/create-a-chat-completion-openai-compatible","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/impossibl/c75059c84ec01199/analytics.js"],"openApiReferenceData":{"operation":{"operationId":"createChatCompletion","summary":"Create a chat completion (OpenAI-compatible)","description":"Drop-in compatible with OpenAI's Chat Completions API. Set `stream: true` for SSE.","requestBody":"d2ef17fd-bdca-4bce-9627-c1dae0cce6f3","responses":{"200":"5d9db8d2-5a8c-40f0-afe8-4cd02bdbfafa","400":"f0000230-09df-4583-9554-7d5562efa952","401":"cf6d8144-cada-43be-a86f-617fdba00306","402":"82b43689-b747-4b87-b323-72b15ed844e8","404":"7af21815-f254-43d9-afb7-94f7cf596f5b","502":"e0513976-f559-4ad3-97f6-81d10ddb77ca","503":"8270d0fe-6f12-4497-bffa-dd0b9a3dae6c"},"method":"post","type":"path","servers":["56354270-4d43-4a36-9df8-087ce55ddbb8","b9326fa1-d188-49aa-a659-8ec127b80a40"],"security":["b9e249f0-508d-49aa-b644-e83d1e514b84"],"path":"/v1/chat/completions","baseUrlOptions":["https://api.impossibl.com","http://localhost:8787"],"title":"Create a chat completion (OpenAI-compatible)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","example":"openai/gpt-4o-mini","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"],"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"A text string, or an array of content parts (text, image_url, input_audio, video_url) for multimodal input. On a `tool` message the array may carry `image_url` parts to return an image from the tool; those must be `data:` base64 URIs (an http(s) URL there returns 400).","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","input_audio","video_url"],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"Present when `type` is `text`.","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].text","typeLabel":"string"},"cache_control":{"type":"object","description":"Per-part breakpoint. Caches the prompt up to and including this block.","required":["type"],"properties":{"type":{"type":"string","const":"ephemeral","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].cache_control.type","typeLabel":"string"},"ttl":{"type":"string","enum":["5m","1h"],"default":"5m","description":"Cache lifetime; one-hour writes use the higher published write rate.","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].cache_control.ttl","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].cache_control","typeLabel":"object"},"image_url":{"type":"object","description":"Present when `type` is `image_url`.","properties":{"url":{"type":"string","description":"An http(s) URL or a `data:` base64 URI. Inside a `tool` message only a `data:` URI is accepted.","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","low","high"],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url.detail","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url","typeLabel":"object"},"input_audio":{"type":"object","description":"Present when `type` is `input_audio`. Only models advertising `audio` in `input_modalities` accept it.","properties":{"data":{"type":"string","description":"Base64-encoded audio (no data-URI prefix).","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].input_audio.data","typeLabel":"string"},"format":{"type":"string","description":"`wav` or `mp3` (`aiff`, `aac`, `ogg`, `flac` also pass through).","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].input_audio.format","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].input_audio","typeLabel":"object"},"video_url":{"type":"object","description":"Present when `type` is `video_url`. Only models advertising `video` in `input_modalities` accept it.","properties":{"url":{"type":"string","description":"A `data:` base64 URI or an http(s) URL. YouTube URLs pass through to Gemini; other URLs are fetched by the gateway and sent inline (~20MB limit).","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].video_url.url","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].video_url","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"object"},"description":"A text string, or an array of content parts (text, image_url, input_audio, video_url) for multimodal input. On a `tool` message the array may carry `image_url` parts to return an image from the tool; those must be `data:` base64 URIs (an http(s) URL there returns 400).","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"object[]"},{"type":"null","description":"A text string, or an array of content parts (text, image_url, input_audio, video_url) for multimodal input. On a `tool` message the array may carry `image_url` parts to return an image from the tool; those must be `data:` base64 URIs (an http(s) URL there returns 400).","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | object[] | null"},"tool_call_id":{"type":"string","description":"On `tool` messages","the id of the tool call this result is for.":null,"uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"},"tool_calls":{"type":"array","description":"On `assistant` messages, tool calls being relayed back to the model.","items":{"type":"object","description":"A complete tool call (non-streaming). `function.arguments` is a JSON-encoded string.","properties":{"id":{"type":"string","uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","const":"function","uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","properties":{"name":{"type":"string","uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"JSON-encoded arguments string.","uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"object[]"}},"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"stream":{"type":"boolean","default":false,"uniqueKey":"stream","typeLabel":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean","uniqueKey":"stream_options.include_usage","typeLabel":"boolean"}},"uniqueKey":"stream_options","typeLabel":"object"},"temperature":{"type":"number","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","uniqueKey":"top_p","typeLabel":"number"},"max_tokens":{"type":"integer","uniqueKey":"max_tokens","typeLabel":"integer"},"max_completion_tokens":{"type":"integer","uniqueKey":"max_completion_tokens","typeLabel":"integer"},"tools":{"type":"array","description":"Function tools the model may call (relay mode — the gateway does not execute them).","items":{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","const":"function","isRequired":true,"uniqueKey":"tools.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].function.name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"tools.items.[INDEX].function.description","typeLabel":"string"},"parameters":{"type":"object","description":"JSON Schema for the tool input.","uniqueKey":"tools.items.[INDEX].function.parameters","typeLabel":"object"}},"isRequired":true,"uniqueKey":"tools.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","description":"`auto`, `none`, `required`, or `{ type: function, function: { name } }`.","enum":["auto","none","required"],"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"`auto`, `none`, `required`, or `{ type: function, function: { name } }`.","properties":{"type":{"type":"string","const":"function","uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"string"},"function":{"type":"object","properties":{"name":{"type":"string","uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object"},"parallel_tool_calls":{"type":"boolean","uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"description":"Translated to model and route-specific reasoning controls. A level the model lacks moves to the nearest one it has (ties to the lower), so `max` runs at the model's highest level. A model's `reasoning` field on GET /v1/models lists the levels that make a difference; the `x-impossibl-reasoning` response header reports what was applied.","uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring>"},"service_tier":{"oneOf":[{"type":"string","enum":["auto","default","ultrafast","fast"],"description":"Processing tier. Omitted, `null`, `auto` and `default` are standard processing at the model's normal rates. `ultrafast` is OpenAI's low-latency tier, available only for `openai/gpt-6-astra` and `openai/gpt-6.1-sol`: it is served only by OpenAI's own API (never another host, never a silent fallback to standard) and billed at Ultrafast rates. `fast` uses native Anthropic only for `anthropic/claude-opus-5-5`, billed at Fast rates; Foundry pins conflict with Fast. `priority` and `flex` return 400. See the Speed tiers guide.","uniqueKey":"service_tier.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["auto","default","ultrafast","fast"],"description":"Processing tier. Omitted, `null`, `auto` and `default` are standard processing at the model's normal rates. `ultrafast` is OpenAI's low-latency tier, available only for `openai/gpt-6-astra` and `openai/gpt-6.1-sol`: it is served only by OpenAI's own API (never another host, never a silent fallback to standard) and billed at Ultrafast rates. `fast` uses native Anthropic only for `anthropic/claude-opus-5-5`, billed at Fast rates; Foundry pins conflict with Fast. `priority` and `flex` return 400. See the Speed tiers guide.","uniqueKey":"service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"service_tier","typeLabel":"enum\u003cstring> | null"},"cache_control":{"type":"object","description":"Request-level Anthropic prompt-caching breakpoint. The gateway places one breakpoint on the last cacheable block and advances it as the conversation grows. A per-part `cache_control` anywhere in the request takes precedence and this is ignored. Non-Anthropic routes cache implicitly and ignore it.","required":["type"],"properties":{"type":{"type":"string","const":"ephemeral","isRequired":true,"uniqueKey":"cache_control.type","typeLabel":"string"},"ttl":{"type":"string","enum":["5m","1h"],"default":"5m","description":"Cache lifetime; one-hour writes use the higher published write rate.","uniqueKey":"cache_control.ttl","typeLabel":"enum\u003cstring>"}},"uniqueKey":"cache_control","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"openai/gpt-4o-mini","messages":[{"content":"\u003cstring>","tool_call_id":"\u003cstring>","tool_calls":[{"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}]}],"stream":false,"stream_options":{"include_usage":true},"temperature":123,"top_p":123,"max_tokens":123,"max_completion_tokens":123,"tools":[{"type":"function","function":{"name":"\u003cstring>","description":"\u003cstring>","parameters":{}}}],"parallel_tool_calls":true}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5d9db8d2-5a8c-40f0-afe8-4cd02bdbfafa":{"description":"A `chat.completion` object. When `stream: true`, the body is instead an\nSSE stream of `chat.completion.chunk` objects terminated by `data: [DONE]`.\n","headers":{"x-impossibl-reasoning":{"description":"Sent when the request sets `reasoning_effort`: what it became on the serving route, as `requested=\u003clevel> applied=\u003csent> route=\u003cprovider>`. `applied` is the level sent after moving down to one the model has, `none` for an off switch, `on` for an on/off model, `budget:\u003ctokens>` for a token-budget model, `custom` for an out-of-ladder value from the caller's own `providerOptions`, or `omitted` when nothing reached the backend and it ran at its own default. Read from what was sent, so a caller's own `providerOptions`, which win over the translated level, are what it reports. A stream's headers leave before any backend answers, so there it describes the first route tried.","schema":{"type":"string","example":"requested=xhigh applied=high route=openai"}}},"content":{"application/json":{"schema":{"type":"object","description":"Non-streaming chat completion (OpenAI `chat.completion`).","properties":{"id":{"type":"string","example":"chatcmpl-...","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","description":"Unix seconds","uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","example":"openai/gpt-4o-mini","uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"finish_reason":{"oneOf":[{"type":"string","enum":["stop","length","content_filter","tool_calls"],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["stop","length","content_filter","tool_calls"],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant","uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"},"tool_calls":{"type":"array","description":"Present when the model called tools (finish_reason `tool_calls`).","items":{"type":"object","description":"A complete tool call (non-streaming). `function.arguments` is a JSON-encoded string.","properties":{"id":{"type":"string","uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","const":"function","uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","properties":{"name":{"type":"string","uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"JSON-encoded arguments string.","uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"object[]"}},"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","description":"OpenAI-style token usage.","properties":{"prompt_tokens":{"type":"integer","uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","description":"Present when cache-read usage is reported; cached tokens are a subset of prompt_tokens.","properties":{"cached_tokens":{"type":"integer","uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"},"completion_tokens_details":{"type":"object","description":"Present when reasoning-token usage is reported; reasoning tokens are a subset of completion_tokens.","properties":{"reasoning_tokens":{"type":"integer","uniqueKey":"usage.completion_tokens_details.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.completion_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"service_tier":{"oneOf":[{"type":"string","description":"Present only when the request set `service_tier`: the tier the provider reports it actually processed the request at: `fast` or `standard` for Anthropic, `ultrafast` or `default` for OpenAI. A confirmed standard downgrade is billed at standard rates. `null` when unreported; missing or unknown metadata bills the requested premium tier. Any reported string is preserved verbatim, including unknown values. The gateway never invents a delivered tier.","uniqueKey":"service_tier.oneOf.0","typeLabel":"string"},{"type":"null","description":"Present only when the request set `service_tier`: the tier the provider reports it actually processed the request at: `fast` or `standard` for Anthropic, `ultrafast` or `default` for OpenAI. A confirmed standard downgrade is billed at standard rates. `null` when unreported; missing or unknown metadata bills the requested premium tier. Any reported string is preserved verbatim, including unknown values. The gateway never invents a delivered tier.","uniqueKey":"service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"service_tier","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"chatcmpl-...","object":"chat.completion","created":123,"model":"openai/gpt-4o-mini","choices":[{"index":123,"finish_reason":"stop","message":{"role":"assistant","content":"\u003cstring>","tool_calls":[{"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}]}}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123,"prompt_tokens_details":{"cached_tokens":123},"completion_tokens_details":{"reasoning_tokens":123}},"service_tier":"\u003cstring>"}}},"exampleType":"generated"},"text/event-stream":{"schema":{"type":"object","description":"One SSE chunk (OpenAI `chat.completion.chunk`), sent as a `data:` line; the stream ends with a `[DONE]` sentinel.","properties":{"id":{"type":"string","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion.chunk","uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"string | null"},"delta":{"type":"object","description":"Incremental update — `role` on the first chunk, then `content` deltas, or `tool_calls` fragments.","properties":{"role":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.role","typeLabel":"string"},"content":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.content","typeLabel":"string"},"tool_calls":{"type":"array","description":"Streaming tool-call fragments; `index` correlates fragments of the same call.","items":{"type":"object","properties":{"index":{"type":"integer","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].index","typeLabel":"integer"},"id":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","const":"function","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","properties":{"name":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].delta.tool_calls","typeLabel":"object[]"}},"uniqueKey":"choices.items.[INDEX].delta","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"oneOf":[{"type":"object","description":"Present only on the final chunk when `stream_options.include_usage` is true.","properties":{"prompt_tokens":{"type":"integer","uniqueKey":"usage.oneOf.0.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","uniqueKey":"usage.oneOf.0.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","uniqueKey":"usage.oneOf.0.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","description":"Present when cache-read usage is reported; cached tokens are a subset of prompt_tokens.","properties":{"cached_tokens":{"type":"integer","uniqueKey":"usage.oneOf.0.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.oneOf.0.prompt_tokens_details","typeLabel":"object"},"completion_tokens_details":{"type":"object","description":"Present when reasoning-token usage is reported; reasoning tokens are a subset of completion_tokens.","properties":{"reasoning_tokens":{"type":"integer","uniqueKey":"usage.oneOf.0.completion_tokens_details.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.oneOf.0.completion_tokens_details","typeLabel":"object"}},"uniqueKey":"usage.oneOf.0","typeLabel":"object"},{"type":"null","description":"Present only on the final chunk when `stream_options.include_usage` is true.","uniqueKey":"usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage","typeLabel":"object | null"},"service_tier":{"oneOf":[{"type":"string","description":"Present only when the request set `service_tier`, and only on the terminal chunks (the one with `finish_reason`, and the usage chunk): the delivered tier, known once generation finishes. Same contract as on ChatCompletion, including unknown reported strings and null.","uniqueKey":"service_tier.oneOf.0","typeLabel":"string"},{"type":"null","description":"Present only when the request set `service_tier`, and only on the terminal chunks (the one with `finish_reason`, and the usage chunk): the delivered tier, known once generation finishes. Same contract as on ChatCompletion, including unknown reported strings and null.","uniqueKey":"service_tier.oneOf.1","typeLabel":"null"}],"uniqueKey":"service_tier","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion.chunk","created":123,"model":"\u003cstring>","choices":[{"index":123,"finish_reason":"\u003cstring>","delta":{"role":"\u003cstring>","content":"\u003cstring>","tool_calls":[{"index":123,"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}]}}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123,"prompt_tokens_details":{"cached_tokens":123},"completion_tokens_details":{"reasoning_tokens":123}},"service_tier":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"f0000230-09df-4583-9554-7d5562efa952":{"description":"Malformed request (bad JSON, or missing required fields).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"Common types include authentication_error, invalid_request_error, insufficient_quota, billing_required, permission_error, upstream_error, and provider_not_configured.","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"`model` and `messages` are required","type":"invalid_request_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"`model` and `messages` are required","type":"invalid_request_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"cf6d8144-cada-43be-a86f-617fdba00306":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"Common types include authentication_error, invalid_request_error, insufficient_quota, billing_required, permission_error, upstream_error, and provider_not_configured.","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Invalid API key","type":"authentication_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Invalid API key","type":"authentication_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"82b43689-b747-4b87-b323-72b15ed844e8":{"description":"Available credits or postpaid headroom cannot cover the request's balance check, which can include estimated input cost. Top up or reduce the request size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"Common types include authentication_error, invalid_request_error, insufficient_quota, billing_required, permission_error, upstream_error, and provider_not_configured.","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Insufficient credits. Top up to continue.","type":"insufficient_quota"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Insufficient credits. Top up to continue.","type":"insufficient_quota"}}}},"exampleType":"examples"}},"exampleType":"examples"},"7af21815-f254-43d9-afb7-94f7cf596f5b":{"description":"The requested `model` id is not in the registry (see GET /v1/models).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"Common types include authentication_error, invalid_request_error, insufficient_quota, billing_required, permission_error, upstream_error, and provider_not_configured.","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Unknown model: foo/bar","type":"invalid_request_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Unknown model: foo/bar","type":"invalid_request_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e0513976-f559-4ad3-97f6-81d10ddb77ca":{"description":"The upstream provider returned an error.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"Common types include authentication_error, invalid_request_error, insufficient_quota, billing_required, permission_error, upstream_error, and provider_not_configured.","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"permission-denied: ...","type":"upstream_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"permission-denied: ...","type":"upstream_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8270d0fe-6f12-4497-bffa-dd0b9a3dae6c":{"description":"The provider for this model has no API key configured on the gateway.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"Common types include authentication_error, invalid_request_error, insufficient_quota, billing_required, permission_error, upstream_error, and provider_not_configured.","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Provider not configured: missing OPENAI_API_KEY","type":"provider_not_configured"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Provider not configured: missing OPENAI_API_KEY","type":"provider_not_configured"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"b9e249f0-508d-49aa-b644-e83d1e514b84":{"BearerKey":{"type":"http","scheme":"bearer","description":"Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.","scopes":[],"schemeName":"BearerKey"}}},"servers":{"56354270-4d43-4a36-9df8-087ce55ddbb8":{"url":"https://api.impossibl.com","description":"Production"},"b9326fa1-d188-49aa-a659-8ec127b80a40":{"url":"http://localhost:8787","description":"Local dev"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.","scopes":[],"schemeName":"BearerKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerKey","name":"Authorization"}],"title":"BearerKey"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"impossibl","siteName":"impossibl","title":"Create a chat completion (OpenAI-compatible) - impossibl","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-16T00:28:49.634Z","originalFileLocation":"api-reference/create-a-chat-completion-openai-compatible.mdx"},"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=\"Drop-in compatible with OpenAI\u0026#x27;s Chat Completions API. Set stream: true for SSE.\">\u003cmeta data-mint-head name=\"application-name\" content=\"impossibl\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a chat completion (OpenAI-compatible) - impossibl\">\u003cmeta data-mint-head property=\"og:description\" content=\"Drop-in compatible with OpenAI\u0026#x27;s Chat Completions API. Set stream: true for SSE.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"impossibl\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://impossibl.com/opengraph-image\">\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=\"Create a chat completion (OpenAI-compatible) - impossibl\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Drop-in compatible with OpenAI\u0026#x27;s Chat Completions API. Set stream: true for SSE.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://impossibl.com/opengraph-image\">\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=\"/docs/mintlify-assets/_mintlify/favicons/impossibl/0tSg0CUa7jlGvPGO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"impossibl\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/create-a-chat-completion-openai-compatible.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://impossibl.com/#organization\",\"name\":\"impossibl\",\"url\":\"https://impossibl.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://impossibl.com/brand/impossibl-icon.png\"},\"sameAs\":[\"https://x.com/Impossiblai\",\"https://github.com/impossiblco\"]},{\"@type\":\"WebSite\",\"@id\":\"https://impossibl.com/docs#website\",\"name\":\"impossibl\",\"url\":\"https://impossibl.com/docs\",\"publisher\":{\"@id\":\"https://impossibl.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible#webpage\",\"url\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible\",\"name\":\"Create a chat completion (OpenAI-compatible)\",\"description\":\"Drop-in compatible with OpenAI's Chat Completions API. Set stream: true for SSE.\",\"dateModified\":\"2026-10-16T00:28:49.634Z\",\"isPartOf\":{\"@id\":\"https://impossibl.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://impossibl.com/docs/api-reference/complete-artificial-analysis-benchmark-snapshot-for-a-serving-model\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a chat completion (OpenAI-compatible)\",\"item\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible#apireference\",\"headline\":\"Create a chat completion (OpenAI-compatible)\",\"name\":\"Create a chat completion (OpenAI-compatible)\",\"description\":\"Drop-in compatible with OpenAI's Chat Completions API. Set stream: true for SSE.\",\"url\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible\",\"mainEntityOfPage\":{\"@id\":\"https://impossibl.com/docs/api-reference/create-a-chat-completion-openai-compatible#webpage\"},\"image\":\"https://impossibl.com/opengraph-image\",\"dateModified\":\"2026-10-16T00:28:49.634Z\",\"publisher\":{\"@id\":\"https://impossibl.com/#organization\"},\"isPartOf\":{\"@id\":\"https://impossibl.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"impossibl\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"impossibl","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"Complete Artificial Analysis benchmark snapshot for a serving model","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/models/{creator}/{model}/benchmarks","href":"/api-reference/complete-artificial-analysis-benchmark-snapshot-for-a-serving-model"},{"title":"Get executable agent onboarding manifest","deprecated":null,"version":null,"openapi":"/openapi.yaml get /auth.md","href":"/api-reference/get-executable-agent-onboarding-manifest"},{"title":"Get auth.md manifest from the well-known compatibility path","deprecated":null,"version":null,"openapi":"/openapi.yaml get /.well-known/auth.md","href":"/api-reference/get-authmd-manifest-from-the-well-known-compatibility-path"},{"title":"Get OAuth protected-resource metadata for agent discovery","deprecated":null,"version":null,"openapi":"/openapi.yaml get /.well-known/oauth-protected-resource","href":"/api-reference/get-oauth-protected-resource-metadata-for-agent-discovery"},{"title":"List available models and pricing","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/models","href":"/api-reference/list-available-models-and-pricing"},{"title":"Create a funded account (agent onboarding)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/accounts","href":"/api-reference/create-a-funded-account-agent-onboarding"},{"title":"Get the authenticated account and balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/account","href":"/api-reference/get-the-authenticated-account-and-balance"},{"title":"List API keys (metadata only)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/keys","href":"/api-reference/list-api-keys-metadata-only"},{"title":"Mint a new API key","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/keys","href":"/api-reference/mint-a-new-api-key"},{"title":"Revoke an API key","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/keys/{id}","href":"/api-reference/revoke-an-api-key"},{"title":"Rename an API key","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/keys/{id}","href":"/api-reference/rename-an-api-key"},{"title":"List BYOK provider credentials (metadata only)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/provider-keys","href":"/api-reference/list-byok-provider-credentials-metadata-only"},{"title":"Add (or replace) a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/provider-keys","href":"/api-reference/add-or-replace-a-byok-provider-credential"},{"title":"Revoke a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/provider-keys/{id}","href":"/api-reference/revoke-a-byok-provider-credential"},{"title":"Recent usage ledger","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/usage","href":"/api-reference/recent-usage-ledger"},{"title":"Live usage stream (SSE)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/usage/stream","href":"/api-reference/live-usage-stream-sse"},{"title":"Recent request log","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/requests","href":"/api-reference/recent-request-log"},{"title":"One request with its captured payload","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/requests/{id}","href":"/api-reference/one-request-with-its-captured-payload"},{"title":"Start a claim ceremony (hand the account to a human)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /agent/identity/claim","href":"/api-reference/start-a-claim-ceremony-hand-the-account-to-a-human"},{"title":"Poll a claim ceremony (claim grant)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /oauth2/token","href":"/api-reference/poll-a-claim-ceremony-claim-grant"},{"title":"Complete a claim (called by the frontend after WorkOS sign-in)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/claims/complete","href":"/api-reference/complete-a-claim-called-by-the-frontend-after-workos-sign-in"},{"title":"Current balance and top-up pricing","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/billing","href":"/api-reference/current-balance-and-top-up-pricing"},{"title":"Buy net credits with a hosted Stripe Invoice","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/billing/invoice","href":"/api-reference/buy-net-credits-with-a-hosted-stripe-invoice"},{"title":"Verify Stripe webhook and credit paid invoices","description":"Handles invoice.paid. This is the wallet crediting source of truth; Supabase Stripe Sync Engine is only a mirror for analytics/reconciliation.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/billing/webhook","href":"/api-reference/verify-stripe-webhook-and-credit-paid-invoices"},{"title":"Create a chat completion (OpenAI-compatible)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/chat/completions","href":"/api-reference/create-a-chat-completion-openai-compatible"},{"title":"Generate images (OpenAI-compatible)","description":"OpenAI-compatible image generation with models advertising output_modality=image\nin GET /v1/models. Returns base64-encoded image bytes (never URLs).\nGemini selects PNG or JPEG natively and reports data[].mime_type; omit\noutput_format for Gemini. Image output and Gemini text/thinking output\nhave separate token rates. Uses the prepaid balance; no BYOK path yet.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/images/generations","href":"/api-reference/generate-images-openai-compatible"},{"title":"Transcribe a completed audio file","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/audio/transcriptions","href":"/api-reference/transcribe-a-completed-audio-file"},{"title":"Synthesize speech from text","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/audio/speech","href":"/api-reference/synthesize-speech-from-text"},{"title":"Create a response (OpenAI Responses API)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/responses","href":"/api-reference/create-a-response-openai-responses-api"},{"title":"Create a message (Anthropic Messages API)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messages","href":"/api-reference/create-a-message-anthropic-messages-api"},{"title":"Create embeddings (OpenAI-compatible)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/embeddings","href":"/api-reference/create-embeddings-openai-compatible"},{"title":"Evaluate state against typed questions (TypeSafe System One)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/systemone","href":"/api-reference/evaluate-state-against-typed-questions-typesafe-system-one"},{"title":"Answer typed questions about an input (OpenAI Decisions)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/decisions","href":"/api-reference/answer-typed-questions-about-an-input-openai-decisions"},{"title":"Rerank documents by relevance","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/rerank","href":"/api-reference/rerank-documents-by-relevance"}]}]}]},"title":"Create a chat completion (OpenAI-compatible) - impossibl","buildId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","deploymentId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-2jF_ccbi.js","utils-NNMVb_sb.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DdtBhtt6.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D1OxL5O8.js","snippetPresets-DDC-KAXp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BOnTqOyQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-EEWI6FIO.js","shallow-fGZcWzm2.js","getApiPlaygroundDisplay-B3B8qEvw.js","CodeSnippet-BG9nsSU4.js","CodeSnippets-BlRACLKl.js","Page-FtoC8lZ9.js","getPastedJson-COV-Kgnr.js","icon-BXu3lasn.js","MethodPill-DGMUqJKh.js","DuplicateIcon-JEUJDHz_.js","createIcon-BDFucJ34.js","DynamicMarkdown-34OtG_BH.js","SectionHeading-tBbRD59j.js","axios-vUo_bRtp.js","Markdown-SoRz2nk2.js","clsx-BOmkPVIU.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DN0dCbTw.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BcsLYcfW.js"]}