Video Generation

Seedance Special Offer protocol: submit a generation task → poll the task status → retrieve the video result. Supports enabled Seedance models.

POST/v2/video/generations

Call the Seedance Special Offer unified video API through MaiToken. The request base URL is https://api.maitoken.net, and authentication uses your MaiToken API Key. The platform preserves the Seedance Special Offer API paths, request parameters, and response structure. The models and parameter capabilities actually available depend on the authorization granted to the current API Key and the selected model.

Authorizations

AuthorizationstringRequired

Bearer Token authentication. You can obtain a MaiToken API Key from the API Key Management Page.

Header Content-Type: Use application/json when submitting a task.
Authorization: Bearer YOUR_API_KEYContent-Type: application/json

Submit a Generation Task

POST /v2/video/generations

Video generation is an asynchronous process. A successful submission only indicates that the task has been accepted. Save the task_id from the response, then call the query endpoint to retrieve the execution status and result.

Model Selection

First, use List Models to query the models available to the current API Key. Select a model whose protocols includes lingmao, and enter its id in the request's model field.

This document uses doubao-seedance-2-0-260128 as an example. Replace it with a value returned by your model list. Model aliases in the Seedance Special Offer documentation do not indicate that the current MaiToken API Key has access to models with those names. If a model with the same name supports other video protocols, you must still confirm that lingmao has been enabled.

Request Parameters

Parameter Type Required Description
model string Yes The name of a model available to the current API Key that supports the lingmao protocol.
prompt string Yes The text prompt describing the video.
duration integer No Video duration in seconds. The allowed values and default depend on the model. For example, the Seedance Special Offer documentation specifies 4–15 seconds for Seedance 2.0, with a default of 5 seconds.
aspect_ratio string No Video aspect ratio, such as 16:9, 9:16, 1:1, or adaptive. Supported values depend on the model.
resolution string No Output resolution, such as 720p or 1080p. Wanxiang uses uppercase values such as 480P, 720P, and 1080P; Kling ignores this field.
media array No An array of image, video, and audio assets. See the description below. Omit assets for text-to-video generation.
audio boolean No Whether to generate audio. Primarily applicable to Seedance. Reference audio is provided through media and has a different purpose from this switch.
watermark boolean No Whether to add a watermark. Applicable to Seedance and Wanxiang models that support this capability; Kling ignores this field.
negative_prompt string No A negative prompt describing content that should not appear. Support depends on the model.
callback_url string No The callback URL for upstream task status updates. This parameter is passed through. It is still recommended to confirm the task result through the query endpoint.
web_search boolean No Web search. Available exclusively for Seedance.
mode string No Kling generation mode, such as std or professional. Specify a value supported by the selected model.
prompt_extend boolean No Whether to enable prompt expansion. Available exclusively for Wanxiang.
extra object No Model-specific extension parameters supported by the Seedance Special Offer adapter. This does not mean that arbitrary native provider parameters will take effect.

A unified API does not mean that every model supports the same capabilities. MaiToken passes the parameters to Seedance Special Offer, which converts them for the target model. Fields that are not mapped or supported by the model may be ignored or may cause an error.

media Asset Description

Each item requires type and url. Explicitly specifying role is recommended to distinguish reference assets from first and last frames.

Field Type Description
type string Common values include image, video, and audio. Seedance Special Offer also supports precise types such as first_frame, last_frame, reference_image, reference_video, and reference_audio. Applicability depends on the model.
url string The asset URL. The examples in this document use publicly accessible HTTP(S) URLs that the upstream service can retrieve.
role string Optional. Allowed values are first_frame, last_frame, reference_image, reference_video, and reference_audio. An explicit role takes precedence over a role specified through type.
Combination Purpose
image + reference_image References the subject, appearance, or style without fixing the image as the first frame of the video.
image + first_frame Uses the image as the opening frame.
image + last_frame Uses the image as the ending frame; must be used together with a first frame.
video + reference_video References a video. Support for editing, extension, and other capabilities depends on the model.
audio + reference_audio References audio. Support depends on the model.

