Error envelope
Every Spatius API error returns the same JSON envelope, regardless of which endpoint failed:codeis a stable machine-readable string. Program againstcode, notmessage.messageis a human-readable explanation specific to this occurrence.requestIduniquely identifies the request. It is also returned in theX-Request-IDresponse header. Quote it when contacting support.
HTTP status and error code mapping
Job failure codes
When an Avatar creation job reachesfailed, the job’s error object carries one of these codes:
The
retryable flag on the error indicates whether resubmitting the same request may succeed.
For video failures, see Video job errors. A failed video job requires a new creation request to render again.
Rate limits
Avatar API limits are enforced per account. Your account may be configured below these hard caps:
Read limits apply to the
GET endpoints; creation limits apply to POST /avatars. When a limit is hit, the API returns 429 with rate_limit_exceeded (or concurrency_limit_exceeded when the concurrency cap is the binding constraint). Back off and retry — for job polling, an interval of 5–10 seconds stays comfortably within the read limits.
Video counters are independent, and the Console API does not impose a video active-job quota. See Video limits.
Pagination
All list endpoints (GET /avatars, GET /avatar-jobs, and GET /video-jobs) paginate the same way. They accept pagination.pageSize and pagination.pageToken, and return pagination.nextPageToken and pagination.totalCount.
pageSize defaults to 20 and has a maximum of 99.
To page through results, pass the previous response’s pagination.nextPageToken as pagination.pageToken. An empty nextPageToken means there are no more pages. Treat the token as opaque and pass back exactly what you received; do not construct or increment it yourself. An invalid page token is rejected with 400 and invalid_request.

