视频Remix
curl --request POST \
--url https://octopusx.ai/v1/videos/{video_id}/remix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"aspect_ratio": "<string>",
"parent_post_id": "<string>"
}
'import requests
url = "https://octopusx.ai/v1/videos/{video_id}/remix"
payload = {
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"aspect_ratio": "<string>",
"parent_post_id": "<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>',
size: '<string>',
aspect_ratio: '<string>',
parent_post_id: '<string>'
})
};
fetch('https://octopusx.ai/v1/videos/{video_id}/remix', 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/videos/{video_id}/remix",
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>',
'size' => '<string>',
'aspect_ratio' => '<string>',
'parent_post_id' => '<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/videos/{video_id}/remix"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"parent_post_id\": \"<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/videos/{video_id}/remix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"parent_post_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/v1/videos/{video_id}/remix")
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 \"size\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"parent_post_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
"status": "processing",
"status_update_time": 1762685256
}
OpenAI 格式
视频Remix
使用 POST /v1/videos/{video_id}/remix 基于已有 Grok 视频任务提交 remix。
POST
https://octopusx.ai
/
v1
/
videos
/
{video_id}
/
remix
视频Remix
curl --request POST \
--url https://octopusx.ai/v1/videos/{video_id}/remix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"aspect_ratio": "<string>",
"parent_post_id": "<string>"
}
'import requests
url = "https://octopusx.ai/v1/videos/{video_id}/remix"
payload = {
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"aspect_ratio": "<string>",
"parent_post_id": "<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>',
size: '<string>',
aspect_ratio: '<string>',
parent_post_id: '<string>'
})
};
fetch('https://octopusx.ai/v1/videos/{video_id}/remix', 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/videos/{video_id}/remix",
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>',
'size' => '<string>',
'aspect_ratio' => '<string>',
'parent_post_id' => '<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/videos/{video_id}/remix"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"parent_post_id\": \"<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/videos/{video_id}/remix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"parent_post_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octopusx.ai/v1/videos/{video_id}/remix")
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 \"size\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"parent_post_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
"status": "processing",
"status_update_time": 1762685256
}
视频Remix
OpenAI 格式入口。统一视频请使用 视频Remix(统一视频)(POST /v1/video/remix,Body 传 task_id)。
在已有 Grok 视频任务基础上,通过 POST /v1/videos/{video_id}/remix 提交 remix 任务,用新的提示词与画幅参数生成变体。
- 路径参数
video_id为原始视频任务 ID。 - 请求体为 JSON,需同时提供
model、prompt、size、aspect_ratio。 - 提交成功后返回新任务
id与status,请用 Grok 任务查询 或统一视频的 查询任务 轮询(取决于原任务所属链路)。
方法与路径
POST /v1/videos/{video_id}/remix
请求示例
curl -X POST https://octopusx.ai/v1/videos/grok:48a67431-0708-46d1-9ab9-83cb84700153/remix \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"model": "grok-video-3",
"prompt": "play with another white cat",
"aspect_ratio": "3:2",
"size": "1080P",
"parent_post_id": "5afc6f67-23fe-4a74-a073-727ff662f870"
}'
import requests
video_id = "grok:48a67431-0708-46d1-9ab9-83cb84700153"
resp = requests.post(
f"https://octopusx.ai/v1/videos/{video_id}/remix",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
"Accept": "application/json",
},
json={
"model": "grok-video-3",
"prompt": "play with another white cat",
"aspect_ratio": "3:2",
"size": "1080P",
"parent_post_id": "5afc6f67-23fe-4a74-a073-727ff662f870",
},
timeout=60,
)
print(resp.json())
const videoId = "grok:48a67431-0708-46d1-9ab9-83cb84700153";
const response = await fetch(
`https://octopusx.ai/v1/videos/${encodeURIComponent(videoId)}/remix`,
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({
model: "grok-video-3",
prompt: "play with another white cat",
aspect_ratio: "3:2",
size: "1080P",
parent_post_id: "5afc6f67-23fe-4a74-a073-727ff662f870",
}),
}
);
console.log(await response.json());
响应示例
{
"id": "grok:48a67431-0708-46d1-9ab9-83cb84700153",
"status": "processing",
"status_update_time": 1762685256
}
认证
Authorization: Bearer YOUR_API_KEY
Path Parameters
Body
模型名称,例如
grok-video-3。Remix 提示词,描述希望如何改写或延续原视频内容。
分辨率规格,传
720P 或 1080P。视频比例,可选
2:3、3:2、1:1。父任务 ID。
Response
新 remix 任务 ID。
任务状态,常见值包括
processing、completed、failed。状态最近更新时间(Unix 时间戳)。
相关接口
⌘I