Quickstart
Ship your first successful Seedance job in three requests. This page assumes you have a NextAPI account. If not, create one.
Use your key in ComfyUI-style tools
Prefer ComfyUI, n8n, Make, Dify, or a local canvas? Follow the bilingual setup guide for exact fields, HTTP flow, polling, and safety checks.
Authentication
All requests must include a bearer token. Keys are scoped to environment (live or test) and rate-limited independently.
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxCreate a job
Submits a Seedance generation. Returns a job_id and reserves credits against your balance. Credits are reconciled to the final amount on job.succeeded or fully refunded on job.failed.
1curl https://api.nextapi.top/v1/videos \2 -H "Authorization: Bearer $NEXTAPI_KEY" \3 -H "Idempotency-Key: 9c4fa1b2" \4 -H "Content-Type: application/json" \5 -d {6 "model": "seedance-2.0-pro",7 "input": {8 "prompt": "Drone orbiting a lighthouse at dusk",9 "duration_seconds": 6,10 "resolution": "1080p"11 }12 }1{2 "id": "vid_7Hc9Xk2Lm3NpQ4rS",3 "object": "video",4 "model": "seedance-2.0-pro",5 "status": "queued",6 "estimated_cost_cents": 100,7 "created_at": "2026-04-24T12:00:00.000Z"8}Webhook events
Every job transition emits exactly one webhook. Events are ordered and at-least-once. Use the event.id for deduplication.
| Event | Status | Emitted when |
|---|---|---|
| job.queued | Queued | Upstream has acknowledged the job. |
| job.running | Running | Seedance began processing. |
| job.succeeded | Succeeded | Output URL is ready. Credits finalized. |
| job.failed | Failed | Job terminated. Credits refunded in full. |
Signature verification
Every webhook includes an X-NextAPI-Signature header. Verify the HMAC-SHA256 before trusting the payload.
1import crypto from "node:crypto"23export function verify(rawBody, header, secret) {4 const [tPart, vPart] = header.split(",")5 const t = tPart.split("=")[1]6 const v = vPart.split("=")[1]78 const expected = crypto9 .createHmac("sha256", secret)10 .update(`${t}.${rawBody}`)11 .digest("hex")1213 const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 30014 return fresh && crypto.timingSafeEqual(15 Buffer.from(expected),16 Buffer.from(v),17 )18}Idempotency
Include an Idempotency-Key header on POST requests to safely retry without creating duplicate jobs. Keys are scoped per API key and expire after 24 hours.
Retrieve a Video
Fetch the current state of a generation job by its ID. Returns the video URL once generation completes, or the current status and progress otherwise.
List Videos
Returns a paginated list of generation jobs for the authenticated organization. Use ?limit= and ?cursor= (or offset, if your client uses it) for pagination.
Webhook Retries
Webhooks are retried with exponential backoff up to 6 times. If your endpoint returns a non-2xx status or times out, we retry at 30s, 2m, 10m, 1h, 6h, 24h intervals. Each delivery includes the same X-NextAPI-Signature, X-NextAPI-Timestamp, and X-NextAPI-Event headers.
Rate Limits
API requests are rate-limited per key. Limits are returned in response headers: X-RateLimit-Remaining and X-RateLimit-Reset. Default: 600 requests/minute for business keys, 300/min for admin keys. Enterprise customers can negotiate higher limits.
Error Codes
All errors follow a consistent JSON format with error.code and error.message. Common codes: invalid_request, unauthorized, rate_limit_exceeded, insufficient_credits, internal_error.
Changelog
Initial release — Seedance 2.0 Pro support, webhook events, idempotency keys, spend controls, and configurable moderation profiles.