curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-4.0",
"input": {
"prompt": "A paper boat floats through a miniature city at sunset."
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1792741800-example",
"status": "not_started",
"created_time": "2026-10-23T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Kling
Kling 4.0
Generate 3–30 second videos from text, reference images, and reference videos at 720p or 1080p.
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-4.0",
"input": {
"prompt": "A paper boat floats through a miniature city at sunset."
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1792741800-example",
"status": "not_started",
"created_time": "2026-10-23T10: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 response result through the unified Query Task Status endpoint.
Models
- kling-4.0 — Text and reference-guided video generation
Features
- Flexible duration: Generate 3–30 second videos at
720por1080p. - Visual references: Supply up to 10 reference images and up to 5 reference videos. Refer to them in the prompt as
@image_1and@video_1, using their positions in the corresponding arrays. - Aspect ratios: Use
auto,16:9,9:16,1:1, or21:9.
Required parameters
prompt(string): Video instructions, 1–8,000 characters. Must contain at least one non-whitespace character. Reference uploaded materials with@image_1or@video_1.
Optional parameters
duration(integer): Output duration from 3 to 30 seconds. Default:5.resolution(string):720por1080p. Default:720p.aspect_ratio(string):auto,16:9,9:16,1:1, or21:9. When omitted, the ratio adapts to supplied materials; without materials, it defaults to16:9.reference_image_urls(array of strings): Up to 10 publicly accessible HTTP or HTTPS image URLs.reference_video_urls(array of strings): Up to 5 publicly accessible HTTP or HTTPS video URLs. Each video must last 3–30 seconds.
Examples
- Text-to-video: Send a
promptwithout reference materials. Setduration,resolution, oraspect_ratioonly when needed. - Reference images: Supply
reference_image_urlsand refer to the first image as@image_1. - Reference videos: Supply
reference_video_urlsand use@video_1to refer to the first video.
Notes
- Provide at most 10 reference images and at most 5 reference videos. The combined duration of all reference videos cannot exceed 30 seconds.
- Reference indexes start at 1 and follow the order of the corresponding input array. Use publicly accessible media URLs and omit unused optional fields.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Public model identifier.
Available options:
kling-4.0 Text instructions with up to 10 reference images and up to 5 reference videos. The combined duration of all reference videos must not exceed 30 seconds.
Show child attributes
Show child attributes
Optional webhook URL for task completion or failure notifications.
