Poll a design job
Sample request
curl -X GET "https://api.abyssale.com/design-jobs/$JOB_ID" \
-H "x-api-key: $ABYSSALE_API_KEY"Example 200 response
{
"job_id": "00000000-0000-0000-0000-000000000000",
"design_id": "00000000-0000-0000-0000-000000000000",
"operation": "add_formats",
"status": "PENDING",
"credits": {
"generation_credits": 0,
"ai_credits": 0
},
"created_at_ts": 0,
"started_at_ts": 0,
"finalized_at_ts": 0,
"details": {
"mode": "auto",
"formats": [
{
"name": "string",
"width": 0,
"height": 0,
"unit": "px",
"added": false,
"preview_url": "string"
}
],
"warnings": [
{
"code": "preview_generation_failed",
"message": "string"
}
]
},
"error": {
"code": "layout_refused",
"message": "string"
}
}Example 401 error response
{
"message": "Unauthorized: missing or invalid API key.",
"id": "unauthorized"
}The state of a job POST /designs/{designId}/formats started: PENDING → PROCESSING → COMPLETED or FAILED. Poll every 2 to 5 seconds until finalized_at_ts is set. Jobs are kept 7 days.
Behaviour, limits and caveats
A FAILED job left the design unchanged; error.code says why:
error.code | Meaning |
|---|---|
layout_refused | The design could not be laid out in these formats. |
not_enough_ai_credits | The AI credits ran out between the request and the layout. |
design_changed | The design was saved by someone else while the job ran; ask again. |
design_not_found | The design was deleted while the job waited. |
too_many_formats | Formats were added to the design while the job waited (another job, the editor): these would take it past 20. |
internal_error | Unexpected; ask again, or contact support if it persists. |
Path parameters
jobId string (uuid) required
The job_id returned by POST /designs/{designId}/formats.
Response 200
The job.
job_id string (uuid) always
Poll it with GET /design-jobs/{jobId}.
design_id string (uuid) always
operation string always
What the job does, named after its call: add_formats (POST /designs/{designId}/formats). Not a closed list.
status string always
One of "PENDING", "PROCESSING", "COMPLETED", "FAILED".
credits object always
What the job spent. A completed ai layout spent 10 AI credits; auto is free.
Show child attributes
generation_credits integer
ai_credits integer
created_at_ts integer always
started_at_ts integer | null always
finalized_at_ts integer | null always
Set once the job is COMPLETED or FAILED.
details AddFormatsDetails always
What is proper to the operation, its shape given by operation.
Show child attributes
AddFormatsDetails
details of an add_formats job.
mode string always
One of "auto", "ai".
formats array of object always
The formats asked for.
Show child attributes
name string
width number
height number
unit string
One of "px", "mm", "in".
added boolean
true once the format is in the design.
preview_url string (uri)
The added format's preview, present once the job is COMPLETED (the job waits for the previews to be rendered). The preview of the design's current version: a later save of the design replaces it.
warnings array of object
Present when the formats were added but some of their previews could not be rendered (preview_generation_failed): their preview_url may answer 403. The formats can be used for generation all the same.
Show child attributes
code string always
One of "preview_generation_failed".
message string always
error object
Present when status is FAILED.
Show child attributes
code string
One of "layout_refused", "not_enough_ai_credits", "design_changed", "design_not_found", "too_many_formats", "job_queue_unavailable", "internal_error".
message string
Errors
Every failure uses the shared error envelope — {id, message, errors?}. Branch on id, never on message. See Errors.
| Status | When |
|---|---|
401 | Unauthorized — missing or invalid API key. |
404 | No job of your workspace has this id (design_job_not_found). |
410 | The job is older than 7 days (design_job_gone). |
429 | Too Many Requests. |
500 | Internal Server Error — an unexpected error occurred on our side. |
