- Text to Video
- Image to Video
- Omni Video Generation
- Motion Control
- Element Management
- Voice Management
Create Task
POST /kling/v1/videos/text2videoGenerate video from text with model_name: "kling-3.0". Multi-shot storyboards, camera movement, sound, and voice references are supported.cURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/videos/text2video \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model_name": "kling-3.0",
"prompt": "A rabbit wearing glasses reads a newspaper at a table",
"duration": "5",
"mode": "pro",
"sound": "on",
"aspect_ratio": "1:1"
}'
Create response
200
{
"id": "860260753860210752",
"task_id": "860260753860210752",
"object": "video",
"model": "kling-v3",
"status": "",
"progress": 0,
"created_at": 1773130665
}
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Data exchange format. Use
application/json.Request parameters
string
required
Use
kling-3.0.string
Positive prompt, up to 2,500 characters; required for a single shot or intelligent storyboard.
string
Negative prompt, up to 2,500 characters.
boolean
default:false
Enable multi-shot generation.
string
With multi-shot, use
customize or intelligence.object[]
One to six custom shots whose durations add up to
duration.object[]
Up to two voice references.
string
default:"off"
Use
on or off; voice references require on.string
default:"std"
std for 720p, pro for 1080p, or 4k.string
default:"5"
Video duration from 3 to 15 seconds.
string
default:"16:9"
Use
16:9, 9:16, or 1:1.number
Prompt adherence from 0 to 1.
object
Preset or custom camera movement.
object
Platform watermark configuration through
enabled.Storyboards, voices, and camera movement
Whenmulti_shot is true, set shot_type to customize and supply multi_prompt, or use intelligence with prompt. Each custom shot contains index, prompt, and duration; each shot lasts at least 1 second and its prompt is at most 512 characters.Voice references use <<<voice_1>>> and <<<voice_2>>> in list order. Supply at most two voice_id values from voice management and set sound to on.camera_control.type supports simple, down_back, forward_up, right_turn_forward, and left_turn_forward. For simple, only one of horizontal, vertical, pan, tilt, roll, and zoom may be nonzero; every value ranges from -10 to 10.Interactive request parameters
Fill in and test the full Legacy request body.
Query Task
- Single task:
GET /kling/v1/videos/text2video/{task_id}. Status progresses fromsubmittedorprocessingtosucceedorfailed. - Task list:
GET /kling/v1/videos/text2video?pageNum=1&pageSize=30.pageNumis 1–1000 andpageSizeis 1–500.
Create Task
POST /kling/v1/videos/image2videoGenerate video from a first frame, an end frame, or both with model_name: "kling-3.0".cURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/videos/image2video \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model_name": "kling-3.0",
"image": "https://example.com/first-frame.png",
"prompt": "The character turns and walks toward the window",
"duration": "5",
"mode": "pro",
"sound": "off"
}'
200
{"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v3","status":"","progress":0,"created_at":1773130665}
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Data exchange format. Use
application/json.Request parameters
string
required
Use
kling-3.0.string
First frame as URL or raw Base64; at least one frame is required.
string
End frame; mutually exclusive with motion brush and camera control.
string
Positive prompt, up to 2,500 characters.
string
Negative prompt, up to 2,500 characters.
boolean
default:false
Enable multi-shot generation.
string
Use
customize or intelligence.object[]
One to six custom shots.
object[]
Up to three elements; mutually exclusive with
voice_list.object[]
Up to two voices; requires
sound: "on".string
Static motion-brush mask.
object[]
Up to six dynamic masks.
object
Preset or simple camera movement.
string
default:"std"
Use
std, pro, or 4k.string
default:"5"
Video duration from 3 to 15 seconds.
number
Prompt adherence from 0 to 1.
object
Platform watermark setting.
integer
required
Shot index, starting from 1.
string
required
Shot prompt, up to 512 characters.
string
required
Shot duration, at least 1 second; the sum must equal top-level
duration.integer
required
Element ID returned by element management.
string
required
Voice ID returned by voice management.
string
required
Dynamic mask URL or raw Base64.
object[]
required
Motion trajectory coordinates.
integer
required
Horizontal coordinate from the bottom-left origin.
integer
required
Vertical coordinate from the bottom-left origin.
string
required
simple or one of four preset compound movements.object
Simple movement configuration; only one of six values may be nonzero.
boolean
default:false
Add the platform watermark.
Create response
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
Model used by the task.
string
Initial task status.
integer
Initial progress.
integer
Creation Unix timestamp.
Image, storyboard, and motion-brush rules
image and image_tail accept a public URL or raw Base64 without a data URI prefix. Use JPG, JPEG, or PNG up to 10 MB, at least 300 px per side, with an aspect ratio from 1:2.5 to 2.5:1. At least one frame is required. An end frame, motion brush, and camera control are mutually exclusive.Dynamic motion brush supports up to 6 masks. Mask dimensions must match the input image and each other. For a 5-second video, each trajectory contains 2–77 coordinates measured from the bottom-left corner.Multi-shot, voice, and camera-control rules are the same as text-to-video. element_list and voice_list cannot be used together.Interactive request parameters
Fill in and test every first/end-frame, storyboard, brush, element, voice, and camera field.
Query Task
Query by task ID
GET /kling/v1/videos/image2video/{task_id}string
required
Task ID returned by creation.
task_status, task_status_msg, timestamps, and task_result.videos[]. A successful video contains id, url, watermark_url, and duration.Query task list
GET /kling/v1/videos/image2video?pageNum=1&pageSize=30integer
default:1
Page number, 1–1000.
integer
default:30
Items per page, 1–500.
Create Task
POST /kling/v1/videos/omni-videoUse model_name: "kling-3.0-omni" with text, images, video, and elements for generation or editing.cURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/videos/omni-video \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model_name": "kling-3.0-omni",
"prompt": "The character in <<<image_1>>> walks into a rainy neon street",
"image_list": [{"image_url": "https://example.com/character.png"}],
"duration": "5",
"mode": "pro",
"aspect_ratio": "16:9"
}'
200
{"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v3-omni","status":"","progress":0,"created_at":1773130665}
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Data exchange format. Use
application/json.Request parameters
string
required
Use
kling-3.0-omni.string
Up to 2,500 characters; reference media with the official placeholders.
object[]
Reference images and optional first/end frames.
object[]
At most one reference video, including
refer_type and keep_original_sound.object[]
Element count depends on whether a video is supplied.
boolean
default:false
Enable multi-shot generation.
string
Use
customize or intelligence.object[]
One to six custom shots.
string
default:"pro"
Use
std, pro, or 4k.string
Use
16:9, 9:16, or 1:1 when applicable.string
default:"5"
3–15 seconds; ignored for
refer_type: "base".string
default:"off"
Must be
off when video_list is present.object
Platform watermark setting.
string
required
Reference image URL or raw Base64.
string
first_frame or end_frame; an end frame requires a first frame.string
required
Reference video URL.
string
default:"base"
base edits the source video; feature references its characteristics.string
Use
yes or no.integer
required
Element ID from element management.
integer
required
Shot index.
string
required
Shot prompt, up to 512 characters.
string
required
Shot duration, at least 1 second.
boolean
default:false
Add the platform watermark.
Create response
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
kling-v3-omni.string
Initial task status.
integer
Initial progress.
integer
Creation Unix timestamp.
Media constraints
Images accept URL or raw Base64, JPG/JPEG/PNG, up to 10 MB, at least 300 px per side, and aspect ratio 1:2.5 to 2.5:1. An end frame requires a first frame. Without a reference video, images plus multi-image elements total at most 7 and video-character elements at most 3. With a reference video, those limits become 4 and 1.Reference video accepts MP4/MOV, 3–15.5 seconds, up to 200 MB, 24–60 fps, dimensions 700–4553 px, no more than 8,294,400 pixels, and aspect ratio 1:2.5 to 2.5:1.refer_type: "base" edits the original video, preserves its duration, and disables multi-shot and first/end-frame controls. refer_type: "feature" references content, motion, style, or camera movement and can use intelligent multi-shot. keep_original_sound controls source audio; new sound generation is unavailable whenever a reference video is present.Interactive request parameters
Fill in and test the complete Omni Legacy request body.
Query Task
Query by task ID
GET /kling/v1/videos/omni-video/{task_id}
string
required
Task ID returned by creation.
task_status, task_status_msg, task_result.videos[], and timestamps.Query task list
GET /kling/v1/videos/omni-video?pageNum=1&pageSize=30
integer
default:1
Page number, 1–1000.
integer
default:30
Items per page, 1–500.
Create Task
POST /kling/v1/videos/motion-controlTransfer movement from a reference video to a character image with model_name: "kling-3.0".cURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/videos/motion-control \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model_name": "kling-3.0",
"image_url": "https://example.com/character.png",
"video_url": "https://example.com/motion.mp4",
"prompt": "The character performs the reference action in a studio",
"keep_original_sound": "yes",
"character_orientation": "image",
"mode": "pro"
}'
200
{"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v3","status":"","progress":0,"created_at":1773130665}
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Data exchange format. Use
application/json.Request parameters
string
required
Use
kling-3.0.string
required
Character image as URL or raw Base64.
string
required
Motion reference video URL.
string
Scene, motion, or camera guidance, up to 2,500 characters.
object[]
At most one element.
string
default:"yes"
Use
yes or no.string
required
Use
image or video.string
required
Use
std or pro.object
Platform watermark setting.
integer
required
Element ID from element management; at most one.
boolean
default:false
Add the platform watermark.
Create response
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
kling-v3.string
Initial task status.
integer
Initial progress.
integer
Creation Unix timestamp.
character_orientation: "image", the video may be 3–10 seconds; with video, it may be 3–30 seconds. Element references follow the video’s orientation.Complex or fast motion can produce a result shorter than the uploaded video because the model only extracts valid continuous action segments. Generation can proceed once at least 3 seconds of usable continuous motion is found. Credits consumed in this case are non-refundable, so reduce the motion complexity or speed when necessary.
Interactive request parameters
Fill in and test the complete motion-control request body.
Query Task
Query by task ID
GET /kling/v1/videos/motion-control/{task_id}
string
required
Task ID returned by creation.
task_result.videos[] match the other Kling Legacy video operations.Query task list
GET /kling/v1/videos/motion-control?pageNum=1&pageSize=30
integer
default:1
Page number, 1–1000.
integer
default:30
Items per page, 1–500.
Element APIs
| Operation | Method and path |
|---|---|
| Create custom element | POST /kling/v1/general/custom-elements |
| List custom elements | GET /kling/v1/general/custom-elements |
| List preset elements | GET /kling/v1/general/presets-elements |
Create a custom element
cURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/general/custom-elements \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"element_name": "my-character",
"element_description": "The lead character",
"element_frontal_image": "https://example.com/front.png",
"element_refer_list": [
{"image_url": "https://example.com/side.png"},
{"image_url": "https://example.com/close-up.png"}
],
"tag_list": [{"tag_id": "o_102"}]
}'
200
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"element_id": 0,
"element_name": "string",
"element_description": "string",
"element_frontal_image": "image_url_0",
"element_refer_list": [{"image_url": "image_url_1"}],
"tag_list": [{"id": "o_102", "name": "Character", "description": "string"}],
"owned_by": "string"
}
}
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Use
application/json.Request body
string
required
Element name, up to 20 characters.
string
required
Element description, up to 100 characters.
string
required
Front-view image as an accessible URL or raw Base64 without a data URI prefix.
object[]
required
One to three alternate-angle reference images.
string
required
Reference image URL or raw Base64 without a data URI prefix.
object[]
Element tags.
string
required
o_101 trend, o_102 character, o_103 animal, o_104 item, o_105 costume, o_106 scene, o_107 effect, or o_108 other.Create response
integer
Error code;
0 indicates success.string
Error information or success message.
string
System-generated request ID for tracking and troubleshooting.
integer
Element ID used by supported video APIs.
string
Element name.
string
Element description.
string
Front-view reference image URL.
object[]
Alternate-angle reference images.
string
Reference image URL.
object[]
Element tags.
string
Tag ID.
string
Tag name.
string
Tag description.
string
Element owner;
kling identifies an official preset.List custom elements
GET /kling/v1/general/custom-elements?pageNum=1&pageSize=30integer
default:1
Page number from 1 to 1,000.
integer
default:30
Items per page from 1 to 500.
code, message, request_id, and data[]. Each item contains all element fields from the create response plus final_unit_deduction, the final units deducted for creation.200
{
"code": 0,
"message": "string",
"request_id": "string",
"data": [{
"element_id": 0,
"element_name": "string",
"element_description": "string",
"element_frontal_image": "image_url_0",
"element_refer_list": [{"image_url": "image_url_1"}],
"tag_list": [{"id": "o_102", "name": "Character", "description": "string"}],
"final_unit_deduction": "string",
"owned_by": "string"
}]
}
List preset elements
GET /kling/v1/general/presets-elements?pageNum=1&pageSize=30integer
default:1
Page number from 1 to 1,000.
integer
default:30
Items per page from 1 to 500.
final_unit_deduction. Official preset elements have owned_by: "kling".This page strictly documents the Kling Legacy element API.
Voice APIs
| Operation | Method and path |
|---|---|
| Create custom voice | POST /kling/v1/general/custom-voices |
| Query custom voice | GET /kling/v1/general/custom-voices/{id} |
| List custom voices | GET /kling/v1/general/custom-voices |
| List preset voices | GET /kling/v1/general/presets-voices |
| Delete custom voice | POST /kling/v1/general/delete-voices |
Create and query
voice_name is at most 20 characters. Supply at least one of voice_url or video_id. A voice URL may point to MP3, WAV, MP4, or MOV containing one clean speaker for 5–30 seconds. A qualifying historical generated video can be supplied through video_id under the same audio constraints.cURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/general/custom-voices \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"voice_name": "narrator",
"voice_url": "https://example.com/voice.mp3"
}'
200
{"code":0,"message":"SUCCEED","request_id":"request-id","data":{"task_id":"850087542757535834","task_status":"submitted"}}
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Data exchange format. Use
application/json.Request parameters
string
required
Custom voice name, up to 20 characters.
string
Public MP3, WAV, MP4, or MOV URL; at least one source is required.
string
Eligible historical generated-video ID; at least one source is required.
Create response
integer
0 indicates success.string
Response message.
string
Request ID.
string
Voice creation task ID.
string
submitted, processing, succeed, or failed.string
Failure reason.
object[]
Created voices.
Query custom voice
GET /kling/v1/general/custom-voices/{id}
string
required
Task ID returned by voice creation.
voice_id, voice_name, trial_url, and owned_by.List custom voices
GET /kling/v1/general/custom-voices?pageNum=1&pageSize=30
integer
default:1
Page number, 1–1000.
integer
default:30
Items per page, 1–1000.
List preset voices
GET /kling/v1/general/presets-voices?pageNum=1&pageSize=30
integer
default:1
Page number, 1–1000.
integer
default:30
Items per page, 1–1000.
owned_by: "kling" and cannot be deleted.Delete custom voice
POST /kling/v1/general/delete-voices
string
required
Custom voice ID to delete.
code, message, request_id, and deletion task data.Voice Management APIs
Open the interactive reference for each voice operation.
These references use Kling’s Legacy request structures. AnyFast adds the
/kling route prefix while retaining the Legacy endpoint names and request fields.