Omni job status names: pending vs queued, cancelled vs canceled
Sume's /v1/videos poll uses pending, in_progress, completed, failed and cancelled; /v1/jobs uses queued, processing and canceled. Mapping table for Omni code.

The same Gemini Omni Flash job shows two status vocabularies on Sume. GET /v1/videos/{id} returns pending, in_progress, completed, failed and cancelled. The job API returns queued, processing, completed, failed and canceled, one l in the last. Code that compares strings against the wrong set will poll forever.
Mapping
| Meaning | /v1/videos | /v1/jobs | Webhook event |
|---|---|---|---|
| Waiting | pending | queued | - |
| Running | in_progress | processing | - |
| Done | completed | completed | job.completed |
| Failed | failed | failed | job.failed |
| Stopped | cancelled | canceled | job.canceled |
A normalizer
Fold both vocabularies into three states before your loop sees them.
const TERMINAL = { completed: "done", failed: "error", cancelled: "error", canceled: "error" };
const WAITING = new Set(["pending", "queued", "in_progress", "processing"]);
export function state(status) {
if (status in TERMINAL) return TERMINAL[status];
if (WAITING.has(status)) return "wait";
throw new Error("unknown status " + status);
}Why it matters on Omni
A job stuck in a wait state is not free: a 10 second 1080p Omni clip holds $1.875 until it ends. Treat an unknown status as an error, not as "keep waiting".
Webhooks send terminal events only (completed, failed, canceled), with no progress deliveries, so keep a poll as backup for a missed delivery.
Poll on booleans when you can
On the job endpoints, GET /v1/jobs/{id}/status also carries terminal and result_ready booleans. Polling on those avoids string comparison entirely: stop when terminal is true, and fetch /v1/jobs/{id}/result when result_ready is true. When next_poll_after_seconds is present, obey it; otherwise back off between polls.
Sources
Related posts
More in Developers
- Replace videos.create_and_poll with a requests helper on Sume
The OpenAI Python SDK's create_and_poll and download_content have no Sume twin. Here is a 25-line requests helper with the same call shape and a safe retry key.
- OpenRouter video client on Sume: swap the base URL, change webhooks
A client written for OpenRouter /videos works on Sume after you change the base URL, key and model ids. The webhook body and signature are different.
- PHP: submit a 30-second Wan 3.0 clip, poll it, save the MP4
Plain PHP 8 with curl and no SDK: send a 30-second wan-3.0 request, poll the job, and write the MP4 to disk. The 720p run is reserved at $3.75.
- Pointing the OpenAI SDK at api.sume.com: why Sora calls still fail
Changing only the base URL does not carry a Sora call to Sume. Five documented differences: model ids, body format, seconds and size, status words, download.
Written by Sume