Documentation Index
Fetch the complete documentation index at: https://docs.redpill.ai/llms.txt
Use this file to discover all available pages before exploring further.
TEE Verification
Verify that your API requests are processed in genuine TEE hardware. This guide covers programmatic verification for production systems.Quick Start
Use this path when you want to verify a real API response:/v1/signature/{request_id}, fetches /v1/attestation/report with the returned signing_address, and verifies that the response signature is bound to genuine TEE hardware.
Use this path when you only want to verify that a model server is currently attested:
Verify Your Chat Response
The primary use case: you’re using RedPill as an OpenAI alternative, and want to verify the response came from a real TEE.Verification Paths
| Path | APIs used | Use when |
|---|---|---|
| Model attestation | GET /v1/attestation/report?model=...&nonce=... | You want proof that a model endpoint is running in genuine TEE hardware |
| Response signature | GET /v1/signature/{request_id}?model=... | You want proof that your specific response was signed by the TEE key |
| End-to-end response verification | Both endpoints together | You want production-grade proof that your exact request and response are bound to an attested TEE signer |
Attestation API
Get Attestation Report
Fetch a fresh attestation report with your nonce:Verify Attestation (TypeScript)
Signature API
Get Request Signature
After making a chat completion, get the cryptographic signature:Verify Signature (TypeScript)
End-to-End API Flow
This is the flow most applications should implement:Make the chat completion
Store the exact JSON string you sent and the exact response body you received. Hashes are byte-sensitive, so production verifiers should hash the same serialized request body that was sent on the wire.
Fetch the request signature
Call
GET /v1/signature/{chat_id}?model=... and read text, signature, signing_address, and signing_algo.Verify the signed hashes
Parse
text as either request_hash:response_hash or model:request_hash:response_hash, compute SHA-256 for your request and response, and confirm both hashes match.Verify the signature signer
Recover the signer from the signature and assert it equals
signing_address.Fetch fresh attestation for the signer
Generate
nonce=$(openssl rand -hex 32) and call /v1/attestation/report?model=...&nonce=...&signing_address=....On-Chain Verification
Verify the TDX quote trustlessly via Ethereum smart contracts:Store Proof Permanently
| Network | RedpillProofStore Contract |
|---|---|
| Sepolia | 0x83541AD3f380De2b28E0108d4Da934236342B02b |
Provider-Specific Verification
The verifier auto-detects the provider and applies specific checks:| Provider | Specific Checks |
|---|---|
| Phala | Compose manifest hash vs mr_config, Sigstore provenance, deep mode (model+KMS+gateway) |
| NearAI | Gateway + model attestation, deep mode (gateway+model) |
| Chutes | Anti-tamper binding (SHA256(nonce + e2e_pubkey) vs report_data), debug mode disabled |
| Tinfoil | Hardware policy (MR_SEAM, XFAM, TdAttributes), Sigstore golden values (RTMR1/RTMR2), hw profile matching |
What You’re Verifying
| Check | What It Proves |
|---|---|
| Intel TDX quote | Code runs in genuine Intel TDX CPU enclave |
| AMD SEV-SNP quote | Code runs in genuine AMD SEV-SNP enclave |
| NVIDIA attestation | GPU is genuine H100/H200 with confidential computing |
| Report data binds address | Signing key was generated inside TEE |
| Nonce embedded | Attestation is fresh, not replayed |
| Compose hash matches mr_config | Running code matches published Docker compose |
| Sigstore provenance | Container images have verified build chain |
| On-chain DCAP | TDX quote verified by Ethereum smart contract (trustless) |
| Request/response hash | Your exact request was signed |
| Signature valid | Response came from the claimed signing address |
Available Models
GPU TEE models currently available through RedPill:Call
GET /v1/models for the live catalog. Phala, Near AI, and Chutes models currently return supported attestation formats from /v1/attestation/report. Tinfoil models are listed as GPU TEE models, but RedPill’s attestation endpoint currently returns provider errors for the Tinfoil catalog entries, so verify Tinfoil support live before building against it.CI/CD Integration
Troubleshooting
Attestation API returns error / timeout
Attestation API returns error / timeout
Cause: The model’s backend may be temporarily unavailable.Action: Try a different model from the same provider, or retry in a few minutes. Chutes models can take up to 2 minutes to respond.
Intel TDX quote verified: False
Intel TDX quote verified: False
Cause: Quote validation failed against Intel certificates.Action: Retry. If persistent, report to security@redpill.ai.
Request hash differs from server
Request hash differs from server
Cause: The TEE gateway rewrites the model name internally (e.g.,
phala/gpt-oss-120b → openai/gpt-oss-120b). The TEE signs what it actually processes.Action: This is expected behavior. The response hash should still match. The signature is valid — verify with ECDSA ecrecover.dstack-verifier not available
dstack-verifier not available
Cause: Docker is not running or dstack-verifier is not started.Action: Run
docker compose up -d from the repo root, or use --light to skip deep verification.API Reference
Attestation Endpoint
Full attestation API reference
Signature Endpoint
Full signature API reference