Choose either first-and-last-frame mode or reference-media mode; do not mix them. Media URLs must be accessible when read. When using temporary URLs, ensure they remain valid long enough for queuing, uploading, and retries. For details about media preparation, review status, and the specific usage of asset://, see "Media Preparation and Referencing" below.

Request Examples

All examples below send requests to the MaiToken endpoint using a MaiToken API Key. Replace the URLs in the image, video, and audio examples with your publicly accessible media URLs.

curl --request POST \  --url https://api.maitoken.net/v2/video/generations \  --header 'Authorization: Bearer YOUR_API_KEY' \  --header 'Content-Type: application/json' \  --data '{    "model": "doubao-seedance-2-0-260128",    "prompt": "A cat runs across a sunlit meadow as the camera slowly follows, with natural and fluid visuals",    "duration": 5,    "resolution": "720p",    "aspect_ratio": "16:9",    "audio": true,    "watermark": false  }'
curl --request POST \  --url https://api.maitoken.net/v2/video/generations \  --header 'Authorization: Bearer YOUR_API_KEY' \  --header 'Content-Type: application/json' \  --data '{    "model": "doubao-seedance-2-0-260128",    "prompt": "Make the flowing water move gently and the leaves sway softly in the wind while preserving the original composition",    "media": [      {        "type": "image",        "url": "https://example.com/landscape.jpg",        "role": "first_frame"      }    ],    "duration": 5,    "resolution": "720p",    "aspect_ratio": "16:9"  }'
curl --request POST \  --url https://api.maitoken.net/v2/video/generations \  --header 'Authorization: Bearer YOUR_API_KEY' \  --header 'Content-Type: application/json' \  --data '{    "model": "doubao-seedance-2-0-260128",    "prompt": "Transition smoothly from the opening frame to the ending frame, with natural and continuous character movement",    "media": [      { "type": "image", "url": "https://example.com/first.jpg", "role": "first_frame" },      { "type": "image", "url": "https://example.com/last.jpg", "role": "last_frame" }    ],    "duration": 5,    "resolution": "720p",    "aspect_ratio": "16:9"  }'
curl --request POST \  --url https://api.maitoken.net/v2/video/generations \  --header 'Authorization: Bearer YOUR_API_KEY' \  --header 'Content-Type: application/json' \  --data '{    "model": "doubao-seedance-2-0-260128",    "prompt": "Generate visuals featuring the character from the reference image as the protagonist, using the camera movement from the reference video and the rhythm of the reference audio",    "media": [      { "type": "image", "url": "https://example.com/character.jpg", "role": "reference_image" },      { "type": "video", "url": "https://example.com/reference.mp4", "role": "reference_video" },      { "type": "audio", "url": "https://example.com/reference.mp3", "role": "reference_audio" }    ],    "duration": 5,    "resolution": "720p",    "aspect_ratio": "9:16"  }'

Query a Task

GET /v2/video/generations/{task_id}

Replace {task_id} with the task ID returned upon submission. It is recommended to query using the same MaiToken API Key used for submission. Tasks are isolated by user, so you cannot query another user's tasks.

By default, responses use the unified format. It is recommended to query every 5–10 seconds until data.status is SUCCESS or FAILURE. Set a reasonable polling timeout; a single failed query does not mean that video generation has failed.

Query Parameters

Parameter Type Description
response_format string Defaults to unified. volcengine returns the original upstream object saved by Seedance Special Offer and is available only for supported channels. The response will no longer include the {code, message, data} wrapper. Unsupported channels return 400, while 409 is returned if no response has been saved yet. This document uses the default unified format.
use_oss_url boolean Defaults to false, meaning result_url uses the upstream channel URL. true selects the Seedance Special Offer OSS-hosted URL. This option has no effect when using the volcengine format.

Status and Result Fields

code: "success" indicates that the query API call succeeded. Check data.status to determine whether video generation is complete. Query statuses use uppercase enum values, unlike the lowercase queued value in the submission response.

