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

# Kling 3.0 Turbo

> Kling upgraded APIs for Kling 3.0 Turbo text-to-video and image-to-video generation.

Kling 3.0 Turbo uses Kling's upgraded model-specific API. The model name is part of the endpoint path; do not send `model_name` in the request body.

> [tab] Text to video
>
> ## Create task
>
> `POST /kling/v2/text-to-video/kling-3.0-turbo`
>
> ```bash cURL theme={null}
> curl --request POST \
>   --url https://www.anyfast.ai/kling/v2/text-to-video/kling-3.0-turbo \
>   --header 'Authorization: Bearer YOUR_API_KEY' \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "prompt": "A girl sits on a train and looks out the window as the carriage gently sways",
>     "settings": {
>       "resolution": "1080p",
>       "aspect_ratio": "16:9",
>       "duration": 5
>     },
>     "options": {
>       "watermark_info": {
>         "enabled": false
>       }
>     }
>   }'
> ```
>
> ## Request headers
>
> **Authorization** `string` *required*
>
> Bearer authentication in the form `Bearer YOUR_API_KEY`.
>
> **Content-Type** `string` *required* (default: application/json)
>
> Data exchange format.
>
> ## Request body
>
> **prompt** `string` *required*
>
> Positive and negative text descriptions. The maximum length is 3,072 characters; prompts under 2,500 characters are recommended.
>
> **settings** `object`
>
> Output resolution, aspect ratio, and duration.
>
> **settings.resolution** `string` (default: 720p)
>
> Output resolution. Supported values: `720p`, `1080p`.
>
> **settings.aspect\_ratio** `string` (default: 16:9)
>
> Output aspect ratio. Supported values: `16:9`, `9:16`, `1:1`.
>
> **settings.duration** `integer` (default: 5)
>
> Video duration in seconds. Supported integer values: 3 through 15.
>
> **options** `object`
>
> General generation options.
>
> **options.watermark\_info** `object`
>
> Platform watermark configuration.
>
> **options.watermark\_info.enabled** `boolean` (default: false)
>
> Set to `true` to generate an additional watermarked result.
>
> ### Multi-shot prompt format
>
> A prompt can define one to six shots with the format `Shot n, m, words;`. `n` is the shot number, `m` is the shot duration in seconds, and `words` is the shot description. Each shot must last at least one second, the durations must add up to `settings.duration`, and each shot description can contain up to 512 characters.
>
> ## Create response
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "string",
>   "request_id": "string",
>   "data": {
>     "id": "893605946402811985",
>     "status": "submitted",
>     "create_time": 1781080778802,
>     "update_time": 1781080794151,
>     "external_id": ""
>   }
> }
> ```
>
> **code** `integer`
>
> Error code. `0` indicates that the request was accepted.
>
> **message** `string`
>
> Error or status message.
>
> **request\_id** `string`
>
> System-generated request ID for tracing and troubleshooting.
>
> **data** `object`
>
> Created asynchronous task.
>
> **data.id** `string`
>
> System-generated task ID.
>
> **data.status** `string`
>
> Task status: `submitted`, `processing`, `succeeded`, or `failed`.
>
> **data.create\_time** `integer`
>
> Creation time as a Unix timestamp in milliseconds.
>
> **data.update\_time** `integer`
>
> Last update time as a Unix timestamp in milliseconds.
>
> **data.external\_id** `string`
>
> External task ID when present.

> [tab] Image to video
>
> ## Create task
>
> `POST /kling/v2/image-to-video/kling-3.0-turbo`
>
> ```bash cURL theme={null}
> curl --request POST \
>   --url https://www.anyfast.ai/kling/v2/image-to-video/kling-3.0-turbo \
>   --header 'Authorization: Bearer YOUR_API_KEY' \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "contents": [
>       {
>         "type": "prompt",
>         "text": "The character turns toward the window while the background moves naturally"
>       },
>       {
>         "type": "first_frame",
>         "url": "https://example.com/first-frame.png"
>       }
>     ],
>     "settings": {
>       "resolution": "1080p",
>       "duration": 5
>     },
>     "options": {
>       "watermark_info": {
>         "enabled": false
>       }
>     }
>   }'
> ```
>
> ## Request headers
>
> **Authorization** `string` *required*
>
> Bearer authentication in the form `Bearer YOUR_API_KEY`.
>
> **Content-Type** `string` *required* (default: application/json)
>
> Data exchange format.
>
> ## Request body
>
> **contents** `object[]` *required*
>
> Input materials. Supply a prompt item and a first-frame item in the same array.
>
> **contents\[].type** `string` *required*
>
> Material type. Supported values: `prompt`, `first_frame`.
>
> **contents\[].text** `string`
>
> Required when `type` is `prompt`. The prompt can include positive and negative descriptions and can contain up to 2,500 characters.
>
> **contents\[].url** `string`
>
> Required when `type` is `first_frame`. Provide a public URL or Base64 image content.
>
> **settings** `object`
>
> Output resolution and duration.
>
> **settings.resolution** `string` (default: 720p)
>
> Output resolution. Supported values: `720p`, `1080p`.
>
> **settings.duration** `integer` (default: 5)
>
> Video duration in seconds. Supported integer values: 3 through 15.
>
> **options** `object`
>
> General generation options.
>
> **options.watermark\_info** `object`
>
> Platform watermark configuration.
>
> **options.watermark\_info.enabled** `boolean` (default: false)
>
> Set to `true` to generate an additional watermarked result.
>
> ### First-frame requirements
>
> Use JPG, JPEG, or PNG up to 50 MB. Both dimensions must be at least 300 px and the aspect ratio must be from 1:2.5 to 2.5:1. Kling 3.0 Turbo supports a first frame only; an end frame and first-plus-end-frame input are not supported.
>
> ### Multi-shot prompt format
>
> The `prompt` item can define one to six shots with the format `Shot n, m, words;`. Each shot must last at least one second, total duration must equal `settings.duration`, and each shot description can contain up to 512 characters.
>
> ## Create response
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "string",
>   "request_id": "string",
>   "data": {
>     "id": "893605946402811985",
>     "status": "submitted",
>     "create_time": 1781080778802,
>     "update_time": 1781080794151,
>     "external_id": ""
>   }
> }
> ```
>
> **code** `integer`
>
> Error code. `0` indicates that the request was accepted.
>
> **message** `string`
>
> Error or status message.
>
> **request\_id** `string`
>
> System-generated request ID.
>
> **data** `object`
>
> Created asynchronous task.
>
> **data.id** `string`
>
> System-generated task ID.
>
> **data.status** `string`
>
> Task status: `submitted`, `processing`, `succeeded`, or `failed`.
>
> **data.create\_time** `integer`
>
> Creation Unix timestamp in milliseconds.
>
> **data.update\_time** `integer`
>
> Last update Unix timestamp in milliseconds.
>
> **data.external\_id** `string`
>
> External task ID when present.

