curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alibaba/qwen-image-2.1/text-to-image",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A product photograph of a silver coffee maker in a bright studio.",
"size": "1:1",
"resolution": "1K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "running",
"created_time": "2026-10-09T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Alibaba
Qwen Image 2.1 Text to Image
Generate one image with Qwen Image 2.1 using a text prompt.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alibaba/qwen-image-2.1/text-to-image",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A product photograph of a silver coffee maker in a bright studio.",
"size": "1:1",
"resolution": "1K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "running",
"created_time": "2026-10-09T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
Optional parameters
size(string): Output aspect ratio. Accepted values:1:1,4:3,3:4,3:2,2:3,16:9,9:16,21:9,9:21. Default:1:1.resolution(string): Output resolution tier. Accepted values:1K,2K. Default:1K.output_format(string): Output image format. Transparent output requires PNG or WebP. Accepted values:png,jpeg,webp. Default:png.enable_safety_checker(boolean): Enable content safety checking. Default:true.background(string): Background mode. Transparent output requires PNG or WebP. Accepted values:opaque,transparent. Default:opaque.prompt_extend(boolean): Enhance the prompt before generation. Default:true.seed(integer): Optional random seed. Omit to use a random seed.
Usage Guide
Generate one image with Qwen Image 2.1 using a text prompt.- Set
modeltoalibaba/qwen-image-2.1/text-to-image. - Place
modeland optionalcallback_urlat the request root; place workflow parameters insideinput. - Each request produces one image.
- For reference-image editing, use Image Edit with
model=alibaba/qwen-image-2.1/edit.
Parameter Details
promptis required. Supply non-blank text of up to 5,000 characters.sizedefaults to1:1.- A transparent background requires
output_format=pngorwebp.
Billing
Billing is per output image and depends onresolution. Text-to-image and editing use the same rate at each tier.
Credits are deducted on submission and refunded if the task fails.Body
application/json