Retour aux modèles
API activeQwen Image

Qwen2 Image

qwen2-image

Reliable Qwen image route for text generation and image editing workflows with broad prompt and aspect-ratio support.

Présentation du modèle
Endpoint
/api/v1/images/generations
Coût en crédits
10 credits / image
Latence habituelle
20-60 sec
Entrée et sortie
Text or image → PNG or JPEG

Capacités

  • Text-to-image
  • Image editing
  • Long prompts
  • Common aspect ratios

Paramètres de requête

ParamètreTypeExigenceDescription
modelstringRequisModel identifier. Par défaut: qwen2-image
promptstringRequisGeneration or edit instruction, up to 5000 characters.
image_urlsstring[]FacultatifSource image URLs. Supplying an image activates edit mode.
aspect_ratiostringFacultatifOutput aspect ratio. Par défaut: 16:9
output_formatpng | jpegFacultatifGenerated file format. Par défaut: png

Exemple de requête

curl https://qwenapi.org/api/v1/images/generations \
  -H "Authorization: Bearer $QWEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen2-image",
  "prompt": "A clean architectural model photographed in a daylight studio",
  "aspect_ratio": "4:3",
  "output_format": "png"
}'

L'endpoint de génération est asynchrone. Interrogez GET /api/v1/tasks/ avec la même clé Bearer.