身份验证
Scenext API使用Bearer Token进行身份验证。您需要在每个API请求的Header中包含您的API密钥。获取API密钥
- 登录 scenext.cn
- 进入个人中心
- 找到”API Keys管理”
- 点击”创建API密钥”
- 复制并保存您的API密钥
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
了解如何使用API密钥进行身份验证
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
import requests
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(
"https://api.scenext.cn/api/gen_video",
headers=headers,
json=your_data
)
const headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
};
fetch('https://api.scenext.cn/api/gen_video', {
method: 'POST',
headers: headers,
body: JSON.stringify(your_data)
});
curl -X POST https://api.scenext.cn/api/gen_video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "问题", "answer": "参考答案"}'
{
"status": "error",
"data": {
"messages": "Unauthorized: Invalid API key"
}
}