Errors

All error responses use the ApiProblem shape.

ApiProblem shape

{
  "status": 400,
  "error":  "Human-readable message.",
  "details": ["optional", "array", "of", "field-level", "messages"]
}

details is omitted when there are no per-field messages.

Status code table

Code Meaning
400 Bad request — invalid input (malformed email, bad callback_url, etc.)
401 Missing or invalid API key
402 Insufficient credits
404 Resource not found
429 Rate limit exceeded

Common error examples

Missing or invalid API key:

{ "status": 401, "error": "Invalid or revoked API key." }

Insufficient credits:

{
  "status": 402,
  "error": "Insufficient credits.",
  "details": ["shortfall: 5", "balance: 0", "required: 5"]
}

Rate limit exceeded:

{ "status": 429, "error": "Too many requests." }