System One models answer typed questions about a piece of content instead of generating text. Each
answer is a calibrated probability, a choice among options, or a level on a scale, so software can
act on it directly. The endpoint follows the TypeSafe System One protocol, so the official TypeSafe
SDKs work with Phala by changing the base URL.System One models list decisions in output_modalities in GET /v1/models.
They do not serve chat: a chat completion request to one returns 404 model_not_found. Responses are
never streamed.
Questions keyed by an id you choose. Each answer is returned under the same id. Every question
has a type and usually instructions that state the question.
curl https://inference.phala.com/v1/systemone \ -H "Authorization: Bearer $PHALA_AI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "jaredpalmer/kev-4b", "state": "I was charged twice this month. Please fix it today.", "questions": { "billing": { "type": "noul", "instructions": "Is this about billing?" }, "tone": { "type": "choice", "instructions": "What is the tone?", "criteria": { "calm": null, "upset": null } }, "urgency": { "type": "score", "instructions": "How urgent is it?", "criteria": ["low", "medium", "high"] } } }'
import osfrom typesafe_sdk import Choice, Noul, Score, TypeSafeClientclient = TypeSafeClient( api_key=os.environ["PHALA_AI_API_KEY"], base_url="https://inference.phala.com", model="jaredpalmer/kev-4b",)result = client.system_one( state="I was charged twice this month. Please fix it today.", questions={ "billing": Noul(instructions="Is this about billing?"), "tone": Choice(instructions="What is the tone?", criteria={"calm": None, "upset": None}), "urgency": Score(instructions="How urgent is it?", criteria=["low", "medium", "high"]), },)print(result.nouls["billing"].noul, result.choices["tone"].choice, result.scores["urgency"].score)
import { TypeSafeClient, choice, noul, score } from "@typesafe-ai/sdk";const client = new TypeSafeClient({ baseURL: "https://inference.phala.com", apiKey: process.env.PHALA_AI_API_KEY,});const result = await client.systemOne({ model: "jaredpalmer/kev-4b", state: "I was charged twice this month. Please fix it today.", questions: { billing: noul("Is this about billing?"), tone: choice("What is the tone?", { calm: null, upset: null }), urgency: score("How urgent is it?", ["low", "medium", "high"]), },});console.log(result.answers.billing.noul, result.answers.tone.choice, result.answers.urgency.score);
The SDKs append /v1/systemone themselves, so set their base URL to https://inference.phala.com
without /v1. Install them with pip install typesafe-sdk or npm install @typesafe-ai/sdk.
input_tokens, output_tokens, and cost, the charge for this request in USD.
The response carries x-typesafe-request-id, which the SDKs read, and the gateway’s x-receipt-id
for receipt verification. Errors use the same error format as the other
endpoints.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Phala","colors":{"primary":"#527a08","light":"#527a08","dark":"#cdfa50"},"logo":{"light":"https://mintcdn.com/phalanetwork-1606097b/Y2wR1-jOsoYpAL6q/images/phala-light.png?fit=max\u0026auto=format\u0026n=Y2wR1-jOsoYpAL6q\u0026q=85\u0026s=fb4f438a36865810867d188289681376","dark":"https://mintcdn.com/phalanetwork-1606097b/Y2wR1-jOsoYpAL6q/images/phala-dark.png?fit=max\u0026auto=format\u0026n=Y2wR1-jOsoYpAL6q\u0026q=85\u0026s=c80d03f4a9b6db1a9aa8f435a980a7a3"},"favicon":"https://mintcdn.com/phalanetwork-1606097b/RUscSf7Rplq7j02n/favicon.ico?fit=max\u0026auto=format\u0026n=RUscSf7Rplq7j02n\u0026q=85\u0026s=701b1391404cffa588fcc80dd945d79e","navbar":{"links":[{"href":"https://github.com/Phala-Network/phala-cloud","label":"GitHub"},{"href":"https://cloud.phala.com/login","label":"Log in"}],"primary":{"type":"button","label":"API Dashboard","href":"https://cloud.phala.com"}},"footer":{"socials":{"discord":"https://phala.com/discord","github":"https://phala.com/github","linkedin":"https://phala.com/linkedin","x":"https://phala.com/x"},"links":[{"header":"Phala Cloud","items":[{"label":"Getting Started","href":"https://docs.phala.network/phala-cloud/getting-started/overview"},{"label":"TEEs, Attestation \u0026 Zero Trust Security","href":"https://docs.phala.network/phala-cloud/attestation/overview"},{"label":"Phala Cloud User Guides","href":"https://docs.phala.network/phala-cloud/phala-cloud-user-guides/create-cvm/overview"},{"label":"Be Production Ready","href":"https://docs.phala.network/phala-cloud/be-production-ready/overview"},{"label":"Use Cases","href":"https://docs.phala.network/phala-cloud/use-cases/overview"},{"label":"References","href":"https://docs.phala.network/phala-cloud/references/overview"},{"label":"Private AI","href":"https://docs.phala.network/phala-cloud/gpu-tee/llm-in-tee"},{"label":"FAQs","href":"https://docs.phala.network/phala-cloud/faqs"}]},{"header":"dstack","items":[{"label":"Overview","href":"https://docs.phala.network/dstack/overview"},{"label":"Local Development","href":"https://docs.phala.network/dstack/local-development"},{"label":"Getting Started","href":"https://docs.phala.network/dstack/getting-started"},{"label":"Hardware Requirements","href":"https://docs.phala.network/dstack/hardware-requirements"},{"label":"Acknowledgement","href":"https://docs.phala.network/dstack/acknowledgement"},{"label":"FAQs","href":"https://docs.phala.network/dstack/faqs"},{"label":"Design Documents","href":"https://docs.phala.network/dstack/design-documents"},{"label":"Cloud Overview","href":"https://docs.phala.network/dstack-cloud/overview"},{"label":"Cloud Quick Start","href":"https://docs.phala.network/dstack-cloud/get-started"}]},{"header":"Private AI","items":[{"label":"LLM in GPU TEE","href":"https://docs.phala.network/phala-cloud/confidential-ai/overview"},{"label":"GPU TEE Inference API","href":"https://docs.phala.network/phala-cloud/confidential-ai/confidential-model/confidential-ai-api"},{"label":"Benchmark","href":"https://docs.phala.network/phala-cloud/confidential-ai/benchmark"},{"label":"FAQs","href":"https://docs.phala.network/phala-cloud/confidential-ai/faqs"}]},{"header":"Network","items":[{"label":"Overview","href":"https://docs.phala.network/network/index"},{"label":"Phala Network","href":"https://docs.phala.network/network/overview/phala-network"},{"label":"Staking","href":"https://docs.phala.network/network/overview/phala-staking"},{"label":"Compute Providers","href":"https://docs.phala.network/network/compute-providers/introduction"}]}]},"seo":{"metatags":{"author":"Phala Cloud","canonical":"https://docs.phala.com","category":"Technology","distribution":"global","keywords":"Phala Cloud, TEE, Trusted Execution Environment, Confidential Computing, Private AI, confidential AI, GPU TEE, Intel TDX, dstack, blockchain, privacy-preserving computing, secure cloud, attestation","language":"en","og:image":"https://raw.githubusercontent.com/Phala-Network/phala-docs/main/images/phala-docs-og.png","og:image:alt":"Phala Cloud — Confidential Computing \u0026 GPU TEE for AI","og:image:width":"1200","og:image:height":"630","og:site_name":"Phala Docs","og:type":"website","og:title":"Phala Cloud Documentation — Private AI on TEE","og:description":"Deploy confidential AI applications on Phala Cloud with hardware-level privacy via Intel TDX, NVIDIA H100 GPU TEE, and verifiable attestation.","robots":"index, follow","twitter:card":"summary_large_image","twitter:creator":"@PhalaNetwork","twitter:site":"@PhalaNetwork","twitter:image":"https://raw.githubusercontent.com/Phala-Network/phala-docs/main/images/phala-docs-og.png","twitter:title":"Phala Cloud Documentation — Private AI on TEE","twitter:description":"Deploy confidential AI applications on Phala Cloud with hardware-level privacy via Intel TDX, NVIDIA H100 GPU TEE, and verifiable attestation."},"indexing":"all"},"icons":{"library":"lucide"},"styling":{"codeblocks":"system","latex":true},"integrations":{"ga4":{"measurementId":"G-RHRW9RL5LG"},"gtm":{"tagId":"GTM-TX3VQZP"}},"errors":{"404":{"redirect":false}},"contextual":{"options":["copy","view","chatgpt","claude","mcp"],"display":"header"},"thumbnails":{"background":"https://mintcdn.com/phalanetwork-1606097b/Z_xV6g4Cdei2rfqm/images/phala-docs-og.png?fit=max\u0026auto=format\u0026n=Z_xV6g4Cdei2rfqm\u0026q=85\u0026s=e0d65106aa4afa7766452b497d5ec9ca"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"phalanetwork-1606097b","hasAudioNarration":false,"actualSubdomain":"phalanetwork-1606097b","customDomains":["docs.phala.com"],"gitSource":{"type":"github","owner":"phala-network","repo":"phala-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ade6b7e757645e9e4c8ffc5","collectionId":"b227475d-0896-46d2-a1ca-87d98f19e112","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ade6b7e757645e9e4c8ffc5"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ade772b53c1438f0e67b0a1","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Phala Cloud","count":630},{"language":"default","tag":"API \u0026 SDK","count":158},{"language":"default","tag":"Phala Cloud API","count":105},{"language":"default","tag":"Private AI","count":88},{"language":"default","tag":"Phala Cloud CLI","count":82},{"language":"default","tag":"CVMs","count":51},{"language":"default","tag":"Resources","count":41},{"language":"default","tag":"dstack Cloud","count":22},{"language":"default","tag":"JavaScript SDK","count":22},{"language":"default","tag":"Apps","count":18}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"fonts.css","content":"@font-face{font-family:\"ABCArizonaFlare\";src:url(/fonts/exa/ABCArizonaFlare-Regular.woff2) format(\"woff2\");font-style:normal;font-weight:400 700;font-display:block}@font-face{font-family:\"ABCDiatype\";src:url(/fonts/exa/ABCDiatype-Regular.woff2) format(\"woff2\");font-style:normal;font-weight:400 700;font-display:block}@font-face{font-family:\"SuisseIntlMono\";src:url(/fonts/exa/SuisseIntlMono-Regular-WebTrial.woff2) format(\"woff2\");font-style:normal;font-weight:400 700;font-display:block}@font-face{font-family:\"ABCArizonaFlare Fallback\";src:local(\"Georgia\"),local(\"Times New Roman\");size-adjust:94%;ascent-override:95%;descent-override:22%;line-gap-override:0%}@font-face{font-family:\"ABCDiatype Fallback\";src:local(\"Trebuchet MS\"),local(\"Arial\");size-adjust:97%;ascent-override:92%;descent-override:23%;line-gap-override:0%}@font-face{font-family:\"SuisseIntlMono Fallback\";src:local(\"SFMono-Regular\"),local(\"Consolas\"),local(\"Menlo\"),local(\"Liberation Mono\");size-adjust:100%;ascent-override:90%;descent-override:22%;line-gap-override:0%}:root{--v3-heading:\"ABCArizonaFlare\", \"ABCArizonaFlare Fallback\", Georgia, serif;--v3-body:\"ABCDiatype\", \"ABCDiatype Fallback\", \"Trebuchet MS\", Arial,\n sans-serif;--v3-mono:\"SuisseIntlMono\", \"SuisseIntlMono Fallback\", \"SFMono-Regular\",\n Consolas, monospace}body,button,input,select,textarea{font-family:var(--v3-body)}h1,h2,h3,h4,h5,h6{font-family:var(--v3-heading);font-weight:400;letter-spacing:0}h3,h4,h5,h6{font-family:var(--v3-body);font-weight:600}.font-mono,code,kbd,pre,samp{font-family:var(--v3-mono)}"},{"filePath":"style.css","content":":root{--base-50:oklch(0.983 0.0034 145.55);--base-100:oklch(0.9691 0.0037 146.57);--base-200:oklch(0.9258 0.0048 147.01);--base-300:oklch(0.869 0.0054 148);--base-400:oklch(0.7067 0.0061 149.29);--base-500:oklch(0.5535 0.0066 150.55);--base-600:oklch(0.4449 0.0065 151.33);--base-700:oklch(0.3731 0.0059 150.75);--base-800:oklch(0.2731 0.0051 150.35);--base-900:oklch(0.2123 0.0048 151.01);--base-950:oklch(0.1386 0.0044 150.49);--base-1000:oklch(0.0909 0.0041 150.95);--primary-300:#cdfa50;--primary-500:oklch(0.7708 0.2308 126.52);--primary-600:oklch(0.6514 0.1967 127.14);--primary-700:oklch(0.5343 0.1568 126.91);--phala-blue-50:#f0f2ff;--phala-blue-100:#d5dbf8;--phala-blue-200:#bfc8f0;--phala-blue-300:#aabbff;--phala-blue-500:#6b80cc;--phala-blue-900:#2d3250;--phala-purple-300:#b88fd0;--phala-purple-500:#7e3daf;--phala-orange-300:#f5902c;--surface-marketing:#f7f8f3;--surface-marketing-cool:#f0f1ec;--surface-marketing-light:#fbfcf8;--surface-trust-path:#070908;--surface-trust-card:#101310;--radius:4px}[class*=button],button{border-radius:4px!important}.code,[class*=Callout],[class*=Card],[class*=Frame],[class*=Info],[class*=Note],[class*=Tip],[class*=Update],[class*=Warning]{border-radius:0!important}[class*=Badge]:not([class*=Dot]),[class*=Pill],[class*=badge]:not([class*=dot]),[class*=pill]{border-radius:4px!important}.callout,.card,[class*=Callout],[class*=Card]:not([class*=card-group]),[class*=Frame],[class*=Info],[class*=Note],[class*=Tip],[class*=Update],[class*=Warning]{box-shadow:none!important;border-width:1px!important}.card-group,[class*=card-group]{border:0!important;background:0 0!important;box-shadow:none!important;padding:0!important;border-radius:0!important;gap:1px!important}.btn,a[role=button],button.button,button[data-component=button]{min-height:44px;padding-inline:1rem;border-radius:4px!important;box-shadow:none!important;font-family:var(--v3-body, \"ABCDiatype\", \"Trebuchet MS\", Arial, sans-serif);font-weight:500;letter-spacing:0;transition:opacity 150ms ease,background-color 150ms ease,border-color 150ms ease}.btn:hover,a[role=button]:hover,button.button:hover,button[data-component=button]:hover{opacity:.9;box-shadow:none!important}@media (min-width:1024px){#sidebar,[class*=sidebar-content],aside.sidebar,aside[id=sidebar]{padding-top:1rem!important}}.sidebar-group-header{font-family:var(--v3-body, \"ABCDiatype\", sans-serif)!important;font-size:14px!important;font-weight:600!important;letter-spacing:0!important;color:var(--base-800)!important;margin-top:1.75rem!important;margin-bottom:.5rem!important}.sidebar-group-header:first-child{margin-top:0!important}.dark .sidebar-group-header,[data-theme=dark] .sidebar-group-header{color:var(--base-100)!important}.sidebar-group li>a,.sidebar-group li>button,li[data-title]>a,li[id^=\"/\"]>a{font-size:13.5px!important;font-weight:400!important;color:var(--base-600)!important;border-radius:4px!important;outline:0!important;outline-offset:0!important}.sidebar-group li>a:hover,.sidebar-group li>button:hover,li[data-title]>a:hover,li[id^=\"/\"]>a:hover{color:var(--primary-700)!important;background-color:rgba(0,0,0,.03)!important}.sidebar-group li>a:hover svg,.sidebar-group li>button:hover svg,li[data-title]>a:hover svg,li[id^=\"/\"]>a:hover svg{color:var(--primary-700)!important;background-color:var(--primary-700)!important}.dark li[data-title]>a,.dark li[id^=\"/\"]>a,[data-theme=dark] li[id^=\"/\"]>a{color:var(--base-400)!important}.dark li[data-title]>a:hover,.dark li[id^=\"/\"]>a:hover,[data-theme=dark] li[id^=\"/\"]>a:hover{color:var(--primary-300)!important;background-color:rgba(255,255,255,.05)!important}a[aria-current=page],li[data-active=true]>a{background-image:none!important;font-weight:500!important;text-shadow:none!important;border-radius:4px!important;--tw-bg-opacity:1!important}a[aria-current=page],li[data-active=true]>a,li[data-active=true]>a:hover{background-color:var(--surface-marketing-cool)!important;color:var(--base-800)!important}.dark a[aria-current=page],.dark li[data-active=true]>a,[data-theme=dark] li[data-active=true]>a{background-color:rgba(255,255,255,.08)!important;color:var(--base-100)!important}.nav-tabs-item[data-active=true],a.nav-tabs-item[data-active=true]{color:var(--primary-700)!important}@media (min-width:768px){#table-of-contents-layout{display:flex!important}}#table-of-contents-layout{border-left:1px solid var(--base-200);padding-left:1.25rem!important}.dark #table-of-contents-layout,[data-theme=dark] #table-of-contents-layout{border-left-color:var(--base-800)}#table-of-contents h2{font-size:14px!important;margin:0!important}#table-of-contents h2 button,#table-of-contents-layout #table-of-contents>:first-child:not(nav):not(ul):not(ol),#table-of-contents-layout>:first-child:not(:has(#table-of-contents)):not(nav):not(ul):not(ol),#table-of-contents-layout>:first-child>:first-child:not(#table-of-contents):not(nav):not(ul):not(ol),#table-of-contents>button{font-family:var(--font-sans, \"Inter\", system-ui, sans-serif)!important;font-size:14px!important;line-height:1.25rem!important;font-weight:500!important;letter-spacing:0!important;text-transform:none!important;color:var(--base-600)!important}#table-of-contents-layout #table-of-contents>:first-child:not(nav):not(ul):not(ol) :is(span, div, p, h2, h3, h4, h5, h6),#table-of-contents-layout>:first-child:not(:has(#table-of-contents)):not(nav):not(ul):not(ol) :is(span, div, p, h2, h3, h4, h5, h6),#table-of-contents-layout>:first-child>:first-child:not(#table-of-contents):not(nav):not(ul):not(ol) :is(span, div, p, h2, h3, h4, h5, h6){font:inherit!important;letter-spacing:inherit!important;text-transform:inherit!important;color:inherit!important;line-height:inherit!important}.toc-item>a{font-size:13px!important;letter-spacing:0!important;text-transform:none!important;font-family:var(--font-sans, \"Inter\", system-ui, sans-serif)!important;color:var(--base-600)!important}.toc-item>a:hover{color:var(--base-800)!important}.toc a[aria-current=true],.toc-item.is-active>a,.toc-item[data-active=true]>a{color:var(--primary-700)!important;font-weight:500!important}.toc-item[data-depth=\"1\"]{padding-left:1rem}.dark .toc-item>a,[data-theme=dark] .toc-item>a{color:var(--base-400)!important}.eyebrow,.eyebrow.text-primary,[class*=eyebrow][class*=text-primary]{color:var(--primary-600)!important}.dark .eyebrow,.dark .eyebrow.text-primary,[data-theme=dark] .eyebrow{color:var(--primary-300)!important}article .text-primary,article [class*=text-primary]:not([class*=\"dark:\"]),article [class~=text-primary],main .text-primary,main [class~=text-primary]{color:var(--primary-700)!important}html:not(.dark) body:not(.dark) :is(main, article) [class*=cdfa50],html:not(.dark) body:not(.dark) :is(main, article) [style*=cdfa50 i]{color:var(--primary-700)!important}article .bg-primary,article [class*=bg-primary]:not([class*=\"dark:\"]),article [class~=bg-primary],main .bg-primary,main [class~=bg-primary]{background-color:var(--primary-700)!important}.dark .code-group [role=tab][data-state=active],.dark article .text-primary,.dark article [class~=text-primary],.dark main .text-primary,[data-theme=dark] .code-group [role=tab][data-state=active],[data-theme=dark] article .text-primary,[data-theme=dark] article [class~=text-primary],[data-theme=dark] main .text-primary{color:var(--primary-300)!important}.dark article .bg-primary,.dark article [class~=bg-primary],.dark main .bg-primary,[data-theme=dark] article .bg-primary,[data-theme=dark] article [class~=bg-primary],[data-theme=dark] main .bg-primary{background-color:var(--primary-300)!important}[class*=Content],[class*=content],article,main{max-width:100%}:is(main, article) h1,:is(main, article) h2{font-size:32px!important;line-height:1.16!important;font-weight:500!important;letter-spacing:0!important;margin-bottom:1rem!important}:is(main, article) h2{font-size:22px!important;line-height:1.26!important;margin-top:2.25rem!important;margin-bottom:.85rem!important}:is(main, article) h3{font-size:18px!important;line-height:1.3!important;margin-top:1.75rem!important;margin-bottom:.65rem!important}:is(main, article) h3,:is(main, article) h4,:is(main, article) h5,:is(main, article) h6{font-weight:600!important;letter-spacing:0!important}li,p{font-size:15px;line-height:1.65}:not(pre)>code{font-family:var(--v3-mono, \"SuisseIntlMono\", monospace);font-size:.92em;border:1px solid var(--base-200);border-radius:2px;padding:1px 5px}pre{border-radius:0!important;font-family:var(--v3-mono, \"SuisseIntlMono\", monospace);font-size:13px;line-height:1.6}.code-block,div[class~=code-block]{border-radius:0!important;box-shadow:none!important;overflow:hidden!important}.code-group,div[class~=code-group]{overflow:hidden!important}div[class~=code-group]{border-radius:0!important;box-shadow:none!important}.code-block-background,.code-group,[class*=code-block-background]{border-radius:0!important;box-shadow:none!important;background-color:var(--phala-blue-50)!important}.code-block-background,[class*=code-block-background]{border:0!important}.dark .code-block-background,.dark .code-group,[data-theme=dark] .code-block-background,[data-theme=dark] .code-group{background-color:var(--surface-trust-card)!important}.code-group [role=tab][aria-selected=true],.code-group [role=tab][data-state=active]{color:var(--primary-600)!important}.code-group [role=tab][data-state=active]>div:first-child{color:var(--primary-600)!important}.code-group [role=tab][data-state=active]>div.absolute,.code-group [role=tab][data-state=active]>div[class*=absolute][class*=bottom]{background-color:var(--primary-600)!important;border-radius:0!important}.dark .code-group [role=tab][data-state=active]>div.absolute,[data-theme=dark] .code-group [role=tab][data-state=active]>div.absolute{background-color:var(--primary-300)!important}[data-fade-overlay]{display:none!important}.card,.card:hover{box-shadow:none!important}.card{border-radius:0!important;--tw-ring-shadow:0 0 #0000!important;--tw-ring-offset-shadow:0 0 #0000!important}.card:hover{border-color:var(--primary-600)!important}.card .text-primary,.card svg.bg-primary,.card svg[class*=bg-primary]:not([class*=primary-light]){background-color:var(--primary-600)!important;color:var(--primary-600)!important}.dark .card svg.bg-primary,.dark .card svg[class*=bg-primary],[data-theme=dark] .card svg.bg-primary{background-color:var(--primary-300)!important;color:var(--primary-300)!important}.callout{border-radius:0!important;background-color:var(--card, #ffffff)!important;border-width:0!important;border-left:4px solid var(--phala-blue-500)!important;padding:1rem 1.25rem!important;box-shadow:none!important}.callout[data-callout-type=warning]{border-left-color:var(--phala-orange-300)!important}.callout[data-callout-type=info],.callout[data-callout-type=tip]{border-left-color:var(--phala-blue-500)!important}.callout[data-callout-type=tip]{background-color:var(--phala-blue-300)!important}.callout [data-component-part=callout-content],.callout [data-component-part=callout-content] *{color:var(--base-800)!important}.callout [data-component-part=callout-content]>span:first-child>strong:only-child{font-family:var(--v3-mono, \"SuisseIntlMono\", monospace);font-size:11px;font-weight:400;letter-spacing:.08em;text-transform:uppercase;display:block;margin-bottom:.25rem;color:var(--base-600)!important}.callout[data-callout-type=warning] [data-component-part=callout-content] strong{font-weight:400}.callout [data-component-part=callout-icon] svg{color:var(--base-600)!important;opacity:.7}a[href*=\"cloud.phala.com\"]>span.absolute,a[href*=\"cloud.phala.com\"]>span[class*=absolute][class*=inset-0]{background-color:var(--primary-300)!important;background-image:none!important;border-radius:4px!important;box-shadow:none!important}a[href*=\"cloud.phala.com\"] .z-10,a[href*=\"cloud.phala.com\"] span[class*=text-white]{color:#000!important}a[href*=\"cloud.phala.com\"] span[class*=text-white]~svg,a[href*=\"cloud.phala.com\"] svg path,a[href*=\"cloud.phala.com\"] svg.text-white\\/90,a[href*=\"cloud.phala.com\"] svg[class*=text-white]{color:#000!important;stroke:#000!important}a[href*=\"cloud.phala.com\"][target=_blank]{font-family:var(--v3-body, \"ABCDiatype\", sans-serif);font-weight:500;letter-spacing:0}a[href*=\"cloud.phala.com\"]:hover>span[class*=absolute]{opacity:.9!important}[class*=Changelog] h2,[class*=UpdateLabel],[class*=Update] [class*=label],[class*=changelog] h2,[class*=update] [class*=label]{font-family:var(--v3-mono, \"SuisseIntlMono\", monospace);font-size:12px;font-weight:400;letter-spacing:.08em;text-transform:uppercase}table,td,th{border:1px solid var(--base-200)}table{border-collapse:collapse}td,th{padding:8px 12px}th{font-family:var(--v3-mono, \"SuisseIntlMono\", monospace);font-size:11px;font-weight:400;letter-spacing:.08em;text-transform:uppercase}td{font-size:14px}"}],"page":{"pagePath":"phala-cloud/confidential-ai/confidential-model/api-reference/systemone","slug":"/phala-cloud/confidential-ai/confidential-model/api-reference/systemone","pageMetadata":{"title":"System One","description":"Ask a model typed questions about a state and get structured decisions.","api":"POST /systemone","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/systemone"},"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: \"Ask a model typed questions about a state and get structured decisions.\"\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`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`System One models answer typed questions about a piece of content instead of generating text. Each\nanswer is a calibrated probability, a choice among options, or a level on a scale, so software can\nact on it directly. The endpoint follows the TypeSafe System One protocol, so the official TypeSafe\nSDKs work with Phala by changing the base URL.`}),`\n`,_jsxs(_components.p,{children:[`System One models list `,_jsx(_components.code,{children:`decisions`}),` in `,_jsx(_components.code,{children:`output_modalities`}),` in `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/api-reference/models`,children:_jsx(_components.code,{children:`GET /v1/models`})}),`.\nThey do not serve chat: a chat completion request to one returns `,_jsx(_components.code,{children:`404 model_not_found`}),`. Responses are\nnever streamed.`]}),`\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:`POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://inference.phala.com/v1/systemone`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Id of a model whose `,_jsx(_components.code,{children:`output_modalities`}),` include `,_jsx(_components.code,{children:`decisions`}),`, for example `,_jsx(_components.code,{children:`jaredpalmer/kev-4b`}),`.`]})}),`\n`,_jsx(ParamField,{body:`state`,type:`string | object | array`,required:true,id:`param-state`,children:_jsx(_components.p,{children:`The content the questions are about: a message, a document, or any JSON value.`})}),`\n`,_jsxs(ParamField,{body:`questions`,type:`object`,required:true,id:`param-questions`,children:[_jsxs(_components.p,{children:[`Questions keyed by an id you choose. Each answer is returned under the same id. Every question\nhas a `,_jsx(_components.code,{children:`type`}),` and usually `,_jsx(_components.code,{children:`instructions`}),` that state the question.`]}),_jsxs(Expandable,{title:`question types`,children:[_jsxs(ResponseField,{name:`noul`,type:`object`,id:`param-noul`,children:[_jsxs(_components.p,{children:[`A yes/no question. `,_jsx(_components.code,{children:`criteria`}),` optionally describes what `,_jsx(_components.code,{children:`true`}),` and `,_jsx(_components.code,{children:`false`}),` mean.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_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:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"noul\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"instructions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Is this about billing?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})})]}),_jsxs(ResponseField,{name:`choice`,type:`object`,id:`param-choice`,children:[_jsxs(_components.p,{children:[`Pick one option. `,_jsx(_components.code,{children:`criteria`}),` maps each option to a description, or to `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"choice\"`}),_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:` \"instructions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is the tone?\"`}),_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:` \"criteria\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"calm\"`}),_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:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"upset\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(ResponseField,{name:`score`,type:`object`,id:`param-score`,children:[_jsxs(_components.p,{children:[`Rate on an ordered scale. `,_jsx(_components.code,{children:`criteria`}),` lists the levels from lowest to highest.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"score\"`}),_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:` \"instructions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"How urgent is it?\"`}),_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:` \"criteria\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"low\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_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(ParamField,{body:`provider`,type:`object`,id:`param-provider`,children:_jsxs(_components.p,{children:[`The same `,_jsx(_components.code,{children:`provider`}),` routing block as chat completions. It is used for routing and is not sent to\nthe upstream.`]})}),`\n`,_jsx(_components.p,{children:`Other fields are not forwarded.`}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`20`,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:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://inference.phala.com/v1/systemone`}),_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:`$PHALA_AI_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:` \"model\": \"jaredpalmer/kev-4b\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\": \"I was charged twice this month. Please fix it today.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"questions\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"billing\": { \"type\": \"noul\", \"instructions\": \"Is this about billing?\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tone\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"choice\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\": \"What is the tone?\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"criteria\": { \"calm\": null, \"upset\": null }`})}),`\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:` \"urgency\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"score\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\": \"How urgent is it?\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"criteria\": [\"low\", \"medium\", \"high\"]`})}),`\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(CodeBlock,{filename:`Python`,numberOfLines:`18`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`18`,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:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` typesafe_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Choice, Noul, Score, TypeSafeClient`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TypeSafeClient(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PHALA_AI_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://inference.phala.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jaredpalmer/kev-4b\"`}),_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\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.system_one(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` state`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"I was charged twice this month. Please fix it today.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` questions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"billing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Noul(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Is this about billing?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Choice(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is the tone?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`criteria`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"calm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"upset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"urgency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Score(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"How urgent is it?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`criteria`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"low\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result.nouls[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"billing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].noul, result.choices[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].choice, result.scores[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"urgency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].score)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`17`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`17`,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:`TypeSafeClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`noul`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`score`}),_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:` \"@typesafe-ai/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:` client`}),_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:` TypeSafeClient`}),_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:` baseURL:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://inference.phala.com\"`}),_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:` 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:`PHALA_AI_API_KEY`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_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:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`systemOne`}),_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:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"jaredpalmer/kev-4b\"`}),_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:` state:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"I was charged twice this month. Please fix it today.\"`}),_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:` questions:`}),_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:` billing:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` noul`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Is this about billing?\"`}),_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:` tone:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` choice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is the tone?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`calm:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`upset:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` urgency:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` score`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"How urgent is it?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"low\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_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:`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:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`answers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`billing`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`noul`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`answers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`tone`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`answers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`urgency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`score`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`The SDKs append `,_jsx(_components.code,{children:`/v1/systemone`}),` themselves, so set their base URL to `,_jsx(_components.code,{children:`https://inference.phala.com`}),`\nwithout `,_jsx(_components.code,{children:`/v1`}),`. Install them with `,_jsx(_components.code,{children:`pip install typesafe-sdk`}),` or `,_jsx(_components.code,{children:`npm install @typesafe-ai/sdk`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,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:`20`,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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jaredpalmer/kev-4b\"`}),_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:` \"answers\"`}),_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:` \"billing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"noul\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"noul\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.8828`}),_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:` \"tone\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"choice\"`}),_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:` \"choice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"upset\"`}),_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:` \"confidence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.4882`}),_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:` \"probabilities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"calm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.2559`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"upset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7441`}),_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:` \"urgency\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"score\"`}),_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:` \"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.4055`}),_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:` \"legend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"low\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_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:` \"probabilities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.1268`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.3408`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.5323`}),_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:` \"confidence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.1083`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`57`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`167`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.000002394`}),_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`,_jsxs(ResponseField,{name:`answers`,type:`object`,id:`param-answers`,children:[_jsx(_components.p,{children:`One answer per question id, in the same type as the question:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`noul`}),`: `,_jsx(_components.code,{children:`noul`}),` is the probability that the answer is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`choice`}),`: `,_jsx(_components.code,{children:`choice`}),` is the most likely option, with `,_jsx(_components.code,{children:`probabilities`}),` per option and a 0 to 1\n`,_jsx(_components.code,{children:`confidence`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`score`}),`: `,_jsx(_components.code,{children:`score`}),` is the probability-weighted level index, with `,_jsx(_components.code,{children:`probabilities`}),` per level,\n`,_jsx(_components.code,{children:`legend`}),` mapping each index to its level, and a 0 to 1 `,_jsx(_components.code,{children:`confidence`}),`.`]}),`\n`]})]}),`\n`,_jsx(ResponseField,{name:`usage`,type:`object`,id:`param-usage`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`input_tokens`}),`, `,_jsx(_components.code,{children:`output_tokens`}),`, and `,_jsx(_components.code,{children:`cost`}),`, the charge for this request in USD.`]})}),`\n`,_jsxs(_components.p,{children:[`The response carries `,_jsx(_components.code,{children:`x-typesafe-request-id`}),`, which the SDKs read, and the gateway’s `,_jsx(_components.code,{children:`x-receipt-id`}),`\nfor `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/api-reference/receipts`,children:`receipt verification`}),`. Errors use the same error format as the other\nendpoints.`]})]})}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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"System One","description":"Ask a model typed questions about a state and get structured decisions.","api":"POST /systemone","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/systemone"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request body","slug":"request-body","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"System One","path":"/systemone","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"Id of a model whose `output_modalities` include `decisions` , for example `jaredpalmer/kev-4b` .","required":true}],"state":[{"type":"object","properties":{},"description":"The content the questions are about: a message, a document, or any JSON value.","required":true}],"questions":[{"type":"object","properties":{},"description":"Questions keyed by an id you choose. Each answer is returned under the same id. Every question has a `type` and usually `instructions` that state the question.","required":true}],"provider":[{"type":"object","properties":{},"description":"The same `provider` routing block as chat completions. It is used for routing and is not sent to the upstream."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","state":{},"questions":{},"provider":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"answers":[{"type":"object","properties":{},"description":"One answer per question id, in the same type as the question: `noul` : `noul` is the probability that the answer is `true` . `choice` : `choice` is the most likely option, with `probabilities` per option and a 0 to 1 `confidence` . `score` : `score` is the probability-weighted level index, with `probabilities` per level, `legend` mapping each index to its level, and a 0 to 1 `confidence` ."}],"usage":[{"type":"object","properties":{},"description":"`input_tokens` , `output_tokens` , and `cost` , the charge for this request in USD."}]}}],"examples":{"example":{"value":{"answers":{},"usage":{}}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/phalanetwork-1606097b/2c201375ed6be1da/scripts/generate-cli-docs.js"],"subdomain":"phalanetwork-1606097b","siteName":"Phala","title":"Phala Cloud Documentation — Private AI on TEE","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-25T21:40:17.329Z","originalFileLocation":"phala-cloud/confidential-ai/confidential-model/api-reference/systemone.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Ask a model typed questions about a state and get structured decisions.\">\u003cmeta data-mint-head name=\"keywords\" content=\"Phala Cloud, TEE, Trusted Execution Environment, Confidential Computing, Private AI, confidential AI, GPU TEE, Intel TDX, dstack, blockchain, privacy-preserving computing, secure cloud, attestation\">\u003cmeta data-mint-head name=\"application-name\" content=\"Phala\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Phala Cloud Documentation — Private AI on TEE\">\u003cmeta data-mint-head property=\"og:description\" content=\"Deploy confidential AI applications on Phala Cloud with hardware-level privacy via Intel TDX, NVIDIA H100 GPU TEE, and verifiable attestation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Phala Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://raw.githubusercontent.com/Phala-Network/phala-docs/main/images/phala-docs-og.png\">\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=\"Phala Cloud Documentation — Private AI on TEE\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Deploy confidential AI applications on Phala Cloud with hardware-level privacy via Intel TDX, NVIDIA H100 GPU TEE, and verifiable attestation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://raw.githubusercontent.com/Phala-Network/phala-docs/main/images/phala-docs-og.png\">\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/phalanetwork-1606097b/nl48Duk5fn7pmYeb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Phala\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#527a08\">\u003cmeta data-mint-head name=\"author\" content=\"Phala Cloud\">\u003cmeta data-mint-head name=\"category\" content=\"Technology\">\u003cmeta data-mint-head name=\"distribution\" content=\"global\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"Phala Cloud — Confidential Computing \u0026amp; GPU TEE for AI\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@PhalaNetwork\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/phala-cloud/confidential-ai/confidential-model/api-reference/systemone.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.phala.com/#organization\",\"name\":\"Phala\",\"url\":\"https://docs.phala.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/phalanetwork-1606097b/Y2wR1-jOsoYpAL6q/images/phala-light.png?fit=max\u0026auto=format\u0026n=Y2wR1-jOsoYpAL6q\u0026q=85\u0026s=fb4f438a36865810867d188289681376\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.phala.com#website\",\"name\":\"Phala\",\"url\":\"https://docs.phala.com\",\"publisher\":{\"@id\":\"https://docs.phala.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone#webpage\",\"url\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone\",\"name\":\"System One\",\"description\":\"Ask a model typed questions about a state and get structured decisions.\",\"dateModified\":\"2026-10-25T21:40:17.329Z\",\"isPartOf\":{\"@id\":\"https://docs.phala.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Private AI\",\"item\":\"https://docs.phala.com/phala-cloud/confidential-ai/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Reference\",\"item\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/chat-completions\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"System One\",\"item\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone#apireference\",\"headline\":\"System One\",\"name\":\"System One\",\"description\":\"Ask a model typed questions about a state and get structured decisions.\",\"url\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone\",\"mainEntityOfPage\":{\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/systemone#webpage\"},\"image\":\"https://raw.githubusercontent.com/Phala-Network/phala-docs/main/images/phala-docs-og.png\",\"dateModified\":\"2026-10-25T21:40:17.329Z\",\"publisher\":{\"@id\":\"https://docs.phala.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.phala.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Phala\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Phala","nav":{"global":null,"tabs":[{"tab":"Phala Cloud","icon":"cloud","pages":[{"title":"Phala Cloud","href":"/phala-cloud/what-is/what-is-phala-cloud"}]},{"tab":"Private AI","icon":"shield-check","pages":[{"group":"Private AI","pages":[{"title":"Overview","href":"/phala-cloud/confidential-ai/overview"},{"group":"Getting Started","pages":[{"title":"On-demand API","href":"/phala-cloud/confidential-ai/confidential-model/confidential-ai-api"},{"title":"Playground","href":"/phala-cloud/confidential-ai/confidential-model/playground"},{"title":"Migration and Integrations","href":"/phala-cloud/confidential-ai/confidential-model/migration-and-integrations"},{"title":"Anthropic SDK","href":"/phala-cloud/confidential-ai/confidential-model/anthropic-sdk"}]},{"group":"Use in Agents","pages":[{"title":"Use in Agents","sidebarTitle":"Overview","href":"/phala-cloud/confidential-ai/agents/overview"},{"title":"Private AI Proxy","href":"/phala-cloud/confidential-ai/agents/private-ai-proxy"},{"title":"Claude Code","href":"/phala-cloud/confidential-ai/agents/claude-code"},{"title":"Codex CLI","href":"/phala-cloud/confidential-ai/agents/codex"},{"title":"OpenCode","href":"/phala-cloud/confidential-ai/agents/opencode"},{"title":"Pi","href":"/phala-cloud/confidential-ai/agents/pi"},{"title":"Hermes","href":"/phala-cloud/confidential-ai/agents/hermes"},{"title":"OpenClaw","href":"/phala-cloud/confidential-ai/agents/openclaw"},{"title":"Cline","href":"/phala-cloud/confidential-ai/agents/cline"},{"title":"Other Tools","href":"/phala-cloud/confidential-ai/agents/other-tools"}]},{"group":"API Reference","pages":[{"title":"Chat Completions","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/chat-completions"},{"title":"Responses","api":"POST /responses","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/responses"},{"title":"Messages","api":"POST /messages","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/messages"},{"title":"Completions","description":"Create a legacy text completion through the attested Private AI gateway.","api":"POST /completions","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/completions"},{"title":"System One","api":"POST /systemone","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/systemone"},{"title":"List Models","description":"List available Private AI models, modalities, context windows, and pricing metadata.","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/models"},{"title":"Attestation report","api":"GET /aci/attestation","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/attestation"},{"title":"Receipt","api":"GET /aci/receipts/{id}","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/receipts"},{"title":"Session","api":"GET /aci/sessions/{session_id}","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/sessions"},{"title":"Signature","api":"GET /signature/{id}","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/signature"},{"title":"Embeddings","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/embeddings"},{"title":"List Embedding Models","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/embedding-models"}]},{"group":"Guides","pages":[{"title":"Tool Calling","href":"/phala-cloud/confidential-ai/confidential-model/tool-calling"},{"title":"Images and Vision","href":"/phala-cloud/confidential-ai/confidential-model/images-and-vision"},{"title":"Structured Output","href":"/phala-cloud/confidential-ai/confidential-model/structured-output"},{"title":"Reasoning","href":"/phala-cloud/confidential-ai/confidential-model/reasoning"},{"title":"Prompt caching","href":"/phala-cloud/confidential-ai/confidential-model/prompt-caching"},{"title":"Streaming","href":"/phala-cloud/confidential-ai/confidential-model/streaming"},{"title":"Attested Routing","href":"/phala-cloud/confidential-ai/confidential-model/attested-routing"},{"title":"Zero Data Retention","href":"/phala-cloud/confidential-ai/confidential-model/zero-data-retention"},{"title":"Error Handling","href":"/phala-cloud/confidential-ai/confidential-model/error-handling"}]},{"group":"Verification","pages":[{"title":"Overview","href":"/phala-cloud/confidential-ai/verify/overview"},{"title":"TypeScript ACI Verifier","href":"/phala-cloud/confidential-ai/verify/typescript-sdk"},{"title":"Attestation","href":"/phala-cloud/confidential-ai/verify/verify-attestation"},{"title":"Verify a Response","href":"/phala-cloud/confidential-ai/verify/verify-signature"},{"title":"Receipts and Sessions","href":"/phala-cloud/confidential-ai/confidential-model/receipts-and-sessions"},{"title":"TCB and Claims","href":"/phala-cloud/confidential-ai/confidential-model/tcb-and-claims"}]},{"group":"Security Model","pages":[{"title":"Trust Boundary","href":"/phala-cloud/confidential-ai/confidential-model/trust-boundary"},{"title":"Channel Binding","href":"/phala-cloud/confidential-ai/confidential-model/channel-binding"},{"title":"Provider Verification","href":"/phala-cloud/confidential-ai/confidential-model/providers"},{"title":"End-to-End Encryption","href":"/phala-cloud/confidential-ai/confidential-model/e2ee-encryption"},{"title":"Compliance and Open Source","href":"/phala-cloud/confidential-ai/confidential-model/compliance-and-open-source"}]},{"title":"FAQs","href":"/phala-cloud/confidential-ai/faqs"}]}]},{"tab":"dstack","icon":"terminal","pages":[{"title":"dstack","href":"/dstack/overview"}]},{"tab":"dstack Cloud","icon":"server","pages":[{"title":"dstack Cloud","href":"/dstack-cloud/overview"}]},{"tab":"Network","icon":"network","pages":[{"title":"Network","href":"/network"}]}]},"title":"Phala Cloud Documentation — Private AI on TEE","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js"]}