Retour aux modèles
API activeQwen Image
API activeQwen ImageQwen2 Image
qwen2-imageReliable 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ètre | Type | Exigence | Description |
|---|---|---|---|
| model | string | Requis | Model identifier. Par défaut: qwen2-image |
| prompt | string | Requis | Generation or edit instruction, up to 5000 characters. |
| image_urls | string[] | Facultatif | Source image URLs. Supplying an image activates edit mode. |
| aspect_ratio | string | Facultatif | Output aspect ratio. Par défaut: 16:9 |
| output_format | png | jpeg | Facultatif | Generated 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.