---
title: "List guardrails"
method: GET
path: "/guardrails"
tags: ["Guardrails"]
---

# List guardrails

`GET /guardrails`

List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.

## Query parameters

- `offset` integer, nullable — Number of records to skip for pagination
- `limit` integer — Maximum number of records to return (max 100)
- `workspace_id` string, uuid — Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.

## Response `200`

List of guardrails

- ListGuardrailsResponse
  - `data` Guardrail[], required — List of guardrails
    - `allowed_models` string[], nullable — Array of model canonical_slugs (immutable identifiers)
    - `allowed_providers` string[], nullable — List of allowed provider IDs
    - `content_filter_builtins` ContentFilterBuiltinEntry[], nullable — Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector.
      - `action` 'redact' | 'block' | 'flag', required — Action taken when the builtin filter triggers
      - `label` string — Read-only, system-assigned redaction placeholder derived from the slug (e.g. "[EMAIL]", "[PHONE]"). Not settable by the caller.
      - `scan_scope` 'user_only' | 'all_messages' — Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.
      - `slug` 'email' | 'phone' | 'ssn' | 'credit-card' | 'ip-address' | 'person-name' | 'address' | 'regex-prompt-injection', required — The builtin filter identifier
    - `content_filters` ContentFilterEntry[], nullable — Custom regex content filters applied to request messages
      - `action` 'redact' | 'block' | 'flag', required — Action taken when the pattern matches
      - `label` string, nullable — Optional label used in redaction placeholders or error messages
      - `pattern` string, required — A regex pattern to match against request content
    - `created_at` string, required — ISO 8601 timestamp of when the guardrail was created
    - `description` string, nullable — Description of the guardrail
    - `enforce_zdr` boolean, nullable — Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
    - `enforce_zdr_anthropic` boolean, nullable — Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
    - `enforce_zdr_google` boolean, nullable — Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
    - `enforce_zdr_openai` boolean, nullable — Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
    - `enforce_zdr_other` boolean, nullable — Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
    - `enforce_zdr_xai` boolean, nullable — Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
    - `id` string, uuid, required — Unique identifier for the guardrail
    - `ignored_models` string[], nullable — Array of model canonical_slugs to exclude from routing
    - `ignored_providers` string[], nullable — List of provider IDs to exclude from routing
    - `include_byok_in_budgets` boolean, required — Whether BYOK (bring-your-own-key) inference spend counts toward this guardrail's limit_usd, in addition to OpenRouter credit spend.
    - `limit_usd` number, double, nullable — Spending limit in USD
    - `name` string, required — Name of the guardrail
    - `reset_interval` 'daily' | 'weekly' | 'monthly' | 'null', nullable — Interval at which the limit resets (daily, weekly, monthly)
    - `updated_at` string, nullable — ISO 8601 timestamp of when the guardrail was last updated
    - `workspace_id` string, required — The workspace ID this guardrail belongs to.
  - `total_count` integer, required — Total number of guardrails

## Other responses

- `400` — Bad Request - Invalid request parameters or malformed input
- `401` — Unauthorized - Authentication required or invalid credentials
- `500` — Internal Server Error - Unexpected server error

## Changes

- **2026-07-24** `e7bfee97794c` — 1 info
  - added the required property `data/items/include_byok_in_budgets` to the response with the `200` status
- **2026-07-21** `80c5bd199def` — 1 info
  - added the non-success response with the status `400`
- **2026-07-17** `6aaba48b96d6` — 1 warning
  - added the new `flag` enum value to the `data/items/content_filters/items/action` response property for the response status `200`
- **2026-07-14** `e51e9261ea50` — 1 info
  - added the optional property `data/items/enforce_zdr_xai` to the response with the `200` status
- **2026-07-13** `9814733ca74d` — 2 breaking
  - for the `query` request parameter `limit`, default value `50` was added
  - for the `query` request parameter `offset`, default value `0` was added

[Change history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/guardrails/get.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openrouterteam/openrouter-api/revisions/2db4d2e31592/schema)
