API keys
Create, list, rotate and revoke bl_live_ API keys. Reference for API version 2026-11-11.
On this page
Create an API key
/api/v1/keys/create Session onlyMint a bl_live_ key. Interactive sessions only: an API key gets 403, because keys cannot mint keys. The session token must be under 5 minutes old, or the body must include the account password; otherwise the response is 428 (a step-up prompt, not a sign-out). At most 10 active keys per user and 5 creations per hour. Lifetime is capped at 365 days by default (an omitted or longer expiresInDays is clamped). llm:* scopes can always be granted; any other scope must be one you hold in your organization. The plaintext key is returned once, with Cache-Control: no-store.
Authentication
- Console session token only (API keys are refused)
Request body
namestring Required- Maximum length
100
typestringA label for the key's purpose. Capability comes from
scopes.- One of
AGENTNORMALLLM- Default
NORMAL
scopesarray of strings or nullScopes to grant. Empty uses the type's default (NORMAL keys get
llm:access,llm:chat).- Examples
["llm:access","llm:chat"]
expiresInDaysinteger or null- Minimum
1
passwordstring (password) or nullAccount password, required when the session token is older than 5 minutes.
Responses
200The new key. Store it now; it is never shown again.Body (application/json)
idstringkeystringThe plaintext key, starting
bl_live_.key_prefixstringnamestringtypestringscopesarray of stringsexpires_atstring (date-time) or nullcreated_atstring (date-time)warningstring
429A per-key request limit was exceeded, or the rate limiter could not be reached (it fails closed). There is noRetry-Afterfor a window limit; wait for the next window. A concurrency limit, when configured, also returns429, withRetry-After.Error envelope
Example
curl -X POST "https://api.breachline.io/api/v1/keys/create" \
-H "Authorization: Bearer $BREACHLINE_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'
{
"id": "string",
"key": "string",
"key_prefix": "string",
"name": "string",
"type": "string",
"scopes": [
"string"
],
"expires_at": "2026-11-11T00:00:00Z",
"created_at": "2026-11-11T00:00:00Z",
"warning": "string"
}
List API keys
/api/v1/keys/list The caller's active keys. Plaintext is never returned; key_prefix identifies each key. An API key needs keys:read.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Responses
200Keys.Body (application/json)
keysarray of objects10 fields in
keysidstringnamestringtypestringscopesarray of stringskey_prefixstringexpires_atstring or nullis_activebooleanis_expiredbooleanlast_used_atstring or nullcreated_atstring
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/keys/list" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"keys": [
{
"id": "string",
"name": "string",
"type": "string",
"scopes": [
"string"
],
"key_prefix": "string",
"expires_at": "string",
"is_active": true,
"is_expired": true,
"last_used_at": "string",
"created_at": "string"
}
]
}
Revoke an API key
/api/v1/keys/{key_id} Revocation is immediate. An API key needs keys:revoke.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Path parameters
key_idstring Required
Responses
200Revoked.Body (application/json)
successbooleanmessagestring
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl -X DELETE "https://api.breachline.io/api/v1/keys/{key_id}" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"success": true,
"message": "string"
}
Rotate an API key
/api/v1/keys/refresh/{key_id} Session onlyIssue a new secret for an existing key; the old secret stops working at once. Interactive sessions only (an API key gets 403), and the account password is required (401 if wrong).
Authentication
- Console session token only (API keys are refused)
Path parameters
key_idstring Required
Request body
passwordstring (password) Required
Responses
200The new plaintext key, shown once.Body (application/json)
keystringwarningstring
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl -X POST "https://api.breachline.io/api/v1/keys/refresh/{key_id}" \
-H "Authorization: Bearer $BREACHLINE_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "string"
}'
{
"key": "string",
"warning": "string"
}