{
"id": "chatcmpl-01K5S8N4Q2VZ",
"object": "chat.completion",
"created": 1789286400,
"model": "deepseek-v4.1-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A distributed store can hold at most two of consistency, availability and partition tolerance at once. Because partitions do happen in practice, the real choice is between answering with stale data and not answering at all."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 47,
"total_tokens": 75
}
}
{
"id": "chatcmpl-01K5S8N4Q2VZ",
"object": "chat.completion",
"created": 1789286400,
"model": "deepseek-v4.1-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A distributed store can hold at most two of consistency, availability and partition tolerance at once. Because partitions do happen in practice, the real choice is between answering with stale data and not answering at all."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 47,
"total_tokens": 75
}
}
With stream: true the response is text/event-stream: one data: event per chunk,
terminated by data: [DONE]. The last data event carries usagewhether or not you
sent stream_options.include_usage — you never have to choose between streaming and
knowing what you were billed.If a stream fails partway, chunks already sent are not withdrawn. You get one more event
carrying an error object, then [DONE]. Treat a stream that ended without [DONE] as
incomplete.
The usage object is the number you are billed on, not an estimate of it. When a stream is
cancelled after the model has begun producing output, those tokens are still billed — see
Errors for the two codes where that happens.
Your own key for making a retry safe (up to 255 characters). It is accepted and echoed back today; de-duplication of replays arrives in a later release, so a retry is currently a second billable call.
Only used with model auto or auto-open: send the same value on every turn of one conversation and the platform keeps it on the same model where it can. Takes precedence over prompt_cache_key; without either, the conversation is recognised by how it began.
Which model answers the call. A bare slug for platform models (deepseek-v4.1-flash), or a full resource name for something your account owns (accounts/{account}/models/{model}, or a deployment). Never an upstream vendor's own name. auto (Prentis One) asks the platform to choose the model for each call; auto-open (Prentis One Open) chooses among open-weight models only, and on hard questions has three of them answer and keeps the best answer. auto:[,...] or auto-open:[,...] limits the choice to the models you list. auto-open sets each model's reasoning effort itself and ignores reasoning_effort, reasoning and thinking. Both are rolling out gradually; see Prentis One.
Return the answer as server-sent events as it is generated, instead of one response at the end. The last data event carries the usage numbers either way.
Your own identifier for the end user behind the call. It is echoed back in this request's log line so you can correlate the two; it is not kept on the usage record.
Only used with model auto or auto-open: a key that marks calls as one conversation, so the platform keeps them on the same model. It is not passed on to any provider.
Function definitions the model may call. If none of the providers that can serve this model support tools, the call is rejected rather than answered as though you had not asked.
Ask for the model's reasoning at this effort: minimal, low, medium, high, xhigh or max. A model that has fewer levels uses the nearest one at or below the one asked (minimal counts as low). Only models that reason accept it; the reasoning comes back in reasoning_content and its tokens are counted in completion_tokens. none is accepted, and changes nothing, on a model that does not reason; a model that reasons cannot promise to stop, so it refuses none. Ignored with model auto-open.
Ask for the model's reasoning. effort takes the same values as reasoning_effort, up to xhigh and max; an object without effort asks for medium. Only models that reason accept it. Ignored with model auto-open.
An older way to ask for reasoning, kept for clients that still send it. false leaves the reasoning out of the response, though the model still reasons and those tokens are still counted in completion_tokens; true asks for reasoning on a model whose reasoning can be switched on or set to a level, and changes nothing on any other model.
Only false is accepted.true returns INVALID_REQUEST.
Response
OK. With stream: true the same call answers text/event-stream instead, one chunk per event, terminated by data: [DONE]; the last data event carries usage whether or not you asked for it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prentis","description":"One inference API. An OpenAI client and an Anthropic client reach the same models.","colors":{"primary":"#c23f20","light":"#ff8560","dark":"#ff6a45"},"favicon":"https://mintcdn.com/prentis-ai/N5ENIat7Mkyl6KAd/favicon.svg?fit=max\u0026auto=format\u0026n=N5ENIat7Mkyl6KAd\u0026q=85\u0026s=b900f7aa935aac89600b2c81d72832a0","background":{"color":{"light":"#f7f7f8","dark":"#0b0b0d"}},"navbar":{"links":[{"href":"https://compute.prentis.ai","label":"Console"}],"primary":{"type":"button","label":"Get an API key","href":"https://compute.prentis.ai"}},"footer":{"socials":{}},"fonts":{"heading":{"family":"Archivo","weight":600},"body":{"family":"Archivo","weight":400}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"prentis-ai","hasAudioNarration":false,"actualSubdomain":"prentis-ai","customDomains":["docs.compute.prentis.ai"],"gitSource":{"type":"github","owner":"prentisai","repo":"maas","deployBranch":"main","contentDirectory":"maas-platform/docs-site","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6af42e06ec28eb92a90a0ace","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API reference","count":27},{"language":"default","tag":"Documentation","count":20},{"language":"default","tag":"Fine-tuning","count":12},{"language":"default","tag":"Datasets","count":7},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Platform","count":6},{"language":"default","tag":"Inference","count":5},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"Models","count":2},{"language":"default","tag":"Reference","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"rbac-expansion","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":"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":"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":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* latin-ext */\n@font-face {\n font-family: 'DM Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmmono/v16/aFTU7PB1QTsUX8KYthSQBLyM.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: 'DM Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmmono/v16/aFTU7PB1QTsUX8KYthqQBA.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/* latin-ext */\n@font-face {\n font-family: 'DM Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmmono/v16/aFTR7PB1QTsUX8KYvumzEY2tbZX9.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: 'DM Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmmono/v16/aFTR7PB1QTsUX8KYvumzEYOtbQ.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}\ncode,pre,kbd,samp,.font-mono,[class*=\"language-\"]{font-family:\"DM Mono\", ui-monospace, SFMono-Regular, Menlo, monospace!important}.nav-logo{display:inline-flex;align-items:center;gap:0.5rem;font-weight:600!important;letter-spacing:-0.03em}.nav-logo::before{content:\"\";flex:none;width:1.75rem;height:1.75rem;background:url(\"/logo/light.svg\") center / contain no-repeat}html.dark .nav-logo::before{background-image:url(\"/logo/dark.svg\")}"}],"page":{"pagePath":"api-reference/chat-completions","slug":"/api-reference/chat-completions","pageMetadata":{"title":"Chat completions","openapi":"openapi/prentis.openapi.yaml POST /chat/completions","description":"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.","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: \"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.\"\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`,strong:`strong`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`streaming`,children:`Streaming`}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`stream: true`}),` the response is `,_jsx(_components.code,{children:`text/event-stream`}),`: one `,_jsx(_components.code,{children:`data:`}),` event per chunk,\nterminated by `,_jsx(_components.code,{children:`data: [DONE]`}),`. The last data event carries `,_jsx(_components.code,{children:`usage`}),` `,_jsx(_components.strong,{children:`whether or not`}),` you\nsent `,_jsx(_components.code,{children:`stream_options.include_usage`}),` — you never have to choose between streaming and\nknowing what you were billed.`]}),`\n`,_jsxs(_components.p,{children:[`If a stream fails partway, chunks already sent are not withdrawn. You get one more event\ncarrying an error object, then `,_jsx(_components.code,{children:`[DONE]`}),`. Treat a stream that ended without `,_jsx(_components.code,{children:`[DONE]`}),` as\nincomplete.`]}),`\n`,_jsx(Heading,{level:`2`,id:`token-accounting`,children:`Token accounting`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`usage`}),` object is the number you are billed on, not an estimate of it. When a stream is\ncancelled after the model has begun producing output, those tokens are still billed — see\n`,_jsx(_components.a,{href:`/errors`,children:`Errors`}),` for the two codes where that happens.`]})]})}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","openapi":"openapi/prentis.openapi.yaml POST /chat/completions","description":"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.","href":"/api-reference/chat-completions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Streaming","slug":"streaming","depth":2,"children":[]},{"title":"Token accounting","slug":"token-accounting","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["chat"],"operationId":"createChatCompletion","summary":"Create a chat completion","parameters":["e7f943e8-38df-488e-8cf4-b760aeefcc79","e707ad56-80c1-4ba4-aaf1-e3dd12e133c6"],"requestBody":"f346069e-7939-4232-a682-2b14ba38d1b5","responses":{"200":"30c7d371-5903-42e3-bb4a-fbfb89113b72","400":"83006416-3c41-41f2-944c-3a5688882914","401":"768e4725-7874-4ac1-b60c-cfd12f49358d","402":"5023a68e-eadb-4056-acc5-f6a58cc80418","403":"a69a03a7-40ff-4868-832d-dd9b199bc184","404":"5b4e5c54-05f9-4155-aae6-daefcac9bc3e","409":"1bf0eb06-3833-4049-8322-9957c6cc0765","413":"68bc5d99-d02c-4a0c-a0d9-813d8834a113","429":"52c04f7c-c863-41f0-bfc0-419b145ca147","500":"fb79938f-dc70-4d93-8dcd-993847509ba8","503":"c89281ca-2f45-487d-967b-98160102d8d7","504":"966321bb-3439-4010-ae2e-eec8de284e14"},"description":"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.","x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl https://compute.prentis.ai/v1/chat/completions \\\n -H \"Authorization: Bearer $PRENTIS_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"deepseek-v4.1-flash\",\n \"messages\": [\n {\"role\": \"system\", \"content\": \"You are a concise assistant.\"},\n {\"role\": \"user\", \"content\": \"Summarise the CAP theorem in two sentences.\"}\n ],\n \"max_tokens\": 200,\n \"temperature\": 0.7\n }'"},{"lang":"python","label":"Python","source":"import os\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"https://compute.prentis.ai/v1\", api_key=os.environ[\"PRENTIS_API_KEY\"])\n\nresp = client.chat.completions.create(\n model=\"deepseek-v4.1-flash\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a concise assistant.\"},\n {\"role\": \"user\", \"content\": \"Summarise the CAP theorem in two sentences.\"},\n ],\n max_tokens=200,\n temperature=0.7,\n)\nprint(resp.choices[0].message.content)\nprint(resp.usage.total_tokens, \"tokens billed\")"},{"lang":"typescript","label":"TypeScript","source":"import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n baseURL: \"https://compute.prentis.ai/v1\",\n apiKey: process.env.PRENTIS_API_KEY,\n});\n\nconst resp = await client.chat.completions.create({\n model: \"deepseek-v4.1-flash\",\n messages: [\n { role: \"system\", content: \"You are a concise assistant.\" },\n { role: \"user\", content: \"Summarise the CAP theorem in two sentences.\" },\n ],\n max_tokens: 200,\n temperature: 0.7,\n});\nconsole.log(resp.choices[0]?.message.content);"}],"method":"post","type":"path","servers":["a3022ce8-f932-4252-8316-d669cc78c26f"],"security":["ec9bf384-669f-490d-b83a-1407651fbe50"],"path":"/chat/completions","baseUrlOptions":["https://compute.prentis.ai/v1"],"title":"Create a chat completion","codeSamples":[{"label":"cURL","lang":"curl","source":"curl https://compute.prentis.ai/v1/chat/completions \\\n -H \"Authorization: Bearer $PRENTIS_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"deepseek-v4.1-flash\",\n \"messages\": [\n {\"role\": \"system\", \"content\": \"You are a concise assistant.\"},\n {\"role\": \"user\", \"content\": \"Summarise the CAP theorem in two sentences.\"}\n ],\n \"max_tokens\": 200,\n \"temperature\": 0.7\n }'"},{"label":"Python","lang":"python","source":"import os\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"https://compute.prentis.ai/v1\", api_key=os.environ[\"PRENTIS_API_KEY\"])\n\nresp = client.chat.completions.create(\n model=\"deepseek-v4.1-flash\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a concise assistant.\"},\n {\"role\": \"user\", \"content\": \"Summarise the CAP theorem in two sentences.\"},\n ],\n max_tokens=200,\n temperature=0.7,\n)\nprint(resp.choices[0].message.content)\nprint(resp.usage.total_tokens, \"tokens billed\")"},{"label":"TypeScript","lang":"typescript","source":"import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n baseURL: \"https://compute.prentis.ai/v1\",\n apiKey: process.env.PRENTIS_API_KEY,\n});\n\nconst resp = await client.chat.completions.create({\n model: \"deepseek-v4.1-flash\",\n messages: [\n { role: \"system\", content: \"You are a concise assistant.\" },\n { role: \"user\", content: \"Summarise the CAP theorem in two sentences.\" },\n ],\n max_tokens: 200,\n temperature: 0.7,\n});\nconsole.log(resp.choices[0]?.message.content);"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"e7f943e8-38df-488e-8cf4-b760aeefcc79":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255,"isRequired":false,"description":"Your own key for making a retry safe (up to 255 characters). It is accepted and echoed back today; de-duplication of replays arrives in a later release, so a retry is currently a second billable call.","uniqueKey":"","typeLabel":"string"},"description":"Your own key for making a retry safe (up to 255 characters). It is accepted and echoed back today; de-duplication of replays arrives in a later release, so a retry is currently a second billable call."},"e707ad56-80c1-4ba4-aaf1-e3dd12e133c6":{"name":"x-session-affinity","in":"header","required":false,"schema":{"type":"string","maxLength":256,"isRequired":false,"description":"Only used with model auto or auto-open: send the same value on every turn of one conversation and the platform keeps it on the same model where it can. Takes precedence over prompt_cache_key; without either, the conversation is recognised by how it began.","uniqueKey":"","typeLabel":"string"},"description":"Only used with model auto or auto-open: send the same value on every turn of one conversation and the platform keeps it on the same model where it can. Takes precedence over prompt_cache_key; without either, the conversation is recognised by how it began."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"additionalProperties":true,"properties":{"model":{"type":"string","maxLength":256,"description":"Which model answers the call. A bare slug for platform models (deepseek-v4.1-flash), or a full resource name for something your account owns (accounts/{account}/models/{model}, or a deployment). Never an upstream vendor's own name. auto (Prentis One) asks the platform to choose the model for each call; auto-open (Prentis One Open) chooses among open-weight models only, and on hard questions has three of them answer and keeps the best answer. auto:\u003cmodel>[,\u003cmodel>...] or auto-open:\u003cmodel>[,\u003cmodel>...] limits the choice to the models you list. auto-open sets each model's reasoning effort itself and ignores reasoning_effort, reasoning and thinking. Both are rolling out gradually; see Prentis One.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"],"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","items":{"oneOf":[{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","const":"text","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"string"},"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type","image_url"],"properties":{"type":{"type":"string","const":"image_url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","default","low","high"],"default":"auto","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"},"max_long_side_pixel":{"type":"integer","minimum":1,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.max_long_side_pixel","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["type","video_url"],"properties":{"type":{"type":"string","const":"video_url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"string"},"video_url":{"type":"object","required":["url"],"additionalProperties":false,"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["low","default","high"],"default":"default","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.detail","typeLabel":"enum\u003cstring>"},"fps":{"type":"number","exclusiveMinimum":0,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.fps","typeLabel":"number"},"sample_fps":{"type":"number","exclusiveMinimum":0,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.sample_fps","typeLabel":"number"},"max_frames":{"type":"integer","minimum":1,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.max_frames","typeLabel":"integer"},"spatial_limit":{"type":"integer","minimum":1,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.spatial_limit","typeLabel":"integer"},"max_long_side_pixel":{"type":"integer","minimum":1,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.max_long_side_pixel","typeLabel":"integer"},"processing":{"type":"object","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url.processing","typeLabel":"object"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_url","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"**Not supported.** Sending it returns `INVALID_REQUEST`.","required":["type","input_audio"],"properties":{"type":{"type":"string","const":"input_audio","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.type","typeLabel":"string"},"input_audio":{"type":"object","properties":{"data":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio.data","typeLabel":"string"},"url":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio.url","typeLabel":"string"},"format":{"type":"string","enum":["wav","mp3","flac","ogg","webm"],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio.format","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"object[]"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | object[] | null"},"name":{"type":"string","uniqueKey":"messages.items.[INDEX].name","typeLabel":"string"},"tool_calls":{"type":"array","items":{"type":"object","required":["id","type","function"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"object[]"},"tool_call_id":{"type":"string","uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"description":"The conversation so far, oldest first. Each turn carries a role (system, user, assistant or tool) and its content.","isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"stream":{"type":"boolean","default":false,"description":"Return the answer as server-sent events as it is generated, instead of one response at the end. The last data event carries the usage numbers either way.","uniqueKey":"stream","typeLabel":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean","default":false,"uniqueKey":"stream_options.include_usage","typeLabel":"boolean"}},"description":"Streaming options. include_usage is accepted for compatibility; usage arrives on the final event whether or not you ask for it.","uniqueKey":"stream_options","typeLabel":"object"},"max_tokens":{"type":"integer","minimum":1,"description":"Ceiling on how many tokens may be generated. Omit it to use the model's own default.","uniqueKey":"max_tokens","typeLabel":"integer"},"max_completion_tokens":{"type":"integer","minimum":1,"description":"Ceiling on generated tokens. Wins over max_tokens when both are sent.","uniqueKey":"max_completion_tokens","typeLabel":"integer"},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"How much randomness to allow when picking each token. Lower is more repeatable, higher is more varied.","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"Nucleus sampling: only consider the most likely tokens up to this share of the probability mass. Tune this or temperature, not both.","uniqueKey":"top_p","typeLabel":"number"},"stop":{"oneOf":[{"type":"string","description":"Up to 4 strings that end generation as soon as the model produces one. The matched string is not included in the output.","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Up to 4 strings that end generation as soon as the model produces one. The matched string is not included in the output.","maxItems":4,"uniqueKey":"stop.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"stop","typeLabel":"string | string[]"},"seed":{"type":"integer","description":"Best effort repeatability: the same seed with the same parameters returns the same answer on models that support it.","uniqueKey":"seed","typeLabel":"integer"},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2,"default":0,"description":"Pushes the model away from tokens it has already used often in this answer. Negative values do the opposite.","uniqueKey":"frequency_penalty","typeLabel":"number"},"presence_penalty":{"type":"number","minimum":-2,"maximum":2,"default":0,"description":"Pushes the model away from tokens that have appeared at all in this answer, which tends to move it on to new ground.","uniqueKey":"presence_penalty","typeLabel":"number"},"user":{"type":"string","maxLength":256,"description":"Your own identifier for the end user behind the call. It is echoed back in this request's log line so you can correlate the two; it is not kept on the usage record.","uniqueKey":"user","typeLabel":"string"},"prompt_cache_key":{"type":"string","maxLength":256,"description":"Only used with model auto or auto-open: a key that marks calls as one conversation, so the platform keeps them on the same model. It is not passed on to any provider.","uniqueKey":"prompt_cache_key","typeLabel":"string"},"tools":{"type":"array","items":{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tools.items.[INDEX].function.name","typeLabel":"string"},"parameters":{"type":"object","uniqueKey":"tools.items.[INDEX].function.parameters","typeLabel":"object"},"strict":{"type":"boolean","uniqueKey":"tools.items.[INDEX].function.strict","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"tools.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"description":"Function definitions the model may call. If none of the providers that can serve this model support tools, the call is rejected rather than answered as though you had not asked.","uniqueKey":"tools","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","description":"Whether the model may, must, or must not call a tool: none, auto, required, or one named function.","enum":["none","auto","required"],"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Whether the model may, must, or must not call a tool: none, auto, required, or one named function.","properties":{"type":{"type":"string","enum":["function"],"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","required":["name"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object"},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"],"uniqueKey":"response_format.type","typeLabel":"enum\u003cstring>"},"json_schema":{"type":"object","uniqueKey":"response_format.json_schema","typeLabel":"object"}},"description":"Ask for free text, a JSON object, or JSON matching a schema. Rejected if no provider behind this model can honour it.","uniqueKey":"response_format","typeLabel":"object"},"service_tier":{"type":"string","enum":["standard","priority","fast"],"default":"standard","description":"Which service tier serves the call. Only standard is accepted today.","uniqueKey":"service_tier","typeLabel":"enum\u003cstring>"},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"description":"Ask for the model's reasoning at this effort: minimal, low, medium, high, xhigh or max. A model that has fewer levels uses the nearest one at or below the one asked (minimal counts as low). Only models that reason accept it; the reasoning comes back in reasoning_content and its tokens are counted in completion_tokens. none is accepted, and changes nothing, on a model that does not reason; a model that reasons cannot promise to stop, so it refuses none. Ignored with model auto-open.","uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring>"},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"uniqueKey":"reasoning.effort","typeLabel":"enum\u003cstring>"},"enabled":{"type":"boolean","uniqueKey":"reasoning.enabled","typeLabel":"boolean"},"exclude":{"type":"boolean","uniqueKey":"reasoning.exclude","typeLabel":"boolean"},"max_tokens":{"type":"integer","description":"**Not supported.** Sending it returns `INVALID_REQUEST`.","uniqueKey":"reasoning.max_tokens","typeLabel":"integer"}},"description":"Ask for the model's reasoning. effort takes the same values as reasoning_effort, up to xhigh and max; an object without effort asks for medium. Only models that reason accept it. Ignored with model auto-open.","uniqueKey":"reasoning","typeLabel":"object"},"include_reasoning":{"type":"boolean","description":"An older way to ask for reasoning, kept for clients that still send it. false leaves the reasoning out of the response, though the model still reasons and those tokens are still counted in completion_tokens; true asks for reasoning on a model whose reasoning can be switched on or set to a level, and changes nothing on any other model.","uniqueKey":"include_reasoning","typeLabel":"boolean"},"n":{"type":"integer","const":1,"description":"How many completions to return.\n\n**Only `1` is accepted.** Any other value returns `INVALID_REQUEST`.","uniqueKey":"n","typeLabel":"integer"},"logprobs":{"type":"boolean","const":false,"description":"Per-token log probabilities.\n\n**Only `false` is accepted.** `true` returns `INVALID_REQUEST`.","uniqueKey":"logprobs","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","messages":[{"content":"\u003cstring>","name":"\u003cstring>","tool_calls":[{"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}],"tool_call_id":"\u003cstring>"}],"stream":false,"stream_options":{"include_usage":false},"max_tokens":2,"max_completion_tokens":2,"temperature":1,"top_p":1,"stop":"\u003cstring>","seed":123,"frequency_penalty":0,"presence_penalty":0,"user":"\u003cstring>","prompt_cache_key":"\u003cstring>","tools":[{"type":"function","function":{"name":"\u003cstring>","parameters":{},"strict":true}}],"response_format":{"json_schema":{}},"service_tier":"standard","reasoning":{"enabled":true,"exclude":true,"max_tokens":123},"include_reasoning":true,"n":1,"logprobs":false}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"30c7d371-5903-42e3-bb4a-fbfb89113b72":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."},"x-ratelimit-limit-requests":{"schema":{"type":"integer","minimum":0}},"x-ratelimit-remaining-requests":{"schema":{"type":"integer","minimum":0}},"x-ratelimit-limit-tokens":{"schema":{"type":"integer","minimum":0}},"x-ratelimit-remaining-tokens":{"schema":{"type":"integer","minimum":0}},"x-provider-class":{"schema":{"type":"string","enum":["primary","fallback"]},"description":"primary or fallback: whether your call was served by the first choice or a standby. It never names who served it."},"x-router-trace-id":{"schema":{"type":"string"},"description":"Only when you called model auto or auto-open: the id of the choice the platform made for this call. Quote it together with x-request-id when you ask us why a call went where it did."},"x-config-version":{"schema":{"type":"string"},"description":"Which version of the routing configuration was in effect for this call. Useful only when comparing two calls that behaved differently."}},"content":{"application/json":{"schema":{"type":"object","required":["id","object","created","model","choices","usage"],"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","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","required":["index","message","finish_reason"],"properties":{"index":{"type":"integer","const":0,"isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["assistant"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"enum\u003cstring>"},"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":{"type":"string","uniqueKey":"choices.items.[INDEX].message.reasoning_content","typeLabel":"string"},"tool_calls":{"type":"array","items":{"type":"object","required":["id","type","function"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"object[]"}},"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"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"},"cache_write_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.prompt_tokens_details.cache_write_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.completion_tokens_details.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.completion_tokens_details","typeLabel":"object"},"media":{"type":"object","properties":{"input_images":{"type":"integer","minimum":0,"uniqueKey":"usage.media.input_images","typeLabel":"integer"},"input_video_seconds":{"type":"number","minimum":0,"uniqueKey":"usage.media.input_video_seconds","typeLabel":"number"},"input_audio_seconds":{"type":"number","minimum":0,"uniqueKey":"usage.media.input_audio_seconds","typeLabel":"number"},"output_images":{"type":"integer","minimum":0,"uniqueKey":"usage.media.output_images","typeLabel":"integer"},"output_video_seconds":{"type":"number","minimum":0,"uniqueKey":"usage.media.output_video_seconds","typeLabel":"number"},"output_audio_seconds":{"type":"number","minimum":0,"uniqueKey":"usage.media.output_audio_seconds","typeLabel":"number"}},"uniqueKey":"usage.media","typeLabel":"object"}},"isRequired":true,"uniqueKey":"usage","typeLabel":"object"},"system_fingerprint":{"type":"string","uniqueKey":"system_fingerprint","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":"chatcmpl-01K5S8N4Q2VZ","object":"chat.completion","created":1789286400,"model":"deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"A distributed store can hold at most two of consistency, availability and partition tolerance at once. Because partitions do happen in practice, the real choice is between answering with stale data and not answering at all."},"finish_reason":"stop"}],"usage":{"prompt_tokens":28,"completion_tokens":47,"total_tokens":75}},"examples":{"Example":{"title":"Example","value":{"id":"chatcmpl-01K5S8N4Q2VZ","object":"chat.completion","created":1789286400,"model":"deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"A distributed store can hold at most two of consistency, availability and partition tolerance at once. Because partitions do happen in practice, the real choice is between answering with stale data and not answering at all."},"finish_reason":"stop"}],"usage":{"prompt_tokens":28,"completion_tokens":47,"total_tokens":75}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"type":"string","uniqueKey":"","typeLabel":"string"},"example":"data: {\"id\":\"chatcmpl-01K5S8N4Q2VZ\",\"object\":\"chat.completion.chunk\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"A distributed\"}}]}\n\ndata: {\"id\":\"chatcmpl-01K5S8N4Q2VZ\",\"object\":\"chat.completion.chunk\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" store can hold\"}}]}\n\ndata: {\"id\":\"chatcmpl-01K5S8N4Q2VZ\",\"object\":\"chat.completion.chunk\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":28,\"completion_tokens\":47,\"total_tokens\":75}}\n\ndata: [DONE]","examples":{"Example":{"title":"Example","value":"data: {\"id\":\"chatcmpl-01K5S8N4Q2VZ\",\"object\":\"chat.completion.chunk\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"A distributed\"}}]}\n\ndata: {\"id\":\"chatcmpl-01K5S8N4Q2VZ\",\"object\":\"chat.completion.chunk\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" store can hold\"}}]}\n\ndata: {\"id\":\"chatcmpl-01K5S8N4Q2VZ\",\"object\":\"chat.completion.chunk\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":28,\"completion_tokens\":47,\"total_tokens\":75}}\n\ndata: [DONE]"}},"exampleType":"examples"}},"description":"OK. With `stream: true` the same call answers `text/event-stream` instead, one chunk per event, terminated by `data: [DONE]`; the last data event carries `usage` whether or not you asked for it.","exampleType":"examples"},"83006416-3c41-41f2-944c-3a5688882914":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `CONTENT_BLOCKED_INPUT`, `CONTENT_BLOCKED_OUTPUT`, `CONTEXT_LENGTH_EXCEEDED`, `INVALID_REQUEST`, `MEDIA_FETCH_FAILED`, `MEDIA_UNSUPPORTED`, `MODEL_CAPABILITY_UNSUPPORTED`, `UPSTREAM_CONTENT_REJECTED`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"768e4725-7874-4ac1-b60c-cfd12f49358d":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `INVALID_API_KEY`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"5023a68e-eadb-4056-acc5-f6a58cc80418":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `INSUFFICIENT_BALANCE`, `PAYMENT_REQUIRED`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"a69a03a7-40ff-4868-832d-dd9b199bc184":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `AGREEMENT_REQUIRED`, `MODEL_NOT_ALLOWED`, `OPERATION_NOT_ALLOWED`, `TENANT_SUSPENDED`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"5b4e5c54-05f9-4155-aae6-daefcac9bc3e":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `MODEL_NOT_FOUND`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"1bf0eb06-3833-4049-8322-9957c6cc0765":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `IDEMPOTENCY_CONFLICT`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"68bc5d99-d02c-4a0c-a0d9-813d8834a113":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `MEDIA_TOO_LARGE`, `REQUEST_TOO_LARGE`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"52c04f7c-c863-41f0-bfc0-419b145ca147":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."},"Retry-After":{"schema":{"type":"integer","minimum":0},"description":"How many seconds to wait before retrying, on the responses that set it."},"x-ratelimit-limit-requests":{"schema":{"type":"integer","minimum":0}},"x-ratelimit-remaining-requests":{"schema":{"type":"integer","minimum":0}},"x-ratelimit-limit-tokens":{"schema":{"type":"integer","minimum":0}},"x-ratelimit-remaining-tokens":{"schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `TENANT_BUDGET_EXCEEDED`, `TENANT_RATE_LIMITED`, `UPSTREAM_RATE_LIMITED`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"fb79938f-dc70-4d93-8dcd-993847509ba8":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `INTERNAL`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"c89281ca-2f45-487d-967b-98160102d8d7":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."},"Retry-After":{"schema":{"type":"integer","minimum":0},"description":"How many seconds to wait before retrying, on the responses that set it."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `DEPLOYMENT_SCALING_UP`, `STORAGE_UNAVAILABLE`, `UPSTREAM_UNAVAILABLE`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"},"966321bb-3439-4010-ae2e-eec8de284e14":{"headers":{"x-request-id":{"schema":{"type":"string"},"required":true,"description":"On every response, successes and errors alike. It is the handle that reaches the whole path your request took -- quote it when you ask us anything about a call."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","server_error","service_unavailable","billing_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_API_KEY","TENANT_SUSPENDED","MODEL_NOT_ALLOWED","OPERATION_NOT_ALLOWED","AGREEMENT_REQUIRED","INVALID_REQUEST","MODEL_NOT_FOUND","MODEL_CAPABILITY_UNSUPPORTED","CONTEXT_LENGTH_EXCEEDED","REQUEST_TOO_LARGE","IDEMPOTENCY_CONFLICT","MEDIA_TOO_LARGE","MEDIA_FETCH_FAILED","MEDIA_UNSUPPORTED","TENANT_RATE_LIMITED","TENANT_BUDGET_EXCEEDED","INSUFFICIENT_BALANCE","PAYMENT_REQUIRED","CONTENT_BLOCKED_INPUT","CONTENT_BLOCKED_OUTPUT","UPSTREAM_RATE_LIMITED","UPSTREAM_UNAVAILABLE","UPSTREAM_TIMEOUT","PARTIAL_RESPONSE_TIMEOUT","UPSTREAM_CONTENT_REJECTED","DEPLOYMENT_SCALING_UP","REQUEST_CANCELLED","REQUEST_DEADLINE_EXCEEDED","INTERNAL","STORAGE_UNAVAILABLE"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","code":"INVALID_API_KEY","param":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"`error.code` is one of: `PARTIAL_RESPONSE_TIMEOUT`, `REQUEST_DEADLINE_EXCEEDED`, `UPSTREAM_TIMEOUT`. See the Errors page for what each one means, whether it is safe to retry, and whether it is billed.","exampleType":"generated"}},"security":{"ec9bf384-669f-490d-b83a-1407651fbe50":{"bearerAuth":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer \u003cyour API key>`. On `/v1/messages`, the Anthropic-style `x-api-key: \u003cyour API key>` header is accepted instead.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"a3022ce8-f932-4252-8316-d669cc78c26f":{"url":"https://compute.prentis.ai/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer \u003cyour API key>`. On `/v1/messages`, the Anthropic-style `x-api-key: \u003cyour API key>` header is accepted instead.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"`Authorization: Bearer \u003cyour API key>`. On `/v1/messages`, the Anthropic-style `x-api-key: \u003cyour API key>` header is accepted instead.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi/prentis.openapi.yaml"},"subdomain":"prentis-ai","siteName":"Prentis","title":"Chat completions - Prentis","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-22T06:01:51.491Z","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=\"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prentis\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_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/prentis-ai/Z7SKdd5Lmipoo44k/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat completions - Prentis\">\u003cmeta data-mint-head property=\"og:description\" content=\"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prentis\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.compute.prentis.ai/api-reference/chat-completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://prentis-ai.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Chat+completions\u0026amp;description=OpenAI-compatible+chat+completion.+Point+any+OpenAI+SDK+at+this+base+URL+with+a+Prentis+key+and+nothing+else+in+your+code+changes.\u0026amp;theme=8d4bc0888e4ddbbd2b1e51c1\u0026amp;signature=9166c59748635a20afb2b46c5947ec3a9018a688d00a071b04651db4635983fd\">\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 - Prentis\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://prentis-ai.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Chat+completions\u0026amp;description=OpenAI-compatible+chat+completion.+Point+any+OpenAI+SDK+at+this+base+URL+with+a+Prentis+key+and+nothing+else+in+your+code+changes.\u0026amp;theme=8d4bc0888e4ddbbd2b1e51c1\u0026amp;signature=9166c59748635a20afb2b46c5947ec3a9018a688d00a071b04651db4635983fd\">\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/prentis-ai/Z7SKdd5Lmipoo44k/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prentis\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#c23f20\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.compute.prentis.ai/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.compute.prentis.ai/#organization\",\"name\":\"Prentis\",\"url\":\"https://docs.compute.prentis.ai\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.compute.prentis.ai#website\",\"name\":\"Prentis\",\"url\":\"https://docs.compute.prentis.ai\",\"publisher\":{\"@id\":\"https://docs.compute.prentis.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.compute.prentis.ai/api-reference/chat-completions#webpage\",\"url\":\"https://docs.compute.prentis.ai/api-reference/chat-completions\",\"name\":\"Chat completions\",\"description\":\"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.\",\"dateModified\":\"2026-09-22T06:01:51.491Z\",\"isPartOf\":{\"@id\":\"https://docs.compute.prentis.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.compute.prentis.ai/api-reference/chat-completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.compute.prentis.ai/api-reference/chat-completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prentis\",\"item\":\"https://docs.compute.prentis.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat completions\",\"item\":\"https://docs.compute.prentis.ai/api-reference/chat-completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.compute.prentis.ai/api-reference/chat-completions#apireference\",\"headline\":\"Chat completions\",\"name\":\"Chat completions\",\"description\":\"OpenAI-compatible chat completion. Point any OpenAI SDK at this base URL with a Prentis key and nothing else in your code changes.\",\"url\":\"https://docs.compute.prentis.ai/api-reference/chat-completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.compute.prentis.ai/api-reference/chat-completions#webpage\"},\"dateModified\":\"2026-09-22T06:01:51.491Z\",\"publisher\":{\"@id\":\"https://docs.compute.prentis.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.compute.prentis.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prentis\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Prentis\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/chat-completions.md","siteName":"Prentis","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference","description":"Base URL, authentication, the headers on every response, and what is on this tab.","href":"/api-reference/introduction"}]},{"group":"Inference","pages":[{"title":"Chat completions","openapi":"openapi/prentis.openapi.yaml POST /chat/completions","href":"/api-reference/chat-completions"},{"title":"Completions","openapi":"openapi/prentis.openapi.yaml POST /completions","description":"Legacy text completion, for prompts that are not a conversation. Only models that declare the text-completion capability accept it; the rest return MODEL_CAPABILITY_UNSUPPORTED.","href":"/api-reference/completions"},{"title":"Messages","openapi":"openapi/prentis.openapi.yaml POST /messages","href":"/api-reference/messages"},{"title":"Responses","openapi":"openapi/prentis.openapi.yaml POST /responses","href":"/api-reference/responses"},{"title":"Audio transcriptions","openapi":"openapi/prentis.openapi.yaml POST /audio/transcriptions","href":"/api-reference/audio-transcriptions"}]},{"group":"Models","pages":[{"title":"List models","openapi":"openapi/prentis.openapi.yaml GET /models","href":"/api-reference/list-models"},{"title":"Get model","openapi":"openapi/prentis.openapi.yaml GET /models/{model}","href":"/api-reference/get-model"}]},{"group":"Fine-tuning","pages":[{"title":"Create a supervised fine-tuning job","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/supervisedFineTuningJobs","href":"/api-reference/create-supervised-fine-tuning-job"},{"title":"Estimate a supervised fine-tuning job","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/supervisedFineTuningJobs:estimateCost","href":"/api-reference/estimate-supervised-fine-tuning-job-cost"},{"title":"List supervised fine-tuning jobs","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/supervisedFineTuningJobs","href":"/api-reference/list-supervised-fine-tuning-jobs"},{"title":"Get a supervised fine-tuning job","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/supervisedFineTuningJobs/{job}","href":"/api-reference/get-supervised-fine-tuning-job"},{"title":"Get a job's training curve","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/supervisedFineTuningJobs/{job}/metrics","href":"/api-reference/get-supervised-fine-tuning-job-metrics"},{"title":"Cancel a supervised fine-tuning job","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/supervisedFineTuningJobs/{job}:cancel","href":"/api-reference/cancel-supervised-fine-tuning-job"},{"title":"Create a preference (DPO) job","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/dpoJobs","href":"/api-reference/create-dpo-job"},{"title":"Estimate a preference (DPO) job","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/dpoJobs:estimateCost","href":"/api-reference/estimate-dpo-job-cost"},{"title":"List preference (DPO) jobs","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/dpoJobs","href":"/api-reference/list-dpo-jobs"},{"title":"Get a preference (DPO) job","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/dpoJobs/{job}","href":"/api-reference/get-dpo-job"},{"title":"Get a preference job's training curve","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/dpoJobs/{job}/metrics","href":"/api-reference/get-dpo-job-metrics"},{"title":"Cancel a preference (DPO) job","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/dpoJobs/{job}:cancel","href":"/api-reference/cancel-dpo-job"}]},{"group":"Datasets","pages":[{"title":"Create a dataset","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/datasets","href":"/api-reference/create-dataset"},{"title":"Get an upload URL","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/datasets/{dataset}:getUploadEndpoint","href":"/api-reference/get-dataset-upload-endpoint"},{"title":"Validate an upload","openapi":"openapi/prentis-training.openapi.yaml POST /accounts/{account}/datasets/{dataset}:validateUpload","href":"/api-reference/validate-dataset-upload"},{"title":"Get a dataset","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/datasets/{dataset}","href":"/api-reference/get-dataset"},{"title":"List datasets","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/datasets","href":"/api-reference/list-datasets"},{"title":"List dataset versions","openapi":"openapi/prentis-training.openapi.yaml GET /accounts/{account}/datasets/{dataset}/versions","href":"/api-reference/list-dataset-versions"},{"title":"Delete a dataset","openapi":"openapi/prentis-training.openapi.yaml DELETE /accounts/{account}/datasets/{dataset}","href":"/api-reference/delete-dataset"}]}]}]},"basePath":"","title":"Chat completions - Prentis","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}