> ## 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.

# Omni 视频接口参考

> Omni 视频生成与多模态处理接口

## 查询结果

`GET /v1/video/query`

Omni-Flash · 查询任务（`GET /v1/video/query`，VEO relay 物理路由，主文档见 `relay/veo`）。
查询 `POST /v1/video/create` 创建的 Omni-Flash 视频任务状态与结果；`status=failed` 时 `error` 给出失败原因。

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

<ParamField query="id" type="string">
  路径中的资源 / 任务 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}
{
  "error": "视频生成失败",
  "id": "omni-flash:1779717386-QYRfzV5zLK",
  "status": "failed",
  "status_update_time": 1779717416
}
```

***

## google-omni-flash（下载视频（Google Files））

`GET /v1beta/files/{example-file-id}:download`

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

<ParamField path="example-file-id" type="string" required>
  文件 ID
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/v1beta/files/{example-file-id}:download" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## google-omni-flash（查询文件状态）

`GET /v1beta/files/{example-file-id}`

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

<ParamField path="example-file-id" type="string" required>
  文件 ID
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/v1beta/files/{example-file-id}" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## google-omni-flash（下载视频（GCS））

`GET /v1beta/files/gcs`

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/v1beta/files/gcs" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## google-omni-flash（查询交互）

`GET /v1beta/interactions/{interaction_id}`

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

<ParamField path="interaction_id" type="string" required>
  交互 ID
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/v1beta/interactions/{interaction_id}" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## Omni-Flash 视频生成

`POST /v1/video/create`

Omni-Flash · 统一视频创建（`POST /v1/video/create`，VEO relay 物理路由，主文档见 `relay/veo`）。
按 `model=omni-flash` / `omni-flash-edit` 走 Omni-Flash 链路；`type` 决定具体能力：

* `1`=文生视频（仅需 `prompt`）
* `2`=首尾帧（`images` 需 1\~2 张）
* `3`=垫图参考（`images` 需 1\~3 张）
* `4`=Omni-Flash 视频编辑（需 `input_reference`）

返回 `id`（任务 ID），轮询 `GET /v1/video/query?id=` 获取结果。

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

<ParamField header="Content-Type" type="string">
  请求体数据格式
</ParamField>

<ParamField header="Accept" type="string">
  客户端期望接收的响应数据格式
</ParamField>

<ParamField header="Authorization" type="string">
  API 认证密钥，格式为 Bearer + 空格 + 你的 API Key
</ParamField>

### 请求体参数 (Body)

<ParamField body="aspect_ratio" type="string">
  画幅比例
</ParamField>

<ParamField body="enable_sample" type="boolean">
  Omni-Flash 系列切换 1080p（4K 模型忽略）
</ParamField>

<ParamField body="enable_upsample" type="boolean">
  升级到 1080p（部分 4K 模型有效）
</ParamField>

<ParamField body="images" type="array">
  图片 URL 数组（type=2 需 1-2 张，type=3 需 1-3 张）
</ParamField>

<ParamField body="input_reference" type="string">
  Omni-Flash edit 参考视频（JSON 场景传 URL 或 dataURI）
</ParamField>

<ParamField body="model" type="string" required>
  模型名称（示例：omni-flash、omni-flash-edit）
</ParamField>

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

<ParamField body="seconds" type="string">
  视频时长（秒），示例："8"
</ParamField>

<ParamField body="size" type="string">
  自定义尺寸，宽比高长为16：9，高比宽长为9：16，aspect\_ratio生效时，该参数无效
</ParamField>

<ParamField body="type" type="integer">
  生成类型：1=文生视频, 2=首尾帧, 3=垫图参考, 4=Omni-Flash 视频编辑
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "model": "omni-flash",
  "prompt": "hello world"
}
```

### 请求示例 (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 '{
  "model": "omni-flash",
  "prompt": "hello world"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "id": "omni-flash_X:task_uAbDkbRmcOafvSBBmNWwQkIA1gvTdoaX",
  "status": "queued",
  "status_update_time": 1779950697931
}
```

***

## google-omni-flash（异步·文生视频）

`POST /v1beta/interactions`

### 请求体参数 (Body)

<ParamField body="background" type="boolean" required>
  省略或 false 为同步；建议客户端超时 ≥600s
</ParamField>

<ParamField body="generation_config" type="object">
  生成配置对象
</ParamField>

<ParamField body="input" type="string" required>
  文生视频提示词
</ParamField>

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

<ParamField body="response_format" type="object">
  响应格式约束
</ParamField>

<ParamField body="store" type="boolean">
  是否保存 Interaction；异步下不可为 false
</ParamField>

<ParamField body="stream" type="boolean">
  不支持 true，请省略或 false
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "background": true,
  "generation_config": {
    "video_config": {
      "task": "text_to_video"
    }
  },
  "input": "生成一段 16:9 的海边日出延时视频，固定机位，光线自然，不出现文字。",
  "model": "gemini-omni-flash-preview",
  "response_format": {
    "aspect_ratio": "16:9",
    "delivery": "uri",
    "type": "video"
  }
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/v1beta/interactions" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "background": true,
  "generation_config": {
    "video_config": {
      "task": "text_to_video"
    }
  },
  "input": "生成一段 16:9 的海边日出延时视频，固定机位，光线自然，不出现文字。",
  "model": "gemini-omni-flash-preview",
  "response_format": {
    "aspect_ratio": "16:9",
    "delivery": "uri",
    "type": "video"
  }
}'
```

### 响应示例 (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.