基于php,无需apikey,无限次数无限间隔调用
<?php
// 接收GET请求参数
$model = isset($_GET['model']) ? $_GET['model'] : 'diffusion_cute_bunny';
$url = isset($_GET['url']) ? $_GET['url'] : '';
// 检查URL是否为空
if (empty($url)) {
echo json_encode(['error' => 'URL cannot be empty']);
exit;
}
// 使用curl向快手AI API发起请求
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ai.kuaishou.com/api/effects/$model");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/x-www-form-urlencoded',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'typeId' => 2,
'url' => $url,
]));
// 执行请求并获取响应
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo json_encode(['error' => curl_error($ch)]);
curl_close($ch);
exit;
}
curl_close($ch);
// 将响应原样输出
echo $response;
?>
调用格式
http://你的域名/文件名.php?url=资源的直链&model=模型名字
注意:资源链接内的资源不要太大,你用什么模型就放什么对应的资源
模型名:
diffusion_xc炫彩diffusion_cutemoe1可爱Q萌diffusion_jpa2次元漫画diffusion_weddinggirl女神婚纱diffusion_haru春日女神diffusion_cheongsam旗袍女神diffusion_cute_bunny兔子风格diffusion_cute_lantern元宵节diffusion_redpack红包diffusion_diffuser_cutemoe春节diffusion_cute_xmas圣诞diffusion_chinese_style国风diffusion_gufeng古风diffusion_valentine情侣diffusion_jpagender_safe变性diffusion_my2023下一站diffusion_soccer足球风diffusion_soccerrand球员diffusion_jpa_xmas圣诞日漫diffusion_xmas_rand2圣诞美漫diffusion_wedding婚纱照diffusion_jpaany_3dphoto_safe万物拟人diffusion_jpapet_safe宠物拟人diffusion_human2pet人变狗diffusion_shinkai新海诚(场景)diffusion_chahua0插画(场景)diffusion_monet莫奈(场景)diffusion_vangogh梵高(场景)subtitle_generate提取音视频字幕
这个系列大家如果喜欢后续会更新文转音频,人脸关键点,人脸颜值,性别等信息等等的api
有服务器的姥搭建出来可以无偿放在评论区供大家使用