PiAPI
HomeWorkspace
HomeWorkspace
Join Discord
  1. Kling omni
  • Get Started
    • Overview
    • Quickstart
    • Make Instruction: How to Use PiAPI to Build a Workflow on Make?
  • Endpoints
    • Seedance
      • Less-Restriction Models Guide
      • Private Asset Library
      • Seedance 2.5
      • Seedance 2
      • Video Watermark Remover
      • Get task
    • Seedream
      • Seedream 5
      • Get Task
    • Byteaudio
      • Seed-audio
      • Get Task
    • Kling
      • Lipsync With PiAPI Kling API Examples
      • Motion Brush With PiAPI Kling API Example
      • Kling Elements Video Generation API
      • Kling Effects Video Generation
      • Cancel Task
        • Cancel Task
        • Cancel Tasks
      • Get Task
      • Create Task
      • Kling Virtual Try-On
      • Kling Effects
      • Kling Sound
      • Kling Avatar
      • Kling Motion Control
      • Kling Turbo
    • Kling omni
      • Kling o1
        POST
      • Kling 4.0 / 3.0 omni
        POST
      • Get Task
        GET
    • Minimax
      • Generate Video
      • MiniMax Speech
      • MiniMax Image
      • Get Task
    • Sora2
      • Sora2-preview Text to Video
      • Sora2 Text to Video
      • Sora2-Pro Text to Video
      • Sora2 Remove Watermark
      • Get task
    • Tools
      • File Upload API
      • Remove Background API
      • Remove Background-Get Task
      • Segment With Prompt API
      • Segment With Prompt API-Get Task
      • Image Upscale(Super Resolution) API
      • Image Upscale-Get Task
      • Video Upscale
      • Video Upscale-Get Task
      • Video Remove Background
      • Video Remove Background-Get task
      • Video Remove Subtitle
      • Video Remove Subtitle-Get task
      • Skin Tokens
      • Skin Tokens-Get task
    • Gemini
      • Gemini-2.5-flash-image
      • Nano Banana Pro
      • Nano Banana 2
      • Get task
    • GPT image
      • GPT-image API
    • LLM
      • How To Avoid Timeouts in Completion API
      • LLM API | Basic Completions
    • Omni Human
      • OmniHuman 1.5
      • Get task
    • Flux
      • Flux with LoRA and Controlnet
      • Available LoRA and Controlnet
      • Flux API with Redux Variation, Fill, Inpaint and Outpaint
      • Create Task
        • Text to Image
        • Image to Image
        • Kontext
      • Get task
    • Qwen Image
      • Text to Image
      • Image Edit
      • Get task
    • Z-Image
      • Text to Image
      • Get task
    • Faceswap
      • Multi Faceswap
      • Image Faceswap
      • Video Faceswap
      • Get Task
    • WanX
      • Generate WanX Task with LoRA Using PiAPI
      • Available LoRA Types for Wanx
      • Use Cases for Wanx LoRA
      • Use Cases for Wanx Control Camera
      • Create Task
      • Get Task
    • Wan
      • Wan2.6 Text to Video
      • Wan2.6 Image to Video
      • Get task
    • Hailuo
      • Generate Video
      • Get Task
    • Veo3
      • Veo3 Text to Video
      • Veo3 Image to Video
      • Veo3.1 Text to Video
      • Veo3.1 Image to Video
      • Get task
    • Skyreels
      • Create Task
      • Get Task
    • Framepack
      • Create Task
      • Get Task
    • Hunyuan Video
      • How to Make a Hunyuan API Call
      • Available Hunyuan Lora models
      • Get Task
      • Generate Video
    • Luma Dream Machine
      • Create Task
      • Get Task
    • Suno(service stopped)
      • Music(service stopped)
      • Lyrics(service stopped)
      • Get task
    • Song(Udio)
      • Song API Task Creation Examples
      • [Udio] Song Extend
      • Get Task
      • Create Task
      • [Udio] Generate Lyrics
    • Mmaudio
      • Get Task
      • Generate Audio
    • DiffRhythm
      • Generate Audio
      • Get Task
    • Ace Step
      • Create Task
        • Text to Audio
        • Audio to Audio
        • Audio Edit
        • Audio Extend
      • Get Task
    • TTS
      • Zeroshot Text-to-Speech F5-TTS
      • Get Task
    • Trellis
      • Trellis Create Task
      • Trellis2 Create Task
      • Get Task
    • Meshy
      • Meshy Create Task
      • Get Task
    • Pixal3D
      • Pixal3D Create Task
      • Get Task
    • Joycaption
      • Image Caption
      • Get Task
    • Midjourney
      • PiAPI Penalties on Midjourney Usage
      • Detailed Explaination on Midjourney Task Result
      • Midjourney V7 API Instructions
      • Create Task
        • Imagine
        • Upscale
        • Variation
        • Reroll
        • Describe
        • Seed
        • Blend
        • Inpaint
        • Outpaint
        • Pan
      • Cancel Task
        • Cancel Task
        • Cancel Tasks
      • Get Task
    • AI Hug
      • Get Task
      • Create Task
    • PiAPI Account Management
      • PiAPI Account Info
      • Task List Info
      • User Task History
  • Resources
    • Change Log
    • Output Storage
    • Unified API Schema
    • Webhook
    • Bulk Generation Service
    • Billings
    • PiAPI MCP Server
    • Workspace Manual
      • Host-your-account (HYA) | Back-up Account
      • Host-your-account (HYA) | Debug Checklist
      • Host-your-account (HYA) | Connected Account Status
    • Announcements
      • PiAPI 2025 January 1st Pricing Update
      • The discontinued support for midjourney
      • Sunsetting Suno
  • Schemas
    • Schemas
      • motion brush
      • Create Task
      • camera control
      • Cancel Params
      • Float2 Point
      • Control Points
      • txt2video-1.3b
      • txt2video-14b
      • txt2video-14b-lora
      • img2video-14b
      • img2video-14b-lora
      • img2video-14b-keyframe
      • img2video-14b-control-camera
      • wan22-txt2video-14b
      • wan22-img2video-14b
      • hunyuan-txt2video-lora
      • Trellis API/text-to-3D
      • Trellis API/image-to-3D
      • Trellis2 API/image-to-3D
      • Kling omni multi shot
      • VideoGenerationRequest
      • TaskRequest
      • TaskConfig
      • TaskInput
      • TaskResponse
      • ErrorResponse
    • Response
      • Unified-Task-Response
    • RequestBodies
      • Unified-Task-Request-Body
    • config
    • control_net_setting
    • lora_setting
    • VideoGenerationResponse
    • Pixal3D API/image-to-3D
  1. Kling omni

