ModelVideo

Kling 4.0

kling-4.0

Use the Kling 4.0 API for AI video generation. Generate clips from text or use an image or reference on supported routes. The catalog lists native audio. Turn a creative brief or still image into motion tests and draft shots. Compare the available provider routes, request examples, and usage prices on OpenAny.

Auto route pricing

Route source: yir

This route has conditional pricing. Review its tiers and requirements before calling.

Published rate
Conditional pricing
Billing unit
/ second
Context / Max output
— / —
Live routes
1

On this page

Overview

Overview for yir

Kling 4.0 turns shot descriptions, opening and closing frames, or subject references into video with audio. Use a five-second text-to-video clip to test a camera move. If you already know how a shot should begin and end, use image-to-video to give the model those frames and generate the action between them. Kuaishou launched Kling 4.0 on October 15, 2026. Kuaishou announcement · OpenAny model page

Example output

Watch the flying cards sequence from KING CARD ↗

Example

Input and action

What to check

KING CARD · Kling AI short film

Playing cards fly from a magician's hand and form a spiral above the audience as the camera tilts up and pulls back along the aisle.

Watch how the card motion, camera position, and audience positions carry through the shot.

Paper boat in the rain · OpenAny Playground exercise

A low camera tracks a paper boat from the side as it drifts through a puddle.

The boat stays in frame for five seconds, with raindrops and gentle water sounds.

Kling AI published the flying cards sequence. Its production notes include the full film, individual shots, and excerpts from the prompts. The paper boat prompt is in the request below. KING CARD production notes and samples

Choose an input mode

Mode

Use it to

Input

Text to video

Try a camera move, action, or sound from a written brief.

Describe the subject, action, camera, and sound in the prompt.

Image to video

Set the opening frame and optionally the closing frame.

Supply public HTTPS images as first_frame, up to eight keyframe images, and up to one last_frame.

Reference to video

Use an image for appearance or a video for motion.

Supply reference_image or reference_video in the matching mode.

Subject references to video

Reuse a character or product across different camera angles.

Give the subject a name in the form and refer to it as @name in the prompt.

The yir templates for text, image, and standard reference input support 3–30 seconds at 720p or 1080p. Text-to-video supports 16:9, 9:16, 1:1, and 21:9. Image-to-video uses auto for aspect ratio. The route's native audio setting is fixed at true. OpenAny route parameters

Quickstart

Select yir and Text to video. Start with five seconds at 720p and 16:9. Once the camera move and composition work, use the same prompt to try a higher resolution. Send a POST request to https://api.openany.si/v1/videos with the header Authorization: Bearer $OPENANY_API_KEY.

json
{
  "model": "kling-4.0",
  "route": { "provider": "yir" },
  "route_mode": "balanced",
  "input": {
    "type": "text",
    "prompt": "A yellow paper boat drifts through a shallow puddle along a rainy city curb at dusk. One low-angle side-tracking shot, camera moving at the same speed as the boat. Keep the boat in focus and in frame. Natural raindrops and soft water sounds, with no dialogue."
  },
  "parameters": {
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "generate_audio": true,
    "n": 1
  }
}

Save the task ID and poll GET /v1/videos/{task_id}. Retrieve the video URL from the result's file list when the task succeeds. OpenAny bills this route per second. Video settings and reference media determine which rate applies. OpenAny Kling 4.0 API and pricing

Frequently asked questions

Can I turn off sound? This route generates audio. To deliver a silent clip, remove the audio track after downloading it.

When should I use opening and closing frames? Use them to define where a shot starts and ends. Use reference images when you need to guide the appearance of a subject, outfit, or scene.

Playground

Provider

Input format
Auto route pricing Review pricing details

Request parameters

POST /v1/videos

Parameters are derived from this model's official contract. No live request has been made.

Result preview

yir · 207ms

This example shows the response structure. Generated video appears here after the run completes.

