- Get Started
- Endpoints
- Song(Udio)
- Kling
- Hailuo
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Trellis
- Luma Dream Machine
- WanX
- Skyreels
- Framepack
- Hunyuan Video
- Mmaudio
- DiffRhythm
- Ace Step
- Tools
- PiAPI Account Management
- Resources
- Legacy Documentation
Kling Effects
POST
https://api.piapi.ai/api/v1/task
These effects must input prompt: rocket,hearting,fighting,kissing,hugging,birthday,water. Otherwise, it is very likely to fail on generation.
Request
Header Params
x-api-key
string
required
Body Params application/json
model
string
required
kling
Default:
kling
task_type
string
required
effects
Default:
effects
input
object
required
image_url
string
required
effect
enum<string>
required
Allowed values:
squishexpansionjellycat_overseaspinoffrocketheartingfightingkissinghuggingfigurevstackbirthdaywatersurfing
prompt
string
optional
professional_mode
boolean
optional
Default:
false
config
object
optional
webhook_config
object
optional
service_mode
enum<string>
optional
the user chose on the workspace setting of your account.
public
means this task will be processed under PAYG mode.private
means this task will be processed under HYA mode.Allowed values:
publicprivate
Example
{
"model": "kling",
"task_type": "effects",
"input": {
"image_url": "string",
"effect": "squish",
"prompt": "string",
"professional_mode": false
},
"config": {
"webhook_config": {
"endpoint": "string",
"secret": "string"
},
"service_mode": "public"
}
}
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.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "kling",
"task_type": "effects",
"input": {
"image_url": "string",
"effect": "squish",
"prompt": "string",
"professional_mode": false
},
"config": {
"webhook_config": {
"endpoint": "string",
"secret": "string"
},
"service_mode": "public"
}
}'
Responses
🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-07-02 07:04:07