> ## 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.

# Kling 3.0 Turbo

> Fast video generation API with text-to-video and image-to-video workflows

## Overview

Kling 3.0 Turbo is a fast Kuaishou video generation model on APIXO for short clips from text prompts or a single reference image. Use it when you want the Kling 3.0 family with a simpler surface than Kling 3.0 Std.

| Capability       | Value                                     |
| ---------------- | ----------------------------------------- |
| Model ID         | `kling-3-0-turbo`                         |
| Modes            | `text-to-video`, `image-to-video`         |
| Prompt           | Required in both modes                    |
| Resolution       | `720p`, `1080p`                           |
| Duration         | `3-15` seconds                            |
| Aspect ratios    | `16:9`, `9:16`, `1:1` for `text-to-video` |
| Reference images | `image-to-video`: exactly 1 image URL     |
| Output           | Video URLs in `resultJson.resultUrls`     |

## Endpoint and authentication

Base URL:

```text theme={null}
https://api.apixo.ai/api/v1
```

| Method | Endpoint                                      | Purpose                               |
| ------ | --------------------------------------------- | ------------------------------------- |
| `POST` | `/generateTask/kling-3-0-turbo`               | Submit a generation task              |
| `GET`  | `/statusTask/kling-3-0-turbo?taskId={taskId}` | Poll task status and retrieve results |

All requests require your APIXO API key:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

Submit requests also require:

```http theme={null}
Content-Type: application/json
```

## Copy-paste async quickstart

This minimal request submits a text-to-video task and returns a `taskId`.

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/kling-3-0-turbo" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-video",
      "prompt": "a cinematic city skyline at sunset with a slow push-in",
      "duration": 12,
      "resolution": "720p",
      "aspect_ratio": "16:9"
    }
  }'
```

Successful response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
```

Save the `taskId`; you need it to poll for the final result.

## Poll for result

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/kling-3-0-turbo?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Processing response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
```

Success response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
```

Failed response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "INVALID_PARAMETER",
    "failMsg": "One or more input parameters are invalid.",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
```

Parse `resultJson` after `state` becomes `success`:

```javascript theme={null}
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;
```

## Request body

### Text-to-video

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "text-to-video",
    "prompt": "a cinematic city skyline at sunset with a slow push-in",
    "duration": 12,
    "resolution": "1080p",
    "aspect_ratio": "16:9"
  }
}
```

### Image-to-video

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "prompt": "animate the portrait with a gentle camera move",
    "duration": 15,
    "resolution": "720p",
    "image_urls": [
      "https://example.com/source.png"
    ]
  }
}
```

## Parameters

<ParamField body="request_type" type="string" required default="async">
  Result delivery mode. Use `async` for polling with `statusTask`, or `callback` for webhook delivery.
</ParamField>

<ParamField body="callback_url" type="string">
  Required when `request_type` is `callback`. Must be a public HTTPS URL that can receive the final task payload. See [Webhooks](/api-reference/webhooks).
</ParamField>

<ParamField body="input" type="object" required>
  Kling 3.0 Turbo input parameters.

  <Expandable title="properties">
    <ParamField body="mode" type="string" required>
      Generation mode. Supported values: `text-to-video`, `image-to-video`.
    </ParamField>

    <ParamField body="prompt" type="string" required>
      Text prompt describing the desired video. It must be a non-empty string in both modes.
    </ParamField>

    <ParamField body="duration" type="integer" required>
      Output duration in seconds. Supports integer values or numeric strings from `3` to `15`.
    </ParamField>

    <ParamField body="resolution" type="string" required>
      Output resolution. Supported values: `720p`, `1080p`.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="16:9">
      Output aspect ratio for `text-to-video` only. Supported values: `16:9`, `9:16`, `1:1`. If omitted in `text-to-video`, APIXO defaults to `16:9`. This field is not forwarded for `image-to-video`.
    </ParamField>

    <ParamField body="image_urls" type="string[]">
      Reference image URLs. Required for `image-to-video`. Provide exactly 1 non-empty image URL.
    </ParamField>
  </Expandable>
</ParamField>

## Response format

### Submit task response

`POST /generateTask/kling-3-0-turbo` returns a task ID when the task is accepted:

<ResponseField name="code" type="integer">
  API status code. `200` means the task was accepted.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data.taskId" type="string">
  Unique task identifier used with the status endpoint.
</ResponseField>

### Status response fields

<ResponseField name="taskId" type="string">
  Unique task identifier.
</ResponseField>

<ResponseField name="state" type="string">
  Current task state: `pending`, `processing`, `success`, or `failed`.
</ResponseField>

<ResponseField name="resultJson" type="string">
  JSON string containing the generated video URLs. Present when `state` is `success`.
</ResponseField>

<ResponseField name="failCode" type="string">
  Machine-readable failure code. Present when `state` is `failed`.
</ResponseField>

<ResponseField name="failMsg" type="string">
  Human-readable failure message. Present when `state` is `failed`.
</ResponseField>

<ResponseField name="createTime" type="integer">
  Task creation timestamp in Unix milliseconds.
</ResponseField>

<ResponseField name="completeTime" type="integer">
  Task completion timestamp in Unix milliseconds. Present after completion.
</ResponseField>

<ResponseField name="costTime" type="integer">
  Processing duration in milliseconds. Present after successful completion when available.
</ResponseField>

## Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/kling-3-0-turbo" \
  -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": "animate the product photo with a slow camera move",
      "duration": 8,
      "resolution": "720p",
      "image_urls": [
        "https://example.com/product.png"
      ]
    }
  }'
```

