issues appears on invalid_request.
{
"error": {
"type": "invalid_request",
"message": "Send {\"prompt\": \"...\"} with optional images, animate (true or false), preset (docs, blog, social, carousel, ad, data_story, explainer_video) and wait in seconds (0-300).",
"issues": ["wait: Too big: expected number to be <=300"]
}
}

What to do with each response: wait for it, retry it, get a new link, or fix something before sending again.
| Status | Meaning |
|---|---|
200 | Done: the body is the finished job, or the file you asked for. |
202 | Accepted and still being made: the body is the job, with its id. Wait for it. |
400 invalid_request | A parameter is missing or out of range. message says which; issues lists each problem. |
401 unauthorized | No key, a malformed one, or a revoked one. |
401 invalid_link | A download link that has expired or was not made for this file. Download it again with your key for a new link. |
410 invalid_link | A download link made before the diagram’s latest change. Download it again with your key for a new link. |
402 no_credits | The balance cannot pay for this request. message says how many credits it needs and when plan credits return. Add credits, or turn on automatic top-up, at https://app.diagramkit.ai/settings/api. |
403 plan_required | The account’s plan does not include this download: SVG and PDF are on paid plans. Do not retry; upgrade, or download PNG or JPEG. |
404 not_found | No diagram with that id on this account, or it has no picture yet. |
409 conflict | A change is already being made to this diagram. Wait for it, then send the next. |
409 not_animated | You asked for an animation from a diagram that has none. Animate it first. |
422 too_long | A video of every page would be too long for the format even at 1.5 seconds a still page. message says how many pages fit (pages_fit) and offers an MP4 or the all-pages PDF. |
422 not_applied | An edit could not be made: no label matched before, an unknown part id, a part that cannot move, nothing changed, or the change would break the diagram (it is left as it was). message says why. |
429 rate_limited | 50 requests are already in progress on this account. Wait for some to finish. |
503 unavailable | The file could not be made right now. Retry shortly. |