创建视频任务
curl --request POST \
--url https://api.upmore.net/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-0",
"content": [
{
"type": "text",
"text": "A cat playing piano in a sunlit room, cinematic lighting"
}
],
"generate_audio": true,
"resolution": "720p",
"ratio": "adaptive",
"duration": 5,
"tools": [
{
"type": "web_search"
}
],
"watermark": false
}
'import requests
url = "https://api.upmore.net/v1/video/generations"
payload = {
"model": "doubao-seedance-2-0",
"content": [
{
"type": "text",
"text": "A cat playing piano in a sunlit room, cinematic lighting"
}
],
"generate_audio": True,
"resolution": "720p",
"ratio": "adaptive",
"duration": 5,
"tools": [{ "type": "web_search" }],
"watermark": 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: 'doubao-seedance-2-0',
content: [
{type: 'text', text: 'A cat playing piano in a sunlit room, cinematic lighting'}
],
generate_audio: true,
resolution: '720p',
ratio: 'adaptive',
duration: 5,
tools: [{type: 'web_search'}],
watermark: false
})
};
fetch('https://api.upmore.net/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://api.upmore.net/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' => 'doubao-seedance-2-0',
'content' => [
[
'type' => 'text',
'text' => 'A cat playing piano in a sunlit room, cinematic lighting'
]
],
'generate_audio' => true,
'resolution' => '720p',
'ratio' => 'adaptive',
'duration' => 5,
'tools' => [
[
'type' => 'web_search'
]
],
'watermark' => 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://api.upmore.net/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-0\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"A cat playing piano in a sunlit room, cinematic lighting\"\n }\n ],\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": 5,\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": 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://api.upmore.net/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedance-2-0\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"A cat playing piano in a sunlit room, cinematic lighting\"\n }\n ],\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": 5,\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upmore.net/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\": \"doubao-seedance-2-0\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"A cat playing piano in a sunlit room, cinematic lighting\"\n }\n ],\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": 5,\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"task_id": "asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}ByteDance
创建视频任务
创建异步视频生成任务。用任务查询接口轮询结果,生成通常需要 1–5 分钟。
POST
/
v1
/
video
/
generations
创建视频任务
curl --request POST \
--url https://api.upmore.net/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seedance-2-0",
"content": [
{
"type": "text",
"text": "A cat playing piano in a sunlit room, cinematic lighting"
}
],
"generate_audio": true,
"resolution": "720p",
"ratio": "adaptive",
"duration": 5,
"tools": [
{
"type": "web_search"
}
],
"watermark": false
}
'import requests
url = "https://api.upmore.net/v1/video/generations"
payload = {
"model": "doubao-seedance-2-0",
"content": [
{
"type": "text",
"text": "A cat playing piano in a sunlit room, cinematic lighting"
}
],
"generate_audio": True,
"resolution": "720p",
"ratio": "adaptive",
"duration": 5,
"tools": [{ "type": "web_search" }],
"watermark": 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: 'doubao-seedance-2-0',
content: [
{type: 'text', text: 'A cat playing piano in a sunlit room, cinematic lighting'}
],
generate_audio: true,
resolution: '720p',
ratio: 'adaptive',
duration: 5,
tools: [{type: 'web_search'}],
watermark: false
})
};
fetch('https://api.upmore.net/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://api.upmore.net/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' => 'doubao-seedance-2-0',
'content' => [
[
'type' => 'text',
'text' => 'A cat playing piano in a sunlit room, cinematic lighting'
]
],
'generate_audio' => true,
'resolution' => '720p',
'ratio' => 'adaptive',
'duration' => 5,
'tools' => [
[
'type' => 'web_search'
]
],
'watermark' => 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://api.upmore.net/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"doubao-seedance-2-0\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"A cat playing piano in a sunlit room, cinematic lighting\"\n }\n ],\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": 5,\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": 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://api.upmore.net/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"doubao-seedance-2-0\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"A cat playing piano in a sunlit room, cinematic lighting\"\n }\n ],\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": 5,\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upmore.net/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\": \"doubao-seedance-2-0\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"A cat playing piano in a sunlit room, cinematic lighting\"\n }\n ],\n \"generate_audio\": true,\n \"resolution\": \"720p\",\n \"ratio\": \"adaptive\",\n \"duration\": 5,\n \"tools\": [\n {\n \"type\": \"web_search\"\n }\n ],\n \"watermark\": false\n}"
response = http.request(request)
puts response.read_body{
"task_id": "asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
使用的视频生成模型。
可用选项:
doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-2-0-mini 示例:
"doubao-seedance-2-0"
输入内容数组。文生视频只需一个 text 项;图生视频、多模态参考、视频编辑/延展需追加 image_url / video_url / audio_url 项。首帧、首尾帧、多模态参考三种模式互斥。
Show child attributes
Show child attributes
示例:
[
{
"type": "text",
"text": "A cat playing piano in a sunlit room, cinematic lighting"
}
]生成同步的人声、音效和背景音乐。
输出分辨率。
可用选项:
480p, 720p, 1080p 输出画面比例。
可用选项:
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive 视频时长(秒)。
必填范围:
4 <= x <= 15开启联网搜索增强生成(仅文生视频)。
Show child attributes
Show child attributes
输出视频添加水印。
响应
任务创建成功
平台任务 ID,传给任务查询接口。
示例:
"asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E"
⌘I