Model API

Kling 4.0 Flash

Kling 4.0 Flash edits an input video using text instructions and optional image, video or element references, producing 3 to 20-second videos at 720p.

Model id

Use this in every request
kling/v4/flash/video-to-video

This model has other modes with their own ids: kling/v4/flash/text-to-video, kling/v4/flash/image-to-video, kling/v4/flash/reference-to-video.

Run it

Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kling/v4/flash/video-to-video",
  "input": {
    "prompt": "A red ceramic cup on a wooden table, soft morning light",
    "video_url": "https://example.com/input.mp4"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "kling/v4/flash/video-to-video", "quote_id": "QUOTE_ID", "input": {"prompt":"A red ceramic cup on a wooden table, soft morning light","video_url":"https://example.com/input.mp4"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Input

Input fields for kling/v4/flash/video-to-video
NameTypeDescription
promptrequiredstring
Edit instruction. Reference the source video as @Video1.
video_urlrequiredstring (URL)
The video to edit (3-20s), referenced as @Video1. Max file size: 300.0MB, Min width: 700px, Min height: 700px, Max width: 4553px, Max height: 4553px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Min duration: 3.0s, Max duration: 20.05s, Min FPS: 23.9, Max FPS: 60.05, Timeout: 30.0s
image_urlsarray of image URLs
Reference images, referenced as @Image1, @Image2, ... (max 10).
video_urlsarray of image URLs
Reference videos, referenced as @Video2, @Video3, ... (max 4). The source, reference and element videos must total at most 20s.
elementsarray of objects
Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 may be video elements.
durationinteger
Output duration in seconds (3-20). Defaults to the source video's length.
resolutionstring (enum)
Output resolution. Flash is 720p only.

Default: 720p

One of: 720p

Output

A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.

Job excerpt
"outputs": [
  { "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]

Pricing

  • 720p · input + output seconds$0.0999/ second

The exact charge for your input comes from a quote. How charges settle