Skip to content

Commit 332b63a

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-689: docs: add kling image o1
1 parent 8124c0f commit 332b63a

7 files changed

Lines changed: 130 additions & 3 deletions

File tree

1.3 MB
Loading

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ If you've already made your choice and know the model ID, use the [Search panel]
110110

111111
**Inworld**: [Text-to-Speech](api-references/speech-models/text-to-speech/inworld/)
112112

113-
<mark style="background-color:green;">**Kling AI**</mark>: [Video](api-references/video-models/Kling-AI/)
113+
<mark style="background-color:green;">**Kling AI**</mark>: [Image](api-references/image-models/kling-ai/) [Video](api-references/video-models/Kling-AI/)
114114

115115
**Krea**: [Video](api-references/video-models/krea/)
116116

docs/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@
189189
* [Gemini 2.5 Flash Image Edit (Nano Banana)](api-references/image-models/google/gemini-2.5-flash-image-edit.md)
190190
* [Nano Banana Pro (Gemini 3 Pro Image)](api-references/image-models/google/gemini-3-pro-image-preview.md)
191191
* [Nano Banana Pro Edit (Gemini 3 Pro Image Edit)](api-references/image-models/google/gemini-3-pro-image-preview-edit.md)
192+
* [Kling AI](api-references/image-models/kling-ai/README.md)
193+
* [image-o1](api-references/image-models/kling-ai/image-o1.md)
192194
* [OpenAI](api-references/image-models/OpenAI/README.md)
193195
* [DALL·E 2](api-references/image-models/OpenAI/dall-e-2.md)
194196
* [DALL·E 3](api-references/image-models/OpenAI/dall-e-3.md)

docs/api-references/image-models/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Kling AI
2+
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# image-o1
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `klingai/image-o1`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/klingai/image-o1" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
A multimodal image generation model supporting up to 10 reference images for visual consistency, detailed element editing, style control, and series generation. Ideal for character IPs, comic artwork, and branded content.
20+
21+
## Setup your API Key
22+
23+
If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
24+
25+
## API Schema
26+
27+
{% openapi-operation spec="image-o1" path="/v1/images/generations" method="post" %}
28+
[OpenAPI image-o1](https://ai.aimlapi.com/docs-json?model=klingai/image-o1&endpoint=openai/image-generations)
29+
{% endopenapi-operation %}
30+
31+
## Quick Example
32+
33+
Let's generate an image using two input images and a prompt that defines how they should be edited.
34+
35+
{% tabs %}
36+
{% tab title="Python" %}
37+
{% code overflow="wrap" %}
38+
```python
39+
import requests
40+
import json # for getting a structured output with indentation
41+
42+
def main():
43+
response = requests.post(
44+
"https://api.aimlapi.com/v1/images/generations",
45+
headers={
46+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
47+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
48+
"Content-Type": "application/json",
49+
},
50+
json={
51+
"model": "klingai/image-o1",
52+
"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.",
53+
"image_urls": [
54+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png",
55+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg"
56+
]
57+
}
58+
)
59+
60+
data = response.json()
61+
print(json.dumps(data, indent=2, ensure_ascii=False))
62+
63+
if __name__ == "__main__":
64+
main()
65+
```
66+
{% endcode %}
67+
{% endtab %}
68+
69+
{% tab title="JS" %}
70+
{% code overflow="wrap" %}
71+
```javascript
72+
async function main() {
73+
const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
74+
method: 'POST',
75+
headers: {
76+
// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
77+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
78+
'Content-Type': 'application/json',
79+
},
80+
body: JSON.stringify({
81+
model: 'klingai/image-o1',
82+
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.',
83+
image_urls: [
84+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png",
85+
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg"
86+
]
87+
}),
88+
});
89+
90+
const data = await response.json();
91+
console.log(data);
92+
}
93+
94+
main();
95+
```
96+
{% endcode %}
97+
{% endtab %}
98+
{% endtabs %}
99+
100+
<details>
101+
102+
<summary>Response</summary>
103+
104+
{% code overflow="wrap" %}
105+
```json5
106+
{
107+
"data": [
108+
{
109+
"url": "https://cdn.aimlapi.com/flamingo/files/b/0a86f297/-XYQFo9KwWdoIiU8LywM4_21acef8f06694a78a0bc1f443875cfa3.png"
110+
}
111+
],
112+
"meta": {
113+
"usage": {
114+
"credits_used": 58800
115+
}
116+
}
117+
}
118+
```
119+
{% endcode %}
120+
121+
</details>
122+
123+
<table data-full-width="true"><thead><tr><th width="442.0667724609375" valign="top">Reference Images</th><th valign="top">Generated Image</th></tr></thead><tbody><tr><td valign="top"><div><figure><img src="../../../.gitbook/assets/t-rex (1) (1).png" alt=""><figcaption><p>Image #1</p></figcaption></figure></div></td><td valign="top"><div><figure><img src="../../../.gitbook/assets/klingai-image-o1_output.png" alt=""><figcaption><p><kbd><code>"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."</code></kbd></p></figcaption></figure></div></td></tr><tr><td valign="top"><div><figure><img src="../../../.gitbook/assets/blue-mug (1).jpg" alt=""><figcaption><p>Image #2</p></figcaption></figure></div></td><td valign="top"></td></tr></tbody></table>

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)