Skip to main content
POST
Kling Text-to-Video Task (kling-v3)

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Headers

Content-Type
string
default:application/json
required

Data exchange format

Body

application/json
model_name
enum<string>
required

Model name

Available options:
kling-v3
prompt
string
required

Positive text prompt

  • Must not exceed 2500 characters
  • Use <<<voice_1>>> to specify a voice, index matching voice_list; up to 2 voices; sound must be 'on' when specifying voices; keep syntax simple, e.g.: A man<<<voice_1>>>says: "Hello"
  • When voice_list is not empty and prompt references a voice ID, billing is based on 'with specified voice'
  • Must not be empty when multi_shot is false or shot_type is intelligence.
Maximum string length: 2500
multi_shot
boolean
default:false

Whether to generate a multi-shot video. When this parameter is true, the prompt parameter is invalid and first/last frame video generation is not supported. When this parameter is false, the shot_type and multi_prompt parameters are invalid.

shot_type
enum<string>

Shot type Required when multi_shot is true.

Available options:
customize,
intelligence
multi_prompt
object[]

Multi-shot information including prompt, duration, etc. Define shot index and corresponding prompt and duration via index, prompt, duration parameters.

  • Max 6 shots, min 1 shot.
  • Max length per shot content: 512 characters.
  • Each shot duration must not exceed total task duration and must be >= 1.
  • Sum of all shot durations must equal total task duration.

Use key:value format:

Required when multi_shot is true and shot_type is customize.

Required array length: 1 - 6 elements
negative_prompt
string

Negative text prompt

  • Must not exceed 2500 characters
  • It is recommended to supplement negative prompt information through negative sentences in the positive prompt
Maximum string length: 2500
sound
enum<string>
default:off

Whether to also generate audio when creating the video

Available options:
on,
off
cfg_scale
number
default:0.5

Creative freedom of video generation; higher values result in less model freedom

Required range: 0 <= x <= 1
mode
enum<string>
default:std

Video generation mode

  • std: Standard mode, cost-effective, output video resolution 720P.
  • pro: Expert mode (high quality), better video quality, output video resolution 1080P.
  • 4k: 4K mode, high quality (same as pro), better video quality, output video resolution 4K.
Available options:
std,
pro,
4k
aspect_ratio
enum<string>
default:16:9

Aspect ratio of generated video frames (width:height)

Available options:
1:1,
16:9,
9:16
duration
enum<string>
default:5

Video duration in seconds.

Available options:
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
watermark_info
object

Whether to also generate a watermarked result.

  • Defined via the enabled parameter:
  • true to generate, false to not generate
  • Custom watermarks are not currently supported
callback_url
string

Callback notification URL for this task. If configured, the server will proactively notify when the task status changes.

external_task_id
string

Custom task ID.

  • Does not override the system-generated task ID, but supports querying by this ID.
  • Must be unique per user.

Response

200 - application/json

Task accepted.

code
integer

Error code; see error codes for details.

message
string

Error message.

request_id
string

Request ID, system-generated, used for request tracking and troubleshooting.

data
object