Video generation
Same endpoint as images, two more fields: how long, and how sharp. Video is priced per second, so those two fields are the invoice.
Endpoint
POST /api/generate
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
kind | string | yes | Use "video". |
prompt | string | yes | Checked by the safety guard before anything is priced or run. |
model | string | yes | One of the ids below. |
seconds | number | no | Clamped server-side to the model range. The clamped value is what gets priced and what gets run. |
quality | string | no | The resolution: "480p", "720p" or "1080p". Defaults per model. |
aspect | string | no | "16:9" or "9:16", snapped to what the model supports. |
quality. There is no resolution field. Send one and it is ignored without complaint — you get the model default and the price that goes with it.Models, durations and cost per second
Read straight from the pricing table the billing code uses. Total credits = seconds × the rate for the resolution you chose.
| Model id | Seconds | Default | Credits per second |
|---|---|---|---|
wan | 5–10 | 5s · 720p | 720p 10.11080p 15.1 |
kling | 5–10 | 5s · 720p | 480p 8.5720p 8.51080p 13 |
kling-3-pro | 3–15 | 10s · 720p | 480p 28.1720p 35.11080p 56.1 |
seedance | 4–15 | 5s · 720p | 480p 9.6720p 20.61080p 51.1 |
seedance-2-fast | 3–12 | 5s · 720p | 480p 8720p 16.61080p 51.1 |
seedance-2-5 | 4–30 | 5s · 720p | 480p 24720p 51 |
seedance-lite | 3–12 | 5s · 720p | 480p 2720p 31080p 6 |
sora | 4–20 | 5s · 720p | 480p 7720p 121080p 67 |
veo | 4–8 | 5s · 720p | 480p 15.1720p 181080p 56 |
veo31 | 4–8 | 6s · 720p | 480p 40.1720p 40.11080p 40.1 |
hailuo | 6–10 | 6s · 720p | 480p 5720p 51080p 8.2 |
ltx | 6–10 | 6s · 1080p | 1080p 6.1 |
kie-wan-2-5 | 5–10 | 5s · 720p | 480p 6.1720p 6.11080p 10.1 |
kie-hailuo-02 | 6–10 | 6s · 720p | 480p 3720p 51080p 8 |
kie-seedance-2 | 3–15 | 5s · 720p | 480p 12720p 20.61080p 51.1 |
kie-seedance-2-fast | 3–12 | 5s · 720p | 480p 10720p 16.61080p 51.1 |
kie-seedance-2-mini | 3–12 | 5s · 720p | 480p 6720p 10.31080p 20.6 |
kie-seedance-lite | 3–10 | 5s · 720p | 480p 4720p 61080p 11 |
kie-kling-3-turbo | 5–10 | 5s · 1080p | 480p 9.1720p 9.11080p 11.3 |
kie-wan-2-6 | 5–10 | 5s · 720p | 480p 7.1720p 7.11080p 10.5 |
kling-25-turbo | 5–10 | 5s · 720p | 480p 8.6720p 8.61080p 8.6 |
Example
curl https://katama.ai/api/generate \
-H "Content-Type: application/json" \
-d '{
"kind": "video",
"prompt": "a red paper crane slowly rotating on a grey table",
"model": "ltx",
"seconds": 6,
"quality": "1080p"
}'Holds: what happens to your credits
Video takes time, so the credits are not spent up front — they are held. While the run is in flight the balance shows the hold, and creditsCharged is still 0. When the video lands, the hold settles into a charge. If the run fails, the hold is released and nothing is charged.
# during the run
{ "balance": 2787, "holdsActive": 13 }
# after it succeeds
{ "balance": 2787, "holdsActive": 0 } → creditsCharged: 13Polling
The first response usually carries status: "queued" or "running" with an empty outputUrl. Poll the generation until status is "succeeded" or "failed". A short clip typically settles in well under a minute; longer ones take proportionally longer.
Next: Image generation · Plans & credits