Skip to main content

Quotas Commands

See Quotas module docs for permissions and data model.

soat list-quotas

List quotas

  • Method: GET
  • Path: /api/v1/quotas

Usage

soat list-quotas

Options

--project-id

Project ID (required if not using project key auth)

  • Source: query
  • Required: no
  • Type: string
  • Example: proj_V1StGXR8Z5jdHi6B
--limit

Maximum number of results to return

  • Source: query
  • Required: no
  • Type: integer
  • Default: 50
--offset

Number of results to skip

  • Source: query
  • Required: no
  • Type: integer
  • Default: 0

soat create-quota

Create a quota

  • Method: POST
  • Path: /api/v1/quotas

Usage

soat create-quota --scope <enum("project", "api_key", "agent", "actor")> --metric <enum("requests", "tokens", "cost_usd")> --window <enum("rolling_1m", "rolling_1h", "rolling_24h", "calendar_month")> --limit <number>

Options

--project-id

Project ID (required if not using project key auth)

  • Source: body
  • Required: no
  • Type: string
  • Example: proj_V1StGXR8Z5jdHi6B
--scope

The scope the quota applies to

  • Source: body
  • Required: yes
  • Type: enum("project", "api_key", "agent", "actor")
--scope-ref

Public id of the api key / agent the quota applies to. NULL means all entities of that scope type in the project.

  • Source: body
  • Required: no
  • Type: string \| null
  • Example: key_V1StGXR8Z5jdHi6B
--metric

The metric being capped

  • Source: body
  • Required: yes
  • Type: enum("requests", "tokens", "cost_usd")
  • Example: requests
--window

The window over which the metric is aggregated

  • Source: body
  • Required: yes
  • Type: enum("rolling_1m", "rolling_1h", "rolling_24h", "calendar_month")
--limit

The cap. Must be a positive integer for requests/tokens; fractional values are allowed for cost_usd.

  • Source: body
  • Required: yes
  • Type: number
  • Example: 600
--mode

enforce blocks with 429 (requests at the middleware, tokens/cost_usd at the pre-generation check); monitor observes without blocking — a breach fires the quota.exceeded webhook and writes a quotas:MonitorBreach audit entry, but the request is let through.

  • Source: body
  • Required: no
  • Type: enum("enforce", "monitor")
  • Default: enforce
  • Example: enforce

soat get-quota

Get a quota

  • Method: GET
  • Path: /api/v1/quotas/{quota_id}

Usage

soat get-quota --quota-id <string>

Options

--quota-id

Quota ID

  • Source: path
  • Required: yes
  • Type: string
  • Example: quota_V1StGXR8Z5jdHi6B

soat update-quota

Update a quota

  • Method: PATCH
  • Path: /api/v1/quotas/{quota_id}

Usage

soat update-quota --quota-id <string>

Options

--quota-id

Quota ID

  • Source: path
  • Required: yes
  • Type: string
--limit

New limit

  • Source: body
  • Required: no
  • Type: number
  • Example: 1000
--mode

New mode

  • Source: body
  • Required: no
  • Type: enum("enforce", "monitor")
  • Example: monitor

soat delete-quota

Delete a quota

  • Method: DELETE
  • Path: /api/v1/quotas/{quota_id}

Usage

soat delete-quota --quota-id <string>

Options

--quota-id

Quota ID

  • Source: path
  • Required: yes
  • Type: string