curl https://api.avina.io/v1/usage \
-H "Authorization: Bearer $AVINA_API_KEY"
import os
import requests
response = requests.get(
"https://api.avina.io/v1/usage",
headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
const response = await fetch(`https://api.avina.io/v1/usage`, {
headers: {
Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);
{
"object": "usage",
"period_start": "2026-11-01T00:00:00Z",
"period_end": "2026-12-01T00:00:00Z",
"credits_used": 41.87,
"credits_limit": 200,
"credits_remaining": 158.13
}
{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid or revoked.",
"request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
}
}
Get credit usage
Returns the workspace’s credit balance and what it has spent in the current billing period.
GET
/
v1
/
usage
curl https://api.avina.io/v1/usage \
-H "Authorization: Bearer $AVINA_API_KEY"
import os
import requests
response = requests.get(
"https://api.avina.io/v1/usage",
headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
const response = await fetch(`https://api.avina.io/v1/usage`, {
headers: {
Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);
{
"object": "usage",
"period_start": "2026-11-01T00:00:00Z",
"period_end": "2026-12-01T00:00:00Z",
"credits_used": 41.87,
"credits_limit": 200,
"credits_remaining": 158.13
}
{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid or revoked.",
"request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
}
}
One credit is one US dollar.
Credits are prepaid and denominated in US dollars: 1 credit = $1.00. Searches draw down the balance as they find results. See Pricing.
Every error uses the same shape. See Errors.
Response
200 The workspace’s usage.
string
required
Always
usage.string | null
required
The start of the current billing period.
string | null
required
The end of the current billing period.
number
required
Credits spent in the current period. 1 credit = $1.00.
number | null
required
Credits available for the period, including top-ups.
null when there is no limit.number | null
required
Your balance. Credits left to spend.
null when there is no limit.Errors
| Status | Code | When |
|---|---|---|
401 | invalid_api_key | The API key is missing, invalid or revoked. |
429 | rate_limited | Too many requests. Retry after Retry-After seconds. |
500 | internal_error | Something went wrong on our side. Retry with backoff, and with the same Idempotency-Key if you sent one. |
curl https://api.avina.io/v1/usage \
-H "Authorization: Bearer $AVINA_API_KEY"
import os
import requests
response = requests.get(
"https://api.avina.io/v1/usage",
headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
const response = await fetch(`https://api.avina.io/v1/usage`, {
headers: {
Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);
{
"object": "usage",
"period_start": "2026-11-01T00:00:00Z",
"period_end": "2026-12-01T00:00:00Z",
"credits_used": 41.87,
"credits_limit": 200,
"credits_remaining": 158.13
}
{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid or revoked.",
"request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
}
}

