Skip to main content

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.5 Turbo Pro is a Kuaishou video model for fast text-to-video and image-to-video generation. Use this page when you are ready to call the API after trying the model in the APIXO playground.
CapabilityValue
Model IDkling-2-5-turbo-pro
Modestext-to-video, image-to-video
Prompt length1-2500 characters
Duration5 or 10 seconds
Reference images1-2 URLs for image-to-video
Tail-frame controlThe second image_urls item is used as the final frame
Aspect ratios16:9, 9:16, 1:1 for text-to-video
Negative promptUp to 2500 characters
CFG scale0 to 1, step 0.1
OutputMP4 video URLs in resultJson.resultUrls

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/kling-2-5-turbo-proSubmit a generation task
GET/statusTask/kling-2-5-turbo-pro?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

This minimal request submits a text-to-video task and returns a taskId.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/kling-2-5-turbo-pro" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-video",
      "prompt": "a cinematic drone shot over snowy mountains at sunrise",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/kling-2-5-turbo-pro?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Processing response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/xxx.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
Failed response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "SensitiveContent",
    "failMsg": "Content violates the upstream content policy, please adjust the prompt",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
Parse resultJson after state becomes success:
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;

Request body

Text-to-video

{
  "request_type": "async",
  "input": {
    "mode": "text-to-video",
    "prompt": "a cinematic drone shot over snowy mountains at sunrise",
    "duration": 10,
    "aspect_ratio": "16:9",
    "negative_prompt": "low quality, jitter, blur",
    "cfg_scale": 0.6
  }
}

Image-to-video

{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "prompt": "smooth camera transition from the first frame to the final frame",
    "duration": 5,
    "image_urls": [
      "https://example.com/start.jpg",
      "https://example.com/end.jpg"
    ],
    "negative_prompt": "distortion, low quality",
    "cfg_scale": 0.4
  }
}

Parameters

request_type
string
default:"async"
required
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
callback_url
string
Required when request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.
input
object
required
Kling 2.5 Turbo Pro input parameters.

Response format

Submit task response

POST /generateTask/kling-2-5-turbo-pro returns a task ID when the task is accepted:
code
integer
API status code. 200 means the task was accepted.
message
string
Human-readable status message.
data.taskId
string
Unique task identifier used with the status endpoint.

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing generated video URLs in resultUrls. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
integer
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.
curl -X POST "https://api.apixo.ai/api/v1/generateTask/kling-2-5-turbo-pro" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "image-to-video",
      "prompt": "make the subject turn toward camera with smooth natural motion",
      "duration": 5,
      "image_urls": [
        "https://example.com/start.jpg"
      ],
      "cfg_scale": 0.5
    }
  }'
Webhook delivery uses the same final task payload shape as the status response. See Webhooks for delivery requirements and retry behavior.

Billing

Kling 2.5 Turbo Pro is billed by video duration. The public APIXO pricing page lists this model with a starting APIXO price of $0.06 / second.
DurationStarting APIXO price
5 seconds$0.30 / video
10 seconds$0.60 / video
For current route and market comparison pricing, see Pricing.

Latency and polling

Actual latency may vary by prompt complexity, input images, selected route, and current queue load.
DurationTypical generation timeRecommended first pollPoll interval
5 seconds30s-45s30s after task creation5s-10s
10 seconds45s-60s30s after task creation5s-10s
For production video workloads, use callback mode to avoid frequent polling. Download and store important output URLs promptly after completion.
Rate limits and concurrency can vary by account, API key, and route. If you receive 429, slow down requests and retry with backoff. For account-level details, see System APIs.

Errors and troubleshooting

HTTP errors

CodeMeaningWhat to do
400Invalid request body, mode, parameter value, or image URL shapeFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or route cannot access the model, or content was rejectedCheck permissions and adjust input
404Task ID or route not foundCheck the model endpoint and taskId
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server or upstream errorRetry with backoff
503Service temporarily unavailableRetry with backoff
504Upstream timeoutRetry or use callback mode for long-running jobs

Parameter validation

FieldRule
input.modeRequired. Must be text-to-video or image-to-video.
input.promptRequired string, non-empty after trimming, max 2500 characters.
input.durationRequired. Must be 5 or 10; integer and numeric string are accepted.
input.image_urlsRequired for image-to-video; must be an array of 1-2 strings.
input.aspect_ratioOptional for text-to-video; must be 16:9, 9:16, or 1:1 when provided.
input.negative_promptOptional string, max 2500 characters.
input.cfg_scaleOptional number or numeric string from 0 to 1, step 0.1.

Task failure codes

Fail codeMeaningWhat to do
SensitiveContentPrompt, input image, or generated output violated the upstream content policyChange the prompt or image
PromptInvalidPrompt was rejected or malformedRewrite the prompt with clearer safe content
PromptLengthExceededPrompt exceeded model limitsShorten the prompt
ImageFormatIncorrectInput image format could not be processedUse a public JPG, PNG, or WebP URL
Upload errorImage upload failed or exceeded size limitsCompress the image and retry with a direct URL
RateLimitedThe upstream route rate limited the taskRetry later with backoff
TimeoutThe upstream route did not finish in timeRetry, reduce input complexity, or use callback mode
Unknown errorThe upstream route returned an unmapped failureRetry with backoff; contact support if it persists
See Error Codes for the full error reference.