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

# Wan2.6 T2I

> 根据文本描述生成图片。接口为同步调用，直接返回最终图片 URL。



## OpenAPI

````yaml zh/api-reference/model-api/alibaba/openapi/wan2.6-t2i/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: Wan2.6 T2I
  description: 通过 Cube AI API 调用阿里巴巴 Wan2.6 文生图模型
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: 文生图
      description: 根据文本描述生成图片。接口为同步调用，直接返回最终图片 URL。
      operationId: createWan26T2i
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - wan2.6-t2i
                  description: 模型 ID
                  example: wan2.6-t2i
                prompt:
                  type: string
                  description: 图片描述文字。
                  example: 在竹林中奔跑的熊猫
                size:
                  type: string
                  description: 输出图片尺寸，如 `1024x1024`。
                  example: 1024x1024
                'n':
                  type: integer
                  minimum: 1
                  maximum: 4
                  default: 1
                  description: 生成图片数量。
                response_format:
                  type: string
                  enum:
                    - url
                    - b64_json
                  default: url
                  description: 返回 URL 或 Base64 编码的 JSON。
      responses:
        '200':
          description: 图片生成成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 图片下载链接（有效期约 24 小时）。
                        b64_json:
                          type: string
        '400':
          description: 请求参数有误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````