For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • API Guides
    • Overview
    • Streaming
    • Embeddings
    • Limits
    • Authentication
    • Parameters
    • Errors and Debugging
  • API Reference
      • GETList guardrails
      • POSTCreate a guardrail
      • GETGet a guardrail
      • DELDelete a guardrail
      • PATCHUpdate a guardrail
      • GETList key assignments for a guardrail
      • POSTBulk assign keys to a guardrail
      • POSTBulk unassign keys from a guardrail
      • GETList member assignments for a guardrail
      • POSTBulk assign members to a guardrail
      • POSTBulk unassign members from a guardrail
      • GETList all key assignments
      • GETList all member assignments
LogoLogo
ModelsChatRankingsDocs
API ReferenceGuardrails

List guardrails

GET
https://openrouter.ai/api/v1/guardrails
GET
/api/v1/guardrails
$curl https://openrouter.ai/api/v1/guardrails \
> -H "Authorization: Bearer <token>"
1{
2 "data": [
3 {
4 "created_at": "2025-08-24T10:30:00Z",
5 "id": "550e8400-e29b-41d4-a716-446655440000",
6 "name": "Production Guardrail",
7 "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11",
8 "allowed_models": null,
9 "allowed_providers": [
10 "openai",
11 "anthropic",
12 "google"
13 ],
14 "description": "Guardrail for production environment",
15 "ignored_models": null,
16 "ignored_providers": null,
17 "limit_usd": 100,
18 "reset_interval": "monthly",
19 "updated_at": "2025-08-24T15:45:00Z",
20 "enforce_zdr": false
21 }
22 ],
23 "total_count": 1
24}

List all guardrails for the authenticated user. Management key required.

Was this page helpful?
Previous

Create a guardrail

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Query parameters

offsetintegerOptional>=0
Number of records to skip for pagination
limitintegerOptional1-100

Maximum number of records to return (max 100)

workspace_idstringOptionalformat: "uuid"
Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.

Response

List of guardrails
datalist of objects
List of guardrails
total_countinteger
Total number of guardrails

Errors

401
Unauthorized Error
500
Internal Server Error