AI 服务/视频生成
火山格式创建视频生成任务
接口说明:火山方舟视频生成兼容接口,适用于已经接入火山视频生成 API、希望迁移到 AiToEarn 但不想大改请求结构的客户。参考火山官方文档:创建视频生成任务。
POST
/
api
/
ai
/
v3
/
contents
/
generations
/
tasks
火山格式创建视频生成任务
curl --request POST \
--url https://aitoearn.cn/api/ai/v3/contents/generations/tasks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
'import requests
url = "https://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload = {
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seedance-2-0-260128',
content: [
{
type: 'text',
text: 'Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.'
}
]
})
};
fetch('https://aitoearn.cn/api/ai/v3/contents/generations/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-0-260128\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "6a461da66fe8a12d33daabdd"
}授权
传入从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。示例:Bearer xxx。
请求体
application/json
模型 ID 或 Endpoint ID。
是否返回尾帧图像。
分辨率。
宽高比。
时长(秒)。
随机种子。
是否带水印。
是否生成与画面同步的音频,Seedance 2.0 系列支持。
任务超时阈值(秒),取值范围 [3600, 259200]。
必填范围:
3600 <= x <= 259200任务执行优先级 0-9,数值越大优先级越高,Seedance 2.0 系列支持。
必填范围:
0 <= x <= 9终端用户唯一标识符,原样透传给方舟用于合规检测。
消费来源。
可用选项:
ai_video, ai_draft_generation, plugin 响应
200 - application/json
火山格式原生响应,不使用 AiToEarn 通用响应包裹。
最后修改于 2026年9月29日
⌘I
火山格式创建视频生成任务
curl --request POST \
--url https://aitoearn.cn/api/ai/v3/contents/generations/tasks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
'import requests
url = "https://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload = {
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement."
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'doubao-seedance-2-0-260128',
content: [
{
type: 'text',
text: 'Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.'
}
]
})
};
fetch('https://aitoearn.cn/api/ai/v3/contents/generations/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/ai/v3/contents/generations/tasks"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-0-260128\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Create a cinematic product video with close-up shots, soft studio lighting, and smooth camera movement.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "6a461da66fe8a12d33daabdd"
}
