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

# Wan 2.7 Image Pro

> 使用阿里巴巴 Wan 2.7 Pro 生成和编辑高质量图像，支持 4K 输出、思考模式、文生图、多图编辑和组图生成。

## 查询任务状态

提交任务后，使用统一查询端点查看进度并获取结果：

<Card title="获取任务信息" icon="magnifying-glass" href="/zh/models/common/get-task-info">
  了解如何查询任务状态及获取生成结果
</Card>

<Tip>
  对于生产环境，我们建议在创建任务时使用 `callback_url` 参数，以便在生成完成时自动接收通知，而非持续轮询状态端点。
</Tip>

## 相关资源

<CardGroup cols={2}>
  <Card title="模型概览" icon="store" href="/zh/models/quickstart">
    探索所有可用模型
  </Card>

  <Card title="通用 API" icon="gear" href="/zh/common-api/get-account-credits">
    查询账户剩余积分
  </Card>
</CardGroup>


## OpenAPI

````yaml zh/models/wan/wan-2-7-image-pro.json post /api/v1/client/job/CreateTask
openapi: 3.0.0
info:
  title: Crun Wan 2.7 Pro Image API
  description: crun.ai Wan 2.7 Pro Image API 文档
  version: 1.0.0
  contact:
    name: 技术支持
    email: support@crun.ai
servers:
  - url: https://api.crun.ai
    description: API 服务器
security:
  - ApiKeyAuth: []