data.status Meaning Next Action
SUBMITTED Submitted and awaiting scheduling Continue polling.
QUEUED Queued Continue polling.
IN_PROGRESS Generating Continue polling.
SUCCESS Generation complete Read data.result_url and save the video.
FAILURE Generation failed Read data.fail_reason and stop polling.
Field Description
data.task_id The task ID used for queries.
data.id The internal numeric record ID used by Seedance Special Offer. It is not used for task queries.
data.upstream_task_id Optional. The actual upstream task ID. Do not use it in place of the task_id returned upon submission.
data.progress Progress as a string, such as "50%".
data.result_url The video URL returned after successful generation. Download and save it promptly.
data.fail_reason The reason the task failed. An HTTP 200 response may still indicate a generation failure.
data.total_tokens The total TOKEN consumption reported by the upstream service. This is usually 0 while generation is in progress; use the value from the final successful state.
data.duration / resolution / ratio Optional. The actual video duration, resolution, and aspect ratio.
data.submit_time / start_time / finish_time Unix timestamps in seconds. The corresponding value may be 0 if the task has not started or finished.

The user_id, group, quota, and other fields in the response retain their original Seedance Special Offer meanings and do not represent the MaiToken user ID, account balance, or final billed amount. Actual charges are based on MaiToken usage records.

Preparing and Referencing Media

Method 1: Use a Public URL Directly

The Seedance 2 Seedance Special Offer API supports directly passing public HTTP(S) URLs for images, videos, or audio. Seedance Special Offer automatically handles media uploads, so you do not need to manually create media or media groups first. In general, you can enter the media address directly in media[].url in the video request.

Media type Common role Example URL
Image image reference_image, first_frame, last_frame https://example.com/character.jpg
Video video reference_video https://example.com/reference.mp4
Audio audio reference_audio https://example.com/reference.mp3

Media URLs should meet the following requirements:

  • The upstream service must be able to read the file directly without browser login, cookies, or additional authentication request headers. Signed object storage URLs must include a valid signature.
  • Provide the media file URL. Do not enter a cloud drive sharing page, webpage URL, local file path, file://, or browser blob: URL.
  • Long-lived URLs are recommended. Temporary URLs must remain valid through queuing, uploading, moderation, and retry periods. An expired URL may cause media processing or video generation to fail.
  • File format, size, image dimensions, video and audio duration, and media count limits depend on the selected model. The same set of limits cannot be applied across different models.

For example, a reference image can preserve the subject's appearance, a reference video can provide motion or camera movement, and reference audio can provide sound or rhythm guidance:

{  "media": [    { "type": "image", "url": "https://example.com/character.jpg", "role": "reference_image" },    { "type": "video", "url": "https://example.com/motion.mp4", "role": "reference_video" },    { "type": "audio", "url": "https://example.com/music.mp3", "role": "reference_audio" }  ]}

The snippet above shows the media portion of a video request. You must also provide parameters such as model and prompt when submitting the request. audio: true enables audio generation; it does not replace reference audio media. Whether the media combination above is allowed depends on the model's capabilities.

Method 2: Reuse Previously Created Media

Seedance Special Offer supports referencing previously created logical media with asset://<logical_id>. For example, if the media creation API returns logical_id: "la_abc123", use the following in the video request:

{  "model": "doubao-seedance-2-0-260128",  "prompt": "The character in the reference image smiles naturally and waves at the camera",  "media": [    { "type": "image", "url": "asset://la_abc123", "role": "reference_image" }  ],  "duration": 5,  "resolution": "720p",  "aspect_ratio": "16:9"}

This example requires the media to be available in the Seedance Special Offer account and channel used for the actual processing task, with a status of Active. MaiToken currently does not provide entry points for creating or querying Seedance Special Offer media or managing media groups. For regular requests, prefer public URLs. Do not assume that a media ID can be used across accounts or providers solely because you have the ID.

