The organisation's daily AI money and token caps with today's spend
import requests
url = "https://platform.ankra.app/api/v1/org/billing/ai-spend-cap"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/ai-spend-cap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/billing/ai-spend-cap \
--header 'Authorization: Bearer <token>'{
"daily_chat_usd_cap": 123,
"plan_default_usd": 123,
"effective_usd": 123,
"spent_today_usd": 123,
"daily_token_soft_cap": 123,
"daily_token_hard_cap": 123,
"tokens_today": 123,
"token_budget_state": "unlimited",
"monthly_free_usd": 123,
"monthly_plan_default_usd": 123,
"monthly_override_usd": 123,
"monthly_platform_spent_usd": 123,
"monthly_resets_at": "<string>",
"monthly_exhausted": true,
"allowance_exempt": true,
"byok_configured": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Billing
The organisation's daily AI money and token caps with today's spend
Returns the organisation’s daily AI limits: its own USD chat spend cap with the plan default and effective cap, the soft and hard daily token caps with the budget state, and today’s spend and token usage. Past the soft token cap unattended runs degrade to a quicker model tier; past the hard cap new unattended runs are refused until the UTC day resets.
GET
/
api
/
v1
/
org
/
billing
/
ai-spend-cap
The organisation's daily AI money and token caps with today's spend
import requests
url = "https://platform.ankra.app/api/v1/org/billing/ai-spend-cap"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/ai-spend-cap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/billing/ai-spend-cap \
--header 'Authorization: Bearer <token>'{
"daily_chat_usd_cap": 123,
"plan_default_usd": 123,
"effective_usd": 123,
"spent_today_usd": 123,
"daily_token_soft_cap": 123,
"daily_token_hard_cap": 123,
"tokens_today": 123,
"token_budget_state": "unlimited",
"monthly_free_usd": 123,
"monthly_plan_default_usd": 123,
"monthly_override_usd": 123,
"monthly_platform_spent_usd": 123,
"monthly_resets_at": "<string>",
"monthly_exhausted": true,
"allowance_exempt": true,
"byok_configured": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
Null when today's usage could not be read.
Available options:
unlimited, under, soft, hard, unknown