Create a Kling text-to-video task

Generate a video from a text description using a Kling model. Supported models include kling-v1, kling-v1-5, and others.

POST /kling/v1/videos/text2video

Service root: https://getrouter.ai

Protocol: Provider task API

Authentication: Authorization: Bearer YOUR_API_KEY

Request body

The request body is optional. Media type: application/json

Request fields

FieldTypeRequiredDescription
modelstringNoModel or style ID
promptstringNoText prompt describing the video
imagestringNoImage input (URL or Base64)
durationnumberNoVideo duration in seconds
widthintegerNoVideo width
heightintegerNoVideo height
fpsintegerNoVideo frame rate
seedintegerNoRandom seed
nintegerNoNumber of videos to generate
response_formatstringNoResponse format
userstringNoUser identifier
metadataobjectNoAdditional parameters, such as negative_prompt, style, and quality_level

Example request

curl --request POST \
  --url https://getrouter.ai/kling/v1/videos/text2video \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{}'

Responses

StatusDescription
200Video generation task created successfully
400Invalid request parameters

Success response fields

FieldTypeRequiredDescription
task_idstringNoTask ID
statusstringNoTask status

Example response

{
  "task_id": "TASK_ID",
  "status": "completed"
}

For complete workflows and examples, read the Video Generation API Guide.


This page is generated from the public Relay OpenAPI specification. Browse the complete specification in the API Explorer.