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

# 阿里千问 Qwen 图像参考

> 阿里百炼千问图像生成与多模态编辑

## 查询任务（API 路径）

`GET /alibailian/api/v1/tasks/{task_id}`

查询 `POST /alibailian/api/v1/services/aigc/video-generation/video-synthesis` 等异步任务的执行状态与结果。

与 `GET /alibailian/tasks/`{`task_id`}\`\` 为同一后端路由的两种前缀，任选其一即可；`task_status` 为 `SUCCEEDED` 时 `output.video_url` 有效（有时效性）。

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

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

### 请求示例 (cURL)

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

### 响应示例 (200 OK)

```json theme={null}
{
  "output": {
    "actual_prompt": "橙衣男性骑着扫帚从画面右侧向左侧高速飞过，身体前倾，双手紧握扫帚杆，头部朝前，嘴巴张开并大喊：'嘿！你们别拦我！'。扫帚在空中快速移动，扫帚毛因速度产生模糊效果。下方三人站在人行道上，手持魔杖指向空中人物，头部随其飞行方向轻微转动，注视其动作。背景中持续传来城市街道的车流声、行人交谈声、风声以及扫帚划过空气的呼啸声。",
    "end_time": "2025-10-11T19:02:27.297Z",
    "orig_prompt": "改变一下光线",
    "scheduled_time": "2025-10-11T18:55:57.908Z",
    "submit_time": "2025-10-11T18:55:56.952Z",
    "task_id": "a55bfe14-6e78-4b9d-b97d-128420399ed1",
    "task_status": "SUCCEEDED",
    "video_url": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/1d/21/20251011/9b1c82b0/a55bfe14-6e78-4b9d-b97d-128420399ed1.mp4?Expires=1760266939&OSSAccessKeyId=LTAI5tDUB1cEqFCYhEwWry26&Signature=Fjpx1uAlmLmeYGWx0Ye7n%2F%2F9Isw%3D"
  },
  "request_id": "ec8f059e-f2e5-4887-bb43-3306cd38f403",
  "usage": {
    "SR": 480,
    "duration": 5,
    "video_count": 1
  }
}
```

***

## 查询任务

`GET /alibailian/tasks/{task_id}`

查询异步任务的执行状态与结果；与 `GET /alibailian/api/v1/tasks/`{`task_id`}\`\` 为同一后端路由。

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

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

### 请求示例 (cURL)

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

### 响应示例 (200 OK)

```json theme={null}
{
  "output": {
    "task_id": "task-example"
  },
  "request_id": "req-example"
}
```

***

## 多模态生成

`POST /alibailian/api/v1/services/aigc/multimodal-generation/generation`

TTS 等多模态能力。

### 请求体参数 (Body)

<ParamField body="input" type="object" required>
  输入内容
</ParamField>

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

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/alibailian/api/v1/services/aigc/multimodal-generation/generation" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "output": {
    "task_id": "task-example"
  },
  "request_id": "req-example"
}
```

***

## 视频生成

`POST /alibailian/api/v1/services/aigc/video-generation/video-synthesis`

万相（Wan）图生视频/文生视频、HappyHorse 视频编辑等异步视频合成任务的统一创建入口，按 `model` 区分具体能力：

* `wan2.5-i2v-preview` 等万相图生视频模型：`input.img_url` 必填（首帧图像），`input.prompt` 必填。
* `happyhorse-1.0-video-edit`：`input.media` 必填（1 个 video + 0\~5 个 reference\_image）。

返回 `output.task_id`，需轮询 `GET /alibailian/api/v1/tasks/`{`task_id`}\`\` 获取结果。

### 请求体参数 (Body)

<ParamField body="input" type="object" required>
  输入。`img_url`（万相图生视频模型必填）与 `media`（`happyhorse-1.0-video-edit` 必填）二选一，取决于 `model`。
</ParamField>

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

  固定值：happyhorse-1.0-video-edit。
</ParamField>

<ParamField body="parameters" type="object">
  参数
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "input": {
    "media": [
      {
        "type": "video",
        "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4"
      },
      {
        "type": "reference_image",
        "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260415/hynnff/wan-video-edit-clothes.webp"
      }
    ],
    "prompt": "让视频中的马头人身角色穿上图片中的条纹毛衣"
  },
  "model": "happyhorse-1.0-video-edit",
  "parameters": {
    "resolution": "720P"
  }
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/alibailian/api/v1/services/aigc/video-generation/video-synthesis" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "media": [
      {
        "type": "video",
        "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4"
      },
      {
        "type": "reference_image",
        "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260415/hynnff/wan-video-edit-clothes.webp"
      }
    ],
    "prompt": "让视频中的马头人身角色穿上图片中的条纹毛衣"
  },
  "model": "happyhorse-1.0-video-edit",
  "parameters": {
    "resolution": "720P"
  }
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "output": {
    "task_id": "86438901-c911-4bfa-9137-621478c85efd",
    "task_status": "PENDING"
  },
  "request_id": "1445f928-f1b6-9c43-8143-bfaddb5989cf"
}
```

***


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