API reference
D0/D1 contract. Model operations are explicit capability-gated passthroughs to compatible upstream paths. The gateway replaces the public model alias and preserves supported payload fields. Cross-protocol decisions use an explicit, bounded text/structured-data adapter under decision_translation; other native protocols retain their own semantics. Every inference capability has an operational flag. X-Request-Id is the correlation_id; traceparent follows W3C Trace Context. Data-plane bearer keys require route:models, route:<capability>, or route:* for the corresponding endpoint. MCP discovery requires mcp:read. Optional jwt_inference accepts the bounded at+jwt access-token profile with exact issuer/audience and an explicit subject binding to a managed identity; console ID tokens and logout assertions are never inference credentials. With budget_limits or tpm_limits enabled, requests in validated native quota profiles reserve shared tokens or approved physical-unit budgets before sending. Missing coverage is denied; unknown outcomes retain reservations. Admission estimates do not guarantee external provider invoices. With rate_limits enabled, inference attempts matching a key/team RPM policy may return 429 and Retry-After. Limits use exact fixed UTC-minute windows. With team_policy_enforcement enabled, every team-bound key is limited to the effective team model and route policy. A team without a policy has no access. Public inference uses /v1; the Gemini-native compatibility surface uses /v1beta. The canonical control API uses /api/v1/admin. Legacy /api/admin aliases remain available temporarily for existing clients.
Version 0.76.0 of the contract. Download it whole as OpenAPI 3.1 YAML, or read it here by area. A running gateway also serves it at /openapi.yaml and as an interactive Swagger UI at /docs/swagger/.
Authentication
Section titled “Authentication”| Scheme | Kind | Description |
|---|---|---|
bearerAuth |
http, bearer | A gateway key, sent as Authorization: Bearer. |
adminSession |
apiKey, cookie gateway_admin | Console session cookie from adminLogin or federated sign-in; writes also need the X-CSRF-Token header. With admin.token_bearer true (default false), every operation that accepts it also accepts the shared admin token (or, with admin_viewer, the viewer token) as Authorization Bearer when no cookie is sent: that call has the token’s role, needs no CSRF token and works whatever admin.token_login says. A Bearer token shorter than 32 characters is refused; 10 failed Bearer attempts from one client address within a minute answer 429 with Retry-After until the minute ends. Named-user tokens are not accepted as Bearer. |
customerViewToken |
http, bearer | Self-service customer view token (gwcv_ prefix) minted by mintCustomerViewToken; read-only, one organization or member, expires by the database clock |
customerCredential |
http, bearer | Scoped customer credential (gwcp_ prefix, flag customer_portal_credentials) issued by createCustomerCredential. Accepted only on the customer portal record, usage and approval routes of its own operator team; no CSRF token; checked live on every call, so revocation and expiry apply to the next call. Failed attempts share the admin Bearer limit of 10 per client address per minute. |
scimBearer |
http, bearer | Provisioning token whose SHA-256 is in admin.scim_token_sha256_env; distinct from admin and viewer tokens |
| Area | Operations | Description |
|---|---|---|
| Models | 4 | |
| Text generation | 21 | |
| Embeddings and rerank | 3 | |
| Evals | 169 | |
| Files and batches | 17 | |
| Fine-tuning | 10 | OpenAI-compatible fine-tuning jobs (ADR 0121). Jobs run at the provider of the alias first target; ownership, file copies and every read are scoped to the key team by the gateway. |
| Containers | 11 | OpenAI Containers API, the sandboxes of the Responses code interpreter (ADR 0123). Containers run at an OpenAI provider; the gateway keeps an ownership row per container, so routes, lists and Responses tools only reach the caller’s own. |
| Media | 10 | |
| Gemini compatible | 10 | |
| Native passthrough | 12 | Provider-native routes forwarded unchanged under an alias (T133), for features the gateway does not translate. Each alias opts in per provider and keeps the gateway’s key, quota and audit checks. |
| MCP | 16 | |
| Vector stores | 22 | |
| Realtime | 2 | OpenAI Realtime over WebSocket (ADR 0104). |
| Agents | 9 | A2A agent gateway (ADR 0103). Agents are declared in YAML; clients call them here with a gateway key holding agents:invoke, from a team the agent allows. |
| Access groups | 3 | |
| Alert deliveries | 2 | |
| Alert rules | 9 | Alert rules and the alerts they raise (T202, features.alert_rules). alert_rules:read lists alerts and rules, alert_rules:manage changes them; both cover the session’s own teams and organization, and every team, every organization and the global rules only with alert_rules:global (admin, and read-only viewer and operator). |
| Alerts | 4 | |
| Monitors | 9 | Evaluation monitors (T186.010, features.evaluation_monitors). monitors:read lists a session’s teams’ monitors and monitors:manage changes those of the teams it administers; monitors:global (admin, and read-only viewer) widens either to every team. A team whose plan lacks evaluation_monitors has none. |
| Analytics | 42 | |
| Audit | 2 | |
| Branding | 4 | |
| Local inference | 4 | |
| Cache | 4 | |
| Content capture | 11 | Opt-in encrypted capture of request and response bodies for audit (T113). Policies and grants need content_capture:manage; reading needs an explicit per-user content:read grant, and every read is audited. |
| Console MFA | 19 | Native console second factor (T086.002) - TOTP, passkeys and one-time recovery codes after the first factor. Pending-flow calls send X-MFA-Challenge; session calls send X-CSRF-Token. |
| Console session | 27 | |
| Console users | 24 | |
| Durable usage | 1 | |
| Entitlements | 7 | |
| Extensions | 12 | |
| Guardrails | 13 | |
| Infrastructure | 34 | |
| Invitations | 8 | |
| Jwt bindings | 3 | |
| Keys | 29 | |
| MCP administration | 43 | |
| Models and catalog | 45 | |
| Organizations | 8 | |
| Pricing | 1 | |
| Prompts | 25 | |
| Providers | 7 | |
| Quotas | 35 | |
| Rate limits | 3 | |
| Recycle bin | 2 | |
| Request logs | 45 | |
| Traces | 20 | |
| Requests | 1 | |
| Resilience | 1 | |
| Retention | 16 | |
| Routing status | 3 | |
| SCIM | 14 | |
| Skills | 16 | |
| System | 10 | |
| Teams | 14 | |
| Attribution groups | 5 | |
| Customer portal | 24 | |
| Usage tags | 3 | |
| Valuation | 5 | |
| Workloads | 6 |
Every request and response object is described under Schemas, by initial.