Guardrail Policies
Get a moderation policy
Changed onGet a moderation policy with its member and API key assignments. Management key required.
get/guardrails/policies/moderation/{id}
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Path parameters
id, string uuid required
Policy ID
Example:550e8400-e29b-41d4-a716-446655440000
Query parameters
workspace_id, string uuid
Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
Example:0df9e665-d932-5740-b2c7-b52af166bc11
Response
moderation policy details
Moderation Guardrail Policy Detail Response required
data, Moderation Guardrail Policy Detail required
Example response
{
"data": {
"api_key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
],
"config": {
"content_filter_builtins": [
{
"action": "block",
"slug": "secrets"
}
]
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"member_ids": [
"user_2abcDEFghiJKLmnoPQRstu"
],
"name": "Engineering monthly budget",
"opted_out_api_key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
],
"opted_out_member_ids": [
"user_2abcDEFghiJKLmnoPQRstu"
],
"overridden_api_key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
],
"overridden_member_ids": [
"user_2abcDEFghiJKLmnoPQRstu"
]
}
}Changes
- info
the
queryrequest parameterworkspace_idbecame optional
- info
- info
endpoint added
- info