Kling 4.0 / 3.0 omni

POST
https://api.piapi.ai/api/v1/task
This is the api for Kling's Omni video generation API, covering Kling 4.0 Omni and Kling 3.0 Omni (the successor of Kling o1). Generate video from a prompt plus reference images, videos and audio. Choose the model with version:
4.0 — 720p or 1080p, 3 – 30 seconds; up to 10 images, 5 reference videos and 3 reference audios
4.0-flash — 720p only, 3 – 20 seconds; images and reference videos
3.0 — 720p or 1080p, 3 – 15 seconds; images, one reference video and multi-shots
Pricing (USD per second of output video)
Version720p1080p
4.00.16670.25
4.0-flash0.10N/A
3.0, no audio0.100.15
3.0, with audio0.150.20
4.0 / 4.0-flash with a reference video are billed per billable second instead: billable seconds = output duration + max(total reference video duration, output duration).
Version720p1080p
4.00.100.15
4.0-flash0.0667N/A
For 4.0 / 4.0-flash, image and audio references and audio settings do not change the price. Reference durations are measured from the files themselves and not rounded per clip; the task total is rounded to the nearest cent once.
Price examples
3.0, 720p, 10s, no audio: 10 * $0.10 = $1.00
3.0, multi-shots (shot1 2s + shot2 3s), 720p with audio: (2 + 3) * $0.15 = $0.75
4.0, 720p, 10s, images only: $1.67
4.0, 720p, 5s output + one 6.667s reference video: (5 + 6.667) * $0.10 → $1.17
4.0-flash, 720p, same inputs: $0.77
Feature support
4.04.0-flash3.0
Duration (seconds)3 – 303 – 203 – 15
1080p✓–✓
imagesup to 10up to 10✓ (up to 4 with video)
Reference videovideo, or videos up to 5video, or videos up to 5video (one)
audio_urlsup to 3––
multi_shots––✓
aspect_ratio: "21:9" / "auto"✓✓–
enable_audio defaulttruetruefalse
Cancel task––✓
Referencing inputs in the prompt
@image_1, @image_2 … refer to entries of images by position, starting at 1. An image can be used multiple times, e.g. use @image_1 as start frame, a woman @image_2 is introducing herself, and use @image_1 as end frame
Reference video: 3.0 uses @video; 4.0 / 4.0-flash use @video_1, @video_2 … by position
Reference audio (4.0): audio_1, audio_2 … by position
Notes
4.0 / 4.0-flash: prompt (up to 2,500 characters) and duration (integer) are required
4.0 / 4.0-flash references: send either video or videos, not both; at most 15 images, videos and audios in total; all must be HTTP(S) URLs
Reference video (4.0 / 4.0-flash): regular MP4 with square pixels, aspect ratio 2:5 – 5:2, at most 300 MiB, 3 – 30s each (4.0-flash 3 – 20s), combined at most 30s (4.0-flash 20s). Fragmented MP4 is not supported
Reference audio (4.0): MP3, WAV or FLAC, 5 – 30s, at most 50 MiB
aspect_ratio: "auto" (4.0 / 4.0-flash) requires image or video references and is the default when they are given; otherwise the default is 16:9
keep_original_audio: true keeps the reference video's original audio in the output. For 4.0 / 4.0-flash it requires a reference video and enable_audio: false
3.0: when video is provided, multi_shots cannot be used. If multi shots are used, prompt and duration are ignored; maximum 6 shots, total duration should not exceed 15 seconds
4.0 / 4.0-flash accept only the fields marked for them; unlisted fields and multi_shots are rejected with error.code: 10003. They require config.service_mode: "public"
4.0 / 4.0-flash tasks cannot be cancelled; keep polling Get Task for the final result

