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

# 通义千问 图片编辑

> 阿里百炼通义万相图像生成模型，支持文生图和图片编辑两种模式。不传 images 参数为文生图模式，传入 images 参数（最多3张）为图片编辑模式。

使用[阿里云](https://www.aliyun.com)通义千问-图像编辑模型 (qwen-image-edit-plus) 进行图片编辑。

**模型特点：**

* **多图输入输出** - 支持多图输入和多图输出
* **文字修改** - 精确修改图内文字
* **物体操作** - 增删或移动物体，改变主体动作
* **风格迁移** - 迁移图片风格及增强画面细节


## OpenAPI

````yaml /cn/openapi.yaml POST /generate/bailian/qwen-image-plus
openapi: 3.0.0
info:
  contact:
    email: support@sinancode.com
    name: API Support
    url: https://sinancode.com/support
  description: AI 模型任务调度平台 API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://sinancode.com/terms-of-service
  title: TikTomato API
  version: '1.0'
servers:
  - url: https://api.sinancode.com/v1
    description: Production server
security: []
paths:
  /generate/bailian/qwen-image-plus:
    post:
      tags:
        - public
      summary: 通义万相图像生成
      description: >-
        阿里百炼通义万相图像生成模型，支持文生图和图片编辑两种模式。不传 images 参数为文生图模式，传入 images
        参数（最多3张）为图片编辑模式。
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/bailian.CreateBailianQwenImagePlusTaskRequest
        description: 任务参数
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '404':
          description: 模型不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: 服务器错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    bailian.CreateBailianQwenImagePlusTaskRequest:
      properties:
        images:
          description: |-
            输入图片列表（可选，0-3张图片，用于图片编辑模式）
            不传则为文生图模式，传入则为图片编辑模式
          items:
            type: string
          maxItems: 3
          type: array
        negative_prompt:
          description: 负向提示词（可选，最大 500 字符）
          maxLength: 500
          type: string
        prompt:
          description: 正向提示词（必填，最大 800 字符）
          maxLength: 800
          minLength: 1
          type: string
        prompt_extend:
          description: 启用提示词智能改写（可选，默认 true）
          type: boolean
        seed:
          description: 随机种子（可选，范围 0-2147483647）
          maximum: 2147483647
          minimum: 0
          type: integer
        size:
          description: |-
            图片尺寸（可选，默认 1328*1328）
            可选值：1664*928, 1472*1140, 1328*1328, 1140*1472, 928*1664
          enum:
            - 1664*928
            - 1472*1140
            - 1328*1328
            - 1140*1472
            - 928*1664
          type: string
      required:
        - images
        - prompt
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: Task ID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: Machine-readable error code (e.g. TASK.INVALID_PARAMS)
          type: string
        message:
          description: User-friendly error message
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 请使用您的 API Token 进行认证

````