Genace

how to use Seedance API: submit, poll, and handle the failure case

·

Submit

curl -X POST https://genace.ai/api/v1/video/generations \
  -H "Authorization: Bearer $GENACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"seedance-2.0-fast","prompt":"..."}'

The model id is exactly seedance-2.0-fast — a typo here returns 400 UNKNOWN_MODEL naming what you sent.

You get 202 Accepted with a job, not a video:

{
  "job_id": "abc123",
  "state": "queued",
  "model": "seedance-2.0-fast",
  "credits_held": 25
}

credits_held is what this call reserved. It comes back in full if the job fails or you cancel it.

Collect the result

curl "https://genace.ai/api/v1/jobs/abc123?wait=30" \
  -H "Authorization: Bearer $GENACE_API_KEY"

wait holds a status request for the requested bounded interval. Poll the known job ID or read the authenticated SSE stream, then reconnect if needed. The scheduled backstop is internal, not a customer delivery channel. There is no customer callback URL field on the generation request. See webhook vs polling.

The failure that will not throw

A failed job is a successful HTTP response describing a failure:

{ "state": "failed", "error": { "code": "UPSTREAM_EMPTY_RESULT" } }

raise_for_status() and equivalents see a 200 and move on. Check state, not the status code.

Parameters worth setting

duration_sec accepts 3–15. Setting resolution to 720p halves the cost while you iterate.

Full reference in Seedance 2.0 Fast API parameters.

Continue with models and parameters

Models covered on this page

Where these facts come from

  • codebase: src/ai/api/wrap.ts
  • codebase: src/ai/providers/seedance.ts — pricing() and paramsSchema
  • codebase: src/app/api/v1/video/generations/route.ts — request and response shape