모델 목록으로 돌아가기
라이브 APIQwen Image

Qwen Image 2.1

qwen-image-2.1

Text-to-image and reference editing at 1K or 2K, with up to 10 images, local masks, and optional transparent backgrounds.

모델 개요
엔드포인트
/api/v1/images/generations
크레딧 비용
4 credits at 1K, 8 at 2K
일반적인 처리 시간
Async
입력 및 출력
Text, up to 10 images → PNG, WebP, or JPEG

기능

  • 1K and 2K output
  • Up to 10 reference images
  • Local mask edits
  • Transparent PNG or WebP

요청 파라미터

파라미터유형요구 여부설명
modelstring필수Model identifier. 기본값: qwen-image-2.1
promptstring필수Generation or edit prompt, up to 5000 characters.
image_urlsstring[]선택One to ten public image URLs. Supplying images switches the request to image editing.
aspect_ratiostring선택Text-to-image ratios are 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, and 9:16. Image editing also accepts auto. 기본값: 3:2 for text-to-image, auto for edits
resolution1K | 2K선택Output resolution tier. 2K costs more credits than 1K. 기본값: 1K
backgroundopaque | transparent선택Transparent output cannot be JPEG, and cannot be combined with a mask. 기본값: opaque
output_formatpng | webp | jpeg선택Generated file format. 기본값: png
enhance_promptboolean선택Expand the prompt before generation. prompt_extend is accepted as an alias. 기본값: true
seedinteger선택Integer from 0 to 2147483647. 기본값: 0
mask_urlstring선택Public mask URL for a local edit. Requires exactly one reference image and an opaque background.

요청 예시

curl https://qwenapi.org/api/v1/images/generations \
  -H "Authorization: Bearer $QWEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen-image-2.1",
  "prompt": "Editorial poster for a night market, bold headline NIGHT MARKET, gold ink on charcoal paper, wide margins",
  "aspect_ratio": "3:2",
  "resolution": "1K",
  "output_format": "png"
}'

생성 엔드포인트는 비동기입니다. 동일한 Bearer 키로 GET /api/v1/tasks/를 폴링하세요.