Balance and ledger
curl --request GET \
--url https://studio.superscore.ai/api/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://studio.superscore.ai/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://studio.superscore.ai/api/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "usage",
"currency": "USD",
"balance_usd": 123,
"spent_last_24h_usd": 123,
"daily_limit_usd": 123,
"entries": [
{
"id": "<string>",
"kind": "grant",
"amount_usd": 123,
"generation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}API Reference
Balance and ledger
Your organization’s prepaid API balance, what it committed in the last 24 hours against its $50 daily limit, and recent ledger entries.
GET
/
usage
Balance and ledger
curl --request GET \
--url https://studio.superscore.ai/api/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://studio.superscore.ai/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://studio.superscore.ai/api/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "usage",
"currency": "USD",
"balance_usd": 123,
"spent_last_24h_usd": 123,
"daily_limit_usd": 123,
"entries": [
{
"id": "<string>",
"kind": "grant",
"amount_usd": 123,
"generation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}