Kling API examples: Kling 4.0, 4.0 Flash, v3 and Omni (useapi.net)
Runnable Node.js examples for the Kling API by useapi.net, a third-party REST API for Kling AI by Kuaishou Technology. It uses your Kling AI subscription: Free, Standard $8.80, Pro $32.56, Premier from $80.96 or Ultra+ $544.99 a month (as of November 2026). The Free plan runs only text-to-speech and face detection, so videos need Standard or higher.
The examples make Kling 4.0, 4.0 Flash, 3.0, 3.0 Turbo and 2.6 video (text-to-video, image-to-video with keyframes, multi-shot, motion control, native sound), Omni O1, 3.0, 4.0 and 4.0 Flash video from references, talking lip-sync avatars with text-to-speech, Kling Image 4.0 images up to 8K with product pages and web designs, and KOLORS 3.0 images, with curl calls for lip-sync, virtual try-on and upscale. A hosted MCP server adds 46 tools for AI assistants. You don't need a Kling developer account.
Each example reads a list of prompts from prompts.json, submits them through the useapi.net Kling API, polls each task until it is final, and downloads every result — preferring the clean, non-watermarked master — so you can queue a batch and come back to the winners.
| Example | What it does | Tutorial |
|---|
image-4/ | Batch-generate Kling Image 4.0 images (omni_version: v4): 2K, 4K and 8K, Series Mode stories, style, tone and font presets, product detail pages and web designs | How to Generate Kling Image 4.0 Images via the Kling API |
kling-4/ | Batch-generate Kling 4.0 (kling-v4-0) video: 3–30 s, 720p, 1080p or 4K, HDR at 1080p and 4K, stereo audio, 21:9, directed multi-shot, and image-to-video from a start frame, keyframes and an end frame, up to 10 images in total. Kling 4.0 Flash (kling-v4-0-flash): 720p, 3–20 s, from a prompt or a start frame | How to Generate Kling 4.0 Video via the Kling API |
text-to-video/ | Batch-generate Kling 4.0 / 4.0 Flash / v3 / v2.x video from text prompts (with notes on adapting it to the image-to-video frames endpoint) | How to Generate AI Video with Kling v3 via the Kling API |
omni/ | Batch-generate Kling Omni video (o1, v3, v4 or v4-flash) — multi-image reference, saved Video Elements, and v3 multi-shot sequences | Multi-Reference & Multi-Shot Video with Kling Omni |
lip-sync/ | Batch-generate talking lip-sync avatars from an image + TTS text or an audio file | Kling Lip-Sync Avatars, Motion Control & Image Generation |
motion-control/ | Batch-transfer motion from a reference video onto a still image | Kling Lip-Sync Avatars, Motion Control & Image Generation |
image-generation/ | Batch-generate images with Kolors (kling-v3-0 text-to-image + @image_N references) | Kling Lip-Sync Avatars, Motion Control & Image Generation |
n8n/ | An n8n workflow: a Google Sheet queue (plus a form) that makes Kling 4.0 / 4.0 Flash / v3 videos and spreads them across several Kling accounts, writes each task id at once, and optionally saves the results to Google Drive | Run several Kling accounts |
Quick start
You need Node.js v21 or newer (no dependencies to install), a useapi.net API token, and a connected Kling account (one $15/month subscription covers every useapi.net API and 3 Kling accounts):