Data controls
AIgateway runs a tiered program that builds training and fine-tuning datasets from gateway traffic. This page documents what that means for your account and how to control it. The legal terms live in Privacy Policy §3.6 and Terms §3 — this page is the practical reference.
By tier
| Tier | Default | Control |
|---|---|---|
| Free / trial | Train-eligible | Settings → Data & privacy, or the per-request header below |
| Paid (PAYG) | Not collected | Opt in from Settings → Data & privacy — halves the platform fee on shared calls |
| Enterprise | Never collected | No toggle — enforced in code, not just policy |
Per-request override
Send x-aig-no-train: 1 on any request to exclude that single call from the program, regardless of your account-level setting. There is no opposite header — you cannot opt a single call in from a dashboard-level opt-out; the header can only turn collection off.
What gets collected
On a train-eligible call, we collect:
- The request — messages/prompt, model, generation parameters
- The response — completion text, or a reference to generated media
- Request metadata — model, provider, latency, token counts, cache status
We strip API keys, webhook secrets, and any other authentication material before anything is stored. Base64/inline binary payloads are replaced with references to durably-stored media rather than embedded inline. Exact-cache hits are not captured (they are a duplicate of an already-captured pair); semantic-cache hits are, since they pair a new prompt with an existing response.
Feedback
POST /v1/feedback lets you rate a prior response by its request_id:
POST /v1/feedback Content-Type: application/json Authorization: Bearer sk-aig-... { "request_id": "req_abc123", "rating": "down", "comment": "wrong answer" }
Feedback feeds the preference dataset we use for RLHF-style fine-tuning — it is not tied to whether the original request was itself train-eligible.
Deletion
Turning off the toggle stops future collection immediately. A verified account deletion or data-subject request additionally purges data already collected under this program — see Privacy Policy §9.