Returns the workspace's billing settings with this month's spend against the budget. Any role can call it.
Request#
This endpoint takes no path, query or body parameters.
Example request#
curl https://api.tried.com.au/billing/settings \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/billing/settings", {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const settings = await res.json();import os, requests
res = requests.get(
"https://api.tried.com.au/billing/settings",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
settings = res.json()Response#
200 OK
{
"provider": "mock",
"auto_recharge_enabled": true,
"auto_recharge_below": 10,
"auto_recharge_amount": 50,
"monthly_budget": 500,
"month": "2026-10",
"month_usage": 182.4375,
"budget_percent": 36.5,
"budget_reached": false,
"payment_method": {
"brand": "visa",
"last4": "4242",
"exp": "12/30"
}
}| Field | Type | Description |
|---|---|---|
provider |
string | stripe when STRIPE_SECRET_KEY is set, otherwise mock. |
auto_recharge_enabled |
boolean | Buy credits automatically when the balance drops below auto_recharge_below. Default false. |
auto_recharge_below |
number | Balance threshold in AUD. Default 5. |
auto_recharge_amount |
number | AUD bought per auto-recharge. Default 20. |
monthly_budget |
number or null | Spending cap per calendar month (UTC) in AUD. null means no budget. |
month |
string | Current month, YYYY-MM (UTC). |
month_usage |
number | Spend this month: call costs, chat costs and platform usage. |
budget_percent |
number or null | month_usage as a percent of monthly_budget, one decimal. null without a budget. |
budget_reached |
boolean | true when month_usage is at or above the budget. New calls and chats then return 402 with error_code: "budget_reached". |
payment_method |
object or null | Saved card summary: brand, last4, exp. |
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the admin scope. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.