Skip to main content
AiuniVidAPI Docs

Open 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. 1. Set environment variables
    export AIUNIVID_BASE_URL=https://aiunivid.com/api/open
    export AIUNIVID_API_KEY=av_live_xxx
  2. 2. Quote credits (optional, no charge)
    POST the same body to /v1/videos/generations/quote and read data.credits_to_hold.
  3. 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. 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.

01

Product UI

Submits prompt, model, and media.

02

Your backend

Validates the user, stores a record, then calls AiuniVid.

03

AiuniVid API

Returns 202 and a task ID.

04

Result page

Reads your task status and plays the video.

Boundary: Do not call the Open API from the browser. Never expose the API key, webhook secret, or billing decisions to the client.

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/mcp

Add 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/mcp

ChatGPT

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/mcp

Claude 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/mcp

Codex

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 aiunivid

Cursor

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/mcp

OpenCode

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/mcp

Without 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

ToolWhat it does
list_modelsModels available to your key, with allowed durations, resolutions and aspect ratios.
get_credit_balanceAvailable and frozen credits.
quote_videoExact credit cost for given settings, without creating a task or charging.
create_videoStart a paid video generation and return the task.
get_videoStatus, progress, download URL and error of a task.
list_videosRecent tasks, optionally filtered by status.
render_finalRender a succeeded Seedance 2.5 draft as a 1080p final.
list_charactersYour characters and verified portraits as asset:// references.
generate_imageCreate an image with Seedream 5.0, for example a character to use in a video.
Billing: create_video, render_final and generate_image spend credits. The server tells the assistant to quote first and ask you to confirm the cost before it creates anything. Failed generations release their credits, exactly as in the Open API.

Authentication and scopes

Authorizationstring · headerrequired
Every endpoint requires Authorization: Bearer $AIUNIVID_API_KEY.
Idempotency-Keystring · headerrequired
Required on create. UUID recommended. Same key and body replay within 24h returns the first result; same key with a different body returns 409 idempotency_conflict.
ScopeGrants
video:createCreate and quote generation tasks.
video:readRead tasks, models, and credit balance.
files:writeRequest presigned upload URLs for reference media.

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.

ClassEndpointsLimit
Create endpointsPOST /v1/videos/generations, /quote, /{id}/final10 requests / minute / key
Read endpointsGET /v1/models, /v1/credits/balance, /v1/videos/generations, /v1/videos/generations/{id}60 requests / minute / key
UploadPOST /v1/uploads/presign10 requests / minute / key

Models and capabilities

GET /v1/modelsendpoint
Returns public models available to the current key, including allowed duration, quality, aspect_ratio, and capability flags. Fast and Mini do not support 1080p.

