Skip to main content

Overview

Guardrails endpoints

Available Operations

list

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

Example Usage

Parameters

Response

operations.ListGuardrailsResponse

Errors

create

Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace’s traffic. To restrict all traffic in a workspace, update the workspace’s default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.

Example Usage

Parameters

Response

components.CreateGuardrailResponse

Errors

delete

Delete an existing guardrail. Management key required.

Example Usage

Parameters

Response

components.DeleteGuardrailResponse

Errors

get

Get a single guardrail by ID. Management key required.

Example Usage

Parameters

Response

components.GetGuardrailResponse

Errors

update

Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. Management key required.

Example Usage

Parameters

Response

components.UpdateGuardrailResponse

Errors

list_guardrail_key_assignments

List all API key assignments for a specific guardrail. Management key required.

Example Usage

Parameters

Response

operations.ListGuardrailKeyAssignmentsResponse

Errors

bulk_assign_keys

Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. Management key required.

Example Usage

Parameters

Response

components.BulkAssignKeysResponse

Errors

bulk_unassign_keys

Unassign multiple API keys from a specific guardrail. Management key required.

Example Usage

Parameters

Response

components.BulkUnassignKeysResponse

Errors

list_guardrail_member_assignments

List all organization member assignments for a specific guardrail. Management key required.

Example Usage

Parameters

Response

operations.ListGuardrailMemberAssignmentsResponse

Errors

bulk_assign_members

Assign multiple organization members to a specific guardrail. Management key required.

Example Usage

Parameters

Response

components.BulkAssignMembersResponse

Errors

bulk_unassign_members

Unassign multiple organization members from a specific guardrail. Management key required.

Example Usage

Parameters

Response

components.BulkUnassignMembersResponse

Errors

list_key_assignments

List all API key guardrail assignments for the authenticated user. Management key required.

Example Usage

Parameters

Response

operations.ListKeyAssignmentsResponse

Errors

list_member_assignments

List all organization member guardrail assignments for the authenticated user. Management key required.

Example Usage

Parameters

Response

operations.ListMemberAssignmentsResponse

Errors