Get usage
curl --request GET \
--url https://arena-predictions.com/api/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"tier": "none",
"month": {
"limit": 123,
"used": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"minute": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"key": {
"prefix": "<string>",
"requestsThisMonth": 123,
"lastUsedAt": "2023-11-07T05:31:56Z"
},
"enforced": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Usage
Get usage
The key’s account against its plan: requests this month (all keys together) and this minute, when each resets, this key’s own count, and whether the limits refuse requests yet. Any valid key; never counted.
GET
/
usage
Get usage
curl --request GET \
--url https://arena-predictions.com/api/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"tier": "none",
"month": {
"limit": 123,
"used": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"minute": {
"limit": 123,
"remaining": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"key": {
"prefix": "<string>",
"requestsThisMonth": 123,
"lastUsedAt": "2023-11-07T05:31:56Z"
},
"enforced": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Authorizations
Authorization: Bearer arena_sk_... (the x-arena-key header is accepted too). Keys are created at /docs, shown once, stored hashed.
Response
Where the account stands.
none: signed in, without a plan.
Available options:
none, basic, builder, desk, enterprise Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
False while the limits only count (observe mode): nothing is refused.