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/edit",
"input": {
"prompt": "Preserve the product and replace the background with a warm modern studio.",
"image_urls": [
"https://cdn.vidgo.ai/temp/reference-product.png"
],
"size": "auto",
"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 Image Edit
Edit one image with Qwen Image 2.1 using text instructions and reference images.
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/edit",
"input": {
"prompt": "Preserve the product and replace the background with a warm modern studio.",
"image_urls": [
"https://cdn.vidgo.ai/temp/reference-product.png"
],
"size": "auto",
"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"
}
}- Submit the request with
VIDGO_API_KEY. Atask_idis returned. Keep it until the task reachesfinishedorfailed. - Use Query Task Status to retrieve the result. If you provide a
callback_url, Vidgo sends the result to your webhook when the task finishes or fails.
Qwen Image 2.1 Image Edit
Usage Guide
Edit one image with Qwen Image 2.1 using text instructions and reference images.- Set
modeltoalibaba/qwen-image-2.1/edit. - Place
modeland optionalcallback_urlat the request root; place workflow parameters insideinput. - Each request produces one image.
- For prompt-only generation, use Text to Image with
model=alibaba/qwen-image-2.1/text-to-image.
Parameter Details
promptis required. Supply non-blank text of up to 5,000 characters.image_urlsis required and accepts 1 to 10 reference image URLs. Use publicly accessible HTTP(S) URLs in the same order as the references in your prompt.sizedefaults toauto.autofollows the reference image aspect ratio.- A transparent background requires
output_format=pngorwebp. mask_urlrequires exactly one reference image andbackground=opaque. White areas change; black areas stay unchanged. Match the reference aspect ratio; the mask is scaled to the reference dimensions.- With a mask, output follows the reference aspect ratio;
sizeandprompt_extendare ignored. - Reference images support JPEG, PNG, and WebP, up to 30 MB and 25 megapixels per image. Media limits are checked during generation.
Developer Notes
- Submission is asynchronous. Use the task status endpoint or a completion webhook to retrieve the final image.
- Billing is per output image and depends on
resolution. Text-to-image and editing use the same rate at each tier. - Credits are deducted on submission and refunded if the task fails.
Optional parameters
size(string): Output aspect ratio. auto follows the reference image. Ignored when mask_url is supplied. Accepted values:1:1,4:3,3:4,3:2,2:3,16:9,9:16,21:9,9:21,auto. Default:auto.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.mask_url(string): Optional local-edit mask. Requires exactly one reference image and an opaque background. White areas change and black areas stay unchanged. Match the reference aspect ratio; the mask is scaled to the reference. size and prompt_extend are ignored.prompt_extend(boolean): Enhance the prompt before generation. Ignored when mask_url is supplied. Default:true.seed(integer): Optional random seed. Omit to use a random seed.
Authorizations
Use Authorization: Bearer VIDGO_API_KEY.
Body
application/json