zh/API Keys
获取 API 密钥详情
Return details about a specific API key, including rate limits and balance data.
GET
/
api_keys
/
{id}
Get API key details by ID
curl --request GET \
--url https://api.venice.ai/api/v1/api_keys/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venice.ai/api/v1/api_keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.venice.ai/api/v1/api_keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"apiKeyType": "ADMIN",
"consumptionLimits": {
"usd": 50,
"diem": 10
},
"limitPeriod": "MONTH",
"createdAt": {},
"description": "Example API Key",
"expiresAt": {},
"id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
"last6Chars": "2V2jNW",
"lastUsedAt": {},
"usage": {
"trailingSevenDays": {
"usd": "10.2424",
"vcu": "42.2315",
"diem": "4.2231"
}
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}⌘I
Get API key details by ID
curl --request GET \
--url https://api.venice.ai/api/v1/api_keys/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venice.ai/api/v1/api_keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.venice.ai/api/v1/api_keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"apiKeyType": "ADMIN",
"consumptionLimits": {
"usd": 50,
"diem": 10
},
"limitPeriod": "MONTH",
"createdAt": {},
"description": "Example API Key",
"expiresAt": {},
"id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
"last6Chars": "2V2jNW",
"lastUsedAt": {},
"usage": {
"trailingSevenDays": {
"usd": "10.2424",
"vcu": "42.2315",
"diem": "4.2231"
}
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}