> [tab] Query task
>
> ## Query task by ID
>
> `GET /kling/v2/tasks?task_ids=TASK_ID`
>
> ```bash cURL theme={null}
> curl --request GET \
>   --url 'https://www.anyfast.ai/kling/v2/tasks?task_ids=TASK_ID' \
>   --header 'Authorization: Bearer YOUR_API_KEY' \
>   --header 'Content-Type: application/json'
> ```
>
> ## Request headers
>
> **Authorization** `string` *required*
>
> Bearer authentication in the form `Bearer YOUR_API_KEY`.
>
> **Content-Type** `string` *required* (default: application/json)
>
> Data exchange format.
>
> ## Query parameters
>
> **task\_ids** `string` *required*
>
> One or more system-generated task IDs. Separate multiple IDs with commas.
>
> ## Task result fields
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "data": [
>     {
>       "id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
>       "status": "succeeded",
>       "create_time": 1781080778802,
>       "update_time": 1781080794151,
>       "outputs": [
>         {
>           "type": "video",
>           "url": "https://example.com/generated-video.mp4",
>           "duration": "5"
>         }
>       ]
>     }
>   ],
>   "message": ""
> }
> ```
>
> **code** `integer`
>
> Error code. `0` indicates that the query succeeded.
>
> **message** `string`
>
> Error or status message.
>
> **data\[]** `object[]`
>
> Matched asynchronous tasks.
>
> **data\[].id** `string`
>
> System-generated task ID.
>
> **data\[].status** `string`
>
> `submitted`, `processing`, `succeeded`, or `failed`.
>
> **data\[].create\_time** `integer`
>
> Creation Unix timestamp in milliseconds.
>
> **data\[].update\_time** `integer`
>
> Last update Unix timestamp in milliseconds.
>
> **data\[].outputs** `object[]`
>
> Generated outputs.
>
> **data\[].outputs\[].type** `string`
>
> For this model, `video`.
>
> **data\[].outputs\[].url** `string`
>
> Temporary generated video URL.
>
> **data\[].outputs\[].duration** `string`
>
> Generated video duration in seconds.

> [tab] Element management
>
> ## Reusable subjects
>
> | Operation | Endpoint |
> | - | - |
> | Create custom Element | `POST /kling/v2/general/advanced-custom-elements` |
> | Query Element task | `GET /kling/v2/general/advanced-custom-elements/{task_id}` |
> | List preset Elements (Legacy) | `GET /kling/v1/general/advanced-presets-elements` |
>
> Use the returned `element_id` in `element_list` when the selected channel supports reusable subjects.
>
> ## Create custom Element
>
> ```bash cURL theme={null}
> curl --request POST \
>   --url https://www.anyfast.ai/kling/v2/general/advanced-custom-elements \
>   --header 'Authorization: Bearer YOUR_API_KEY' \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "element_name": "my-character",
>     "element_description": "A protagonist character",
>     "reference_type": "image_refer",
>     "element_image_list": {
>       "frontal_image": "https://example.com/front.jpg",
>       "refer_images": [{"image_url": "https://example.com/side.jpg"}]
>     },
>     "external_task_id": "client-element-task"
>   }'
> ```
>
> **element\_name** `string` *required*
>
> Element name.
>
> **element\_description** `string` *required*
>
> Description of the reusable subject.
>
> **reference\_type** `string` *required*
>
> Use `image_refer` for image references.
>
> **element\_image\_list** `object` *required*
>
> Reference images for the Element.
>
> **element\_image\_list.frontal\_image** `string` *required*
>
> Public frontal image URL.
>
> **element\_image\_list.refer\_images\[].image\_url** `string`
>
> Additional reference image URL.
>
> ## Create response
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "",
>   "data": {"task_id": "TASK_ID", "task_status": "submitted"}
> }
> ```
>
> **data.task\_id** `string`
>
> Element task ID.
>
> **data.task\_status** `string`
>
> Initial status, normally `submitted`.
>
> ## Query response
>
> Query with `GET /kling/v2/general/advanced-custom-elements/TASK_ID`.
>
> ```bash cURL theme={null}
> curl --request GET \
>   --url 'https://www.anyfast.ai/kling/v2/general/advanced-custom-elements/TASK_ID' \
>   --header 'Authorization: Bearer YOUR_API_KEY'
> ```
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "",
>   "data": {
>     "task_id": "TASK_ID",
>     "task_status": "succeed",
>     "task_result": {
>       "elements": [
>         {
>           "element_id": "ELEMENT_ID",
>           "element_name": "my-character",
>           "element_description": "A protagonist character",
>           "element_type": "image_refer"
>         }
>       ]
>     }
>   }
> }
> ```
>
> **data.task\_id** `string`
>
> Element task ID.
>
> **data.task\_status** `string`
>
> Element task status.
>
> **data.task\_result** `object`
>
> Completed Element result.
>
> **data.task\_result.elements\[]** `object[]`
>
> Reusable Element results.
>
> **data.task\_result.elements\[].element\_id** `string`
>
> Reusable Element ID returned after processing.
>
> **data.task\_result.elements\[].element\_name** `string`
>
> Element name.
>
> **data.task\_result.elements\[].element\_description** `string`
>
> Element description.
>
> **data.task\_result.elements\[].element\_type** `string`
>
> Reference type used to create the Element.

> [tab] Voice management
>
> ## Reusable voices
>
> | Operation | Endpoint |
> | - | - |
> | Create custom voice (current) | `POST /kling/v2/general/custom-voices` |
> | Query custom voice (current) | `GET /kling/v2/general/custom-voices/{id}` |
> | Create custom voice (legacy) | `POST /kling/v1/general/custom-voices` |
> | Query custom voice (legacy) | `GET /kling/v1/general/custom-voices/{id}` |
> | List preset voices (legacy) | `GET /kling/v1/general/presets-voices?pageNum=1&pageSize=30` |
>
> > Preset voice listing remains on the provider's v1 endpoint. The v2 routes are for custom voice creation and query.
>
> Use the returned `voice_id` in `voice_list` and reference it in the prompt with `<<<voice_1>>>` or `<<<voice_2>>>`.
>
> ## Create custom voice
>
> ```bash cURL theme={null}
> curl --request POST \
>   --url https://www.anyfast.ai/kling/v2/general/custom-voices \
>   --header 'Authorization: Bearer YOUR_API_KEY' \
>   --header 'Content-Type: application/json' \
>   --data '{"voice_name":"Narrator","voice_url":"https://example.com/voice.mp3"}'
> ```
>
> **voice\_name** `string` *required*
>
> Custom voice name.
>
> **voice\_url** `string` *required*
>
> Public URL of the voice sample.
>
> ## Create response
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "data": {"task_id": "TASK_ID", "task_status": "submitted"}
> }
> ```
>
> **data.task\_id** `string`
>
> Custom voice task ID.
>
> **data.task\_status** `string`
>
> Initial status, normally `submitted`.
>
> ## Query response
>
> Query with `GET /kling/v2/general/custom-voices/TASK_ID`.
>
> ```bash cURL theme={null}
> curl --request GET \
>   --url 'https://www.anyfast.ai/kling/v2/general/custom-voices/TASK_ID' \
>   --header 'Authorization: Bearer YOUR_API_KEY'
> ```
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "data": {
>     "task_id": "TASK_ID",
>     "task_status": "succeed",
>     "task_result": {
>       "voices": [
>         {
>           "voice_id": "VOICE_ID",
>           "voice_name": "Narrator",
>           "trial_url": "https://example.com/trial.mp3",
>           "owned_by": "self",
>           "status": "succeed"
>         }
>       ]
>     }
>   }
> }
> ```
>
> **data.task\_id** `string`
>
> Custom voice task ID.
>
> **data.task\_status** `string`
>
> Custom voice task status.
>
> **data.task\_result** `object`
>
> Completed voice result.
>
> **data.task\_result.voices\[]** `object[]`
>
> Reusable voice results.
>
> **data.task\_result.voices\[].voice\_id** `string`
>
> Reusable voice ID.
>
> **data.task\_result.voices\[].voice\_name** `string`
>
> Voice name.
>
> **data.task\_result.voices\[].trial\_url** `string`
>
> Trial audio URL.
>
> **data.task\_result.voices\[].owned\_by** `string`
>
> Voice owner or provider.
>
> **data.task\_result.voices\[].status** `string`
>
> Voice processing status.
>
> Older integrations can use the v1 create and query routes listed above.
>
> ## Query preset voices
>
> ```bash cURL theme={null}
> curl --request GET \
>   --url 'https://www.anyfast.ai/kling/v1/general/presets-voices?pageNum=1&pageSize=30' \
>   --header 'Authorization: Bearer YOUR_API_KEY'
> ```
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "SUCCEED",
>   "request_id": "REQUEST_ID",
>   "data": [
>     {
>       "task_id": "PRESET_TASK_ID",
>       "task_status": "succeed",
>       "task_result": {
>         "voices": [
>           {
>             "voice_id": "PRESET_VOICE_ID",
>             "voice_name": "Warm narrator",
>             "trial_url": "https://example.com/preset.mp3",
>             "owned_by": "vod",
>             "status": "succeed"
>           }
>         ]
>       }
>     }
>   ]
> }
> ```
>
> **code** `integer`
>
> Response code; `0` indicates success.
>
> **message** `string`
>
> Response message.
>
> **request\_id** `string`
>
> AnyFast request ID.
>
> **data** `object[]`
>
> Preset voice task records.
>
> **data\[].task\_id** `string`
>
> Preset voice task ID.
>
> **data\[].task\_status** `string`
>
> Preset voice task status.
>
> **data\[].task\_result** `object`
>
> Preset voice result.
>
> **data\[].task\_result.voices\[]** `object[]`
>
> Preset voices returned by the task.
>
> **data\[].task\_result.voices\[].voice\_id** `string`
>
> Preset voice ID.
>
> **data\[].task\_result.voices\[].voice\_name** `string`
>
> Preset voice name.
>
> **data\[].task\_result.voices\[].trial\_url** `string`
>
> Trial audio URL.
>
> **data\[].task\_result.voices\[].owned\_by** `string`
>
> Voice owner or provider.
>
> **data\[].task\_result.voices\[].status** `string`
>
> Voice status.

> [!WARNING]
>
> Generated image and video URLs are cleared after 30 days. Download and store successful results promptly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.