Skip to main content
A guardrail is a reusable usage policy that controls two things:
  • Model access: which providers and models can be called.
  • Rate limits: how many requests can be made over a given period.
You create a guardrail once, then attach it to a role, a member, or an individual API token. For example, one team can be limited to a curated set of models, or a shared token can be capped to a low request rate.
Guardrails are part of the advanced organisation features. See plans and pricing for availability.

Creating a guardrail

1

Open Guardrails in Settings

In the Eden AI dashboard, go to Settings and, under Organization, select Guardrails.
2

Create a new guardrail

Click + Create Guardrail and give it a Name and an optional Description.
3

Set a rate limit (optional)

In the Rate Limit field, enter a limit in the form N/period, for example 10/minute. Leave it blank to inherit the rate from the next level up. See Rate limits below.
4

Restrict models (optional)

Turn on Enable model rules to control which models can be used, then define your allow/deny rules. See Model rules below.
5

Save

Click Create Guardrail. It now appears in your guardrails list, ready to assign.

Model rules

When you enable model rules, a guardrail uses a default action plus a list of exceptions:
  • Default: allow or deny every model unless a rule says otherwise.
  • Rules: each rule targets a model by pattern and sets its action to allow or deny. Rules are checked in order and the first match wins; if none match, the default applies.
Patterns can target a single model or a whole provider:
PatternMatches
openai/gpt-4oOne specific model
anthropic/*Every model from that provider
*/*Every model
Each rule can optionally be scoped to specific features (e.g. only llm/chat, or only image/generation). A request that hits a deny rule is rejected.
Two common setups:
  • Allow-list: set the default to deny, then add allow rules for only the models you permit.
  • Deny-list: set the default to allow, then add deny rules for the models you want to block.

Rate limits

The rate limit uses the format N/period, where period is second, minute, hour, or day:
10/second
100/minute
5000/hour
Leave the rate limit empty on a guardrail to inherit it from the next level up (role → organisation default).

Assigning a guardrail

A guardrail does nothing until it’s attached to something. You can assign it to:
  • A role: from Settings → Roles & Permissions, so everyone with that role inherits the policy.
  • A member: from Settings → Members, to apply it to one person.
  • An API token: to constrain a single key (for example a shared or CI token).
When a request comes in, Eden AI resolves the policy per field, most specific wins:
token  →  member  →  role  →  organisation default
For each setting (model rules and rate limit) independently, Eden AI uses the value from the most specific level that has it set, and inherits the rest. So a token can override the model rules while still inheriting its role’s rate limit.
Guardrails can also be managed programmatically through the User Management API if you need to automate provisioning. See the API Reference for the guardrails endpoints.