POST
/
v1
/
videos
/
extend
拓展已有视频
curl --request POST \
  --url https://suanwuyou.com.cn/v1/videos/extend \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "grok-3-video",
  "prompt": "镜头继续向前推进,建筑灯光逐渐亮起。",
  "video_post_id": "task_example"
}
'
import requests

url = "https://suanwuyou.com.cn/v1/videos/extend"

payload = {
"model": "grok-3-video",
"prompt": "镜头继续向前推进,建筑灯光逐渐亮起。",
"video_post_id": "task_example"
}
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: 'grok-3-video',
prompt: '镜头继续向前推进,建筑灯光逐渐亮起。',
video_post_id: 'task_example'
})
};

fetch('https://suanwuyou.com.cn/v1/videos/extend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://suanwuyou.com.cn/v1/videos/extend"

payload := strings.NewReader("{\n \"model\": \"grok-3-video\",\n \"prompt\": \"镜头继续向前推进,建筑灯光逐渐亮起。\",\n \"video_post_id\": \"task_example\"\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))

}
{
  "id": "<string>",
  "model": "<string>",
  "status": "<string>",
  "created_at": 123,
  "task_id": "<string>",
  "object": "video",
  "progress": 50,
  "completed_at": 123,
  "expires_at": 123,
  "seconds": "<string>",
  "size": "<string>",
  "url": "<string>",
  "video_url": "<string>",
  "output": {
    "url": "<string>"
  },
  "metadata": {},
  "content": {},
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  },
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>"
  }
}
{
"error": {
"message": "请求参数不正确",
"type": "invalid_request_error",
"code": "invalid_parameter"
}
}
{
"error": {
"message": "invalid api key",
"type": "invalid_request_error",
"code": "unauthorized"
}
}
video_post_id 必须是当前令牌可以访问的原视频任务 ID,并且所选模型需要支持视频拓展。

Authorizations

Authorization
string
header
default:Bearer sk-请输入算无忧令牌
required

填写完整的 Bearer 鉴权值,例如 Bearer sk-你的算无忧令牌。

Body

application/json
model
string
required
Example:

"grok-3-video"

prompt
string
required

后续场景提示词。

Example:

"镜头继续向前推进。"

video_post_id
string
required

原视频任务 ID。

Example:

"task_example"

Response

拓展任务已创建。

id
string
required
model
string
required
status
string
required

常见值:queued、processing、in_progress、completed、succeeded、failed、cancelled。

created_at
integer
required
task_id
string
object
string
Example:

"video"

progress
integer
Required range: 0 <= x <= 100
completed_at
integer | null
expires_at
integer | null
seconds
string
size
string
url
string<uri> | null
video_url
string<uri> | null
output
object
metadata
object
content
object
usage
object
error
object | null