curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-o3-image",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic futuristic alley with rain and neon reflections",
"resolution": "4K",
"size": "16:9",
"output_format": "png",
"n": 2
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}Kling
Kling-o3
A high-expressiveness image generation model optimized for strong semantic understanding and scene composition, ideal for creative and narrative-driven visuals
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-o3-image",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic futuristic alley with rain and neon reflections",
"resolution": "4K",
"size": "16:9",
"output_format": "png",
"n": 2
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_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 response result through the unified Query Task Status endpoint.
Available Model
- kling-o3-image - Prompt-only image generation
- kling-o3-image-edit - Image editing with reference images
Supported Parameters
prompt- Required generation or editing promptimage_urls- Optional reference image URLs,1-10images, used for image editing modeelements- Optional array of element descriptors for character/object control. Reference them in prompt as@Element1,@Element2, etc. Recommended structure:frontal_image_urlfor the main face/object image, and optionalreference_image_urlsfor additional reference viewsresolution-1K,2K,4Ksize- Forkling-o3-image:16:9,9:16,1:1,4:3,3:4,3:2,2:3,21:9; forkling-o3-image-edit:auto,16:9,9:16,1:1,4:3,3:4,3:2,2:3,21:9output_format-jpeg,png,webpn- Number of output images,1-9
Elements Notes
elementsis intended for upstream face/object control- Recommended element fields:
frontal_image_url: public image URL for the main character/object viewreference_image_urls: optional array of additional public image URLs
elementsis optional and should only be used when you need stronger subject consistency
Billing Notes
Billing is based on the selected resolution and the output count specified byn.
- Total charge depends on the selected resolution and
n
How to Call
Use the unified submit endpoint:POST /api/generate/submit
Prompt-only example:
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-o3-image",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic futuristic alley with rain and neon reflections",
"resolution": "4K",
"size": "16:9",
"output_format": "png",
"n": 2
}
}'
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-o3-image-edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Turn the reference scene into a luxury night interior with dramatic window light",
"image_urls": ["https://example.com/reference1.png"],
"resolution": "4K",
"size": "auto",
"output_format": "png",
"n": 1
}
}'
Authorizations
All API endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
