Назад к моделям
Активный APIQwen Image

Qwen2 Image

qwen2-image

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

Обзор модели
Эндпоинт
/api/v1/images/generations
Стоимость в кредитах
10 credits / image
Обычная задержка
20-60 sec
Вход и выход
Text or image → PNG or JPEG

Возможности

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

Параметры запроса

ПараметрТипОбязательностьОписание
modelstringОбязательноModel identifier. По умолчанию: qwen2-image
promptstringОбязательноGeneration or edit instruction, up to 5000 characters.
image_urlsstring[]НеобязательноSource image URLs. Supplying an image activates edit mode.
aspect_ratiostringНеобязательноOutput aspect ratio. По умолчанию: 16:9
output_formatpng | jpegНеобязательноGenerated file format. По умолчанию: png

Пример запроса

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"
}'

Генерация асинхронна. Опросите GET /api/v1/tasks/ с тем же Bearer-ключом.