Admin API
Internal key management and plan catalog endpoints.
These endpoints are for internal operators and dashboards, not for regular API consumers. All key-management routes require the GATEWAY_ADMIN_TOKEN via Authorization: Bearer <admin-token>.
The single exception is GET /v1/external-transcription/plans, which is public and intended for SDK clients and dashboards that need to display plan limits.
Base URL
https://audio.lansonai.com
Authentication
| Header | Value |
|---|---|
Authorization | Bearer <GATEWAY_ADMIN_TOKEN> |
A missing or incorrect admin token returns:
{
"ok": false,
"error": {
"code": "admin_unauthorized",
"message": "Admin token required.",
"retryable": false
}
}
Response envelope
All admin endpoints use the same envelope:
{
"ok": true,
"data": { ... }
}
Errors:
{
"ok": false,
"error": {
"code": "...",
"message": "...",
"retryable": false
}
}
Endpoints
GET /v1/external-transcription/plans
Public. Returns every known plan and its resolved limits.
curl https://audio.lansonai.com/v1/external-transcription/plans
Response:
{
"ok": true,
"data": [
{
"plan": "free",
"limits": {
"maxConcurrentConnections": 1,
"maxConcurrentUtterances": 2,
"maxConnectionsPerMinute": 6,
"maxRequestsPerMinute": 12,
"maxAudioSecondsPerRequest": 900,
"maxSessionSeconds": 900,
"maxAudioSecondsPerSession": 900,
"maxAudioSecondsPerWindow": 3600,
"idleTimeoutSeconds": 60
}
}
]
}
POST /v1/external-transcription/keys
Issue a new API key. The plaintext key is returned exactly once in the response; after that only metadata and a hash are stored.
curl -X POST https://audio.lansonai.com/v1/external-transcription/keys \
-H "Authorization: Bearer <admin-token>" \
-H "Content-Type: application/json" \
-d '{
"owner_id": "tenant_a",
"plan": "pro",
"label": "production",
"expires_at": "2026-12-31T23:59:59Z"
}'
Request fields:
| Field | Type | Required | Description |
|---|---|---|---|
owner_id | string | no | Tenant identifier (default: default) |
plan | string | no | Plan name (default: free) |
label | string | no | Human-readable label |
expires_at | string (ISO 8601) | no | Expiration timestamp |
Response:
{
"ok": true,
"data": {
"key": "sk-...",
"id": "...",
"ownerId": "tenant_a",
"keyPrefix": "sk-xxxxxxxxx",
"lastFour": "abcd",
"plan": "pro",
"status": "active",
"label": "production",
"expiresAt": "2026-12-31T23:59:59Z",
"revokedAt": null,
"lastUsedAt": null,
"createdAt": "2026-08-16T...",
"limits": { ... }
}
}
GET /v1/external-transcription/keys
List key metadata. Optionally filter by ?owner_id=.
curl https://audio.lansonai.com/v1/external-transcription/keys \
-H "Authorization: Bearer <admin-token>"
Response:
{
"ok": true,
"data": [
{ "id": "...", "ownerId": "tenant_a", "plan": "pro", "status": "active", ... }
]
}
GET /v1/external-transcription/keys/{id}
Inspect a single key.
curl https://audio.lansonai.com/v1/external-transcription/keys/<id> \
-H "Authorization: Bearer <admin-token>"
DELETE /v1/external-transcription/keys/{id}
Revoke a key.
curl -X DELETE https://audio.lansonai.com/v1/external-transcription/keys/<id> \
-H "Authorization: Bearer <admin-token>"
Error codes
| Code | HTTP | Description |
|---|---|---|
admin_unauthorized | 401 | Missing or incorrect admin token |
invalid_plan | 400 | Unknown plan name |
key_not_found | 404 | Key ID does not exist |
issue_failed | 500 | Unable to issue a key |
store_unavailable | 500 | R2 key store unavailable |
not_found | 404 | Unknown admin route |
Related
- Authentication — regular API key and session-token flow
- Rate Limits — plan limits returned by
/plans
