Skip to content
nexdoc.design Docs

Errors

HTTP error shapes, 402 billing failures, and how to debug a failed NexDoc Design generation run.

code
{ "detail": "human-readable message" }

Sometimes detail is a structured object for validation errors.

Status codes

CodeMeaningAction
400Validation / unsupported upload typeRead detail. Usually a bad field or a file that is not png/jpg/gif/pdf.
401Missing or invalid NXD_API_KEYCreate a key at app.nexdoc.design/keys.
402Wallet empty or past dueGET /v1/credits, then add funds at app.nexdoc.design (minimum $10). No retry loops.
404Unknown job_id / run_id / file_id, or it belongs to another organizationCheck the IDs you persisted.
409Cancel on a finished runFetch the run; do not retry cancel.
503Queue / upstream unavailableRetry once after 10 seconds.

Typical 402 bodies:

code
{ "detail": "insufficient credits" }
code
{ "detail": "account past due — add credits to continue" }

Failed runs

When status is failed, inspect:

code
curl -sS "$NXD_API_URL/v1/jobs/$JOB/runs/$RUN" \
  -H "Authorization: Bearer $NXD_API_KEY" | jq '{error, log_tail}'
FieldUse
errorShort failure reason
log_tailTail of agent output for debugging

Failed runs are not charged. Fix the inputs (instructions, content, format, assets) and retry once.