Generates a completion for the supplied conversation.
Set stream: true to receive Server-Sent Events. Most chunks carry
a usage object: the opening role delta and the chunk carrying finish_reason omit
it. The final chunk before [DONE] reports the totals with an empty choices
array.
Sampling constraints are per model. The bounds in this schema are the OpenAI-wire
bounds, not the per-model ones.
Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise,
retry-after-ms first and then retry-after, over an interval of your own. Do not
retry 400, 401, 402 or 404, and do not retry anything carrying x-should-retry: false:
the answer will not change until you do something about it.
A 429 means one of your three per-minute budgets is empty. See
Rate limits for what they are and how to read the headers that
report them.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LithosAI","description":"Documentation for the LithosAI inference API.","colors":{"primary":"#050505","light":"#fafafa","dark":"#050505"},"logo":{"light":"https://mintcdn.com/lithos-ai/jfdmtlCQrjXk1oQM/logo/light.svg?fit=max\u0026auto=format\u0026n=jfdmtlCQrjXk1oQM\u0026q=85\u0026s=494513779207d768a0f79c301420c2af","dark":"https://mintcdn.com/lithos-ai/jfdmtlCQrjXk1oQM/logo/dark.svg?fit=max\u0026auto=format\u0026n=jfdmtlCQrjXk1oQM\u0026q=85\u0026s=3cce09576c39e14e2653c46804e449d3","href":"https://www.lithosai.com"},"favicon":{"light":"https://mintcdn.com/lithos-ai/jfdmtlCQrjXk1oQM/favicon.png?fit=max\u0026auto=format\u0026n=jfdmtlCQrjXk1oQM\u0026q=85\u0026s=0b70324b8b63571e7d1cd93625f13307","dark":"https://mintcdn.com/lithos-ai/jfdmtlCQrjXk1oQM/favicon.png?fit=max\u0026auto=format\u0026n=jfdmtlCQrjXk1oQM\u0026q=85\u0026s=0b70324b8b63571e7d1cd93625f13307"},"api":{"openapi":["openapi.yaml","zh/openapi-zh.yaml"]},"navbar":{"links":[],"primary":{"type":"button","label":"Console","href":"https://console.lithosai.cloud"}},"footer":{"socials":{"github":"https://github.com/lithos-ai","x":"https://x.com/lithos_ai","linkedin":"https://www.linkedin.com/company/lithosai","website":"https://www.lithosai.com/"}},"seo":{"organization":{"id":"https://www.lithosai.com/#organization","name":"LithosAI","url":"https://www.lithosai.com/","logo":"https://www.lithosai.com/android-chrome-512x512.png","sameAs":["https://www.linkedin.com/company/lithosai","https://x.com/lithos_ai"]}},"fonts":{"heading":{"family":"Schibsted Grotesk","weight":500},"body":{"family":"Schibsted Grotesk"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"fonts":{"family":"Schibsted Grotesk"}},"interaction":{"drilldown":false},"markdown":{"schema":false},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"zh","navbar":{"links":[],"primary":{"type":"button","label":"控制台","href":"https://console.lithosai.cloud/?lang=zh"}},"href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lithos-ai","hasAudioNarration":false,"actualSubdomain":"lithos-ai","customDomains":["docs.lithosai.com"],"gitSource":{"type":"github","owner":"lithos-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad6863f0a5d99939b84bbc5","collectionId":"2c625e64-86f4-42fd-8678-509a54965249","liveDeploymentHistoryId":"6ad6863f0a5d99939b84bbc5","schemaVersion":"v3"},"feedback":{"agentFeedback":true},"entitlements":{},"buildId":"6ae7a12e149aa82e621209ab","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"en","tag":"Getting Started","count":14},{"language":"zh","tag":"快速开始","count":14},{"language":"en","tag":"Agent Integrations","count":12},{"language":"zh","tag":"Agent 接入","count":12},{"language":"en","tag":"Models","count":5},{"language":"zh","tag":"模型","count":5},{"language":"en","tag":"Inference APIs","count":3},{"language":"zh","tag":"推理 API","count":3},{"language":"en","tag":"Account","count":2},{"language":"zh","tag":"账户","count":2},{"language":"en","tag":"Chat","count":1},{"language":"zh","tag":"模型请求","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--rounded:0px;--rounded-sm:0px;--rounded-md:0px;--rounded-lg:0px;--rounded-xl:0px;--rounded-2xl:0px;--rounded-3xl:0px;--rounded-search:0px;--button-border-radius:0px;--accordion-radius:0px;--frame-placeholder-border-radius:0px;--background-light:250 250 250;--primary:5 5 5}.dark{--background-dark:5 5 5}code,kbd,pre,samp{font-family:\"Geist Mono\",ui-monospace,SFMono-Regular,Menlo,monospace}.prose.text-lg{font-size:1rem}html[lang^=zh]{--font-family-body-custom:\"Schibsted Grotesk\", \"Noto Sans SC\", \"PingFang SC\",\n \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", \"Source Han Sans SC\",\n sans-serif;--font-family-headings-custom:var(--font-family-body-custom)}html[lang^=zh] :is(h1, h2, h3, h4, h5, h6),html[lang^=zh] body{font-family:var(--font-family-body-custom)}html[lang^=zh] .prose{line-height:1.75}html[lang^=zh] :is(h1, h2, h3, h4, h5, h6){letter-spacing:normal}"}],"page":{"pagePath":"api-reference/chat/create-a-chat-completion","slug":"/api-reference/chat/create-a-chat-completion","pageMetadata":{"title":"Create a chat completion","description":"Generates a completion for the supplied conversation.\n\nSet `stream: true` to receive Server-Sent Events. Most chunks carry\na `usage` object: the opening role delta and the chunk carrying `finish_reason` omit\nit. The final chunk before `[DONE]` reports the totals with an empty `choices`\narray.\n\nSampling constraints are **per model**. The bounds in this schema are the OpenAI-wire\nbounds, not the per-model ones.\n\nRetry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise,\n`retry-after-ms` first and then `retry-after`, over an interval of your own. Do not\nretry 400, 401, 402 or 404, and do not retry anything carrying `x-should-retry: false`:\nthe answer will not change until you do something about it.\n\nA 429 means one of your three per-minute budgets is empty. See\n[Rate limits](/rate-limits) for what they are and how to read the headers that\nreport them.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chat/completions","href":"/api-reference/chat/create-a-chat-completion","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Generates a completion for the supplied conversation.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Set \", _jsx(_components.code, {\n children: \"stream: true\"\n }), \" to receive Server-Sent Events. Most chunks carry\\na \", _jsx(_components.code, {\n children: \"usage\"\n }), \" object: the opening role delta and the chunk carrying \", _jsx(_components.code, {\n children: \"finish_reason\"\n }), \" omit\\nit. The final chunk before \", _jsx(_components.code, {\n children: \"[DONE]\"\n }), \" reports the totals with an empty \", _jsx(_components.code, {\n children: \"choices\"\n }), \"\\narray.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Sampling constraints are \", _jsx(_components.strong, {\n children: \"per model\"\n }), \". The bounds in this schema are the OpenAI-wire\\nbounds, not the per-model ones.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise,\\n\", _jsx(_components.code, {\n children: \"retry-after-ms\"\n }), \" first and then \", _jsx(_components.code, {\n children: \"retry-after\"\n }), \", over an interval of your own. Do not\\nretry 400, 401, 402 or 404, and do not retry anything carrying \", _jsx(_components.code, {\n children: \"x-should-retry: false\"\n }), \":\\nthe answer will not change until you do something about it.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A 429 means one of your three per-minute budgets is empty. See\\n\", _jsx(_components.a, {\n href: \"/rate-limits\",\n children: \"Rate limits\"\n }), \" for what they are and how to read the headers that\\nreport them.\"]\n })]\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","description":"Generates a completion for the supplied conversation.\n\nSet `stream: true` to receive Server-Sent Events. Most chunks carry\na `usage` object: the opening role delta and the chunk carrying `finish_reason` omit\nit. The final chunk before `[DONE]` reports the totals with an empty `choices`\narray.\n\nSampling constraints are **per model**. The bounds in this schema are the OpenAI-wire\nbounds, not the per-model ones.\n\nRetry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise,\n`retry-after-ms` first and then `retry-after`, over an interval of your own. Do not\nretry 400, 401, 402 or 404, and do not retry anything carrying `x-should-retry: false`:\nthe answer will not change until you do something about it.\n\nA 429 means one of your three per-minute budgets is empty. See\n[Rate limits](/rate-limits) for what they are and how to read the headers that\nreport them.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chat/completions","href":"/api-reference/chat/create-a-chat-completion","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/lithos-ai/9b9c33192fc40002/language-auto.js","/_mintlify/custom/lithos-ai/a3ca73a138b27ab8/zh-font.js"],"openApiReferenceData":{"operation":{"operationId":"createChatCompletion","tags":["Chat"],"summary":"Create a chat completion","description":"Generates a completion for the supplied conversation.\n\nSet `stream: true` to receive Server-Sent Events. Most chunks carry\na `usage` object: the opening role delta and the chunk carrying `finish_reason` omit\nit. The final chunk before `[DONE]` reports the totals with an empty `choices`\narray.\n\nSampling constraints are **per model**. The bounds in this schema are the OpenAI-wire\nbounds, not the per-model ones.\n\nRetry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise,\n`retry-after-ms` first and then `retry-after`, over an interval of your own. Do not\nretry 400, 401, 402 or 404, and do not retry anything carrying `x-should-retry: false`:\nthe answer will not change until you do something about it.\n\nA 429 means one of your three per-minute budgets is empty. See\n[Rate limits](/rate-limits) for what they are and how to read the headers that\nreport them.\n","requestBody":"2662b680-b18f-4ccf-9b65-fd4a3fa528e0","responses":{"200":"a4b016d7-fd64-4419-8ce9-c1bd66aeabde","400":"97ebab0c-0ba3-422f-9ce3-8c7b90f75e12","401":"c02f9d79-248c-4dee-a326-6cebe78b0318","402":"67446e21-57ea-4bde-8e97-710f0000d5db","404":"14b31a2e-ed4a-40ca-8b06-8b022d3eceaa","429":"be7a1832-5233-45d0-8f36-321f1da6534a"},"method":"post","type":"path","servers":["fd9947dc-56b3-4538-986f-34785fa5841d"],"security":["6ac7c999-a1e9-4216-8d10-d358706745d9"],"path":"/chat/completions","baseUrlOptions":["https://api.lithosai.cloud/v1"],"title":"Create a chat completion","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"The model id, e.g. `deepseek-ai/DeepSeek-V4.1-Flash`.","example":"deepseek-ai/DeepSeek-V4.1-Flash","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","minItems":1,"items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool","function","developer"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"array"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | array | null"},"name":{"type":"string","uniqueKey":"messages.items.[INDEX].name","typeLabel":"string"},"tool_calls":{"type":"array","items":{"type":"object","uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"object[]"},"tool_call_id":{"type":"string","uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"}},"required":["role"],"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"max_tokens":{"oneOf":[{"type":"integer","minimum":1,"uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","minimum":1,"uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"temperature":{"oneOf":[{"type":"number","minimum":0,"maximum":2,"default":1,"uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":2,"default":1,"uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","exclusiveMinimum":0,"maximum":1,"default":1,"uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","exclusiveMinimum":0,"maximum":1,"default":1,"uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"top_k":{"oneOf":[{"type":"integer","description":"Non-standard sampling parameter; accepted by LithosAI.","uniqueKey":"top_k.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Non-standard sampling parameter; accepted by LithosAI.","uniqueKey":"top_k.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_k","typeLabel":"integer | null"},"n":{"oneOf":[{"type":"integer","default":1,"description":"Must be `1`. Any other value returns 400 with code `unsupported_n`.","uniqueKey":"n.oneOf.0","typeLabel":"integer"},{"type":"null","default":1,"description":"Must be `1`. Any other value returns 400 with code `unsupported_n`.","uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer | null"},"stop":{"oneOf":[{"type":"string","items":{"type":"string"},"uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"uniqueKey":"stop.oneOf.1","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"uniqueKey":"stop.oneOf.2","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string | string[] | null"},"stream":{"oneOf":[{"type":"boolean","default":false,"uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"stream_options":{"oneOf":[{"type":"object","properties":{"include_usage":{"type":"boolean","uniqueKey":"stream_options.oneOf.0.include_usage","typeLabel":"boolean"}},"uniqueKey":"stream_options.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"include_usage":{"type":"boolean"}},"uniqueKey":"stream_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options","typeLabel":"object | null"},"presence_penalty":{"oneOf":[{"type":"number","minimum":-2,"maximum":2,"default":0,"uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","minimum":-2,"maximum":2,"default":0,"uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"frequency_penalty":{"oneOf":[{"type":"number","minimum":-2,"maximum":2,"default":0,"uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","minimum":-2,"maximum":2,"default":0,"uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"seed":{"oneOf":[{"type":"integer","uniqueKey":"seed.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"seed.oneOf.1","typeLabel":"null"}],"uniqueKey":"seed","typeLabel":"integer | null"},"response_format":{"oneOf":[{"type":"object","uniqueKey":"response_format.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"response_format.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format","typeLabel":"object | null"},"reasoning_effort":{"oneOf":[{"type":"string","uniqueKey":"reasoning_effort.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"reasoning_effort.oneOf.1","typeLabel":"null"}],"uniqueKey":"reasoning_effort","typeLabel":"string | null"},"tools":{"type":"array","items":{"type":"object","uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","uniqueKey":"tool_choice.oneOf.0","typeLabel":"string"},{"type":"object","uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"},{"type":"null","uniqueKey":"tool_choice.oneOf.2","typeLabel":"null"}],"uniqueKey":"tool_choice","typeLabel":"string | object | null"},"user":{"type":"string","uniqueKey":"user","typeLabel":"string"}},"required":["model","messages"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"deepseek-ai/DeepSeek-V4.1-Flash","messages":[{"content":"\u003cstring>","name":"\u003cstring>","tool_calls":[{}],"tool_call_id":"\u003cstring>"}],"max_tokens":2,"max_completion_tokens":2,"temperature":1,"top_p":1,"top_k":123,"n":1,"stop":"\u003cstring>","stream":false,"stream_options":{"include_usage":true},"presence_penalty":0,"frequency_penalty":0,"seed":123,"response_format":{},"reasoning_effort":"\u003cstring>","tools":[{}],"tool_choice":"\u003cstring>","user":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a4b016d7-fd64-4419-8ce9-c1bd66aeabde":{"description":"The completion, or an SSE stream when `stream` is true.","headers":{"x-ratelimit-limit-requests":{"description":"The capacity of your request bucket.","schema":{"type":"integer"}},"x-ratelimit-remaining-requests":{"description":"Requests left in it. A balance, not limit-minus-spend.","schema":{"type":"integer"}},"x-ratelimit-reset-requests":{"description":"How long until that bucket is full again, e.g. `1s`.","schema":{"type":"string"}},"x-ratelimit-limit-tokens":{"description":"The capacity of whichever token bucket is nearer its limit.","schema":{"type":"integer"}},"x-ratelimit-remaining-tokens":{"description":"Tokens left in it.","schema":{"type":"integer"}},"x-ratelimit-reset-tokens":{"description":"How long until it is full again, e.g. `0s`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","format":"unixtime","isRequired":true,"uniqueKey":"created","typeLabel":"integer\u003cunixtime>"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant","isRequired":true,"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"},"reasoning_content":{"oneOf":[{"type":"string","description":"Reasoning trace, on models that emit one. Separate from `content`.","uniqueKey":"choices.items.[INDEX].message.reasoning_content.oneOf.0","typeLabel":"string"},{"type":"null","description":"Reasoning trace, on models that emit one. Separate from `content`.","uniqueKey":"choices.items.[INDEX].message.reasoning_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning_content","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"type":"object","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"object[] | null"}},"required":["role"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter",null],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["stop","length","tool_calls","content_filter",null],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"},"logprobs":{"oneOf":[{"type":"object","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"object | null"}},"required":["index","message","finish_reason"],"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"oneOf":[{"type":"object","uniqueKey":"usage.prompt_tokens_details.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.prompt_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object | null"},"completion_tokens_details":{"oneOf":[{"type":"object","properties":{"reasoning_tokens":{"type":"integer","uniqueKey":"usage.completion_tokens_details.oneOf.0.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.completion_tokens_details.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"reasoning_tokens":{"type":"integer"}},"uniqueKey":"usage.completion_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details","typeLabel":"object | null"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"uniqueKey":"usage","typeLabel":"object"}},"required":["id","object","created","model","choices"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion","created":123,"model":"\u003cstring>","choices":[{"index":123,"message":{"role":"assistant","content":"\u003cstring>","reasoning_content":"\u003cstring>","tool_calls":[{}]},"finish_reason":"stop","logprobs":{}}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":123}}}}},"exampleType":"generated"},"text/event-stream":{"schema":{"type":"object","description":"One SSE `data:` frame. The stream terminates with a literal `data: [DONE]`, which is\nnot JSON. The final JSON chunk carries totals in `usage` with an empty `choices`.\n","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion.chunk","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","format":"unixtime","isRequired":true,"uniqueKey":"created","typeLabel":"integer\u003cunixtime>"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"delta":{"type":"object","properties":{"role":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.role.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.role.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.role","typeLabel":"string | null"},"content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.content","typeLabel":"string | null"},"reasoning_content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.reasoning_content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.reasoning_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.reasoning_content","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"type":"object","uniqueKey":"choices.items.[INDEX].delta.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].delta.tool_calls.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object"},"uniqueKey":"choices.items.[INDEX].delta.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.tool_calls","typeLabel":"object[] | null"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].delta","typeLabel":"object"},"logprobs":{"oneOf":[{"type":"object","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"object | null"},"finish_reason":{"oneOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter",null],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["stop","length","tool_calls","content_filter",null],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"}},"required":["index","delta"],"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"oneOf":[{"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.oneOf.0.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.oneOf.0.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.oneOf.0.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"oneOf":[{"type":"object","uniqueKey":"usage.oneOf.0.prompt_tokens_details.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.oneOf.0.prompt_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.oneOf.0.prompt_tokens_details","typeLabel":"object | null"},"completion_tokens_details":{"oneOf":[{"type":"object","properties":{"reasoning_tokens":{"type":"integer","uniqueKey":"usage.oneOf.0.completion_tokens_details.oneOf.0.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.oneOf.0.completion_tokens_details.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"reasoning_tokens":{"type":"integer"}},"uniqueKey":"usage.oneOf.0.completion_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.oneOf.0.completion_tokens_details","typeLabel":"object | null"}},"uniqueKey":"usage.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage","typeLabel":"object | null"}},"required":["id","object","created","model","choices"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion.chunk","created":123,"model":"\u003cstring>","choices":[{"index":123,"delta":{"role":"\u003cstring>","content":"\u003cstring>","reasoning_content":"\u003cstring>","tool_calls":[{}]},"logprobs":{},"finish_reason":"stop"}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":123}}}}},"exampleType":"generated"}},"exampleType":"generated"},"97ebab0c-0ba3-422f-9ce3-8c7b90f75e12":{"description":"Invalid request. Request-level errors such as `invalid_json`, `model_required`,\n`request_too_large`, `unsupported_parameter`, `unknown_parameter` and\n`unsupported_n` use the LithosAI envelope. Invalid parameter values, such as an\nout-of-range `temperature`, use a flat shape instead.\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.error.message","typeLabel":"string"},"type":{"type":"string","description":"`invalid_request_error` in general. On a 429 this instead names the exhausted\nbudget: `requests`, `input_tokens` or `output_tokens`.\n","isRequired":true,"uniqueKey":"oneOf.0.error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"oneOf.0.error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.0.error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"oneOf.0.error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"oneOf.0.error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.error.code","typeLabel":"string | null"}},"required":["message","type"],"isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Parameter value error, returned without the LithosAI envelope. Note the flat shape\nand the integer `code`.\n","required":["object","message","type","code"],"properties":{"object":{"type":"string","const":"error","isRequired":true,"uniqueKey":"oneOf.1.object","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"type":{"type":"string","examples":["Bad Request","BadRequestError"],"isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"string"},"code":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.code","typeLabel":"integer"},"param":{"oneOf":[{"type":"string","uniqueKey":"oneOf.1.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.1.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.param","typeLabel":"string | null"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","param":"\u003cstring>","code":"invalid_json"}}}},"exampleType":"generated"},"text/plain":{"schema":{"type":"string","uniqueKey":"","typeLabel":"string"},"example":"inference error: BadRequest - error extracting request body: invalid chat completions request: must have valid messages field","examples":{"Example":{"title":"Example","value":"inference error: BadRequest - error extracting request body: invalid chat completions request: must have valid messages field"}},"exampleType":"examples"}},"exampleType":"examples"},"c02f9d79-248c-4dee-a326-6cebe78b0318":{"description":"The key is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"`invalid_request_error` in general. On a 429 this instead names the exhausted\nbudget: `requests`, `input_tokens` or `output_tokens`.\n","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"invalid API key","type":"invalid_request_error"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"invalid API key","type":"invalid_request_error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"67446e21-57ea-4bde-8e97-710f0000d5db":{"description":"The organization is out of credit (`insufficient_quota`).","headers":{"x-should-retry":{"description":"Set to `false` where no amount of waiting will change the answer.","schema":{"type":"boolean"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"`invalid_request_error` in general. On a 429 this instead names the exhausted\nbudget: `requests`, `input_tokens` or `output_tokens`.\n","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","param":"\u003cstring>","code":"invalid_json"}}}},"exampleType":"generated"}},"exampleType":"generated"},"14b31a2e-ed4a-40ca-8b06-8b022d3eceaa":{"description":"The catalog holds no such model id. The message quotes it back.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"`invalid_request_error` in general. On a 429 this instead names the exhausted\nbudget: `requests`, `input_tokens` or `output_tokens`.\n","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"the model `nope` does not exist","type":"invalid_request_error","param":null,"code":"model_not_found"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"the model `nope` does not exist","type":"invalid_request_error","param":null,"code":"model_not_found"}}}},"exampleType":"examples"}},"exampleType":"examples"},"be7a1832-5233-45d0-8f36-321f1da6534a":{"description":"A per-minute budget is empty (`rate_limit_exceeded`, with `error.type` naming\nwhich of `requests`, `input_tokens` or `output_tokens` refused), or the model is\nat capacity (`provider_overloaded`).\n","headers":{"retry-after":{"description":"Seconds to wait, on a refusal where waiting helps.","schema":{"type":"integer"}},"retry-after-ms":{"description":"The same advice in milliseconds, and the more precise of the two.","schema":{"type":"integer"}},"x-should-retry":{"description":"Set to `false` where no amount of waiting will change the answer.","schema":{"type":"boolean"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"`invalid_request_error` in general. On a 429 this instead names the exhausted\nbudget: `requests`, `input_tokens` or `output_tokens`.\n","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Disambiguates the error. Absent entirely on 401.\n","examples":["invalid_json","model_required","request_too_large","insufficient_quota","model_not_found","rate_limit_exceeded","provider_overloaded","unsupported_parameter","unknown_parameter","unsupported_n"],"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"required":["message","type"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","param":"\u003cstring>","code":"invalid_json"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"6ac7c999-a1e9-4216-8d10-d358706745d9":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"A key created on the API Keys console page, sent as `Authorization: Bearer \u003ckey>`.","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"fd9947dc-56b3-4538-986f-34785fa5841d":{"url":"https://api.lithosai.cloud/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"A key created on the API Keys console page, sent as `Authorization: Bearer \u003ckey>`.","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"A key created on the API Keys console page, sent as `Authorization: Bearer \u003ckey>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"lithos-ai","siteName":"LithosAI","title":"Create a chat completion - LithosAI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/chat/create-a-chat-completion","matchLevel":0},"zh":{"href":"/zh/api-reference/chat/create-a-chat-completion","matchLevel":1}}},"lastModified":"2026-11-01T20:29:37.898Z","originalFileLocation":"api-reference/chat/create-a-chat-completion.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generates a completion for the supplied conversation. Set stream: true to receive Server-Sent Events. Most chunks carry a usage object: the opening role delta and the chunk carrying finish_reason omit it. The final chunk before [DONE] reports the totals with an empty choices array. Sampling constraints are per model. The bounds in this schema are the OpenAI-wire bounds, not the per-model ones. Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise, retry-after-ms first and then retry-after, over an interval of your own. Do not retry 400, 401, 402 or 404, and do not retry anything carrying x-should-retry: false: the answer will not change until you do something about it. A 429 means one of your three per-minute budgets is empty. See Rate limits for what they are and how to read the headers that report them.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LithosAI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_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/lithos-ai/yO49JQ2ksWF5fX6Y/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a chat completion - LithosAI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generates a completion for the supplied conversation. Set stream: true to receive Server-Sent Events. Most chunks carry a usage object: the opening role delta and the chunk carrying finish_reason omit it. The final chunk before [DONE] reports the totals with an empty choices array. Sampling constraints are per model. The bounds in this schema are the OpenAI-wire bounds, not the per-model ones. Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise, retry-after-ms first and then retry-after, over an interval of your own. Do not retry 400, 401, 402 or 404, and do not retry anything carrying x-should-retry: false: the answer will not change until you do something about it. A 429 means one of your three per-minute budgets is empty. See Rate limits for what they are and how to read the headers that report them.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LithosAI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lithos-ai.mintlify.app/_mintlify/api/og/v2?division=Chat\u0026amp;title=Create+a+chat+completion\u0026amp;description=Generates+a+completion+for+the+supplied+conversation.%0A%0ASet+%60stream%3A+true%60+to+receive+Server-Sent+Events.+Most+chunks+carry%0Aa+%60usage%60+object%3A+the+opening+role+de\u0026amp;theme=96e31f289b17d50cac47797e\u0026amp;signature=9d27b828b95ab2c26a4707a9978ad7a413badfa81869e79ddece9816878c1af6\">\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 - LithosAI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generates a completion for the supplied conversation. Set stream: true to receive Server-Sent Events. Most chunks carry a usage object: the opening role delta and the chunk carrying finish_reason omit it. The final chunk before [DONE] reports the totals with an empty choices array. Sampling constraints are per model. The bounds in this schema are the OpenAI-wire bounds, not the per-model ones. Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise, retry-after-ms first and then retry-after, over an interval of your own. Do not retry 400, 401, 402 or 404, and do not retry anything carrying x-should-retry: false: the answer will not change until you do something about it. A 429 means one of your three per-minute budgets is empty. See Rate limits for what they are and how to read the headers that report them.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lithos-ai.mintlify.app/_mintlify/api/og/v2?division=Chat\u0026amp;title=Create+a+chat+completion\u0026amp;description=Generates+a+completion+for+the+supplied+conversation.%0A%0ASet+%60stream%3A+true%60+to+receive+Server-Sent+Events.+Most+chunks+carry%0Aa+%60usage%60+object%3A+the+opening+role+de\u0026amp;theme=96e31f289b17d50cac47797e\u0026amp;signature=9d27b828b95ab2c26a4707a9978ad7a413badfa81869e79ddece9816878c1af6\">\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/lithos-ai/yO49JQ2ksWF5fX6Y/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LithosAI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#050505\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\">\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/create-a-chat-completion.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.lithosai.com/zh/api-reference/chat/create-a-chat-completion\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.lithosai.com/#organization\",\"name\":\"LithosAI\",\"url\":\"https://www.lithosai.com/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://www.lithosai.com/android-chrome-512x512.png\"},\"sameAs\":[\"https://www.linkedin.com/company/lithosai\",\"https://x.com/lithos_ai\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lithosai.com#website\",\"name\":\"LithosAI\",\"url\":\"https://docs.lithosai.com\",\"publisher\":{\"@id\":\"https://www.lithosai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion#webpage\",\"url\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\",\"name\":\"Create a chat completion\",\"description\":\"Generates a completion for the supplied conversation. Set stream: true to receive Server-Sent Events. Most chunks carry a usage object: the opening role delta and the chunk carrying finish_reason omit it. The final chunk before [DONE] reports the totals with an empty choices array. Sampling constraints are per model. The bounds in this schema are the OpenAI-wire bounds, not the per-model ones. Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise, retry-after-ms first and then retry-after, over an interval of your own. Do not retry 400, 401, 402 or 404, and do not retry anything carrying x-should-retry: false: the answer will not change until you do something about it. A 429 means one of your three per-minute budgets is empty. See Rate limits for what they are and how to read the headers that report them.\",\"dateModified\":\"2026-11-01T20:29:37.898Z\",\"isPartOf\":{\"@id\":\"https://docs.lithosai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inference APIs\",\"item\":\"https://docs.lithosai.com/api-reference/models/list-available-models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a chat completion\",\"item\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion#apireference\",\"headline\":\"Create a chat completion\",\"name\":\"Create a chat completion\",\"description\":\"Generates a completion for the supplied conversation. Set stream: true to receive Server-Sent Events. Most chunks carry a usage object: the opening role delta and the chunk carrying finish_reason omit it. The final chunk before [DONE] reports the totals with an empty choices array. Sampling constraints are per model. The bounds in this schema are the OpenAI-wire bounds, not the per-model ones. Retry 429 and 5xx with exponential backoff and jitter. Prefer the delay we advise, retry-after-ms first and then retry-after, over an interval of your own. Do not retry 400, 401, 402 or 404, and do not retry anything carrying x-should-retry: false: the answer will not change until you do something about it. A 429 means one of your three per-minute budgets is empty. See Rate limits for what they are and how to read the headers that report them.\",\"url\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lithosai.com/api-reference/chat/create-a-chat-completion#webpage\"},\"dateModified\":\"2026-11-01T20:29:37.898Z\",\"publisher\":{\"@id\":\"https://www.lithosai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lithosai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LithosAI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"LithosAI","nav":{"global":null,"languages":[{"language":"en","default":true,"groups":[{"group":"Getting Started","pages":[{"title":"LithosAI APIs","sidebarTitle":"Introduction","icon":"house","href":""},{"title":"Authentication","icon":"key","href":"/authentication"},{"group":"Agent Integrations","icon":"terminal","root":{"title":"Agent Integrations","href":"/agent-integrations"},"expanded":true,"pages":[{"title":"Use LithosAI with Claude Code","sidebarTitle":"Claude Code","href":"/agent-integrations/claude-code"},{"title":"Use LithosAI with Cline","sidebarTitle":"Cline","href":"/agent-integrations/cline"},{"title":"Use LithosAI with Codex","sidebarTitle":"Codex","href":"/agent-integrations/codex"},{"title":"Use LithosAI with DeepSeek Harness","sidebarTitle":"DeepSeek Harness","href":"/agent-integrations/deepseek-harness"},{"title":"Use LithosAI with Hermes Agent","sidebarTitle":"Hermes Agent","href":"/agent-integrations/hermes-agent"},{"title":"Use LithosAI with Kilo Code","sidebarTitle":"Kilo Code","href":"/agent-integrations/kilo-code"},{"title":"Use LithosAI with omp","sidebarTitle":"omp","href":"/agent-integrations/omp"},{"title":"Use LithosAI with OpenClaw","sidebarTitle":"OpenClaw","href":"/agent-integrations/openclaw"},{"title":"Use LithosAI with OpenCode","sidebarTitle":"OpenCode","href":"/agent-integrations/opencode"},{"title":"Use LithosAI with OpenHands","sidebarTitle":"OpenHands","href":"/agent-integrations/openhands"},{"title":"Use LithosAI with Pi","sidebarTitle":"Pi","href":"/agent-integrations/pi"},{"title":"Use LithosAI with VS Code","sidebarTitle":"VS Code","href":"/agent-integrations/vscode"}]}]},{"group":"Models","icon":"boxes","pages":[{"title":"DeepSeek-V4.1-Flash","href":"/models/deepseek-v4-1-flash"},{"title":"GLM-5.3","href":"/models/glm-5-3"},{"title":"GLM-5.3-Flash","href":"/models/glm-5-3-flash"}]},{"group":"Inference APIs","icon":"terminal","pages":[{"group":"Models","pages":[{"title":"List available models","deprecated":null,"version":null,"openapi":"/openapi.yaml get /models","href":"/api-reference/models/list-available-models"},{"title":"Retrieve a model","description":"Retrieves a single model by author and slug.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /models/{author}/{slug}","href":"/api-reference/models/retrieve-a-model"}]},{"group":"Chat","pages":[{"title":"Create a chat completion","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chat/completions","href":"/api-reference/chat/create-a-chat-completion"}]}]},{"group":"Account","icon":"credit-card","pages":[{"title":"Billing","description":null,"href":"/billing"},{"title":"Rate Limits","href":"/rate-limits"}]}]},{"language":"zh","navbar":{"links":[],"primary":{"type":"button","label":"控制台","href":"https://console.lithosai.cloud/?lang=zh"}},"pages":[{"title":"zh","href":"/zh/api-reference/chat/create-a-chat-completion"}]}]},"basePath":"","title":"Create a chat completion - LithosAI","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}