Skip to content

APIDotAI/kling-3-0-turbo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kling 3.0 Turbo API with APIDot

Build with the Kling 3.0 Turbo API using APIDot: cURL, Node.js, polling, webhooks, pricing, and production notes in one GitHub repo.

Try on APIDot | Get API Key | API Docs | Pricing | Main Examples

Why this repo exists

Kling 3.0 Turbo video generation for faster prompt, one-image, and multi-shot short-form previews with lower per-second APIDot credits.

This repository turns the APIDot workflow into runnable server-side examples: a verified cURL request, a native Node.js polling example, webhook receiver notes, prompt examples, pricing context, and production integration guardrails.

Overview

Kling 3.0 Turbo uses APIDot's shared async generation workflow for faster short-form video previews. Send kling-3.0-turbo/standard or kling-3.0-turbo/pro in the top-level model, optional callback_url, and supported fields inside input. Turbo supports prompt or multi_prompt, duration 3-15 seconds, at most one image URL, and aspect ratios 1:1, 16:9, or 9:16.

Capabilities

  • Use kling-3.0-turbo/standard for lower-cost rapid previews and kling-3.0-turbo/pro for sharper preview quality.
  • Send either input.prompt or input.multi_prompt; do not send both in the same request.
  • Keep total duration between 3 and 15 seconds. For multi_prompt, keep the provided input.duration equal to the sum of shot durations.
  • Use at most six multi_prompt items when planning shot-by-shot sequences.
  • Send at most one URL in input.image_urls for image-to-video guidance. Turbo does not support a tail-frame image.
  • Use full Kling 3.0 or another dedicated page when you need native 4K, generated audio, Motion Control, reference video transfer, or Kling element controls.

Common use cases

  • Product and marketing video generation
  • Social-first creative testing
  • Storyboard previews and prompt iteration
  • Backend media workflow prototypes
  • Production queues that need polling or webhooks

Pricing on APIDot

Catalog price: Starting at 17 credits per second | Standard: 17 credits/sec ($0.085), Pro: 22 credits/sec ($0.110).

Tier Model Resolution Credits APIDot listed price fal.ai listed price
Standard kling-3.0-turbo/standard 720p 17 $0.085 -
Pro kling-3.0-turbo/pro 1080p 22 $0.11 -

This README uses pricing data currently published in the APIDot model catalog. Check the APIDot model page before high-volume production runs.

Quick start

cp .env.example .env
# Edit .env and set APIDOT_API_KEY
cd node
npm start

The same request shape is available as a copy-paste cURL example in curl/generate.md.

API workflow

flowchart LR
    A[Submit generation request] --> B[Receive data.task_id]
    B --> C{Delivery mode}
    C -->|Polling| D[Check task status]
    C -->|Webhook| E[Receive callback_url event]
    D --> F[Read result URL from finished task]
    E --> F
Loading

Use polling for local tests and webhook delivery for production queues. Store data.task_id before the first status check so retries, callbacks, and result URLs can be reconciled safely.

Minimal API request

Submit to APIDot's unified async generation endpoint:

POST https://api.apidot.ai/api/generate/submit
Authorization: Bearer <APIDOT_API_KEY>
Content-Type: application/json

Primary payload:

{
  "model": "kling-3.0-turbo/pro",
  "input": {
    "duration": 6,
    "aspect_ratio": "16:9",
    "multi_prompt": [
      {
        "prompt": "Shot 1: wide 16:9 view of a mountain observatory at blue hour, clouds moving below the platform, slow cinematic dolly forward.",
        "duration": 3
      },
      {
        "prompt": "Shot 2: interior telescope room, camera pans from brass instruments to the glowing sky outside, smooth motion and clear atmospheric detail.",
        "duration": 3
      }
    ]
  }
}

Submit Kling 3.0 Turbo Standard or Pro video preview jobs through APIDot's unified async generation endpoint.

Model IDs and request variants

Standard single prompt

{
  "model": "kling-3.0-turbo/standard",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "prompt": "A 16:9 cinematic scene of a glass observatory at sunrise, mist rolling across the floor, slow camera push-in, warm light catching floating dust, realistic motion.",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}

Pro multi_prompt

