Video Models
Text-to-video and image-to-video with Seedance and Wan
Video models create video_generate tasks through POST /v1/generate. They are billed per second of video at the price of the requested resolution, so every video request needs a duration.
| Model | Text-to-video ID | Image-to-video ID | Resolutions |
|---|---|---|---|
| Seedance 2.5 | bytedance/seedance-2.5/text-to-video | bytedance/seedance-2.5/image-to-video | 480p, 720p, 1080p |
| Seedance 2.0 | bytedance/seedance-2.0/text-to-video | bytedance/seedance-2.0/image-to-video | 480p, 720p, 1080p, 4k |
| Wan 3.0 | alibaba/wan-3.0/text-to-video | alibaba/wan-3.0/image-to-video | 480p, 720p, 1080p |
| Wan 2.7 | alibaba/wan-2.7/text-to-video | alibaba/wan-2.7/image-to-video | 720p, 1080p |
Every video model accepts durations from 4 to 15 seconds and the aspect ratios 16:9, 9:16, 4:3, 3:4, 1:1, and 21:9. Rendering usually takes one to three minutes.
Parameters
| Field | Type | Description |
|---|---|---|
model | string | Required. A text-to-video or image-to-video ID from the table. |
prompt | string | Required. The scene, or the motion to apply to the first frame. |
duration | integer | Required. Length in seconds, 4 to 15. The task is billed for the duration the model reports, or this value when it reports none. A video request without duration is rejected with 400 VALIDATION_ERROR. |
resolution | string | One of the model's resolutions. Selects the per-second price. |
aspect_ratio | string | Default 16:9. 16:9, 9:16, 4:3, 3:4, 1:1, or 21:9. |
image_urls | string[] | Image-to-video only: the first frame, as one public http(s) URL. Required for image-to-video models. |
parameters.last_image | string | Image-to-video only: URL of the last frame, to animate from the first frame to this one. |
parameters.reference_images | string[] | Text-to-video only: URLs of reference images for subjects, style, or scenes. |
parameters.reference_videos | string[] | Text-to-video only: URLs of reference videos. |
parameters.reference_audios | string[] | Text-to-video only: URLs of reference audio clips. |
parameters.generate_audio | boolean | Generate a soundtrack with the video, where the model supports it. |
parameters.enable_web_search | boolean | Let the model search the web for context about the prompt, where the model supports it. |
Upload local frames or reference media with POST /v1/uploads and pass the returned URLs.
Text to Video
bash
curl -X POST https://api.eggapi.ai/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5/text-to-video",
"prompt": "A black egg cracking open under soft studio light, slow push-in",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"parameters": { "generate_audio": true }
}'python
import requests
response = requests.post(
"https://api.eggapi.ai/v1/generate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "bytedance/seedance-2.5/text-to-video",
"prompt": "A black egg cracking open under soft studio light, slow push-in",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"parameters": {"generate_audio": True},
},
)
task = response.json()["data"]
print(task["id"])javascript
const response = await fetch("https://api.eggapi.ai/v1/generate", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "bytedance/seedance-2.5/text-to-video",
prompt: "A black egg cracking open under soft studio light, slow push-in",
duration: 5,
resolution: "720p",
aspect_ratio: "16:9",
parameters: { generate_audio: true }
})
});
const { data: task } = await response.json();
console.log(task.id);Image to Video
Pass the first frame in image_urls, and optionally the last frame in parameters.last_image:
bash
curl -X POST https://api.eggapi.ai/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba/wan-3.0/image-to-video",
"prompt": "The camera slowly orbits the product while light sweeps across it",
"image_urls": ["https://file.eggapi.ai/uploads/image/your-user-id/first.png"],
"duration": 5,
"resolution": "1080p",
"parameters": {
"last_image": "https://file.eggapi.ai/uploads/image/your-user-id/last.png"
}
}'An image-to-video request without a first frame is rejected with 400 VALIDATION_ERROR.
Completed Output
json
{
"data": {
"id": "gen_8c41e07a-2d9",
"status": "completed",
"model": "bytedance/seedance-2.5/text-to-video",
"type": "video_generate",
"output": {
"url": "https://file.eggapi.ai/videos/gen_8c41e07a-2d9/output.mp4",
"urls": ["https://file.eggapi.ai/videos/gen_8c41e07a-2d9/output.mp4"],
"duration_seconds": 5
},
"cost": "$1.2523",
"created_at": "2026-10-26T10:30:00Z",
"started_at": "2026-10-26T10:30:01Z",
"completed_at": "2026-10-26T10:32:05Z"
},
"error": null
}output.duration_seconds is the billed length when the model reports it.