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

# 腾讯云 VOD 接口参考

> 腾讯云 VOD AIGC 图像与视频处理接口

## 查询任务

`GET /tencent-vod/v1/query/{task_id}`

查询 `POST /tencent-vod/v1/aigc-image`、`/aigc-video`、`/template-effect` 创建的异步任务状态与结果。

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

<ParamField path="task_id" type="string" required>
  异步任务 ID
</ParamField>

### 请求示例 (cURL)

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

### 响应示例 (200 OK)

```json theme={null}
{
  "Response": {
    "RequestId": "req-example",
    "TaskId": "task-example"
  }
}
```

***

## AIGC 生图

`POST /tencent-vod/v1/aigc-image`

腾讯云点播图像生成。

官方文档:[https://cloud.tencent.com/document/product/266/126240](https://cloud.tencent.com/document/product/266/126240)

### 请求体参数 (Body)

<ParamField body="enhance_prompt" type="string">
  是否自动优化提示词。开启时将自动优化传入的 Prompt，以提升生成质量。取值有：
  Enabled：开启；
  Disabled：关闭；
</ParamField>

<ParamField body="ext_info" type="string">
  保留字段，特殊用途时使用。
  示例值：myextinfo
</ParamField>

<ParamField body="file_infos" type="array">
  文件信息列表
</ParamField>

<ParamField body="model_name" type="string" required>
  模型名称。取值：
  GEM：Gemini；
  Qwen：千问。
  Hunyuan：混元。

  示例值：GEM
</ParamField>

<ParamField body="model_version" type="string" required>
  模型版本。取值：
  当 ModelName 是 GEM，可选值为 2.5、3.0；
  当 ModelName 是 Qwen，可选值为 0925；
  当 ModelName 是 Hunyuan，可选值为 3.0；

  示例值：2.5
</ParamField>

<ParamField body="negative_prompt" type="string">
  要阻止模型生成图片的提示词。
</ParamField>

<ParamField body="output_config" type="object">
  生图任务的输出媒体文件配置。
</ParamField>

<ParamField body="prompt" type="string" required>
  提示词
</ParamField>

<ParamField body="session_context" type="string">
  来源上下文，用于透传用户请求信息，音画质重生完成回调将返回该字段值，最长 1000 个字符。
  示例值：mySessionContext
</ParamField>

<ParamField body="session_id" type="string">
  用于去重的识别码，如果三天内曾有过相同的识别码的请求，则本次的请求会返回错误。最长 50 个字符，不带或者带空字符串表示不做去重。
  示例值：mysession
</ParamField>

<ParamField body="tasks_priority" type="integer">
  任务的优先级，数值越大优先级越高，取值范围是 -10 到 10，不填代表 0。
  示例值：10
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "enhance_prompt": "Enabled",
  "ext_info": "",
  "file_infos": [
    {
      "file_id": "387702299774574677",
      "text": "原始图片的描述信息",
      "type": "file",
      "url": ""
    }
  ],
  "model_name": "GEM",
  "model_version": "3.0",
  "negative_prompt": "blur, distorted",
  "output_config": {
    "aspect_ratio": "1:1",
    "input_compliance_check": "Enabled",
    "output_compliance_check": "Enabled",
    "person_generation": "AllowAdult",
    "resolution": "1080P",
    "storage_mode": "Temporary"
  },
  "prompt": "convert this image to anime style",
  "session_context": "{\"user_id\": \"123\", \"scene\": \"profile_picture\"}",
  "session_id": "image-task-67890",
  "tasks_priority": 10
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/tencent-vod/v1/aigc-image" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enhance_prompt": "Enabled",
  "ext_info": "",
  "file_infos": [
    {
      "file_id": "387702299774574677",
      "text": "原始图片的描述信息",
      "type": "file",
      "url": ""
    }
  ],
  "model_name": "GEM",
  "model_version": "3.0",
  "negative_prompt": "blur, distorted",
  "output_config": {
    "aspect_ratio": "1:1",
    "input_compliance_check": "Enabled",
    "output_compliance_check": "Enabled",
    "person_generation": "AllowAdult",
    "resolution": "1080P",
    "storage_mode": "Temporary"
  },
  "prompt": "convert this image to anime style",
  "session_context": "{\"user_id\": \"123\", \"scene\": \"profile_picture\"}",
  "session_id": "image-task-67890",
  "tasks_priority": 10
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "Response": {
    "RequestId": "f50d7667-72d8-46bb-a7e3-0613588971b6",
    "TaskId": "251007502-AigcImage***2782aff1e896673f1ft"
  }
}
```

***

## AIGC 生视频

`POST /tencent-vod/v1/aigc-video`

腾讯云点播视频生成，按 `model_name`（Hailuo/Kling/Vidu）区分具体能力与参数取值范围。

官方文档:[https://cloud.tencent.com/document/product/266/126240](https://cloud.tencent.com/document/product/266/126240)

### 请求体参数 (Body)

<ParamField body="enhance_prompt" type="string">
  是否自动优化提示词。开启时将自动优化传入的 Prompt，以提升生成质量。取值有：
  Enabled：开启；
  Disabled：关闭；

  示例值：Enabled
</ParamField>

<ParamField body="ext_info" type="object">
  保留字段，特殊用途时使用。
  示例值：myextinfo
</ParamField>

<ParamField body="file_infos" type="array">
  最多包含三张素材资源图片的列表，用于描述模型在生成视频时要使用的资源图片。

  支持多图输入的模型：

  1. GV，使用多图输入时，不可使用LastFrameFileId和LastFrameUrl。
  2. Vidu，支持多图参考生视频。q2模型1-7张图片，可通过FileInfos里面的ObjectId作为主体id来传入。

  注意：

  1. 图片大小不超过10M。
  2. 支持的图片格式：jpeg、png。
</ParamField>

<ParamField body="last_frame_url" type="string">
  用于作为尾帧画面来生成视频的媒体文件 URL。说明：

  1. 只支持模型 GV 、Kling、Vidu，其他模型暂不支持。当 ModelName 为 GV 时，如果指定该参数，则需同时指定 FileInfos 作为待生成视频的首帧。当 ModelName 为 Kling 、ModelVersion 为 2.1 并且指定输出分辨率 Resolution 为 1080P 时，才能指定该参数。当 ModelName 为 Vidu、ModelVersion 为 q2-pro、q2-turbo 时，才能指定该参数。
  2. 图片大小需小于5M。
  3. 3. 图片格式的取值为：jpeg，jpg, png, webp。
        示例值：[https://test.com/1.png](https://test.com/1.png)
</ParamField>

<ParamField body="model_name" type="string" required>
  模型名称。取值：
  Hailuo：海螺；
  Kling：可灵；
  Vidu；

  示例值：GV
</ParamField>

<ParamField body="model_version" type="string" required>
  模型版本。取值：
  当 ModelName 是 Hailuo，可选值为 02、2.3、2.3-fast；
  当 ModelName 是 Kling，可选值为 1.6、2.0、2.1、2.5、O1、3.0、3.0-Omni；
  当 ModelName 是 Vidu，可选值为 q2、q2-pro、q2-turbo 、q3-pro、q3-turbo；
  示例值：2.3
</ParamField>

<ParamField body="negative_prompt" type="string">
  要阻止模型生成视频的提示词。
  示例值：red
</ParamField>

<ParamField body="output_config" type="object">
  生视频任务的输出媒体文件配置。
</ParamField>

<ParamField body="prompt" type="string" required>
  提示词
</ParamField>

<ParamField body="scene_type" type="string">
  场景类型。取值如下：
  当 ModelName 为 Kling 时：
  motion\_control 表示动作控制；
  avatar\_i2v 表示数字人；
  lip\_sync 表示对口型；
  其他 ModelName 暂不支持。

  示例值：motion\_control
</ParamField>

<ParamField body="session_context" type="string">
  来源上下文，用于透传用户请求信息，音画质重生完成回调将返回该字段值，最长 1000 个字符。
  示例值：mySessionContext
</ParamField>

<ParamField body="session_id" type="string">
  用于去重的识别码，如果三天内曾有过相同的识别码的请求，则本次的请求会返回错误。最长 50 个字符，不带或者带空字符串表示不做去重。
  示例值：mysession
</ParamField>

<ParamField body="tasks_priority" type="integer">
  任务的优先级，数值越大优先级越高，取值范围是 -10 到 10，不填代表 0。
  示例值：10
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "enhance_prompt": "Enabled",
  "model_name": "Kling",
  "model_version": "1.6",
  "negative_prompt": "模糊、抖动",
  "output_config": {
    "aspect_ratio": "16:9",
    "audio_generation": "Enabled",
    "duration": 8,
    "enhance_switch": "Enabled",
    "input_compliance_check": "Enabled",
    "media_name": "car-video",
    "output_compliance_check": "Enabled",
    "person_generation": "AllowAdult",
    "resolution": "1080P",
    "storage_mode": "Temporary"
  },
  "prompt": "一辆汽车在公路上行驶，阳光明媚"
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/tencent-vod/v1/aigc-video" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enhance_prompt": "Enabled",
  "model_name": "Kling",
  "model_version": "1.6",
  "negative_prompt": "模糊、抖动",
  "output_config": {
    "aspect_ratio": "16:9",
    "audio_generation": "Enabled",
    "duration": 8,
    "enhance_switch": "Enabled",
    "input_compliance_check": "Enabled",
    "media_name": "car-video",
    "output_compliance_check": "Enabled",
    "person_generation": "AllowAdult",
    "resolution": "1080P",
    "storage_mode": "Temporary"
  },
  "prompt": "一辆汽车在公路上行驶，阳光明媚"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "Response": {
    "RequestId": "req-example",
    "TaskId": "task-example"
  }
}
```