{
  "model": "kling-3.0-turbo/pro",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "duration": 6,
    "aspect_ratio": "16:9",
    "multi_prompt": [
      {
        "prompt": "Shot 1: wide 16:9 view of a mountain observatory at blue hour, clouds moving below the platform, slow cinematic dolly forward.",
        "duration": 3
      },
      {
        "prompt": "Shot 2: interior telescope room, camera pans from brass instruments to the glowing sky outside, smooth motion and clear atmospheric detail.",
        "duration": 3
      }
    ]
  }
}

Standard image-to-video

{
  "model": "kling-3.0-turbo/standard",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "prompt": "Animate the still frame with gentle camera drift, moving light, and subtle environmental motion while preserving the main composition.",
    "duration": 5,
    "image_urls": [
      "https://your-domain.com/start-frame.webp"
    ]
  }
}

Request parameters

Field Type Required Description
model string yes Target model ID. Supported values are kling-3.0-turbo/standard and kling-3.0-turbo/pro.
callback_url string no Optional webhook callback URL for terminal task updates.
input.prompt string no Required for single-prompt mode. Describe the scene, subject, motion, camera, pacing, lighting, and style. Do not send this field when using input.multi_prompt.
input.multi_prompt object[] no Required for multi-shot mode. Send up to six shot objects with prompt and optional duration. Do not send input.prompt in the same request.
input.duration integer no Optional total video duration in seconds. Supported range is 3-15 seconds. Single-prompt requests default to 5 seconds when omitted; when multi_prompt includes durations and you provide this field, it must equal the sum of shot durations.
input.aspect_ratio string no Optional output aspect ratio for text-to-video or multi-shot previews. Supported values are 1:1, 16:9, and 9:16. When input.image_urls is present, the image-to-video workflow does not forward this field.
input.image_urls string[] no Optional image guidance array. Send at most one image URL for image-to-video generation. Tail-frame and multi-image reference inputs are not supported.

Practical integration notes

  • Keep APIDot API keys in server-side environment variables.
  • Persist task_id, selected model, request payload, user ID, and status together.
  • Poll at a moderate interval for local tests and use webhooks for durable production callbacks.
  • Validate source media URLs before submitting requests that depend on source files.
  • Avoid logging API keys, private prompts, private media URLs, or callback URLs.

Polling and webhooks

APIDot media generation is asynchronous. Store data.task_id immediately after submit, poll /api/generate/status/{task_id} for local tests, and use callback_url webhooks for production queues where users may leave the page before completion.

Webhook handlers should verify task ownership, persist callback events, return 2xx quickly, and be idempotent because duplicate deliveries can happen.

Response and errors

  • code: HTTP-style status code. Successful submits return 200.
  • data.task_id: Async task identifier returned immediately after submission.
  • data.status: Initial task status, typically not_started.
  • data.created_time: ISO 8601 timestamp for task creation.

Common error classes:

  • 400 invalid_request: Missing fields or unsupported parameter combinations.
  • 401 authentication_error: Missing, expired, or invalid Bearer API key.
  • 402 insufficient_credits: The current prepaid balance cannot cover the job.
  • 429 rate_limited: Submission rate is temporarily above the current allowed limit.

Production notes

  • Keep APIDot API keys in server-side environment variables.
  • Persist task_id, selected model, request payload, user ID, and status together.
  • Use a moderate polling interval for tests and webhooks for durable production callbacks.
  • Validate source media URLs before submitting requests that depend on source files.
  • Avoid logging API keys, private prompts, private media URLs, or callback URLs.
  • Retry transient network failures with backoff, but do not retry unchanged invalid payloads.

FAQ

Which model IDs are supported?

Use kling-3.0-turbo/standard or kling-3.0-turbo/pro in the top-level model field.

How do I submit multi-shot previews?

Omit input.prompt and send input.multi_prompt as an array of up to six shot objects. Each shot should include prompt and may include duration; the total duration must be 3-15 seconds.

How many images can I send?

Send zero or one URL in input.image_urls. One image enables image-to-video guidance; multiple images and tail-frame control are not supported in this Turbo workflow.

Does Turbo support sound or 4K?

No. Kling 3.0 Turbo is exposed here for fast visual previews and does not accept sound, 4K, Motion Control, reference video, or kling_elements controls.

Related links

About

Kling 3.0 Turbo API examples with APIDot: cURL, Node.js, request shapes, polling, webhooks, and production notes.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages