Qwen-Image — a 20B MMDiT model for next-gen text-to-image generation. Especially strong at creating stunning graphic posters with native text.
This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the image generation results.
Here is an example of how to use the Qwen-Image Text to Image API.
Generate a task_id by sending a POST request to the Qwen-Image Text to Image API.
Request:
Copy
Ask AI
curl --location 'https://api.novita.ai/v3/async/qwen-image-txt2img' \--header 'Authorization: Bearer {{API Key}}' \--header 'Content-Type: application/json' \--data '{ "prompt": "A cinematic scene of a quiet girl with short brown hair sitting by a misty lake at dawn. She wears an oversized sweater, holding a warm mug. Soft morning light filters through the trees, cool tones, tranquil mood, light fog, 50mm photography style.", "size": "1024*1024"}'
Response:
Copy
Ask AI
{ "task_id": "{Returned Task ID}"}
Use task_id to get output images.
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.You can get image url in images of response.Request: