Skip to main content

UNLIMITED

Flux 3 Klein, H3 Image, Qwen 2.1, MiniMax H3 Video, 310+ effectsSee plans

WAN WEEK 20% OFF through November 13

Back to API Platform

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.

Img2Vid
Audio
Credit Cost
25 credits
Type
Video

API Endpoint

POST
/api/v1/models/kling-4-0/run

Test 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.

Parameters

Input parameters accepted by this model

ParameterTypeDefault
prompt
required
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)

Write @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

16:9
9:16
1:1
21:9

See also

Related endpoints on this model. You may need a different apiId for a different operation (e.g. image edit vs generation).

Example Outputs

Real outputs generated by this model

View Details

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.

0 credits
0
View Details

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.

0 credits
0
View Details

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.

0 credits
0
View Details

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.

0 credits
0
View Details

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.

0 credits
0
View Details

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.

0 credits
0

Code Examples

Text → video: copy and paste to get started

bash
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)

json
{
  "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

json
{
  "jobId": "job_abc123...",
  "status": "completed",
  "output": {
    "video": "https://temp.pixeldojo.ai/pixeldojotemp/1705930123-456789.mp4"
  },
  "creditCost": 25,
  "expiresAt": "2026-11-13T22:09:35Z"
}