提交即梦视频任务
curl --request POST \
--url https://api.aiohub.org/jimeng/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"req_key": "doubao-seedance-2-0-fast-260128",
"prompt": "A blue ceramic cup on a wooden table in daylight.",
"frames": 121,
"aspect_ratio": "16:9",
"seed": -1
}
'import requests
url = "https://api.aiohub.org/jimeng/"
payload = {
"req_key": "doubao-seedance-2-0-fast-260128",
"prompt": "A blue ceramic cup on a wooden table in daylight.",
"frames": 121,
"aspect_ratio": "16:9",
"seed": -1
}
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({
req_key: 'doubao-seedance-2-0-fast-260128',
prompt: 'A blue ceramic cup on a wooden table in daylight.',
frames: 121,
aspect_ratio: '16:9',
seed: -1
})
};
fetch('https://api.aiohub.org/jimeng/', 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.aiohub.org/jimeng/",
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([
'req_key' => 'doubao-seedance-2-0-fast-260128',
'prompt' => 'A blue ceramic cup on a wooden table in daylight.',
'frames' => 121,
'aspect_ratio' => '16:9',
'seed' => -1
]),
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.aiohub.org/jimeng/"
payload := strings.NewReader("{\n \"req_key\": \"doubao-seedance-2-0-fast-260128\",\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\",\n \"frames\": 121,\n \"aspect_ratio\": \"16:9\",\n \"seed\": -1\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.aiohub.org/jimeng/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"req_key\": \"doubao-seedance-2-0-fast-260128\",\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\",\n \"frames\": 121,\n \"aspect_ratio\": \"16:9\",\n \"seed\": -1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiohub.org/jimeng/")
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 \"req_key\": \"doubao-seedance-2-0-fast-260128\",\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\",\n \"frames\": 121,\n \"aspect_ratio\": \"16:9\",\n \"seed\": -1\n}"
response = http.request(request)
puts response.read_body{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "doubao-seedance-2-0-fast-260128",
"status": "queued",
"progress": 0,
"created_at": 1791275108
}{
"code": "invalid_duration",
"message": "duration must be between 4 and 30 seconds for this model"
}创建视频 · 即梦兼容
使用即梦兼容格式提交 Seedance 视频任务,查看示例、输入限制和完整参数。
POST
/
jimeng
/
提交即梦视频任务
curl --request POST \
--url https://api.aiohub.org/jimeng/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"req_key": "doubao-seedance-2-0-fast-260128",
"prompt": "A blue ceramic cup on a wooden table in daylight.",
"frames": 121,
"aspect_ratio": "16:9",
"seed": -1
}
'import requests
url = "https://api.aiohub.org/jimeng/"
payload = {
"req_key": "doubao-seedance-2-0-fast-260128",
"prompt": "A blue ceramic cup on a wooden table in daylight.",
"frames": 121,
"aspect_ratio": "16:9",
"seed": -1
}
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({
req_key: 'doubao-seedance-2-0-fast-260128',
prompt: 'A blue ceramic cup on a wooden table in daylight.',
frames: 121,
aspect_ratio: '16:9',
seed: -1
})
};
fetch('https://api.aiohub.org/jimeng/', 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.aiohub.org/jimeng/",
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([
'req_key' => 'doubao-seedance-2-0-fast-260128',
'prompt' => 'A blue ceramic cup on a wooden table in daylight.',
'frames' => 121,
'aspect_ratio' => '16:9',
'seed' => -1
]),
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.aiohub.org/jimeng/"
payload := strings.NewReader("{\n \"req_key\": \"doubao-seedance-2-0-fast-260128\",\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\",\n \"frames\": 121,\n \"aspect_ratio\": \"16:9\",\n \"seed\": -1\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.aiohub.org/jimeng/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"req_key\": \"doubao-seedance-2-0-fast-260128\",\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\",\n \"frames\": 121,\n \"aspect_ratio\": \"16:9\",\n \"seed\": -1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiohub.org/jimeng/")
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 \"req_key\": \"doubao-seedance-2-0-fast-260128\",\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\",\n \"frames\": 121,\n \"aspect_ratio\": \"16:9\",\n \"seed\": -1\n}"
response = http.request(request)
puts response.read_body{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "doubao-seedance-2-0-fast-260128",
"status": "queued",
"progress": 0,
"created_at": 1791275108
}{
"code": "invalid_duration",
"message": "duration must be between 4 and 30 seconds for this model"
}已有即梦 CVSync2Async 客户端时,可以复用以下请求字段。你需要改用 AIOHub API 令牌,将
提交响应是 OpenAI 视频对象,关键字段如下。保存顶层
拿到任务标识后,转到 查询任务。
req_key 改为 Seedance 模型名,并按本页适配响应解析。提交与查询的响应不同,不是完整的即梦官方 API。
接入配置
服务地址为https://api.aiohub.org。所有请求使用 Authorization: Bearer <AIOHUB_API_KEY>,替换为完整 sk- API 令牌,不使用即梦的签名鉴权。令牌分组需能访问所选模型。
请求示例
curl "https://api.aiohub.org/jimeng/?Action=CVSync2AsyncSubmitTask&Version=2022-08-31" \
-H "Authorization: Bearer <AIOHUB_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"req_key": "doubao-seedance-2-0-fast-260128",
"prompt": "A blue ceramic cup on a wooden table in daylight.",
"frames": 121,
"aspect_ratio": "16:9",
"seed": -1
}'
task_id,不要从 data.task_id 读取。
{"id": "task_example", "task_id": "task_example", "object": "video", "status": "queued"}
参数范围
输出固定为 720p。需要其他分辨率、参考音频或视频编辑时,使用 Ark / Seedance。授权
API key (sk-xxx)
查询参数
操作名称,使用此页的固定值。
可用选项:
CVSync2AsyncSubmitTask 协议版本。
可用选项:
2022-08-31 请求体
application/json
完整 Seedance 模型名。
示例:
"doubao-seedance-2-0-fast-260128"
提示词,纯文本生成时必填。
一张首帧图或首帧加尾帧。不能与 binary_data_base64 同时使用。
Maximum array length:
2首帧或首尾帧的 base64 图片内容,不带 data URL 前缀。
Maximum array length:
2121 为 5 秒,241 为 10 秒。
可用选项:
121, 241 文生视频使用该比例;有图片输入时跟随图片。
可用选项:
16:9, 4:3, 1:1, 3:4, 9:16, 21:9 仅支持随机种子 -1。
可用选项:
-1