Skip to content
nexdoc.design Docs

API reference

Conventions for the NexDoc Design REST API — base URL, auth, status codes, and run lifecycle.

Base URL: https://api.nexdoc.design
Version prefix: /v1

Agents calling this API should follow the REST skill (endpoint catalog).

Authentication

code
Authorization: Bearer nxd_live_...

Keys are created at app.nexdoc.design/keys. See Authentication.

Content types

UseHeader / encoding
JSON bodiesContent-Type: application/json
One-shot runs with filesmultipart/form-data
Presigned file PUTContent-Type matching the declared upload type

Allowed uploads: image/png, image/jpeg, image/gif, application/pdf only.

Common status codes

CodeMeaning
200 / 201Success (201 on job create)
202Run accepted (queued)
400Validation / unsupported upload type
401Missing or invalid bearer
402Insufficient balance / past due
403Missing scope
404Job, run, or file not found
409Conflict (e.g. cancel terminal run)
503Queue unavailable — retry once after 10 seconds

Error body:

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

Run statuses

StatusTerminal?
queuedNo
preparingNo
runningNo
validatingNo
uploading_outputsNo
completedYes
failedYes
cancellingNo
cancelledYes

Persist job_id and run_id from the 202 create-run response, then poll GET /v1/jobs/{job_id}/runs/{run_id} until a terminal status — or set notify_email: true / POST …/notify-email if you cannot wait. Simple layouts typically finish in 1–5 minutes; decks, reports, and image-heavy work commonly take 10–20 minutes. webhook_url is accepted but delivery is not guaranteed.

Failed runs are not charged. Show error and log_tail, then retry once.

Pages in this section