BitRouterBitRouter.
Get API Key
Management

Create a budget policy

Creates a new budget. limit_micro_usd must be strictly positive — the engine treats <= 0 as "no policy", so the API refuses the value up-front.

Requires the policy:write scope.

POST
/v1/namespaces/{nsid}/budgets

Authorization

x-api-key<token>

Anthropic-style API key header.

In: header

Path Parameters

nsid*string

Id of the target namespace. Must be owned by the caller (or equal a namespace-baked credential's own namespace), else 404.

Request Body

application/json

Budget request body.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.bitrouter.ai/v1/namespaces/string/budgets" \  -H "Content-Type: application/json" \  -d '{    "limit_micro_usd": 0,    "name": "string",    "window": null  }'
{
  "disabled_at": "2019-08-24T14:15:22Z",
  "id": "string",
  "limit_micro_usd": 0,
  "name": "string",
  "window": null
}
{
  "error": null
}
{
  "error": null
}
{
  "error": null
}

How is this guide?