---
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
    - `enable_free_model_publication` boolean, nullable — Whether this guardrail allows free endpoints that publish prompts.
    - `enable_free_model_training` boolean, nullable — Whether this guardrail allows free endpoints that train on request data.
    - `enable_paid_model_training` boolean, nullable — Whether this guardrail allows paid endpoints that train on request data.
    - `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, nullable, required — The workspace this guardrail is scoped to, or `null` for an unscoped legacy guardrail predating workspaces. A `null` value does not mean the default workspace, and does not apply the guardrail across every workspace.
  - `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

---

[API](https://skmtc.net/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.net/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrouterteam/openrouter-api/versions/9d1da2c7d2c3/schema)
