Model parameters
- Model IDs:
qwen-image-2.1-turbo/qwen-image-2.1-pro - Pricing: See the model pages for Qwen-Image-2.1-turbo and Qwen-Image-2.1-pro.
- Endpoint:
https://geekai.co/api/v1/images/generations - Parameters: See the Image API reference.
- Authentication: Get an API key.
The following Image API parameters are not supported:
strengthaspect_ratioqualitystyle_presetresponse_formatoutput_formatmaskbackground
size as a widthxheight string, such as “1024x1024”. If omitted, the model recommends a resolution based on the prompt:
- Text-to-image (T2I): Any dimensions with a total pixel count between
512x512and2048x2048and an aspect ratio between1:8and8:1. - Image-to-image (I2I): Any dimensions with a total pixel count between
512x512and2048x2048and an aspect ratio between1:8and8:1.
enhance_prompt instead of the official prompt_extend to expand and refine the original prompt for better image quality and detail.
Set extra_body.prompt_extend_mode to select the prompt optimization mode:
direct: Direct prompt enhancement (DPE), the default. Suitable for most use cases and supported for both text-to-image and image-to-image generation.agent: Agentic prompt enhancement (APE) provides more detailed rewrites. Text-to-image only; passingagentfor image-to-image generation returns a400error.
n to specify the number of images, up to 6. The default is 1.
For image-to-image generation, pass reference images in image as URLs or Base64-encoded data. Supply up to 10 images, using an array for multiple images. Requirements:
- Supported formats: PNG, JPG, JPEG, WEBP, BMP, TIFF, and GIF.
- Each image must be no larger than 10 MB, with a long-to-short side ratio no greater than 10:1.
- For best results, use images with both dimensions between 384 and 2048 pixels.
extra_body.enable_thinking to enable thinking mode. It defaults to true and takes effect only when enhance_prompt=true. Enabling it improves image quality but takes longer.
Pricing
Like GPT-Image-2, Qwen-Image-2.1 supports any resolution from512x512 to 2048x2048. Prices are as follows:
Generated images are billed per image, regardless of size or quality.
Text-to-image generation
Give the model a clear, precise description to quickly generate a high-quality image:enhance_prompt to true:
billed_units is the billable number of generated images.
Image-to-image generation
Single image Pass a single image inimage to edit it or generate an image based on it:
image to generate an image based on several references:
