# Kling 4.0 Flash Text to Video

> Kling 4.0 Flash generates videos from text prompts at 720p, with durations from 3 to 20 seconds and configurable aspect ratios.


## Overview

- **Endpoint**: `https://fal.run/kling/v4/flash/text-to-video`
- **Model ID**: `kling/v4/flash/text-to-video`
- **Category**: text-to-video
- **Kind**: inference
**Tags**: kling, v4, flash, text-to-video, audio



## Pricing

Video costs **$0.094** per second at **720p**.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  Text prompt for video generation.
  - Examples: "10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon.\n\nPerson (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot.\nLocation: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet.\n\nShot (single continuous move):\n0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond.\n3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall.\n6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface.\n8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold.\n\nAudio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call.\nLook: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water.\nOn-screen text: one small end line in the empty sky at 9-10 s: \"Thila Rah\".\nAVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge."

- **`duration`** (`integer`, _optional_):
  Video duration in seconds (3-20). Default value: `5`
  - Default: `5`
  - Range: `3` to `20`
  - Examples: 10

- **`resolution`** (`ResolutionEnum`, _optional_):
  Output resolution. Flash is 720p only. Default value: `"720p"`
  - Default: `"720p"`
  - Options: `"720p"`

- **`aspect_ratio`** (`AspectRatioEnum`, _optional_):
  Aspect ratio of the generated video. Default value: `"16:9"`
  - Default: `"16:9"`
  - Options: `"16:9"`, `"9:16"`, `"1:1"`, `"21:9"`
  - Examples: "21:9"



**Required Parameters Example**:

```json
{
  "prompt": "10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon.\n\nPerson (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot.\nLocation: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet.\n\nShot (single continuous move):\n0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond.\n3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall.\n6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface.\n8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold.\n\nAudio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call.\nLook: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water.\nOn-screen text: one small end line in the empty sky at 9-10 s: \"Thila Rah\".\nAVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge."
}
```

**Full Example**:

```json
{
  "prompt": "10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon.\n\nPerson (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot.\nLocation: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet.\n\nShot (single continuous move):\n0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond.\n3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall.\n6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface.\n8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold.\n\nAudio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call.\nLook: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water.\nOn-screen text: one small end line in the empty sky at 9-10 s: \"Thila Rah\".\nAVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge.",
  "duration": 10,
  "resolution": "720p",
  "aspect_ratio": "21:9"
}
```


### Output Schema

The API returns the following output format:

- **`video`** (`File`, _required_):
  The generated video.
  - Examples: {"file_size":23599464,"file_name":"output.mp4","content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0ab11f9d/0WK4KLsy_4-HxwKDivOMQ_t2v.mp4"}



**Example Response**:

```json
{
  "video": {
    "file_size": 23599464,
    "file_name": "output.mp4",
    "content_type": "video/mp4",
    "url": "https://v3b.fal.media/files/b/0ab11f9d/0WK4KLsy_4-HxwKDivOMQ_t2v.mp4"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/kling/v4/flash/text-to-video \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon.\n\nPerson (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot.\nLocation: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet.\n\nShot (single continuous move):\n0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond.\n3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall.\n6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface.\n8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold.\n\nAudio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call.\nLook: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water.\nOn-screen text: one small end line in the empty sky at 9-10 s: \"Thila Rah\".\nAVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge."
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "kling/v4/flash/text-to-video",
    arguments={
        "prompt": "10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon.

    Person (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot.
    Location: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet.

    Shot (single continuous move):
    0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond.
    3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall.
    6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface.
    8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold.

    Audio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call.
    Look: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water.
    On-screen text: one small end line in the empty sky at 9-10 s: \"Thila Rah\".
    AVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("kling/v4/flash/text-to-video", {
  input: {
    prompt: "10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon.

  Person (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot.
  Location: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet.

  Shot (single continuous move):
  0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond.
  3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall.
  6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface.
  8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold.

  Audio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call.
  Look: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water.
  On-screen text: one small end line in the empty sky at 9-10 s: \"Thila Rah\".
  AVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge."
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/kling/v4/flash/text-to-video)
- [API Documentation](https://fal.ai/models/kling/v4/flash/text-to-video/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=kling/v4/flash/text-to-video)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