{
  "id": "string",
  "urls": {
    "get": "string",
    "cancel": "string"
  },
  "error": {
    "code": "YIR_INVALID_REQUEST",
    "action": "fix_request",
    "details": [
      {
        "field": "string",
        "reason": "invalid_body",
        "allowed": [
          "string"
        ],
        "expected": "string"
      }
    ],
    "message": "string",
    "retryable": true,
    "provider_error": {
      "message": "string",
      "provider": "string"
    }
  },
  "model": "string",
  "usage": {
    "outputs": 0
  },
  "object": "job",
  "result": {
    "files": [
      {
        "url": "http://example.com",
        "width": 0,
        "height": 0,
        "fidelity": {
          "grade": "original",
          "reason": "string"
        },
        "expires_at": 1,
        "media_type": "string",
        "duration_ms": 1
      }
    ],
    "warnings": [
      "additional_results_unavailable"
    ],
    "availability": "available",
    "content_safety": {
      "status": "passed",
      "checked_by": "provider"
    }
  },
  "status": "queued",
  "billing": {
    "status": "pending",
    "currency": "USD",
    "max_cost": "string",
    "gateway_fee": {
      "amount": "string",
      "status": "settled"
    },
    "billing_mode": "actual",
    "compute_charges": [
      {
        "usage": [
          {
            "unit": "string",
            "metric": "string",
            "quantity": "string"
          }
        ],
        "amount": "string",
        "status": "settled",
        "billed_by": "yir",
        "supply_type": "managed",
        "amount_basis": "yir_price_rule"
      }
    ],
    "official_comparison": {
      "source_url": "http://example.com",
      "savings_amount": "string",
      "baseline_amount": "string"
    },
    "total_charged_by_yir": "string"
  },
  "created_at": 1,
  "parameters": {
    "n": 1,
    "fps": 1,
    "size": "string",
    "voice": "string",
    "quality": "string",
    "duration": 1,
    "resolution": "string",
    "aspect_ratio": "string",
    "instrumental": true,
    "generate_audio": true,
    "lyrics_optimizer": true
  },
  "cancellation": {
    "effect": "stop_future_attempts",
    "status": "cancelled",
    "requested_at": 1
  },
  "completed_at": 1,
  "final_provider": "string",
  "parameter_notices": [
    {
      "name": "string",
      "reason": "channel_parameter_unsupported",
      "message": "string",
      "disposition": "ignored"
    }
  ]
}
Agent handoff preview

Providers

Auto route · Review pricing details
ProviderPricingLatencyUptimeSupplyRoute
Live
Input $0.143 / second
207ms—Verified
Selected pricing · yirUSD / second
Video pricing details
Video specificationPrice per second5 seconds estimate
Image to video · 1080p · Auto · With audio
$0.213
≈ $1.063
Image to video · 720p · Auto · With audio
$0.143
≈ $0.713
Reference to video · 1080p · Auto · With audio
$0.213
≈ $1.063
Reference to video · 720p · Auto · With audio
$0.143
≈ $0.713
Text to video · 1080p · 16:9 · With audio
$0.213
≈ $1.063
Text to video · 720p · 16:9 · With audio
$0.143
≈ $0.713

Source: the selected provider route in OpenAny's public model catalog. A price update timestamp is not supplied.

API

Base URL
https://api.openany.si/v1
POST
/v1/videos
GET
/v1/videos/{task_id}
Authentication
Authorization: Bearer $OPENANY_API_KEY

Provider

Call method
Auto route pricing Review pricing details

Request parameters

ParameterType / rangeDefault valueRequiredDescription
promptstringA paper boat drifting down a rainy city street, slow tracking shotYesPrompt
durationinteger · 3 ~ 305NoOutput video duration in seconds.
resolutionstring · 720p | 1080p720pNoOutput resolution.
aspect_ratiostring · 16:9 | 9:16 | 1:1 | 21:916:9NoOutput aspect ratio.
generate_audioboolean · truetrueNoGenerate native audio with the video.
ninteger · 1 1 ~ 11NoNumber of outputs from one API request (one Job), not the application batch size. For multiple Jobs, submit separate requests; n=1 does not prevent application-managed batching.

Request example

curl 'https://api.openany.si/v1/videos' \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "A paper boat drifting down a rainy city street, slow tracking shot",
    "type": "text"
  },
  "model": "kling-4.0",
  "parameters": {
    "aspect_ratio": "16:9",
    "duration": 5,
    "generate_audio": true,
    "n": 1,
    "resolution": "720p"
  },
  "route_mode": "balanced"
}'