Request

Header Params

Body Params application/json

Examples
{
    "model": "kling",
    "task_type": "omni_video_generation",
    "input": {
        "prompt": "Close-up, static camera, a woman in swim suit near the sea is introducing herself.",
        "version": "3.0",
        "resolution": "720p",
        "duration": 3,
        "aspect_ratio": "16:9",
        "enable_audio": false
    },
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "https://webhook.site/5468eca8-1cad-4dd3-9799-b6fbd9770fda",
            "secret": ""
        }
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data '{
    "model": "kling",
    "task_type": "omni_video_generation",
    "input": {
        "prompt": "Close-up, static camera, a woman in swim suit near the sea is introducing herself.",
        "version": "3.0",
        "resolution": "720p",
        "duration": 3,
        "aspect_ratio": "16:9",
        "enable_audio": false
    },
    "config": {
        "service_mode": "public",
        "webhook_config": {
            "endpoint": "https://webhook.site/5468eca8-1cad-4dd3-9799-b6fbd9770fda",
            "secret": ""
        }
    }
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Example
{
    "code": 200,
    "data": {
        "task_id": "5a9b4d8f-6f1c-460d-b295-ab1d663f9b90",
        "model": "kling",
        "task_type": "omni_video_generation",
        "status": "pending",
        "config": {
            "service_mode": "public",
            "webhook_config": {
                "endpoint": "https://webhook.site/5468eca8-1cad-4dd3-9799-b6fbd9770fda",
                "secret": ""
            }
        },
        "input": {
            "aspect_ratio": "16:9",
            "enable_audio": true,
            "multi_shots": [
                {
                    "duration": 2,
                    "prompt": "a dog stands near sea"
                },
                {
                    "duration": 3,
                    "prompt": "the dog turns around and walks on beach"
                }
            ],
            "resolution": "720p",
            "version": "3.0"
        },
        "output": {
            "video": ""
        },
        "meta": {
            "created_at": "2026-02-07T02:31:17.998381738Z",
            "started_at": "0001-01-01T00:00:00Z",
            "ended_at": "0001-01-01T00:00:00Z",
            "usage": {
                "type": "point",
                "frozen": 10000000,
                "consume": 0
            },
            "is_using_private_pool": false
        },
        "detail": null,
        "logs": null,
        "error": {
            "code": 0,
            "raw_message": "",
            "message": "",
            "detail": null
        }
    },
    "message": "success"
}
Modified at 2026-10-24 03:04:32
Previous
Kling o1
Next
Get Task