curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.5-flash",
"input": {
"prompt": "One continuous 30-second story of the same young woman in a yellow raincoat delivering a handwritten letter across a small seaside town at dawn. 0-6s: wide aerial shot of the sleepy harbor town, fishing boats rocking, soft morning light; she rides an old bicycle down a cobblestone hill. 6-12s: tracking shot beside her as she weaves past a fish market, seagulls lifting off, a vendor waves at her. 12-18s: low-angle shot as she climbs a steep stone staircase carrying the bicycle, breathing hard, the letter tucked in her pocket. 18-24s: she knocks on a blue door at the top; an elderly man opens it and she hands him the letter. 24-30s: close-up of the man reading, his eyes filling with tears; he smiles and says softly, \"She remembered.\" Camera slowly pulls back to reveal the sunrise over the sea. Natural ambient sound: waves, gulls, bicycle bell, footsteps, gentle piano music. No subtitles, no on-screen text.",
"duration": 30,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}
'
{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
},
"message": "success"
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Seedance
Seedance 2.5 Flash
Seedance 2.5 Flash API 可根据文本、首尾帧,或图片、视频、音频参考,生成 4–30 秒、带同步音频的 480p 或 720p 视频。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.5-flash",
"input": {
"prompt": "One continuous 30-second story of the same young woman in a yellow raincoat delivering a handwritten letter across a small seaside town at dawn. 0-6s: wide aerial shot of the sleepy harbor town, fishing boats rocking, soft morning light; she rides an old bicycle down a cobblestone hill. 6-12s: tracking shot beside her as she weaves past a fish market, seagulls lifting off, a vendor waves at her. 12-18s: low-angle shot as she climbs a steep stone staircase carrying the bicycle, breathing hard, the letter tucked in her pocket. 18-24s: she knocks on a blue door at the top; an elderly man opens it and she hands him the letter. 24-30s: close-up of the man reading, his eyes filling with tears; he smiles and says softly, \"She remembered.\" Camera slowly pulls back to reveal the sunrise over the sea. Natural ambient sound: waves, gulls, bicycle bell, footsteps, gentle piano music. No subtitles, no on-screen text.",
"duration": 30,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}
'
{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
},
"message": "success"
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
480p 和 720p。它可以根据文本提示词生成 4–30 秒、带同步音频的视频,也可以让首帧(可加尾帧)动起来,或按图片、视频、音频参考生成视频。模式由传入的素材自动决定。
模型
- seedance-2.5-flash — 文生视频、首尾帧图生视频、多模态参考生视频,输出
480p或720p
功能
- 4–30 秒视频:
duration可设为 4 到 30 之间的任意整数秒。 - 同步音频:音频与视频同时生成。将
generate_audio设为false时只生成视频。 - 首尾帧:可以只给一张首帧,也可以同时给首帧和尾帧来决定镜头的结尾画面。
- 多模态参考:最多 10 张参考图、5 个参考视频、5 段参考音频,共同引导视频内容。
- 宽高比:
auto、21:9、16:9、4:3、1:1、3:4或9:16。
输入模式
| 模式 | 触发条件 |
|---|---|
| 参考生视频 | reference_image_urls、reference_video_urls 或 reference_audio_urls 非空 |
| 图生视频 | image_urls 非空 |
| 文生视频 | 未传任何素材 |
image_urls 和参考素材字段请分开在不同请求中使用。图生视频时,aspect_ratio 设为 auto 或不传。
必填参数
prompt(string):视频描述。参考素材按上传顺序写作@Image1、@Video1、@Audio1。duration(integer):输出时长,4 到 30 秒。
可选参数
resolution(string):480p或720p。默认720p。aspect_ratio(string):auto、21:9、16:9、4:3、1:1、3:4或9:16。默认auto,由模型自动选择。传image_urls时,auto会沿用首帧的宽高比。generate_audio(boolean):与视频同时生成同步音频。默认true。image_urls(array of strings):一张首帧,或依次传首帧和尾帧。JPEG、PNG 或 WebP,每张不超过 30 MB。reference_image_urls(array of strings):最多 10 张参考图。JPEG、PNG 或 WebP,每张不超过 30 MB。reference_video_urls(array of strings):最多 5 个参考视频。MP4 或 MOV,每个 2–30 秒、不超过 200 MB。reference_audio_urls(array of strings):最多 5 段参考音频,需与reference_image_urls或reference_video_urls一起使用。MP3 或 WAV,每段 2–30 秒、不超过 15 MB。
示例
文生视频
{
"model": "seedance-2.5-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "One continuous 30-second story of the same young woman in a yellow raincoat delivering a handwritten letter across a small seaside town at dawn. 0-6s: wide aerial shot of the sleepy harbor town, fishing boats rocking, soft morning light; she rides an old bicycle down a cobblestone hill. 6-12s: tracking shot beside her as she weaves past a fish market, seagulls lifting off, a vendor waves at her. 12-18s: low-angle shot as she climbs a steep stone staircase carrying the bicycle, breathing hard, the letter tucked in her pocket. 18-24s: she knocks on a blue door at the top; an elderly man opens it and she hands him the letter. 24-30s: close-up of the man reading, his eyes filling with tears; he smiles and says softly, \"She remembered.\" Camera slowly pulls back to reveal the sunrise over the sea. Natural ambient sound: waves, gulls, bicycle bell, footsteps, gentle piano music. No subtitles, no on-screen text.",
"duration": 30,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}
首尾帧
{
"model": "seedance-2.5-flash",
"input": {
"prompt": "Locked-off time-lapse of the red lakeside cabin: start from the summer evening in the first frame, let snow gradually cover the shore and the wooden dock as the sky darkens, and end exactly on the snowy night with the aurora in the last frame. Soft wind and crackling ice.",
"image_urls": [
"https://example.com/first-frame.jpg",
"https://example.com/last-frame.jpg"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "auto"
}
}
参考生视频
{
"model": "seedance-2.5-flash",
"input": {
"prompt": "@Image1 is the ginger cat. It wears the yellow knitted scarf from @Image2 and is inside the bookstore from @Image3. On a rainy night the cat walks along a bookshelf, jumps down beside a reading lamp, and looks at the camera. Match the slow, cozy rhythm of @Audio1. No subtitles.",
"reference_image_urls": [
"https://example.com/cat.png",
"https://example.com/scarf.png",
"https://example.com/bookstore.png"
],
"reference_audio_urls": [
"https://example.com/rhythm.mp3"
],
"duration": 6,
"resolution": "480p",
"aspect_ratio": "16:9"
}
}
注意事项
- 参考视频合计最长 30 秒,参考音频合计最长 30 秒,两项总时长都在提交任务时校验。
- 参考素材编号从 1 开始,按对应输入数组的顺序排列。
- 需要
1080p输出时,请使用 Seedance 2.5。 - 所有素材 URL 都必须可通过 HTTP 或 HTTPS 公开访问并可直接下载。
授权
所有 API 接口都需要 Bearer Token 认证。
创建 API Key:登录 PoYo,进入 仪表盘 → API 密钥(poyo.ai/zh/dashboard/api-key),点击创建 Key。
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
响应
任务提交成功
业务状态码。200 表示成功,其他值都表示请求失败。请务必检查这个字段:部分参数校验错误会以 HTTP 200 返回,响应体里的 code 为 400。
200:成功400:请求参数无效401:API Key 缺失或无效402:积分不足403:没有权限404:资源不存在408:请求超时429:请求频率超限500:服务器内部错误502:上游服务错误503:服务暂不可用
详见错误码。
可用选项:
200, 400, 401, 402, 403, 404, 408, 429, 500, 502, 503 示例:
200