LogoGenace Docs
LogoGenace Docs
Homepage

Getting Started

IntroductionQuick StartModelsClaude Code Skills

API Reference

POST /v1/video/generationsPOST /v1/images/generationsJobsGET /v1/models

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_xxx

Query parameters

ParamTypeDefaultDescription
waitnumber (0-60)0Seconds 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

StatustypeDescription
404not_foundJob does not exist
403forbiddenJob 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_xxx

Events

EventWhenPayload
progressEvery ~2s while non-terminal{ state, progress, outputs: null, error: null }
doneJob reaches succeeded{ state, progress, outputs, error: null }
errorJob 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_xxx

The 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

StatustypeDescription
404not_foundJob does not exist
403forbiddenJob belongs to another user

Table of Contents

GET /v1/jobs/:id
Query parameters
Response 200
Errors
GET /v1/jobs/:id/stream
Events
Example
POST /v1/jobs/:id/cancel
Response 200
Errors