Qwen Image Generation
Call the Qwen Image series via `/v1/images/generations`; the current project returns `ImageResponse` synchronously without using task_id polling.
- Route:
POST /v1/images/generations - Returns
ImageResponsesynchronously on success
Recommended Request Example
curl --request POST \
--url https://api.magickapi.com/v1/images/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-image",
"prompt": "A cute orange cat dozing off in the sunlight",
"n": 1,
"response_format": "url",
"parameters": {
"size": "1024*1024",
"watermark": false
}
}'Successful Response Example
{
"created": 1712345678,
"data": [
{
"url": "https://example.com/generated-image.png",
"b64_json": "",
"revised_prompt": ""
}
]
}Error Response Example
{
"error": {
"message": "Invalid request",
"type": "invalid_request_error",
"param": null,
"code": "invalid_request"
}
}Confirmable Fields
Standard Image Fields
The current project's public image API guarantees the availability of the following standard fields:
modelpromptnsizequalityresponse_format
Qwen / Alibaba Extended Fields
If you need to use Alibaba-compatible extensions, use nested objects instead of the top-level extension fields in the legacy documentation:
parametersinput
For example:
{
"model": "qwen-image",
"prompt": "Cyberpunk city night scene",
"parameters": {
"size": "1536*1024",
"n": 2,
"watermark": false
}
}Compatibility Notes
- For image editing, use
/v1/images/editsor/v1/editsinstead
Last updated on
Seedream 4.5
Describes the integration status of Seedream 4.5 in the current project, and the public design of the unified image interface.
Grok Imagine Image Generation
Call xAI image models through the unified image API; the current project returns a synchronous `ImageResponse` and does not support the legacy task_id polling documentation.