BLACK FRIDAYUntil Dec 8 (Tue) 23:59 JSTUntil Dec 8

DocsVideo generation

Video generation

How to use the video API (submit, check progress, download the file), the fields and values each model accepts, how tasks are charged, how long files can be downloaded, and errors.

Generating a video takes time, so a single call does not return the video. You use it as a task (a job you submit and whose result you collect after generation finishes), in three steps.

StepMethod and pathWhat it does
1. SubmitPOST /v1/videosSend the model, the prompt (a description of the video you want), the length and the resolution. The task ID is returned
2. Check progressGET /v1/videos/{task ID}Repeat at intervals until status becomes completed or failed
3. Download the fileGET /v1/videos/{task ID}/contentReturns the finished video as an MP4 file

The base URL and the way you send the key are the same as for the other OpenAI-format endpoints (https://token.echohub.io/v1, Authorization: Bearer key).

The models currently offered are listed in the model list.

Models

Model IDProviderLengthResolutionInputs you can use
MiniMax-H3MiniMax4–15 seconds768P, 2KText (prompt), First and last frames, Reference images (up to 9), Reference videos (up to 3)
MiniMax-H3-Highspeed, MiniMax-H3-LiteMiniMax4–15 seconds768PText, first and last frames, reference images, reference videos
doubao-seedance-2-0-260128 (Seedance 2.0)ByteDance (Volcano Engine)4–15 seconds480p, 720p, 1080p, 4kText (prompt), First and last frames, Reference images (up to 9), Reference videos (up to 3), Reference audio (up to 3)
kling-v3 (Kling 3.0), kling-v3-omni (Kling 3.0 Omni)Kuaishou (Kling)3–15 seconds720P, 1080PText, first frame, last frame
kling-v4 (Kling 4.0)Kuaishou (Kling)3–30 seconds720P, 1080PText, first frame, last frame
wan3.0-prime (Wan 3.0 Prime)Alibaba Cloud2–30 seconds480P, 720P, 1080PText, first frame, last frame
happyhorse-1.1 (HappyHorse 1.1)Alibaba Cloud3–15 seconds480P, 720P, 1080PText, first frame
wan-video-2.5 (Wan 2.5)Alibaba Cloud5 or 10 seconds480P, 720P, 1080PText, first frame
wan-video-2.6 (Wan 2.6)Alibaba Cloud5 or 10 seconds720P, 1080PText, first frame
wan-video-2.6-flash (Wan 2.6 Flash)Alibaba Cloud5, 10 or 15 seconds720P, 1080PFirst frame (required), text
wan-video-2.7 (Wan 2.7)Alibaba Cloud2–15 seconds720P, 1080PText, first frame, last frame
happyhorse-1.0 (HappyHorse 1.0)Alibaba Cloud3–15 seconds720P, 1080PText, first frame
veo-3.1 (Veo 3.1), veo-3.1-no-audio (silent)Google4, 6 or 8 seconds720P, 1080PText, first frame, last frame
veo-3.1-fast (Veo 3.1 Fast), veo-3.1-fast-no-audio (silent)Google4, 6 or 8 seconds720P, 1080PText, first frame, last frame
veo-3.1-lite (Veo 3.1 Lite), veo-3.1-lite-no-audio (silent)Google4, 6 or 8 seconds720P, 1080PText, first frame, last frame
vidu-q3 (Vidu Q3), vidu-q3-turbo (Vidu Q3 Turbo)ShengShu (Vidu)2–16 seconds720P, 1080PText, first frame, last frame
vidu-q4 (Vidu Q4)ShengShu (Vidu)3–16 seconds720P, 1080PFirst frame (required), text
hailuo-2.3 (Hailuo 2.3)MiniMax6 seconds720P (generated at 768P), 1080PText, first frame
hailuo-2.3-fast (Hailuo 2.3 Fast)MiniMax6 seconds720P (generated at 768P), 1080PFirst frame (required), text
minimax-h3-max (MiniMax H3 Max)MiniMax5–15 seconds480P, 720P (generated at 768P)Text, first frame, last frame
minimax-h3-max-turbo (MiniMax H3 Max Turbo)MiniMax5–15 seconds480P, 720P (generated at 768P), 1080PText, first frame, last frame
grok-imagine-video (Grok Imagine Video)xAI2–15 seconds480P, 720PText
grok-imagine-video-1.5 (Grok Imagine Video 1.5), grok-imagine-video-1.5-lite (1.5 Lite)xAI2–15 seconds480P, 720P, 1080PText
kling-v2.5-turbo (Kling 2.5 Turbo)Kuaishou (Kling)5 or 10 seconds720P, 1080PText, first frame, last frame
kling-v2.6 (Kling 2.6), kling-v2.6-silent (Kling 2.6, silent)Kuaishou (Kling)5 or 10 seconds1080PText, first frame, last frame
kling-v3-silent (Kling 3.0, silent), kling-v3-omni-silent (Kling 3.0 Omni, silent)Kuaishou (Kling)3–15 seconds720P, 1080PText, first frame, last frame
wan-video-3.0 (Wan 3.0)Alibaba Cloud2–30 seconds480P, 720P, 1080PText, first frame, last frame
wan-video-3.0-pro (Wan 3.0 Pro), wan-video-3.0-pro-prime (Wan 3.0 Pro Prime)Alibaba Cloud2–30 seconds1080PText, first frame, last frame
ltx-2.3-fast (LTX 2.3 Fast), ltx-2.3-pro (LTX 2.3 Pro)LightricksFast 6–20 seconds, Pro 6, 8 or 10 seconds1080PText, first frame, last frame
luma-ray-3.2 (Luma Ray 3.2)Luma AI5 or 10 seconds720P, 1080PText, first frame, last frame
pixverse-c1, pixverse-c1-audio (PixVerse C1), pixverse-v6, pixverse-v6-audio (PixVerse V6)PixVerse2–15 seconds720P, 1080PFirst frame (required), text
  • Prices (per second or per 1 million tokens) are listed on each model's page in the model list
  • The processing region is shown on each model's page in the model list. The prompt and the images, videos and audio used as references are passed to the provider's API that processes them in that region (Data handling)
  • The fields and values you can use differ by model. See "Parameters by model" below

Example

This example makes a 6-second 768P video with MiniMax-H3 and saves it as video.mp4. Put your key in the environment variable ECHO_API_KEY first (Quickstart).

bash
# 1. Submit. Note the id that is returned
curl "https://token.echohub.io/v1/videos" \
  -H "Authorization: Bearer $ECHO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "A Shiba Inu walking slowly along the beach in the evening",
    "seconds": 6,
    "resolution": "768P"
  }'

# 2. Check progress. Set VIDEO_ID to the id returned in step 1
VIDEO_ID="task_..."
curl "https://token.echohub.io/v1/videos/$VIDEO_ID" \
  -H "Authorization: Bearer $ECHO_API_KEY"

# 3. When status is completed, download the file
curl -o video.mp4 "https://token.echohub.io/v1/videos/$VIDEO_ID/content" \
  -H "Authorization: Bearer $ECHO_API_KEY"

1. Submit

Send the following fields as JSON to POST /v1/videos.

ParameterRequiredDescription
modelRequiredThe model ID
promptRequired for MiniMax-H3A description of the video you want
secondsLength of the video in seconds. An integer
resolutionResolution (MiniMax-H3). For Seedance 2.0, write it in metadata.resolution
imagesAn array of image URLs, used for the first and last frame (the first and last picture of the video) (MiniMax-H3)
input_referenceThe URL of an image to use as the first frame (MiniMax-H3)
metadataExtra settings for each model (Seedance 2.0's resolution, aspect ratio, sound on or off, reference material and so on). A JSON object
  • Pass images, videos and audio as public URLs that the provider's servers can fetch
  • Each model decides where each value goes. Values written anywhere other than the place given in "Parameters by model" may not be used. Echo refuses requests that would produce a video different from what you asked for or a price that does not match, such as a length, resolution or image written where Seedance 2.0 does not read it (HTTP 400, "Requests that are rejected")
  • Do not use the OpenAI-format size (such as 1280x720). It does not set the aspect ratio; some models read it as the resolution and others return an error
  • For MiniMax-H3 you can also attach an image file to the request: use the form format (multipart/form-data) and attach one file as input_reference (up to 20 MB). In the form format, write metadata as a JSON string. Seedance 2.0 does not accept files (HTTP 400); pass images as URLs

First and last frames

The first frame (the first image of the video) and the last frame can be given in either of the two ways below. Whether a model takes a last frame is listed in its table under Parameters by model.

StyleFirst frameLast frame
In metadata.content with a role (the same form as the official MiniMax and Seedance APIs){"type": "image_url", "image_url": {"url": "<image>"}, "role": "first_frame"}The same form with "role": "last_frame"
In image / imagesimage, or the first item of imagesThe second item of images
JSON
{
  "model": "kling-v4",
  "prompt": "A Shiba Inu walking slowly along the beach at dusk",
  "seconds": 5,
  "resolution": "720P",
  "metadata": {
    "content": [
      {"type": "image_url", "image_url": {"url": "https://example.com/first.png"}, "role": "first_frame"},
      {"type": "image_url", "image_url": {"url": "https://example.com/last.png"}, "role": "last_frame"}
    ]
  }
}
  • Do not mix the two styles in one request. A last frame without a first frame, or the same role twice, also returns HTTP 400
  • Besides a URL, some models also take a data URI (data:image/png;base64,…) or a plain Base64 string as <image>. Each model's table lists what it takes
  • Seedance 2.0 takes only the metadata.content style (image / images return HTTP 400)

When the submission is accepted, JSON like the following is returned with HTTP 200.

JSON
{"id":"task_3H0YkK1PMgAiKglDcHbxqtL8WC7C247u","object":"video","model":"MiniMax-H3","status":"queued","progress":0,"created_at":1790796502}

An estimated price is deducted from your balance at submission ("Pricing" below).

2. Check progress

GET /v1/videos/{task ID} returns the state of the task.

FieldDescription
idThe task ID (a string starting with task_)
objectAlways video
modelThe model ID
statusThe state (table below)
progressA number from 0 to 100, fixed for each state (0 right after submission, 10 (Seedance 2.0) or 30 (MiniMax-H3) while waiting, 50 while generating, 100 when finished). It does not measure actual progress
created_atWhen the task was submitted (seconds since 1970-01-01)
completed_atWhen the task completed. Present only when it has completed
errorWhy the task failed (code and message). Present only when the provider returned a reason (Seedance 2.0). Not present for MiniMax-H3
statusMeaning
queuedWaiting in the provider's queue
in_progressBeing generated
completedCompleted. You can download the file
failedFailed. The price is refunded in full
  • Echo's servers ask the provider for progress every 15–30 seconds, so it can take about 30 seconds after the provider finishes before the status becomes completed. The interval is sometimes longer than 30 seconds
  • Check progress every 10–15 seconds or so. Echo does not send a notice when a task completes
  • A task that has not completed 24 hours after submission is set to failed and refunded in full. For Seedance 2.0, the provider cancels a task that has not completed 23 hours after submission; it then becomes failed and is refunded in full

3. Download the file

GET /v1/videos/{task ID}/content returns the finished video as an MP4 file (Content-Type: video/mp4). You can also use HEAD to check only the file size, or the Range header to download part of the file.

  • Echo does not store generated videos. Each time you call this path, Echo fetches the file from the provider and passes it to you as is
  • You can download the file only while the provider keeps it. After that, HTTP 410 is returned. Download and save the file soon after the task completes
ModelHow long the provider keeps the file
Seedance 2.024 hours after generation finishes
MiniMax-H3 (also Highspeed and Lite)Not published
Kling (3 models)Not published by the provider. Download the file as soon as the task completes
Wan 3.0 Prime, HappyHorse 1.1Not published by the provider. Download the file as soon as the task completes
Wan 2.5–2.7, HappyHorse 1.0Not published by the provider. Download the file as soon as the task completes
Veo 3.1, Vidu, Hailuo 2.3, MiniMax H3 Max, Grok Imagine VideoNot published by the provider. Download the file as soon as the task completes
Kling 2.5 Turbo, 2.6 and silent 3.0, Wan 3.0, LTX 2.3, Luma Ray 3.2, PixVerseNot published by the provider. Download the file as soon as the task completes

Parameters by model

MiniMax-H3

ItemFieldValues
LengthsecondsAn integer (4–15). Default 5
Resolutionresolution768P or 2K. Default 768P
Aspect ratiometadata.ratio16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive (follow the input image or video). Default: adaptive when you pass an image or video, 16:9 otherwise. adaptive cannot be used without an image or video
First and last frameimages1 or 2 images (URL, data URI or Base64). The first is the first frame and the second is the last frame. An image in input_reference becomes the first frame
Reference imagesmetadata.contentUp to 9, in the form shown in the example below
Reference videosmetadata.reference_videoAn array of URLs. Up to 3
  • Frames (images, input_reference) and references (images, videos) cannot be used together
  • Reference audio cannot be used (HTTP 400)
  • Without prompt, HTTP 400 is returned

An example with a reference image:

JSON
{
  "model": "MiniMax-H3",
  "prompt": "The mug in the image slowly rotating on a wooden table",
  "seconds": 5,
  "resolution": "768P",
  "metadata": {
    "content": [
      {"type": "image_url", "image_url": {"url": "https://example.com/mug.png"}, "role": "reference_image"}
    ]
  }
}
TypeAccepted files (provider's specification)
ImageJPG, PNG, WEBP, HEIC, HEIF. Up to 30 MB each. Width and height 256–5760 pixels, width ÷ height 0.4–2.5
VideoMP4, MOV. Up to 50 MB each. 2–15 seconds each, 15 seconds in total
Whole requestUp to 64 MB. Pass large files as URLs

MiniMax-H3-Highspeed and MiniMax-H3-Lite

The faster (Highspeed) and lighter (Lite) versions of MiniMax-H3. Requests are written the same way as for MiniMax-H3, with two differences:

ItemWhereValue
LengthsecondsAn integer from 4 to 15. Defaults to 5
Resolutionresolution768P only. Defaults to 768P. 480P and 2K are not available (HTTP 400)
  • Aspect ratio, first and last frames, reference images and videos, and accepted files are the same as MiniMax-H3. Reference audio is not available
  • Each model has its own price per second, separate from MiniMax-H3 (Models)
JSON
{
  "model": "MiniMax-H3-Lite",
  "prompt": "A shiba inu walking slowly along the beach at dusk",
  "seconds": 4,
  "resolution": "768P",
  "metadata": {"ratio": "9:16"}
}

Seedance 2.0 (doubao-seedance-2-0-260128)

ItemFieldValues
LengthsecondsAn integer (4–15)
Resolutionmetadata.resolution480p, 720p, 1080p, 4k. Default 720p
Aspect ratiometadata.ratio16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive. Default adaptive (the model chooses from the prompt or images)
Soundmetadata.generate_audiotrue (with sound) or false (no sound). Default true
First frame, first and last frame, referencesmetadata.contentIn the form shown in the example below. role decides how each item is used
Maximum wait at the providermetadata.execution_expires_afterA whole number of seconds from 3600 to 82800. When omitted, Echo sets 82800 (23 hours). The provider cancels a task that has not completed within this time, and the price is refunded in full
  • Write the length in seconds and the resolution in metadata.resolution. The top-level resolution, duration and input_reference, and parameters such as --dur 5 after the prompt, cannot be used with Seedance 2.0 (HTTP 400, "Requests that are rejected")
  • Do not omit seconds and metadata.resolution. When they are omitted, the estimated price is calculated as 15 seconds at 1080p, so you may not be able to submit because of your balance (the price is recalculated from actual usage after generation)
  • First frame, first and last frame, and references (images, videos, audio) cannot be combined (provider's specification)
  • Pass images, videos and audio as URLs. Attaching a file in the form format returns HTTP 400
  • Images and videos showing real people's faces cannot be used as references (provider's specification)

An example with a first and last frame:

JSON
{
  "model": "doubao-seedance-2-0-260128",
  "prompt": "A bud slowly opening into a flower",
  "seconds": 5,
  "metadata": {
    "resolution": "720p",
    "content": [
      {"type": "image_url", "image_url": {"url": "https://example.com/first.png"}, "role": "first_frame"},
      {"type": "image_url", "image_url": {"url": "https://example.com/last.png"}, "role": "last_frame"}
    ]
  }
}
roleUseCount
first_frameFirst frame (type is image_url). On its own, the video starts from this image1
last_frameLast frame (type is image_url). Use it together with first_frame1
reference_imageReference image (type is image_url)1–9
reference_videoReference video (type is video_url, URL in video_url.url)Up to 3
reference_audioReference audio (type is audio_url, URL in audio_url.url). Use it together with an image or videoUp to 3
TypeAccepted files (provider's specification)
ImageJPEG, PNG, WEBP, BMP, TIFF, GIF, HEIC, HEIF. Under 30 MB each. Width and height 300–6000 pixels, width ÷ height 0.4–2.5
VideoMP4, MOV. Up to 200 MB each. 2–15 seconds each, 15 seconds in total
AudioWAV, MP3. Up to 15 MB each. 2–15 seconds each, 15 seconds in total
Whole requestUp to 64 MB

Kling (kling-v3, kling-v3-omni, kling-v4)

ItemWhere to write itValues
PromptpromptRequired. Up to 2,500 characters
LengthsecondsAn integer from 3 to 15 for kling-v3 and kling-v3-omni, 3 to 30 for kling-v4. Defaults to 5
Resolutionresolution720P or 1080P. Defaults to 1080P. For Kling 3.0 and 3.0 Omni, 720P is the Standard tier and 1080P the Pro tier
Aspect ratioratio16:9, 9:16 or 1:1. Text-to-video only (defaults to 16:9); with a first frame, the video follows the image
First frameimageAn image URL, or the image as a data URI (data:image/png;base64,…) or a Base64 string
Last frameSecond item of imagesSame forms as the first frame: URL, data URI or Base64. With two items in images, the first is the first frame and the second the last frame
Audio—kling-v3 and kling-v3-omni always generate native audio ("audio": false returns HTTP 400). Not configurable for kling-v4
  • Reference images, reference videos, negative_prompt, seed and watermark are not supported (HTTP 400)
  • You are charged seconds × the resolution rate at submission. The price is not recalculated after generation (the actual length equals the requested length)
JSON
{
  "model": "kling-v3",
  "prompt": "A Shiba Inu walking slowly along the beach at dusk",
  "seconds": 5,
  "resolution": "720P",
  "ratio": "9:16"
}

Wan 3.0 Prime and HappyHorse 1.1 (wan3.0-prime, happyhorse-1.1)

ItemWhere to write itValues
PromptpromptRequired. Up to 5,000 characters for wan3.0-prime, 2,500 for happyhorse-1.1
LengthsecondsAn integer from 2 to 30 for wan3.0-prime, 3 to 15 for happyhorse-1.1. Defaults to 5
Resolutionresolution480P, 720P or 1080P. Defaults to 1080P
Aspect ratioratio16:9, 9:16, 1:1, 4:3 or 3:4. If omitted, text-to-video uses 16:9 and a video with a first frame follows the image. Not available for happyhorse-1.1 with a first frame (the video follows the image)
First frameimageImage URL
Last frameSecond item of imageswan3.0-prime only. Image URL. With two items in images, the first is the first frame and the second the last frame
AudioaudioFor wan3.0-prime, true (with audio) or false (silent); defaults to audio. Both cost the same. Not configurable for happyhorse-1.1
SeedseedAn integer from 0 to 2147483647
Prompt rewritingprompt_extendwan3.0-prime only. Set to false to use the prompt exactly as written; by default the prompt is rewritten
  • Automatic length ("seconds": -1), reference images, reference videos, reference audio, negative_prompt and watermark are not supported (HTTP 400)
  • You are charged seconds × the resolution rate at submission. The price is not recalculated after generation (the actual length equals the requested length)
JSON
{
  "model": "happyhorse-1.1",
  "prompt": "A horse galloping across a meadow, backlit by the setting sun",
  "seconds": 6,
  "resolution": "720P",
  "ratio": "16:9"
}

Wan 2.5–2.7 and HappyHorse 1.0 (wan-video-2.5, wan-video-2.6, wan-video-2.6-flash, wan-video-2.7, happyhorse-1.0)

ItemWhere to write itValues
PromptpromptRequired. Up to 50,000 characters
LengthsecondsAn integer. 5 or 10 for wan-video-2.5 and wan-video-2.6; 5, 10 or 15 for wan-video-2.6-flash; 2 to 15 for wan-video-2.7; 3 to 15 for happyhorse-1.0. Defaults to 5
Resolutionresolution480P, 720P or 1080P for wan-video-2.5; 720P or 1080P for the other four. Defaults to 1080P
Aspect ratioratio16:9, 9:16, 1:1, 4:3 or 3:4. If omitted, text-to-video uses 16:9 and a video with a first frame follows the image. With a first frame, only wan-video-2.7 accepts a ratio
First frameimageImage URL. wan-video-2.6-flash is image-to-video only and requires a first frame
Last frameSecond item of imageswan-video-2.7 only. With two items in images, the first is the first frame and the second the last frame
AudioaudioThe four Wan models always generate video with audio and are priced with audio; false (silent) is not supported. Not configurable for happyhorse-1.0
SeedseedAn integer from 0 to 2147483647
  • Automatic length ("seconds": -1), reference images, reference videos, reference audio, negative_prompt, watermark and shot_type are not supported (HTTP 400). prompt_extend has no effect
  • You are charged seconds × the resolution rate at submission. The price is not recalculated after generation
JSON
{
  "model": "wan-video-2.6-flash",
  "prompt": "The woman in the photo slowly turns around and smiles",
  "seconds": 5,
  "resolution": "720P",
  "image": "https://example.com/first.png"
}

Veo 3.1, Vidu, Hailuo 2.3, MiniMax H3 Max and Grok Imagine Video

Applies to: veo-3.1, veo-3.1-fast, veo-3.1-lite, veo-3.1-no-audio, veo-3.1-fast-no-audio, veo-3.1-lite-no-audio, vidu-q3, vidu-q3-turbo, vidu-q4, hailuo-2.3, hailuo-2.3-fast, minimax-h3-max, minimax-h3-max-turbo, grok-imagine-video, grok-imagine-video-1.5, grok-imagine-video-1.5-lite

ItemFieldValue
PromptpromptRequired. Up to 20000 characters for Veo, 2000 for Vidu Q3 and Q3 Turbo, 5000 for Vidu Q4, 2000 for Hailuo, 50000 for MiniMax H3 Max and 4096 for Grok
LengthsecondsAn integer. 4, 6 or 8 for Veo; 2 to 16 for Vidu Q3 and Q3 Turbo; 3 to 16 for Vidu Q4; 6 only for Hailuo; 5 to 15 for MiniMax H3 Max; 2 to 15 for Grok. If omitted it is treated as 5 seconds, so always set it for Veo and Hailuo
Resolutionresolution720P or 1080P for Veo, Vidu and Hailuo. 480P or 720P for minimax-h3-max; 480P, 720P or 1080P for minimax-h3-max-turbo. 480P or 720P for grok-imagine-video; 480P, 720P or 1080P for Grok 1.5 and 1.5 Lite. Defaults to 1080P (minimax-h3-max and grok-imagine-video have no 1080P, so always set it). 720P on Hailuo and MiniMax H3 Max is generated at 768P and priced at the 768P rate
Aspect ratioratio16:9 or 9:16 for Veo (also with a first frame). 16:9, 9:16, 1:1, 4:3 or 3:4 for Vidu Q3 and Q3 Turbo, MiniMax H3 Max and Grok, for text-to-video only. Not configurable for Hailuo and Vidu Q4. If omitted, text-to-video uses the provider default (such as 16:9) and image-to-video follows the image
First frameimageAn image URL. Required for vidu-q4 and hailuo-2.3-fast, which are image-to-video only. Grok is text-to-video only and does not accept images
Last frameSecond item of imagesVeo, Vidu Q3 and Q3 Turbo, MiniMax H3 Max. With two items in images, the first is the first frame and the second the last frame
Audioaudioveo-3.1, veo-3.1-fast and veo-3.1-lite generate video with audio (false returns HTTP 400); the three -no-audio models generate silent video (true returns HTTP 400). The two are priced differently. Vidu Q3 and Q3 Turbo accept true (with audio) or false (silent), default with audio, same price. Not configurable for the other models
What to avoidnegative_promptVeo only. Written as text
SeedseedAn integer from 0 to 2147483647. Veo, Vidu and minimax-h3-max-turbo only
Prompt rewritingprompt_extendHailuo only. false uses the prompt as written without rewriting. Rewritten by default
  • Automatic length ("seconds": -1), 4K, reference images, reference videos, reference audio, watermark and shot_type are not supported (HTTP 400). negative_prompt is not supported except on Veo
  • Hailuo does not accept 10 seconds (the provider prices per video, and the 10-second price is not the 6-second price scaled by length)
  • The charge is deducted at submission at the unit price for seconds × resolution and is not recalculated after generation
JSON
{
  "model": "veo-3.1-fast",
  "prompt": "On a street corner after the rain, a person folds an umbrella and looks up at the sky. Thunder rumbles in the distance",
  "seconds": 8,
  "resolution": "1080P",
  "ratio": "16:9"
}

Kling 2.5 Turbo, 2.6 and silent Kling 3.0 (kling-v2.5-turbo, kling-v2.6, kling-v2.6-silent, kling-v3-silent, kling-v3-omni-silent)

ItemWhere to write itValues
PromptpromptRequired. Up to 2,500 characters
Lengthseconds5 or 10 for kling-v2.5-turbo, kling-v2.6 and kling-v2.6-silent; an integer from 3 to 15 for kling-v3-silent and kling-v3-omni-silent. Defaults to 5
Resolutionresolution720P (Standard tier) or 1080P (Pro tier). kling-v2.6 and kling-v2.6-silent are 1080P only. 720P on kling-v2.5-turbo works only with a first frame (text-to-video is 1080P). Defaults to 1080P
Aspect ratioratio16:9, 9:16 or 1:1. Text-to-video only (defaults to 16:9); with a first frame, the video follows the image
First frameimageAn image URL, or the image as a data URI (data:image/png;base64,…) or a Base64 string
Last frameSecond item of imagesSame forms as the first frame: URL, data URI or Base64. With two items in images, the first is the first frame and the second the last frame. 1080P only on kling-v2.5-turbo
Audioaudiokling-v2.6 always generates native audio and is priced with audio (false returns HTTP 400). kling-v2.5-turbo and the three -silent models generate video without audio and are priced without audio (true returns HTTP 400)
  • Reference images, reference videos, negative_prompt, seed, watermark and shot_type are not supported (HTTP 400)
  • You are charged seconds × the resolution rate at submission. The price is not recalculated after generation
JSON
{
  "model": "kling-v2.6-silent",
  "prompt": "A Shiba Inu walking slowly along the beach at dusk",
  "seconds": 10,
  "resolution": "1080P",
  "ratio": "9:16"
}

Wan 3.0 (wan-video-3.0, wan-video-3.0-pro, wan-video-3.0-pro-prime)

ItemWhere to write itValues
PromptpromptRequired. Up to 5,000 characters
LengthsecondsAn integer from 2 to 30. Defaults to 5
Resolutionresolution480P, 720P or 1080P for wan-video-3.0. wan-video-3.0-pro and wan-video-3.0-pro-prime finish the generated video with super-resolution and are 1080P only. Defaults to 1080P
Aspect ratioratio16:9, 9:16, 1:1, 4:3 or 3:4, also with a first frame. If omitted, text-to-video uses 16:9 and a video with a first frame follows the image
First frameimageImage URL
Last frameSecond item of imagesImage URL. With two items in images, the first is the first frame and the second the last frame
Audioaudiotrue (with audio) or false (silent); defaults to audio. Both cost the same
SeedseedAn integer from 0 to 2147483647
Prompt rewritingprompt_extendSet to false to use the prompt exactly as written; by default the prompt is rewritten
  • Automatic length ("seconds": -1), reference images, reference videos, reference audio, negative_prompt and watermark are not supported (HTTP 400)
  • You are charged seconds × the resolution rate at submission. The price is not recalculated after generation

LTX 2.3, Luma Ray 3.2 and PixVerse (ltx-2.3-fast, ltx-2.3-pro, luma-ray-3.2, pixverse-c1, pixverse-c1-audio, pixverse-v6, pixverse-v6-audio)

ItemWhere to write itValues
PromptpromptRequired. Up to 5,000 characters for ltx-2.3-fast and ltx-2.3-pro, 6,000 for luma-ray-3.2
LengthsecondsAn integer. An even number from 6 to 20 for ltx-2.3-fast; 6, 8 or 10 for ltx-2.3-pro (for LTX, always set it: the default of 5 returns HTTP 400). 5 or 10 for luma-ray-3.2; 2 to 15 for the four PixVerse models. Defaults to 5
Resolutionresolution1080P only for ltx-2.3-fast and ltx-2.3-pro; 720P or 1080P for luma-ray-3.2 and PixVerse. Defaults to 1080P
Aspect ratioratio16:9 or 9:16 for ltx-2.3-fast and ltx-2.3-pro; 16:9, 9:16, 1:1, 4:3 or 3:4 for luma-ray-3.2 (defaults to 16:9). Both also accept it with a first frame. Not available for PixVerse (the video follows the image)
First frameimageImage URL. The four PixVerse models are image-to-video only and require a first frame
Last frameSecond item of imagesltx-2.3-fast, ltx-2.3-pro and luma-ray-3.2 only. With two items in images, the first is the first frame and the second the last frame
Audioaudiotrue or false for ltx-2.3-fast and ltx-2.3-pro (same price). luma-ray-3.2 generates video without audio and it cannot be set. pixverse-c1 and pixverse-v6 are priced without audio (true returns HTTP 400); pixverse-c1-audio and pixverse-v6-audio are priced with audio (false returns HTTP 400)
SeedseedPixVerse only. An integer from 0 to 2147483647
  • Automatic length ("seconds": -1), reference images, reference videos, reference audio, negative_prompt, watermark and shot_type are not supported (HTTP 400). Luma Ray 3.2 outputs SDR (HDR and EXR export are not available)
  • You are charged seconds × the resolution rate at submission. The price is not recalculated after generation
JSON
{
  "model": "pixverse-v6-audio",
  "prompt": "The cat in the photo yawns and looks at the camera",
  "seconds": 5,
  "resolution": "720P",
  "image": "https://example.com/first.png"
}

Requests that are rejected

Echo refuses the following at submission, because the video would not match what you asked for, or the price would be calculated from different values than the ones used to generate the video. They return HTTP 400 with error.code invalid_request, and message says how to write the request instead. They are free.

What was writtenModelWrite insteadmessage
The length in duration or metadata.duration (without seconds, or with a different value from seconds)Seedance 2.0secondsWrite the video length in seconds, for example "seconds": 5. This model does not read duration. With a value different from seconds: duration does not match seconds. Write the video length only in seconds
A seconds value that is not a whole number (such as 5.5)Seedance 2.0A whole number (5 or "5")seconds must be a whole number of seconds, for example "seconds": 5
The length as frames or metadata.frames (a number of frames)Seedance 2.0secondsThis model does not read frames. Write the video length in seconds, for example "seconds": 5
The resolution in the top-level resolutionSeedance 2.0metadata.resolutionWrite the resolution in metadata.resolution, for example "metadata": {"resolution": "720p"}. This model does not read the top-level resolution
Only size, without metadata.resolutionSeedance 2.0metadata.resolutionWrite the resolution in metadata.resolution, for example "metadata": {"resolution": "720p"}. This model does not read size
A metadata.resolution other than 480p, 720p, 1080p and 4k (such as 720P)Seedance 2.0One of these fourmetadata.resolution must be one of 480p, 720p, 1080p, 4k
Length or resolution parameters after the prompt (--dur 5, --rs 720p and so on)Seedance 2.0seconds and metadata.resolutionWrite the video length in seconds and the resolution in metadata.resolution. This model does not accept --dur in the prompt
Images in input_reference, image or imagesSeedance 2.0metadata.content (for the first frame, set role to first_frame)This model does not read input_reference. Put images in metadata.content; for the first frame use {"type": "image_url", "image_url": {"url": "<image URL>"}, "role": "first_frame"}
A file attached in the form formatSeedance 2.0Image URLs in metadata.contentThis model does not accept uploaded files. Pass images as URLs in metadata.content; for the first frame use {"type": "image_url", "image_url": {"url": "<image URL>"}, "role": "first_frame"}
A metadata.execution_expires_after outside 3600–82800Seedance 2.0A whole number from 3600 to 82800 (when omitted, Echo sets 82800)metadata.execution_expires_after must be a whole number of seconds from 3600 to 82800 (1 to 23 hours)
First / last frames in both metadata.content (role) and image / imagesAll except Seedance 2.0Use only one of the twoSpecify the first and last frames once: either in metadata.content with "role": "first_frame" / "last_frame", or with image / images, not both
Reference audio (metadata.reference_audio, audio_url in metadata.content)MiniMax-H3Not availableReference audio is not supported for this model. Remove audio_url and reference_audio from the request
A resolution other than 768P (480P, 2K, etc.)MiniMax-H3-Highspeed, Lite768P, or omit itThis model supports resolution 768P only (480P and 2K are not available). Omit resolution or set it to 768P
seconds outside 4–15MiniMax-H3-Highspeed, LiteAn integer from 4 to 15seconds must be a whole number from 4 to 15 for this model
A video model called through POST /v1/responses or POST /v1/tasks/…BothPOST /v1/videosVideo generation requests must be sent to POST /v1/videos
  • In message, duration, frames, input_reference and --dur are replaced with the name you actually wrote (metadata.duration, image, --rs and so on)
  • For a correctly written request, Echo only adds metadata.execution_expires_after for Seedance 2.0 (the maximum time to wait at the provider), rewrites first and last frames given with role in metadata.content into the form each model takes, and adds data: to Base64 images that lack it. Everything else reaches the provider as written

Pricing

Video is charged at a unit price per second (MiniMax-H3) or per 1 million tokens (Seedance 2.0). Tokens are the unit the provider uses to count the amount of video. Unit prices are listed on each model's page in the model list.

The price of a task is settled in this order.

  1. When you submit, an estimated price is deducted from your balance. The estimate is calculated from the requested length and resolution (for MiniMax-H3, also the number of reference images and any reference video). If your balance or the key's spending limit is not enough, the submission is refused (HTTP 403)
  2. When generation finishes, the price is recalculated from the actual usage the provider reports, and the difference is refunded or additionally deducted
  3. Tasks that fail, and tasks that have not completed 24 hours after submission (23 hours for Seedance 2.0), are refunded in full
ModelWhat the recalculation uses
Seedance 2.0The actual number of tokens. The unit price per 1 million tokens depends on whether you attached a reference video
MiniMax-H3 (also Highspeed and Lite)The actual length, number of reference images and seconds of reference video. A reference video is counted as 15 seconds at submission
Kling (3 models)Not recalculated (the length and resolution at submission are used)
Wan 3.0 Prime, HappyHorse 1.1Not recalculated (the length and resolution at submission are used)
Wan 2.5–2.7, HappyHorse 1.0Not recalculated (the length and resolution at submission are used)
Veo 3.1, Vidu, Hailuo 2.3, MiniMax H3 Max, Grok Imagine VideoNot recalculated (the length and resolution at submission are used)
Kling 2.5 Turbo, 2.6 and silent 3.0, Wan 3.0, LTX 2.3, Luma Ray 3.2, PixVerseNot recalculated (the length and resolution at submission are used)
  • Requests refused at submission (wrong values, requests the provider did not accept and so on) are free
  • An additional deduction is made even if your balance is not enough. The part that makes your balance negative is deducted from your next top-up (Pricing and top-ups)
  • The state and price of each task are shown in Call history in the console (API keys and usage)

Errors

Error bodies use the same format as the other OpenAI-format endpoints (Errors). Errors specific to video generation are listed below.

CaseHTTP status and error.codemessageWhat to do
A value such as the length or resolution cannot be used with the model400, invalid_request or an empty stringAn English sentence giving the reason (for example MiniMax-H3 duration must be an integer between 4 and 15 seconds)Fix it using "Parameters by model"
The request is written in a way Echo refuses (for Seedance 2.0, the length in duration or a file attached in the form format; a video model called through POST /v1/responses, and so on)400, invalid_requestAn English sentence saying how to write it (for example Write the video length in seconds, for example "seconds": 5. This model does not read duration)Fix it using "Requests that are rejected"
The provider did not accept the request400, upstream_errorThe model service rejected the request, check the parameters and try againCheck the values and the URLs of images and other files
Wrong task ID, or a task of another account400 (404 when downloading the file), task_not_foundTask not foundCheck the ID
The file was requested before the task completed400, task_not_readyThe video is not ready yetDownload after the status becomes completed
The file of a failed task was requested400, task_failedThe video generation failedSubmit again
The provider no longer keeps the file410, artifact_goneArtifact content is no longer availableThe file cannot be downloaded. Submit again
Insufficient balance403, insufficient_quotaInsufficient balanceTop up
Not enough of the key's spending limit left403, insufficient_quotaThis API key has reached its spending limitRaise the spending limit (Limits and rate limits)
Wrong model ID503, model_not_foundThe model {model ID} does not exist or is temporarily unavailableCheck the model ID

Errors returned at submission are free.

Using the OpenAI SDK

  • The OpenAI SDKs (Python, Node.js) also have video functions (videos.create and so on), but in the SDKs they are marked as deprecated with the note "The Sora API is scheduled to permanently shut down on September 24, 2026". The examples on this page call the API over HTTP without the SDK
  • The SDK's videos.create sends the request in the form format (multipart/form-data). In this format, metadata does not reach the provider unless it is a JSON string (Python example: extra_body={"metadata": json.dumps({"resolution": "720p"})})