paths:
  /api/v1/client/job/CreateTask:
    post:
      summary: wan 2.7 image pro 图像生成
      operationId: wan/2-7-image-pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - wan/2-7-image-pro
                  description: |-
                    用于生成的模型名称，必填字段。

                    - 使用本端点时必须填写 `wan/2-7-image-pro`
                callback_url:
                  type: string
                  format: uri
                  description: |-
                    可选。用于接收任务完成通知的回调 URL。

                    - 生成完成后，系统将以 POST 方式向该 URL 推送任务状态与结果
                    - 回调数据结构与任务状态查询接口返回的 `data` 对象一致
                    - 您的回调端点需支持接收包含结果的 JSON 格式 POST 请求
                    - 成功接收后需返回 HTTP 200 状态码
                  example: https://your-domain.com/api/callback
                input:
                  type: object
                  description: Wan 2.7 Pro 图像生成与编辑模型的输入参数。
                  properties:
                    prompt:
                      type: string
                      description: 描述图像生成或编辑需求的文字提示词。
                      minLength: 1
                      maxLength: 5000
                      example: >-
                        A futuristic cyberpunk city street at night with neon
                        lights reflecting on wet pavement.
                    img_urls:
                      type: array
                      description: |-
                        用于图像编辑、风格迁移或主体一致性生成的参考图片。

                        **图片限制**：

                        - **支持格式**：JPEG、JPG、PNG（不支持透明通道）、BMP、WEBP。
                        - **图片分辨率**：宽和高都必须在 240 到 8000 像素之间。
                        - **宽高比**：必须在 1:8 到 8:1 范围内。
                        - **文件大小**：每张图片最大 20 MB。

                        **4K 限制**：

                        - 当 `resolution=4K` 时，不支持图生图编辑。
                      items:
                        type: string
                        format: uri
                      maxItems: 9
                      example:
                        - https://example.com/reference-image.jpg
                    resolution:
                      type: string
                      description: |-
                        图像生成的输出分辨率预设。

                        `4K` 分辨率仅支持文生图生成。
                      enum:
                        - 1K
                        - 2K
                        - 4K
                      default: 1K
                      example: 4K
                    aspect_ratio:
                      type: string
                      description: 生成图像的宽高比。
                      enum:
                        - '16:9'
                        - '9:16'
                        - '4:3'
                        - '3:4'
                        - '1:1'
                        - auto
                      default: '16:9'
                      example: '1:1'
                    region:
                      type: string
                      description: 服务区域。mainland：中国大陆，global：国际
                      enum:
                        - mainland
                        - global
                      nullable: true
                      default: null
                      example: global
                    num_outputs:
                      type: integer
                      description: >-
                        单次请求生成的图像数量。


                        - 当 `enable_sequential=false` 时，支持范围为 1 到 4。

                        - 当 `enable_sequential=true` 时，最多支持 12
                        个输出。实际输出数量由模型决定，且不会超过 `num_outputs`。
                      minimum: 1
                      maximum: 12
                      default: 1
                      example: 4
                    enable_sequential:
                      type: boolean
                      description: |-
                        启用连续组图生成模式。

                        启用后：
                        - 不支持 `color_palette`。
                        - 支持连续生成最多 12 张图像。
                        - 当 `resolution=4K` 时不支持。
                      default: false
                      example: true
                    color_palette:
                      type: array
                      description: |-
                        自定义颜色主题配置。

                        由颜色对象组成的数组，每个对象包含 HEX 颜色值及其构成比例。

                        要求：
                        - 必须包含 3 到 10 种颜色。
                        - 建议使用约 8 种颜色。
                        - 仅在 `enable_sequential=false` 时可用。
                      minItems: 3
                      maxItems: 10
                      items:
                        type: object
                        properties:
                          hex:
                            type: string
                            description: HEX 颜色代码。
                            example: '#FF5733'
                          ratio:
                            type: number
                            description: 颜色构成比例。
                            example: 0.25
                        required:
                          - hex
                          - ratio
                      example:
                        - hex: '#FF5733'
                          ratio: 0.3
                        - hex: '#33C1FF'
                          ratio: 0.25
                        - hex: '#222222'
                          ratio: 0.45
                    bbox_list:
                      type: array
                      description: |-
                        交互式编辑的边界框区域。

                        该列表长度必须与 `img_urls` 中输入图片数量一致。

                        对于不需要编辑的图片，请传入空数组 `[]`。

                        每个边界框使用如下坐标格式：
                        `[x1, y1, x2, y2]`

                        其中：
                        - `x1`、`y1` = 左上角坐标
                        - `x2`、`y2` = 右下角坐标
                        - 坐标基于原始图片的绝对像素位置。
                        - 原点 `(0,0)` 位于图片左上角。

                        限制：
                        - 每张图片最多支持 2 个边界框。
                        - 每个边界框必须包含且仅包含 4 个整数值。
                      items:
                        type: array
                        items:
                          type: array
                          items:
                            type: integer
                          minItems: 4
                          maxItems: 4
                        maxItems: 2
                      example:
                        - - - 0
                            - 0
                            - 12
                            - 12
                          - - 25
                            - 25
                            - 100
                            - 100
                        - []
                        - - - 10
                            - 10
                            - 50
                            - 50
                    input_compliance:
                      type: string
                      nullable: true
                      description: >-
                        可选输入审核开关。传入 `enable` 开启输入审核，传入 `disable` 关闭；不传或传 `null`
                        时使用默认配置。
                      enum:
                        - disable
                        - enable
                      default: null
                      example: enable
                    output_compliance:
                      type: string
                      nullable: true
                      description: >-
                        可选输出审核开关。传入 `enable` 开启输出审核，传入 `disable` 关闭；不传或传 `null`
                        时使用默认配置。
                      enum:
                        - disable
                        - enable
                      default: null
                      example: enable
                  required:
                    - prompt
            example:
              model: wan/2-7-image-pro
              callback_url: https://your-domain.com/api/callback
              input:
                prompt: >-
                  Transform the building into a cyberpunk-style neon city while
                  preserving the original structure.
                img_urls:
                  - https://example.com/building.jpg
                resolution: 2K
                aspect_ratio: '16:9'
                region: global
                num_outputs: 2
                enable_sequential: false
                bbox_list:
                  - - - 120
                      - 80
                      - 900
                      - 1200
                input_compliance: enable
                output_compliance: enable
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          task_id:
                            type: string
                            description: 任务 ID，可通过获取任务详情接口查询任务状态
                            example: task_12345678
              example:
                code: 200
                message: success
                data:
                  task_id: task_12345678
        '422':
          description: 验证错误
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      errors:
                        type: array
                        description: 详细的验证错误信息
                        items:
                          type: string
                        example:
                          - specific error field message
              example:
                code: 422
                message: Missing Params or Type Error
                errors:
                  - specific error field message
        '500':
          $ref: '#/components/responses/Error'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        code:
          type: integer
          enum:
            - 200
            - 401
            - 402
            - 404
            - 422
            - 429
            - 455
            - 500
            - 501
            - 505
          description: |-
            响应状态码

            - **200**: 成功 - 请求已成功处理
            - **401**: 未授权 - 身份凭证缺失或无效
            - **402**: 额度不足 - 账户余额不足以完成本次操作
            - **404**: 未找到 - 请求的资源或端点不存在
            - **422**: 验证错误 - 请求参数未通过验证
            - **429**: 请求限速 - 该资源的请求次数已超出限制
            - **455**: 服务不可用 - 系统正在维护中
            - **500**: 服务器错误 - 处理请求时发生意外错误
            - **501**: 生成失败 - 内容生成任务失败
            - **505**: 功能已禁用 - 所请求的功能当前已被禁用
        message:
          type: string
          description: 响应消息，失败时为错误描述
          example: success
  responses:
    Error:
      description: 服务器错误
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: |-
        所有 API 均需通过 API Key 进行身份验证。

        获取 API Key：
        1. 访问 [API Key 管理页面](https://crun.ai/zh/user-api-key) 获取您的 API Key

        使用方式：
        将以下内容添加至请求头：

        x-api-key: YOUR_API_KEY

        注意事项：
        - 请妥善保管您的 API Key，切勿与他人共享
        - 若怀疑 API Key 已泄露，请立即在管理页面进行重置

````