Image: Text-to-Image

qwen2-1-text-to-image

Generate images from text using Qwen 2.1 (Alibaba). Input: text prompt, aspect ratio, resolution, background. Output: image. Use for: photorealistic scenes, editorial photography, on-image typography, transparent-background assets.

post/api/v1/qwen2-1-text-to-image

Request

  • Base URL: https://api.muapi.ai
  • URL: https://api.muapi.ai/api/v1/qwen2-1-text-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 image content, style, and composition to generate.

aspect_ratio'1:1' | '16:9' | '9:16' | '3:2' | '2:3' | '4:3' | '3:4' | '21:9' | '9:21' nullable

Output image aspect ratio.

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.