Kling26
Kling26
Kling 2.6 video generation with optional audio
- Endpoint
- POST /api/v1/videos/generate
- model
- kling26
- Output
- Video
- Credits
- from 60
1
Submit a task
POST
/api/v1/videos/generateParameters
modelstringRequiredMust be "kling26"
typestringOptionalDefaulttext-to-video"text-to-video" or "image-to-video" (default: text-to-video)
text-to-videoimage-to-videopromptstringRequiredText description of the video
image_urlsstring[]OptionalInput image URLs for image-to-video
input_imagestringOptionalDeprecated. Alias for image_urls[0]
durationstringOptional"5" or "10"
510soundbooleanOptionalDefaultfalseGenerate with audio (default: false)
truefalseaspect_ratiostringOptionalOutput aspect ratio
Request
curl -X POST https://www.bananapro.site/api/v1/videos/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "kling26",
"prompt": "A fireworks display over a city skyline",
"duration": "10",
"sound": true
}'Response200
{
"success": true,
"data": {
"task_id": "task_kling123",
"credits_used": 240,
"remaining_credits": 260,
"model": "kling26"
}
}The credits_used values shown in these examples are illustrative. Actual usage is calculated when you submit and returned by the API.
2
Query the task
GET
/api/v1/videos/{task_id}status
pending- Accepted and waiting to start. Keep polling.
processing- Running. Keep polling.
completed- Finished. Read video_url; output holds the full result.
failed- Ended without a result. error_message says why and credits_refunded shows what was returned.
Poll every 5 to 10 seconds and stop at completed or failed, or register a webhook to be notified instead. Failed tasks are refunded automatically.
Request
curl https://www.bananapro.site/api/v1/videos/task_abc123 \
-H "Authorization: Bearer sk-your-api-key"Response200
{
"success": true,
"data": {
"task_id": "task_abc123",
"model": "kling26",
"status": "completed",
"output": { "video_url": "https://..." },
"video_url": "https://...",
"error_message": null,
"credits_used": 240,
"credits_refunded": 0,
"created_at": "2026-10-04T10:00:00.000Z",
"updated_at": "2026-10-04T10:01:12.000Z",
"completed_at": "2026-10-04T10:01:12.000Z"
},
"request_id": "req_abc123"
}Wait for the result
TASK_ID=task_abc123
while true; do
TASK=$(curl -s https://www.bananapro.site/api/v1/videos/$TASK_ID \
-H "Authorization: Bearer sk-your-api-key")
STATUS=$(echo "$TASK" | jq -r '.data.status')
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
echo "$TASK" | jq
break
fi
sleep 10
donePricing
| Duration | No Sound | With Sound |
|---|---|---|
| 5 sec | 60 | 120 |
| 10 sec | 120 | 240 |
Features
- Text-to-video generation
- Optional audio generation
- Multiple durations
- High quality output