curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alibaba/z-image/turbo",
"input": {
"prompt": "A ceramic vase on a wooden table in soft daylight.",
"size": "1:1",
"enable_safety_checker": true
}
}
'{
"code": 200,
"data": {
"task_id": "<string>",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
}
}Alibaba
Z-Image Turbo
Text-to-image generation and single-image editing with Z-Image Turbo
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/z-image/turbo",
"input": {
"prompt": "A ceramic vase on a wooden table in soft daylight.",
"size": "1:1",
"enable_safety_checker": true
}
}
'{
"code": 200,
"data": {
"task_id": "<string>",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
}
}- After submission, use the returned
task_idto retrieve the result through Query Task Status. - Provide
callback_urlto receive a POST notification when the task reachesfinishedorfailed.
Model
alibaba/z-image/turbo generates images from text and edits a single reference image.
Input parameters
prompt: Required string containing 1 to 1000 characters. Describe the image to generate or the edits to apply.image_urls: Optional array containing exactly one HTTP(S) image URL. Providing this field selects image editing.size: Required for text-to-image and optional for image editing. Values:1:1,4:3,3:4,16:9,9:16.enable_safety_checker: Optional boolean. Defaults totrue.
Text to image
{
"model": "alibaba/z-image/turbo",
"input": {
"prompt": "A ceramic vase on a wooden table in soft daylight.",
"size": "1:1",
"enable_safety_checker": true
}
}
Image editing
{
"model": "alibaba/z-image/turbo",
"input": {
"prompt": "Add soft studio lighting to this product photo.",
"image_urls": ["https://example.com/reference.png"],
"enable_safety_checker": true
}
}
Authorizations
Use Authorization: Bearer VIDGO_API_KEY.
Body
application/json
Z-Image Turbo model identifier.
Available options:
alibaba/z-image/turbo Example:
"alibaba/z-image/turbo"
Image generation parameters. size is required for text-to-image and optional when image_urls supplies an editing reference.
Provide at least one of size, image_urls.
- Option 1
- Option 2
Show child attributes
Show child attributes
Optional webhook callback URL.