Console API: sla
This page is generated from server/api/openapi.yaml. Do not edit it by hand.
SLA commitment, compensation records and public totals (PRD V3 B3). Handlers: internal/console/sla.
GET /api/v1/sla/policy
Section titled “GET /api/v1/sla/policy”Public SLA commitment (switch, policy and every rule)
operationId slaPolicy · auth: public
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | application/json SlaPolicy |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 200 application/json — SlaPolicy
enabled(boolean, required) — Global switch (setting sla.enabled).grant_expiry_days(integer, required) org_daily_cap_nano(string, required, pattern: ”^-?[0-9]+$”) — Most an organisation can receive per UTC day; “-1” = no cap. (Nano-USD, integer string.)zero_paid_nano(string, required, pattern: ”^-?[0-9]+$”) — Granted for a triggered request that cost nothing. (Nano-USD, integer string.)excluded_error_codes(array of string, required)rules(array of SlaRule, required) — Enabled rules only.id(string, required) kind(SlaRuleKind, required) — upstream_5xx: every supply failed and the client saw a 5xx. ttft: time to first content abovethresholdms. throughput: output tokens per second of generation time belowthreshold. empty: a successful chat response with no output.model_id(string, required, nullable) offering_id(string, required, nullable) threshold(integer, required) min_output_tokens(integer, required) stream_only(boolean, required)ratio_ppm(integer, required) enabled(boolean, required)created_at(string, required) updated_at(string, required)
GET /api/v1/sla/totals
Section titled “GET /api/v1/sla/totals”Public all-time compensation totals (for the public data page)
operationId slaTotals · auth: public
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days |
query | integer<int32> | no | Also return the per-day totals of the last days UTC days. (minimum: 0, maximum: 366, default: 0) |
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | application/json SlaTotals |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 200 application/json — SlaTotals
amount_nano(string, required, pattern: ”^-?[0-9]+$”) — All-time granted compensation. (Nano-USD, integer string.)requests(integer, required) — Requests that were granted compensation. since(string, required, nullable) days(array of SlaDayTotal, required)day(string, required) amount_nano(string, required, pattern: ”^-?[0-9]+$”) — (Nano-USD, integer string.)requests(integer, required)
GET /api/v1/sla/compensations
Section titled “GET /api/v1/sla/compensations”Compensations of the active organisation
operationId slaListCompensations · auth: orgSession
Written asynchronously after settlement; a request may appear here a few seconds (at most about an hour, through the backfill) after it finished.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string<date-time> | no | Inclusive lower bound. |
to |
query | string<date-time> | no | Exclusive upper bound. |
api_key_id |
query | string<uuid> | no | |
status |
query | SlaCompensationStatus | no | |
cursor |
query | string | no | Opaque cursor from a previous page’s next_cursor. |
limit |
query | integer<int32> | no | (minimum: 1, maximum: 200, default: 50) |
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | application/json SlaCompensationPage |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 200 application/json — SlaCompensationPage
data(array of SlaCompensation, required)request_id(string, required) org_id(string, required) api_key_id(string, required, nullable) model_id(string, required, nullable) offering_id(string, required, nullable) rule_id(string, required) rule_kind(SlaRuleKind, required) — upstream_5xx: every supply failed and the client saw a 5xx. ttft: time to first content abovethresholdms. throughput: output tokens per second of generation time belowthreshold. empty: a successful chat response with no output.detail(string, required)paid_nano(string, required, pattern: ”^-?[0-9]+$”) — What the request cost. (Nano-USD, integer string.)computed_nano(string, required, pattern: ”^-?[0-9]+$”) — Compensation before the daily cap. (Nano-USD, integer string.)amount_nano(string, required, pattern: ”^-?[0-9]+$”) — Credits granted. (Nano-USD, integer string.)status(SlaCompensationStatus, required) — granted: credits were granted. capped: the organisation’s daily cap was used up. zero_amount: the computed amount was 0 (for example a 5xx that cost nothing). key_paused: compensation of the API key is paused.grant_id(string, required, nullable) expires_at(string, required, nullable) request_started_at(string, required) created_at(string, required)
next_cursor(string, required, nullable)has_more(boolean, required)