curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.5",
"content": [
{
"type": "text",
"text": "电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/character.jpg"
},
"role": "reference_image"
}
],
"callback_url": "<string>",
"execution_expires_after": 172800,
"priority": 0,
"safety_identifier": "<string>",
"seed": -1,
"service_tier": "default",
"generate_audio": true,
"resolution": "720p",
"ratio": "adaptive",
"duration": -1,
"output_format": "mp4",
"tools": [
{
"type": "web_search"
}
],
"watermark": false,
"return_last_frame": false
}
'import requests
url = "https://www.anyfast.ai/v1/video/generations"
payload = {
"model": "seedance-2.5",
"content": [
{
"type": "text",
"text": "电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/character.jpg" },
"role": "reference_image"
}
],
"callback_url": "<string>",
"execution_expires_after": 172800,
"priority": 0,
"safety_identifier": "<string>",
"seed": -1,
"service_tier": "default",
"generate_audio": True,
"resolution": "720p",
"ratio": "adaptive",
"duration": -1,
"output_format": "mp4",
"tools": [{ "type": "web_search" }],
"watermark": False,
"return_last_frame": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance-2.5',
content: [
{type: 'text', text: '电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道'},
{
type: 'image_url',
image_url: {url: 'https://example.com/character.jpg'},
role: 'reference_image'
}
],
callback_url: '<string>',
execution_expires_after: 172800,
priority: 0,
safety_identifier: '<string>',
seed: -1,
service_tier: 'default',
generate_audio: true,
resolution: '720p',
ratio: 'adaptive',
duration: -1,
output_format: 'mp4',
tools: [{type: 'web_search'}],
watermark: false,
return_last_frame: false
})
};
fetch('https://www.anyfast.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.anyfast.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'seedance-2.5',
'content' => [
[
'type' => 'text',
'text' => '电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道'
],
[
'type' => 'image_url',
'image_url' => [
'url' => 'https://example.com/character.jpg'
],
'role' => 'reference_image'
]
],
'callback_url' => '<string>',
'execution_expires_after' => 172800,
'priority' => 0,
'safety_identifier' => '<string>',
'seed' => -1,
'service_tier' => 'default',
'generate_audio' => true,
'resolution' => '720p',
'ratio' => 'adaptive',
'duration' => -1,
'output_format' => 'mp4',
'tools' => [
[
'type' => 'web_search'
]
],
'watermark' => false,
'return_last_frame' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.anyfast.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"seedance-2.5\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/character.jpg\"\n },\n \"role\": \"reference_image\"\n }\n ],\n \"callback_url\": \"<string>\",\n \"execution_expires_after\": 172800,\n \"priority\": 0,\n \"safety_identifier\": \"<string>\",\n \"seed\": -1,\n \"service_tier\": \"default\",\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": -1,\n \"output_format\": \"mp4\",\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false,\n \"return_last_frame\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://www.anyfast.ai/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedance-2.5\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/character.jpg\"\n },\n \"role\": \"reference_image\"\n }\n ],\n \"callback_url\": \"<string>\",\n \"execution_expires_after\": 172800,\n \"priority\": 0,\n \"safety_identifier\": \"<string>\",\n \"seed\": -1,\n \"service_tier\": \"default\",\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": -1,\n \"output_format\": \"mp4\",\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false,\n \"return_last_frame\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"seedance-2.5\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/character.jpg\"\n },\n \"role\": \"reference_image\"\n }\n ],\n \"callback_url\": \"<string>\",\n \"execution_expires_after\": 172800,\n \"priority\": 0,\n \"safety_identifier\": \"<string>\",\n \"seed\": -1,\n \"service_tier\": \"default\",\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": -1,\n \"output_format\": \"mp4\",\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false,\n \"return_last_frame\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E",
"task_id": "asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E",
"object": "video",
"model": "seedance-2.5",
"status": "queued",
"progress": 0,
"created_at": 1786084139
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}seedance-2.5
使用文本、图片、视频和音频参考创建 Seedance 2.5 视频生成任务。
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedance-2.5",
"content": [
{
"type": "text",
"text": "电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/character.jpg"
},
"role": "reference_image"
}
],
"callback_url": "<string>",
"execution_expires_after": 172800,
"priority": 0,
"safety_identifier": "<string>",
"seed": -1,
"service_tier": "default",
"generate_audio": true,
"resolution": "720p",
"ratio": "adaptive",
"duration": -1,
"output_format": "mp4",
"tools": [
{
"type": "web_search"
}
],
"watermark": false,
"return_last_frame": false
}
'import requests
url = "https://www.anyfast.ai/v1/video/generations"
payload = {
"model": "seedance-2.5",
"content": [
{
"type": "text",
"text": "电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道"
},
{
"type": "image_url",
"image_url": { "url": "https://example.com/character.jpg" },
"role": "reference_image"
}
],
"callback_url": "<string>",
"execution_expires_after": 172800,
"priority": 0,
"safety_identifier": "<string>",
"seed": -1,
"service_tier": "default",
"generate_audio": True,
"resolution": "720p",
"ratio": "adaptive",
"duration": -1,
"output_format": "mp4",
"tools": [{ "type": "web_search" }],
"watermark": False,
"return_last_frame": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'seedance-2.5',
content: [
{type: 'text', text: '电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道'},
{
type: 'image_url',
image_url: {url: 'https://example.com/character.jpg'},
role: 'reference_image'
}
],
callback_url: '<string>',
execution_expires_after: 172800,
priority: 0,
safety_identifier: '<string>',
seed: -1,
service_tier: 'default',
generate_audio: true,
resolution: '720p',
ratio: 'adaptive',
duration: -1,
output_format: 'mp4',
tools: [{type: 'web_search'}],
watermark: false,
return_last_frame: false
})
};
fetch('https://www.anyfast.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.anyfast.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'seedance-2.5',
'content' => [
[
'type' => 'text',
'text' => '电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道'
],
[
'type' => 'image_url',
'image_url' => [
'url' => 'https://example.com/character.jpg'
],
'role' => 'reference_image'
]
],
'callback_url' => '<string>',
'execution_expires_after' => 172800,
'priority' => 0,
'safety_identifier' => '<string>',
'seed' => -1,
'service_tier' => 'default',
'generate_audio' => true,
'resolution' => '720p',
'ratio' => 'adaptive',
'duration' => -1,
'output_format' => 'mp4',
'tools' => [
[
'type' => 'web_search'
]
],
'watermark' => false,
'return_last_frame' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.anyfast.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"seedance-2.5\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/character.jpg\"\n },\n \"role\": \"reference_image\"\n }\n ],\n \"callback_url\": \"<string>\",\n \"execution_expires_after\": 172800,\n \"priority\": 0,\n \"safety_identifier\": \"<string>\",\n \"seed\": -1,\n \"service_tier\": \"default\",\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": -1,\n \"output_format\": \"mp4\",\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false,\n \"return_last_frame\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://www.anyfast.ai/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"seedance-2.5\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/character.jpg\"\n },\n \"role\": \"reference_image\"\n }\n ],\n \"callback_url\": \"<string>\",\n \"execution_expires_after\": 172800,\n \"priority\": 0,\n \"safety_identifier\": \"<string>\",\n \"seed\": -1,\n \"service_tier\": \"default\",\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": -1,\n \"output_format\": \"mp4\",\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false,\n \"return_last_frame\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"seedance-2.5\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/character.jpg\"\n },\n \"role\": \"reference_image\"\n }\n ],\n \"callback_url\": \"<string>\",\n \"execution_expires_after\": 172800,\n \"priority\": 0,\n \"safety_identifier\": \"<string>\",\n \"seed\": -1,\n \"service_tier\": \"default\",\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": -1,\n \"output_format\": \"mp4\",\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false,\n \"return_last_frame\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E",
"task_id": "asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E",
"object": "video",
"model": "seedance-2.5",
"status": "queued",
"progress": 0,
"created_at": 1786084139
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
AnyFast 模型 ID。
seedance-2.5 "seedance-2.5"
输入内容。可选文本提示词放在第一项,后面依次放媒体素材。Seedance 2.5 最多支持 30 张参考图、10 个参考视频和 10 段参考音频;视频和音频素材各自的总时长不得超过 30 秒。完整请求体不得超过 64 MB,大文件不要使用 Base64。
1 - 51 elementsShow child attributes
Show child attributes
[ { "type": "text", "text": "电影感跟拍镜头,@图像1 中的人物走过雨夜霓虹街道" }, { "type": "image_url", "image_url": { "url": "https://example.com/character.jpg" }, "role": "reference_image" } ]
可选回调地址。异步任务状态变化时,平台会向此地址发送 POST 通知。
排队中或运行中的任务在过期前允许执行的最长时间,单位为秒。
任务执行优先级。
用于安全追踪的稳定终端用户标识。
随机种子;-1 表示使用随机种子。
任务服务等级。
生成同步台词、音效和背景音。
输出视频分辨率。
480p, 720p 输出宽高比。文生视频和普通参考生视频使用 adaptive 时会自动选择合适的宽高比;编辑和延长任务跟随目标视频;首帧任务跟随首帧图片。视频编辑、视频延长以及首帧/首尾帧任务必须使用 adaptive。
21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive 输出时长,单位为秒。-1 表示由模型在 4–30 秒内自动选择;视频编辑必须使用 -1 并跟随源视频时长,最多可能比源视频短 0.4 秒;视频延长和首帧/首尾帧生成可使用 -1 或 4–30。
-1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 输出容器。MOV 使用 H.264/yuv444p 视频和 PCM 音频,适合后续编辑。
mp4, mov 可选生成工具。文生视频支持联网搜索。
Show child attributes
Show child attributes
是否在右下角添加“AI 生成”水印。
是否返回生成视频的最后一帧图片。
响应
视频生成任务已创建
用于轮询的任务 ID。
"asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E"
任务 ID,与 id 相同。
"asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E"
video "video"
seedance-2.5 "seedance-2.5"
异步任务的初始状态。
queued "queued"
初始任务进度百分比。
0
Unix 时间戳。
1786084139
此页面对您有帮助吗?