Skip to main content
POST
Check budget enforcement

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
api_key_id
string

API key that issued the request (if any).

project_id
string

Project the request targets (if any).

identity_external_id
string

Identity external id for contact-scoped budgets (if any).

provider
string

Provider enum value for provider-scoped budgets (if any).

model_id
string

Full model reference for model-scoped budgets (if any), exactly as the caller sent it: "provider/model" or "workspaceKey@provider/model".

metadata
object

Request metadata forwarded for dynamic-budget matching (metadata.team == "ml"). Free-form JSON object from the request body's metadata field.

headers
object

Request headers (lowercase keys) forwarded for dynamic-budget matching (headers["x-env"] == "prod").

Response

200 - application/json

OK

allowed
boolean

True when no applicable budget exceeds its limit.

rejection
object

Populated when allowed is false; identifies which budget and dimension triggered the rejection.

cost
object

Cost dimension info for rate-limit headers (nil when no cost budget applies).

tokens
object

Token dimension info for rate-limit headers (nil when no token budget applies).

requests
object

Requests dimension info for rate-limit headers (nil when no RPM budget applies).