Data controls
Turn on zero data retention and no-training routing for your org or a single request, and verify who served each call.
Turn on zero data retention (one call)
The account-wide switch sets three facts in one audited transaction: prompt capture off, require_zdr on, require_no_training on. GET returns enabled (all three hold), partial (switched on but a fact drifted), enforced_at, and models_with_zdr_route (a count of public models still callable). With it on, a model with no zero-retention route is refused with 403 model_not_granted. ZDR is a Pro feature (403 needs_subscription otherwise). What ZDR means and the provider matrix: Data controls.
/api/orgs/{org_id}/zero-data-retentionPUT/api/orgs/{org_id}/zero-data-retentioncurl -X PUT https://api.experientiallabs.ai/api/orgs/ORG_ID/zero-data-retention \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'Provider policy fields
PUT takes a partial document: omitted fields keep their value; null clears a list; null on a boolean is a 400. Every change is audited as provider_policy.set and reaches the gateway within seconds.
| Field | Effect | Plan |
|---|---|---|
require_zdr | Only zero-retention routes (including routes on your own keys) | Pro |
require_no_training | Only routes whose provider does not train on data | All |
allowed_processing_regions | e.g. ["US"]: every route must have reviewed coverage in those regions; disables batches | All |
prompt_caching | false stops gateway-side caching and strips cache markers | All |
zdr_continuation_storage | Allow previous_response_id under ZDR routing (stored by us only) | Pro |
allowed_providers | Provider allowlist by displayed name | Enterprise (403 enterprise_required) |
While the account-wide switch is on, lowering require_zdr or require_no_training is 409 zdr_switch_enforced. DELETE removes the policy.
/api/orgs/{org_id}/provider-policyGET/api/orgs/{org_id}/provider-data-controlscurl -X PUT https://api.experientiallabs.ai/api/orgs/ORG_ID/provider-policy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"require_no_training": true}'Per request
Add top-level "provider": {"zdr": true} on Chat, Responses or Messages (Anthropic SDK: extra_body), or the X-Gateway-ZDR: true header. It only tightens: the request is judged as if require_zdr were on, answers x-gateway-zdr: true, and is refused with 403 model_not_granted naming provider.zdr when no route qualifies. Pro, unless your org already holds require_zdr. ZDR-routed requests are never captured.
/v1/chat/completionscurl -i https://api.experientiallabs.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6-luna", "provider": {"zdr": true},
"messages": [{"role": "user", "content": "Hello"}]}'Check a model before you switch
| Read | Field |
|---|---|
GET /v1/models | data_policy: zdr (every route ZDR by default), zdr_on_request, no_training, per-provider rows |
GET /api/models | retention: zdr_all_rungs, zdr_enforceable, not_zdr; filter ?retention=zdr_all_rungs |
GET /api/models/{slug}/providers | zero_data_retention per route |
GET /api/v1/endpoints/zdr | Public list of every route a require_zdr org is served through |
/api/v1/endpoints/zdrGET/api/modelscurl "https://api.experientiallabs.ai/api/models?retention=zdr_all_rungs&limit=50" \
| jq -r '.models[].model.slug'Verify who served a request
Headers are stamped after a provider commits, so they name the route that answered. The body carries the same provider beside usage.cost. Look up any request later by its id.
| Header | Value |
|---|---|
x-request-id | Gateway request id |
x-gateway-provider | Provider that served |
x-gateway-zdr | Whether that route is zero-retention |
x-gateway-route-depth | Position of the serving route (0 = first) |
x-gateway-canonical-model | Resolved model identity |
/api/v1/generationcurl -sD - -o /dev/null https://api.experientiallabs.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "gpt-6-luna", "messages": [{"role": "user", "content": "Hi"}]}' \
| grep -i '^x-gateway\|^x-request-id'Prompt and response storage
capture_prompt_content controls stored prompts, responses and Responses continuations. Turning it off needs Pro (or a grandfathered org); 403 needs_subscription otherwise. The content-free usage ledger (tokens, cost, provider) is always kept. Details on Telemetry.
/api/orgs/{org_id}/telemetry-settingscurl -X PUT https://api.experientiallabs.ai/api/orgs/ORG_ID/telemetry-settings \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"capture_prompt_content": false}'