research and video are asynchronous and must not be sent to /completions (or stream()). They run as background jobs; invoking them here executes the work inline and the request hits the timeout before it finishes. Enqueue them via POST /api/v1/research / POST /api/v1/video and poll with Get Job Status. The @hitheo/sdk throws a TheoUsageError immediately if you pass these modes to complete() / stream(). See the Async Jobs guide.
boolean
default:"false"
Enable SSE streaming. When true, returns a text/event-stream response instead of JSON. See Streaming.
string
Continue an existing conversation. Pass the conversation ID to maintain multi-turn context.
string[]
Skill slugs to activate for this request. These are merged with the user’s installed skills.Each slug activates a skill’s prompt extension, tools, and model preferences for this completion. You can find slugs in the dashboard (copy icon on each skill card), via GET /api/v1/skills, or in the Skill Builder Input node.See Activating Skills via API for the full guide.
object[]
Inline tool definitions the model can call during the agent loop.
Show Tool object
string
required
Tool name (e.g., check_inventory).
string
required
What the tool does — the model uses this to decide when to call it.
object
JSON Schema describing the tool’s input parameters.
string | object
default:"theo"
Override Theo’s personality for this request.
"theo" — Default Theo persona
"none" — No persona (raw model output)
{ "system_prompt": "You are..." } — Custom system prompt
number
Sampling temperature (0–2). Higher values produce more creative output.
string
default:"auto"
Whether the model thinks before answering: auto, on or off. Thinking helps on hard problems but is slower and uses more output tokens. auto follows your orchestrator’s Model node setting, otherwise the mode (on for think and research, off for quick modes like fast).
integer
default:"8"
Maximum agent loop iterations (1–20). Each iteration is a think → act → observe cycle.
object
Override the engine used for specific modes. Keys are mode names (e.g., "code", "think"), values are Theo engine IDs (e.g., "theo-1-reason", "theo-1-flash"). See List Models for valid engine IDs.
string
default:"theo"
Response format. "theo" for the default format, "openai" for OpenAI-compatible format.
object
Arbitrary key-value metadata attached to the completion. Returned in the response and logged in the audit trail.
string
Component library identifier for GenUI mode. Used by E.V.I. callers for custom UI rendering.
boolean
default:"true"
Set to false to skip long-term memory retrieval and injection for this request. Useful for stateless / privacy-sensitive calls where you don’t want prior memories to influence the answer.
object
Inline conversation envelope for stateless callers — recent messages (max 20) the server uses when no conversation_id is supplied, so follow-ups like “make it longer” resolve against context.
object
Per-request response-style config (format, preciseness, intent) applied on top of the key’s defaults.
import { Theo } from "@hitheo/sdk";const theo = new Theo({ apiKey: process.env.THEO_API_KEY! });const res = await theo.complete({ prompt: "Explain microservices architecture", mode: "auto", temperature: 0.7,});console.log(res.content);console.log(res.model.label); // e.g. "Theo Flash"console.log(res.usage.cost_cents); // e.g. 0.02
With Skills and Tools
curl -X POST https://www.hitheo.ai/api/v1/completions \ -H "Authorization: Bearer $THEO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Check current inventory levels for SKU-1234", "mode": "auto", "skills": ["inventory-check"], "tools": [ { "name": "check_stock", "description": "Look up current stock levels by SKU", "input_schema": { "type": "object", "properties": { "sku": { "type": "string" }, "warehouse": { "type": "string" } }, "required": ["sku"] } } ], "persona": { "system_prompt": "You are Atlas, an operations assistant." }, "max_iterations": 5 }'
const res = await theo.complete({ prompt: "Check current inventory levels for SKU-1234", skills: ["inventory-check"], tools: [ { name: "check_stock", description: "Look up current stock levels by SKU", input_schema: { type: "object", properties: { sku: { type: "string" }, warehouse: { type: "string" }, }, required: ["sku"], }, }, ], persona: { system_prompt: "You are Atlas, an operations assistant." }, max_iterations: 5,});
Response
string
Unique completion ID (prefixed cmpl_).
string
Always "completion".
string
ISO 8601 timestamp.
string
The generated text content.
string
The mode you requested (e.g., "auto").
string
The mode Theo actually used after intent classification (e.g., "fast", "think", "code").
object
The Theo engine that handled the request.
Show Model object
string
Theo-branded model ID (e.g., "theo-1-flash", "theo-1-reason").
string
Human-readable name (e.g., "Theo Flash", "Theo Reason").
Output tokens generated. Always 0 for non-text modes.
integer
Total tokens.
boolean
Present and true when the response was served from the semantic cache.
For non-text modes (image, video, tts, stt), prompt_tokens and completion_tokens are always 0 — tokens are not a meaningful billing unit there. Use usage.cost_cents as the sole usage metric for those modes.
object | null
The metadata you passed in the request, echoed back.
string | null
The server-side conversation id this turn resolved against. null when no conversation was created or attached. Echoed unchanged when you passed conversation_id in the request.
string
Server-assigned request identifier (also returned as the X-Request-Id header). Include this in support tickets so we can look up the request in logs.
Example Response
{ "id": "cmpl_abc123", "object": "completion", "created": "2026-04-10T12:00:00Z", "content": "Microservices architecture is a design pattern where an application is composed of small, independent services...", "mode": "auto", "resolved_mode": "fast", "model": { "id": "theo-1-flash", "label": "Theo Flash", "engine": "theo-core" }, "tools_used": [], "artifacts": [], "follow_ups": [ { "label": "Compare with monoliths", "prompt": "Compare microservices vs monolithic architecture" }, { "label": "Service mesh", "prompt": "Explain service mesh in microservices" } ], "usage": { "cost_cents": 0.02, "prompt_tokens": 12, "completion_tokens": 156, "total_tokens": 168 }, "metadata": null, "conversation_id": null, "request_id": "req_9f2e1a"}
OpenAI-Compatible Format
Pass format: "openai" to receive responses in OpenAI’s chat.completions format. This allows drop-in replacement in existing OpenAI-based applications.
The response follows the OpenAI chat.completion schema with choices, usage, and model fields.
Semantic Caching
Non-conversation completions (no conversation_id) are automatically cached. Identical requests return cached results instantly at zero cost. See Semantic Caching.Cached responses include "_cached": true in the response body.
Errors
Status
Code
Description
400
validation_error
Invalid request body (missing prompt, invalid mode, etc.)
400
context_length_exceeded
Request exceeds the largest context window on the key — add a larger-context model or shorten the request
401
invalid_api_key
Missing or invalid API key
402
insufficient_credits
Account has insufficient balance
403
model_not_allowed
The request resolved to a model outside this key’s model allowlist
404
not_found
Conversation ID not found
422
guardrail_violation
A Gateway Guardrails policy on this key denied the request
422
orchestrator_no_path
The key’s orchestrator graph couldn’t resolve a path for this request
{"docsConfig":{"theme":"sequoia","$schema":"https://mintlify.com/docs.json","name":"Theo API Docs","colors":{"primary":"#715eac","light":"#00eefd","dark":"#ff00aa"},"logo":"https://mintcdn.com/theoai/1GrRXquT3RmYCAKc/images/theo-logo-v1.png?fit=max\u0026auto=format\u0026n=1GrRXquT3RmYCAKc\u0026q=85\u0026s=8b015a7610e195426a8c23f5991cc4fd","favicon":"https://mintcdn.com/theoai/e1gmlMTZO-f4Ir99/images/theo-icon-512px.png?fit=max\u0026auto=format\u0026n=e1gmlMTZO-f4Ir99\u0026q=85\u0026s=24571b1a570eb2a94af2b187ed34ebdd","appearance":{"default":"dark"},"background":{"decoration":"grid"},"navbar":{"links":[]},"search":{"prompt":"Search Theo docs..."},"seo":{"indexing":"all"},"fonts":{"family":"PT Sans","weight":300},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","latex":true},"banner":{"content":"Welcome to Theo Docs — the AI orchestration API.","dismissible":true},"thumbnails":{"appearance":"dark"},"interaction":{"drilldown":true},"metadata":{"timestamp":false},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"es","href":"es/changelog"},{"language":"zh","href":"zh"},{"language":"zh-HK","href":"zh-HK"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"theoai","hasAudioNarration":false,"actualSubdomain":"theoai","customDomains":["docs.hitheo.ai"],"gitSource":{"type":"github","owner":"arihealthbird","repo":"hitheo","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":"","_id":"6b10de369ffae5051c410436"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad0f075d7c9ed5c31aaab6d","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"en","tag":"API Reference","count":102},{"language":"zh-HK","tag":"API 參考","count":99},{"language":"zh","tag":"API 参考","count":99},{"language":"en","tag":"Documentation","count":66},{"language":"zh-HK","tag":"文檔","count":63},{"language":"zh","tag":"文档","count":63},{"language":"en","tag":"SDK","count":17},{"language":"en","tag":"SDK Reference","count":17},{"language":"en","tag":"Resources","count":16},{"language":"en","tag":"Embed Widgets","count":16},{"language":"zh-HK","tag":"資源","count":16},{"language":"zh-HK","tag":"SDK","count":16},{"language":"zh-HK","tag":"SDK 參考","count":16},{"language":"zh","tag":"资源","count":16},{"language":"zh","tag":"SDK","count":16},{"language":"zh","tag":"SDK 参考","count":16},{"language":"en","tag":"Guides","count":15},{"language":"zh-HK","tag":"嵌入式組件","count":15},{"language":"zh","tag":"嵌入式组件","count":15},{"language":"zh-HK","tag":"指南","count":14},{"language":"zh","tag":"指南","count":14},{"language":"en","tag":"Skills","count":11},{"language":"zh-HK","tag":"技能","count":11},{"language":"zh","tag":"技能","count":11},{"language":"en","tag":"Routing Studio","count":10},{"language":"zh-HK","tag":"Routing Studio","count":10},{"language":"zh","tag":"Routing Studio","count":10},{"language":"en","tag":"Webhooks","count":9},{"language":"zh-HK","tag":"Webhooks","count":9},{"language":"zh","tag":"Webhooks","count":9},{"language":"es","tag":"Documentación","count":1},{"language":"es","tag":"Registro de cambios","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"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":"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":"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":"turbopuffer-dual-write","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":"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},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/completions/create","slug":"/api-reference/completions/create","pageMetadata":{"title":"Create Completion","description":"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.","api":"POST /api/v1/completions","href":"/api-reference/completions/create"},"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: \"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.\"\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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The core endpoint of the Theo API. Sends a prompt through the full orchestration pipeline and returns the complete response.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`For real-time token delivery, set `,_jsx(_components.code,{children:`stream: true`}),` or see `,_jsx(_components.a,{href:`/api-reference/completions/streaming`,children:`Streaming Completions`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Requires a Bearer token. See `,_jsx(_components.a,{href:`/api-reference/authentication`,children:`Authentication`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` theo_sk_...`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The prompt text. Must be a non-empty string.`})}),`\n`,_jsxs(ParamField,{body:`mode`,type:`string`,default:`auto`,id:`param-mode`,children:[_jsxs(_components.p,{children:[`Execution mode. When set to `,_jsx(_components.code,{children:`auto`}),`, Theo classifies the prompt and selects the optimal engine automatically.`]}),_jsx(_components.p,{children:`Available modes:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`auto`}),` — Classify prompt and route to best engine (default)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`fast`}),` — Low-latency responses for simple queries`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`think`}),` — Deep reasoning for complex analysis`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`code`}),` — Code generation (Theo Code engine, extended output budget)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`image`}),` — Image generation (Theo Create)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`video`}),` — `,_jsx(_components.strong,{children:`Async.`}),` Use `,_jsx(_components.a,{href:`/api-reference/video/generate`,children:_jsx(_components.code,{children:`POST /api/v1/video`})}),` + job polling, not this endpoint.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`research`}),` — `,_jsx(_components.strong,{children:`Async.`}),` Use `,_jsx(_components.a,{href:`/api-reference/research/create`,children:_jsx(_components.code,{children:`POST /api/v1/research`})}),` + job polling, not this endpoint.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`roast`}),` — Humorous, irreverent tone`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`genui`}),` — Generate interactive UI components (OpenUI Lang)`]}),`\n`]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`research`}),` and `,_jsx(_components.code,{children:`video`}),` are `,_jsx(_components.strong,{children:`asynchronous`}),` and must not be sent to `,_jsx(_components.code,{children:`/completions`}),` (or `,_jsx(_components.code,{children:`stream()`}),`). They run as background jobs; invoking them here executes the work inline and the request hits the timeout before it finishes. Enqueue them via `,_jsx(_components.a,{href:`/api-reference/research/create`,children:_jsx(_components.code,{children:`POST /api/v1/research`})}),` / `,_jsx(_components.a,{href:`/api-reference/video/generate`,children:_jsx(_components.code,{children:`POST /api/v1/video`})}),` and poll with `,_jsx(_components.a,{href:`/api-reference/jobs/get`,children:`Get Job Status`}),`. The `,_jsx(_components.code,{children:`@hitheo/sdk`}),` throws a `,_jsx(_components.code,{children:`TheoUsageError`}),` immediately if you pass these modes to `,_jsx(_components.code,{children:`complete()`}),` / `,_jsx(_components.code,{children:`stream()`}),`. See the `,_jsx(_components.a,{href:`/guides/async-jobs`,children:`Async Jobs guide`}),`.`]})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:`false`,id:`param-stream`,children:_jsxs(_components.p,{children:[`Enable SSE streaming. When `,_jsx(_components.code,{children:`true`}),`, returns a `,_jsx(_components.code,{children:`text/event-stream`}),` response instead of JSON. See `,_jsx(_components.a,{href:`/api-reference/completions/streaming`,children:`Streaming`}),`.`]})}),`\n`,_jsx(ParamField,{body:`conversation_id`,type:`string`,id:`param-conversation-id`,children:_jsx(_components.p,{children:`Continue an existing conversation. Pass the conversation ID to maintain multi-turn context.`})}),`\n`,_jsxs(ParamField,{body:`skills`,type:`string[]`,id:`param-skills`,children:[_jsx(_components.p,{children:`Skill slugs to activate for this request. These are merged with the user’s installed skills.`}),_jsxs(_components.p,{children:[`Each slug activates a skill’s prompt extension, tools, and model preferences for this completion. You can find slugs in the dashboard (copy icon on each skill card), via `,_jsx(_components.code,{children:`GET /api/v1/skills`}),`, or in the Skill Builder Input node.`]}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/guides/skills-api`,children:`Activating Skills via API`}),` for the full guide.`]})]}),`\n`,_jsxs(ParamField,{body:`tools`,type:`object[]`,id:`param-tools`,children:[_jsx(_components.p,{children:`Inline tool definitions the model can call during the agent loop.`}),_jsxs(Expandable,{title:`Tool object`,children:[_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsxs(_components.p,{children:[`Tool name (e.g., `,_jsx(_components.code,{children:`check_inventory`}),`).`]})}),_jsx(ParamField,{body:`description`,type:`string`,required:true,id:`param-description`,children:_jsx(_components.p,{children:`What the tool does — the model uses this to decide when to call it.`})}),_jsx(ParamField,{body:`input_schema`,type:`object`,id:`param-input-schema`,children:_jsx(_components.p,{children:`JSON Schema describing the tool’s input parameters.`})})]})]}),`\n`,_jsxs(ParamField,{body:`persona`,type:`string | object`,default:`theo`,id:`param-persona`,children:[_jsx(_components.p,{children:`Override Theo’s personality for this request.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"theo\"`}),` — Default Theo persona`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"none\"`}),` — No persona (raw model output)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`{ \"system_prompt\": \"You are...\" }`}),` — Custom system prompt`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,id:`param-temperature`,children:_jsx(_components.p,{children:`Sampling temperature (0–2). Higher values produce more creative output.`})}),`\n`,_jsx(ParamField,{body:`reasoning`,type:`string`,default:`auto`,id:`param-reasoning`,children:_jsxs(_components.p,{children:[`Whether the model thinks before answering: `,_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`on`}),` or `,_jsx(_components.code,{children:`off`}),`. Thinking helps on hard problems but is slower and uses more output tokens. `,_jsx(_components.code,{children:`auto`}),` follows your orchestrator’s Model node setting, otherwise the mode (on for `,_jsx(_components.code,{children:`think`}),` and `,_jsx(_components.code,{children:`research`}),`, off for quick modes like `,_jsx(_components.code,{children:`fast`}),`).`]})}),`\n`,_jsx(ParamField,{body:`max_iterations`,type:`integer`,default:`8`,id:`param-max-iterations`,children:_jsx(_components.p,{children:`Maximum agent loop iterations (1–20). Each iteration is a think → act → observe cycle.`})}),`\n`,_jsx(ParamField,{body:`model_overrides`,type:`object`,id:`param-model-overrides`,children:_jsxs(_components.p,{children:[`Override the engine used for specific modes. Keys are mode names (e.g., `,_jsx(_components.code,{children:`\"code\"`}),`, `,_jsx(_components.code,{children:`\"think\"`}),`), values are Theo engine IDs (e.g., `,_jsx(_components.code,{children:`\"theo-1-reason\"`}),`, `,_jsx(_components.code,{children:`\"theo-1-flash\"`}),`). See `,_jsx(_components.a,{href:`/api-reference/models/list`,children:`List Models`}),` for valid engine IDs.`]})}),`\n`,_jsx(ParamField,{body:`format`,type:`string`,default:`theo`,id:`param-format`,children:_jsxs(_components.p,{children:[`Response format. `,_jsx(_components.code,{children:`\"theo\"`}),` for the default format, `,_jsx(_components.code,{children:`\"openai\"`}),` for OpenAI-compatible format.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsx(_components.p,{children:`Arbitrary key-value metadata attached to the completion. Returned in the response and logged in the audit trail.`})}),`\n`,_jsx(ParamField,{body:`component_library`,type:`string`,id:`param-component-library`,children:_jsx(_components.p,{children:`Component library identifier for GenUI mode. Used by E.V.I. callers for custom UI rendering.`})}),`\n`,_jsx(ParamField,{body:`memory`,type:`boolean`,default:`true`,id:`param-memory`,children:_jsxs(_components.p,{children:[`Set to `,_jsx(_components.code,{children:`false`}),` to skip long-term memory retrieval and injection for this request. Useful for stateless / privacy-sensitive calls where you don’t want prior memories to influence the answer.`]})}),`\n`,_jsx(ParamField,{body:`conversation`,type:`object`,id:`param-conversation`,children:_jsxs(_components.p,{children:[`Inline conversation envelope for stateless callers — recent `,_jsx(_components.code,{children:`messages`}),` (max 20) the server uses when no `,_jsx(_components.code,{children:`conversation_id`}),` is supplied, so follow-ups like “make it longer” resolve against context.`]})}),`\n`,_jsx(ParamField,{body:`response_style`,type:`object`,id:`param-response-style`,children:_jsx(_components.p,{children:`Per-request response-style config (format, preciseness, intent) applied on top of the key’s defaults.`})}),`\n`,_jsx(ParamField,{body:`personality_config`,type:`object`,id:`param-personality-config`,children:_jsx(_components.p,{children:`Per-request personality/trait configuration overlay.`})}),`\n`,_jsx(ParamField,{body:`theo_branding`,type:`boolean`,default:`true`,id:`param-theo-branding`,children:_jsxs(_components.p,{children:[`Master branding toggle. `,_jsx(_components.code,{children:`false`}),` strips the Theo persona/branding from the system prompt (superset control over `,_jsx(_components.code,{children:`persona`}),`).`]})}),`\n`,_jsx(ParamField,{body:`brand_soul`,type:`boolean`,id:`param-brand-soul`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, scopes the response to the key’s brand catalog (Brand Soul) — recommends only your own products/content and redirects off-topic requests.`]})}),`\n`,_jsx(ParamField,{body:`attachments`,type:`object[]`,id:`param-attachments`,children:_jsxs(_components.p,{children:[`Image attachments for vision turns. Each item is either `,_jsx(_components.code,{children:`{ type: \"image_url\", url }`}),` or `,_jsx(_components.code,{children:`{ type: \"image_base64\", data, mime_type }`}),` (PNG / JPEG / WebP / GIF, ≤ 15MB base64).`]})}),`\n`,_jsx(ParamField,{body:`image_model`,type:`string`,id:`param-image-model`,children:_jsxs(_components.p,{children:[`Pin the image sub-engine for `,_jsx(_components.code,{children:`image`}),` mode (otherwise auto).`]})}),`\n`,_jsx(ParamField,{body:`image_quality`,type:`string`,id:`param-image-quality`,children:_jsxs(_components.p,{children:[`Pin the image quality tier for `,_jsx(_components.code,{children:`image`}),` mode.`]})}),`\n`,_jsx(ParamField,{body:`stealth_model`,type:`string`,id:`param-stealth-model`,children:_jsxs(_components.p,{children:[`Stealth-media model pin (`,_jsx(_components.code,{children:`stealth_image`}),` / `,_jsx(_components.code,{children:`stealth_video`}),`).`]})}),`\n`,_jsx(ParamField,{body:`stealth_aspect`,type:`string`,id:`param-stealth-aspect`,children:_jsx(_components.p,{children:`Stealth-media aspect ratio.`})}),`\n`,_jsx(ParamField,{body:`stealth_duration`,type:`string`,id:`param-stealth-duration`,children:_jsx(_components.p,{children:`Stealth-video clip duration.`})}),`\n`,_jsx(Heading,{level:`2`,id:`request-examples`,children:`Request Examples`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://www.hitheo.ai/api/v1/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$THEO_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Explain microservices architecture\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mode\": \"auto\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\": 0.7`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`SDK`,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Theo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@hitheo/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` theo`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Theo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`THEO_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` theo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`complete`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Explain microservices architecture\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` mode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. \"Theo Flash\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`usage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cost_cents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. 0.02`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`with-skills-and-tools`,children:`With Skills and Tools`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`24`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://www.hitheo.ai/api/v1/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$THEO_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Check current inventory levels for SKU-1234\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mode\": \"auto\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"skills\": [\"inventory-check\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tools\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"check_stock\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Look up current stock levels by SKU\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"input_schema\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"object\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sku\": { \"type\": \"string\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"warehouse\": { \"type\": \"string\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"required\": [\"sku\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"persona\": { \"system_prompt\": \"You are Atlas, an operations assistant.\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_iterations\": 5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`SDK`,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` theo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`complete`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Check current inventory levels for SKU-1234\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` skills:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"inventory-check\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tools:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"check_stock\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` description:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Look up current stock levels by SKU\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` input_schema:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` properties:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sku:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` warehouse:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` required:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` persona:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`system_prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"You are Atlas, an operations assistant.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` max_iterations:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Unique completion ID (prefixed `,_jsx(_components.code,{children:`cmpl_`}),`).`]})}),`\n`,_jsx(ResponseField,{name:`object`,type:`string`,id:`param-object`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`\"completion\"`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`created`,type:`string`,id:`param-created`,children:_jsx(_components.p,{children:`ISO 8601 timestamp.`})}),`\n`,_jsx(ResponseField,{name:`content`,type:`string`,id:`param-content`,children:_jsx(_components.p,{children:`The generated text content.`})}),`\n`,_jsx(ResponseField,{name:`mode`,type:`string`,id:`param-mode-1`,children:_jsxs(_components.p,{children:[`The mode you requested (e.g., `,_jsx(_components.code,{children:`\"auto\"`}),`).`]})}),`\n`,_jsx(ResponseField,{name:`resolved_mode`,type:`string`,id:`param-resolved-mode`,children:_jsxs(_components.p,{children:[`The mode Theo actually used after intent classification (e.g., `,_jsx(_components.code,{children:`\"fast\"`}),`, `,_jsx(_components.code,{children:`\"think\"`}),`, `,_jsx(_components.code,{children:`\"code\"`}),`).`]})}),`\n`,_jsxs(ResponseField,{name:`model`,type:`object`,id:`param-model`,children:[_jsx(_components.p,{children:`The Theo engine that handled the request.`}),_jsxs(Expandable,{title:`Model object`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-1`,children:_jsxs(_components.p,{children:[`Theo-branded model ID (e.g., `,_jsx(_components.code,{children:`\"theo-1-flash\"`}),`, `,_jsx(_components.code,{children:`\"theo-1-reason\"`}),`).`]})}),_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label`,children:_jsxs(_components.p,{children:[`Human-readable name (e.g., `,_jsx(_components.code,{children:`\"Theo Flash\"`}),`, `,_jsx(_components.code,{children:`\"Theo Reason\"`}),`).`]})}),_jsx(ResponseField,{name:`engine`,type:`string`,id:`param-engine`,children:_jsxs(_components.p,{children:[`Engine subsystem (e.g., `,_jsx(_components.code,{children:`\"theo-core\"`}),`, `,_jsx(_components.code,{children:`\"theo-vision\"`}),`).`]})})]})]}),`\n`,_jsxs(ResponseField,{name:`tools_used`,type:`object[]`,id:`param-tools-used`,children:[_jsx(_components.p,{children:`Tools called during the agent loop.`}),_jsxs(Expandable,{title:`Tool usage object`,children:[_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:`Tool name.`}),_jsxs(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:[_jsx(_components.code,{children:`\"success\"`}),` or `,_jsx(_components.code,{children:`\"error\"`}),`.`]}),_jsx(ResponseField,{name:`description`,type:`string`,id:`param-description-1`,children:`Tool description.`})]})]}),`\n`,_jsx(ResponseField,{name:`artifacts`,type:`object[]`,id:`param-artifacts`,children:_jsx(_components.p,{children:`Generated files (images, code, documents) produced during the completion.`})}),`\n`,_jsxs(ResponseField,{name:`follow_ups`,type:`object[]`,id:`param-follow-ups`,children:[_jsx(_components.p,{children:`Suggested next prompts.`}),_jsxs(Expandable,{title:`Follow-up object`,children:[_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label-1`,children:`Short label for the suggestion.`}),_jsx(ResponseField,{name:`prompt`,type:`string`,id:`param-prompt-1`,children:`Full prompt text.`})]})]}),`\n`,_jsxs(ResponseField,{name:`usage`,type:`object`,id:`param-usage`,children:[_jsx(_components.p,{children:`Token counts and cost.`}),_jsxs(Expandable,{title:`Usage object`,children:[_jsx(ResponseField,{name:`cost_cents`,type:`number`,id:`param-cost-cents`,children:`Cost in cents.`}),_jsxs(ResponseField,{name:`prompt_tokens`,type:`integer`,id:`param-prompt-tokens`,children:[`Input tokens consumed. Always `,_jsx(_components.code,{children:`0`}),` for non-text modes (`,_jsx(_components.code,{children:`image`}),`, `,_jsx(_components.code,{children:`video`}),`, `,_jsx(_components.code,{children:`tts`}),`, `,_jsx(_components.code,{children:`stt`}),`).`]}),_jsxs(ResponseField,{name:`completion_tokens`,type:`integer`,id:`param-completion-tokens`,children:[`Output tokens generated. Always `,_jsx(_components.code,{children:`0`}),` for non-text modes.`]}),_jsx(ResponseField,{name:`total_tokens`,type:`integer`,id:`param-total-tokens`,children:`Total tokens.`}),_jsxs(ResponseField,{name:`cached`,type:`boolean`,id:`param-cached`,children:[`Present and `,_jsx(_components.code,{children:`true`}),` when the response was served from the semantic cache.`]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`For non-text modes (`,_jsx(_components.code,{children:`image`}),`, `,_jsx(_components.code,{children:`video`}),`, `,_jsx(_components.code,{children:`tts`}),`, `,_jsx(_components.code,{children:`stt`}),`), `,_jsx(_components.code,{children:`prompt_tokens`}),` and `,_jsx(_components.code,{children:`completion_tokens`}),` are always `,_jsx(_components.code,{children:`0`}),` — tokens are not a meaningful billing unit there. Use `,_jsx(_components.code,{children:`usage.cost_cents`}),` as the sole usage metric for those modes.`]})}),`\n`,_jsx(ResponseField,{name:`metadata`,type:`object | null`,id:`param-metadata-1`,children:_jsx(_components.p,{children:`The metadata you passed in the request, echoed back.`})}),`\n`,_jsx(ResponseField,{name:`conversation_id`,type:`string | null`,id:`param-conversation-id-1`,children:_jsxs(_components.p,{children:[`The server-side conversation id this turn resolved against. `,_jsx(_components.code,{children:`null`}),` when no conversation was created or attached. Echoed unchanged when you passed `,_jsx(_components.code,{children:`conversation_id`}),` in the request.`]})}),`\n`,_jsx(ResponseField,{name:`request_id`,type:`string`,id:`param-request-id`,children:_jsxs(_components.p,{children:[`Server-assigned request identifier (also returned as the `,_jsx(_components.code,{children:`X-Request-Id`}),` header). Include this in support tickets so we can look up the request in logs.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`example-response`,children:`Example Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`28`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cmpl_abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-10T12:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Microservices architecture is a design pattern where an application is composed of small, independent services...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolved_mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fast\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"theo-1-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Theo Flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"engine\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"theo-core\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tools_used\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"artifacts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"follow_ups\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Compare with monoliths\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Compare microservices vs monolithic architecture\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Service mesh\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Explain service mesh in microservices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost_cents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.02`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`156`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`168`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversation_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_9f2e1a\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`openai-compatible-format`,children:`OpenAI-Compatible Format`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`format: \"openai\"`}),` to receive responses in OpenAI’s `,_jsx(_components.code,{children:`chat.completions`}),` format. This allows drop-in replacement in existing OpenAI-based applications.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://www.hitheo.ai/api/v1/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$THEO_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Hello\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"format\": \"openai\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The response follows the OpenAI `,_jsx(_components.code,{children:`chat.completion`}),` schema with `,_jsx(_components.code,{children:`choices`}),`, `,_jsx(_components.code,{children:`usage`}),`, and `,_jsx(_components.code,{children:`model`}),` fields.`]}),`\n`,_jsx(Heading,{level:`2`,id:`semantic-caching`,children:`Semantic Caching`}),`\n`,_jsxs(_components.p,{children:[`Non-conversation completions (no `,_jsx(_components.code,{children:`conversation_id`}),`) are automatically cached. Identical requests return cached results instantly at `,_jsx(_components.strong,{children:`zero cost`}),`. See `,_jsx(_components.a,{href:`/guides/semantic-caching`,children:`Semantic Caching`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Cached responses include `,_jsx(_components.code,{children:`\"_cached\": true`}),` in the response body.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`validation_error`})}),_jsx(_components.td,{children:`Invalid request body (missing prompt, invalid mode, etc.)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`context_length_exceeded`})}),_jsx(_components.td,{children:`Request exceeds the largest context window on the key — add a larger-context model or shorten the request`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_api_key`})}),_jsx(_components.td,{children:`Missing or invalid API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`insufficient_credits`})}),_jsx(_components.td,{children:`Account has insufficient balance`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`model_not_allowed`})}),_jsx(_components.td,{children:`The request resolved to a model outside this key’s model allowlist`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`not_found`})}),_jsx(_components.td,{children:`Conversation ID not found`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`guardrail_violation`})}),_jsx(_components.td,{children:`A Gateway Guardrails policy on this key denied the request`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`orchestrator_no_path`})}),_jsx(_components.td,{children:`The key’s orchestrator graph couldn’t resolve a path for this request`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`rate_limit_exceeded`})}),_jsxs(_components.td,{children:[`Too many requests — check `,_jsx(_components.code,{children:`Retry-After`}),` header`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`500`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`server_error`})}),_jsx(_components.td,{children:`Internal server error`})]})]})]})]})}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":"Create Completion","description":"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.","api":"POST /api/v1/completions","href":"/api-reference/completions/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Request Examples","slug":"request-examples","depth":2,"children":[{"title":"With Skills and Tools","slug":"with-skills-and-tools","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Example Response","slug":"example-response","depth":3,"children":[]}]},{"title":"OpenAI-Compatible Format","slug":"openai-compatible-format","depth":2,"children":[]},{"title":"Semantic Caching","slug":"semantic-caching","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Create Completion","path":"/api/v1/completions","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"prompt":[{"type":"string","description":"The prompt text. Must be a non-empty string.","required":true}],"mode":[{"type":"string","description":"Execution mode. When set to `auto` , Theo classifies the prompt and selects the optimal engine automatically. Available modes: `auto` — Classify prompt and route to best engine (default) `fast` — Low-latency responses for simple queries `think` — Deep reasoning for complex analysis `code` — Code generation (Theo Code engine, extended output budget) `image` — Image generation (Theo Create) `video` — Async. Use `POST /api/v1/video` + job polling, not this endpoint. `research` — Async. Use `POST /api/v1/research` + job polling, not this endpoint. `roast` — Humorous, irreverent tone `genui` — Generate interactive UI components (OpenUI Lang)"}],"stream":[{"type":"boolean","description":"Enable SSE streaming. When `true` , returns a `text/event-stream` response instead of JSON. See Streaming ."}],"conversation_id":[{"type":"string","description":"Continue an existing conversation. Pass the conversation ID to maintain multi-turn context."}],"skills":[{"type":"array","items":[{"type":"string"}],"description":"Skill slugs to activate for this request. These are merged with the user’s installed skills. Each slug activates a skill’s prompt extension, tools, and model preferences for this completion. You can find slugs in the dashboard (copy icon on each skill card), via `GET /api/v1/skills` , or in the Skill Builder Input node. See Activating Skills via API for the full guide."}],"tools":[{"type":"array","items":[{"type":"object","properties":{"name":[{"type":"string","description":"Tool name (e.g., `check_inventory` ).","required":true}],"description":[{"type":"string","description":"What the tool does — the model uses this to decide when to call it.","required":true}],"input_schema":[{"type":"object","properties":{},"description":"JSON Schema describing the tool’s input parameters."}]}}],"description":"Inline tool definitions the model can call during the agent loop."}],"persona":[{"type":"object","properties":{},"description":"Override Theo’s personality for this request. `\"theo\"` — Default Theo persona `\"none\"` — No persona (raw model output) `{ \"system_prompt\": \"You are...\" }` — Custom system prompt"}],"temperature":[{"type":"number","description":"Sampling temperature (0–2). Higher values produce more creative output."}],"reasoning":[{"type":"string","description":"Whether the model thinks before answering: `auto` , `on` or `off` . Thinking helps on hard problems but is slower and uses more output tokens. `auto` follows your orchestrator’s Model node setting, otherwise the mode (on for `think` and `research` , off for quick modes like `fast` )."}],"max_iterations":[{"type":"integer","description":"Maximum agent loop iterations (1–20). Each iteration is a think → act → observe cycle."}],"model_overrides":[{"type":"object","properties":{},"description":"Override the engine used for specific modes. Keys are mode names (e.g., `\"code\"` , `\"think\"` ), values are Theo engine IDs (e.g., `\"theo-1-reason\"` , `\"theo-1-flash\"` ). See List Models for valid engine IDs."}],"format":[{"type":"string","description":"Response format. `\"theo\"` for the default format, `\"openai\"` for OpenAI-compatible format."}],"metadata":[{"type":"object","properties":{},"description":"Arbitrary key-value metadata attached to the completion. Returned in the response and logged in the audit trail."}],"component_library":[{"type":"string","description":"Component library identifier for GenUI mode. Used by E.V.I. callers for custom UI rendering."}],"memory":[{"type":"boolean","description":"Set to `false` to skip long-term memory retrieval and injection for this request. Useful for stateless / privacy-sensitive calls where you don’t want prior memories to influence the answer."}],"conversation":[{"type":"object","properties":{},"description":"Inline conversation envelope for stateless callers — recent `messages` (max 20) the server uses when no `conversation_id` is supplied, so follow-ups like “make it longer” resolve against context."}],"response_style":[{"type":"object","properties":{},"description":"Per-request response-style config (format, preciseness, intent) applied on top of the key’s defaults."}],"personality_config":[{"type":"object","properties":{},"description":"Per-request personality/trait configuration overlay."}],"theo_branding":[{"type":"boolean","description":"Master branding toggle. `false` strips the Theo persona/branding from the system prompt (superset control over `persona` )."}],"brand_soul":[{"type":"boolean","description":"When `true` , scopes the response to the key’s brand catalog (Brand Soul) — recommends only your own products/content and redirects off-topic requests."}],"attachments":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Image attachments for vision turns. Each item is either `{ type: \"image_url\", url }` or `{ type: \"image_base64\", data, mime_type }` (PNG / JPEG / WebP / GIF, ≤ 15MB base64)."}],"image_model":[{"type":"string","description":"Pin the image sub-engine for `image` mode (otherwise auto)."}],"image_quality":[{"type":"string","description":"Pin the image quality tier for `image` mode."}],"stealth_model":[{"type":"string","description":"Stealth-media model pin ( `stealth_image` / `stealth_video` )."}],"stealth_aspect":[{"type":"string","description":"Stealth-media aspect ratio."}],"stealth_duration":[{"type":"string","description":"Stealth-video clip duration."}]}}],"examples":{"example":{"value":{"prompt":"\u003cstring>","mode":"\u003cstring>","stream":true,"conversation_id":"\u003cstring>","skills":["\u003cstring>"],"tools":[{"name":"\u003cstring>","description":"\u003cstring>","input_schema":{}}],"persona":{},"temperature":123,"reasoning":"\u003cstring>","max_iterations":123,"model_overrides":{},"format":"\u003cstring>","metadata":{},"component_library":"\u003cstring>","memory":true,"conversation":{},"response_style":{},"personality_config":{},"theo_branding":true,"brand_soul":true,"attachments":[{}],"image_model":"\u003cstring>","image_quality":"\u003cstring>","stealth_model":"\u003cstring>","stealth_aspect":"\u003cstring>","stealth_duration":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"Unique completion ID (prefixed `cmpl_` )."}],"object":[{"type":"string","description":"Always `\"completion\"` ."}],"created":[{"type":"string","description":"ISO 8601 timestamp."}],"content":[{"type":"string","description":"The generated text content."}],"mode":[{"type":"string","description":"The mode you requested (e.g., `\"auto\"` )."}],"resolved_mode":[{"type":"string","description":"The mode Theo actually used after intent classification (e.g., `\"fast\"` , `\"think\"` , `\"code\"` )."}],"model":[{"type":"object","properties":{"id":[{"type":"string","description":"Theo-branded model ID (e.g., `\"theo-1-flash\"` , `\"theo-1-reason\"` )."}],"label":[{"type":"string","description":"Human-readable name (e.g., `\"Theo Flash\"` , `\"Theo Reason\"` )."}],"engine":[{"type":"string","description":"Engine subsystem (e.g., `\"theo-core\"` , `\"theo-vision\"` )."}]},"description":"The Theo engine that handled the request."}],"tools_used":[{"type":"array","items":[{"type":"object","properties":{"name":[{"type":"string","description":"Tool name."}],"status":[{"type":"string","description":"`\"success\"` or `\"error\"` ."}],"description":[{"type":"string","description":"Tool description."}]}}],"description":"Tools called during the agent loop."}],"artifacts":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Generated files (images, code, documents) produced during the completion."}],"follow_ups":[{"type":"array","items":[{"type":"object","properties":{"label":[{"type":"string","description":"Short label for the suggestion."}],"prompt":[{"type":"string","description":"Full prompt text."}]}}],"description":"Suggested next prompts."}],"usage":[{"type":"object","properties":{"cost_cents":[{"type":"number","description":"Cost in cents."}],"prompt_tokens":[{"type":"integer","description":"Input tokens consumed. Always `0` for non-text modes ( `image` , `video` , `tts` , `stt` )."}],"completion_tokens":[{"type":"integer","description":"Output tokens generated. Always `0` for non-text modes."}],"total_tokens":[{"type":"integer","description":"Total tokens."}],"cached":[{"type":"boolean","description":"Present and `true` when the response was served from the semantic cache."}]},"description":"Token counts and cost."}],"metadata":[{"type":"object","properties":{},"description":"The metadata you passed in the request, echoed back."}],"conversation_id":[{"type":"object","properties":{},"description":"The server-side conversation id this turn resolved against. `null` when no conversation was created or attached. Echoed unchanged when you passed `conversation_id` in the request."}],"request_id":[{"type":"string","description":"Server-assigned request identifier (also returned as the `X-Request-Id` header). Include this in support tickets so we can look up the request in logs."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","object":"\u003cstring>","created":"\u003cstring>","content":"\u003cstring>","mode":"\u003cstring>","resolved_mode":"\u003cstring>","model":{"id":"\u003cstring>","label":"\u003cstring>","engine":"\u003cstring>"},"tools_used":[{"name":"\u003cstring>","status":"\u003cstring>","description":"\u003cstring>"}],"artifacts":[{}],"follow_ups":[{"label":"\u003cstring>","prompt":"\u003cstring>"}],"usage":{"cost_cents":123,"prompt_tokens":123,"completion_tokens":123,"total_tokens":123,"cached":true},"metadata":{},"conversation_id":{},"request_id":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"theoai","siteName":"Theo API Docs","title":"Create Completion - Theo API Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/completions/create","matchLevel":0},"es":{"href":"/es/changelog","matchLevel":4},"zh":{"href":"/zh/api-reference/completions/create","matchLevel":1},"zh-HK":{"href":"/zh-HK/api-reference/completions/create","matchLevel":1}}},"lastModified":"2026-10-15T15:26:06.822Z","originalFileLocation":"api-reference/completions/create.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}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=\"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Theo API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_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/theoai/HMaTiOxhwLuEkGS5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Completion - Theo API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Theo API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hitheo.ai/api-reference/completions/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://theoai.mintlify.site/_mintlify/api/og/v2?division=Completions\u0026amp;title=Create+Completion\u0026amp;description=Send+a+prompt+through+the+full+orchestration+pipeline+%E2%80%94+intent+classification%2C+skill+loading%2C+model+routing%2C+agent+loop%2C+and+response.\u0026amp;theme=1223219aff4bac636125219a\u0026amp;signature=18ae495738b05d67d3362a1bcbe8be3091acd91fcae9d7d7e0949c13339f19f7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Completion - Theo API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://theoai.mintlify.site/_mintlify/api/og/v2?division=Completions\u0026amp;title=Create+Completion\u0026amp;description=Send+a+prompt+through+the+full+orchestration+pipeline+%E2%80%94+intent+classification%2C+skill+loading%2C+model+routing%2C+agent+loop%2C+and+response.\u0026amp;theme=1223219aff4bac636125219a\u0026amp;signature=18ae495738b05d67d3362a1bcbe8be3091acd91fcae9d7d7e0949c13339f19f7\">\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/theoai/HMaTiOxhwLuEkGS5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Theo API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#715eac\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hitheo.ai/api-reference/completions/create\">\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/create.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.hitheo.ai/api-reference/completions/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.hitheo.ai/zh/api-reference/completions/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-HK\" href=\"https://docs.hitheo.ai/zh-HK/api-reference/completions/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.hitheo.ai/api-reference/completions/create\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hitheo.ai/#organization\",\"name\":\"Theo API Docs\",\"url\":\"https://docs.hitheo.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/theoai/1GrRXquT3RmYCAKc/images/theo-logo-v1.png?fit=max\u0026auto=format\u0026n=1GrRXquT3RmYCAKc\u0026q=85\u0026s=8b015a7610e195426a8c23f5991cc4fd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hitheo.ai#website\",\"name\":\"Theo API Docs\",\"url\":\"https://docs.hitheo.ai\",\"publisher\":{\"@id\":\"https://docs.hitheo.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hitheo.ai/api-reference/completions/create#webpage\",\"url\":\"https://docs.hitheo.ai/api-reference/completions/create\",\"name\":\"Create Completion\",\"description\":\"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.\",\"dateModified\":\"2026-10-15T15:26:06.822Z\",\"isPartOf\":{\"@id\":\"https://docs.hitheo.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hitheo.ai/api-reference/completions/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hitheo.ai/api-reference/completions/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Theo API Docs\",\"item\":\"https://docs.hitheo.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Completion\",\"item\":\"https://docs.hitheo.ai/api-reference/completions/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hitheo.ai/api-reference/completions/create#apireference\",\"headline\":\"Create Completion\",\"name\":\"Create Completion\",\"description\":\"Send a prompt through the full orchestration pipeline — intent classification, skill loading, model routing, agent loop, and response.\",\"url\":\"https://docs.hitheo.ai/api-reference/completions/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hitheo.ai/api-reference/completions/create#webpage\"},\"dateModified\":\"2026-10-15T15:26:06.822Z\",\"publisher\":{\"@id\":\"https://docs.hitheo.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hitheo.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Theo API Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Theo API Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/completions/create.md","siteName":"Theo API Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference Overview","href":"/api-reference/overview"},{"title":"Authentication","description":"API key authentication for all Theo API endpoints.","href":"/api-reference/authentication"}]},{"group":"Completions","pages":[{"title":"Create Completion","api":"POST /api/v1/completions","href":"/api-reference/completions/create"},{"title":"Streaming Completions","description":"Full SSE event schemas, wire format, and error semantics.","href":"/api-reference/completions/streaming"},{"title":"OpenAI-Compatible Chat Completions","api":"POST /api/v1/chat/completions","href":"/api-reference/completions/openai-compat"}]},{"group":"Media Generation","pages":[{"title":"Generate Images","api":"POST /api/v1/images","href":"/api-reference/images/generate"},{"title":"Generate Video","api":"POST /api/v1/video","href":"/api-reference/video/generate"},{"title":"Generate Code","api":"POST /api/v1/code","href":"/api-reference/code/generate"},{"title":"Create Research","api":"POST /api/v1/research","href":"/api-reference/research/create"},{"title":"Generate Document","api":"POST /api/v1/documents","href":"/api-reference/documents/generate"}]},{"group":"Audio","pages":[{"title":"Text to Speech","api":"POST /api/v1/audio/tts","href":"/api-reference/audio/text-to-speech"},{"title":"Speech to Text","api":"POST /api/v1/audio/stt","href":"/api-reference/audio/speech-to-text"}]},{"group":"Skills API","pages":[{"title":"List Skills","api":"GET /api/v1/skills","href":"/api-reference/skills/list"},{"title":"Install Skill","api":"POST /api/v1/skills","href":"/api-reference/skills/install"},{"title":"Create Skill","api":"POST /api/v1/skills/create","href":"/api-reference/skills/create"},{"title":"Submit Skill","api":"POST /api/v1/skills/submit","href":"/api-reference/skills/submit"},{"title":"Get Skill","api":"GET /api/v1/skills/{id}","href":"/api-reference/skills/get"},{"title":"Skill Versions","api":"GET /api/v1/skills/{id}/versions","href":"/api-reference/skills/versions"},{"title":"Skill Reviews","api":"GET /api/v1/skills/{id}/reviews","href":"/api-reference/skills/reviews"}]},{"group":"Skill Builder","pages":[{"title":"Canvases","href":"/api-reference/evi/canvases"},{"title":"Compile Canvas","href":"/api-reference/evi/compile"},{"title":"Test Canvas","href":"/api-reference/evi/test"},{"title":"Publish Canvas","href":"/api-reference/evi/publish"}]},{"group":"Workflows","pages":[{"title":"List Workflows","api":"GET /api/v1/workflows","href":"/api-reference/workflows/list"},{"title":"Create Workflow","api":"POST /api/v1/workflows","href":"/api-reference/workflows/create"},{"title":"Get Workflow","api":"GET /api/v1/workflows/{id}","href":"/api-reference/workflows/get"},{"title":"Update Workflow","api":"PATCH /api/v1/workflows/{id}","href":"/api-reference/workflows/update"},{"title":"Run Workflow","api":"POST /api/v1/workflows/{id}/run","href":"/api-reference/workflows/run"},{"title":"Delete Workflow","api":"DELETE /api/v1/workflows/{id}","href":"/api-reference/workflows/delete"}]},{"group":"Hooks","pages":[{"title":"Create Hook","api":"POST /api/v1/hooks","href":"/api-reference/hooks/create"},{"title":"List Hooks","api":"GET /api/v1/hooks","href":"/api-reference/hooks/list"},{"title":"Get Hook Executions","api":"GET /api/v1/hooks/{id}","href":"/api-reference/hooks/get"},{"title":"Update Hook","api":"PATCH /api/v1/hooks/{id}","href":"/api-reference/hooks/update"},{"title":"Delete Hook","api":"DELETE /api/v1/hooks/{id}","href":"/api-reference/hooks/delete"}]},{"group":"Settings","pages":[{"title":"Get Settings","api":"GET /api/v1/settings","href":"/api-reference/settings/get"},{"title":"Update Settings","api":"PATCH /api/v1/settings","href":"/api-reference/settings/update"}]},{"group":"Embed Widgets","pages":[{"title":"Create Iframe Widget","api":"POST /api/v1/iframes","href":"/api-reference/iframes/create"},{"title":"List Iframe Widgets","api":"GET /api/v1/iframes","href":"/api-reference/iframes/list"},{"title":"Get Widget","api":"GET /api/v1/iframes/{id}","href":"/api-reference/iframes/get"},{"title":"Update Widget","api":"PATCH /api/v1/iframes/{id}","href":"/api-reference/iframes/update"},{"title":"Delete Widget","api":"DELETE /api/v1/iframes/{id}","href":"/api-reference/iframes/delete"},{"title":"Duplicate Widget","api":"POST /api/v1/iframes/{id}/duplicate","href":"/api-reference/iframes/duplicate"},{"title":"Bulk Delete Widgets","api":"POST /api/v1/iframes/bulk-delete","href":"/api-reference/iframes/bulk-delete"},{"title":"Widget Analytics","api":"GET /api/v1/iframes/{id}/analytics","href":"/api-reference/iframes/analytics"},{"title":"List Widget Leads","api":"GET /api/v1/iframes/{id}/leads","href":"/api-reference/iframes/leads"},{"title":"Export Widget Leads (CSV)","api":"GET /api/v1/iframes/{id}/leads/export","href":"/api-reference/iframes/leads-export"},{"title":"List Widget Conversations","api":"GET /api/v1/iframes/{id}/conversations","href":"/api-reference/iframes/conversations"},{"title":"Get Widget Conversation","api":"GET /api/v1/iframes/{id}/conversations/{sessionId}","href":"/api-reference/iframes/conversation"},{"title":"Post Operator Message","api":"POST /api/v1/iframes/{id}/conversations/{sessionId}/messages","href":"/api-reference/iframes/operator-message"},{"title":"Take Over Session","api":"POST /api/v1/iframes/{id}/conversations/{sessionId}/takeover","href":"/api-reference/iframes/takeover"},{"title":"Release Session","api":"POST /api/v1/iframes/{id}/conversations/{sessionId}/release","href":"/api-reference/iframes/release"},{"title":"Verify Widget Installation","api":"POST /api/v1/iframes/{id}/verify","href":"/api-reference/iframes/verify"}]},{"group":"Guardrails","pages":[{"title":"List Guardrail Policies","api":"GET /api/v1/guardrail-policies","href":"/api-reference/guardrails/list-policies"},{"title":"Create Guardrail Policy","api":"POST /api/v1/guardrail-policies","href":"/api-reference/guardrails/create-policy"},{"title":"Get, Update, or Delete a Policy","api":"GET/PATCH/DELETE /api/v1/guardrail-policies/{id}","href":"/api-reference/guardrails/get-policy"},{"title":"Replay a Prompt Through a Policy","api":"POST /api/v1/guardrail-policies/{id}/test","href":"/api-reference/guardrails/test-policy"},{"title":"List Keys Bound to a Policy","api":"GET /api/v1/guardrail-policies/{id}/bindings","href":"/api-reference/guardrails/policy-bindings"},{"title":"List Preset Templates","api":"GET /api/v1/guardrail-policies/presets","href":"/api-reference/guardrails/presets"},{"title":"Get or Set an API Key's Guardrail Binding","api":"GET/PUT /api/v1/keys/{id}/guardrails","href":"/api-reference/guardrails/key-binding"},{"title":"List Guardrail Executions","api":"GET /api/v1/guardrail-executions","href":"/api-reference/guardrails/executions"}]},{"group":"Routing Studio","pages":[{"title":"List Routing Preferences","api":"GET /api/v1/routing-preferences","href":"/api-reference/routing-preferences/list-preferences"},{"title":"Create Routing Preference","api":"POST /api/v1/routing-preferences","href":"/api-reference/routing-preferences/create-preference"},{"title":"Get, Update, or Delete a Preference","api":"GET/PATCH/DELETE /api/v1/routing-preferences/{id}","href":"/api-reference/routing-preferences/get-preference"},{"title":"Replay a Prompt Through a Preference","api":"POST /api/v1/routing-preferences/{id}/test · POST /api/v1/routing-preferences/test","href":"/api-reference/routing-preferences/test-preference"},{"title":"List Preset Templates","api":"GET /api/v1/routing-preferences/presets","href":"/api-reference/routing-preferences/presets"},{"title":"Record a Routing Correction","api":"POST /api/v1/routing-preferences/corrections","href":"/api-reference/routing-preferences/corrections"},{"title":"Suggest a Rule From Corrections","api":"POST /api/v1/routing-preferences/suggest-rule","href":"/api-reference/routing-preferences/suggest-rule"},{"title":"Manage a Key's Routing Rules","api":"GET/PUT/DELETE /api/v1/keys/{id}/routing-rules","href":"/api-reference/routing-preferences/key-routing-rules"},{"title":"Bind a Shared Preference to a Key","api":"GET/PUT /api/v1/keys/{id}/routing-preference","href":"/api-reference/routing-preferences/key-routing-preference"},{"title":"Inspect a Key's Effective Routing","api":"GET /api/v1/keys/{id}/effective-routing","href":"/api-reference/routing-preferences/effective-routing"}]},{"group":"Theo Browser","pages":[{"title":"Browser Sessions","href":"/api-reference/browser/sessions"},{"title":"Embed the Theo Browser","href":"/api-reference/browser/embed"}]},{"group":"Benchmarks","pages":[{"title":"Get Benchmarks","api":"GET /api/v1/benchmarks","href":"/api-reference/benchmarks/get"}]},{"group":"Webhooks","pages":[{"title":"Create Webhook","api":"POST /api/v1/webhooks","href":"/api-reference/webhooks/create"},{"title":"List Webhooks","api":"GET /api/v1/webhooks","href":"/api-reference/webhooks/list"},{"title":"Update Webhook","api":"PATCH /api/v1/webhooks/{id}","href":"/api-reference/webhooks/update"},{"title":"Delete Webhook","api":"DELETE /api/v1/webhooks/{id}","href":"/api-reference/webhooks/delete"},{"title":"Test Webhook","api":"POST /api/v1/webhooks/{id}/test","href":"/api-reference/webhooks/test"},{"title":"List Deliveries","api":"GET /api/v1/webhooks/{id}/deliveries","href":"/api-reference/webhooks/deliveries"},{"title":"Retry Delivery","api":"POST /api/v1/webhooks/{id}/deliveries/{deliveryId}/retry","href":"/api-reference/webhooks/retry"},{"title":"Rotate Secret","api":"POST /api/v1/webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-secret"},{"title":"Webhook Stats","api":"GET /api/v1/webhooks/{id}/stats","href":"/api-reference/webhooks/stats"}]},{"group":"Billing","pages":[{"title":"Create a top-up checkout","api":"POST /api/v1/billing/checkout","href":"/api-reference/billing/checkout"},{"title":"Open the billing portal","api":"POST /api/v1/billing/portal","href":"/api-reference/billing/portal"},{"title":"Get Usage","api":"GET /api/v1/usage","href":"/api-reference/usage/get"},{"title":"Export Usage (CSV)","api":"GET /api/v1/usage/export","href":"/api-reference/usage/export"}]},{"group":"Resources","pages":[{"title":"List Models","api":"GET /api/v1/models","href":"/api-reference/models/list"},{"title":"List Tools","api":"GET /api/v1/tools","href":"/api-reference/tools/list"},{"title":"List Conversations","api":"GET /api/v1/conversations","href":"/api-reference/conversations/list"},{"title":"Get Conversation","api":"GET /api/v1/conversations/{id}","href":"/api-reference/conversations/get"},{"title":"Get Job Status","api":"GET /api/v1/jobs/{id}","href":"/api-reference/jobs/get"},{"title":"Publish Event","api":"POST /api/v1/events","href":"/api-reference/events/publish"},{"title":"Create Organization","api":"POST /api/v1/orgs","href":"/api-reference/organizations/create"},{"title":"Create API Key","api":"POST /api/v1/keys","href":"/api-reference/keys/create"},{"title":"Key Skill Binding","api":"GET /api/v1/keys/{id}/skills","href":"/api-reference/keys/skills"},{"title":"Key Model Allowlist","api":"GET /api/v1/keys/{id}/models","href":"/api-reference/keys/models"},{"title":"Key Model Plan","api":"GET /api/v1/keys/{id}/model-plan","href":"/api-reference/keys/model-plan"},{"title":"Key Orchestrator Graph","api":"GET /api/v1/keys/{id}/orchestrator-graph","href":"/api-reference/keys/orchestrator-graph"},{"title":"Custom Providers","api":"POST /api/v1/custom-providers","href":"/api-reference/custom-providers/manage"},{"title":"List Audit Events","api":"GET /api/v1/audit","href":"/api-reference/audit/list"},{"title":"Export Audit Log (CSV)","api":"GET /api/v1/audit/export","href":"/api-reference/audit/export"},{"title":"Health Check","api":"GET /api/v1/health","href":"/api-reference/health/check"}]}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/sdk-reference/installation"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli-reference/overview"}]}]},{"language":"es","pages":[{"title":"es","href":"/es/changelog"}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/completions/create"}]},{"language":"zh-HK","pages":[{"title":"zh-HK","href":"/zh-HK/api-reference/completions/create"}]}]},"basePath":"","title":"Create Completion - Theo API Docs","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":["c2aa737661","b0f84f53ff","2b790eda92"],"chunks":["OpenApiReferenceProvider-CaRkHcld.js","snippetPresets-CbOVSLWB.js","utils-cjri0g4r.js","style-to-object-BY3JEAdk.js","utils-DINdUa17.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-B6z-PJGf.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BldndzCM.js","_Uint8Array-BFUkDgJK.js","isObject-FP1Yky1u.js","Page-DuvGhd6e.js","api-description-markdown-ja0XM5Ae.js","DynamicMarkdown-DgKZ4_wp.js","CodeSnippet-BtGQRZnK.js","use-playground-group-access-98JyaSW7.js","SectionHeading-S4Jc_qPe.js","ApiExamples-gah5G0c1.js","usePlaygroundInputsStore-DMbftGRK.js","shallow-BPuQ-dV8.js","isEqual-Du6c450V.js","CodeSnippets-BSVM0Ibi.js","MethodPill-HIsDH_bI.js","getPastedJson-BKEmMYEO.js","Check2Icon-CRFAnWm9.js","axios-CsQoIw0U.js"]}