***

## 模板特效

`POST /tencent-vod/v1/template-effect`

模板特效生成。

官方文档:[https://cloud.tencent.com/document/product/266/126240](https://cloud.tencent.com/document/product/266/126240)

### 请求体参数 (Body)

<ParamField body="ext_info" type="object" required>
  扩展信息
</ParamField>

<ParamField body="file_infos" type="array">
  最多包含三张素材资源图片的列表，用于描述模型在生成视频时要使用的资源图片。
  注意：

  1.

  图片大小不超过10M。

  2.

  支持的图片格式：jpeg、png。
</ParamField>

<ParamField body="prompt" type="string">
  提示词
</ParamField>

<ParamField body="scene_type" type="string" required>
  取值 template\_effect
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "ext_info": {
    "AdditionalParameters": {
      "template": "morphlab"
    }
  },
  "file_infos": [
    {
      "category": "Image",
      "type": "Url",
      "url": "https://image01.vidu.zone/vidu/example/20241206-175531.jpeg"
    }
  ],
  "prompt": "视频内容\\n画面开始主体突然爆炸，细碎的颗粒爆炸开来\\n# 要求\\n1.根据用户上传图片确定主体数量,每个主体都要爆炸\\n2.Motion Level 设定为:Middle\\n3.以>我的视频内容为第一要素，背景的描述统一、合理，不要描述两次.",
  "scene_type": "template_effect"
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/tencent-vod/v1/template-effect" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ext_info": {
    "AdditionalParameters": {
      "template": "morphlab"
    }
  },
  "file_infos": [
    {
      "category": "Image",
      "type": "Url",
      "url": "https://image01.vidu.zone/vidu/example/20241206-175531.jpeg"
    }
  ],
  "prompt": "视频内容\\n画面开始主体突然爆炸，细碎的颗粒爆炸开来\\n# 要求\\n1.根据用户上传图片确定主体数量,每个主体都要爆炸\\n2.Motion Level 设定为:Middle\\n3.以>我的视频内容为第一要素，背景的描述统一、合理，不要描述两次.",
  "scene_type": "template_effect"
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "Response": {
    "RequestId": "req-example",
    "TaskId": "task-example"
  }
}
```

***


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