- GET START
- OpenAI Compatiable Endpoint
- Audio
- Anthropic Compatiable Endpoint
- Music Generation Endpoint
- Image Generation Endpoint
- Midjourney(images)
- Ideogram(images)
- Official documentation (updated in real time)
- Generate 3.0 (text to image)
- Remix 3.0 (hybrid image)
- Reframe 3.0(Reconstruction)
- Replace Background 3.0(Background replacement)
- Edit 3.0(Editing images)
- ideogram Text Raw Image
- ideogram Hybrid image
- ideogram enlargement HD
- ideogram describes the image
- ideogram Edit image((legacy))
- Flux(images)
- Replicate(image)
- Recraft(images)
- Video Generation Ednpoint
- veo3
- runway(video)
- kling (video)
- MiniMax Conch(video)
- luma (video)
- PIKA(video)
- sora
- Software Integration Guide
- cometapi Site API Call Testing
- OpenManus
- Chatbox
- CherryStudio
- Cursor
- ChatHub
- COZE
- FastGPT
- cline
- dify
- gptme
- Immersive Translation
- Lobe-Chat
- Zotero
- LangChain
- AnythingLLM
- Eudic Translation
- OpenAI Translator
- ChatAll Translation
- Pot Translation
- GPT Academic Optimization (gpt_academic)
- NEXT CHAT (ChatGPT Next Web)
- Obsidian's Text Generator Plugin
- Open WebUI
- avante.nvim
- librechat
- Lazy Customer Service
- utools-ChatGPT Friend
- IntelliJ Translation Plugin
- n8n
Expanded
POST
https://api.cometapi.com/kling/v1/images/editing/expand
Maintainer:Not configured
Request
Header Params
Authorization
string
required
Example:
Bearer {{api-key}}
Content-Type
string
optional
Example:
application/json
Body Params application/json
image
string
Reference Image
Examples:
iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==https://example.com/image.jpg
up_expansion_ratio
number
Upward Expansion Range
>= 0<= 2
Examples:
00.10.512
bottom_expansion_ratio
number
Downward Expansion Range
left_expansion_ratio
number
Leftward Expansion Range
>= 0<= 2
Examples:
00.10.512
right_expansion_ratio
number
Rightward Expansion Range
>= 0<= 2
Examples:
00.10.512
prompt
string
optional
<= 2500 characters
Example:
sunset landscape, detailed, high quality
n
string
optional
>= 1 characters<= 9 characters
Examples:
12
callback_url
string
optional
Example:
https://your-domain.com/callback
external_task_id
string
optional
Example:
user_task_001
Example
{
"image": "https://storage.fonedis.cc/upload_1750935799477317519.png",
"up_expansion_ratio": 0.1495,
"right_expansion_ratio": 0.6547,
"left_expansion_ratio": 0.6547,
"down_expansion_ratio": 0.1495,
"prompt": "white sun"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.cometapi.com/kling/v1/images/editing/expand' \
--header 'Authorization: Bearer {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"image": "https://storage.fonedis.cc/upload_1750935799477317519.png",
"up_expansion_ratio": 0.1495,
"right_expansion_ratio": 0.6547,
"left_expansion_ratio": 0.6547,
"down_expansion_ratio": 0.1495,
"prompt": "white sun"
}'
Responses
🟢200Successful Response
application/json
Body
code
integer
Error code; specifically define error code
image
string
required
Examples:
iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==https://example.com/image.jpg
message
string
Error message
request_id
string
Request ID, system generated, used for tracking requests, troubleshooting issues
data
object
optional
task_id
string
Task ID, system generated
task_status
string
Task status, enumerated values: submitted (submitted), processing (processing), succeed (succeed), failed (failed)
created_at
integer
Task creation time, Unix timestamp, unit ms
updated_at
integer
Task update time, Unix timestamp, unit ms
Example
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "string",
"task_status": "string",
"created_at": 0,
"updated_at": 0
}
}