加载中...
💡 胶片消耗参考
🎁 新用户注册即赠送 10万锁定积分,可解锁100积分用来体验
通过API Key可以程序化访问RollRoll AI的开放接口。
⚠️ 此Key仅显示一次,关闭后无法再次查看,请妥善保管!
加载中...
const API_KEY = '你的API Key';
const API_ENDPOINT = 'https://lossloop.cn/api/proxy';
async function callApi(action, data = {}) {
const response = await fetch(API_ENDPOINT, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': \`Bearer \${API_KEY}\`
},
body: JSON.stringify({
apiType: 'public-api',
action,
...data
})
});
return response.json();
}
// 调用示例
callApi('health').then(console.log);
callApi('skills').then(console.log);
import requests
API_KEY = '你的API Key'
API_ENDPOINT = 'https://lossloop.cn/api/proxy'
def call_api(action, data=None):
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {API_KEY}'
}
payload = {
'apiType': 'public-api',
'action': action,
**(data or {})
}
response = requests.post(API_ENDPOINT, json=payload, headers=headers)
return response.json()
# 调用示例
print(call_api('health'))
print(call_api('skills'))
curl -X POST https://lossloop.cn/api/proxy \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 你的API Key" \
-d '{
"apiType": "public-api",
"action": "skills"
}'
https://lossloop.cn/api/proxy
/api/{apiName}