Authorizationstring · headerrequiredOpen API v1 · Seedance 2.5 / 2.0
Put video generation behind your product
AiuniVid Open API is an asynchronous generation gateway. Create returns a task ID immediately. The website and API share the same credit ledger. One AiuniVid API key is all you need: no complex cloud provider account, top-up or manual model activation. It exposes Seedance 2.5 and Seedance 2.0 across text, image, and reference modes; 2.0 also has Fast and Mini tiers — twelve byteplus-seedance-* model IDs, plus 2 text-to-video doubao-seedance-* models (see Pricing).
- Text-to-Video: Generate from a text description.
- Image-to-Video: Use 1–2 images as first or first-and-last frames.
- Reference-to-Video: Use images, video, and audio as multimodal references.
Quickstart
Any signed-in user can create an av_live_ key in the dashboard under API › API keys. The secret is shown once — store it on your server.
- 1. Set environment variables
export AIUNIVID_BASE_URL=https://aiunivid.com/api/open export AIUNIVID_API_KEY=av_live_xxx - 2. Quote credits (optional, no charge)
POST the same body to /v1/videos/generations/quote and read data.credits_to_hold. - 3. Create the task
POST /v1/videos/generations with a required Idempotency-Key. Success is 202 plus a task id. Replaying the same key and body does not charge twice. - 4. Poll or receive a webhook
GET /v1/videos/generations/{id} until status is succeeded, failed, or cancelled — or pass callback_url on create. On success, use result.download_url.
Integrate into your video product
Keep AiuniVid behind your backend. Users talk only to your product; your service owns the API key and task sync.
Product UI
Submits prompt, model, and media.
Your backend
Validates the user, stores a record, then calls AiuniVid.
AiuniVid API
Returns 202 and a task ID.
Result page
Reads your task status and plays the video.
MCP server for AI assistants
Connect Claude, ChatGPT, Cursor, VS Code or other MCP clients to AiuniVid over the Model Context Protocol. The assistant can list models, quote, create and check videos, and generate character images for you, using your credits with the same prices, limits and request logs as the Open API.
Server URL
https://aiunivid.com/api/mcpAdd the server URL to your client. The client opens a browser window: sign in to AiuniVid and click Allow. No API key to copy. Each authorization becomes a connection that you can revoke under API › MCP connections.
Connect your client
Claude
In Claude, open Settings › Connectors › Add custom connector, paste the URL below, then click Connect. Sign in to AiuniVid and click Allow.
https://aiunivid.com/api/mcpChatGPT
In ChatGPT, turn on Developer mode under Settings › Apps & Connectors › Advanced, create a connector with the URL below and OAuth authentication, then sign in to AiuniVid and click Allow.
https://aiunivid.com/api/mcpClaude Code
Run this command, then type /mcp in Claude Code and choose Authenticate. A browser window opens for sign-in.
claude mcp add --transport http --scope user aiunivid https://aiunivid.com/api/mcpCodex
Add the server, then sign in. Codex opens a browser window; sign in to AiuniVid and click Allow, then restart the Codex session.
codex mcp add aiunivid --url https://aiunivid.com/api/mcp
codex mcp login aiunividCursor
Add this to your MCP settings, then click Needs login next to aiunivid in Cursor Settings › MCP.
{
"mcpServers": {
"aiunivid": { "url": "https://aiunivid.com/api/mcp" }
}
}Gemini CLI
Add the server, restart Gemini CLI and type /mcp auth aiunivid. A browser window opens for sign-in.
gemini mcp add --transport http --scope user aiunivid https://aiunivid.com/api/mcpOpenCode
Add this to ~/.config/opencode/opencode.json, then run opencode mcp auth aiunivid and sign in when the browser opens.
{
"mcp": {
"aiunivid": { "type": "remote", "url": "https://aiunivid.com/api/mcp", "enabled": true }
}
}VS Code · Copilot
Add this file to your workspace, then start the server from the MCP view. VS Code asks you to sign in.
{
"servers": {
"aiunivid": { "type": "http", "url": "https://aiunivid.com/api/mcp" }
}
}Other agents
Any MCP client that supports remote servers with OAuth: add the URL below and sign in when prompted.
https://aiunivid.com/api/mcpWithout a browser: use an API key
For scripts and servers that cannot open a sign-in page, send an Open API key with the video:create and video:read scopes in the Authorization header instead.
claude mcp add --transport http aiunivid https://aiunivid.com/api/mcp \
--header "Authorization: Bearer $AIUNIVID_API_KEY"Why use a hosted server, what each clip costs, and how it compares with running your own: Seedance MCP server guide
Tools
| Tool | What it does | Open API endpoint |
|---|---|---|
| list_models | Models available to your key, with allowed durations, resolutions and aspect ratios. | GET /v1/models |
| get_credit_balance | Available and frozen credits. | GET /v1/credits/balance |
| quote_video | Exact credit cost for given settings, without creating a task or charging. | POST /v1/videos/generations/quote |
| create_video | Start a paid video generation and return the task. | POST /v1/videos/generations |
| get_video | Status, progress, download URL and error of a task. | GET /v1/videos/generations/{id} |
| list_videos | Recent tasks, optionally filtered by status. | GET /v1/videos/generations |
| render_final | Render a succeeded Seedance 2.5 draft as a 1080p final. | POST /v1/videos/generations/{id}/final |
| list_characters | Your characters and verified portraits as asset:// references. | GET /v1/characters |
| generate_image | Create an image with Seedream 5.0, for example a character to use in a video. | POST /v1/images/generations |
Rate limits
Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix seconds). Exceeding the limit returns 429 rate_limit_exceeded. Limits apply per key and per class: all read endpoints share one budget, so when tracking many tasks use the list endpoint or webhooks instead of polling each task rapidly.
| Class | Endpoints | Limit |
|---|---|---|
| Create endpoints | POST /v1/videos/generations, /quote, /{id}/final | 10 requests / minute / key |
| Read endpoints | GET /v1/models, /v1/credits/balance, /v1/videos/generations, /v1/videos/generations/{id} | 60 requests / minute / key |
| Upload | POST /v1/uploads/presign | 10 requests / minute / key |
Models and capabilities
GET /v1/modelsendpointWan 3.0 Standard and Prime have separate prices. Supports text or 1–2 first/last-frame images, 2–30 seconds, 480P/720P/1080P, and optional audio at the same price. Prompts are limited to 5,000 characters. Video/audio references, character assets and draft mode are not offered. See the API reference for image requirements.
{
"success": true,
"request_id": "req_xxx",
"data": {
"models": [
{
"id": "byteplus-seedance-2.0-text-to-video",
"name": "BytePlus Seedance 2.0 Text-to-Video",
"mode": "text-to-video",
"tier": "standard",
"durations": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
"aspect_ratios": ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"],
"qualities": ["480P", "720P", "1080P", "4K"],
"capabilities": {
"text_to_video": true,
"image_to_video": false,
"reference_to_video": false,
"generate_audio": true,
"max_images": 0,
"max_videos": 0,
"max_audios": 0,
"audio_only": false,
"draft_mode": false
}
}
]
}
}Quote a generation
POST /v1/videos/generations/quoteendpoint{
"success": true,
"request_id": "req_01JQ9X2B6XK9K4VQY2QZ4H6W3R",
"data": {
"model": "byteplus-seedance-2.5-text-to-video",
"credits_to_hold": 187,
"currency_note": "credits"
}
}Create a generation
POST /v1/videos/generationsendpointmodelenum<string>required| Model ID | Mode | Tier |
|---|---|---|
| byteplus-seedance-2.5-text-to-video | text-to-video | standard |
| byteplus-seedance-2.5-image-to-video | image-to-video | standard |
| byteplus-seedance-2.5-reference-to-video | reference-to-video | standard |
| byteplus-seedance-2.0-text-to-video | text-to-video | standard |
| byteplus-seedance-2.0-image-to-video | image-to-video | standard |
| byteplus-seedance-2.0-reference-to-video | reference-to-video | standard |
| byteplus-seedance-2.0-fast-text-to-video | text-to-video | fast |
| byteplus-seedance-2.0-fast-image-to-video | image-to-video | fast |
| byteplus-seedance-2.0-fast-reference-to-video | reference-to-video | fast |
| byteplus-seedance-2.0-mini-text-to-video | text-to-video | mini |
| byteplus-seedance-2.0-mini-image-to-video | image-to-video | mini |
| byteplus-seedance-2.0-mini-reference-to-video | reference-to-video | mini |
| aliyun-wan3.0-text-to-video | text-to-video | standard |
| aliyun-wan3.0-image-to-video | image-to-video | standard |
| aliyun-wan3.0-prime-text-to-video | text-to-video | fast |
| aliyun-wan3.0-prime-image-to-video | image-to-video | fast |
| doubao-seedance-2.0-text-to-video | text-to-video | standard |
| doubao-seedance-2.5-text-to-video | text-to-video | standard |
promptstringrequiredimage_urlsstring<uri>[]video_urls / audio_urlsstring<uri>[]durationintegerqualityenum<string>aspect_ratioenum<string>generate_audiobooleandraftbooleancallback_urlstring<uri>metadataobjectTask management
GET /v1/videos/generations/{id}endpointGET /v1/videos/generationsendpoint{
"success": true,
"request_id": "req_xxx",
"data": {
"tasks": [{ "id": "vid_01JQ9X2B6XK9K4VQY2QZ4H6W3R", "status": "succeeded" }],
"next_cursor": null
}
}POST /v1/videos/generations/{id}/cancelendpointPOST /v1/videos/generations/{id}/finalendpointReal faces and characters
Uploaded images and videos that contain a recognizable real face are rejected by the model's moderation, and the create request returns 422 real_person_detected (nothing is charged; retrying the same input fails again). There are three compliant ways to put a realistic person in a video:
- Images generated here. An image created with POST /v1/images/generations is accepted in image_urls until its trusted_until time (24 hours), even when it shows a realistic face. After that it is treated like any other upload.
- Verified portraits. To show a specific real person, that person completes a liveness check on the website and their photos are added as a verified portrait. GET /v1/characters lists your verified portraits and the fictional characters you created there. Put the returned uri (asset://…) in image_urls of a reference-to-video model and refer to it as @image1, @image2, and so on; never write the asset ID itself in the prompt. Supported models have capabilities.asset_references set to true in GET /v1/models.
- Illustrated or stylized characters are not affected.
A task that fails during generation carries a machine-readable error.reason (for example real_person or sensitive_prompt), so you can tell whether to change the input or retry.
Generate an image
POST /v1/images/generations: Seedream 5.0 text-to-image. Synchronous, charged per image at the website price. Requires the video:create scope and an Idempotency-Key, and counts against the create rate limit. Each image has a stable url and a trusted_until Unix time.
Fields: model (byteplus-seedream-5.0-pro or byteplus-seedream-5.0-lite, required), prompt (3–2,400 characters, required), size (Pro: 1K or 2K; Lite: 2K, 3K, or 4K; defaults to the smallest), aspect_ratio (1:1, 16:9, 9:16, 4:3, or 3:4), and name (your own label, up to 80 characters). A rejected prompt returns 422 prompt_rejected and is not charged.
| Model ID | Size | Per image (credits) |
|---|---|---|
| byteplus-seedream-5.0-pro | 1K | 8 |
| byteplus-seedream-5.0-pro | 2K | 15 |
| byteplus-seedream-5.0-lite | 2K | 6 |
| byteplus-seedream-5.0-lite | 3K | 6 |
| byteplus-seedream-5.0-lite | 4K | 6 |
Upload reference media
POST /v1/uploads/presignendpoint{
"success": true,
"request_id": "req_xxx",
"data": {
"upload_url": "https://aiunivid.com/api/open/v1/uploads/put?key=api-uploads/...&sig=...",
"public_url": "https://cdn.example.com/api-uploads/user/file.png",
"expires_at": 1761314644,
"headers": { "Content-Type": "image/png" },
"method": "PUT"
}
}Credit balance
GET /v1/credits/balanceendpointPricing and discounts
Example: 720P, 10 seconds, text-to-video, in credits (1 credit = USD 0.01). The quote endpoint POST /v1/videos/generations/quote is authoritative and already includes any account-specific discount.
| Model ID | List | Discount | Price |
|---|---|---|---|
| byteplus-seedance-2.5-* | 373 | — | 373 |
| byteplus-seedance-2.0-* | 244 | — | 244 |
| byteplus-seedance-2.0-fast-* | 195 | — | 195 |
| byteplus-seedance-2.0-mini-* | 122 | — | 122 |
| doubao-seedance-2.0-text-to-video | 244 | 20% off | 195 |
| doubao-seedance-2.5-text-to-video | 373 | 20% off | 298 |
doubao-seedance-* is text-to-video only: 720p, 5 or 10 seconds, 16:9 / 9:16 / 1:1, with audio (generate_audio is not accepted). List price is the matching byteplus-seedance-* tier. Tasks on these models advance only when polled: keep polling GET /v1/videos/generations/{id} until a terminal state; a callback_url alone will not deliver results.
Billing
The website and API charge the same price from the same credit balance. 1 credit = $0.01.
| Stage | Behavior |
|---|---|
| quote | No charge; returns credits_to_hold |
| create | Reserves credits_reserved |
| succeeded | Settles credits_settled |
| failed / cancelled | Releases the hold as credits_refunded |
Webhooks
Pass callback_url on create. AiuniVid POSTs the full task object when the task reaches succeeded, failed, or cancelled.
X-AiuniVid-EventheaderX-AiuniVid-SignatureheaderNode
import { createHmac, timingSafeEqual } from "node:crypto";
export function verifyAiuniVidSignature(header, rawBody, secret) {
const parts = Object.fromEntries(
header.split(",").map((item) => item.split("="))
);
const age = Math.abs(Date.now() / 1000 - Number(parts.t));
if (age > 300) throw new Error("Signature timestamp is stale");
const expected = createHmac("sha256", secret)
.update(`${parts.t}.${rawBody}`)
.digest("hex");
if (
!timingSafeEqual(Buffer.from(parts.v1, "utf8"), Buffer.from(expected, "utf8"))
) {
throw new Error("Invalid signature");
}
}Python
import hmac, hashlib, time
def verify_aiunivid_signature(header: str, raw_body: str, secret: str) -> None:
parts = dict(item.split("=", 1) for item in header.split(","))
if abs(time.time() - int(parts["t"])) > 300:
raise ValueError("Signature timestamp is stale")
expected = hmac.new(
secret.encode(),
f'{parts["t"]}.{raw_body}'.encode(),
hashlib.sha256,
).hexdigest()
if not hmac.compare_digest(parts["v1"], expected):
raise ValueError("Invalid signature")Delivery times out after 10 seconds. Timeouts and non-2xx responses are retried automatically, starting about a minute apart and backing off to at most one hour between attempts, for up to 24 hours. Always return 2xx to acknowledge the event. An event may arrive more than once, so deduplicate by task id and event. Poll at a relaxed interval as a fallback.
Error handling
Branch on the stable error.code, not the message text. 500 is safe to retry with the same Idempotency-Key.
| HTTP | error.code | Meaning |
|---|---|---|
| 400 | 400invalid_ | Malformed request body or fields |
| 400 | 400unsupported_ | Model ID is not one of the public IDs |
| 400 | 400idempotency_ | Idempotency-Key header is missing |
| 400 | 400invalid_ | Idempotency-Key header is malformed |
| 401 | 401invalid_ | Key is invalid, expired, or revoked |
| 402 | 402insufficient_ | Not enough available credits |
| 403 | 403insufficient_ | Key lacks the required scope |
| 403 | 403task_ | Task cancellation is not supported |
| 404 | 404not_ | Unknown endpoint path |
| 404 | 404task_ | Task does not exist or is not owned by this key |
| 409 | 409idempotency_ | Same Idempotency-Key reused with a different body |
| 409 | 409idempotency_ | A request with this Idempotency-Key is still processing |
| 409 | 409draft_ | The draft has not succeeded yet |
| 409 | 409final_ | A final for this draft is already running or done |
| 410 | 410draft_ | The draft is too old to render a final |
| 422 | 422unsupported_ | Fields exceed the model's capability |
| 422 | 422unsafe_ | Media or callback URL is not a public HTTPS address |
| 422 | 422real_ | An input contains a recognizable real face; use asset:// characters or images from /v1/images/generations. Not charged, retrying fails again |
| 422 | 422prompt_ | Moderation rejected the prompt; rewrite it |
| 422 | 422content_ | Moderation rejected the input media or prompt; change the input |
| 422 | 422invalid_ | An input does not meet the model requirements (for example image aspect ratio) |
| 422 | 422asset_ | An asset:// reference is unknown or not ready |
| 429 | 429rate_ | Rate limit exceeded |
| 429 | 429too_ | In-flight generation jobs exceeded the account limit |
| 500 | 500internal_ | Retry with the same Idempotency-Key |
| 502 | 502internal_ | Upstream outage or timeout (input rejections return 422); nothing is charged, resubmit with a new Idempotency-Key |
| 503 | 503idempotency_ | Idempotency-Key could not be reserved; retry |
Producing a series
A short-form series is many small jobs that share the same characters and settings. Four habits keep it consistent and its cost predictable.
- Upload each character once. Upload the character image through /v1/uploads/presign, then pass the same public_url in image_urls on every request of the series and refer to it as @image1 in the prompt. Recognizable real faces are refused by every model, so use a generated or illustrated character.
- One request per shot. Keep each request to one story beat and assemble the shots in your own edit. Give every shot its own Idempotency-Key: replay the same key only when you never received a response, such as after a network drop. To retry a shot that failed, use a new key — replaying the same key within 24 hours returns the first result.
- Quote the batch before you submit it. Send every body to /v1/videos/generations/quote, compare the total with available_credits from /v1/credits/balance, and stop before submitting if the balance is short; quote and charge use one formula. Create endpoints allow 10 requests per minute per key, so pace a large batch instead of firing it at once.
- Collect results by webhook rather than tight polling. Pass callback_url on create; read endpoints allow 60 requests per minute per key, which a batch of polling loops reaches quickly. A failed shot releases its frozen credits automatically.
For keeping one character consistent from shot to shot, see the consistent character guide.
Advanced compatibility path
The primary path is /v1/videos/generations. If you already integrated legacy content[] payloads, /v1/contents/generations/tasks (and its quote endpoint) remains available. New integrations should not use this path.
POST /v1/contents/generations/tasksendpointMachine-readable contract: openapi.yaml · api-reference.md · llms.txt