Image: Edit & Reference

qwen2-1-image-to-image

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.

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)

Query parameters

webhookstring
team_idinteger nullable

Headers

x-api-keystring
x-embed-codestring nullable
x-agent-embed-codestring nullable
x-whitelabel-studiostring nullable
authorizationstring nullable

Request body

promptstring 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_liststring[] required

Reference images, 1 to 10 URLs. Order matters when the prompt refers to 'the first image', 'the second image', etc.

mask_urlstring 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_promptboolean nullable

Rewrites the prompt into a fuller scene description before generating, improving quality.

seedinteger nullable

Random seed. Omit to generate with a random seed.

webhook_urlstring uri nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.