---
title: "Check budget before request"
method: POST
path: "/api/v1/budgets/check"
tags: ["Cost Controls"]
---

# Check budget before request

`POST /api/v1/budgets/check`

## Request

- Base URL: `https://orchestrator.getaxonflow.com`
- URL: `https://orchestrator.getaxonflow.com/api/v1/budgets/check`
- Auth: none declared
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/docs/api/v1/budgets/check/post.ts> (a function with typed inputs; its response is checked against the schema)

Check if a request should be allowed based on budget constraints.
Returns whether the request is allowed and the applicable budget status.

Enterprise only. These routes are not registered in Community
edition, which returns 404 Not Found.

## Request body

- BudgetCheckRequest
  - `org_id` string, required
  - `team_id` string
  - `agent_id` string
  - `workflow_id` string
  - `user_id` string

## Response `200`

Budget check result

- BudgetCheckResponse
  - `allowed` boolean: Whether the request should be allowed
  - `action` 'warn' | 'block' | 'downgrade': Action that was taken (if budget exceeded)
  - `budget_id` string: ID of the budget that blocked the request
  - `budget_name` string
  - `used_usd` number, double
  - `limit_usd` number, double
  - `percentage` number, double
  - `message` string

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/revisions/f408ef3ec9dd?raw)
