Ai视频生成

文转视频或图转视频,由 飞龙网盘 提供

接口状态:正常
总调用:77
添加时间:2026-06-13
更新时间:2026-07-03

请求信息

请求地址:
https://api.nki.pw/API/ai_video.php
示例地址:
https://api.nki.pwhtai_video.php?prompt=有一个黑人拿着一个水杯然后说你好&type=text_to_video

请求参数

参数名类型必填说明
video_idstring条件必填 要查询的视频任务 ID。如果提供此参数,则进入查询模式,忽略 type 等其他参数 创建模式
typestringtext_to_video 或 image_to_video(仅在未提供 video_id 时必填)
promptstring视频内容描述
image_urlstring当 type=image_to_video 时必填 初始图片 URL(需公网可访问)
durationinteger期望视频时长(秒),默认 5,可选 3/5/10/18
widthinteger视频宽度,默认 1152
heightinteger视频高度,默认 768
frame_rateinteger帧率(fps),默认 24,范围 1~60

状态码说明

状态码说明
200请求成功,服务器已成功处理了请求。
403服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。
404请求的资源未找到。请检查您的请求地址是否正确。
429请求过于频繁。您已超出速率限制,请稍后再试。
500服务器内部错误。服务器在执行请求时遇到了问题。

在线测试

此处将显示接口返回结果...

调用示例

<?php
$url = 'https://api.nki.pw/API/ai_video.php';
$params = ['video_id' => 'YOUR_VALUE', 'type' => 'YOUR_VALUE', 'prompt' => 'YOUR_VALUE', 'image_url' => 'YOUR_VALUE', 'duration' => 'YOUR_VALUE', 'width' => 'YOUR_VALUE', 'height' => 'YOUR_VALUE', 'frame_rate' => 'YOUR_VALUE', ];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests

url = "https://api.nki.pw/API/ai_video.php"
params = {
    'video_id': 'YOUR_VALUE',
    'type': 'YOUR_VALUE',
    'prompt': 'YOUR_VALUE',
    'image_url': 'YOUR_VALUE',
    'duration': 'YOUR_VALUE',
    'width': 'YOUR_VALUE',
    'height': 'YOUR_VALUE',
    'frame_rate': 'YOUR_VALUE',
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.nki.pw/API/ai_video.php');
const params = {
    'video_id': 'YOUR_VALUE',
    'type': 'YOUR_VALUE',
    'prompt': 'YOUR_VALUE',
    'image_url': 'YOUR_VALUE',
    'duration': 'YOUR_VALUE',
    'width': 'YOUR_VALUE',
    'height': 'YOUR_VALUE',
    'frame_rate': 'YOUR_VALUE',
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

fetch(url)
    .then(response => response.text())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));