Skip to main content

Overview

Guardrail Policies endpoints

Available Operations

ListAccountPolicies

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

Example Usage

Parameters

Response

*operations.ListAccountPoliciesResponse, error

Errors

CreateAccountPolicy

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

Example Usage

Parameters

Response

*components.AccountGuardrailPolicyResponse, error

Errors

DeleteAccountPolicy

Delete a workspace-wide policy. Management key required.

Example Usage

Parameters

Response

*components.DeleteGuardrailPolicyResponse, error

Errors

UpdateAccountPolicy

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

Example Usage

Parameters

Response

*components.AccountGuardrailPolicyResponse, error

Errors

GetAPIKeyPolicyAssignment

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, error

Errors

ChangeAPIKeyPolicyAssignment

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, error

Errors

GetMemberPolicyAssignment

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, error

Errors

ChangeMemberPolicyAssignment

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, error

Errors

ListBudgetPolicies

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

Example Usage

Parameters

Response

*operations.ListBudgetPoliciesResponse, error

Errors

CreateBudgetPolicy

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

Example Usage

Parameters

Response

*components.BudgetGuardrailPolicyResponse, error

Errors

DeleteBudgetPolicy

Delete a budget policy. Management key required.

Example Usage

Parameters

Response

*components.DeleteGuardrailPolicyResponse, error

Errors

GetBudgetPolicy

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

Example Usage

Parameters

Response

*components.BudgetGuardrailPolicyDetailResponse, error

Errors

UpdateBudgetPolicy

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

Example Usage

Parameters

Response

*components.BudgetGuardrailPolicyResponse, error

Errors

ListModelAvailabilityPolicies

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

Example Usage

Parameters

Response

*operations.ListModelAvailabilityPoliciesResponse, error

Errors

CreateModelAvailabilityPolicy

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

Example Usage

Parameters

Response

*components.ModelAvailabilityGuardrailPolicyResponse, error

Errors

DeleteModelAvailabilityPolicy

Delete a model availability policy. Management key required.

Example Usage

Parameters

Response

*components.DeleteGuardrailPolicyResponse, error

Errors

GetModelAvailabilityPolicy

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

Example Usage

Parameters

Response

*components.ModelAvailabilityGuardrailPolicyDetailResponse, error

Errors

UpdateModelAvailabilityPolicy

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

Example Usage

Parameters

Response

*components.ModelAvailabilityGuardrailPolicyResponse, error

Errors

ListModerationPolicies

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

Example Usage

Parameters

Response

*operations.ListModerationPoliciesResponse, error

Errors

CreateModerationPolicy

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

Example Usage

Parameters

Response

*components.ModerationGuardrailPolicyResponse, error

Errors

DeleteModerationPolicy

Delete a moderation policy. Management key required.

Example Usage

Parameters

Response

*components.DeleteGuardrailPolicyResponse, error

Errors

GetModerationPolicy

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

Example Usage

Parameters

Response

*components.ModerationGuardrailPolicyDetailResponse, error

Errors

UpdateModerationPolicy

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

Example Usage

Parameters

Response

*components.ModerationGuardrailPolicyResponse, error

Errors