> ## Documentation Index
> Fetch the complete documentation index at: https://docs.socialvision.tisyk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# 统一视频 VEO 接口参考

> Google VEO 统一格式视频生成与轮询

## 查询视频任务

`GET /v1/video/query`

VEO 统一视频链路 · 查询任务状态与结果（`GET /v1/video/query`）。Omni-Flash 任务亦经此路由轮询。

### 请求参数 (Query / Path)

<ParamField query="id" type="string" required>
  创建任务时返回的 id
</ParamField>

<ParamField query="model" type="string">
  模型名称（部分场景需要）
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/v1/video/query" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "enhanced_prompt": "string",
  "id": "string",
  "progress": 0,
  "status": "pending",
  "status_update_time": 0,
  "video_url": "string"
}
```

***

## 创建视频生成任务

`POST /v1/video/create`

统一视频创建入口（VEO relay · `POST /v1/video/create`）。支持 VEO / Sora-2 / Grok-Video 等，通过 `model` 字段区分。
Omni-Flash 模型参数与示例见 `relay/omni`（共用此物理路由）。
提交后返回 `id`，通过 `GET /v1/video/query` 轮询。

### 请求体参数 (Body)

<ParamField body="aspect_ratio" type="string">
  宽高比（VEO 系列）
</ParamField>

<ParamField body="duration" type="any">
  视频时长（秒）
</ParamField>

<ParamField body="enable_upsample" type="boolean">
  是否启用上采样（VEO）
</ParamField>

<ParamField body="enhance_prompt" type="boolean">
  是否自动优化提示词（VEO）
</ParamField>

<ParamField body="images" type="array">
  参考图片 URL 列表（图生视频）
</ParamField>

<ParamField body="model" type="string" required>
  模型名称
</ParamField>

<ParamField body="orientation" type="string">
  方向（Sora-2）
</ParamField>

<ParamField body="prompt" type="string" required>
  视频内容描述
</ParamField>

<ParamField body="seconds" type="any">
  时长兼容字段
</ParamField>

<ParamField body="size" type="string">
  清晰度（Sora-2）
</ParamField>

<ParamField body="type" type="any">
  Omni 系列任务类型
</ParamField>

<ParamField body="watermark" type="boolean">
  是否添加水印；false=不添加
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "aspect_ratio": "16:9",
  "enhance_prompt": true,
  "model": "veo3",
  "prompt": "A majestic eagle soaring over mountains at sunset"
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/v1/video/create" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "aspect_ratio": "16:9",
  "enhance_prompt": true,
  "model": "veo3",
  "prompt": "A majestic eagle soaring over mountains at sunset"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "task_id": "task_example_001"
  },
  "message": "success"
}
```

***

## 延长视频

`POST /v1/video/extend`

VEO 统一视频链路 · 延长已有视频（`POST /v1/video/extend`）。Grok-Video 等 extend 亦经此入口（按 `model` 区分）；Omni 不使用此路径。

### 请求体参数 (Body)

<ParamField body="model" type="string" required>
  模型名称
</ParamField>

<ParamField body="parent_post_id" type="string">
  父级帖子 ID（Grok-Video）
</ParamField>

<ParamField body="prompt" type="string">
  延长部分描述
</ParamField>

<ParamField body="task_id" type="string" required>
  原视频任务 ID
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "model": "grok-video",
  "prompt": "Continue the scene with the eagle landing",
  "task_id": "task_abc123"
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/v1/video/extend" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-video",
  "prompt": "Continue the scene with the eagle landing",
  "task_id": "task_abc123"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "enhanced_prompt": "string",
  "id": "string",
  "progress": 0,
  "status": "pending",
  "status_update_time": 0,
  "video_url": "string"
}
```

***

## 视频生成 veo-3.1-generate-preview

`POST /v1/video/generations`

VEO 统一视频链路 · Veo 3.1 视频生成（`POST /v1/video/generations`），提交后通过 `GET /v1/video/query` 轮询。

### 请求参数 (Query / Path)

<ParamField header="Content-Type" type="string">
  请求体 Content-Type，一般为 application/json
</ParamField>

<ParamField header="Authorization" type="string">
  Bearer API Key
</ParamField>

### 请求体参数 (Body)

<ParamField body="image" type="any">
  参考图（图生视频，可选；URL 或 base64）
</ParamField>

<ParamField body="metadata" type="object">
  Veo 生成参数（透传到上游 parameters）
</ParamField>

<ParamField body="model" type="string" required>
  模型名称。枚举值：
  veo-3.1-generate-preview
  veo-3.1-fast-generate-preview
  veo-3.0-generate-001
  veo-3.0-fast-generate-001
</ParamField>

<ParamField body="prompt" type="string" required>
  视频内容描述（必填）
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "metadata": {
    "aspectRatio": "16:9",
    "durationSeconds": 6
  },
  "model": "veo-3.1-fast-generate-preview",
  "prompt": "A close up of two people staring at a cryptic drawing on a wall"
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/v1/video/generations" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "aspectRatio": "16:9",
    "durationSeconds": 6
  },
  "model": "veo-3.1-fast-generate-preview",
  "prompt": "A close up of two people staring at a cryptic drawing on a wall"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "task_id": "task_example_001"
  },
  "message": "success"
}
```

***

## 视频生成 veo-3.1-fast-generate-preview

`POST /v1beta/models/veo-3.1-fast-generate-preview:predictLongRunning`

Gemini 风格 Veo 3.1 fast 长任务视频生成（predictLongRunning），异步返回 operation 名称。

### 请求参数 (Query / Path)

<ParamField header="Content-Type" type="string">
  请求体 Content-Type，一般为 application/json
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/v1beta/models/veo-3.1-fast-generate-preview:predictLongRunning" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "task_id": "task_example_001"
  },
  "message": "success"
}
```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.