Error Envelope
Every/v1/ error response uses a structured envelope:
For agents: branch on
code for error handling, use retryable to decide whether to retry, and include requestId in support requests.
Error Codes
HTTP Status Codes
Interpreting 202 Accepted
POST /v1/apps/{appId}/runs returns 202 when Lamina has accepted the job.
That does not mean outputs are ready yet. After a 202 response:
- store the returned run ID
- call
GET /v1/runs/{runId}/wait?timeout=60(simplest) - or poll
GET /v1/runs/{runId}every 3-5 seconds - or wait for your webhook callback
Common Error Cases
Authentication errors
AUTH_MISSING_KEY: sendx-api-keyheader orAuthorization: Bearer ...AUTH_INVALID_KEY: verify the key value, check it has not been revoked, confirm correct environmentAUTH_INVALID_CONTEXT: the key exists but is misconfigured — contact support
Invalid inputs
Validation errors include adetails array with one structured entry per problem:
Detail codes:
About
required and defaults: every parameter in the schema is returned with required: true, so agents always know to supply a value. If a parameter has a default, omitting it is still safe — the workflow will run with the default. If it has no default, omitting it triggers a missing_no_default error with 400.
How to recover:
- Parse
details[]and branch oncode. - For
missing_no_default: read theparamfield, look it up in your cached schema, and fill in a value. - For
unknown_parameter: re-fetchGET /v1/apps/{appId}— your cached schema may be stale. - For
invalid_option: read the message for the allowed option list and pick one. - For
invalid_mediaorinvalid_type: fix the value and retry.
Not found
- verify the
appIdorrunId - confirm the resource is accessible to the workspace associated with your key
Rate limit exceeded
- wait
retryAfterseconds before retrying - read
RateLimit-Limit,RateLimit-Remaining, andRateLimit-Resetheaders - avoid tight polling loops; prefer webhooks or the wait endpoint for long-running executions
Current Rate Limit
All/v1/* endpoints are currently limited to 100 requests per minute per IP.
Retry Guidance
Use theretryable field to decide whether to retry. As a general rule:
Safe to retry (retryable: true):
RATE_LIMITED— waitretryAfterseconds firstINTERNAL_ERROR— transient server failure, use exponential backoffAUTH_FAILED— transient database errorRESOURCE_UNAVAILABLE— service temporarily down- Network timeouts while fetching status
- Idempotent reads (
GET /v1/apps,GET /v1/runs/{id})
retryable: false):
VALIDATION_ERROR— fix the inputs firstAUTH_MISSING_KEY/AUTH_INVALID_KEY— fix credentialsFORBIDDEN— access denied, won’t change on retryNOT_FOUND— wrong ID
Support Checklist
If you need to debug an issue quickly, capture:requestIdfrom the error responsecodefrom the error response- request path and method
- app ID or execution ID
- timestamp