The callback payload uses the same `code`, `message`, and `data` shape as the status response. See [Webhooks](/api-reference/webhooks) for delivery requirements and retry behavior.

## Billing

Kling 3.0 Turbo is billed per output second. `text-to-video` and `image-to-video` use the same pricing, and total cost is `unit price * duration`.

| Resolution | Unit price        | Example total |
| ---------- | ----------------- | ------------- |
| `720p`     | `$0.112 / second` | 12s: `$1.344` |
| `1080p`    | `$0.14 / second`  | 15s: `$2.10`  |

For current route and market comparison pricing, see [Pricing](https://apixo.ai/pricing).

## Latency and polling

Actual latency may vary by prompt complexity, selected resolution, route, and current queue load.

| Request shape       | Typical generation time | Recommended first poll  | Poll interval |
| ------------------- | ----------------------- | ----------------------- | ------------- |
| `3-5` second clip   | 60s-90s                 | 60s after task creation | 5s-10s        |
| `6-10` second clip  | 90s-120s                | 60s after task creation | 5s-10s        |
| `11-15` second clip | 120s-180s               | 60s after task creation | 5s-10s        |

<Tip>
  For production workloads, use callback mode to avoid frequent polling.
</Tip>

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](/api-reference/system).

## Errors and troubleshooting

### HTTP errors

| Code  | Meaning                                             | What to do                                       |
| ----- | --------------------------------------------------- | ------------------------------------------------ |
| `400` | Invalid request body, mode, parameter, or image 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                | Check permissions and route strategy             |
| `429` | Rate limit or concurrency limit reached             | Retry with exponential backoff                   |
| `500` | Server error                                        | Retry with backoff                               |
| `502` | Upstream service 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                                                               |
| ---------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------ |
| `CONTENT_VIOLATION`    | Prompt or input media failed safety checks              | Change the prompt or input image                                         |
| `INVALID_PARAMETER`    | A required field is missing or a value is unsupported   | Check `mode`, `duration`, `resolution`, `aspect_ratio`, and `image_urls` |
| `INVALID_IMAGE_URL`    | The reference image could not be fetched or decoded     | Use a direct, publicly accessible image URL                              |
| `INSUFFICIENT_BALANCE` | The account does not have enough balance for the task   | Add balance before retrying                                              |
| `UPSTREAM_ERROR`       | Upstream generation failed                              | Retry with backoff                                                       |
| `UNKNOWN_ERROR`        | The failure could not be mapped to a more specific code | Retry later or contact support with the `taskId`                         |

### Common validation issues

| Issue                             | Fix                                                     |
| --------------------------------- | ------------------------------------------------------- |
| Missing `mode`                    | Set `input.mode` to `text-to-video` or `image-to-video` |
| Missing `prompt`                  | Provide a non-empty prompt string                       |
| Unsupported `duration`            | Use `3` through `15` seconds                            |
| Unsupported `resolution`          | Use `720p` or `1080p`                                   |
| Aspect ratio has no effect        | `aspect_ratio` is only forwarded for `text-to-video`    |
| `image-to-video` fails validation | Provide exactly 1 image URL in `image_urls`             |

See [Error Codes](/api-reference/errors) for the full error reference.

## Related links

* [Generation API Overview](/models)
* [Generate Task](/api-reference/generate-task)
* [Status Task](/api-reference/status-task)
* [Webhooks](/api-reference/webhooks)
* [Error Codes](/api-reference/errors)
* [Parameter Specification](/api-reference/parameters)
* [Routing Strategies](/concepts/routing-strategies)
* [Pricing](https://apixo.ai/pricing)
