Skip to main content

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

Action:
  • AUTH_MISSING_KEY: send x-api-key header or Authorization: Bearer ...
  • AUTH_INVALID_KEY: verify the key value, check it has not been revoked, confirm correct environment
  • AUTH_INVALID_CONTEXT: the key exists but is misconfigured — contact support

Invalid inputs

Validation errors include a details array with one structured entry per problem:
Each detail entry has: 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:
  1. Parse details[] and branch on code.
  2. For missing_no_default: read the param field, look it up in your cached schema, and fill in a value.
  3. For unknown_parameter: re-fetch GET /v1/apps/{appId} — your cached schema may be stale.
  4. For invalid_option: read the message for the allowed option list and pick one.
  5. For invalid_media or invalid_type: fix the value and retry.

Not found

Action:
  • verify the appId or runId
  • confirm the resource is accessible to the workspace associated with your key

Rate limit exceeded

Action:
  • wait retryAfter seconds before retrying
  • read RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset headers
  • 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 the retryable field to decide whether to retry. As a general rule: Safe to retry (retryable: true):
  • RATE_LIMITED — wait retryAfter seconds first
  • INTERNAL_ERROR — transient server failure, use exponential backoff
  • AUTH_FAILED — transient database error
  • RESOURCE_UNAVAILABLE — service temporarily down
  • Network timeouts while fetching status
  • Idempotent reads (GET /v1/apps, GET /v1/runs/{id})
Do not retry unchanged (retryable: false):
  • VALIDATION_ERROR — fix the inputs first
  • AUTH_MISSING_KEY / AUTH_INVALID_KEY — fix credentials
  • FORBIDDEN — access denied, won’t change on retry
  • NOT_FOUND — wrong ID

Support Checklist

If you need to debug an issue quickly, capture:
  • requestId from the error response
  • code from the error response
  • request path and method
  • app ID or execution ID
  • timestamp