Skip to content

Commit e988388

Browse files
Dmitry Tumanovgitbook-bot
authored andcommitted
GITBOOK-627: docs AUTO: Kling O1 models
1 parent 2fba411 commit e988388

2 files changed

Lines changed: 156 additions & 0 deletions

File tree

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@
269269
* [avatar-pro](api-references/video-models/kling-ai/avatar-pro.md)
270270
* [video-v2.6-pro-text-to-video](api-references/video-models/kling-ai/video-v2-6-pro-text-to-video.md)
271271
* [video-v2.6-pro-image-to-video](api-references/video-models/kling-ai/video-v2.6-pro-image-to-video.md)
272+
* [kling o1 models](api-references/video-models/kling-ai/kling-o1-models.md)
272273
* [Krea](api-references/video-models/krea/README.md)
273274
* [krea-wan-14b/text-to-video](api-references/video-models/krea/krea-wan-14b-text-to-video.md)
274275
* [krea-wan-14b/video-to-video](api-references/video-models/krea/krea-wan-14b-video-to-video.md)
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
hidden: true
3+
noIndex: true
4+
---
5+
6+
# kling o1 models
7+
8+
{% columns %}
9+
{% column width="66.66666666666666%" %}
10+
{% hint style="info" %}
11+
This documentation is valid for the following list of our models:
12+
13+
* `klingai/image-o1`
14+
* `klingai/video-o1-reference-to-video`
15+
* `klingai/video-o1-image-to-video`
16+
* `klingai/video-o1-video-to-video-edit`
17+
* `klingai/video-o1-video-to-video-reference`
18+
{% endhint %}
19+
{% endcolumn %}
20+
21+
{% column width="33.33333333333334%" %}
22+
<a href="https://aimlapi.com/app/?model=klingai/image-o1" class="button primary">Try in Playground</a>
23+
{% endcolumn %}
24+
{% endcolumns %}
25+
26+
## Model Overview
27+
28+
Kling O1 models are a family of high-quality image and video generation systems developed by Kling AI and served via fal ai. The Kling Image O1 model focuses on image creation and editing, producing photorealistic scenes, human portraits, product shots, and stylized visuals suitable for a wide range of creative and commercial use cases.
29+
30+
The Kling Video O1 variants support reference-to-video, image-to-video, and video-to-video workflows, enabling generation and editing of short-form content such as ads, promos, and social clips. These models are optimized for smooth motion, visual coherence, and consistent style or identity across frames, making them suitable for professional video production pipelines.
31+
32+
## How to Make a Call
33+
34+
<details>
35+
36+
<summary>Step-by-Step Instructions</summary>
37+
38+
:digit\_one: **Setup You Can’t Skip**
39+
40+
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet). :black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure the key is enabled on the UI.
41+
42+
:digit\_two: **Copy the code example**
43+
44+
At the bottom of this page, you'll find a code example that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
45+
46+
:digit\_three: **Modify the code example**
47+
48+
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key. :black\_small\_square: Insert your question or request into the `content` field—this is what the model will respond to.
49+
50+
:digit\_four: <sup><sub><mark style="background-color:yellow;">**(Optional)**<mark style="background-color:yellow;"><sub></sup> **Adjust other optional parameters if needed**
51+
52+
Only `model` and `messages` are required parameters for this model (and they are already correctly set in the example), but you can include optional parameters to fine-tune behavior. Below, you can find the corresponding **API schema**, which lists all available parameters and usage notes.
53+
54+
:digit\_five: **Run your modified code**
55+
56+
Run your modified code inside your development environment. Response time depends on many factors, but for simple prompts it rarely exceeds a few seconds.
57+
58+
{% hint style="success" %}
59+
If you need a more detailed walkthrough for setting up your development environment and making a request step-by-step, feel free to use our [**Quickstart guide.**](https://docs.aimlapi.com/quickstart/setting-up)
60+
{% endhint %}
61+
62+
</details>
63+
64+
## API Schema
65+
66+
{% openapi-operation spec="kling-o1-models" path="/v1/images/generations" method="post" %}
67+
[OpenAPI kling-o1-models](https://raw.githubusercontent.com/D1m7asis/aimlapi-api-docs/2c1e462b47e633f8d3e3accd939c2705f65bbefc/docs/api-references/autoDoc/kling-o1-models.json)
68+
{% endopenapi-operation %}
69+
70+
{% openapi-operation spec="kling-o1-models" path="/images/generations" method="post" %}
71+
[OpenAPI kling-o1-models](https://raw.githubusercontent.com/D1m7asis/aimlapi-api-docs/2c1e462b47e633f8d3e3accd939c2705f65bbefc/docs/api-references/autoDoc/kling-o1-models.json)
72+
{% endopenapi-operation %}
73+
74+
## Code Example
75+
76+
{% tabs %}
77+
{% tab title="Python" %}
78+
{% code overflow="wrap" %}
79+
```python
80+
import requests
81+
82+
response = requests.post(
83+
"https://api.aimlapi.com/v1/images/generations",
84+
headers={"Authorization":"Bearer <YOUR_AIMLAPI_KEY>","Content-Type":"application/json"},
85+
data=json.dumps({
86+
"model": "klingai/image-o1",
87+
"prompt": "Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.",
88+
"image_urls": [\
89+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png",\
90+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg",\
91+
],
92+
})
93+
)
94+
95+
data = response.json()
96+
```
97+
{% endcode %}
98+
{% endtab %}
99+
100+
{% tab title="JavaScript" %}
101+
{% code overflow="wrap" %}
102+
```javascript
103+
const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
104+
method: 'POST',
105+
headers: {
106+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
107+
"Content-Type": "application/json"
108+
},
109+
body: JSON.stringify({
110+
"model": "klingai/image-o1",
111+
"prompt": "Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.",
112+
"image_urls": [\
113+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png",\
114+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg",\
115+
],
116+
117+
})
118+
});
119+
120+
const data = await response.json();
121+
```
122+
{% endcode %}
123+
{% endtab %}
124+
{% endtabs %}
125+
126+
<details>
127+
128+
<summary>Response</summary>
129+
130+
{% code overflow="wrap" %}
131+
```json5
132+
{
133+
"id": "img-gen-1744193377-PR9oTu6vDabN9nj0VUUX",
134+
"object": "image.generation",
135+
"created": 1744193377,
136+
"model": "klingai/image-o1",
137+
"data": [\
138+
{\
139+
"url": "https://cdn.aimlapi.com/generated/klingai/image-o1/example-output-1.png",\
140+
"revised_prompt": "A T-Rex wearing a business suit, sitting in a cozy small café, drinking from a blue mug with a slightly blurred bokeh background."\
141+
}\
142+
],
143+
"usage": {
144+
"prompt_tokens": 0,
145+
"completion_tokens": 0,
146+
"total_tokens": 0
147+
}
148+
}
149+
```
150+
{% endcode %}
151+
152+
</details>
153+
154+
```
155+
```

0 commit comments

Comments
 (0)