Model API'si
Kling 4.0 Flash
Model kimliği
kling/v4/flash/video-to-videoBu modelin kendi kimliği olan başka modları da var: kling/v4/flash/text-to-video, kling/v4/flash/image-to-video, kling/v4/flash/reference-to-video.
Çalıştır
Girdiye ücret teklifi al, bu teklifle üretimi başlat, ardından işin durumunu sorgula. Önce RAYWAKE_API_KEY değişkenini ayarla; ayrıntılar için Kimlik doğrulama sayfasına bak.
# 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"Girdi
| Alan | Tür | Açıklama |
|---|---|---|
promptzorunlu | string | Edit instruction. Reference the source video as @Video1. |
video_urlzorunlu | string (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_urls | array of image URLs | Reference images, referenced as @Image1, @Image2, ... (max 10). |
video_urls | array of image URLs | Reference videos, referenced as @Video2, @Video3, ... (max 4). The source, reference and element videos must total at most 20s. |
elements | array of objects | Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 may be video elements. |
duration | integer | Output duration in seconds (3-20). Defaults to the source video's length. |
resolution | string (enum) | Output resolution. Flash is 720p only. |
Çıktı
Başarılı bir iş, sonuçlarını outputs altında listeler; dosyalar bizim tarafımızda saklanır. Tüm alanlar için İşler sayfasına bak.
"outputs": [
{ "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]Fiyatlandırma
- 720p · girdi + çıktı saniyesi$0,0999/ saniye
Girdinin kesin ücreti ücret teklifinden gelir. Bakiye nasıl kesinleşir?