DEVELOPER REFERENCE

Seedance video API

Generate videos with Seedance, Wan and MiniMax models. The API uses the same account, history and points balance as the studio.

1. Authenticate

Sign in with Google, add funds through Stripe and create a key in API keys. Send Authorization: Bearer YOUR_API_KEY on every request, including downloads. Keep keys on your server.

Base URL: https://ai-creator.xprismai.com/api/v1

2. Discover models and pricing

curl https://ai-creator.xprismai.com/api/v1/models -H 'Authorization: Bearer YOUR_API_KEY'

Discover enabled models, durations, ratios, supported media and reference limits here. billing_unit is request or second; unit_price is measured in points. costs_by_duration, prices and prices_usd give the final cost for each duration. $1 = 10 points. Fractional points are supported: 2.25 points/second for 5 seconds costs 11.25 points ($1.125). Fetch the catalog before submitting; disabled models are rejected. Daily free quota applies only to eligible models.

For models with video_reference_multiplier = 3, supplying video references costs three times the no-video price. Image and audio references do not add this surcharge. Use costs_with_video_by_duration and unit_price_with_video to quote these requests. Billing reserves integer quota (50,000 quota per point), truncating the upstream base quota before applying duration and the video-reference multiplier. Failed tasks refund the exact reserved paid and bonus amounts once; historical charges are unchanged.

Model eligibility is configured by administrators: freeQuota enables daily free uses and giftQuota enables gift uses. Look for the eligibility badges in the model picker. One use covers one generation. Charging order: daily free, expiring gifts, permanent gifts, bonus points, then paid points. Promotional gift uses expire 30 days after payment; existing administrator gifts remain permanent.

3. Create a video

In Workbench, type @ to select an uploaded reference such as @Image1, @Video1 or @Audio1. Numbering follows the order within each images, videos or audios array. These labels remain prompt text; the API sends the media arrays separately and preserves their order.

curl https://ai-creator.xprismai.com/api/v1/videos \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"wb-seedance-2-fast","prompt":"A ceramic cup in warm morning light, slow camera push-in","seconds":5,"ratio":"16:9"}'
FieldContract
modelRequired: an enabled model ID from GET /models
promptRequired: a non-empty prompt
seconds / durationUse a duration from the selected model; omitted values use its default_duration. Unsupported values return 400.
ratio / aspect_ratioUse a ratio from the selected model. Unsupported ratios return 400.
imagesOptional array up to the model max_images limit, of PNG/JPEG/WebP image data URLs or HTTP(S) image URLs; each data URL up to 14 MiB characters, URL up to 2,000 characters.
input_referenceali-video first-frame image URL or image data URI. Do not combine with ordinary images/videos/audios or media.
mediaali-video first/last frames: [{"type":"first_frame","url":"https://..."},{"type":"last_frame","url":"https://..."}]. First frame is required, last frame optional. Cannot be mixed with ordinary references.
videos / audiosOptional HTTP(S) URL arrays. Check supports_video/supports_audio and max_videos/max_audios. Upload files to storage first; binary video/audio multipart uploads are not accepted.

HTTP 200 means the task and reserved points are durably recorded, not that the provider has finished generation. Poll the returned id for the result. Send an Idempotency-Key header (1–128 visible ASCII characters, without spaces) and reuse it with the same request after a connection failure. The same key returns the same task; changed generation parameters return 409. Without a key, each POST creates a new task. A terminal failed replay returns 502. The response includes submission_status. If it is uncertain, provider acceptance is awaiting confirmation: keep the task id and contact support; do not create another task. Reserved points remain held until reconciliation. Confirmed failures are refunded exactly once.

4. Poll and download

curl https://ai-creator.xprismai.com/api/v1/videos/TASK_ID -H 'Authorization: Bearer YOUR_API_KEY'

curl -L https://ai-creator.xprismai.com/api/v1/videos/TASK_ID/content -H 'Authorization: Bearer YOUR_API_KEY' -o video.mp4

Poll about every 10 seconds. Status transitions from queued to in_progress, then completed or failed. Download only after completed. The returned video_url also requires your bearer key. Each user can access only their own tasks. Failed generations are credited back.

Other endpoints

  • GET /videos?limit=20&status=completed — list tasks (up to 100).
  • GET /quota — balance and points usage. points, bonus_points and paid_points use points, not dollars.

OpenAI-style compatibility

POST /api/openai/v1/videos accepts JSON or multipart/form-data. Use an enabled model ID, a supported seconds value, and size such as 1280x720 or 720x1280. An image file can be supplied as input_reference. GET /api/openai/v1/videos/TASK_ID and /content retrieve the task and result. This is a video compatibility endpoint; chat completions are not supported.

Errors

400: invalid input; 401: missing or invalid key; 404: task not found or not owned by you; 429 with quota_exceeded: insufficient points; 502: upstream generation failure. Native errors use an error object with code and message. Compatibility errors follow the OpenAI-style error shape. Treat messages as explanatory text and branch on codes.