> ## 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 Std API

> Standard-quality video generation API with text-to-video, image-to-video, and motion-control modes

## Overview

Kling 3.0 Std is a standard-quality video generation model for text prompts, reference-image animation, and motion transfer from a reference video. Use this page when you are ready to call the API after trying the model in the APIXO playground.

| Capability              | Value                                                                            |
| ----------------------- | -------------------------------------------------------------------------------- |
| Model ID                | `kling-3-0-std`                                                                  |
| Modes                   | `text-to-video`, `image-to-video`, `motion-control`                              |
| Text prompt             | Required for `text-to-video` and `image-to-video`; optional for `motion-control` |
| Reference images        | `image-to-video`: 1-2 URLs; `motion-control`: exactly 1 URL                      |
| Reference video         | `motion-control`: exactly 1 public MP4, MOV, or M4V URL                          |
| Duration                | `text-to-video` and `image-to-video`: 3-15 seconds, default `5`                  |
| Motion-control duration | Auto-detected from `video_urls[0]`; videos over 30 seconds are rejected          |
| Aspect ratios           | `1:1`, `9:16`, `16:9` for `text-to-video`                                        |

## Endpoint and authentication

Base URL:

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

| Method | Endpoint                                    | Purpose                               |
| ------ | ------------------------------------------- | ------------------------------------- |
| `POST` | `/generateTask/kling-3-0-std`               | Submit a generation task              |
| `GET`  | `/statusTask/kling-3-0-std?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-std" \
  -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, slow camera push-in",
      "duration": 5,
      "sound": false,
      "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-std?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": 1767965712317,
    "costTime": 101388
  }
}
```

Failed response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "CONTENT_VIOLATION",
    "failMsg": "Content does not meet safety guidelines",
    "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, slow camera push-in",
    "negative_prompt": "blur, low quality",
    "duration": 5,
    "sound": false,
    "aspect_ratio": "16:9",
    "cfg_scale": 0.5,
    "multi_prompt": [
      {
        "duration": 2,
        "prompt": "wide establishing shot"
      },
      {
        "duration": 3,
        "prompt": "slow push-in toward glowing skyscrapers"
      }
    ]
  }
}
```

### Image-to-video

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "prompt": "animate the character waving to the camera",
    "duration": 6,
    "sound": true,
    "image_urls": [
      "https://example.com/start.png",
      "https://example.com/end.png"
    ],
    "cfg_scale": 0.5
  }
}
```

### Motion-control

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "motion-control",
    "prompt": "keep the same character identity while following the motion reference",
    "negative_prompt": "distorted face, extra limbs",
    "sound": true,
    "character_orientation": "video",
    "image_urls": [
      "https://example.com/character.png"
    ],
    "video_urls": [
      "https://example.com/motion.mp4"
    ]
  }
}
```

## 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](/docs/api-reference/webhooks).
</ParamField>

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

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

    <ParamField body="prompt" type="string">
      Text prompt for the video. Required for `text-to-video` and `image-to-video`; optional for `motion-control`. If provided, it must be a non-empty string.
    </ParamField>

    <ParamField body="negative_prompt" type="string">
      Optional negative prompt. If provided, it must be a non-empty string.
    </ParamField>

    <ParamField body="duration" type="integer" default="5">
      Output duration in seconds for `text-to-video` and `image-to-video`. Supports integer values or numeric strings from `3` to `15`. Ignored and not forwarded in `motion-control`.
    </ParamField>

    <ParamField body="sound" type="boolean" default="true">
      For `text-to-video` and `image-to-video`, controls whether Kling generates audio with the video. For `motion-control`, controls whether the reference video's original audio is retained.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="16:9">
      Output aspect ratio for `text-to-video` only. Supported values: `1:1`, `9:16`, `16:9`.
    </ParamField>

    <ParamField body="cfg_scale" type="number">
      Guidance scale for `text-to-video` and `image-to-video`. Supported range: `0` to `1`.
    </ParamField>

    <ParamField body="image_urls" type="string[]">
      Reference image URLs. Required for `image-to-video` and `motion-control`. `image-to-video` supports 1-2 images; `motion-control` requires exactly 1 image. Upstream expects JPG, JPEG, or PNG images, with each image under 10 MB.
    </ParamField>

    <ParamField body="video_urls" type="string[]">
      Required for `motion-control` only. Provide exactly 1 public HTTP/HTTPS MP4, MOV, or M4V URL. APIXO probes `video_urls[0]` to detect duration; videos over 30 seconds are rejected.
    </ParamField>

    <ParamField body="character_orientation" type="string">
      `motion-control` only. Supported values: `image`, `video`. Determines whether character orientation follows the character image or the motion reference video.
    </ParamField>

    <ParamField body="multi_prompt" type="object[]">
      Optional shot-level prompt segments for `text-to-video` and `image-to-video`. Each item must include a non-empty `prompt` and a `duration` integer or numeric string. `multi_prompt` does not affect billing.
    </ParamField>
  </Expandable>
</ParamField>

## Response format

### Submit task response

`POST /generateTask/kling-3-0-std` 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.
</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-std" \
  -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 studio camera move",
      "duration": 5,
      "sound": true,
      "image_urls": [
        "https://example.com/product.png"
      ]
    }
  }'
```

