Appearance
Errors
Errors are returned as a JSON body with a matching HTTP status code. Most follow one general shape:
json
{ "statusCode": 404, "message": "Job with ID \"...\" not found." }A few statuses return a richer, purpose-specific body — those are documented below and linked to where they're explained in full.
| Status | Meaning | Body |
|---|---|---|
401 Unauthorized | Missing or invalid x-client-id / x-client-secret | { "statusCode", "message" } — see Authentication |
402 Payment Required | Insufficient prepaid credits, or API billing not yet set up on your account | { "available", "error", "message", "required" } — see Pricing & Credits |
403 Forbidden | The action isn't allowed for this job (e.g. generating from a model you don't own) | { "statusCode", "message" } |
404 Not Found | The jobId in the path doesn't exist | { "statusCode", "message" } |
422 Unprocessable Entity | A required field is missing, or a file has the wrong type/size | { "statusCode", "message" } |
429 Too Many Requests | Temporary rate limit while the API is in test: more than 5 concurrent (pending/running) jobs on the same API key | { "statusCode", "message" } — see Authentication |
500 Internal Server Error | Unexpected failure. Retry with backoff; if it persists, contact support with the jobId (if one was returned) | { "statusCode", "message" } |
Outside of that temporary concurrency cap, there's no other dedicated rate limit on generation endpoints — throughput is otherwise governed by your prepaid credit balance.
Temporary rate limit during API test
While the API is in test, each API key (x-client-id) is limited to 5 concurrent jobs (status pending or running). A 6th simultaneous request returns 429 Too Many Requests until an earlier job finishes. Wait for a job to complete (poll GET /jobs/{jobId}) before starting another, or spread load across multiple keys. This limit is temporary and subject to change as the API moves out of test.
Validating parameters before you send
Most fields are validated server-side (types, enums, min/max — see each endpoint's reference), and an invalid value returns 422 describing which field failed.