Response example

Official schema example with placeholders, not a live response

JSON
{
  "id": "string",
  "urls": {
    "get": "string",
    "cancel": "string"
  },
  "error": {
    "code": "YIR_INVALID_REQUEST",
    "action": "fix_request",
    "details": [
      {
        "field": "string",
        "reason": "invalid_body",
        "allowed": [
          "string"
        ],
        "expected": "string"
      }
    ],
    "message": "string",
    "retryable": true,
    "provider_error": {
      "message": "string",
      "provider": "string"
    }
  },
  "model": "string",
  "usage": {
    "outputs": 0
  },
  "object": "job",
  "result": {
    "files": [
      {
        "url": "http://example.com",
        "width": 0,
        "height": 0,
        "fidelity": {
          "grade": "original",
          "reason": "string"
        },
        "expires_at": 1,
        "media_type": "string",
        "duration_ms": 1
      }
    ],
    "warnings": [
      "additional_results_unavailable"
    ],
    "availability": "available",
    "content_safety": {
      "status": "passed",
      "checked_by": "provider"
    }
  },
  "status": "queued",
  "billing": {
    "status": "pending",
    "currency": "USD",
    "max_cost": "string",
    "gateway_fee": {
      "amount": "string",
      "status": "settled"
    },
    "billing_mode": "actual",
    "compute_charges": [
      {
        "usage": [
          {
            "unit": "string",
            "metric": "string",
            "quantity": "string"
          }
        ],
        "amount": "string",
        "status": "settled",
        "billed_by": "yir",
        "supply_type": "managed",
        "amount_basis": "yir_price_rule"
      }
    ],
    "official_comparison": {
      "source_url": "http://example.com",
      "savings_amount": "string",
      "baseline_amount": "string"
    },
    "total_charged_by_yir": "string"
  },
  "created_at": 1,
  "parameters": {
    "n": 1,
    "fps": 1,
    "size": "string",
    "voice": "string",
    "quality": "string",
    "duration": 1,
    "resolution": "string",
    "aspect_ratio": "string",
    "instrumental": true,
    "generate_audio": true,
    "lyrics_optimizer": true
  },
  "cancellation": {
    "effect": "stop_future_attempts",
    "status": "cancelled",
    "requested_at": 1
  },
  "completed_at": 1,
  "final_provider": "string",
  "parameter_notices": [
    {
      "name": "string",
      "reason": "channel_parameter_unsupported",
      "message": "string",
      "disposition": "ignored"
    }
  ]
}

Error handling

400Check the model ID and request fields.
429Retry with exponential backoff.
5xxRetry only temporary provider failures.

Examples

Provider

Call method
Auto route pricing Review pricing details

Request example

POST /v1/videos
curl 'https://api.openany.si/v1/videos' \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "A paper boat drifting down a rainy city street, slow tracking shot",
    "type": "text"
  },
  "model": "kling-4.0",
  "parameters": {
    "aspect_ratio": "16:9",
    "duration": 5,
    "generate_audio": true,
    "n": 1,
    "resolution": "720p"
  },
  "route_mode": "balanced"
}'

Model API questions

How do I call Kling 4.0 through OpenAny?

Use model ID kling-4.0 with an OpenAny key and the operation published in this model's API tab. The model API base is https://api.openany.si/v1. Confirm the protocol and request schema; model availability does not imply every OpenAI API operation is supported.

How is Kling 4.0 billed?

Compare the published rate and billing unit of the selected provider route. Input, output and cache token rates may differ. Image, audio and video models can use other units. Recorded usage determines the charge under that route's billing contract.

Are Community and Verified routes the same as an official publisher API?

No. Inspect the provider name and supply classification for the specific route. A marketplace listing or a supply label is not a claim of publisher endorsement, identical service or measured uptime. Different route prices may reflect different supply and conditions.

Where do these prices come from, and when were they updated?

Rates come from the provider routes in OpenAny's public model catalog, not an independent quote from the model publisher. The catalog does not supply a price update timestamp. A page or catalog snapshot date is not a price revision date. Compare supply, billing units, tiers and conditions; a lower listed rate alone does not establish equivalent service or explain the price difference.

Use Kling 4.0 with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.