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

# Wan2.6 T2I

> 通过 Starrise AI API 调用阿里巴巴 Wan2.6 T2I 文生图模型。

Wan2.6 T2I 是通过 Starrise AI 提供的文生图模型。API 为**同步调用** — 自动轮询上游异步任务，直接返回最终图片 URL。

## 核心能力

* **文生图** — 根据文字描述生成图片
* **灵活尺寸** — 通过 `size` 指定输出分辨率
* **URL 或 Base64** — 通过 `response_format` 选择返回格式

## 快速示例

```bash cURL theme={null}
curl https://dayu.cdn-fly.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan2.6-t2i",
    "prompt": "吉卜力风格的可爱猫咪",
    "size": "1024x1024",
    "response_format": "url"
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://dayu.cdn-fly.com/v1/images/generations",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "model": "wan2.6-t2i",
        "prompt": "吉卜力风格的可爱猫咪",
        "size": "1024x1024",
        "response_format": "url"
    }
)

result = response.json()
print(result["data"][0]["url"])
```

## 参数说明

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 固定为 `wan2.6-t2i` |
| `prompt` | string | 是 | 图片描述文字 |
| `n` | integer | 否 | 生成张数，默认 `1` |
| `size` | string | 否 | 输出尺寸，如 `1024x1024` |
| `response_format` | string | 否 | `url`（默认）或 `b64_json` |

## 响应字段

| 字段 | 说明 |
| - | - |
| `data[].url` | 图片下载链接（有效期约 24 小时） |
| `data[].b64_json` | Base64 编码图片（仅 `response_format=b64_json` 时返回） |
| `data[].revised_prompt` | AI 扩展后的实际提示词 |
| `created` | 创建时间戳 |

> **[API 参考](/zh/api-reference/model-api/alibaba/wan2.6-t2i)**
>
> 查看 Wan2.6 T2I 的交互式 API Playground。


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