Updating a design
Iterate on an existing job with edit instructions — keep format and history intact.
A job accumulates runs. The first run creates the design; later runs are updates — send edit instructions against the same job_id. The engine rehydrates the previous snapshot and applies your changes.
Start an update run
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/runs" \
-H "Authorization: Bearer $NXD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "landing-page",
"instructions": "Make the hero darker and change the CTA to Start free trial. Keep the rest of the layout.",
"content": ""
}' | jqTips:
- Prefer diff-like instructions (“tighten slide 3”, “swap logo for the dark variant”).
- Omit or lightly refresh
contentunless you are replacing copy. - Keep the same
formatunless you intentionally want a different medium. - New assets: attach via multipart
filesorfile_idsas in Files and assets. - Persist the new
run_id. Expect the same wait as a create (1–5 minutes simple, 10–20 minutes for decks and reports), or setnotify_email: true.
Compare versions
List runs:
curl -sS "$NXD_API_URL/v1/jobs/$JOB/runs" \
-H "Authorization: Bearer $NXD_API_KEY" | jqEach completed run has its own commit_hash / viewer_url. Export or publish a specific run with run_id in the body.
Cancel an in-flight run
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/runs/$RUN_ID/cancel" \
-H "Authorization: Bearer $NXD_API_KEY" | jq
# → { "status": "cancelling" }Returns 409 if the run is already terminal.