# Qwen3 Image to Image

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/jobs/createTask:
    post:
      summary: Qwen3 Image to Image
      deprecated: false
      description: >-
        ## Create Task


        Use this endpoint to create a new image-to-image generation task. Upload
        an input image and provide a prompt describing the desired changes.


        - The `image_urls` array supports up to 3 input images. Supported
        formats: `image/jpeg`, `image/png`, `image/webp`, `image/bmp`, and
        `image/gif`,`image/tiff`. Maximum file size: 10 MB per image.

        - Supported resolutions: `1K` and `2K`.

        - Supported image sizes: `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `16:9`,
        `9:16`, and `21:9`. 

        - Supported output formats: `png` and `jpeg`. Default: `png`.


        <Card title="Get Task Details" icon="lucide-search"
        href="/market/common/get-task-detail">
          After submission, use the unified query endpoint to check task progress and retrieve results
        </Card>


        ::: tip[]

        For production use, we recommend providing the `callBackUrl` parameter
        so your service can receive completion notifications instead of polling
        for task status.

        :::


        ## Related Resources


        <CardGroup cols={2}>
          <Card title="Model Marketplace" icon="lucide-store" href="/market/quickstart">
            Explore all available models and capabilities
          </Card>
          <Card title="Common API" icon="lucide-cog" href="/common-api/get-account-credits">
            Check account credits and usage
          </Card>
        </CardGroup>
      operationId: qwen3-image-to-image
      tags:
        - docs/en/Market/Image    Models/Qwen
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: >-
                    The model name used for generation. This field is required.
                    This endpoint must use the `qwen3/image-to-image` model.
                  enum:
                    - qwen3/image-to-image
                  default: qwen3/image-to-image
                  x-apidog-enum:
                    - value: qwen3/image-to-image
                      name: ''
                      description: ''
                  examples:
                    - qwen3/image-to-image
                callBackUrl:
                  type: string
                  format: uri
                  description: >-
                    Callback URL for task completion notifications. Optional
                    parameter. If provided, the system will send a POST request
                    to this URL when the task completes, whether it succeeds or
                    fails. If omitted, no callback notification will be sent.
                  examples:
                    - https://your-domain.com/api/callback
                input:
                  type: object
                  description: Input parameters for the image-to-image generation task.
                  required:
                    - image_urls
                    - prompt
                  properties:
                    image_urls:
                      type: array
                      minItems: 1
                      maxItems: 3
                      items:
                        type: string
                        format: uri
                      description: >-
                        Input image URL array. Upload images and provide their
                        URLs rather than the file content. Supports up to 3
                        images. Supported file types: `image/jpeg`, `image/png`,
                        `image/webp`, `image/bmp`, and `image/gif`,`image/tiff`.
                        Maximum file size: 10 MB per image.
                      examples:
                        - - https://example.com/input.png
                    prompt:
                      type: string
                      description: >-
                        The positive prompt that describes the image content,
                        style, and composition you want to generate or edit.
                        Both Chinese and English are supported.
                      minLength: 0
                      maxLength: 5000
                      examples:
                        - >-
                          Turn the input image into a cinematic watercolor
                          illustration.
                    resolution:
                      type: string
                      description: The output image resolution.
                      enum:
                        - 1K
                        - 2K
                      examples:
                        - 1K
                      default: 1K
                    image_size:
                      type: string
                      description: The output image size.
                      enum:
                        - '1:1'
                        - '3:2'
                        - '2:3'
                        - '4:3'
                        - '3:4'
                        - '16:9'
                        - '9:16'
                        - '21:9'
                      default: '16:9'
                      examples:
                        - '1:1'
                    output_format:
                      type: string
                      enum:
                        - png
                        - jpeg
                      default: png
                      description: The generated image format.
                      examples:
                        - png
                    prompt_extend:
                      type: boolean
                      default: true
                      description: >-
                        Whether to enable intelligent prompt rewriting. Default:
                        true (recommended). When enabled, the model optimizes
                        the positive prompt, which significantly improves
                        results for simple descriptions.
                      examples:
                        - true
                    nsfw_checker:
                      type: boolean
                      default: false
                      description: >-
                        Whether to enable content filtering. Optional. Defaults
                        to false. When set to false, content filtering is
                        disabled and all results are returned directly by the
                        model. Note: Content filtering cannot guarantee that all
                        inappropriate content will be detected. If the filtering
                        results do not meet your requirements, you must
                        implement additional content moderation measures.
                      examples:
                        - false
                    negative_prompt:
                      type: string
                      minLength: 0
                      maxLength: 5000
                      description: >-
                        The negative prompt that describes content you do not
                        want to appear in the image.
                      examples:
                        - blurry, low quality, distorted
                    seed:
                      type: integer
                      minimum: 0
                      maximum: 2147483647
                      default: 1
                      description: >-
                        The random seed. Value range: [0, 2147483647]. A fixed
                        seed helps maintain relatively stable results.
                      examples:
                        - 1
                  x-apidog-orders:
                    - image_urls
                    - prompt
                    - resolution
                    - image_size
                    - output_format
                    - prompt_extend
                    - negative_prompt
                    - seed
                    - nsfw_checker
              x-apidog-orders:
                - model
                - callBackUrl
                - input
            example:
              model: qwen3/image-to-image
              callBackUrl: https://your-domain.com/api/callback
              input:
                image_urls:
                  - https://example.com/input.png
                prompt: Turn the input image into a cinematic watercolor illustration.
                resolution: 1K
                image_size: '1:1'
                output_format: png
                prompt_extend: true
                nsfw_checker: false
                negative_prompt: blurry, low quality, distorted
                seed: 1
      responses:
        '200':
          description: Request successful
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties: {}
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          taskId:
                            type: string
                            description: Task ID used to query task status and results.
                            examples:
                              - task_qwen3_1765180586443
                        x-apidog-orders:
                          - taskId
                    x-apidog-orders:
                      - data
              example:
                code: 200
                msg: success
                data:
                  taskId: task_qwen3_1765180586443
          headers: {}
          x-apidog-name: ''
      security:
        - BearerAuth: []
          x-apidog:
            schemeGroups:
              - id: kn8M4YUlc5i0A0179ezwx
                schemeIds:
                  - BearerAuth
            required: true
            use:
              id: kn8M4YUlc5i0A0179ezwx
            scopes:
              kn8M4YUlc5i0A0179ezwx:
                BearerAuth: []
      callbacks:
        onImageGenerated:
          '{$request.body#/callBackUrl}':
            post:
              summary: Image Generation Callback
              description: >-
                When the image generation task is completed, the system sends
                the result to your callback URL via a POST request.
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        code:
                          type: integer
                          description: >-
                            Status code


                            - **200**: Success - Image generation task completed
                            successfully

                            - **400**: Invalid request parameters or content
                            violates policy

                            - **500**: Internal error. Please try again later.

                            - **501**: Failed - Image generation task failed
                          enum:
                            - 200
                            - 400
                            - 500
                            - 501
                        msg:
                          type: string
                          description: Status message
                          example: Playground task completed successfully.
                        data:
                          type: object
                          properties:
                            completeTime:
                              type: integer
                              format: int64
                              description: >-
                                Task completion time, represented as a Unix
                                timestamp in milliseconds
                              example: 1786436473000
                            costTime:
                              type: integer
                              description: Task duration in seconds
                              example: 38
                            createTime:
                              type: integer
                              format: int64
                              description: >-
                                Task creation time, represented as a Unix
                                timestamp in milliseconds
                              example: 1786436435000
                            creditsConsumed:
                              type: number
                              format: double
                              description: Number of credits consumed by the task
                              example: 5.3
                            model:
                              type: string
                              description: Image-to-image model used for the task
                              example: qwen3/image-to-image
                            param:
                              type: string
                              description: >-
                                Parameters submitted when creating the task, in
                                JSON string format
                              example: >-
                                {"input":"{\"output_format\":\"png\",\"seed\":1,\"image_size\":\"1:1\",\"prompt_extend\":true,\"negative_prompt\":\"blurry,
                                low quality,
                                distorted\",\"image_urls\":[\"https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png\"],\"prompt\":\"Convert
                                the input image into a cinematic watercolor
                                illustration.\",\"resolution\":\"1K\",\"nsfw_checker\":false}","callBackUrl":"https://webhook.uutool.cn/5f723555-ec59-4b8f-8feb-bed810982785","model":"qwen3/image-to-image"}
                            resultJson:
                              type: string
                              description: >-
                                Image generation result in JSON string format.
                                resultUrls contains the list of generated image
                                URLs.
                              example: >-
                                {"resultUrls":["https://tempfile.aiquickdraw.com/qwen3/1786436471808-b8apkvect1.png"]}
                            state:
                              type: string
                              description: Task status
                              enum:
                                - success
                                - fail
                              example: success
                            taskId:
                              type: string
                              description: Task ID
                              example: 301e6044f5e9774f8f44e2b1c754bbbf
                            updateTime:
                              type: integer
                              format: int64
                              description: >-
                                Last task update time, represented as a Unix
                                timestamp in milliseconds
                              example: 1786436473000
              responses:
                '200':
                  description: Callback received successfully
      x-apidog-folder: docs/en/Market/Image    Models/Qwen
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1184766/apis/api-41209010-run
components:
  schemas: {}
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API requests require a Bearer Token. Add the header `Authorization:
        Bearer YOUR_API_KEY` to authenticate requests.
    BearerAuth1:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 请求都需要 Bearer Token。请在请求头中添加 `Authorization: Bearer YOUR_API_KEY`
        进行身份验证。
servers:
  - url: https://api.kie.ai
    description: 正式环境
security:
  - BearerAuth: []
    x-apidog:
      schemeGroups:
        - id: kn8M4YUlc5i0A0179ezwx
          schemeIds:
            - BearerAuth
      required: true
      use:
        id: kn8M4YUlc5i0A0179ezwx
      scopes:
        kn8M4YUlc5i0A0179ezwx:
          BearerAuth: []

```
