---
title: "qwen2-1-image-to-image"
method: POST
path: "/api/v1/qwen2-1-image-to-image"
tags: ["Image: Edit & Reference"]
---

# qwen2-1-image-to-image

`POST /api/v1/qwen2-1-image-to-image`

## Request

- Base URL: `https://api.muapi.ai`
- URL: `https://api.muapi.ai/api/v1/qwen2-1-image-to-image`
- Auth: one of:
  - API key in header `x-api-key`
  - OAuth 2 (client credentials, token URL `https://api.muapi.ai/oauth/token`)

Edit and recombine up to 10 reference images using Qwen 2.1 (Alibaba). Input: images_list, edit prompt, optional mask_url for local inpainting. Output: edited image. Use for: product restyling, multi-image composition, masked local edits.

## Query parameters

- `webhook` string
- `team_id` integer, nullable

## Headers

- `x-api-key` string
- `x-embed-code` string, nullable
- `x-agent-embed-code` string, nullable
- `x-whitelabel-studio` string, nullable
- `authorization` string, nullable

## Request body

- Qwen21ImageToImageRequest
  - `prompt` string, required: The prompt describing the result you want. When mask_url is supplied, describe what should be generated inside the white area of the mask.
  - `images_list` string[], required: Reference images, 1 to 10 URLs. Order matters when the prompt refers to 'the first image', 'the second image', etc.
  - `mask_url` string, uri, nullable: Inpainting mask (white = area to change, black = kept unchanged) that switches the request into local-edit mode. Must be used with exactly one reference image.
  - `aspect_ratio` 'auto' | '1:1' | '4:3' | '3:4' | '3:2' | '2:3' | '16:9' | '9:16' | '21:9' | '9:21', nullable: Output image aspect ratio. Defaults to the first reference image's ratio. Ignored in local-edit mode.
  - `resolution` '1K' | '2K', nullable: Output resolution tier. 2K produces four times the pixels and takes longer.
  - `background` 'opaque' | 'transparent', nullable: Background type. Transparent outputs a PNG/WebP with an alpha channel; describe only the subject when using it.
  - `output_format` 'jpeg' | 'png' | 'webp', nullable: Output image format. JPEG has no alpha channel and cannot be combined with a transparent background.
  - `enhance_prompt` boolean, nullable: Rewrites the prompt into a fuller scene description before generating, improving quality.
  - `seed` integer, nullable: Random seed. Omit to generate with a random seed.
  - `webhook_url` string, uri, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/muapi/apis/muapi-api.md) · [All operations](https://skmtc.dev/muapi/apis/muapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/muapi/apis/muapi-api/revisions/e4b7374381e5?raw)
