API · 20 operationer
llm-gateway
Genererad ur services/llm-gateway/openapi.json, kontraktsversion 0.1.0. Auth-modell och anropare står i atlasen.
GET /admin/audit
Audit
| Parameter | I | Typ | Krävs |
|---|---|---|---|
since | query | string (date-time) | null | nej |
until | query | string (date-time) | null | nej |
actor | query | string | null | nej |
action | query | string | null | nej |
q | query | string | null | nej |
chain | query | string | null | nej |
limit | query | integer | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
DELETE /admin/keys/{key_id}
Revoke Key
| Parameter | I | Typ | Krävs |
|---|---|---|---|
key_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
204 | Successful Response | — |
422 | Validation Error | HTTPValidationError application/json |
PATCH /admin/keys/{key_id}
Patch Key
| Parameter | I | Typ | Krävs |
|---|---|---|---|
key_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: PatchKeyRequest application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/tenants/{tenant_id}/budget
Get Budget
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
PUT /admin/tenants/{tenant_id}/budget
Set Budget
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: SetBudgetRequest application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/tenants/{tenant_id}/export
Tenant Export
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | TenantExport application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/tenants/{tenant_id}/keys
List Keys
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object[] application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /admin/tenants/{tenant_id}/keys
Create Key
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: CreateKeyRequest application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
201 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/tenants/{tenant_id}/usage
Tenant Usage
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
period | query | string | null | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/tenants/{tenant_id}/usage/by-group
Tenant Usage By Group
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
period | query | string | null | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/tenants/{tenant_id}/usage/by-user
Tenant Usage By User
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
user_id_hash | query | string | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
PUT /admin/tenants/{tenant_id}/webhook
Set Webhook
| Parameter | I | Typ | Krävs |
|---|---|---|---|
tenant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: SetWebhookRequest application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /admin/usage/summary
Summary
| Parameter | I | Typ | Krävs |
|---|---|---|---|
period | query | string | null | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | object application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /health
Health
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | { [nyckel]: string | string[] } application/json |
GET /health/watchdog
Health Watchdog
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
POST /v1/audio/transcriptions
Transcriptions
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
Kropp: Body_transcriptions_v1_audio_transcriptions_post multipart/form-data
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/chat/completions
Chat Completions
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/embeddings
Embeddings
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
x-knowledge-collection-id | header | string | null | nej |
x-knowledge-information-class | header | string | null | nej |
x-trace-id | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/models
List Models
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/rerank
Rerank
| Parameter | I | Typ | Krävs |
|---|---|---|---|
authorization | header | string | null | nej |
x-knowledge-collection-id | header | string | null | nej |
x-knowledge-information-class | header | string | null | nej |
x-trace-id | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | any application/json |
422 | Validation Error | HTTPValidationError application/json |
Scheman
Body_transcriptions_v1_audio_transcriptions_post
| Fält | Typ | Krävs |
|---|---|---|
file | string | ja |
language | string | null | nej |
model | string | ja |
CoverageGap
En store exporten INTE täcker, med ett ärligt skäl. `store` måste vara IDENTISK med namnet i `covered` när en store demoteras (t.ex. `page_truncated_over_500`), så en konsument kan korrelera flytten. Se regel (c) i docs/tenant-export-coverage.md.
| Fält | Typ | Krävs |
|---|---|---|
reason | string | ja |
store | string | ja |
CreateKeyRequest
| Fält | Typ | Krävs |
|---|---|---|
allowed_models | string[] | null | nej |
label | string | null | nej |
purpose | "eval" | null | nej |
HTTPValidationError
| Fält | Typ | Krävs |
|---|---|---|
detail | ValidationError[] | nej |
PatchKeyRequest
| Fält | Typ | Krävs |
|---|---|---|
allowed_models | string[] | null | ja |
SetBudgetRequest
| Fält | Typ | Krävs |
|---|---|---|
alert_thresholds | integer[] | null | nej |
hard_limit | boolean | null | nej |
monthly_budget_sek | string | null | nej |
SetWebhookRequest
| Fält | Typ | Krävs |
|---|---|---|
webhook_url | string | null | ja |
TenantExport
En producents svar. `extra="forbid"` medvetet: bevarar de tre befintliga typade deklarationernas beteende, OCH gör att en producent som lägger ett fält utan att koordinatorn lär sig om det failar högt i stället för tyst.
| Fält | Typ | Krävs |
|---|---|---|
coverage | TenantExportCoverage | ja |
data | object | ja |
generated_at | string (date-time) | ja |
service | string | ja |
tenant_id | string (uuid) | ja |
TenantExportCoverage
| Fält | Typ | Krävs |
|---|---|---|
covered | string[] | ja |
not_covered | CoverageGap[] | ja |
ValidationError
| Fält | Typ | Krävs |
|---|---|---|
ctx | object | nej |
input | any | nej |
loc | string | integer[] | ja |
msg | string | ja |
type | string | ja |