curl --request POST \
--url https://api.tikway.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "bailian/qwen-image-3.0-pro",
"prompt": "一张电影感的上海雨夜街景,霓虹灯倒映在湿润路面上,写实摄影",
"size": "1024x1024",
"prompt_extend": true,
"watermark": false
}
'{
"created": 1788451200,
"background": "opaque",
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA...",
"index": 0
}
],
"output_format": "png",
"size": "1024x1024"
}Image generation
qwen-image-3.0-pro supports text-to-image and image-to-image through POST /v1/images/generations, with up to 3 reference images in images. prompt_extend_mode=agent is available for text-to-image only. enable_thinking requires prompt_extend=true. n is not supported by this endpoint.
curl --request POST \
--url https://api.tikway.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "bailian/qwen-image-3.0-pro",
"prompt": "一张电影感的上海雨夜街景,霓虹灯倒映在湿润路面上,写实摄影",
"size": "1024x1024",
"prompt_extend": true,
"watermark": false
}
'{
"created": 1788451200,
"background": "opaque",
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA...",
"index": 0
}
],
"output_format": "png",
"size": "1024x1024"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Required. Use a model ID or available alias returned by Get Models.
1"bailian/qwen-image-3.0-pro"
"qwen-image-3.0-pro"
Required. Describe the image to generate.
1Output size as WIDTHxHEIGHT, or auto for the model default. Supported sizes depend on the selected model.
^(auto|[1-9][0-9]*x[1-9][0-9]*)$"1024x1024"
"2048x2048"
"1536x1024"
Optional reference images for image-to-image generation. Omit for text-to-image generation. Image limits depend on the selected model.
1 - 3 elements1Optional. Whether to enable intelligent prompt word rewriting.
Optional. Prompt word rewriting mode. Direct supports Vincentian diagrams and Tusheng diagrams; agent only supports Vincentian diagrams.
direct, agent Optional. Whether to enable thinking mode. When set to true prompt_extend cannot be turned off explicitly.
Optional. Describe what you don't want to appear in the results.
Optional. Random seed. Fixed seeds improve result reproducibility but do not guarantee pixel-level consistency.
0 <= x <= 2147483647Optional. Whether to add Qwen-Image watermark in the lower right corner of the generated image.
Response format: url returns image URLs; b64_json returns Base64 image data.
b64_json, url Response
The image was generated successfully. The gateway has downloaded the upstream temporary image and converted it to Base64 without the data URL prefix.
The Unix timestamp (in seconds) when the gateway completed response conversion.
x >= 0The current Qwen path is fixed to return opaque.
"opaque"The format inferred by the gateway based on the Content-Type of the downloaded image. Omitted when no recognized type is provided by the upstream.
png, jpeg, webp Actual or requested output size. Omitted when neither the request nor the upstream response provides a size.
^[1-9][0-9]*x[1-9][0-9]*$
