Skip to main content
POST
/
kling
/
v1
/
videos
/
text2video
text to video
curl --request POST \
  --url https://gptproto.com/kling/v1/videos/text2video \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "prompt": "<string>",
  "negative_prompt": "<string>",
  "cfg_scale": 123,
  "mode": "<string>",
  "aspect_ratio": "<string>",
  "duration": "<string>",
  "callback_url": "<string>"
}'
{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}

Overview

This endpoint provides text to video functionality.

Authentication

This endpoint requires authentication using a Bearer token.
Authorization
string
required
Your API key in the format: Bearer YOUR_API_KEY

Request Body

model
string
required
The model to use for the request
prompt
string
required
Prompt parameter
negative_prompt
string
Negative Prompt parameter
cfg_scale
number
Cfg Scale parameter
mode
string
Mode parameter
aspect_ratio
string
Aspect Ratio parameter
duration
string
Duration parameter
callback_url
string
Callback Url parameter

Request Example

curl -X POST "https://gptproto.com/kling/v1/videos/text2video" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kling-video-std-10-v1-6",
  "prompt": "飞机飞过头顶",
  "negative_prompt": "",
  "cfg_scale": 0.930127850077239,
  "mode": "std",
  "aspect_ratio": "16:9",
  "duration": "10",
  "callback_url": ""
}'

Response

Success
200
Successful response
{
  "status": "success"
}

Error Responses

{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}