Console API: admin-sla
This page is generated from server/api/openapi.yaml. Do not edit it by hand.
SLA rules, compensations and paused keys (PRD V3 B3). Handlers: internal/admin/sla.
GET /api/v1/admin/sla/rules
Section titled “GET /api/v1/admin/sla/rules”List SLA rules
operationId adminSlaListRules · auth: adminSession
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | application/json SlaRuleList |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 200 application/json — SlaRuleList
data(array of SlaRule, required)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)
POST /api/v1/admin/sla/rules
Section titled “POST /api/v1/admin/sla/rules”Create an SLA rule
operationId adminSlaCreateRule · auth: adminSession
Request body (required) application/json — SlaRuleInput
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, nullable) — Scope the rule to a model; null with offering_id null = default rule for every model. offering_id(string, nullable) — Scope the rule to one supply (offering); most specific rule wins. threshold(integer, minimum: 0) — ttft in milliseconds, throughput in output tokens per second; 0 for the other kinds. min_output_tokens(integer, minimum: 0) — throughput only; shorter responses are not judged. stream_only(boolean) — ttft / throughput judge streaming requests only. Default true.ratio_ppm(integer, required, minimum: 0, maximum: 1000000) — Share of the paid amount granted back (ppm). enabled(boolean) — Default true.
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | application/json SlaRule |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 201 application/json — SlaRule
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)
PUT /api/v1/admin/sla/rules/{rule_id}
Section titled “PUT /api/v1/admin/sla/rules/{rule_id}”Replace an SLA rule
operationId adminSlaUpdateRule · auth: adminSession
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
rule_id |
path | string<uuid> | yes |
Request body (required) application/json — SlaRuleInput
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, nullable) — Scope the rule to a model; null with offering_id null = default rule for every model. offering_id(string, nullable) — Scope the rule to one supply (offering); most specific rule wins. threshold(integer, minimum: 0) — ttft in milliseconds, throughput in output tokens per second; 0 for the other kinds. min_output_tokens(integer, minimum: 0) — throughput only; shorter responses are not judged. stream_only(boolean) — ttft / throughput judge streaming requests only. Default true.ratio_ppm(integer, required, minimum: 0, maximum: 1000000) — Share of the paid amount granted back (ppm). enabled(boolean) — Default true.
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | application/json SlaRule |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 200 application/json — SlaRule
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)
DELETE /api/v1/admin/sla/rules/{rule_id}
Section titled “DELETE /api/v1/admin/sla/rules/{rule_id}”Delete an SLA rule
operationId adminSlaDeleteRule · auth: adminSession
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
rule_id |
path | string<uuid> | yes |
| Status | Meaning | Body |
|---|---|---|
| 204 | Deleted. | — |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
GET /api/v1/admin/sla/compensations
Section titled “GET /api/v1/admin/sla/compensations”Compensations of every organisation
operationId adminSlaListCompensations · auth: adminSession
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_id |
query | string<uuid> | no | |
api_key_id |
query | string<uuid> | no | |
status |
query | SlaCompensationStatus | no | |
from |
query | string<date-time> | no | Inclusive lower bound. |
to |
query | string<date-time> | no | Exclusive upper bound. |
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)
GET /api/v1/admin/sla/pauses
Section titled “GET /api/v1/admin/sla/pauses”API keys whose compensation was paused for an abnormal trigger rate
operationId adminSlaListPauses · auth: adminSession
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
active |
query | boolean | no | Only pauses not yet resumed. (default: true) |
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | application/json SlaKeyPauseList |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |
Response 200 application/json — SlaKeyPauseList
data(array of SlaKeyPause, required)api_key_id(string, required) org_id(string, required) paused_at(string, required) requests(integer, required) — Judged requests in the window when paused. triggered(integer, required) resumed_at(string, required, nullable) resumed_by(string, required, nullable)
POST /api/v1/admin/sla/pauses/{api_key_id}/resume
Section titled “POST /api/v1/admin/sla/pauses/{api_key_id}/resume”Resume compensation for an API key
operationId adminSlaResumeKey · auth: adminSession
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
api_key_id |
path | string<uuid> | yes |
| Status | Meaning | Body |
|---|---|---|
| 204 | Resumed; the abuse window restarts. | — |
| default | Error envelope. The HTTP status follows the error kind. | application/json Error |