See [Webhooks](/docs/api-reference/webhooks) for delivery requirements and retry behavior.

## Billing

Kling 3.0 Std is billed per generated video second. For `text-to-video` and `image-to-video`, the selected `sound` value determines the unit price. For `motion-control`, APIXO probes the reference video duration and uses a minimum of 3 billable seconds.

| Workflow                                            | Billing input                                        | APIXO price       |
| --------------------------------------------------- | ---------------------------------------------------- | ----------------- |
| `text-to-video` or `image-to-video`, `sound: false` | `duration` seconds                                   | `$0.084 / second` |
| `text-to-video` or `image-to-video`, `sound: true`  | `duration` seconds                                   | `$0.13 / second`  |
| `motion-control`                                    | Detected `video_urls[0]` duration, minimum 3 seconds | `$0.13 / second`  |

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

## Latency and polling

Actual latency may vary by prompt complexity, reference media, sound generation, route, and current queue load.

| Request shape                 | Typical generation time                          | Recommended first poll  | Poll interval |
| ----------------------------- | ------------------------------------------------ | ----------------------- | ------------- |
| 3-5 second text/image video   | 60s-90s                                          | 60s after task creation | 5s-10s        |
| 6-10 second text/image video  | 90s-120s                                         | 60s after task creation | 5s-10s        |
| 11-15 second text/image video | 120s-180s                                        | 60s after task creation | 5s-10s        |
| Motion-control                | Varies with reference video duration and probing | 60s after task creation | 5s-10s        |

<Tip>
  Video generation takes longer than image generation. 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](/docs/api-reference/system).

## Errors and troubleshooting

### HTTP errors

| Code  | Meaning                                                        | What to do                                       |
| ----- | -------------------------------------------------------------- | ------------------------------------------------ |
| `400` | Invalid request body, mode, parameter, image URL, or video 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 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 reference media failed safety checks                 | Change the prompt or input media                                                  |
| `INVALID_IMAGE_URL`    | A reference image URL could not be fetched or decoded          | Use a public, direct JPG, JPEG, or PNG URL                                        |
| `INVALID_VIDEO_URL`    | A reference video URL could not be fetched, decoded, or probed | Use a public MP4, MOV, or M4V URL                                                 |
| `INVALID_PARAMETER`    | A model parameter is unsupported or malformed                  | Check `mode`, `duration`, `sound`, `aspect_ratio`, `image_urls`, and `video_urls` |
| `INSUFFICIENT_BALANCE` | The account does not have enough balance for the task          | Add balance before retrying                                                       |
| `UPSTREAM_ERROR`       | Upstream failure                                               | Retry with backoff                                                                |
| `TIMEOUT`              | Generation did not finish in time                              | Retry, simplify inputs, or use callback mode                                      |

### Common fixes

| Symptom                                    | Fix                                                                                            |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------- |
| Request fails with invalid mode            | Set `input.mode` to `text-to-video`, `image-to-video`, or `motion-control`                     |
| Unexpected audio cost                      | `sound` defaults to `true`; set `sound: false` for text/image video without generated audio    |
| `duration` has no effect in motion-control | This mode detects duration from `video_urls[0]` and does not forward `duration`                |
| Aspect ratio has no effect                 | `aspect_ratio` is only forwarded for `text-to-video`                                           |
| Video URL probe fails                      | Use a direct public HTTP/HTTPS MP4, MOV, or M4V URL that supports range reads or full download |
| Motion-control video is rejected           | Keep the reference video at 30 seconds or shorter                                              |

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

## Related links

* [Generation API Overview](/docs/models)
* [Video Models](/docs/models/video)
* [Generate Task](/docs/api-reference/generate-task)
* [Status Task](/docs/api-reference/status-task)
* [Webhooks](/docs/api-reference/webhooks)
* [Error Codes](/docs/api-reference/errors)
* [Parameter Specification](/docs/api-reference/parameters)
* [Routing Strategies](/docs/concepts/routing-strategies)
* [Try Kling 3.0 Std in the APIXO Playground](https://apixo.ai/models/kling-3-0-std)
* [Pricing](https://apixo.ai/pricing)
