Skip to main content
POST
/
vendors
/
kling
/
v1
/
videos
/
text2video
Text to Video
curl --request POST \
  --url https://api.mulerun.com/vendors/kling/v1/videos/text2video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model_name": "kling-v2-1-master",
  "prompt": "A beautiful woman is dancing in a room",
  "negative_prompt": "ugly, bad, distorted",
  "cfg_scale": 0.5,
  "mode": "std"
}'
{
  "task_info": {
    "id": "8e1e315e-b50d-4334-a231-be7d19a372f4",
    "status": "pending",
    "created_at": "2025-09-21T00:00:00.000Z",
    "updated_at": "2025-09-21T00:00:00.000Z"
  }
}
Most of the parameters of this API are compatible with Kling’s format. Please refer to Kling’s official documentation for more details.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Text to Video create task request body

prompt
string
required

Positive text prompt. Cannot exceed 2500 characters.

Maximum length: 2500
model_name
enum<string>
default:kling-v2-1-master

Model Name

Available options:
kling-v2-1-master
negative_prompt
string | null

Negative text prompt. Cannot exceed 2500 characters.

Maximum length: 2500
cfg_scale
number
default:0.5

Flexibility in video generation. Higher value means lower flexibility and stronger relevance to the prompt. Range [0, 1].

Not supported by Kling v2.x models.

Required range: 0 <= x <= 1
mode
enum<string>
default:std

Video generation mode

std: Standard Mode, which is cost-effective. pro: Professional Mode, generates videos use longer duration but higher quality video output.

Available options:
std,
pro
camera_control
object

Terms of controlling camera movement. If not specified, the model will intelligently match based on the input text/images.

aspect_ratio
enum<string>
default:16:9

The aspect ratio of the generated video frame (width:height)

Available options:
16:9,
9:16,
1:1
duration
enum<string>
default:5

Video Length in seconds

Available options:
5,
10

Response

202 - application/json

Message object.

task_info
object