创建视频
curl --request POST \
--url https://octopusx.ai/v1/video/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"images": [
"<string>"
],
"aspect_ratio": "<string>",
"size": "<string>"
}
'import requests
url = "https://octopusx.ai/v1/video/create"
payload = {
"model": "<string>",
"prompt": "<string>",
"images": ["<string>"],
"aspect_ratio": "<string>",
"size": "<string>"
}
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: '<string>',
prompt: '<string>',
images: ['<string>'],
aspect_ratio: '<string>',
size: '<string>'
})
};
fetch('https://octopusx.ai/v1/video/create', 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://octopusx.ai/v1/video/create",
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' => '<string>',
'prompt' => '<string>',
'images' => [
'<string>'
],
'aspect_ratio' => '<string>',
'size' => '<string>'
]),
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://octopusx.ai/v1/video/create"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"aspect_ratio\": \"<string>\",\n \"size\": \"<string>\"\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://octopusx.ai/v1/video/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"aspect_ratio\": \"<string>\",\n \"size\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/v1/video/create")
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\": \"<string>\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"aspect_ratio\": \"<string>\",\n \"size\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2025-11-08T23:07:57.510141923+08:00",
"status": "processing",
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
}
统一视频
创建视频
使用 POST /v1/video/create 通过统一视频格式提交即梦异步生成任务。
POST
https://octopusx.ai
/
v1
/
video
/
create
创建视频
curl --request POST \
--url https://octopusx.ai/v1/video/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"images": [
"<string>"
],
"aspect_ratio": "<string>",
"size": "<string>"
}
'import requests
url = "https://octopusx.ai/v1/video/create"
payload = {
"model": "<string>",
"prompt": "<string>",
"images": ["<string>"],
"aspect_ratio": "<string>",
"size": "<string>"
}
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: '<string>',
prompt: '<string>',
images: ['<string>'],
aspect_ratio: '<string>',
size: '<string>'
})
};
fetch('https://octopusx.ai/v1/video/create', 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://octopusx.ai/v1/video/create",
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' => '<string>',
'prompt' => '<string>',
'images' => [
'<string>'
],
'aspect_ratio' => '<string>',
'size' => '<string>'
]),
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://octopusx.ai/v1/video/create"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"aspect_ratio\": \"<string>\",\n \"size\": \"<string>\"\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://octopusx.ai/v1/video/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"aspect_ratio\": \"<string>\",\n \"size\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/v1/video/create")
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\": \"<string>\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"aspect_ratio\": \"<string>\",\n \"size\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2025-11-08T23:07:57.510141923+08:00",
"status": "processing",
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
}
创建视频
即梦统一视频入口使用POST /v1/video/create,请求体为 JSON。与 OpenAI 格式的即梦视频生成 不同,本接口使用 images、aspect_ratio、size、duration 等字段。
- 路由入口是
POST /v1/video/create。 - 参考图通过
images数组传入 URL 列表,文生视频可传空数组。 - 常见模型示例为
jimeng-video-3.0,以当前渠道实际可用模型为准。 - 提交成功后返回任务
id与status,后续用 查询任务 轮询结果。
支持模型
jimeng-video-3.0jimeng-video-2.0
方法与路径
POST /v1/video/create
请求示例
curl -X POST https://octopusx.ai/v1/video/create \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jimeng-video-3.0",
"prompt": "cat fish",
"aspect_ratio": "16:9",
"size": "1080P",
"images": []
}'
import requests
resp = requests.post(
"https://octopusx.ai/v1/video/create",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "jimeng-video-3.0",
"prompt": "cat fish",
"aspect_ratio": "16:9",
"size": "1080P",
"images": [],
},
timeout=60,
)
print(resp.json())
const response = await fetch("https://octopusx.ai/v1/video/create", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jimeng-video-3.0",
prompt: "cat fish",
aspect_ratio: "16:9",
size: "1080P",
images: [],
}),
});
console.log(await response.json());
响应示例
{
"created_at": "2025-11-08T23:07:57.510141923+08:00",
"status": "processing",
"task_id": "48038932-0ff5-4251-8b4b-7a76c09fd114"
}
认证
Authorization: Bearer YOUR_API_KEY
Body
模型名称,例如
jimeng-video-3.0。提示词。生成视频的文本描述,支持中文和英文。
图片链接列表。文生视频传
[],首帧生视频传 1 张图片,首尾帧生视频传 2 张图片。支持图片 URL,图片格式包括 png、jpeg、jpg、webp。画幅比例。可选值包括
16:9、4:3、1:1、3:4、9:16、21:9。视频尺寸。可选值包括
720P、1080P。Response
创建时间(ISO 8601 格式)。
任务状态,常见值包括
processing、failed、completed。任务 ID,后续查询时作为
id 参数传入。相关接口
⌘I