Skip to main content

Overview

Guardrail Policies endpoints

Available Operations

list_account_policies

List the workspace-wide policies that apply across workspaces in the account. Management key required.

Example Usage

Parameters

Response

operations.ListAccountPoliciesResponse

Errors

create_account_policy

Create a workspace-wide budget, moderation, or model availability policy. Management key required.

Example Usage

Parameters

Response

components.AccountGuardrailPolicyResponse

Errors

delete_account_policy

Delete a workspace-wide policy. Management key required.

Example Usage

Parameters

Response

components.DeleteGuardrailPolicyResponse

Errors

update_account_policy

Replace a workspace-wide policy and its workspace coverage. Management key required.

Example Usage

Parameters

Response

components.AccountGuardrailPolicyResponse

Errors

get_api_key_policy_assignment

Get the policies of one type that apply to an API key in a workspace. Requires a management key with write access. Management key required.

Example Usage

Parameters

Response

components.GuardrailPolicyAssignmentResponse

Errors

change_api_key_policy_assignment

Assign or unassign one policy for an API key. Fails with 409 when expected_assignment no longer matches the stored state. Management key required.

Example Usage

Parameters

Response

components.ChangeGuardrailPolicyAssignmentResponse

Errors

get_member_policy_assignment

Get the policies of one type that apply to a member in a workspace. Requires a management key with write access. Management key required.

Example Usage

Parameters

Response

components.GuardrailPolicyAssignmentResponse

Errors

change_member_policy_assignment

Assign or unassign one policy for a member. Fails with 409 when expected_assignment no longer matches the stored state. Management key required.

Example Usage

Parameters

Response

components.ChangeGuardrailPolicyAssignmentResponse

Errors

list_budget_policies

List the budget policies in a workspace. Management key required.

Example Usage

Parameters

Response

operations.ListBudgetPoliciesResponse

Errors

create_budget_policy

Create a budget policy in a workspace. Management key required.

Example Usage

Parameters

Response

components.BudgetGuardrailPolicyResponse

Errors

delete_budget_policy

Delete a budget policy. Management key required.

Example Usage

Parameters

Response

components.DeleteGuardrailPolicyResponse

Errors

get_budget_policy

Get a budget policy with its member and API key assignments. Management key required.

Example Usage

Parameters

Response

components.BudgetGuardrailPolicyDetailResponse

Errors

update_budget_policy

Replace a budget policy’s name and config, and optionally its assignments. Management key required.

Example Usage

Parameters

Response

components.BudgetGuardrailPolicyResponse

Errors

list_model_availability_policies

List the model availability policies in a workspace. Management key required.

Example Usage

Parameters

Response

operations.ListModelAvailabilityPoliciesResponse

Errors

create_model_availability_policy

Create a model availability policy in a workspace. Management key required.

Example Usage

Parameters

Response

components.ModelAvailabilityGuardrailPolicyResponse

Errors

delete_model_availability_policy

Delete a model availability policy. Management key required.

Example Usage

Parameters

Response

components.DeleteGuardrailPolicyResponse

Errors

get_model_availability_policy

Get a model availability policy with its member and API key assignments. Management key required.

Example Usage

Parameters

Response

components.ModelAvailabilityGuardrailPolicyDetailResponse

Errors

update_model_availability_policy

Replace a model availability policy’s name and config, and optionally its assignments. Management key required.

Example Usage

Parameters

Response

components.ModelAvailabilityGuardrailPolicyResponse

Errors

list_moderation_policies

List the moderation policies in a workspace. Management key required.

Example Usage

Parameters

Response

operations.ListModerationPoliciesResponse

Errors

create_moderation_policy

Create a moderation policy in a workspace. Management key required.

Example Usage

Parameters

Response

components.ModerationGuardrailPolicyResponse

Errors

delete_moderation_policy

Delete a moderation policy. Management key required.

Example Usage

Parameters

Response

components.DeleteGuardrailPolicyResponse

Errors

get_moderation_policy

Get a moderation policy with its member and API key assignments. Management key required.

Example Usage

Parameters

Response

components.ModerationGuardrailPolicyDetailResponse

Errors

update_moderation_policy

Replace a moderation policy’s name and config, and optionally its assignments. Management key required.

Example Usage

Parameters

Response

components.ModerationGuardrailPolicyResponse

Errors