> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snapgen.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Kling 4.0 Reference to Video

> Kling 4.0 reference to video API: 3–30 seconds, 720p/1080p and native stereo audio.

Guide a Kuaishou Kling 4.0 scene with one to nine reference images. Use @Image1, @Image2 and so on in the prompt to identify the reference images.

| Property | Value |
| - | - |
| Public model ID | `kling-4-r2v` |
| Duration | Integer 3–30 seconds; default 5 |
| Resolution | `720p` (default) or `1080p` |
| Audio | Native stereo audio, always included |
| Framing | `16:9` (default), `9:16`, `1:1`, `21:9` |
| Images | One to nine reference images |

## Pricing

| Resolution | Per output second | 5 seconds |
| - | -: | -: |
| `720p` | \$0.21 | \$1.05 |
| `1080p` | \$0.315 | \$1.575 |

**100 SnapGen credits = \$1**. The selected resolution and requested output seconds determine the reservation. References do not add input-video charges because this release accepts no video input. Confirm current rates on the [Kling 4.0 model page](https://snapgen.org/models/kling-4).

**model** `string` *required*

Use `kling-4-r2v`.

**prompt** `string` *required*

A non-empty shot description, at most 8,000 characters. Include the sound you
want in the scene.

**seconds** `integer` (default: 5)

Any integer from `3` to `30`. Send a JSON number, not a quoted string.

**resolution** `string` (default: 720p)

`720p` or `1080p`.

**aspect\_ratio** `string` (default: 16:9)

`16:9`, `9:16`, `1:1` or `21:9`.

**image\_urls** `string[]` *required*

One to nine reference image URLs. Use public HTTP(S) PNG, JPEG or WebP files,
at most 10 MiB each. Private, loopback and credentialed URLs are rejected.

**generate\_audio** `boolean` (default: true)

Native audio is mandatory. Only `true` is accepted; omitting it also includes
audio.

This release does not accept `video_url`, `video_urls`, `audio_urls`, intermediate keyframes, saved elements, editing or extension controls. It does not expose 4K or HDR. Text mode does not accept image inputs.

## Request

```bash theme={null}
curl https://api.snapgen.org/v1/videos \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kling-4-r2v",
  "prompt": "The character in @Image1 walks along a quiet beach, gentle ocean sounds",
  "seconds": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "generate_audio": true,
  "image_urls": [
    "https://example.com/reference.png"
  ]
}'
```

## Poll and download

Save the returned gateway video `id`. Poll with the same API key and model ID until `status` is `completed` or `failed`. Download only after completion.

```bash theme={null}
curl "https://api.snapgen.org/v1/videos/$VIDEO_ID?model=kling-4-r2v" \
  -H "Authorization: Bearer $SNAPGEN_API_KEY"

curl -L "https://api.snapgen.org/v1/videos/$VIDEO_ID/content?model=kling-4-r2v" \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  --output video.mp4
```

Keep polling an existing task after a client timeout. Repeated status checks do not create a new generation. Save the MP4 promptly and respect any returned expiry time. See the [video workflow](https://docs.snapgen.org/api-reference/video-generation.md) for task states and error handling.

> [card] [Open Kling 4.0](https://snapgen.org/models/kling-4)
>
> Try the three modes in the Playground and compare live rates.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.