Skip to main content
POST
/
generate
/
k
/
kling26-text-to-video
Kling 2.6 Text-to-Video
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/kling26-text-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A cat walking in the garden",
  "aspect_ratio": "16:9",
  "duration": 5,
  "sound": false
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate videos from text using Kuaishou’s Kling 2.6 model. Key Features:
  • Extended Duration - Generate 5 or 10-second high-quality videos
  • Multiple Aspect Ratios - Support 1:1, 16:9, 9:16 and other popular ratios
  • Audio Generation - Optional sound effects to enhance video impact
  • HD Quality - Output smooth, natural high-definition video content

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required, max 1000 characters)

Required string length: 1 - 1000
Example:

"A cat walking in the garden"

aspect_ratio
enum<string>
default:1:1

Aspect ratio (optional, default 1:1)

Available options:
1:1,
16:9,
9:16
Example:

"16:9"

duration
enum<integer>
default:5

Video duration (optional, 5 or 10 seconds, default 5)

Available options:
5,
10
Example:

5

sound
boolean
default:false

Whether to include sound (optional, default false)

Example:

false

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"