Integrations
API keys
Issue scoped dt_live_ keys with optional per-key monthly credit budgets. Keys are managed from your dashboard session — the management endpoints authenticate with a JWT, not a key.
Overview
A key is a dt_live_ secret you send in the X-API-Key header to call any tool (see Authentication). Only a hash is stored — the full secret is shown once, at creation. All management endpoints below live under /api/v1/keys and require a dashboard JWT.
Endpoints
https://api.bytefuse.in/api/v1/keys/api/v1/keysList your keys (no secrets)/api/v1/keys/limitsYour plan’s key-count limit/api/v1/keys/scopesCatalog of scopable operations/api/v1/keys/{key_id}Revoke a key (204)Creating a key
POST /api/v1/keys with a JSON body:
namestringrequireddescriptionstringoptionalpermissionsstring[]optionalread, write, delete, admin. An unknown value returns 422.Default: ["read","write"]scopesstring[]optionaloperation_keys (e.g. pdf.compress). Omit, [], or ["*"] means full access.Default: full accesscredit_limitintoptionalexpires_in_daysintoptionalReturns 201 with the key’s metadata plus api_key — the full dt_live_ secret, shown only here:
{
"id": "…",
"name": "CI pipeline",
"key_prefix": "dt_live_a1b2c3d…",
"scopes": ["pdf.compress", "convert.document"],
"credit_limit": 5000,
"credits_used": 0,
"is_active": true,
"created_at": "2026-07-04T12:00:00Z",
"api_key": "dt_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}curl -X POST https://api.bytefuse.in/api/v1/keys \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "CI pipeline",
"scopes": ["pdf.compress", "convert.document"],
"credit_limit": 5000
}'The secret is shown once
The fullapi_key is returned only on creation. Store it securely immediately — there’s no way to retrieve it later. If it leaks, revoke and recreate.Scopes & budgets
Scopes and budgets are enforced at call time, on the tool endpoint — not on these management routes:
- Scope — if a key has scopes and the operation isn’t among them, the tool call returns
403. - Per-key budget — if the month’s spend plus this call would exceed
credit_limit, the call returns402. Both checks run before any debit, so a blocked call costs nothing.
GET /api/v1/keys/scopes returns the catalog of scopable operations (built from live pricing, so it only offers billable ops), each with its credit cost — handy for building a scope picker.
Key-count limits
How many active keys you can hold depends on your plan (over the cap, POST /keys returns 403):
Rotating & revoking
There is no rotate endpoint for API keys — to rotate, revoke and recreate. Revoke with DELETE /api/v1/keys/{key_id} (returns 204); the key stops authenticating immediately.
curl -X DELETE https://api.bytefuse.in/api/v1/keys/KEY_ID \
-H "Authorization: Bearer $JWT"
# → 204 No Content