Skip to main content
GET
/
admin
/
budgets
/
status
Get live budget status
curl --request GET \
  --url https://{organization_id}.platform.barndoor.ai/api/llm-gateway/admin/budgets/status \
  --header 'Authorization: Bearer <token>'
[
  {
    "budget": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "Engineering monthly tokens",
      "token_limit": 50000000,
      "alert_thresholds": [
        80,
        90
      ],
      "traffic_type": "all",
      "currency": "USD",
      "enabled": true,
      "scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "scope_value": "<string>",
      "cost_limit": 123,
      "target_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "target_upstream_model": "<string>",
      "target_model_alias": "<string>"
    },
    "tokens_used": 123,
    "percentage_used": 123,
    "cost_used": 123,
    "cost_percentage_used": 123
  }
]

Authorizations

Authorization
string
header
required

JWT obtained through Barndoor's authentication flow. Pass the token verbatim in Authorization: Bearer <token>. Use the Barndoor SDK's loginInteractive() helper to obtain a token in scripts and notebooks.

Response

200 - application/json

Live budget usage

budget
object
tokens_used
integer<int64>
percentage_used
number
cost_used
number
cost_percentage_used
number