Kling O1 Image
Overview
Kling O1 Image is Kuaishou’s advanced reasoning-based image generation model. It features enhanced understanding of complex prompts and produces high-quality images with excellent composition and detail. The model supports both Text-to-Image and Image-to-Image generation.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwith.ai/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The input prompt (e.g., “a serene Japanese garden at sunrise”) |
| image_urls | array | Conditional | [“https://cdn.pixwith.ai/xxx.jpg ”]. Provide 1-4 images for Image-to-Image mode. |
| model_id | string | Yes | 0-34 |
| options | object | Yes | Configuration options for the task |
| options.prompt_optimization | boolean | Yes | If true, all prompt words will be automatically translated into English. |
| options.num_outputs | int | No | Number of images to generate. Valid values: 1 to 4. Default: 1. |
| options.resolution | string | Yes | Output resolution. Valid values: '1K', '2K'. Default: '1K'. |
| options.aspect_ratio | string | Yes | Aspect ratio of the output. Text-to-Image: '1:1' (Default), '16:9', '9:16', '3:4', '4:3', '2:3', '3:2', '21:9'. Image-to-Image: additionally supports 'auto' (auto-detect from input image). |
Example Request - Text-to-Image
{
"prompt": "a serene Japanese garden at sunrise",
"model_id": "0-34",
"options": {
"prompt_optimization": true,
"num_outputs": 1,
"resolution": "1K",
"aspect_ratio": "16:9"
}
}Example Request - Image-to-Image
{
"prompt": "add cherry blossoms falling",
"image_urls": ["https://cdn.pixwith.ai/example.jpg"],
"model_id": "0-34",
"options": {
"prompt_optimization": true,
"num_outputs": 2,
"resolution": "2K",
"aspect_ratio": "auto"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages |
| data | object | |
| data.task_id | string | |
| data.estimated_time | int | Estimated time in seconds |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 30
}
}Credits
| Resolution | Credits per Image |
|---|---|
| 1K | 5 |
| 2K | 5 |
Last updated on