Creates a model response using the Responses API request and response format. Like other inference endpoints, requests are served through the attested gateway and return an x-receipt-id header for verification.
Routing constraints for this request, applied together. zdr restricts routing to providers that do not retain content; aci_verified restricts it to an upstream verified inside the TEE; aci_session_ids pins it to specific attested channels.
{"provider": {"aci_verified": true}}
If no provider satisfies the constraints the request fails before the prompt is sent, and failover retries stay inside the allowed set. Field reference: Chat Completions. See Attested Routing and Zero Data Retention.
Capture x-receipt-id from the HTTP response and verify it with Get Receipt. The receipt proves the response bytes and records whether the upstream provider was verified.
{"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":"6adf0bca737ceb5e7108296a","collectionId":"7efa5fc6-9ffa-4d9a-9b04-a80970ea0bee","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf0bca737ceb5e7108296a"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6adf0bca737ceb5e7108296a","clientVersion":"0.0.4045","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":96},{"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":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":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/responses","slug":"/phala-cloud/confidential-ai/confidential-model/api-reference/responses","pageMetadata":{"title":"Responses","description":"Create a model response using the Responses API format through the attested Private AI gateway.","api":"POST /responses","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/responses"},"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: \"Create a model response using the Responses API format through the attested Private AI gateway.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,ParamField}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a model response using the Responses API request and response format. Like other inference endpoints, requests are served through the attested gateway and return an `,_jsx(_components.code,{children:`x-receipt-id`}),` header for verification.`]}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\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/responses`})]}),`\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:[`Model id, for example `,_jsx(_components.code,{children:`z-ai/glm-5.3`}),` or another id returned by `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/api-reference/models`,children:`List Models`}),`.`]})}),`\n`,_jsx(ParamField,{body:`input`,type:`string | array`,required:true,id:`param-input`,children:_jsx(_components.p,{children:`Input prompt. This can be a string or an array of input items.`})}),`\n`,_jsx(ParamField,{body:`tools`,type:`array`,id:`param-tools`,children:_jsx(_components.p,{children:`Tool definitions the model may call.`})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,id:`param-temperature`,children:_jsx(_components.p,{children:`Sampling temperature.`})}),`\n`,_jsx(ParamField,{body:`top_p`,type:`number`,id:`param-top-p`,children:_jsx(_components.p,{children:`Nucleus sampling.`})}),`\n`,_jsxs(ParamField,{body:`provider`,type:`object`,id:`param-provider`,children:[_jsxs(_components.p,{children:[`Routing constraints for this request, applied together. `,_jsx(_components.code,{children:`zdr`}),` restricts routing to providers that do not retain content; `,_jsx(_components.code,{children:`aci_verified`}),` restricts it to an upstream verified inside the TEE; `,_jsx(_components.code,{children:`aci_session_ids`}),` pins it to specific attested channels.`]}),_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:`\"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"aci_verified\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`If no provider satisfies the constraints the request fails before the prompt is sent, and failover retries stay inside the allowed set. Field reference: `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/api-reference/chat-completions#param-provider`,children:`Chat Completions`}),`. See `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/attested-routing`,children:`Attested Routing`}),` and `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/zero-data-retention`,children:`Zero Data Retention`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://inference.phala.com/v1/responses`}),_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\": \"z-ai/glm-5.3\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"input\": \"Explain attestation in one sentence.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resp_023cda4f5e268c44006a30f3e0b6f4819b87536574ae6ecd14\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_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:`\"z-ai/glm-5.3\"`}),_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:` \"output\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_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:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Attestation proves which trusted workload served a request.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"annotations\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`22`})]}),`\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`]})})}),`\n`,_jsxs(_components.p,{children:[`Read assistant text from `,_jsx(_components.code,{children:`output[].content[].text`}),` on `,_jsx(_components.code,{children:`message`}),` items. Reasoning models may also return `,_jsx(_components.code,{children:`reasoning`}),` items.`]}),`\n`,_jsx(Heading,{level:`2`,id:`verification`,children:`Verification`}),`\n`,_jsxs(_components.p,{children:[`Capture `,_jsx(_components.code,{children:`x-receipt-id`}),` from the HTTP response and verify it with `,_jsx(_components.a,{href:`/phala-cloud/confidential-ai/confidential-model/api-reference/receipts`,children:`Get Receipt`}),`. The receipt proves the response bytes and records whether the upstream provider was verified.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Chat Completions`,icon:`comments`,href:`/phala-cloud/confidential-ai/confidential-model/api-reference/chat-completions`}),_jsx(Card,{title:`Verify a Response`,icon:`circle-check`,href:`/phala-cloud/confidential-ai/verify/verify-signature`})]})]})}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":"Responses","description":"Create a model response using the Responses API format through the attested Private AI gateway.","api":"POST /responses","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/responses"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Verification","slug":"verification","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Responses","path":"/responses","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"Model id, for example `z-ai/glm-5.3` or another id returned by List Models .","required":true}],"input":[{"type":"object","properties":{},"description":"Input prompt. This can be a string or an array of input items.","required":true}],"tools":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Tool definitions the model may call."}],"temperature":[{"type":"number","description":"Sampling temperature."}],"top_p":[{"type":"number","description":"Nucleus sampling."}],"provider":[{"type":"object","properties":{},"description":"Routing constraints for this request, applied together. `zdr` restricts routing to providers that do not retain content; `aci_verified` restricts it to an upstream verified inside the TEE; `aci_session_ids` pins it to specific attested channels. If no provider satisfies the constraints the request fails before the prompt is sent, and failover retries stay inside the allowed set. Field reference: Chat Completions . See Attested Routing and Zero Data Retention ."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","input":{},"tools":[{}],"temperature":123,"top_p":123,"provider":{}}}}}}},"response":{},"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-26T08:14:13.600Z","originalFileLocation":"phala-cloud/confidential-ai/confidential-model/api-reference/responses.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=\"Create a model response using the Responses API format through the attested Private AI gateway.\">\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/responses\">\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/responses\">\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/responses.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/responses#webpage\",\"url\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses\",\"name\":\"Responses\",\"description\":\"Create a model response using the Responses API format through the attested Private AI gateway.\",\"dateModified\":\"2026-10-26T08:14:13.600Z\",\"isPartOf\":{\"@id\":\"https://docs.phala.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses#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\":\"Responses\",\"item\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses#apireference\",\"headline\":\"Responses\",\"name\":\"Responses\",\"description\":\"Create a model response using the Responses API format through the attested Private AI gateway.\",\"url\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses\",\"mainEntityOfPage\":{\"@id\":\"https://docs.phala.com/phala-cloud/confidential-ai/confidential-model/api-reference/responses#webpage\"},\"image\":\"https://raw.githubusercontent.com/Phala-Network/phala-docs/main/images/phala-docs-og.png\",\"dateModified\":\"2026-10-26T08:14:13.600Z\",\"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","description":"Create OpenAI-compatible chat completion responses with Private AI models.","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","description":"Create a model response using the Anthropic Messages API format through the attested Private AI gateway.","api":"POST /messages","href":"/phala-cloud/confidential-ai/confidential-model/api-reference/messages"},{"title":"Completions","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","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"}]}]},"basePath":"","title":"Phala Cloud Documentation — Private AI on TEE","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js"]}