Management API

Status: Stub — content pending.

Status: Stub — content pending.


title: "Management API" description: "Full route listing for the obleth Management API (/api/v1), with auth, request shapes, and example responses."

The Management API runs on port 9090. All routes require:

Authorization: Bearer <OBLETH_ADMIN_TOKEN>
Content-Type: application/json  (for POST/PUT/PATCH)

An OpenAPI JSON schema is available at GET /api/v1/openapi.json.

Tenants

MethodPathDescription
GET/api/v1/tenantsList all tenants
POST/api/v1/tenantsCreate a tenant
GET/api/v1/tenants/{id}Get a tenant
PATCH/api/v1/tenants/{id}/weightUpdate weight
PUT/api/v1/tenants/{id}/quotaUpdate TPM quota
PATCH/api/v1/tenants/{id}/groupAssign to a fairshare group
# Create tenant
curl -X POST http://localhost:9090/api/v1/tenants \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "acme", "weight": 200, "tokens_per_minute": 100000}'

# Update weight
curl -X PATCH http://localhost:9090/api/v1/tenants/$ID/weight \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"weight": 500}'

API Keys

MethodPathDescription
POST/api/v1/tenants/{id}/keysCreate a key for a tenant
GET/api/v1/keysList all keys (no secrets)
DELETE/api/v1/keys/{id}Delete a key
PUT/api/v1/keys/{id}/disabledDisable or re-enable a key
# Create key (secret returned once)
curl -X POST http://localhost:9090/api/v1/tenants/$TENANT_ID/keys \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"name": "prod-key"}'
# -> {"key": {"id": "...", "key_prefix": "sk_a1b2c3d4e5f6a1b"}, "secret": "sk_a1b2..."}

Models

MethodPathDescription
POST/api/v1/modelsRegister a model
GET/api/v1/modelsList all models
GET/api/v1/models/{id}Get a model
PUT/api/v1/models/{id}Update a model
DELETE/api/v1/models/{id}Delete a model
PUT/api/v1/models/{id}/cacheConfigure response cache

Fairshare

MethodPathDescription
GET/api/v1/fairshare/liveLive scheduler snapshot
POST/api/v1/fairshare/groupsCreate a group
GET/api/v1/fairshare/groupsList all groups
PATCH/api/v1/fairshare/groups/{name}/weightUpdate group weight

MCP Servers

MethodPathDescription
POST/api/v1/mcp-serversRegister an MCP server
GET/api/v1/mcp-serversList all servers
GET/api/v1/mcp-servers/{id}Get a server
PUT/api/v1/mcp-servers/{id}Update a server
DELETE/api/v1/mcp-servers/{id}Delete a server

Usage and billing

MethodPathDescription
GET/api/v1/usageAggregate usage (tenant/key/model)
GET/api/v1/usage/keysPer-key usage
GET/api/v1/usage/modelsPer-model usage
GET/api/v1/usage/seriesTime-series usage
GET/api/v1/usage/series/tenantsTime-series per tenant
GET/api/v1/usage/cacheCache stats
GET/api/v1/costsCost breakdown (uses model pricing)

Capacity and stats

MethodPathDescription
GET/api/v1/statsLive in_flight, queued, max_in_flight
GET/api/v1/capacityCurrent max_in_flight per pod
PUT/api/v1/capacityUpdate max_in_flight live (no restart)

Audit

MethodPathDescription
GET/api/v1/auditPaginated audit log (all config mutations)

Utility

MethodPathDescription
GET/api/v1/healthHealth check (returns {"status":"ok"})
GET/api/v1/openapi.jsonOpenAPI 3.1 schema for all routes