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.
Only models that declare the text-completion capability. Everything else returns
MODEL_CAPABILITY_UNSUPPORTED, because answering a raw-prompt request on a model shaped
for conversation produces output that looks fine and is not what you asked for.Most models here are chat models. If you are starting something new, use
chat completions — this endpoint exists so that code
written against the older shape keeps working.
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.
Text that should follow the completion (fill-in-the-middle).
Not supported. Sending it 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/completions","slug":"/api-reference/completions","pageMetadata":{"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"},"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: \"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.\"\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`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`which-models-accept-this`,children:`Which models accept this`}),`\n`,_jsxs(_components.p,{children:[`Only models that declare the text-completion capability. Everything else returns\n`,_jsx(_components.code,{children:`MODEL_CAPABILITY_UNSUPPORTED`}),`, because answering a raw-prompt request on a model shaped\nfor conversation produces output that looks fine and is not what you asked for.`]}),`\n`,_jsxs(_components.p,{children:[`Most models here are chat models. If you are starting something new, use\n`,_jsx(_components.a,{href:`/api-reference/chat-completions`,children:`chat completions`}),` — this endpoint exists so that code\nwritten against the older shape keeps working.`]}),`\n`,_jsx(Heading,{level:`2`,id:`one-prompt-per-call`,children:`One prompt per call`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`prompt`}),` takes a string, or an array holding exactly one string. Several prompts in one\ncall are rejected rather than partly answered.`]})]})}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":"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"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Which models accept this","slug":"which-models-accept-this","depth":2,"children":[]},{"title":"One prompt per call","slug":"one-prompt-per-call","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["completions"],"operationId":"createCompletion","summary":"Create a completion","parameters":["a9588d0f-891a-481e-8157-c236e8cec521","214f2d4c-3ba8-46d4-9b53-4a7ba55397a6"],"requestBody":"02b18cc5-02d9-473e-a74f-e6b24d6054a9","responses":{"200":"70d3b8dd-db53-4486-a0ed-113182cffb2b","400":"3bed988b-a0a7-4f95-88fc-499a08c0e67d","401":"babdd9dd-2ac6-478b-b2e6-94d8404f4c7a","402":"d35905f2-fa0d-4e32-beb8-9d3909803271","403":"5db4b64e-9d92-4ac0-9168-7a79a943c171","404":"950ebe92-79c5-4196-b6fc-6b99d5c0c6e8","413":"6e067a9d-8d6f-4fd5-a465-3fea18eca590","429":"8fe3ffa2-66ec-4af9-b39c-b49b2425503c","500":"c37f4cda-c13c-47ff-a645-92bd4b9a4efa","503":"bd04df72-5bdd-4304-89b6-591b4628962e","504":"e4a3d11e-d24e-418b-98d4-3e73db114eb8"},"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.","x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl https://compute.prentis.ai/v1/completions \\\n -H \"Authorization: Bearer $PRENTIS_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"deepseek-v4.1-flash\",\n \"prompt\": \"def fibonacci(n):\",\n \"max_tokens\": 128,\n \"stop\": [\"\\n\\n\"]\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.completions.create(\n model=\"deepseek-v4.1-flash\",\n prompt=\"def fibonacci(n):\",\n max_tokens=128,\n stop=[\"\\n\\n\"],\n)\nprint(resp.choices[0].text)"}],"method":"post","type":"path","servers":["a3022ce8-f932-4252-8316-d669cc78c26f"],"security":["ec9bf384-669f-490d-b83a-1407651fbe50"],"path":"/completions","baseUrlOptions":["https://compute.prentis.ai/v1"],"title":"Create a completion","codeSamples":[{"label":"cURL","lang":"curl","source":"curl https://compute.prentis.ai/v1/completions \\\n -H \"Authorization: Bearer $PRENTIS_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"deepseek-v4.1-flash\",\n \"prompt\": \"def fibonacci(n):\",\n \"max_tokens\": 128,\n \"stop\": [\"\\n\\n\"]\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.completions.create(\n model=\"deepseek-v4.1-flash\",\n prompt=\"def fibonacci(n):\",\n max_tokens=128,\n stop=[\"\\n\\n\"],\n)\nprint(resp.choices[0].text)"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"a9588d0f-891a-481e-8157-c236e8cec521":{"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."},"214f2d4c-3ba8-46d4-9b53-4a7ba55397a6":{"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","prompt"],"properties":{"model":{"type":"string","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"},"prompt":{"oneOf":[{"type":"string","description":"The text to continue. A string, or an array holding exactly one string -- several prompts in one call are rejected rather than partly answered.","isRequired":true,"uniqueKey":"prompt.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"prompt.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"The text to continue. A string, or an array holding exactly one string -- several prompts in one call are rejected rather than partly answered.","maxItems":1,"minItems":1,"isRequired":true,"uniqueKey":"prompt.oneOf.1","typeLabel":"string[]"}],"isRequired":true,"uniqueKey":"prompt","typeLabel":"string | string[]"},"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","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"},"temperature":{"type":"number","minimum":0,"maximum":2,"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,"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,"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,"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","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"},"n":{"type":"integer","description":"How many completions to return.\n\n**Not supported.** Sending it returns `INVALID_REQUEST`.","uniqueKey":"n","typeLabel":"integer"},"best_of":{"type":"integer","description":"Sample several completions server-side and return the best one.\n\n**Not supported.** Sending it returns `INVALID_REQUEST`.","uniqueKey":"best_of","typeLabel":"integer"},"logprobs":{"type":"integer","description":"Per-token log probabilities.\n\n**Not supported.** Sending it returns `INVALID_REQUEST`.","uniqueKey":"logprobs","typeLabel":"integer"},"echo":{"type":"boolean","description":"Repeat the prompt back at the start of the completion.\n\n**Not supported.** Sending it returns `INVALID_REQUEST`.","uniqueKey":"echo","typeLabel":"boolean"},"suffix":{"type":"string","description":"Text that should follow the completion (fill-in-the-middle).\n\n**Not supported.** Sending it returns `INVALID_REQUEST`.","uniqueKey":"suffix","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","prompt":"\u003cstring>","stream":false,"stream_options":{"include_usage":true},"max_tokens":2,"temperature":1,"top_p":0.5,"stop":"\u003cstring>","seed":123,"frequency_penalty":0,"presence_penalty":0,"user":"\u003cstring>","n":123,"best_of":123,"logprobs":123,"echo":true,"suffix":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"70d3b8dd-db53-4486-a0ed-113182cffb2b":{"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":"text_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","text"],"properties":{"index":{"type":"integer","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"text":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].text","typeLabel":"string"},"logprobs":{"type":"null","uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"null"},"finish_reason":{"oneOf":[{"type":"string","enum":["stop","length","content_filter",null],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["stop","length","content_filter",null],"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"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":"cmpl-01K5S8PJ7D3M","object":"text_completion","created":1789286400,"model":"deepseek-v4.1-flash","choices":[{"index":0,"text":"\n a, b = 0, 1\n for _ in range(n):\n a, b = b, a + b\n return a","finish_reason":"stop"}],"usage":{"prompt_tokens":6,"completion_tokens":34,"total_tokens":40}},"examples":{"Example":{"title":"Example","value":{"id":"cmpl-01K5S8PJ7D3M","object":"text_completion","created":1789286400,"model":"deepseek-v4.1-flash","choices":[{"index":0,"text":"\n a, b = 0, 1\n for _ in range(n):\n a, b = b, a + b\n return a","finish_reason":"stop"}],"usage":{"prompt_tokens":6,"completion_tokens":34,"total_tokens":40}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"type":"string","uniqueKey":"","typeLabel":"string"},"example":"data: {\"id\":\"cmpl-01K5S8PJ7D3M\",\"object\":\"text_completion\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"text\":\"\\n a, b = 0, 1\"}]}\n\ndata: {\"id\":\"cmpl-01K5S8PJ7D3M\",\"object\":\"text_completion\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"text\":\"\\n return a\",\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"cmpl-01K5S8PJ7D3M\",\"object\":\"text_completion\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[],\"usage\":{\"prompt_tokens\":6,\"completion_tokens\":34,\"total_tokens\":40}}\n\ndata: [DONE]","examples":{"Example":{"title":"Example","value":"data: {\"id\":\"cmpl-01K5S8PJ7D3M\",\"object\":\"text_completion\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"text\":\"\\n a, b = 0, 1\"}]}\n\ndata: {\"id\":\"cmpl-01K5S8PJ7D3M\",\"object\":\"text_completion\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"text\":\"\\n return a\",\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"cmpl-01K5S8PJ7D3M\",\"object\":\"text_completion\",\"model\":\"deepseek-v4.1-flash\",\"choices\":[],\"usage\":{\"prompt_tokens\":6,\"completion_tokens\":34,\"total_tokens\":40}}\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"},"3bed988b-a0a7-4f95-88fc-499a08c0e67d":{"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"},"babdd9dd-2ac6-478b-b2e6-94d8404f4c7a":{"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"},"d35905f2-fa0d-4e32-beb8-9d3909803271":{"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"},"5db4b64e-9d92-4ac0-9168-7a79a943c171":{"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"},"950ebe92-79c5-4196-b6fc-6b99d5c0c6e8":{"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"},"6e067a9d-8d6f-4fd5-a465-3fea18eca590":{"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"},"8fe3ffa2-66ec-4af9-b39c-b49b2425503c":{"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"},"c37f4cda-c13c-47ff-a645-92bd4b9a4efa":{"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"},"bd04df72-5bdd-4304-89b6-591b4628962e":{"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"},"e4a3d11e-d24e-418b-98d4-3e73db114eb8":{"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":"Completions - Prentis","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-22T06:01:51.475Z","originalFileLocation":"api-reference/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=\"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.\">\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=\"Completions - Prentis\">\u003cmeta data-mint-head property=\"og:description\" content=\"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.\">\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/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=Completions\u0026amp;description=Legacy+text+completion%2C+for+prompts+that+are+not+a+conversation.+Only+models+that+declare+the+text-completion+capability+accept+it%3B+the+rest+return+MODEL_CAPABI\u0026amp;theme=8d4bc0888e4ddbbd2b1e51c1\u0026amp;signature=11141cf6cbbd8eb364b2ea5ce651ef21d16e71622780efe62f5da8dc4a0dbc89\">\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=\"Completions - Prentis\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"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.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://prentis-ai.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Completions\u0026amp;description=Legacy+text+completion%2C+for+prompts+that+are+not+a+conversation.+Only+models+that+declare+the+text-completion+capability+accept+it%3B+the+rest+return+MODEL_CAPABI\u0026amp;theme=8d4bc0888e4ddbbd2b1e51c1\u0026amp;signature=11141cf6cbbd8eb364b2ea5ce651ef21d16e71622780efe62f5da8dc4a0dbc89\">\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/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/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/completions#webpage\",\"url\":\"https://docs.compute.prentis.ai/api-reference/completions\",\"name\":\"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.\",\"dateModified\":\"2026-09-22T06:01:51.475Z\",\"isPartOf\":{\"@id\":\"https://docs.compute.prentis.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.compute.prentis.ai/api-reference/completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.compute.prentis.ai/api-reference/completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inference\",\"item\":\"https://docs.compute.prentis.ai/api-reference/chat-completions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Completions\",\"item\":\"https://docs.compute.prentis.ai/api-reference/completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.compute.prentis.ai/api-reference/completions#apireference\",\"headline\":\"Completions\",\"name\":\"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.\",\"url\":\"https://docs.compute.prentis.ai/api-reference/completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.compute.prentis.ai/api-reference/completions#webpage\"},\"dateModified\":\"2026-09-22T06:01:51.475Z\",\"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/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","href":"/api-reference/introduction"}]},{"group":"Inference","pages":[{"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"},{"title":"Completions","openapi":"openapi/prentis.openapi.yaml POST /completions","href":"/api-reference/completions"},{"title":"Messages","openapi":"openapi/prentis.openapi.yaml POST /messages","description":"Anthropic-compatible Messages endpoint. Anthropic SDKs and Claude Code work by changing base_url alone, and x-api-key is accepted alongside Authorization: Bearer. Pass a Prentis model name -- there is no claude-* aliasing.","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":"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"]}