Skip to main content

Overview

This guide covers TEE models served through RedPill. Each request requires a verified upstream: if none is available, the request fails with a 503 instead of being served. Other TEE routes, such as Tinfoil and Chutes TEE, don’t have these receipts. RedPill signs a receipt for each response. A receipt records what its gateway received, which upstream it verified and what it returned, with a hash of each body, and is signed with a key the gateway publishes. The attestation report ties that key to the gateway’s hardware quote. Confidentiality and logging outcomes are provider-specific, and plaintext may still exist at gateway or proxy layers outside the enclave.

Model availability

Choose a model from the live text-model catalog. TEE routes are withheld while enclave measurements await independent verification. A model with no available verified route is omitted from the ordinary catalog. With ?detailed=true, paused entries remain visible with available: false, status: "paused", unavailable_reason: "tee_verification" and providers: []. Exclude these entries when choosing a model. Requests blocked by this verification check return 503 with code tee_verification_unavailable. As of November 19, 2026, this affects TEE/glm-5.1, TEE/glm-5.1-thinking, TEE/glm-5.2, TEE/glm-5.2:thinking, TEE/kimi-k2.6, TEE/kimi-k3, TEE/deepseek-v3.2 and TEE/qwen3.6-27b. This is a temporary availability restriction, not a model retirement. The routing and attestation descriptions below apply only when the relevant route is available; a dated observation does not establish current availability.

Which replies have a receipt

TEE/ models don’t all answer from the same route, so check X-TEE-Signature-Available on each reply.

Response headers

Receipts are available on Chat Completions. Non-streaming Responses API replies don’t include one, and the Messages API and streaming Responses API reject these models.

What a receipt can prove

NanoGPT adapts each request before forwarding it, so request.received covers the request NanoGPT sent. response.returned doesn’t match on TEE/gemma-4-31b-it, whose replies NanoGPT always rewrites. Exact mode isn’t available for that model or for replies Chutes TEE answers. Streams that match their receipt reach you unchanged, so they end with a usage frame whose choices is empty, even if you didn’t ask for usage, and reasoning.exclude can’t hide their reasoning.

Exact mode for non-streaming replies

NanoGPT normally rebuilds non-streaming replies, so their bytes differ from what the receipt covers. To get the bytes the receipt covers, send this header on /v1/chat/completions:
Check that the response has X-NanoGPT-TEE-Response: exact, which only exact replies return. Then compare the hash with response.returned.body_hash in the receipt named by X-Receipt-Id. If X-TEE-Signature-Available is false, there’s no receipt to compare it with. The body is what RedPill returned, unchanged, even if it’s empty or malformed. This means:
  • There’s no x_nanogpt_pricing. Read the cost from GET /api/v1/usage/requests/{X-Request-ID}, which can return a 404 for a few seconds after the reply.
  • model is the upstream model ID. X-Requested-Model holds the one you sent.
  • NanoGPT doesn’t repair tool calls, filter reasoning or retry empty replies.
  • NanoGPT doesn’t try another provider. If RedPill can’t serve the request, you get an error.
No bytes arrive until the whole reply is finished, so allow a long client timeout. nano-gpt.com closes a connection that has received no bytes after about 5 and a half minutes, so use streaming for replies that may take longer. On Chat Completions, exact mode returns a 400 with code tee_exact_response_unsupported for models it doesn’t cover, requests that would use your own provider keys, Context Memory, web search, reasoning.exclude, PII redaction and more than one choice. The header has no effect on streaming requests, whose replies already match, on x402 payments or on the Responses, Messages and text completions endpoints. Those replies don’t include the X-NanoGPT-TEE-Response header.

Fetch a receipt

Use the X-Receipt-Id value or the response body id, with the API key of the account that made the request. On TEE/gemma-4-31b-it streams the body id is NanoGPT’s own, so use X-Receipt-Id. For streams, fetch it after the stream ends, because the receipt covers the whole stream. A stream that’s cut off can’t be verified: it usually has no receipt, even if its headers named one, and any receipt it does have won’t match the bytes you received.
The response contains:
  • receipt: the signed receipt. Its event_log holds the request.received, response.returned and upstream.verified events, and signature is signed over the rest of the receipt.
  • text, signature, signing_address, signing_algo: an older ECDSA signature over <request hash>:<response hash>.
