Skip to main content
PUT
/
api
/
governance
/
providers
/
{provider_name}
Error
A valid request URL is required to generate request examples
{
  "provider": "<string>",
  "budgets": [
    {
      "id": "<string>",
      "max_limit": 123,
      "reset_duration": "<string>",
      "last_reset": "2023-11-07T05:31:56Z",
      "current_usage": 123,
      "config_hash": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "calendar_aligned": false,
      "team_id": "<string>",
      "virtual_key_id": "<string>",
      "provider_config_id": 123
    }
  ],
  "budget": {
    "id": "<string>",
    "max_limit": 123,
    "reset_duration": "<string>",
    "last_reset": "2023-11-07T05:31:56Z",
    "current_usage": 123,
    "config_hash": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "calendar_aligned": false,
    "team_id": "<string>",
    "virtual_key_id": "<string>",
    "provider_config_id": 123
  },
  "rate_limit": {
    "id": "<string>",
    "token_current_usage": 123,
    "token_last_reset": "2023-11-07T05:31:56Z",
    "request_current_usage": 123,
    "request_last_reset": "2023-11-07T05:31:56Z",
    "config_hash": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "token_max_limit": 123,
    "token_reset_duration": "<string>",
    "request_max_limit": 123,
    "request_reset_duration": "<string>"
  },
  "calendar_aligned": false
}

Authorizations

Authorization
string
header
required

Management API authentication for /api/* endpoints. Use the Authorization header with Bearer <API key>. Virtual keys, dashboard/user/session tokens, and x-api-key headers are not supported on management APIs.

Path Parameters

provider_name
string
required

Provider name

Body

application/json

Request to update provider governance settings

budgets
object[] | null

Full desired set of budgets. Pointer-to-slice semantics apply: omitting the field leaves budgets unchanged; sending an empty array [] removes all budgets; sending a non-empty array replaces all existing budgets with the provided set.

budget
object

Deprecated: use budgets.

rate_limit
object

Rate limit configuration

calendar_aligned
boolean | null

When true, all budgets reset at clean calendar boundaries. Omit to leave unchanged.

Response

Provider governance updated successfully

Response containing provider governance settings

provider
string

Provider name

budgets
object[]

Budget configurations for this provider. Each entry has a unique reset_duration.

budget
object

Deprecated: use budgets. Returns the first budget for backward compatibility.

rate_limit
object

Rate limit configuration

calendar_aligned
boolean
default:false

When true, all budgets reset at clean calendar boundaries (midnight UTC for day, Monday for week, 1st for month, Jan 1 for year).