> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Kling 3.0 Turbo with Comfy Router

> Call kling/kling-3.0-turbo through Comfy Router: endpoint, request shape and the response Router returns.

API Reference for `kling/kling-3.0-turbo`, served by Comfy Router from Kling.

## Quick start

Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) and export it as `COMFY_API_KEY`. The Python and TypeScript snippets use the Comfy SDKs (`pip install comfy-sdk`, `npm install @comfyorg/sdk`); the cURL snippet is the same call over raw HTTP.

**Model ID:** `kling/kling-3.0-turbo`

**Endpoint:** `POST https://api.comfy.org/v2/models/kling/kling-3.0-turbo`

<CodeGroup>
  ```python Python theme={null}
  from comfy_sdk import Comfy

  # Reads COMFY_API_KEY from the environment. Each call sends a fresh
  # Idempotency-Key and waits up to 10 minutes for the finished result.
  with Comfy() as client:
      result = client.models.run(
          "kling/kling-3.0-turbo",
          {
              # Request fields are the provider's own — see Input below.
          },
      )

  print(result)
  ```

  ```typescript TypeScript theme={null}
  import { comfy } from "@comfyorg/sdk";

  // Reads COMFY_API_KEY from the environment. Each call sends a fresh
  // Idempotency-Key and waits up to 10 minutes for the finished result.
  const { data } = await comfy.models.run("kling/kling-3.0-turbo", {
    // Request fields are the provider's own — see Input below.
  });

  console.log(data);
  ```

  ```bash cURL theme={null}
  # Request fields are the provider's own — see Input below.
  curl https://api.comfy.org/v2/models/kling/kling-3.0-turbo \
    -H "X-API-Key: $COMFY_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```
</CodeGroup>

## Schema

### Input

<Note>
  Router has not published an authored input schema for this model yet: `GET /v2/models/kling/kling-3.0-turbo/openapi.json` returns an open object with `x-comfy-input-schema-authored: false`. Router forwards the body to Kling unchanged, so [Kling's own API reference](https://app.klingai.com/global/dev/document-api) is authoritative for the request fields, and nothing is validated server side.
</Note>

### Output

<ResponseField name="code" type="integer">
  Error code. 0 indicates success.
</ResponseField>

<ResponseField name="data" type="object[]">
  Tasks matching the query.
</ResponseField>

<ResponseField name="data[].billing" type="object[]">
  Billing details for the task.
</ResponseField>

<ResponseField name="data[].billing[].amount" type="string">
  Consumption amount, accurate to two decimal places.
</ResponseField>

<ResponseField name="data[].billing[].charge_type" type="string">
  Consumption account type. "cash" for balance, "unit" for a resource package.
</ResponseField>

<ResponseField name="data[].billing[].package_type" type="string">
  Consumable resource bundle type (only present when charge\_type is "unit"). One of "video", "image" or "audio".
</ResponseField>

<ResponseField name="data[].create_time" type="integer">
  Task creation time. Unix timestamp in milliseconds.

  Format: `int64`
</ResponseField>

<ResponseField name="data[].external_id" type="string">
  The custom task ID for this task, if any.
</ResponseField>

<ResponseField name="data[].id" type="string">
  The task ID.
</ResponseField>

<ResponseField name="data[].message" type="string">
  Task status information, displaying the failure reason when the task fails.
</ResponseField>

<ResponseField name="data[].outputs" type="object[]">
  Generated outputs for the task.
</ResponseField>

<ResponseField name="data[].outputs[].duration" type="string">
  Duration of the generated video in seconds.
</ResponseField>

<ResponseField name="data[].outputs[].group_id" type="string">
  Grouping marker, present only for grouped images.
</ResponseField>

<ResponseField name="data[].outputs[].id" type="string">
  Output ID generated by the system.
</ResponseField>

<ResponseField name="data[].outputs[].mp3_duration" type="string">
  Duration of the generated MP3 audio in seconds.
</ResponseField>

<ResponseField name="data[].outputs[].mp3_url" type="string">
  MP3 URL of the generated audio (hotlink-protected).
</ResponseField>

<ResponseField name="data[].outputs[].name" type="string">
  Name of the generated material.
</ResponseField>

<ResponseField name="data[].outputs[].owned_by" type="string">
  Source of the material. "kling" denotes the official library; numbers are creator IDs.
</ResponseField>

<ResponseField name="data[].outputs[].status" type="string">
  Status of the material. One of "succeeded" or "deleted".
</ResponseField>

<ResponseField name="data[].outputs[].type" type="string">
  Output content type. One of "video", "image", "audio", "voice" or "element".
</ResponseField>

<ResponseField name="data[].outputs[].url" type="string">
  URL of the generated result (hotlink-protected). Cleared after 30 days.
</ResponseField>

<ResponseField name="data[].outputs[].watermark_url" type="string">
  URL of the watermarked result (hotlink-protected).
</ResponseField>

<ResponseField name="data[].outputs[].wav_duration" type="string">
  Duration of the generated WAV audio in seconds.
</ResponseField>

<ResponseField name="data[].outputs[].wav_url" type="string">
  WAV URL of the generated audio (hotlink-protected).
</ResponseField>

<ResponseField name="data[].status" type="string">
  Task status. One of "submitted", "processing", "succeeded" or "failed".
</ResponseField>

<ResponseField name="data[].update_time" type="integer">
  Task update time. Unix timestamp in milliseconds.

  Format: `int64`
</ResponseField>

<ResponseField name="message" type="string">
  Error message.
</ResponseField>

<ResponseField name="request_id" type="string">
  Request ID generated by the system.
</ResponseField>

## Examples

### Output

```json theme={null}
{
  "code": 0,
  "data": [
    {
      "create_time": 1798761600000,
      "id": "kling-v2-task-7c8d9e0f1a2b",
      "message": "",
      "outputs": [
        {
          "duration": "5",
          "id": "kling-v2-output-2b1a0f9e8d7c",
          "type": "video",
          "url": "https://example.invalid/kling/kling-3.0-turbo/generated.mp4"
        }
      ],
      "status": "succeeded",
      "update_time": 1798761820000
    }
  ],
  "message": "SUCCEED",
  "request_id": "3d7e5c91-0b42-4f68-9a13-8e2c6d4b0a75"
}
```

## Before you ship

The snippets above are the shortest working call. Three things are the same for every model and are documented once on the [Comfy Router headers](/development/comfy-router/headers) page: send an `Idempotency-Key` on every paid call and reuse it when you retry, expect the connection to be held up to Router's 10 minute deadline, and keep `X-Comfy-Request-Id` from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, `X-Comfy-Error-Type` names the bucket, and a `422` means the body failed the model's schema and was never billed.

<CardGroup cols={3}>
  <Card title="Headers" icon="list" href="/development/comfy-router/headers">
    Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
  </Card>

  <Card title="Quick Start" icon="rocket" href="/development/comfy-router/quickstart">
    Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
  </Card>

  <Card title="Limitations" icon="triangle-exclamation" href="/development/comfy-router/limitations">
    What Router does not do today, and what to use instead.
  </Card>
</CardGroup>
