Skip to content
Kling AI logo

Kling v3

Text-to-Video • Kling AI

View as MarkdownAgent setup

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

Kling V3 is Kling AI's text-to-video model with audio generation support.

Model Info
Terms and Licenselink ↗
More informationlink ↗
Pricing
  • Default (per second)$0.112
  • default audio$0.168

Usage

const response = await env.AI.run(
  'klingai/kling-v3',
  {
    prompt:
      'A golden retriever running through a field of sunflowers on a sunny day',
    duration: 5,
    aspect_ratio: '16:9',
    sound: 'on',
  },
  {
    gateway: { id: 'default' },
  }
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "klingai/kling-v3",
  "input": {
    "aspect_ratio": "16:9",
    "duration": 5,
    "prompt": "A golden retriever running through a field of sunflowers on a sunny day",
    "sound": "on"
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/klingai/kling-v3/simple-video.mp4"
  }
}

Parameters

prompt
stringrequiredText prompt describing the video to generate
negative_prompt
stringNegative text prompt
image_input
stringBase64-encoded reference image for i2v
duration
integerrequireddefault: 5minimum: 3maximum: 15Video duration in seconds
aspect_ratio
stringrequireddefault: 16:9enum: 16:9, 9:16, 1:1Video aspect ratio
sound
stringrequireddefault: onenum: on, offWhether to generate sound with the video
video
stringURL to the generated video

API Schemas (Raw)

Input
Output

Was this helpful?