RedPill keeps receipts for a limited time. In our tests they were gone within a day, so fetch and store the receipt as soon as the reply ends. X-Request-ID values aren’t accepted. If a chat response has an X-TEE-Verification-Route header, also send that header on this request and on the attestation request below. Its value expires after one hour. An expired value doesn’t block a receipt lookup, but the attestation request returns a 400.

Fetch the attestation report

Send report=aci and a fresh nonce of 64 lowercase hex characters.
This returns RedPill’s gateway report unchanged, with no route token needed. attestation.workload_keyset holds the gateway’s signing keys and attestation.evidence.quote its TDX quote. The quote’s report data is the SHA-256 of the canonical JSON {"keyset_digest":"sha256:...","nonce":"<your nonce>","purpose":"aci.report_data.v1"}, followed by 32 zero bytes. That binds the keys, including the receipt key, to the quote and to your nonce. Evidence for the upstream is in the session the receipt names in upstream.verified.session_id, at https://api.redpill.ai/v1/aci/sessions/{session_id}. report=aci returns a 400 for models with no RedPill route, such as TEE/kimi-k3, TEE/gemma4-31b and the models Tinfoil serves. Without it, X-TEE-Provider on the response names the route the report describes:
  • TEE/deepseek-v3.2 and TEE/qwen3.6-27b run on Chutes TEE behind RedPill. With a nonce, which must be 64 hex characters, you get Chutes TEE evidence for your nonce from the deployment RedPill uses. A receipt’s upstream session names the instance that served the reply in channel_binding[].key_id, and that instance appears in the evidence. Without a nonce, you get RedPill’s older report, whose Chutes instances carry a nonce RedPill picked.
  • On other models RedPill serves, you get RedPill’s older report for that model. Its quote covers the signing address and your nonce, not the receipt keys. Its GPU evidence (nvidia_payload) isn’t covered by the quote’s report data, and the report doesn’t say whose GPUs they are, so don’t treat it as evidence for the upstream that answered. Use the upstream session instead.
  • On the models Chutes TEE answers first, you get Chutes TEE evidence carrying your nonce. If X-TEE-Verification-Route names another route, you get that route’s evidence instead. For RedPill on TEE/kimi-k2.6, TEE/glm-5.1 and TEE/glm-5.2, that’s also Chutes TEE evidence for your nonce, because RedPill serves them from the same Chutes deployments.
  • On models Tinfoil serves, you get Tinfoil’s enclave report, and a nonce returns a 400. Tinfoil ties its attestation to the enclave’s TLS key rather than to a nonce, so check freshness with Tinfoil’s own client, or use the private/ models, which do this for you.
Don’t pin workload_keyset_digest: it changes when the gateway renews its keys. Chutes TEE evidence covers every instance of the model and can take up to about a minute. If a provider doesn’t finish in time, the request returns a 504 with code tee_attestation_upstream_timeout. Retry it with a new nonce.

What the upstream evidence doesn’t cover

The upstream session is RedPill’s record of how it verified the upstream. The receipt’s route.selected event names the upstream that served each reply in target_route_id. On Nov 12, RedPill sent TEE/gpt-oss-120b and TEE/gemma-4-31b-it to Tinfoil, TEE/qwen3.6-35b-a3b to NEAR AI, and TEE/deepseek-v3.2 and TEE/qwen3.6-27b to Chutes TEE. RedPill can change these routes. Gaps to know about:
  • For models RedPill serves through Tinfoil, 0G or NEAR AI, the session reports GPU attestation as unknown, and for Tinfoil it holds no hardware evidence. For NEAR AI it covers only NEAR’s gateway, not the machine running the model.
  • For Chutes TEE, each session covers one instance and is several megabytes, and the receipt doesn’t name the instance, so you need the session to find it. The end-to-end encryption key in channel_binding comes from Chutes’ instance list rather than from the TDX quote.
Replies that Chutes TEE or Tinfoil answer directly aren’t signed, so X-TEE-Provider and the attestation report are what you can check for them.

Python example

What this example doesn’t check

The example checks that the quote’s report data binds the keyset and your nonce, but it doesn’t verify the quote itself. For a full check, also verify the TDX quote’s signature, the release measurements and the upstream session evidence. See RedPill’s verification guide.