API reference · KwaiVGI
kwaivgi/kling-video/v3
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
kwaivgi/kling-video/v301
Input Schema
13 parameters · 1 required · 12 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Text prompt for video generation or transformation. When using reference media, refer to them as @Image1, @Image2, and @Video1. · Max length: 2500 |
image | string | Optional | Optional first-frame image URL for image-to-video. |
video | string | Optional | Optional reference video URL for video-to-video generation. |
images | string[] | Optional | Optional reference image URLs. |
duration | integer | Optional | Generated video duration in seconds. · Options: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 · Default: 5 3456789101112131415 |
end_image | string | Optional | Optional end-frame image URL for image-to-video. |
shot_type | string | Optional | Options: customize, intelligent · Default: "customize" customizeintelligent |
resolution | string | Optional | Generation quality tier. · Options: standard, pro, 4k · Default: "standard" standardpro4k |
aspect_ratio | string | Optional | Options: 16:9, 9:16, 1:1 · Default: "16:9" 16:99:161:1 |
multi_prompt | object[] | Optional | — |
generate_audio | boolean | Optional | Default: true |
keep_original_sound | boolean | Optional | Default: true |
character_orientation | string | Optional | Options: image, video imagevideo |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "kwaivgi/kling-video/v3",
"image": "https://static.sandbase.ai/examples/mirrored/f77b827ca02a-TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png",
"video": "https://static.sandbase.ai/examples/mirrored/f1ecbb471a16-hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook--1-_1.mp4",
"prompt": "Based on @Video1, make the character from @Image1 dance.",
"duration": 5,
"shot_type": "customize",
"resolution": "standard",
"aspect_ratio": "16:9",
"generate_audio": true,
"keep_original_sound": true,
"character_orientation": "image"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
