跳转到主要内容
POST
/
kling
/
v1
/
videos
/
text2video
curl --request POST \
  --url 'https://api.elkapi.com/kling/v1/videos/text2video' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "kling-v3",
  "prompt": "一只小猫在阳光下的花园里奔跑,电影感,高细节",
  "image": "https://example.com/image.png",
  "duration": 5,
  "response_format": "json",
  "metadata": {}
}'
{
  "task_id": "task_1234567890",
  "status": "queued"
}

Documentation Index

Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url 'https://api.elkapi.com/kling/v1/videos/text2video' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "kling-v3",
  "prompt": "一只小猫在阳光下的花园里奔跑,电影感,高细节",
  "image": "https://example.com/image.png",
  "duration": 5,
  "response_format": "json",
  "metadata": {}
}'
{
  "task_id": "task_1234567890",
  "status": "queued"
}

Authorizations

Authorization
string
必填
所有接口均需要使用 Bearer Token 进行认证。在请求头中添加:
Authorization: Bearer YOUR_API_KEY

Body

model
string
默认值:"kling-v3"
模型/风格 ID示例:kling-v3
prompt
string
文本描述提示词示例:宇航员站起身走了
image
string
图片输入 (URL 或 Base64)示例:https://example.com/image.jpg
duration
number
视频时长(秒)示例:5
width
integer
视频宽度示例:1280
height
integer
视频高度示例:720
fps
integer
视频帧率示例:30
seed
integer
随机种子示例:20231234
n
integer
生成视频数量示例:1
response_format
string
响应格式示例:url
user
string
用户标识示例:user-1234
metadata
object
扩展参数 (如 negative_prompt, style, quality_level 等)

Response

task_id
string
任务 ID示例:abcd1234efgh
status
string
任务状态示例:queued