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

> Use kling-o1 through AnyFast's upgraded v2 Omni Video API.

Kling O1 uses the model-specific v2 Omni Video endpoint. The model is selected by the URL; do not send `model_name` or Legacy `image_list` and `video_list` fields.

## Capabilities

* Text-to-video with a prompt.
* Image, element, and video references.
* Video editing with a `base_video` content item.
* First and last frame control when supported by the input contents.

| Capability | Endpoint |
| - | - |
| Omni generation or editing | `POST /kling/v2/omni-video/kling-o1` |
| Query task | `GET /kling/v2/tasks?task_ids=TASK_ID` |

## Create a task

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/kling/v2/omni-video/kling-o1 \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "contents": [
      {"type": "prompt", "text": "A traveler walks through a rain-soaked city street"}
    ],
    "settings": {"resolution": "720p", "aspect_ratio": "16:9", "duration": 3}
  }'
```

Add reference items to `contents` and refer to each item by its unique `@id` in the prompt. Use `base_video` for source-video editing.

## Query the task

```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'
```

Kling O1 supports 3–10 second output. The v2 create response returns `data.id`; read `data[].outputs[]` after the query status becomes `succeeded`.

## Multimodal reference rules

Use a unique `id` on each `refer_image`, `feature_video`, `first_frame`, `last_frame`, or `base_video` item and reference it in the prompt with `@id`. A `base_video` item edits the source video and follows its duration when no explicit duration is supplied. A feature video can guide content, action, style, or camera movement for a new shot.

Images accept JPG, JPEG, and PNG URLs or supported Base64, with both sides at least 300 px and an aspect ratio from 1:2.5 to 2.5:1. Videos use accessible MP4 or MOV URLs, at least 3 seconds, 720–2160 px, 24–60 fps, and an aspect ratio from 1:2.5 to 2.5:1. Use at most one source video. First/end-frame workflows require a first frame and cannot be combined with incompatible element references.

Kling O1 supports 3–10 seconds, 720p and 1080p output. It does not support multi-shot generation or 4K output.

> [card] [Kling O1 API reference](https://docs.anyfast.ai/api-reference/model-api/kling/kling-o1.md)
>
> View the v2 contents and task fields.


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