Skip to content
PActionPiAPIUpdated May 2026

How do I generate Kling videos via PiAPI?

Short answer: Drop the "PiAPIPiAPI Kling Generate Video" action anywhere in your workflow, map the inputs from upstream nodes, and publish.

Inputs

The fields this action accepts.

Every field can be mapped from an upstream trigger, AI step, table row, or hard-coded literal.

FieldTypeRequiredDescription
Prompt
prompt
stringRequiredPrompt (required)
Duration
duration
optionsOptionalDuration. Options: 5s, 10s
Model
model_name
optionsOptionalModel. Options: Kling V2.1, Kling V1.6
Aspect Ratio
aspect_ratio
optionsOptionalAspect Ratio. Options: 16:9, 9:16, 1:1
Sample request
{
"prompt": "{{trigger.prompt}}",
"duration": "{{trigger.duration}}",
"model_name": "{{trigger.model_name}}",
"aspect_ratio": "{{trigger.aspect_ratio}}"
}
Returns
{
"code": 200,
"data": {
"status": "pending",
"task_id": "task_abc"
}
}

Use these fields in downstream nodes for routing, logging, or error handling.

Triggered by

Apps that pair well as the trigger for PiAPI Kling Generate Video.

Any of these apps can fire this action as part of a workflow.

FAQ

Questions about PiAPI Kling Generate Video.

What does the PiAPI Kling Generate Video action do in PiAPI?
Generates video via Kuaishou's Kling model through PiAPI's gateway. Returns task ID for polling.
What inputs does PiAPI Kling Generate Video require?
Required: Prompt. Every input accepts a static value or a variable from any upstream node in your workflow.
Can I use dynamic inputs from earlier workflow nodes?
Yes. Any field on this action can pull values from upstream nodes, whether that's a form response, a trigger payload, an AI output, or a lookup result.
What happens if PiAPI returns an error?
The workflow pauses on the failed node, the error message is captured in the run log, and you can retry the run with one click. Auto-retry policies are configurable per workflow with exponential backoff up to 5 attempts.
Does PiAPI Kling Generate Video support batch operations?
Yes. Run PiAPI Kling Generate Video inside a Loop node to process arrays. Tiny Command handles PiAPI's rate limits automatically so you don't have to throttle manually.
More actions

Other PiAPI actions.

Send piapi kling generate video from your workflows.

Triggered by anything in the catalog. Free tier available. No credit card.