Admin endpoints require the admin API key (configured at deployment). All admin routes are under /admin/.
API Key Management
POST /admin/keys
Create a new API key.
{
"customer_id": "cust_123",
"name": "Production Key",
"rate_limit_rpm": 1000,
"rate_limit_tpm": 100000,
"allowed_models": ["claude-sonnet-4-20250514", "gpt-5"]
}
Response:
{
"key": "ens_aBcDeFgH...",
"key_id": "key_123",
"prefix": "ens_aBcDeFgH"
}
The full key is only returned once at creation. Store it securely.
GET /admin/keys
List all API keys (returns metadata, not the keys themselves).
PUT /admin/keys//config
Update key configuration (rate limits, allowed models, etc.).
GET /admin/keys//config
Get current key configuration.
GET /admin/keys//usage
Get usage statistics for a key.
POST /admin/keys//status
Enable or disable a key.
POST /admin/keys//revoke
Permanently revoke a key.
Customer Management
POST /admin/customers
Create a new customer.
{
"name": "Acme Corp",
"email": "admin@acme.com"
}
GET /admin/customers
List all customers.
Operational
GET /admin/status
System status including provider health, rate limit utilization, and cache statistics.
GET /admin/logs
Query recent request logs with filtering.
Query parameters:
limit — Number of logs (default: 100)
offset — Pagination offset
model — Filter by model
provider — Filter by provider
status — Filter by status (success, error)
since — ISO timestamp filter
Health
GET /api/v1/health
Public health check (no authentication required).
{
"status": "healthy",
"version": "1.0.0",
"uptime": "72h15m",
"providers": {
"anthropic": "healthy",
"openai": "healthy",
"gemini": "degraded"
}
}