Wan 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
Use the same body as create to estimate credits. This does not create a task or reserve credits; it returns data.credits_to_hold. Quote and create share one billing formula. The response below is for the default request in the example panel (Seedance 2.5 text-to-video, 5 seconds, 720p).
{
  "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/generationsendpoint
Creates an asynchronous video task and returns 202 with the task object. The example panel (on the right on wide screens, at the bottom on narrow ones) switches model and code language.
modelenum<string>required
Use these public model IDs; do not send upstream aliases.
Model IDModeTier
byteplus-seedance-2.5-text-to-videotext-to-videostandard
byteplus-seedance-2.5-image-to-videoimage-to-videostandard
byteplus-seedance-2.5-reference-to-videoreference-to-videostandard
byteplus-seedance-2.0-text-to-videotext-to-videostandard
byteplus-seedance-2.0-image-to-videoimage-to-videostandard
byteplus-seedance-2.0-reference-to-videoreference-to-videostandard
byteplus-seedance-2.0-fast-text-to-videotext-to-videofast
byteplus-seedance-2.0-fast-image-to-videoimage-to-videofast
byteplus-seedance-2.0-fast-reference-to-videoreference-to-videofast
byteplus-seedance-2.0-mini-text-to-videotext-to-videomini
byteplus-seedance-2.0-mini-image-to-videoimage-to-videomini
byteplus-seedance-2.0-mini-reference-to-videoreference-to-videomini
aliyun-wan3.0-text-to-videotext-to-videostandard
aliyun-wan3.0-image-to-videoimage-to-videostandard
aliyun-wan3.0-prime-text-to-videotext-to-videofast
aliyun-wan3.0-prime-image-to-videoimage-to-videofast
doubao-seedance-2.0-text-to-videotext-to-videostandard
doubao-seedance-2.5-text-to-videotext-to-videostandard
promptstringrequired
1–10,000 characters. In reference mode, use @image1, @video1, and @audio1 to address array items by position.
image_urlsstring<uri>[]
Public HTTPS URLs. Text mode rejects images; image mode requires 1–2 (one first frame, two first-and-last); reference mode allows up to 9 images on Seedance 2.0 and 30 on Seedance 2.5. Each image: a common format such as jpeg, png, or webp; under 30 MB; width and height 300–6000 px; aspect ratio 0.4–2.5. Recognizable real faces are rejected; see Real faces and characters. Reference mode also accepts asset:// references from GET /v1/characters.
video_urls / audio_urlsstring<uri>[]
Reference mode only. Seedance 2.0 accepts up to 3 video and 3 audio URLs; audio cannot be the only reference input. Seedance 2.5 accepts up to 10 each and allows audio-only. Use GET /v1/models capabilities for the selected model. Video: mp4 or mov (H.264 or H.265), each up to 200 MB at 24–60 fps; Seedance 2.0 clips are 2–15 seconds each and 15 seconds in total, Seedance 2.5 clips are 2–30 seconds each and 30 seconds in total; violations return 422. Audio: wav or mp3, each up to 15 MB, with the same duration rules as video; an out-of-range audio clip fails after submission and its credits are refunded.
durationinteger
Seedance 2.5: 4–30 seconds. Seedance 2.0 series: 4–15 seconds. When omitted, the model's shortest duration is used (4 seconds for byteplus-seedance-*), for both the quote and the charge. Use GET /v1/models for the selected model's allowed values.
qualityenum<string>
480p, 720p, 1080p, or 4k; default 720p; case-insensitive (GET /v1/models returns uppercase such as 720P). Seedance 2.5 tops out at 1080p; Seedance 2.0 supports up to 4k; Fast and Mini top out at 720p and reject higher values with 422 unsupported_capability. Note: Seedance 2.5 1080p and Seedance 2.0 4k output is 10-bit H.265 (HEVC), which some browsers and systems cannot play directly, so check or transcode before embedding it in a web page. 4k is processed one task at a time upstream and can queue for a while when busy.
aspect_ratioenum<string>
One of 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or adaptive. When omitted, Seedance 2.5 uses adaptive and the 2.0 series uses 16:9. Seedance 2.5 image-to-video (first frame or first-and-last frames) and tasks with reference videos always render as adaptive, following the first frame or the reference video; a value you pass is ignored.
generate_audioboolean
Defaults to true; videos with and without audio cost the same. doubao-seedance-* always includes audio and does not accept this field.
draftboolean
Draft mode, Seedance 2.5 only. Renders at 480p and is billed as a normal 480p video; omit quality or pass 480p, anything else returns 422. When you like the draft, render the same shot in 1080p with /{id}/final.
callback_urlstring<uri>
Optional public HTTPS URL. A terminal task object is posted to it; verify the signature.
metadataobject
Optional string values only, 500 characters each. Echoed on the task object.

Task management

GET /v1/videos/generations/{id}endpoint
Poll until status is succeeded, failed, or cancelled. Submitted tasks cannot be cancelled through the API; a failed task is refunded automatically. On success, use result.download_url — a platform URL, not an upstream temporary link. result.thumbnail_url is currently always null; use result.last_frame_url as a cover. States: queued → processing → succeeded | failed; a task cancelled by the platform is cancelled (the API cannot cancel tasks). When upstream is busy a task can stay queued for a while; a task not completed within 48 hours of submission expires, is treated as failed, and its credits are refunded.
GET /v1/videos/generationsendpoint
Lists tasks newest first. Query params: limit (1–100, default 20), cursor, and status. data.next_cursor is null on the last page.
{
  "success": true,
  "request_id": "req_xxx",
  "data": {
    "tasks": [{ "id": "vid_01JQ9X2B6XK9K4VQY2QZ4H6W3R", "status": "succeeded" }],
    "next_cursor": null
  }
}
POST /v1/videos/generations/{id}/cancelendpoint
Cancellation is not supported. Submitted tasks run until they succeed or fail; failed tasks refund reserved credits. This endpoint returns 403 task_cancel_not_allowed.
POST /v1/videos/generations/{id}/finalendpoint
Renders a succeeded draft (draft: true) as a 1080p final; requires Idempotency-Key. The final reuses the draft's prompt, reference media, duration, aspect ratio, seed, and audio setting, so the body accepts only optional callback_url and metadata. It is billed as a normal 1080p video and the new task carries draft_id. Returns 410 draft_expired 7 days after the draft was created, 409 draft_not_ready if the draft has not succeeded, and 409 final_exists with details.task_id if a final is already running or done. A failed final can be retried. For when drafts pay off and what they cost, see the Seedance 2.5 draft mode guide.

Real 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:

  1. 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.
  2. 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.
  3. 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 IDSizePer image (credits)
byteplus-seedream-5.0-pro1K8
byteplus-seedream-5.0-pro2K15
byteplus-seedream-5.0-lite2K6
byteplus-seedream-5.0-lite3K6
byteplus-seedream-5.0-lite4K6

Upload reference media

POST /v1/uploads/presignendpoint
Send filename, content_type, and optional purpose. PUT bytes to data.upload_url with the returned headers, then pass data.public_url in image_urls, video_urls, or audio_urls. Requires files:write.
{
  "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/balanceendpoint
Returns available_credits and frozen_credits. Quote first, then decide whether the user can submit.

Pricing 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 IDListDiscountPrice
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-video24420% off195
doubao-seedance-2.5-text-to-video37320% off298

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.

StageBehavior
quoteNo charge; returns credits_to_hold
createReserves credits_reserved
succeededSettles credits_settled
failed / cancelledReleases 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-Eventheader
video.completed · video.failed · video.cancelled
X-AiuniVid-Signatureheader
Format t=<unix seconds>,v1=<hex>. signed_payload = "{t}." + raw_body; v1 is hex(HMAC-SHA256(secret, signed_payload)). Reject timestamps older than 5 minutes. Read the raw body before JSON.parse.

Node

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.

error.codeMeaning
400invalid_requestMalformed request body or fields
400unsupported_modelModel ID is not one of the public IDs
400idempotency_key_requiredIdempotency-Key header is missing
400invalid_idempotency_keyIdempotency-Key header is malformed
401invalid_api_keyKey is invalid, expired, or revoked
402insufficient_creditsNot enough available credits
403insufficient_scopeKey lacks the required scope
403task_cancel_not_allowedTask cancellation is not supported
404not_foundUnknown endpoint path
404task_not_foundTask does not exist or is not owned by this key
409idempotency_conflictSame Idempotency-Key reused with a different body
409idempotency_in_progressA request with this Idempotency-Key is still processing
409draft_not_readyThe draft has not succeeded yet
409final_existsA final for this draft is already running or done
410draft_expiredThe draft is too old to render a final
422unsupported_capabilityFields exceed the model's capability
422unsafe_inputMedia or callback URL is not a public HTTPS address
422real_person_detectedAn input contains a recognizable real face; use asset:// characters or images from /v1/images/generations. Not charged, retrying fails again
422prompt_rejectedModeration rejected the prompt; rewrite it
422content_rejectedModeration rejected the input media or prompt; change the input
422invalid_inputAn input does not meet the model requirements (for example image aspect ratio)
422asset_not_foundAn asset:// reference is unknown or not ready
429rate_limit_exceededRate limit exceeded
429too_many_concurrent_jobsIn-flight generation jobs exceeded the account limit
500internal_errorRetry with the same Idempotency-Key
502internal_errorUpstream outage or timeout (input rejections return 422); nothing is charged, resubmit with a new Idempotency-Key
503idempotency_unavailableIdempotency-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.

  1. 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.
  2. 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.
  3. 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.
  4. 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/tasksendpoint
model uses tiers byteplus-seedance-2.5 / byteplus-seedance-2.0 / byteplus-seedance-2.0-fast / byteplus-seedance-2.0-mini (the unprefixed forms are still accepted). content is an array of text / image_url / video_url / audio_url items. Billing matches the primary path. Idempotency-Key is still required.

Machine-readable contract: openapi.yaml · api-reference.md · llms.txt

Written byJarvisFounderLast updated