Documentation Index
Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Kling 2.6 is Kuaishou’s audio-visual video model for generating short clips with optional speech, sound effects, ambience, and background audio. Use this page when you are ready to call the API after trying the model in the APIXO playground.| Capability | Value |
|---|---|
| Model ID | kling-2-6 |
| Modes | text-to-video, image-to-video |
| Prompt length | 1-1000 characters |
| Reference images | 1-2 URLs for image-to-video |
| Aspect ratios | 1:1, 9:16, 16:9 for text-to-video |
| Durations | 5, 10 seconds |
| Audio | Required sound toggle: true or false |
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/kling-2-6 | Submit a generation task |
GET | /statusTask/kling-2-6?taskId={taskId} | Poll task status and retrieve results |
Copy-paste async quickstart
This minimal request submits a text-to-video task and returns ataskId.
taskId; you need it to poll for the final result.
Poll for result
resultJson after state becomes success:
Request body
Text-to-video
Image-to-video
Parameters
Result delivery mode. Use
async for polling with statusTask, or callback for webhook delivery.Required when
request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.Kling 2.6 input parameters.
Response format
Submit task response
POST /generateTask/kling-2-6 returns a task ID when the task is accepted:
API status code.
200 means the task was accepted.Human-readable status message.
Unique task identifier used with the status endpoint.
Status response fields
Unique task identifier.
Current task state:
pending, processing, success, or failed.JSON string containing the generated video URLs. Present when
state is success.Machine-readable failure code. Present when
state is failed.Human-readable failure message. Present when
state is failed.Task creation timestamp in Unix milliseconds.
Task completion timestamp in Unix milliseconds. Present after completion.
Processing duration in milliseconds. Present after successful completion when available.
Webhook callback mode
Use callback mode when your backend should receive the final result automatically instead of polling.code, message, and data shape as the status response. See Webhooks for delivery requirements and retry behavior.
Billing
Kling 2.6 is billed per output second. The selectedduration and required sound value determine the total cost.
| Audio setting | Unit price | Example total |
|---|---|---|
sound: false | $0.06 / second | 5s: $0.30; 10s: $0.60 |
sound: true | $0.12 / second | 5s: $0.60; 10s: $1.20 |
Latency and polling
Actual latency may vary by prompt complexity, audio requirements, provider route, and current queue load.| Duration | Typical generation time | Recommended first poll | Poll interval |
|---|---|---|---|
5 seconds | 50s-70s | 50s after task creation | 5s-10s |
10 seconds | 80s-100s | 80s after task creation | 5s-10s |
429, slow down requests and retry with backoff. For account-level details, see System APIs.
Errors and troubleshooting
HTTP errors
| Code | Meaning | What to do |
|---|---|---|
400 | Invalid request body, mode, parameter, prompt, or media URL | Fix the request before retrying |
401 | Missing or invalid API key | Check the Authorization header |
402 | Insufficient balance or quota | Add balance or switch account/key |
403 | Key or route cannot access the model, or content was rejected | Check permissions and adjust content |
429 | Rate limit or concurrency limit reached | Retry with exponential backoff |
500 | Server error or upstream provider error | Retry with backoff |
502 | Upstream provider error | Retry with backoff |
504 | Upstream timeout | Retry or use callback mode for long-running jobs |
Task failure codes
| Fail code | Meaning | What to do |
|---|---|---|
SensitiveContentDetected | Prompt, input image, or output was flagged as sensitive | Change the prompt or input image |
InputOutputSensitiveContentDetected | Input or output failed provider safety checks | Try different inputs |
NSFW | NSFW content was detected | Use policy-compliant inputs |
ProhibitedContentDetected | Content violates provider policy | Adjust the prompt or image |
PromptLengthExceeded | Prompt exceeded the provider limit | Shorten the prompt to 1000 characters or fewer |
PromptInvalid | Prompt was invalid or rejected | Revise the prompt |
ImageFormatIncorrect | A reference image could not be processed | Use a public, direct JPG, PNG, or WebP URL |
Upload error | A media upload failed or exceeded size limits | Compress or replace the image |
RateLimited | Provider rate limit was reached | Retry later with backoff |
Timeout | Provider timed out | Retry, simplify the request, or use callback mode |