Quickstart
Ship your first successful Seedance job in three requests. This page assumes you have a NextAPI account. If not, create one.
Authentication
All requests must include a bearer token. Keys are scoped to environment (live or test) and rate-limited independently.
Authorization: Bearer nxa_live_sk_9fa0b1c8...4e2aX-NextAPI-Environment: liveCreate 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/video/generations \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 "prompt": "Drone orbiting a lighthouse at dusk",8 "duration_seconds": 6,9 "resolution": "1080p"10 }1{2 "id": "job_7Hc9Xk2Lm3NpQ4rS",3 "status": "queued",4 "estimated_credits": 1.05}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 ?offset= for pagination.
Webhook Retries
Webhooks are retried with exponential backoff up to 5 times. If your endpoint returns a non-2xx status, we retry at 1m, 5m, 30m, 2h, and 12h intervals. Each delivery includes the same X-Webhook-Signature header.
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.