Organizations and Projects

Sets a model spend budget for the organization, a project, an agent profile, or a top-level agent. Profile and agent budgets include subagents. Once spend in the current interval reaches the budget, new model calls in that scope stop until the budget is raised or removed, or the interval resets; calls already running finish. Each scope can have one budget per interval; duplicates return 409.

post/orgs/{orgID}/budgets

Request

  • Base URL
    https://api.omnara.com/v1
  • Auth
    • HTTP bearer
    • or API key in cookie __Host-omnara_session and API key in header X-Omnara-Csrf

Path parameters

orgID, string required

Request body

CreateBudgetRequest required
scope, union required
interval, 'day' | 'week' | 'month' | 'lifetime' required

How often spend resets, in UTC: day at midnight, week on Monday, month on the 1st. lifetime never resets and counts spend recorded since budgets became available.

amount_usd, string required

Amount in USD as a positive decimal string.

Response

Budget created.

Budget required
id, string required
org_id, string required
scope, union required
interval, 'day' | 'week' | 'month' | 'lifetime' required

How often spend resets, in UTC: day at midnight, week on Monday, month on the 1st. lifetime never resets and counts spend recorded since budgets became available.

amount_usd, string required

Amount in USD as a positive decimal string.

usage, BudgetUsage

Spend in the current interval. Populated when the budget is returned by the list or get endpoint.

created_at, string date-time required
updated_at, string date-time required

Changes