/api/orgs/{org_id}/trace-tags/budgetSet the checks budget
A monthly cap on what AI checks draw from your credits (null for none) and, optionally, AI judge calls per second. When this month's draw would pass the cap, AI checks stop until the next month (state cap_reached). Rule checks are free and never stop for the cap.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.
Request body
monthly_cap_nano_usdinteger | nullrequiredThis UTC month's cap on what AI checks draw, nano-USD; null for none.
calls_per_secondnumber | null0.1 to 20; default 2.
Responses
200The budget.
Response
calls_per_secondnumbermonthly_cap_nano_usdinteger | nullmonth_spend_nano_usdintegermonth_callsintegerstateenumWhy checks are paused, if they are. Checks never retry in a loop: a paused organization is checked again after 10 minutes.
judge_modelsarray<object>The judges this organization may pick,
AIandRule.judge_models
slugstringlabelstringprice_per_span_nano_usdinteger
ai_checksobject | nullYour plan's AI check terms. One AI check per judgment, a request or a session judged, however many AI checks score it; a retry counts nothing. Rule checks are free.
ai_checks
plan_billingbooleanWhether these terms are in effect.
included_per_monthinteger | nullAI-checked requests or sessions included each month, one per judgment. 0 on Free, which has no AI checks.
nano_usd_per_checkinteger | nullThe price of one AI check (one judgment) past the included amount, in nano-USD. Null when there is none and AI checks pause there.
used_this_monthintegerAI checks (judgments) this UTC month.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422The body or query failed validation.
Response
detailarray<object>requireddetail
typestringlocarray<string | integer>msgstring
Request
curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/trace-tags/budget' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"monthly_cap_nano_usd": 50000000000,
"calls_per_second": 2
}'Response
{
"calls_per_second": 2,
"monthly_cap_nano_usd": 50000000000,
"month_spend_nano_usd": 1820000000,
"month_calls": 9120,
"state": "running",
"judge_models": [
{
"slug": "deterministic-rules",
"label": "Rule",
"price_per_span_nano_usd": 0
}
],
"ai_checks": {
"plan_billing": true,
"included_per_month": 6500,
"nano_usd_per_check": 550000,
"used_this_month": 1840
}
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/trace-tags/budget