Confidential inference
A key in confidential data mode sends your prompts only to models served through an attested Intel TDX enclave that terminates the connection. Belarel verifies that enclave before a prompt leaves its gateway, pins the connection to the TLS key that signed Belarel’s nonce on the same connection as the quote, and attaches the verdict to every answer. Use it when you need evidence of where your content is processed, not only a policy about how long it is kept.
How to get a confidential key
Section titled “How to get a confidential key”In your organization dashboard. When an owner or admin creates an API key, they tick Confidential inference. The data mode belongs to the key and cannot be changed afterwards: to stop using it, create another key.
A confidential key excludes two other options:
- Zero data retention. The two modes are distinct. A confidential key already keeps no content (see below).
- BYOK. An attested enclave is only reached with Belarel’s own provider credentials, so a confidential key cannot run on your organization’s provider keys. Belarel refuses the combination both when the key is created and when its billing is later switched to BYOK.
Through the API, as a sub-key. A parent key with the keys:manage scope can mint one with POST /v1/keys:
- A
standardparent can create a sub-key with"data_mode": "confidential", provided the parent does not run on BYOK. - A sub-key of a
confidentialparent is alwaysconfidential: asking forstandard, or omittingdata_mode, gives it the parent’s mode. Asking forzero_retentionis refused with400 invalid_requestrather than silently replaced. The same rule protectszero_retentionparents.
Which models it can call
Section titled “Which models it can call”Every entry of GET /v1/models carries belarel.confidential_available. It is true for language models that Belarel serves through an attested enclave.
{ "id": "<model-id>", "object": "model", "belarel": { "category": "language", "zero_retention_available": false, "byok_available": false, "confidential_available": true }}- The list a confidential key receives is already filtered: it contains only models with
confidential_available: true. - Any other model is refused with
400 model_not_confidentialbefore any money is reserved. The call is never served outside an enclave. - Capabilities vary by model. Read each model’s
belarel.capabilities(tools, vision, reasoning, web search, structured output) inGET /v1/modelsrather than assuming them. - Embeddings are not available. No embedding model is served through an attested enclave, so POST
/v1/embeddingsanswers400 model_not_confidentialfor a confidential key.
Your code does not change: POST /v1/chat/completions and POST /v1/responses work as usual, streaming included. Only the key differs.
What happens on each call
Section titled “What happens on each call”- Belarel needs a green verdict on the enclave. To establish one, it sends the enclave a fresh nonce of its own and checks the answer: the Intel TDX quote binds that nonce and is not debuggable; the quote’s DCAP signature chain verifies, on Belarel’s side, against Intel’s collateral up to Intel’s root CA; the TCB status is not refused (see below); the TLS key of the very connection that returned the quote signed the nonce; and the measurements are not a combination Belarel has revoked. Belarel samples several enclave instances: each one goes through the same checks — nonce, debug mode, key, DCAP chain and TCB status — before its measurements are recorded, they must all present the same key, and none may run a revoked combination. Intel’s TCB status decides as follows:
UpToDateandSWHardeningNeededserve; a host behind on Intel’s patches —OutOfDate,ConfigurationNeeded,ConfigurationAndSWHardeningNeededorOutOfDateConfigurationNeeded— still serves, and Belarel is alerted;Revoked, or any other status, is refused, even when the instance runs a known combination. Within each verdict, every sampled quote is verified afresh; only Intel’s collateral is reused (up to an hour). The verdict itself is reused for up to 10 minutes (see below). Because the TCB status is judged against collateral up to an hour old, on top of a verdict up to 10 minutes old, a change published by Intel may reach the verdict up to about 70 minutes later: a TCB recovery that puts a host behind on its patches is then reported intcb_statusand alerted (it does not refuse), and a revoked TCB level is then refused. - The verdict is reused for up to 10 minutes, shared by all of Belarel’s servers. Each call relies on a verified verdict, not on a fresh proof of its own. Each server re-reads the shared verdict at least every 30 seconds, so a revoked measurement stops calls within 30 seconds, and
measurements_approvedturnsfalsewithin 30 seconds of Belarel observing a new combination. Instances are sampled, not enumerated: Belarel observes 3 instances each time it establishes a verdict (a verdict lasts up to 10 minutes), plus the instance that answers any client call toGET /v1/attestation. - The connection is pinned. Your request travels only over a TLS connection whose key is the TLS key that signed the nonce on the same connection as the quote. The check runs during the TLS handshake of every connection, in addition to the usual certificate checks, before a single byte of your request is sent. Belarel keeps no TLS session for resumption, so every new connection goes through a full handshake and proves the attested key again. If the enclave ever presents another key, the connection fails and the verdict is discarded: the next call has to prove the enclave again, and the refused key is not re-adopted from the shared verdict.
- Fail closed. If no green verdict can be established — the enclave is unreachable, a check fails, or a replica running a combination of measurements Belarel revoked has been seen in the last 15 minutes (instances are sampled, not enumerated) — the call is refused with
503 attestation_unavailableandRetry-After: 30. Nothing is sent to a model and your reservation is released, so nothing is billed.
The belarel.attestation block
Section titled “The belarel.attestation block”Every answer of a confidential key — the JSON body, or the usage chunk at the end of a stream — carries data_mode: "confidential" and the verdict the call relied on:
"belarel": { "request_id": "req_…", "data_mode": "confidential", "attestation": { "tee": "intel_tdx", "verifier": "intel_dcap", "verified_at": "2026-10-03T14:02:11.482Z", "tcb_status": "UpToDate", "intel_token": null, "enclave_key": { "public_key_pem": "-----BEGIN PUBLIC KEY-----\n…", "spki_sha256": "3f9a…" }, "measurements": { "mrtd": "…", "mrconfigid": "…", "rtmr0": "…", "rtmr1": "…", "rtmr2": "…", "rtmr3": "…" }, "measurements_approved": true }}| Field | Meaning |
|---|---|
tee |
The hardware: always intel_tdx. |
verifier |
Always intel_dcap: Belarel verified the quote’s DCAP chain to Intel’s root CA itself. |
verified_at |
When the verdict this call relied on was established — up to 10 minutes before the call. |
tcb_status |
The TCB status from Intel’s collateral, the worst among the instances sampled for the verdict: UpToDate, SWHardeningNeeded, or a status of a host behind on Intel’s patches (OutOfDate, ConfigurationNeeded, ConfigurationAndSWHardeningNeeded, OutOfDateConfigurationNeeded), which still serves. It can be worse than the status of the quote you get from GET /v1/attestation, which comes from a single instance. |
intel_token |
An Intel Trust Authority signed appraisal (JWT) when Belarel has that service configured, otherwise null. It is an extra, never a condition. |
enclave_key |
The TLS public key (PEM) that signed the nonce on the same connection as the quote, and the SHA-256 of its DER SubjectPublicKeyInfo, in hex. Your request’s connection was pinned to it. |
measurements |
The TDX measurements (MRTD, MRCONFIGID, RTMR0–3), in hex, of the enclave instance that answered the verdict’s proof. |
measurements_approved |
true when Belarel has reviewed and approved every combination of measurements the enclave fleet was seen with in the last 15 minutes. false means a new deployment or host type is serving and is not reviewed yet, or that Belarel could not read the review state. Belarel records a combination only from a quote that passed DCAP on its side. Since 2026-10-05, a combination can be approved only from a DCAP-verified quote; combinations approved before keep their status. On GET /v1/attestation, the same field describes only the instance that answered. |
The block is a record of the verdict Belarel established with its own nonce, not a proof: it carries no quote or nonce, so it cannot be verified on its own. To check the enclave yourself, with a nonce you choose, use GET /v1/attestation — see Verify the attestation.
curl https://api.belarel.com/v1/chat/completions \ -H "Authorization: Bearer $BELAREL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "<model-id>", "messages": [{ "role": "user", "content": "Summarize this contract clause: …" }] }'import osfrom openai import OpenAI
client = OpenAI(base_url="https://api.belarel.com/v1", api_key=os.environ["BELAREL_API_KEY"])completion = client.chat.completions.create( model="<model-id>", messages=[{"role": "user", "content": "Summarize this contract clause: …"}],)attestation = completion.model_extra["belarel"]["attestation"]print(attestation["enclave_key"]["spki_sha256"], attestation["verified_at"])import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://api.belarel.com/v1', apiKey: process.env.BELAREL_API_KEY });const completion = await client.chat.completions.create({ model: '<model-id>', messages: [{ role: 'user', content: 'Summarize this contract clause: …' }],});const { attestation } = (completion as unknown as { belarel: { attestation: { enclave_key: { spki_sha256: string }; verified_at: string } } }).belarel;console.log(attestation.enclave_key.spki_sha256, attestation.verified_at);What is protected and what is not
Section titled “What is protected and what is not”Protected:
- Where your prompt goes. Your prompt is sent only to an enclave endpoint that passed the checks above, over a connection pinned to the TLS key that signed the nonce on the same connection as the quote. It is not relayed through any third-party model gateway.
- What Belarel keeps. No prompt, output, hash of either, or image URL is written to the request journal. No answer is stored for idempotent replay, and no fingerprint of the request body is kept.
Not protected — read this before you rely on the mode:
- Belarel’s gateway reads your request. Your connection to Belarel is ordinary HTTPS. Belarel’s gateway processes the request in memory — to check the key, apply your policies, caps and tags, and count tokens — then forwards it to the enclave. The answer returns through the gateway the same way. Content is never stored, but it is not hidden from the gateway while the call runs.
- Metadata is recorded. Tokens, cost, model, status, timing and tags are recorded as in every mode. Tags include the
metadatafield and theappandapp_urltags derived fromX-TitleandHTTP-Referer. Never put personal data or secrets there. - The verdict is not per call. A call relies on a verdict up to 10 minutes old, not on a quote made for that call.
- The quote does not bind the TLS key. REPORTDATA carries only the hash of the nonce. The TLS key is tied to the enclave because it signed that nonce on the same connection that returned the quote. A relay by someone holding a certificate for the enclave’s domain is not excluded cryptographically: that link rests on the enclave operator.
- What is attested is the endpoint. The quote covers the TDX guest that terminates the connection. There is no GPU attestation, and the attestation does not show, by itself, that the model runs inside the enclave.
- Measurements are reviewed after they start serving. Belarel does not yet rely on operator-published reference values. It records every combination of measurements it sees. A new one — a new deployment of the enclave, or a new host type — serves calls at once, and Belarel is alerted to review it: it then approves or revokes the combination. Every sampled instance’s quote passes DCAP before its combination is recorded. Since 2026-10-05, a combination can be approved only from a DCAP-verified quote, and a combination without that verification can only be revoked; combinations approved before keep their status. A revoked combination stops every confidential call while a replica running it has been seen in the last 15 minutes (instances are sampled, not enumerated). Until the review, a call can be served by software Belarel has not reviewed:
measurements_approvedon each answer tells you whether every combination seen recently has been reviewed. Attestation shows genuine, non-debuggable TDX hardware, at the TCB level reported intcb_status(possibly behind on Intel’s patches), running a combination Belarel has not revoked. It does not, by itself, tell you what software that combination corresponds to.
Idempotency
Section titled “Idempotency”Idempotency-Key works, but nothing derived from the body is kept, so the key is bound to its value alone:
- A retry while the first call runs answers
409 idempotency_conflict(… in progress); retry it. - Once the first call has been served, any reuse — even with a different body — answers
409 idempotency_conflict(… already served) withx-should-retry: false. The answer is never stored, so it cannot be replayed. You never get422 idempotency_key_reusedwith a confidential key. - If the first call failed with a
5xx, the key is freed and a retry runs normally.
See Idempotency.
Sandbox
Section titled “Sandbox”A sandbox confidential key (bel_test_…) behaves like a live one for everything you can test without an enclave:
- The model list is filtered the same way, and
model_not_confidentialrefuses the same models and embeddings. - Calls are answered by the deterministic sandbox model. They reach no enclave, so the answer carries
data_mode: "confidential"but noattestationblock. - GET
/v1/attestationreturns a real proof of the enclave, so you can build and test your verification code in the sandbox.
Errors
Section titled “Errors”| Code | HTTP | Meaning | What to do |
|---|---|---|---|
model_not_confidential |
400 | The model is not served through an attested enclave, or you called /v1/embeddings. Sent with x-should-retry: false. |
Pick a model with confidential_available: true. Do not retry as is. |
confidential_key_required |
403 | GET /v1/attestation was called with a key that is not confidential. Sent with x-should-retry: false. |
Use a confidential key. |
attestation_unavailable |
503 | Belarel cannot prove the enclave right now: unreachable, a verification step failed, or a replica running a combination of measurements Belarel revoked has been seen in the last 15 minutes (instances are sampled, not enumerated). Nothing was sent or billed. Sent with Retry-After: 30. |
Wait for Retry-After, then retry with the same Idempotency-Key. If it persists, call GET /v1/attestation. It answers from one instance, so it may show the revoked one: measurements_status: "revoked" means Belarel refused the software that instance runs, and calls stay refused while a replica running it has been seen in the last 15 minutes. Never fall back to a non-confidential key without deciding to. |
idempotency_conflict |
409 | The Idempotency-Key is in progress, or already served (never replayed for this mode). |
See Idempotency. |
invalid_request |
400 | On POST /v1/keys: a sub-key asked for a data mode its parent does not allow, or confidential on a BYOK parent. |
Ask for the parent’s mode, or use a non-BYOK parent. |
See Errors & debugging for the error format.

