v1 API contract
One source of truth for authentication, scopes, rate limits, errors and pricing. Version 2026-08-01. Machine-readable at https://lucidry.base44.app/functions/serveOpenApiSpec.
Authentication
Send Authorization: Bearer lucid_live_…. Alternatively use the X-Api-Key header.
- Keys are shown once at creation and stored only as a SHA-256 hash, Lucidry cannot recover a lost key.
- Revoking a key takes effect on the next request; existing jobs keep running.
- Sandbox keys (sbx_) are never accepted on the production surface.
Scopes
| Scope | Grants |
|---|---|
jobs:readRead jobs | List and read jobs, sources, estimates, profiles and drift reports. |
jobs:writeCreate and cancel jobs | Create refinement and translation jobs, register sources, cancel jobs. Implies jobs:read. |
artifacts:readDownload artifacts | Read artifact metadata and mint short-lived signed download URLs. |
billing:readRead billing usage | Read the organization credit position and the masked usage ledger. |
wallet:readRead wallet | Read the wallet balance, receipts and the per-principal usage summary. |
webhooks:writeManage webhooks | Register, list and delete webhook endpoints. Signing secrets are returned once, on create. |
adminAdminister the account | Everything above, plus account-level configuration. Issue sparingly. |
*Unrestricted (legacy) | Every scope. The default for keys created before scopes existed. |
Rate limits
Two windows are enforced per credential. A breach returns RATE_LIMITED with a Retry-After header.
standard
- Sustained
- 60/min
- Burst
- 20 / 10s
- Retry-After
- 60s
high
- Sustained
- 300/min
- Burst
- 60 / 10s
- Retry-After
- 20s
unlimited
- Sustained
- unmetered
- Burst
- unmetered
- Retry-After
- 0s
Errors
{
"error": {
"code": "VALIDATION_ERROR",
"message": "target_language is required",
"request_id": "req_…",
"details": []
}
}| Code | HTTP | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | |
FORBIDDEN | 403 | |
NOT_FOUND | 404 | |
VALIDATION_ERROR | 422 | |
BAD_REQUEST | 400 | |
JOB_INSTRUCTIONS_TOO_LONG | 400 | |
JOB_NAME_TOO_LONG | 422 | |
JOB_NAME_REQUIRED | 422 | |
INVALID_TRANSFORM_PROFILE | 422 | |
SOURCE_MALWARE_DETECTED | 422 | |
PAYMENT_REQUIRED | 402 | |
FREE_TIER_CAP_EXCEEDED | 402 | |
WALLET_INSUFFICIENT_FUNDS | 402 | |
RATE_LIMITED | 429 | |
ACCOUNT_FLAGGED | 423 | |
LLM_GATEWAY_FAILED | 502 | |
STAGE_TIMED_OUT | 504 | |
PROVIDER_UNAVAILABLE | 502 | |
OUTPUT_TRUNCATED | 422 | |
INTERNAL_ERROR | 500 |
Endpoints
| Endpoint | Scope | Purpose |
|---|---|---|
GET /health | - | Service health |
POST /translate | jobs:write | Translate text |
POST /jobs | jobs:write | Create a refinement job |
GET /jobs | jobs:read | List jobs |
GET /jobs/{job_id} | jobs:read | Get a job |
POST /jobs/{job_id}/cancel | jobs:write | Cancel a job |
POST /sources | jobs:write | Register a source asset |
GET /sources | jobs:read | List source assets |
GET /sources/{source_id} | jobs:read | Get a source asset |
GET /artifacts/{artifact_id} | artifacts:read | Get an artifact |
POST /estimates | jobs:read | Estimate a job price |
GET /profiles | jobs:read | List transform profiles |
GET /usage | billing:read | Usage history |
GET /webhooks | webhooks:write | List webhook endpoints |
POST /webhooks | webhooks:write | Create a webhook endpoint |
DELETE /webhooks | webhooks:write | Delete a webhook endpoint |
GET /translation/profiles | jobs:read | List translation profiles |
GET /translation/glossaries | jobs:read | List glossaries |
GET /translation/drift-report | jobs:read | Get a drift report |
