Video Generation
Kling 4.0 API
Kling Video 4.0. Up to 30 seconds at 1080p with native audio and dialogue: text, start/end frames, reference images and videos, or edit an existing clip. Flash tier: faster and cheaper at 720p, up to 20 seconds. Integrate this model via REST with endpoint docs, parameters, and code examples.
Get API Key
Create auth keys for apps and agents
See Usage
Track requests, credits, and logs
Buy Credits
Top up prepaid API capacity
API Endpoint
/api/v1/models/kling-4-0/runTest This Model
Run a real request through the API pipeline and inspect the exact input and output your integration will handle. Uses your credits like any API call; failed runs are refunded automatically.
LLM.txt
For AI assistants
Copy this model's documentation into Claude, GPT, or any AI for instant integration help.
/llm/kling-4-0.txtOpenAPI Spec
Swagger compatible
Import into Postman, Swagger UI, or generate client SDKs in any language.
/api/openapiParameters
Input parameters accepted by this model
| Parameter | Type | Default |
|---|---|---|
promptrequired | string | - |
tier | enum | standard |
image | url | - |
last_frame_image | url | - |
reference_images | array | - |
video | url | - |
reference_videos | array | - |
resolution | enum | 1080p |
aspect_ratio | enum | 16:9 |
duration | integer | 5 |
Use saved characters (@Name)
@Name in the prompt to use a character, product, outfit, location, prop or style saved in the account's Character Studio, for example "@Mara on a beach at sunset". Its photos are added to reference_images automatically, after any images you send yourself, so your own image numbering is unchanged. List saved names with GET /api/v1/characters and save new ones with POST /api/v1/characters. An @word that names nothing saved stays plain text.Supported Aspect Ratios
See also
Related endpoints on this model. You may need a different apiId for a different operation (e.g. image edit vs generation).
- Previous version/api/v1/models/kling-video/run
Example Outputs
Real outputs generated by this model
A cinematic slow dolly-in on an astronaut standing on a rocky alien beach at sunset. Twin suns glow on the horizon, salt spray drifts across the lens, the visor catches warm orange light as the astronaut slowly turns toward camera. Anamorphic lens, gentle handheld float, sharp focus on the helmet.
Slow tilt-up reveal from dusty boots to a lone explorer standing at the edge of a desert canyon at golden hour, dust particles floating in a sunbeam, wind moving her scarf. Cinematic wide shot.
A woman in a long black coat walks slowly toward the camera down a rain-wet neon-lit alley at night, pink and cyan signs reflecting in puddles, steam rising from a vent. Slow forward dolly, anamorphic lens flares, cinematic.
Slow-motion shot of a golden retriever leaping to catch a red frisbee mid-air in a sunny park, fur rippling, ears flying, dramatic backlight through the trees. Pet brand commercial.
A dancer in a loose white shirt moves through a fluid hip-hop routine in front of a colorful gradient studio wall, sharp hits on the beat, smooth arm waves, the camera steady at chest height. Bright, social-ready.
A matte black wireless headphone set rests on a slowly turning white pedestal and completes one smooth 360-degree rotation. Soft seamless backdrop fading from pale grey to warm white, large overhead softbox key light, a thin rim light catching the edges of the ear cups, gentle reflection on the pedestal. Locked-off camera, no cuts, no text, no logos. Quiet studio ambience.
Code Examples
Text → video: copy and paste to get started
curl -X POST "https://pixeldojo.ai/api/v1/models/kling-4-0/run" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "0-4s: slow push in on a barista in a rainy cafe. 4-10s: she looks up and says \"Last order of the night.\" Audio: rain on glass, espresso hiss.",
"duration": 10,
"resolution": "1080p"
}'Response Format
Submit Response (202 Accepted)
{
"jobId": "job_abc123...",
"status": "pending",
"statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123...",
"creditCost": 25,
"creditsRemaining": 95,
"expiresAt": "2026-11-13T22:09:35Z"
}Completed Response
{
"jobId": "job_abc123...",
"status": "completed",
"output": {
"video": "https://temp.pixeldojo.ai/pixeldojotemp/1705930123-456789.mp4"
},
"creditCost": 25,
"expiresAt": "2026-11-13T22:09:35Z"
}