Theme
Kling video generation
Kling submits async video tasks through an OpenAI-compatible endpoint. Requests are primarily JSON and support text-to-video, image-to-video, start/end frames, motion control, and more. Extension parameters go in .
http
POST /v1/videosA successful submission returns id and status. Poll results with Task query.
Available models
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Request authentication. Use a Bearer Token, for example: | |
| string | Yes | Request content type; must be |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Model name | |
| string | Yes | Prompt; Chinese and English are supported | |
| string | No | Video duration in seconds | |
| string | No | Quick size input, for example | |
| string | No | Reference image URL (image-to-video) | |
| object | No | Extension parameter container; put upstream native parameters here |
metadata
| Name | Type | Description |
|---|---|---|
| object | Output config: (seconds), ( / ), ( / / ), ( / ) | |
| string | Scene type: (motion control), (avatar generation), (lip sync), (template effects) | |
| string | Motion level: / (billing tiers for motion control) | |
| boolean | Off-peak billing: off-peak generation / immediate generation | |
| string | End-frame image URL for start/end frame tasks | |
| string | Reference video URL | |
| string | Native FileInfos passthrough (advanced) | |
| string | Native ExtInfo string passthrough (advanced) |
Request example
bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "Cyberpunk city at night, camera slowly pushing in",
"seconds": "5",
"metadata": {
"output_config": {
"resolution": "720P",
"aspect_ratio": "16:9"
}
}
}'Response example
json
{
"id": "task_ZOAIupBoCLMo3dmUGcrKUcUEUnCLctc6",
"object": "video",
"model": "Kling-3.0-Omni",
"status": "processing",
"progress": 50,
"created_at": 1774494511
}json
{
"id": "task_ZOAIupBoCLMo3dmUGcrKUcUEUnCLctc6",
"object": "video",
"model": "Kling-3.0-Omni",
"status": "completed",
"progress": 100,
"created_at": 1774494511,
"completed_at": 1774494622,
"metadata": {
"url": "https://example.com/video/aigcVideoGenFile.mp4"
},
"video_url": "https://example.com/video/aigcVideoGenFile.mp4"
}Response fields
| Name | Type | Description |
|---|---|---|
| string | Task ID | |
| string | Always | |
| string | Model name | |
| string | Task status: , , , , | |
| integer | Progress percentage | |
| integer | Creation timestamp | |
| integer | Completion timestamp (returned when completed) | |
| string | Video URL (inside metadata) | |
| string | Video URL (same as ) |