curl https://api.freemodel.app/v1/chat/completions \ -H "Authorization: Bearer sk-xxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.4-mini", "messages": [ { "role": "system", "content": "You answer in one concise sentence." }, { "role": "user", "content": "What is an API gateway?" } ], "temperature": 0.2, "max_tokens": 100 }'
{ "id": "chatcmpl_01HXYZ", "object": "chat.completion", "created": 1730000000, "model": "gpt-5.4-mini", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is a service that provides one interface for routing requests to one or more APIs." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 25, "completion_tokens": 19, "total_tokens": 44 }}
Endpoint Reference
Chat Completions protocol
Common OpenAI-compatible chat request, response, and streaming rules.
POST
/
v1
/
chat
/
completions
curl https://api.freemodel.app/v1/chat/completions \ -H "Authorization: Bearer sk-xxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.4-mini", "messages": [ { "role": "system", "content": "You answer in one concise sentence." }, { "role": "user", "content": "What is an API gateway?" } ], "temperature": 0.2, "max_tokens": 100 }'
{ "id": "chatcmpl_01HXYZ", "object": "chat.completion", "created": 1730000000, "model": "gpt-5.4-mini", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is a service that provides one interface for routing requests to one or more APIs." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 25, "completion_tokens": 19, "total_tokens": 44 }}
Create a model response from a list of chat messages. GPT-5, Grok, Gemini, and DeepSeek models accept this protocol; choose an exact model page under Text Series for pricing and the recommended model ID.
Each event begins with data:. Read events until the data: [DONE] marker.
data: {"id":"chatcmpl_01HXYZ","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null}]}data: {"id":"chatcmpl_01HXYZ","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" from FreeModel"},"finish_reason":null}]}data: [DONE]
Concatenate choices[0].delta.content values as they arrive. A delta can omit content, especially in the first or final event.
curl https://api.freemodel.app/v1/chat/completions \ -H "Authorization: Bearer sk-xxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.4-mini", "messages": [ { "role": "system", "content": "You answer in one concise sentence." }, { "role": "user", "content": "What is an API gateway?" } ], "temperature": 0.2, "max_tokens": 100 }'
{ "id": "chatcmpl_01HXYZ", "object": "chat.completion", "created": 1730000000, "model": "gpt-5.4-mini", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is a service that provides one interface for routing requests to one or more APIs." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 25, "completion_tokens": 19, "total_tokens": 44 }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FreeModel","description":"FreeModel API documentation for text, image, and video models, integrations, guides, and troubleshooting.","colors":{"primary":"#4F46E5","light":"#7C6FF0","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/freemodel/7w8_u0KneIRvUPMZ/logo/light.svg?fit=max\u0026auto=format\u0026n=7w8_u0KneIRvUPMZ\u0026q=85\u0026s=fcf236d6f35ffaaf9aeaf391b2fc3ffe","dark":"https://mintcdn.com/freemodel/7w8_u0KneIRvUPMZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=7w8_u0KneIRvUPMZ\u0026q=85\u0026s=a090a2c72503058cad34475464547785"},"favicon":"https://mintcdn.com/freemodel/2JFPcrdyx595AdAq/favicon.svg?fit=max\u0026auto=format\u0026n=2JFPcrdyx595AdAq\u0026q=85\u0026s=9140cf4a97dbc91f0e6d8495d203ec23","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.freemodel.app"}},"navbar":{"links":[{"href":"https://freemodel.app/dashboard","label":"Console"}],"primary":{"type":"button","label":"Get API Key","href":"https://freemodel.app/sign-up"}},"footer":{"socials":{"website":"https://freemodel.app"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"freemodel","hasAudioNarration":false,"actualSubdomain":"freemodel","customDomains":["docs.freemodel.app"],"gitSource":{"type":"github","owner":"bytevirts","repo":"freemodel-doc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"89f073d7-bc5c-48ec-9cd7-2e2d9d441d1c","liveDeploymentHistoryId":"6ac7bf81cd1d8ab9d9586523","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac7bf81cd1d8ab9d9586523"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ac7bf81cd1d8ab9d9586523","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"API Manual","count":66},{"language":"default","tag":"Video Series","count":35},{"language":"default","tag":"Text Series","count":18},{"language":"default","tag":"Seedance 2.0","count":9},{"language":"default","tag":"GPT-5","count":8},{"language":"default","tag":"Seedance 2.5","count":8},{"language":"default","tag":"Integrations","count":8},{"language":"default","tag":"Veo 3.1","count":7},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Image Series","count":5}]},"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"editor-nav-generations","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":"editor-agent-model-picker","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/chat-completions","slug":"/api-reference/chat-completions","pageMetadata":{"title":"Chat Completions protocol","description":"Common OpenAI-compatible chat request, response, and streaming rules.","api":"POST /v1/chat/completions","href":"/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: \"Common OpenAI-compatible chat request, response, and streaming rules.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a model response from a list of chat messages. GPT-5, Grok, Gemini, and DeepSeek models accept this protocol; choose an exact model page under `,_jsx(_components.strong,{children:`Text Series`}),` for pricing and the recommended model ID.`]}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`A text model ID available to your API key. Use\n`,_jsx(_components.a,{href:`/api-reference/list-models`,children:_jsx(_components.code,{children:`GET /v1/models`})}),` to discover IDs, then open its\nindividual model page for current pricing.`]})}),`\n`,_jsx(ParamField,{body:`messages`,type:`array`,required:true,id:`param-messages`,children:_jsxs(_components.p,{children:[`Ordered chat messages. Each message includes a `,_jsx(_components.code,{children:`role`}),` and `,_jsx(_components.code,{children:`content`}),`.`]})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:`false`,id:`param-stream`,children:_jsxs(_components.p,{children:[`Set to `,_jsx(_components.code,{children:`true`}),` to receive server-sent events.`]})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,id:`param-temperature`,children:_jsx(_components.p,{children:`Controls sampling variation. Lower values are more deterministic.`})}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,id:`param-max-tokens`,children:_jsxs(_components.p,{children:[`Caps generated tokens. GPT-5 models name this field `,_jsx(_components.code,{children:`max_completion_tokens`}),`;\nthe gateway forwards `,_jsx(_components.code,{children:`max_tokens`}),` to them under that name, so either works.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`stream-a-response`,children:`Stream a response`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`stream`}),` to `,_jsx(_components.code,{children:`true`}),`. The response uses server-sent events (SSE).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -N`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.freemodel.app/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-xxxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gpt-5.4-mini\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Say hello in three words.\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Each event begins with `,_jsx(_components.code,{children:`data:`}),`. Read events until the `,_jsx(_components.code,{children:`data: [DONE]`}),` marker.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"chatcmpl_01HXYZ\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Hello\"},\"finish_reason\":null}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"chatcmpl_01HXYZ\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" from FreeModel\"},\"finish_reason\":null}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: [DONE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Concatenate `,_jsx(_components.code,{children:`choices[0].delta.content`}),` values as they arrive. A delta can omit `,_jsx(_components.code,{children:`content`}),`, especially in the first or final event.`]})})]})}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 protocol","description":"Common OpenAI-compatible chat request, response, and streaming rules.","api":"POST /v1/chat/completions","href":"/api-reference/chat-completions"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,RequestExample,ResponseExample,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create a model response from a list of chat messages. GPT-5, Grok, Gemini, and DeepSeek models accept this protocol; choose an exact model page under `,_jsx(_components.strong,{children:`Text Series`}),` for pricing and the recommended model ID.`]}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`A text model ID available to your API key. Use\n`,_jsx(_components.a,{href:`/api-reference/list-models`,children:_jsx(_components.code,{children:`GET /v1/models`})}),` to discover IDs, then open its\nindividual model page for current pricing.`]})}),`\n`,_jsx(ParamField,{body:`messages`,type:`array`,required:true,id:`param-messages`,children:_jsxs(_components.p,{children:[`Ordered chat messages. Each message includes a `,_jsx(_components.code,{children:`role`}),` and `,_jsx(_components.code,{children:`content`}),`.`]})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:`false`,id:`param-stream`,children:_jsxs(_components.p,{children:[`Set to `,_jsx(_components.code,{children:`true`}),` to receive server-sent events.`]})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,id:`param-temperature`,children:_jsx(_components.p,{children:`Controls sampling variation. Lower values are more deterministic.`})}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,id:`param-max-tokens`,children:_jsxs(_components.p,{children:[`Caps generated tokens. GPT-5 models name this field `,_jsx(_components.code,{children:`max_completion_tokens`}),`;\nthe gateway forwards `,_jsx(_components.code,{children:`max_tokens`}),` to them under that name, so either works.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`stream-a-response`,children:`Stream a response`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`stream`}),` to `,_jsx(_components.code,{children:`true`}),`. The response uses server-sent events (SSE).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -N`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.freemodel.app/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-xxxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gpt-5.4-mini\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Say hello in three words.\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Each event begins with `,_jsx(_components.code,{children:`data:`}),`. Read events until the `,_jsx(_components.code,{children:`data: [DONE]`}),` marker.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"chatcmpl_01HXYZ\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Hello\"},\"finish_reason\":null}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"chatcmpl_01HXYZ\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" from FreeModel\"},\"finish_reason\":null}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: [DONE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Concatenate `,_jsx(_components.code,{children:`choices[0].delta.content`}),` values as they arrive. A delta can omit `,_jsx(_components.code,{children:`content`}),`, especially in the first or final event.`]})}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`Curl`,numberOfLines:`18`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.freemodel.app/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-xxxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gpt-5.4-mini\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\": \"system\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"You answer in one concise sentence.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"What is an API gateway?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\": 0.2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 100`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chatcmpl_01HXYZ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chat.completion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1730000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-5.4-mini\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"choices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An API gateway is a service that provides one interface for routing requests to one or more APIs.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finish_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stop\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`19`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`44`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}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 protocol","description":"Common OpenAI-compatible chat request, response, and streaming rules.","api":"POST /v1/chat/completions","href":"/api-reference/chat-completions"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Stream a response","slug":"stream-a-response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Curl","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.freemodel.app/v1/chat/completions\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer sk-xxxx\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"gpt-5.4-mini\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"messages\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"role\": \"system\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"content\": \"You answer in one concise sentence.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"role\": \"user\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"content\": \"What is an API gateway?\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"temperature\": 0.2,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_tokens\": 100\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"21\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"chatcmpl_01HXYZ\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"object\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"chat.completion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1730000000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gpt-5.4-mini\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"choices\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"index\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"assistant\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"An API gateway is a service that provides one interface for routing requests to one or more APIs.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"finish_reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"stop\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"prompt_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">25\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"completion_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">19\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"total_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">44\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Chat Completions protocol","path":"/v1/chat/completions","servers":[{"url":"https://api.freemodel.app"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"A text model ID available to your API key. Use `GET /v1/models` to discover IDs, then open its individual model page for current pricing.","required":true}],"messages":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Ordered chat messages. Each message includes a `role` and `content` .","required":true}],"stream":[{"type":"boolean","description":"Set to `true` to receive server-sent events."}],"temperature":[{"type":"number","description":"Controls sampling variation. Lower values are more deterministic."}],"max_tokens":[{"type":"integer","description":"Caps generated tokens. GPT-5 models name this field `max_completion_tokens` ; the gateway forwards `max_tokens` to them under that name, so either works."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","messages":[{}],"stream":true,"temperature":123,"max_tokens":123}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"freemodel","siteName":"FreeModel","title":"Chat Completions protocol - FreeModel","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-28T10:48:57.194Z","originalFileLocation":"api-reference/chat-completions.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=\"Common OpenAI-compatible chat request, response, and streaming rules.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FreeModel\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_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=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat Completions protocol - FreeModel\">\u003cmeta data-mint-head property=\"og:description\" content=\"Common OpenAI-compatible chat request, response, and streaming rules.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FreeModel\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.freemodel.app/api-reference/chat-completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://freemodel.mintlify.app/_mintlify/api/og/v2?division=Endpoint+Reference\u0026amp;title=Chat+Completions+protocol\u0026amp;description=Common+OpenAI-compatible+chat+request%2C+response%2C+and+streaming+rules.\u0026amp;theme=bf4a5e80ac9223cc9f3c7019\u0026amp;signature=42392fd0debef33d89fd25c8c4810c02593dd0eaaee42971563e690a05b13ed1\">\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 protocol - FreeModel\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Common OpenAI-compatible chat request, response, and streaming rules.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://freemodel.mintlify.app/_mintlify/api/og/v2?division=Endpoint+Reference\u0026amp;title=Chat+Completions+protocol\u0026amp;description=Common+OpenAI-compatible+chat+request%2C+response%2C+and+streaming+rules.\u0026amp;theme=bf4a5e80ac9223cc9f3c7019\u0026amp;signature=42392fd0debef33d89fd25c8c4810c02593dd0eaaee42971563e690a05b13ed1\">\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=\"/mintlify-assets/_mintlify/favicons/freemodel/F9mArZ69D1lo8bcx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FreeModel\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F46E5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.freemodel.app/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=\"/api-reference/chat-completions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.freemodel.app/#organization\",\"name\":\"FreeModel\",\"url\":\"https://docs.freemodel.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/freemodel/7w8_u0KneIRvUPMZ/logo/light.svg?fit=max\u0026auto=format\u0026n=7w8_u0KneIRvUPMZ\u0026q=85\u0026s=fcf236d6f35ffaaf9aeaf391b2fc3ffe\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.freemodel.app#website\",\"name\":\"FreeModel\",\"url\":\"https://docs.freemodel.app\",\"publisher\":{\"@id\":\"https://docs.freemodel.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.freemodel.app/api-reference/chat-completions#webpage\",\"url\":\"https://docs.freemodel.app/api-reference/chat-completions\",\"name\":\"Chat Completions protocol\",\"description\":\"Common OpenAI-compatible chat request, response, and streaming rules.\",\"dateModified\":\"2026-09-28T10:48:57.194Z\",\"isPartOf\":{\"@id\":\"https://docs.freemodel.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.freemodel.app/api-reference/chat-completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.freemodel.app/api-reference/chat-completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"FreeModel\",\"item\":\"https://docs.freemodel.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat Completions protocol\",\"item\":\"https://docs.freemodel.app/api-reference/chat-completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.freemodel.app/api-reference/chat-completions#apireference\",\"headline\":\"Chat Completions protocol\",\"name\":\"Chat Completions protocol\",\"description\":\"Common OpenAI-compatible chat request, response, and streaming rules.\",\"url\":\"https://docs.freemodel.app/api-reference/chat-completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.freemodel.app/api-reference/chat-completions#webpage\"},\"dateModified\":\"2026-09-28T10:48:57.194Z\",\"publisher\":{\"@id\":\"https://docs.freemodel.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.freemodel.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FreeModel\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"FreeModel","nav":{"global":null,"tabs":[{"tab":"API Manual","groups":[{"group":"Overview","icon":"book-open","pages":[{"title":"FreeModel API Docs – GPT-5.x / Gemini / Seedance Unified Gateway","sidebarTitle":"FreeModel API overview","href":""}]},{"group":"Text Series","icon":"font","pages":[{"group":"GPT-5","pages":[{"title":"Free / Low-Cost GPT-5.4 API","sidebarTitle":"GPT-5.4","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-4"},{"title":"GPT-5.4 Mini","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-4-mini"},{"title":"GPT-5.4 Nano","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-4-nano"},{"title":"GPT-5.5","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-5"},{"title":"Free / Low-Cost GPT-5.6 Sol API","sidebarTitle":"GPT-5.6 Sol","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-6-sol"},{"title":"GPT-5.6 Terra","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-6-terra"},{"title":"GPT-5.6 Luna","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-6-luna"},{"title":"Free / Low-Cost GPT-5.6 API","sidebarTitle":"GPT-5.6","api":"POST /v1/chat/completions","href":"/api-manual/text/gpt-5-6"}]},{"group":"Grok","pages":[{"title":"Grok 4.6","api":"POST /v1/chat/completions","href":"/api-manual/text/grok-4-6"},{"title":"Grok 4.5","api":"POST /v1/chat/completions","href":"/api-manual/text/grok-4-5"},{"title":"Grok 4.3","api":"POST /v1/chat/completions","href":"/api-manual/text/grok-4-3"}]},{"group":"Gemini","pages":[{"title":"Gemini 3.8 Flash","api":"POST /v1/chat/completions","href":"/api-manual/text/gemini-3-8-flash"},{"title":"Gemini 3.6 Flash","api":"POST /v1/chat/completions","href":"/api-manual/text/gemini-3-6-flash"},{"title":"Gemini 3.5 Flash","api":"POST /v1/chat/completions","href":"/api-manual/text/gemini-3-5-flash"},{"title":"Gemini 3.1 Pro Preview","api":"POST /v1/chat/completions","href":"/api-manual/text/gemini-3-1-pro-preview"}]},{"group":"DeepSeek","pages":[{"title":"DeepSeek V4 Pro","api":"POST /v1/chat/completions","href":"/api-manual/text/deepseek-v4-pro"},{"title":"DeepSeek V4 Flash","api":"POST /v1/chat/completions","href":"/api-manual/text/deepseek-v4-flash"},{"title":"DeepSeek Flash","api":"POST /v1/chat/completions","href":"/api-manual/text/deepseek-flash"}]}]},{"group":"Image Series","icon":"image","pages":[{"title":"Nano Banana 2.1","api":"POST /v1/images/generations","href":"/api-manual/image/nano-banana-2-1"},{"title":"GPT Image 2","api":"POST /v1/images/generations","href":"/api-manual/image/gpt-image-2"},{"title":"GPT Image 2.5 Ext","api":"POST /v1/images/generations","href":"/api-manual/image/gpt-image-2-5-ext"},{"title":"GPT Image 2.5 Ext Sunburst","api":"POST /v1/images/generations","href":"/api-manual/image/gpt-image-2-5-ext-sunburst"},{"title":"GPT Image 2 All","api":"POST /v1/images/generations","href":"/api-manual/image/gpt-image-2-all"}]},{"group":"Video Series","icon":"video","pages":[{"group":"Seedance 2.0","pages":[{"title":"Seedance 2.0 T2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-t2v"},{"title":"Seedance 2.0 I2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-i2v"},{"title":"Seedance 2.0 R2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-r2v"},{"title":"Seedance 2.0 Fast T2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-fast-t2v"},{"title":"Seedance 2.0 Fast I2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-fast-i2v"},{"title":"Seedance 2.0 Fast R2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-fast-r2v"},{"title":"Seedance 2.0 Mini T2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-mini-t2v"},{"title":"Seedance 2.0 Mini I2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-mini-i2v"},{"title":"Seedance 2.0 Mini R2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-0-mini-r2v"}]},{"group":"Seedance 2.5","pages":[{"title":"Seedance 2.5 T2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-t2v"},{"title":"Seedance 2.5 I2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-i2v"},{"title":"Seedance 2.5 R2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-r2v"},{"title":"Seedance 2.5 Extend","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-extend"},{"title":"Seedance 2.5 480p","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-480p"},{"title":"Seedance 2.5 720p","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-720p"},{"title":"Seedance 2.5 480p V2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-480p-v2v"},{"title":"Seedance 2.5 720p V2V","api":"POST /v1/videos","href":"/api-manual/video/seedance-2-5-720p-v2v"}]},{"group":"Gemini Omni Flash 1.1","pages":[{"title":"Gemini Omni Flash 1.1 T2V","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-flash-1-1-t2v"},{"title":"Gemini Omni Flash 1.1 I2V","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-flash-1-1-i2v"},{"title":"Gemini Omni Flash 1.1 R2V","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-flash-1-1-r2v"},{"title":"Gemini Omni Flash 1.1 Extend","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-flash-1-1-extend"}]},{"group":"Gemini Omni","pages":[{"title":"Gemini Omni T2V","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-t2v"},{"title":"Gemini Omni I2V","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-i2v"},{"title":"Gemini Omni R2V","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-r2v"},{"title":"Gemini Omni Extend","api":"POST /v1/videos","href":"/api-manual/video/gemini-omni-extend"}]},{"group":"Veo 3.1","pages":[{"title":"Veo 3.1 Lite","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-lite"},{"title":"Veo 3.1 Lite 4K","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-lite-4k"},{"title":"Veo 3.1 Fast","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-fast"},{"title":"Veo 3.1 Fast 4K","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-fast-4k"},{"title":"Veo 3.1 Fast Reference","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-fast-ref"},{"title":"Veo 3.1 Quality","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-quality"},{"title":"Veo 3.1 Quality 4K","api":"POST /v1/videos","href":"/api-manual/video/veo3-1-quality-4k"}]},{"group":"MiniMax H3","pages":[{"title":"MiniMax H3","api":"POST /v1/videos","href":"/api-manual/video/minimax-h3"},{"title":"MiniMax H3 2K","api":"POST /v1/videos","href":"/api-manual/video/minimax-h3-2k"}]},{"group":"Grok Imagine","pages":[{"title":"Grok Imagine 1.5 Fast","description":"Grok Imagine 1.5 Fast video API via FreeModel: xAI Grok Imagine 1.5 Fast, billed from prepaid balance.","api":"POST /v1/videos","href":"/api-manual/video/grok-imagine-1-5-fast"}]}]},{"group":"Endpoint Reference","icon":"brackets-curly","pages":[{"title":"Chat Completions protocol","api":"POST /v1/chat/completions","href":"/api-reference/chat-completions"},{"title":"Claude Messages Compatible Endpoint","sidebarTitle":"Claude Messages","description":"Technical reference for FreeModel's Anthropic Claude Messages-compatible endpoint at POST /v1/messages.","api":"POST /v1/messages","href":"/api-reference/claude-messages"},{"title":"Image API protocol","api":"POST /v1/images/generations","href":"/api-reference/images"},{"title":"Video API workflow","api":"POST /v1/videos","href":"/api-reference/video-generation"},{"title":"List models","api":"GET /v1/models","href":"/api-reference/list-models"}]},{"group":"Task Management","icon":"list-check","pages":[{"title":"Get task status","api":"GET /v1/tasks/{id}","href":"/api-reference/task-status"},{"title":"Task webhooks","href":"/api-reference/webhooks"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/quickstart"}]},{"tab":"FAQs","pages":[{"title":"FAQs","href":"/faqs"}]}]},"title":"Chat Completions protocol - FreeModel","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js"]}