Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
可灵文生视频与图生视频 API 调用示例
API_KEY
model
kling-v2-5-turbo
YOUR_API_KEY
curl --location 'https://www.autodl.art/api/v1/kling/v1/videos/text2video' \ --header "Authorization: Bearer ${YOUR_API_KEY}" \ --header 'Content-Type: application/json' \ --data '{ "prompt": "一只橘猫坐在窗边,柔和的午后阳光,写实摄影风格", "settings": { "resolution": "1080p", "aspect_ratio": "9:16", "duration": 5 }, "options": { "callback_url": "https://xxx/callback", "external_task_id": "", "watermark_info": { "enabled": true } } }'
import requests url = "https://www.autodl.art/api/v1/kling/v1/videos/text2video" headers = { "Authorization": f"Bearer {YOUR_API_KEY}", "Content-Type": "application/json", } payload = { "prompt": "一只橘猫坐在窗边,柔和的午后阳光,写实摄影风格", "settings": { "resolution": "1080p", "aspect_ratio": "9:16", "duration": 5, }, "options": { "callback_url": "https://xxx/callback", "external_task_id": "", "watermark_info": { "enabled": True, }, }, } response = requests.post(url, headers=headers, json=payload, timeout=60) print("Status:", response.status_code) print("Response:", response.text)