Kling 4.0 Flash
kling-4.0-flashGenerate 720p video with native audio using the Kling 4.0 Flash API. Describe the subject, action, camera movement, and sound in text, or upload a single image as the opening frame of a 3–20 second clip. Draft the opening of a vertical ad, animate a product photo, or preview the timing of a storyboard before filming. Find text-to-video and first-frame request examples, supported parameters, and usage pricing on the model page.
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
Use Kling 4.0 Flash to generate 720p video with native audio from text or one first-frame image.
Typical use cases
- Describe a shot to preview camera motion, composition, and sound.
- Start a clip from a storyboard image or still frame to guide its opening composition.
Quick start and example
- Choose Text to video and describe the scene and camera movement.
- Choose First frame to video and provide one public HTTPS image as
first_frame. - Start with 5 seconds at 720p. Submit the request and keep the task ID.
- Query
GET /v1/videos/{task_id}. On success, look for the video URL inresult.files.
The Playground contains a request example and an illustrative job response.
Key parameters
| Parameter name | Required or default | Allowed or example values | When to use it |
|---|---|---|---|
prompt | Required | Scene and motion description | Guide the action, framing, and camera movement. |
references | Required for image inputs | One public HTTPS image | Use the role required by the selected mode. |
duration | 5 seconds | 3–20 seconds | Set the output length. |
resolution | 720p | 720p | Choose the output resolution. |
aspect_ratio | 16:9 | Text to video: 16:9, 9:16, 1:1, 21:9; First frame to video: auto | Set the framing for the selected mode. |
generate_audio | true | true | The video includes generated audio. |
n | 1 | 1 | Submit a separate job for each additional video. |
Version and route differences
OpenAny supports text-to-video and first-frame-to-video for this model. Both modes produce 720p video with native audio.
Billing and usage limits
OpenAny displays video pricing per second. See Pricing on this model page for the current rate. The final charge appears when the job completes.
Common questions
Can I use a public image URL?
Yes. Use a direct HTTPS image link and assign the reference role shown in the Playground.
How do I get the video after submitting?
Use the original task ID to query the job until it finishes, then read the file URL from the result.
Playground
Submit a Yir Standard video job, then query its task ID to retrieve the result.
Result preview
yir · —
This example shows the response structure. Generated video appears here after the run completes.
{
"id": "YOUR_TASK_ID",
"model": "klingai/kling-4.0-flash",
"object": "job",
"status": "queued",
"parameters": {
"n": 1,
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}Agent handoff preview
Providers
| Provider | Pricing | Latency | Uptime | Supply | Route |
|---|---|---|---|---|---|
Live | Input $0.094 / second | — | — | Verified |
| Video specification | Price per second |
|---|---|
| Text to video · 720p · With audio | $0.094 |
| Image to video · 720p · First frame to video · With audio | $0.094 |
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
Request parameters
| Parameter | Type / range | Default value | Required | Description |
|---|---|---|---|---|
prompt | string | A paper lantern drifts across a still lake at dusk. The camera follows it slowly as ripples catch the light. | Yes | Describe the scene, movement, and camera behavior. |
duration | integer · 3 ~ 20 | 5 | No | Output length in whole seconds. |
resolution | string · 720p | 720p | No | Output video resolution. |
aspect_ratio | string · 16:9 | 9:16 | 1:1 | 21:9 | 16:9 | No | Aspect ratio of the output. Available values depend on the selected input mode. |
generate_audio | boolean · true | true | No | This model generates native audio. The value is fixed to true. |
n | integer · 1 1 ~ 1 | 1 | No | Each submitted job generates one video. |
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 lantern drifts across a still lake at dusk. The camera follows it slowly as ripples catch the light.",
"type": "text"
},
"model": "kling-4.0-flash",
"parameters": {
"aspect_ratio": "16:9",
"duration": 5,
"generate_audio": true,
"n": 1,
"resolution": "720p"
},
"route_mode": "balanced"
}'Response example
Configured response example · not a live result
{
"id": "YOUR_TASK_ID",
"model": "klingai/kling-4.0-flash",
"object": "job",
"status": "queued",
"parameters": {
"n": 1,
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}Error handling
400Check the model ID and request fields.429Retry with exponential backoff.5xxRetry only temporary provider failures.JSON Schema
{
"type": "object",
"required": [
"model",
"input",
"parameters"
],
"properties": {
"input": {
"type": "object",
"required": [
"type",
"prompt"
],
"properties": {
"type": {
"const": "text"
},
"prompt": {
"type": "string",
"minLength": 1,
"description": "Describe the scene, motion, and camera movement in English or your preferred language."
}
},
"additionalProperties": false
},
"model": {
"type": "string",
"const": "kling-4.0-flash"
},
"route": {
"type": "object",
"properties": {
"provider": {
"const": "yir"
}
}
},
"parameters": {
"type": "object",
"properties": {
"n": {
"enum": [
1
],
"type": "integer",
"default": 1,
"description": "Each submitted job generates one video."
},
"duration": {
"type": "integer",
"default": 5,
"maximum": 20,
"minimum": 3,
"description": "Output length in whole seconds."
},
"resolution": {
"enum": [
"720p"
],
"type": "string",
"default": "720p",
"description": "Output video resolution."
},
"aspect_ratio": {
"enum": [
"16:9",
"9:16",
"1:1",
"21:9"
],
"type": "string",
"default": "16:9",
"description": "Aspect ratio of the output. Available values depend on the selected input mode."
},
"generate_audio": {
"enum": [
true
],
"type": "boolean",
"default": true,
"description": "This model generates native audio. The value is fixed to true."
}
},
"additionalProperties": false
},
"route_mode": {
"type": "string",
"default": "balanced"
}
}
}Examples
Request example
POST /v1/videoscurl 'https://api.openany.si/v1/videos' \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "A paper lantern drifts across a still lake at dusk. The camera follows it slowly as ripples catch the light.",
"type": "text"
},
"model": "kling-4.0-flash",
"parameters": {
"aspect_ratio": "16:9",
"duration": 5,
"generate_audio": true,
"n": 1,
"resolution": "720p"
},
"route_mode": "balanced"
}'