ID Meaning Can it be used in asset://?
logical_id, such as la_abc123 Logical media ID Yes, in the format asset://la_abc123.
logical_group_id, such as lag_xyz789 Logical media group ID, used to categorize media No. A media group is not an image, video, or audio file.
group_id in the media creation response Upstream physical media group ID No.
Volcengine native asset-... media ID An ID in Volcengine's native media system It cannot be used directly as Seedance Special Offer's logical_id.

Media Status and Media Groups

Created media must have an Active status before it can be referenced. Processing indicates that the media is being uploaded or moderated, while Failed indicates that the upload or moderation failed. Successful creation does not mean that moderation has been approved. Media status differs from video task status; whether video generation is complete is still determined by data.status: "SUCCESS".

Asset groups are used only for categorization; they are not actual images, videos, or audio files. When referencing an asset, specify its logical_id. Do not use the asset group's logical_group_id.

When calling through MaiToken, you can currently provide a public asset URL directly. You do not need to create an asset group first or create assets on another website. When asset moderation is required, the actual processing channel performs it according to the model's requirements.

Reference Assets Using Seedance-Native content

If you select the Seedance-native content input supported by the Seedance Special Offer, place image, video, and audio URLs in image_url.url, video_url.url, and audio_url.url, respectively. role and type must be at the same level:

{  "model": "doubao-seedance-2-0-260128",  "prompt": "Generate a natural and smooth video based on the character's appearance and camera movement",  "content": [    { "type": "image_url", "image_url": { "url": "https://example.com/character.jpg" }, "role": "reference_image" },    { "type": "video_url", "video_url": { "url": "https://example.com/motion.mp4" }, "role": "reference_video" },    { "type": "audio_url", "audio_url": { "url": "https://example.com/music.mp3" }, "role": "reference_audio" }  ],  "duration": 5,  "resolution": "720p",  "aspect_ratio": "16:9"}

Choose either content or media. For first-and-last-frame mode, continue to use first_frame and last_frame. For reference mode, use the corresponding reference_* roles. Do not infer an asset's purpose solely from its type.

Seedance Extended Parameters

The Seedance Special Offer supports certain native Seedance top-level parameters, including content, ratio, generate_audio, seed, camera_fixed, return_last_frame, service_tier, execution_expires_after, draft, tools, safety_identifier, priority, and frames. Whether they take effect depends on the model version and channel.

  • Choose either content or media as the input format; do not submit both. When using native content, the asset's role must be at the same level as type, not inside URL objects such as image_url.
  • If aspect_ratio is not provided, the Seedance Special Offer can use ratio. If both audio and generate_audio are provided, their values must be consistent.
  • Seedance 2.5 supports output_format: "mp4" or "mov", as well as omni_reference_task_type: "auto", "reference", "edit", or "extend". These capabilities are not available for all Seedance models.
  • When edit is explicitly specified for Seedance 2.5, it requires aspect_ratio: "adaptive", duration: -1, and a reference video between 4 and 30 seconds long. extend requires an adaptive aspect ratio. In first-and-last-frame mode, the aspect ratio follows the first frame, and the specific value must meet the requirements of the selected model.
  • Place parameters at the top-level locations specified in the documentation. v2 does not accept these parameters grouped under metadata.

Notes

  • The current MaiToken Seedance Special Offer endpoint supports task creation and lookup by ID. It does not provide Seedance Special Offer APIs for listing, canceling, deleting, or remixing tasks.
  • This document uses public asset URLs. MaiToken does not currently integrate with the Seedance Special Offer asset management API. Seedance Special Offer asset://<logical_id> references and Volcano Engine native asset IDs belong to different systems and cannot be used interchangeably.
  • The validity period of result URLs depends on the channel. This document does not guarantee a fixed retention period. After a task succeeds, transfer the result promptly. Selecting an OSS URL does not mean that the result will be stored permanently.
  • If a submission times out or the connection is interrupted, first confirm whether the task was accepted. Avoid immediately resubmitting it, which could cause duplicate generation and charges.
  • Upstream extended parameters are passed through unchanged. Specific support depends on the selected model and channel. Limits on the number, duration, and resolution of assets supported by one model must not be assumed to apply to other models.