Orq.ai · Schema
CreateBudgetRequest
Artificial IntelligencePlatformEnterpriseGovernanceSoftwareFactory
Properties
| Name | Type | Description |
|---|---|---|
| scope | object | Structured scope. Mutually exclusive with `match`: provide a scope for the six canonical kinds (the server derives the matching CEL), or provide `match` for a dynamic budget. Exactly one of the two mu |
| match | object | Raw CEL matching expression for dynamic budgets (e.g. `metadata.team == "ml" && provider == "openai"`). Validated via CEL parse at write time. Mutually exclusive with `scope`. |
| limits | object | At least one of amount / token_limit / rate_limit.requests_per_minute must be provided on the budget. |
| rate_limit | object | Optional rate limit. |
| is_active | boolean | Whether the budget should be active immediately. Defaults to true when omitted (handler enforces). |
| expires_at | string | Optional expiration. When set in combination with is_active=true, the value MUST be in the future; the handler rejects past values. |
| alerts | array | Optional threshold notifications. Ids are assigned by the server, so `alerts[].id` must be omitted here; supplying one is rejected. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/orq/json-schema/orq-create-budget-request-schema.json",
"title": "CreateBudgetRequest",
"x-generated": "2026-11-10",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/orq-budgets-api-openapi.yml#/components/schemas/CreateBudgetRequest",
"type": "object",
"properties": {
"scope": {
"allOf": [
{
"$ref": "#/$defs/BudgetScope"
}
],
"description": "Structured scope. Mutually exclusive with `match`: provide a scope\n for the six canonical kinds (the server derives the matching CEL),\n or provide `match` for a dynamic budget. Exactly one of the two\n must be set."
},
"match": {
"allOf": [
{
"$ref": "#/$defs/BudgetMatch"
}
],
"description": "Raw CEL matching expression for dynamic budgets (e.g.\n `metadata.team == \"ml\" && provider == \"openai\"`). Validated via\n CEL parse at write time. Mutually exclusive with `scope`."
},
"limits": {
"allOf": [
{
"$ref": "#/$defs/BudgetLimits"
}
],
"description": "At least one of amount / token_limit / rate_limit.requests_per_minute\n must be provided on the budget."
},
"rate_limit": {
"allOf": [
{
"$ref": "#/$defs/RateLimit"
}
],
"description": "Optional rate limit."
},
"is_active": {
"type": "boolean",
"description": "Whether the budget should be active immediately. Defaults to true\n when omitted (handler enforces)."
},
"expires_at": {
"type": "string",
"description": "Optional expiration. When set in combination with is_active=true,\n the value MUST be in the future; the handler rejects past values.",
"format": "date-time"
},
"alerts": {
"type": "array",
"items": {
"$ref": "#/$defs/BudgetAlert"
},
"description": "Optional threshold notifications. Ids are assigned by the server, so\n `alerts[].id` must be omitted here; supplying one is rejected."
}
},
"$defs": {
"ApiKeyBudgetScope": {
"type": "object",
"properties": {
"api_key_id": {
"type": "string"
}
},
"description": "Per-api-key cap. Replaces the legacy embedded `constraints.budget`\n associated with an API key."
},
"BudgetAlert": {
"required": [
"threshold_percent",
"notifier_ids"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Assigned by ORQ. Supply an existing id to edit that alert in place."
},
"threshold_percent": {
"type": "integer",
"description": "Percentage of the dimension's limit at which the alert fires, 1–100.",
"format": "uint32"
},
"notifier_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Must be workspace-scoped; project-scoped notifiers are rejected."
},
"dimension": {
"description": "Defaults to COST when unset.",
"$ref": "#/$defs/BudgetAlertDimension"
}
},
"description": "Notifies every listed notifier once current-period consumption on\n `dimension` reaches `threshold_percent` of the matching limit. Each alert\n fires at most once per period, re-arming on rollover or a limit change.\n The dimension must have a limit set, or the write is rejected. A TOKENS alert is rejected."
},
"BudgetAlertDimension": {
"type": "string",
"enum": [
"BUDGET_ALERT_DIMENSION_COST",
"BUDGET_ALERT_DIMENSION_TOKENS"
]
},
"BudgetLimits": {
"type": "object",
"properties": {
"period": {
"$ref": "#/$defs/BudgetPeriod"
},
"amount": {
"type": "number",
"format": "double"
},
"token_limit": {
"type": "number",
"description": "Token ceiling for the budget period. Token counts are whole numbers\n and stored as integers.",
"format": "double"
}
},
"description": "BudgetLimits is the per-period spend and token ceiling. At least one\n of `amount`, `token_limit`, or RateLimit.requests_per_minute MUST be\n set on a Budget; that invariant is enforced by the handler."
},
"BudgetMatch": {
"type": "object",
"properties": {
"cel": {
"type": "string"
}
},
"description": "CEL expression that decides whether a budget applies to a request. Available variables: `model`, `provider`, `model_id`, `api_key`, `identity`, `project`, `metadata` (map), `headers` (map, lowercase keys). An empty expression always matches. Expressions are syntax-validated at write time."
},
"BudgetPeriod": {
"type": "string",
"enum": [
"BUDGET_PERIOD_DAILY",
"BUDGET_PERIOD_WEEKLY",
"BUDGET_PERIOD_MONTHLY",
"BUDGET_PERIOD_YEARLY",
"BUDGET_PERIOD_ONE_TIME"
]
},
"BudgetScope": {
"type": "object",
"properties": {
"workspace": {
"$ref": "#/$defs/WorkspaceBudgetScope"
},
"project": {
"$ref": "#/$defs/ProjectBudgetScope"
},
"identity": {
"$ref": "#/$defs/IdentityBudgetScope"
},
"api_key": {
"$ref": "#/$defs/ApiKeyBudgetScope"
},
"provider": {
"$ref": "#/$defs/ProviderBudgetScope"
},
"model": {
"$ref": "#/$defs/ModelBudgetScope"
}
},
"description": "Closed oneof of workspace, project, identity, api_key, provider, or model. Exactly one variant must be set."
},
"IdentityBudgetScope": {
"type": "object",
"properties": {
"identity_external_id": {
"type": "string"
}
},
"description": "Per-identity cap. Keyed by the contact's external identifier so the\n scope is stable across imports."
},
"ModelBudgetScope": {
"required": [
"model_id"
],
"type": "object",
"properties": {
"model_id": {
"type": "string"
}
},
"description": "Per-model cap. The value is the FULL model reference as callers send\n it (\"openai/gpt-4o\", or \"workspaceKey@openai/gpt-4o\" for private\n models)."
},
"ProjectBudgetScope": {
"type": "object",
"properties": {
"project_id": {
"type": "string"
}
},
"description": "Per-project cap."
},
"ProviderBudgetScope": {
"type": "object",
"properties": {
"provider": {
"type": "string"
}
},
"description": "Per-provider cap. The value is the provider enum string (e.g.\n \"openai\", \"anthropic\") drawn from ModelIntegrationIdentifier."
},
"RateLimit": {
"type": "object",
"properties": {
"requests_per_minute": {
"type": "integer",
"format": "int32"
}
},
"description": "Per-minute request ceiling applied to the requests this budget\n matches."
},
"WorkspaceBudgetScope": {
"type": "object",
"properties": {},
"description": "Workspace-wide ceiling. The implicit target is the caller's workspace."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/orq-create-budget-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.