curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "std",
"duration": 5,
"metadata": {
"image_list": [{"image_url": "https://example.com/portrait.jpg"}]
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "std",
"duration": 5,
"metadata": {"image_list": [{"image_url": "https://example.com/portrait.jpg"}]},
},
)
print(response.json())
const response = await fetch("https://toapis.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "kling-v3-omni",
prompt: "Make the person in <<<image_1>>> wave at the camera",
mode: "std",
duration: 5,
metadata: {
image_list: [{ image_url: "https://example.com/portrait.jpg" }]
}
})
});
console.log(await response.json());
Kling v3 Omni
Kling v3 Omni 動画生成
Generate videos with Kling v3 Omni using official Omni references: image_list, video_list, and element_list
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "std",
"duration": 5,
"metadata": {
"image_list": [{"image_url": "https://example.com/portrait.jpg"}]
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "std",
"duration": 5,
"metadata": {"image_list": [{"image_url": "https://example.com/portrait.jpg"}]},
},
)
print(response.json())
const response = await fetch("https://toapis.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "kling-v3-omni",
prompt: "Make the person in <<<image_1>>> wave at the camera",
mode: "std",
duration: 5,
metadata: {
image_list: [{ image_url: "https://example.com/portrait.jpg" }]
}
})
});
console.log(await response.json());
中国本土のユーザー向け: 中国本土のユーザーは
https://toapis.cn を API エンドポイント(Base URL)としてご利用ください。本ドキュメント内の例では https://toapis.com を https://toapis.cn に置き換えてください。- Async task API, returns a task ID after submission
- Uses the official Omni reference structures:
image_list,video_list, andelement_list mode=stdmaps to 720P,mode=promaps to 1080Paudio=truegenerates an audio video and is billed as Sound- Requests with
video_listare billed as Video audioandvideo_listare mutually exclusive
Use publicly accessible image or video URLs. Do not pass base64 media data. Upload local images with the Upload 画像API first.
Authorization
string
必須
All endpoints require Bearer Token authentication.
Authorization: Bearer YOUR_API_KEY
リクエストパラメータ
string
必須
Video generation model name, fixed as
kling-v3-omni.string
必須
Text prompt. Use official Omni placeholders to reference input assets:
<<<image_N>>>referencesmetadata.image_list<<<video_N>>>referencesvideo_list<<<element_N>>>referencesmetadata.element_list
"Make the person in <<<image_1>>> wave at the camera"List order must match the placeholder order in the prompt. The system does not auto-prepend a first frame or insert placeholders for you.
string
デフォルト:"std"
Generation mode. This also determines the billing resolution.
std- standard mode, 720Ppro- professional mode, 1080P
integer
デフォルト:"5"
Video duration in seconds. Options:
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15string
デフォルト:"16:9"
Video aspect ratio. Common values:
16:9, 9:16, 1:1boolean
デフォルト:"false"
Whether to generate an audio video.
audio and video_list are mutually exclusive. Do not pass audio=true when video_list is provided.object[]
Official Omni reference video list. Reference videos in the prompt with
<<<video_1>>>, <<<video_2>>>, and so on.object
Extended parameters.
表示 Show metadata fields
表示 Show metadata fields
object[]
Official Omni image list. Reference images in the prompt with
<<<image_1>>>, <<<image_2>>>, and so on.object[]
Official Omni subject/role reference list. Reference elements in the prompt with
<<<element_1>>>, <<<element_2>>>, and so on.boolean
Whether to add watermark.
Omni Reference Syntax
| Syntax | 説明 |
|---|---|
<<<image_1>>> | References the first item in metadata.image_list |
<<<video_1>>> | References the first item in video_list |
<<<element_1>>> | References the first item in metadata.element_list |
The order of
image_list, video_list, and element_list must match the order of the corresponding placeholders in prompt.Examples
Text-to-Video
{
"model": "kling-v3-omni",
"prompt": "A golden retriever running on a beach at sunset, cinematic quality",
"mode": "std",
"duration": 5,
"aspect_ratio": "16:9"
}
Image Reference
{
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "pro",
"duration": 5,
"metadata": {
"image_list": [
{"image_url": "https://example.com/portrait.jpg"}
]
}
}
First and End Frame
{
"model": "kling-v3-omni",
"prompt": "Transition from <<<image_1>>> to <<<image_2>>>",
"mode": "pro",
"duration": 5,
"metadata": {
"image_list": [
{"image_url": "https://example.com/start.jpg", "type": "first_frame"},
{"image_url": "https://example.com/end.jpg", "type": "end_frame"}
]
}
}
Reference Video Input
{
"model": "kling-v3-omni",
"prompt": "Replace the background in <<<video_1>>> with a beach sunset",
"mode": "std",
"video_list": [
{
"video_url": "https://example.com/source-video.mp4",
"refer_type": "base",
"keep_original_sound": "no"
}
]
}
Subject plus Motion Reference
{
"model": "kling-v3-omni",
"prompt": "Make <<<element_1>>> imitate the motion from <<<video_1>>>",
"mode": "pro",
"video_list": [
{
"video_url": "https://example.com/motion-reference.mp4",
"refer_type": "feature",
"keep_original_sound": "no"
}
],
"metadata": {
"element_list": [
{"url": "https://example.com/character.jpg", "type": "image", "role": "subject"}
]
}
}
Video generation is asynchronous. Use the Get Video Task ステータス endpoint to query progress and results.
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "std",
"duration": 5,
"metadata": {
"image_list": [{"image_url": "https://example.com/portrait.jpg"}]
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={
"model": "kling-v3-omni",
"prompt": "Make the person in <<<image_1>>> wave at the camera",
"mode": "std",
"duration": 5,
"metadata": {"image_list": [{"image_url": "https://example.com/portrait.jpg"}]},
},
)
print(response.json())
const response = await fetch("https://toapis.com/v1/videos/generations", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "kling-v3-omni",
prompt: "Make the person in <<<image_1>>> wave at the camera",
mode: "std",
duration: 5,
metadata: {
image_list: [{ image_url: "https://example.com/portrait.jpg" }]
}
})
});
console.log(await response.json());