Skip to main content
POST
Submit kwaivgi/kling-v2.6-pro/text-to-video through POST /api/generate/submit. Query the returned task_id with Task Status, or provide a top-level callback_url.

Parameters

  • prompt: Required nonblank string, 1 to 1,000 characters after trimming leading and trailing whitespace.
  • duration: Required integer: 5 or 10 seconds. Strings and fractional durations are rejected.
  • aspect_ratio: Required: 16:9, 9:16 or 1:1. Controls the output video aspect ratio.
  • sound: Required boolean: true for audio, false for no audio.
  • Use standard JSON types. Unknown input fields and invalid values are rejected before submission and charging.
  • URLs using example.com or your-domain.com are placeholders. Replace them with your own publicly accessible image URLs and callback endpoint where applicable.

Billing Factors

Billing depends on video duration (duration) and whether audio is generated (sound). The Pro text-to-video and image-to-video endpoints use the same rates.

Authorizations

Authorization
string
header
required

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:

Body

application/json
model
string
required
Example:

"kwaivgi/kling-v2.6-pro/text-to-video"

input
object
required

Input parameters for generation

callback_url
string<uri>

Webhook callback URL for result notifications

Example:

"https://your-domain.com/callback"

Response

200 - application/json

Task submitted successfully

code
integer
required

HTTP status code

Example:

200

data
object
required