Generate video from a text prompt with Kling 4.0. Describe the scene, movement and camera direction, then retrieve the finished video through the asynchronous task API.
Developer API pricing
Provider: SeeAPI
USD estimate: $0.0037 / credit · Estimated equivalent, not an additional charge.
720p: 38.1 credits/sec (≈ $0.14/sec)
1080p: 56.8 credits/sec (≈ $0.21/sec)
/v1/generationsA unique key used to safely retry the same request.
order-20260818-001The model identifier.
kling-4-0kling-4-0kling-4-0The generation capability to run.
text-to-videotext-to-videotext-to-videoThe public provider to use.
seeapiseeapiseeapiThe text prompt and output settings for this generation.
Provider parameters
seeapiDefault ProviderDescribe the scene, subjects, actions, lighting and camera movement to generate.
A red fox walks through a misty forest at sunrise. The camera tracks alongside it, with soft light and natural movement.The desired output video duration in seconds.
5The output video resolution.
720p1080p720pThe output frame aspect ratio.
auto16:99:161:121:9autoAn absolute HTTPS URL that receives the terminal generation webhook.
https://client.example.com/webhooks/seeapiThe accepted generation and its current processing status.
The generation identifier. Save it to query status and retrieve the result.
task_xxxThe model used for this generation.
kling-4-0The endpoint used for this generation.
text-to-videoThe selected public provider.
seeapiseeapi: SeeAPIseeapiThe current generation state. Processing does not mean the video is ready.
processingprocessingThe estimated charge in public credits for this request.
190.5Credits consumed by this generation so far.
0Credits refunded for this generation so far.
0The time the generation was created, in ISO 8601 format.
2026-08-18T10:00:00ZThe time the generation was last updated, in ISO 8601 format.
2026-08-18T10:00:00ZWhether this is a replay of an earlier request with the same idempotency key.
falseThe accepted generation and its current processing status.
The generation identifier. Save it to query status and retrieve the result.
task_xxxThe model used for this generation.
kling-4-0The endpoint used for this generation.
text-to-videoThe selected public provider.
seeapiseeapi: SeeAPIseeapiThe current generation state. Processing does not mean the video is ready.
processingprocessingThe estimated charge in public credits for this request.
190.5Credits consumed by this generation so far.
0Credits refunded for this generation so far.
0The time the generation was created, in ISO 8601 format.
2026-08-18T10:00:00ZThe time the generation was last updated, in ISO 8601 format.
2026-08-18T10:00:00ZWhether this is a replay of an earlier request with the same idempotency key.
falseInvalid JSON, parameters, Schema, or API Policy
Invalid API Key or authentication failed
Insufficient credits
The current request is not allowed
Model, Endpoint, or task not found
Idempotency conflict or the same request is still being created
Request body is too large
Too many requests
Service temporarily unavailable
After submitting a task, use the unified query endpoint to check progress and retrieve results:
Submit requests from your server using a Bearer API key. Store the generation identifier and use Get Task Details to check progress and retrieve the result. Acceptance does not mean the video is complete.
Manage the secret used to verify generation webhook signatures. Callback URLs are supplied when you create each generation.
Callback URL per generation.
const response = await fetch("https://api.seeapi.com/v1/generations", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Idempotency-Key": "order-20260818-001",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "kling-4-0",
"endpoint": "text-to-video",
"provider": "seeapi",
"input": {
"prompt": "A red fox walks through a misty forest at sunrise. The camera tracks alongside it, with soft light and natural movement.",
"duration_seconds": 5,
"resolution": "720p",
"aspect_ratio": "auto"
},
"callback_url": "https://client.example.com/webhooks/seeapi"
})
});
const result = await response.json();{
"generation": {
"id": "task_xxx",
"model": "kling-4-0",
"endpoint": "text-to-video",
"provider": "seeapi",
"status": "processing",
"estimated_credits": 190.5,
"consumed_credits": 0,
"refunded_credits": 0,
"created_at": "2026-08-18T10:00:00Z",
"updated_at": "2026-08-18T10:00:00Z"
},
"idempotent": false
}