Jobs
Query, stream, and cancel generation jobs
Every generation request (video / images) returns a
job_id. Use the endpoints below to retrieve the result.
GET /v1/jobs/:id
Single query, or long-poll until the job reaches a terminal state
(succeeded / failed / canceled).
GET /api/v1/jobs/:id?wait=60
Authorization: Bearer sk_xxxQuery parameters
| Param | Type | Default | Description |
|---|---|---|---|
wait | number (0-60) | 0 | Seconds to long-poll. 0 returns the current state immediately; 1..60 polls the upstream every 2s until a terminal state or timeout. |
Response 200
{
"id": "abc123",
"state": "succeeded",
"progress": 100,
"model": "seedance-2.0-fast",
"modality": "video",
"outputs": [
{ "url": "https://...", "type": "video", "meta": {} }
],
"error": null,
"created_at": "2026-05-29T10:00:00Z",
"started_at": "2026-05-29T10:00:02Z",
"finished_at": "2026-05-29T10:00:18Z",
"credits_held": 25,
"credits_actual": 25
}state is one of queued / running / succeeded / failed / canceled.
outputs and error are null until the job reaches a terminal state.
Errors
| Status | type | Description |
|---|---|---|
| 404 | not_found | Job does not exist |
| 403 | forbidden | Job belongs to another user |
GET /v1/jobs/:id/stream
SSE progress stream — used by the Playground and SDK clients to render a progress bar without polling.
GET /api/v1/jobs/:id/stream
Authorization: Bearer sk_xxxEvents
| Event | When | Payload |
|---|---|---|
progress | Every ~2s while non-terminal | { state, progress, outputs: null, error: null } |
done | Job reaches succeeded | { state, progress, outputs, error: null } |
error | Job reaches failed / canceled | { state, progress, outputs: null, error } |
The stream closes automatically after done or error. Vercel functions
cap execution at 60s — if a video job runs longer, the client should
reconnect to resume streaming.
Example
curl -N "https://genace.ai/api/v1/jobs/abc123/stream" \
-H "authorization: Bearer sk_xxx"POST /v1/jobs/:id/cancel
Cancel a job: sets state to canceled and refunds held credits.
POST /api/v1/jobs/:id/cancel
Authorization: Bearer sk_xxxThe upstream provider is not actually notified to stop (MVP-stage tradeoff — canceling a short video job on the upstream side isn't worth the complexity, so any in-flight upstream result is simply discarded on arrival).
Response 200
{
"id": "abc123",
"state": "canceled",
"canceled_at": "2026-05-29T10:00:05Z"
}Canceling a job that is already in a terminal state is idempotent — it
returns 200 with the job's existing state unchanged.
Errors
| Status | type | Description |
|---|---|---|
| 404 | not_found | Job does not exist |
| 403 | forbidden | Job belongs to another user |
Genace Docs