POST
/api/v1/kling-mc-3.0/generateGenerate Video (Kling MC 3.0)
Generate a video using Kling MC 3.0. Always returns 202 with a job ID — poll for results.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of the video to generate. |
duration | number | No | Video duration in seconds: 5, 8, or 10. Default: 5. |
resolution | string | No | "720p", "1080p", or "auto". Default: "auto". |
mode | string | No | "text-to-video" (default) or "image-to-video". |
aspectRatio | string | No | Video aspect ratio. Default: "16:9". |
imageUrl | string | No | Reference image URL for image-to-video mode. |
imageBase64 | object | No | Base64-encoded reference image for image-to-video mode. Format: {data: string, mimeType?: string}. |
callbackUrl | string | No | Webhook URL to receive results when generation completes. |
cameraMovement | object | No | Camera movement controls (motion control models only). Fields: pan (left/right/none), tilt (up/down/none), zoom (in/out/none), rotate (cw/ccw/none). |
sound | boolean | No | Generate synchronized audio (Kling models only). Default: true. Set to false for a cheaper, silent video. |
Image Sizes & Pricing
| Image Size | Cost per Image |
|---|---|
| Per-second billing (default) | rate × duration |
| Resolution | 720p (lower rate) / 1080p (higher rate) |
| Audio (Kling 2.6 / 3.0) | higher per-second rate when enabled |
Supported Aspect Ratios
1:1, 16:9, 9:16, 4:3, 3:4
Async Mode (Recommended)
Recommended for production
Video generation always runs asynchronously. The API returns a 202 response with a job ID. Poll the status endpoint or provide a callbackUrl to receive results via webhook.
bash
curl -X POST https://eccoapi.com/api/v1/kling-mc-3.0/generate \
-H "Authorization: Bearer nk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cinematic aerial shot of ocean waves crashing against a rocky coastline at sunset",
"duration": 5,
"resolution": "1080p",
"aspectRatio": "16:9",
"cameraMovement": {"pan": "right", "zoom": "in"}
}'Returns 202 Accepted with a jobId. Poll /api/v1/jobs/:jobId for status, or receive the result at your callbackUrl.
Response
json
{
"code": 202,
"msg": "Job accepted",
"jobId": "a1b2c3d4-...",
"statusUrl": "/api/v1/jobs/a1b2c3d4-...",
"meta": {
"model": "kling-mc-3.0",
"cost": 0.30,
"estimated_time": "1-5 minutes",
"settings": {
"duration": 5,
"resolution": "1080p",
"mode": "text-to-video",
"aspectRatio": "16:9"
}
}
}Status Codes
| Code | Description |
|---|---|
202 | Job accepted — poll statusUrl for results |
400 | Invalid parameters or content policy violation |
401 | Missing or invalid API key |
402 | Insufficient credits |
429 | Rate limit exceeded |
503 | Model is currently disabled |
