Skip to main content
POST
Create a guardrail

Authorizations

Authorization
string
header
required

A management key (created from the organization dashboard or with POST /v3/manage/auth-keys), sent as Authorization: Bearer <management_key>. Inference API keys (sk-eden...) are not accepted on these endpoints.

Body

A guardrail's settings. Every field but name is optional and left out means not set: no model rules, no rate limit, no budget. A new guardrail starts active; pause it with PUT /v3/manage/guardrails/{guardrail_id}/active.

name
string
required
Required string length: 1 - 200
description
string | null
default:""
Maximum string length: 500
model_rules
unknown
rate_limit
string | null
Required string length: 1 - 15
budget_cap
number<double> | null
Required range: -100000 < x < 100000
budget_period
  • daily - Daily
  • weekly - Weekly
  • monthly - Monthly
Available options:
daily,
weekly,
monthly
budget_alert_percent
integer | null
Required range: 1 <= x <= 100

Response

201 - application/json
id
integer
required
read-only
name
string
required
Maximum string length: 200
is_active
boolean
required
read-only
is_default
boolean
required
read-only

Whether this is its organization's default guardrail.

Pass organization in the context (every guardrail view does) so a list reads the default off that one row instead of a query per guardrail.

created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
description
string
model_rules
unknown
rate_limit
string | null
Maximum string length: 15
budget_cap
number<double> | null
Required range: -100000 < x < 100000
budget_period
  • daily - Daily
  • weekly - Weekly
  • monthly - Monthly
Available options:
daily,
weekly,
monthly
budget_alert_percent
integer | null
Required range: 1 <= x <= 100