Set
model_name to kling-o1. It supports 3–10 seconds, 720p (std), and 1080p (pro); multi-shot generation, 4K, and native audio generation are not supported.- Text to video
- Image and element reference
- Video editing
- Video reference
- First and end frames
- Query task
- Element management
Create task
POST /kling/v1/videos/omni-videocURL
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-o1",
"prompt": "A sailboat crosses golden morning fog as an aerial camera slowly moves forward",
"mode": "pro",
"aspect_ratio": "16:9",
"duration": "6",
"sound": "off"
}'
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 body
string
required
Model name. Use
kling-o1.string
required
Generation instruction, up to 2,500 characters.
string
default:"std"
Output mode.
std is 720p and pro is 1080p. Kling O1 does not support 4k.string
default:"16:9"
Output aspect ratio:
16:9, 9:16, or 1:1. Required without a first-frame or video reference.string
default:"5"
Output duration from 3 to 10 seconds.
string
default:"off"
Kling O1 does not support native audio generation. Use
off; it is required with video input.object
Platform watermark configuration.
boolean
default:false
Add the platform watermark.
Images support JPG, JPEG, and PNG, up to 10 MB each, at least 300 px per side, and a 1:2.5–2.5:1 aspect ratio. Videos support MP4 and MOV, at most one file up to 200 MB, at least 3 seconds, 720–2160 px, 24–60 fps, and a 1:2.5–2.5:1 aspect ratio.
Create response
200
{
"id": "860260753860210752",
"task_id": "860260753860210752",
"object": "video",
"model": "kling-video-o1",
"status": "queued",
"progress": 0,
"created_at": 1773130665
}
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
Model used for the task.
string
Initial task status, normally
queued.integer
Initial progress.
integer
Creation Unix timestamp.
Create task
POST /kling/v1/videos/omni-videocURL
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-o1",
"prompt": "The person in <<<image_1>>> wears the outfit from <<<element_1>>> and enters a cafe",
"image_list": [{"image_url": "https://example.com/character.png"}],
"element_list": [{"element_id": 123456789}],
"mode": "pro",
"aspect_ratio": "16:9",
"duration": "5",
"sound": "off"
}'
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 body
string
required
Model name. Use
kling-o1.string
required
Instruction up to 2,500 characters. Reference inputs as
<<<image_1>>> and <<<element_1>>> in array order.object[]
Reference images. Images plus multi-image element images are limited to seven without a reference video.
string
required
Public image URL or raw Base64 without a data URI prefix.
object[]
Reusable Legacy elements.
integer
required
Element ID returned by the Legacy Element Management API.
string
default:"std"
Output mode.
std is 720p and pro is 1080p. Kling O1 does not support 4k.string
default:"16:9"
Output aspect ratio:
16:9, 9:16, or 1:1. Required without a first-frame or video reference.string
default:"5"
Output duration from 3 to 10 seconds.
string
default:"off"
Kling O1 does not support native audio generation. Use
off; it is required with video input.object
Platform watermark configuration.
boolean
default:false
Add the platform watermark.
Images support JPG, JPEG, and PNG, up to 10 MB each, at least 300 px per side, and a 1:2.5–2.5:1 aspect ratio. Videos support MP4 and MOV, at most one file up to 200 MB, at least 3 seconds, 720–2160 px, 24–60 fps, and a 1:2.5–2.5:1 aspect ratio.
Create response
200
{
"id": "860260753860210752",
"task_id": "860260753860210752",
"object": "video",
"model": "kling-video-o1",
"status": "queued",
"progress": 0,
"created_at": 1773130665
}
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
Model used for the task.
string
Initial task status, normally
queued.integer
Initial progress.
integer
Creation Unix timestamp.
Create task
POST /kling/v1/videos/omni-videocURL
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-o1",
"prompt": "Change the weather in <<<video_1>>> to snow and apply a cinematic color grade",
"video_list": [{
"video_url": "https://example.com/source.mp4",
"refer_type": "base",
"keep_original_sound": "yes"
}],
"mode": "pro",
"sound": "off"
}'
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 body
string
required
Model name. Use
kling-o1.string
required
Editing instruction up to 2,500 characters. Reference the source as
<<<video_1>>>.object[]
required
Exactly one source video for this workflow.
string
required
Public MP4 or MOV URL. Base64 video input is not supported.
string
required
Use
base for source-video editing.string
default:"no"
Use
yes to preserve source audio or no to discard it.string
default:"std"
Output mode.
std is 720p and pro is 1080p. Kling O1 does not support 4k.string
default:"5"
Not supported for source-video editing; output follows the source-video duration.
string
default:"off"
Kling O1 does not support native audio generation. Use
off; it is required with video input.object
Platform watermark configuration.
boolean
default:false
Add the platform watermark.
Images support JPG, JPEG, and PNG, up to 10 MB each, at least 300 px per side, and a 1:2.5–2.5:1 aspect ratio. Videos support MP4 and MOV, at most one file up to 200 MB, at least 3 seconds, 720–2160 px, 24–60 fps, and a 1:2.5–2.5:1 aspect ratio.
Create response
200
{
"id": "860260753860210752",
"task_id": "860260753860210752",
"object": "video",
"model": "kling-video-o1",
"status": "queued",
"progress": 0,
"created_at": 1773130665
}
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
Model used for the task.
string
Initial task status, normally
queued.integer
Initial progress.
integer
Creation Unix timestamp.
Create task
POST /kling/v1/videos/omni-videocURL
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-o1",
"prompt": "Use the action and camera movement from <<<video_1>>> to generate the immediately following shot",
"video_list": [{
"video_url": "https://example.com/reference.mp4",
"refer_type": "feature",
"keep_original_sound": "no"
}],
"mode": "pro",
"aspect_ratio": "16:9",
"duration": "5",
"sound": "off"
}'
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 body
string
required
Model name. Use
kling-o1.string
required
Instruction up to 2,500 characters. Reference the video as
<<<video_1>>>.object[]
required
Exactly one reference video.
string
required
Public MP4 or MOV URL. Base64 video input is not supported.
string
required
Use
feature for content, motion, style, or camera reference and shot continuation.string
default:"no"
Use
yes to preserve source audio or no to discard it.string
default:"std"
Output mode.
std is 720p and pro is 1080p. Kling O1 does not support 4k.string
default:"16:9"
Output aspect ratio:
16:9, 9:16, or 1:1. Required without a first-frame or video reference.string
default:"5"
Output duration from 3 to 10 seconds.
string
default:"off"
Kling O1 does not support native audio generation. Use
off; it is required with video input.object
Platform watermark configuration.
boolean
default:false
Add the platform watermark.
Images support JPG, JPEG, and PNG, up to 10 MB each, at least 300 px per side, and a 1:2.5–2.5:1 aspect ratio. Videos support MP4 and MOV, at most one file up to 200 MB, at least 3 seconds, 720–2160 px, 24–60 fps, and a 1:2.5–2.5:1 aspect ratio.
Create response
200
{
"id": "860260753860210752",
"task_id": "860260753860210752",
"object": "video",
"model": "kling-video-o1",
"status": "queued",
"progress": 0,
"created_at": 1773130665
}
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
Model used for the task.
string
Initial task status, normally
queued.integer
Initial progress.
integer
Creation Unix timestamp.
Create task
POST /kling/v1/videos/omni-videocURL
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-o1",
"prompt": "Transition naturally from morning to night while preserving the building structure",
"image_list": [
{"image_url": "https://example.com/first.png", "type": "first_frame"},
{"image_url": "https://example.com/end.png", "type": "end_frame"}
],
"mode": "pro",
"duration": "6",
"sound": "off"
}'
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 body
string
required
Model name. Use
kling-o1.string
required
Generation instruction, up to 2,500 characters.
object[]
required
One first-frame image and, optionally, one end-frame image. This workflow cannot use elements.
string
required
Public image URL or raw Base64 without a data URI prefix.
string
required
first_frame or end_frame. An end frame requires a first frame.string
default:"std"
Output mode.
std is 720p and pro is 1080p. Kling O1 does not support 4k.string
default:"5"
Output duration from 3 to 10 seconds.
string
default:"off"
Kling O1 does not support native audio generation. Use
off; it is required with video input.object
Platform watermark configuration.
boolean
default:false
Add the platform watermark.
Images support JPG, JPEG, and PNG, up to 10 MB each, at least 300 px per side, and a 1:2.5–2.5:1 aspect ratio. Videos support MP4 and MOV, at most one file up to 200 MB, at least 3 seconds, 720–2160 px, 24–60 fps, and a 1:2.5–2.5:1 aspect ratio.
Create response
200
{
"id": "860260753860210752",
"task_id": "860260753860210752",
"object": "video",
"model": "kling-video-o1",
"status": "queued",
"progress": 0,
"created_at": 1773130665
}
string
AnyFast task ID.
string
Task ID, equal to
id.string
Always
video.string
Model used for the task.
string
Initial task status, normally
queued.integer
Initial progress.
integer
Creation Unix timestamp.
Query task
GET /kling/v1/videos/omni-video/{task_id}cURL
curl --request GET \
--url https://www.anyfast.ai/kling/v1/videos/omni-video/TASK_ID \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Use
application/json.Path parameters
string
required
Task ID returned by the create endpoint.
Task result
200
{
"code": 0,
"message": "",
"data": {
"task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"task_status": "succeed",
"task_result": {
"videos": [{"url": "https://example.com/generated.mp4", "duration": "7"}]
},
"created_at": 1773130665000,
"updated_at": 1773130765000
}
}
integer
Business status code;
0 indicates success.string
Response message.
string
Task ID.
string
submitted, processing, succeed, or failed.string
Failure details when the task fails.
object[]
Generated videos.
string
Temporary video download URL.
string
Actual video duration.
integer
Creation timestamp in milliseconds.
integer
Update timestamp in milliseconds.
Kling removes image and video URLs from task results after 30 days. Download and save generated media before the URLs expire.
Create custom element
POST /kling/v1/general/advanced-custom-elementscURL
curl --request POST \
--url https://www.anyfast.ai/kling/v1/general/advanced-custom-elements \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"element_name": "series-character",
"element_description": "The lead character",
"reference_type": "image_refer",
"element_image_list": {
"frontal_image": "https://example.com/front.png",
"refer_images": [{"image_url": "https://example.com/side.png"}]
},
"tag_list": [{"tag_id": "o_102"}]
}'
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
image_refer for image references or video_refer for one reference video.object
Required for
image_refer.string
Front-view image URL or raw Base64 without a data URI prefix.
object[]
One to three alternate-angle or close-up images.
string
Reference image URL or raw Base64.
object
Required for
video_refer.object[]
Exactly one reference video.
string
Public MP4 or MOV URL; 3–8 seconds, 1080p, 16:9 or 9:16, max 200 MB.
string
Optional voice ID to bind to the element.
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
200
{
"id": "863121016086724692",
"task_id": "863121016086724692",
"object": "video",
"model": "kling-element",
"status": "queued",
"progress": 0,
"created_at": 1773812605
}
string
AnyFast task ID.
string
Task ID, equal to
id.string
Object type; currently
video.string
Fixed value
kling-element.string
Initial status, normally
queued.integer
Task progress from 0 to 100.
integer
Creation Unix timestamp.
Query custom element
GET /kling/v1/general/advanced-custom-elements/{task_id}cURL
curl --request GET \
--url https://www.anyfast.ai/kling/v1/general/advanced-custom-elements/TASK_ID \
--header 'Authorization: Bearer YOUR_API_KEY'
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.Path parameters
string
required
Task ID returned by the custom element creation endpoint.
Query result
200
{
"code": 0,
"message": "",
"data": {
"task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"task_status": "succeed",
"task_result": {
"elements": [{"element_id": 123456789, "element_name": "series-character"}]
}
}
}
integer
Business status code;
0 indicates success.string
Response message.
string
Element creation task ID.
string
Task status.
object[]
Created elements.
integer
Reusable element ID for O1 requests.
string
Element name.
List preset elements
GET /kling/v1/general/advanced-presets-elementscURL
curl --request GET \
--url 'https://www.anyfast.ai/kling/v1/general/advanced-presets-elements?pageNum=1&pageSize=30' \
--header 'Authorization: Bearer YOUR_API_KEY'
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.Query parameters
integer
default:1
Page number from 1 to 1,000.
integer
default:30
Items per page from 1 to 500.
Query result
200
{
"code": 0,
"message": "",
"data": [{
"task_result": {
"elements": [{"element_id": 987654321, "element_name": "preset-character", "owned_by": "vod"}]
}
}]
}
integer
Business status code;
0 indicates success.string
Response message.
object[]
Preset element task records.
object[]
Preset elements.
integer
Preset element ID.
string
Element name.
string
Current preset elements normally return
vod.Kling O1 Guide
Review model capabilities, media constraints, and usage guidance.