Background texture

GET /v1/queue/{model}/requests/{requestID}/content/{index}

GET/v1/queue/{model}/requests/{requestID}/content/{index}

以二进制流形式下载生成的视频。url 值在队列结果响应中返回。

请求

路径参数

参数类型描述
modelstring视频模型 ID(如 veo-3)。
requestIDstring来自结果 data[].url 的内容专用 ID。
indexinteger视频的从零开始的索引。

请求头

请求头
AuthorizationBearer {api_key}

此端点中的 requestID 与状态/结果端点中使用的不同。它是嵌入在结果端点返回的 data[].url 中的内容专用 ID。直接使用 url 值即可。


响应

响应头:

Content-Type: video/mp4
Content-Disposition: inline; filename="video-0.mp4"

响应体: 原始二进制视频数据(MP4)。


状态码

状态码描述
200成功 — 二进制视频流
400无效的请求 ID 或内容索引
401未授权
502从上游供应商下载失败

示例

# 直接使用结果响应中的 url
curl -o video.mp4 \
  "https://api.modelmax.io/v1/queue/veo-3/requests/{content_id}/content/0" \
  -H "Authorization: Bearer $MODELMAX_API_KEY"
import requests

BASE = "https://api.modelmax.io"
headers = {"Authorization": "Bearer your-key"}

# result["data"][0]["url"] 包含完整的相对路径
video_resp = requests.get(
    f"{BASE}{result['data'][0]['url']}",
    headers=headers,
)

with open("video.mp4", "wb") as f:
    f.write(video_resp.content)

print(f"Saved video.mp4 ({len(video_resp.content)} bytes)")
import { writeFile } from "fs/promises";

const videoResp = await fetch(`${BASE_URL}${result.data[0].url}`, {
  headers: { Authorization: `Bearer ${API_KEY}` },
});

const buffer = Buffer.from(await videoResp.arrayBuffer());
await writeFile("video.mp4", buffer);
console.log(`Saved video.mp4 (${buffer.length} bytes)`);