Sume GET /result returns 409 job_not_completed: poll status first
GET /v1/jobs/{id}/result only works after completion and answers 409 job_not_completed otherwise. Poll status until result_ready, then fetch. Curl and JS.

GET /v1/jobs/{id}/result answers 409 job_not_completed while a Sume job is queued or processing, and for failed or canceled jobs too. It never returns an empty result. Poll GET /v1/jobs/{id}/status until result_ready is true, then fetch. Read a failure from the job record, not from the result route.
Why a 409 and not an empty body
A result is defined only for completed jobs. An empty successful response would look like a finished job with no output, which is worse than a clear refusal. The 409 is retryable in the one case that matters: the job is still running, so waiting and asking again is correct. For a terminal failure it is not retryable, because no result will ever exist.
On /v1/videos
The video route has two distinct 409 codes. job_not_completed on the content route means the job is still running and is retryable. job_failed means the job reached a terminal failure and is not retryable. Branch on the code, not on the status number alone.
| Route | Code | Retry? |
|---|---|---|
| /v1/jobs/:id/result | job_not_completed | Yes if still running; read the job if failed |
| /v1/videos/:id/content | job_not_completed | Yes, keep polling |
| /v1/videos/:id/content | job_failed | No, read error on the poll response |
The sequence in curl
Submit async, store the id, poll status, fetch once.
curl -X POST https://api.sume.com/v1/image-1.0/generate \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: hero-001" \
-d '{"prompt":"matte black bottle on marble","mode":"async"}'
curl https://api.sume.com/v1/jobs/job_123/status \
-H "Authorization: Bearer $SUME_API_KEY"
# when "result_ready": true
curl https://api.sume.com/v1/jobs/job_123/result \
-H "Authorization: Bearer $SUME_API_KEY"A common mistake
Calling result right after submit and treating the 409 as an outage leads to resubmits, and each resubmit without a stored job id is a new paid job. Keep the id from the first response, poll, and fetch once. A 409 here is a prompt to wait.
Related posts
More in Developers
- Sume schedule invoke command: check the host before you paste it
The curl command on a Sume schedule's trigger card uses api.dev.sume.com when you copy it from a *.dev.sume.com dashboard. Check the host before production.
- Sume schedule run input limits: 64 properties and 2 MiB
The input object on a Sume schedule or Agent Completion run takes up to 64 properties and 2 MiB of UTF-8. Where it lands and how to keep large data out of it.
- Sume SDK error classes: HTTP status, class and action in TypeScript
Map 401, 402, 403, 404, 409, 429 and 5xx to the SumeApiError subclass and the right action, and read code, requestId, retryable and retryAfterSeconds.
- Sume SDK retries: which requests it repeats and how long it waits
createSumeClient retries 408, 429 and 5xx up to maxRetries (default 2), honours retry-after up to 60 seconds, and replays a POST only with an Idempotency-Key.
Written by Sume