Skip to content

Data modes

Every API key carries a data mode. It decides how the content of the key’s calls — your prompts and the model’s answers — is handled, both by Belarel and by the model providers your calls are routed to. You pick it when you create the key; every call made with that key follows it, without any per-request flag.

Mode Status What it means
standard Available The default. Calls go to any model your organization enabled. The request journal may keep the content of the call for support and debugging, subject to your organization’s retention period.
zero_retention Available Belarel does not keep the content of the call, and the call is routed only to providers that offer zero data retention and do not train on prompts. Models that cannot be served this way are refused. See Zero data retention.
confidential Available Calls are served only through an attested Intel TDX enclave that terminates the connection, which Belarel verifies before your prompt leaves its gateway. Belarel does not keep the content of the call. Other models are refused. See Confidential inference.
standard zero_retention confidential
Prompt and output in the request journal May be stored Never stored — no text, no hash, no image URL Never stored — no text, no hash, no image URL
Fingerprint of the request body, for Idempotency-Key A keyed fingerprint, kept up to 48 hours when the header is sent None on chat completions and responses; a keyed fingerprint on embeddings when the header is sent None
Routing Any provider serving the model Only providers with zero retention and no training on prompts Only an attested enclave, over a connection pinned to the TLS key that signed Belarel’s nonce on the same connection as the quote
Models you can call Every model your organization enabled for the key Only models that can be served with zero retention; others answer 400 model_not_zdr Only models with confidential_available: true; others answer 400 model_not_confidential
Embeddings Yes Yes No — 400 model_not_confidential
Your own provider keys (BYOK) Yes Yes No
Idempotency-Key replay of a JSON answer Replayed for 24 hours, then deleted within the next day — stored up to 48 hours Never stored; a retry answers 409 idempotency_conflict Never stored; a retry answers 409 idempotency_conflict
Attestation verdict on the response — — belarel.attestation, a record of the verdict, not a proof (not in the sandbox)
Tokens, cost, model, status, tags, timing Recorded Recorded Recorded

Billing, spend caps, rate limits and policies work identically in every mode: they rely on token counts and costs, never on content.

  • Use standard when you want the broadest model choice and you are comfortable with call content being kept for the retention period your organization sets.
  • Use zero_retention when the content of your calls must not persist anywhere you do not control — personal data, regulated content, customer documents. Check the model list first: in GET /v1/models, belarel.zero_retention_available: true marks models that can be served this way.
  • Use confidential when you also need evidence of where your prompt is processed: each call is served only through an attested enclave, and you can verify that enclave yourself with GET /v1/attestation. The model choice is the narrowest; check belarel.confidential_available in GET /v1/models. See Verify the attestation.

You choose the data mode when you create a key in your organization dashboard, under Governance → API keys (the Zero data retention or Confidential inference option). A confidential key cannot also use your own provider keys (BYOK). A key’s data mode is fixed at creation: there is no way to change it afterward. To switch modes, create a new key and revoke the old one.

Sub-keys created through POST /v1/keys follow one rule: a sub-key can be stricter than its parent, never looser.

  • A sub-key of a zero_retention or confidential key keeps its parent’s mode. Omitting data_mode or passing "standard" still gives the parent’s mode; asking for the other strict mode is refused with 400 invalid_request.
  • A sub-key of a standard key is standard unless you pass "data_mode": "zero_retention" or "data_mode": "confidential".

The public representation of a key (GET /v1/key, GET /v1/keys) includes its data_mode.

Every successful response carries the mode the call was served under, in the belarel block:

{
"id": "chatcmpl-…",
"object": "chat.completion",
"choices": [ … ],
"usage": { … },
"belarel": {
"request_id": "req_6f1c…",
"model_requested": "<model-id>",
"model_served": "<model-id>",
"cost": { "usd": 0.00042, "credits": 0.42, "source": "estimated", "billing": "platform" },
"policy": { "decisions": [ … ] },
"data_mode": "zero_retention"
}
}

For a streamed Chat Completions answer, the same belarel block arrives in the final usage chunk, just before data: [DONE]; for a streamed Responses answer, it is on the response carried by the last event, response.completed or response.incomplete. If you need a per-call record that a request ran under zero_retention, log belarel.data_mode together with belarel.request_id on your side. A confidential answer also carries belarel.attestation, the enclave verdict the call was served under — log it too.