Skip to main content
PUT
/
workspaces
/
{id}
/
budgets
/
{interval}
Create or update a workspace budget
curl --request PUT \
  --url https://openrouter.ai/api/v1/workspaces/{id}/budgets/{interval} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "limit_usd": 100
}
'
{
  "data": {
    "created_at": "2025-08-24T10:30:00Z",
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "limit_usd": 100,
    "reset_interval": "monthly",
    "updated_at": "2025-08-24T15:45:00Z",
    "workspace_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Path Parameters

id
string
required

The workspace ID (UUID) or slug

Minimum string length: 1
Example:

"production"

interval
enum<string>
required

Budget reset interval. Use "lifetime" for a one-time budget that never resets.

Available options:
daily,
weekly,
monthly,
lifetime
Example:

"monthly"

Body

application/json
limit_usd
number<double>
required

Spending limit in USD. Must be greater than 0.

Example:

100

Response

Budget created or updated successfully

data
object
required

The created or updated budget

Example:
{
"created_at": "2025-08-24T10:30:00Z",
"id": "770e8400-e29b-41d4-a716-446655440000",
"limit_usd": 100,
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
}