Overview

Export Activity Data

Export Cygnal activity data for the authenticated organization. Requires admin role.

Cygnal Monitor

Monitors content for policy violations. This endpoint is used to check if the provided text contains harmful content or violates a given set of policies. Docs: [Guide](https://docs.grayswan.ai/cygnal/monitor-requests) | [API Reference](https://docs.grayswan.ai/api-reference/cygnal/monitor)

Cygnal Completions

Create OpenAI-compatible chat completions with Cygnal protection. Docs: [Guide](https://docs.grayswan.ai/cygnal/creating-completions) | [API Reference](https://docs.grayswan.ai/api-reference/cygnal/completions)

Cygnal Anthropic Messages

Create Anthropic-compatible messages with Cygnal protection. Docs: [Guide](https://docs.grayswan.ai/cygnal/creating-completions) | [API Reference](https://docs.grayswan.ai/api-reference/cygnal/anthropic-messages-v1)

Cygnal Gemini Generate

Create Gemini-compatible generateContent responses with Cygnal protection. Docs: [Guide](https://docs.grayswan.ai/cygnal/creating-completions) | [API Reference](https://docs.grayswan.ai/api-reference/cygnal/gemini-generate-v1beta)

Cygnal Gemini Stream Generate Content

Create Gemini-compatible streaming responses with Cygnal protection. Docs: [Guide](https://docs.grayswan.ai/cygnal/creating-completions) | [API Reference](https://docs.grayswan.ai/api-reference/cygnal/gemini-stream-generate-content-v1beta)

Cygnal Responses

Process and monitor OpenAI-compatible response requests. This endpoint processes completion requests with monitoring capabilities, similar to the chat completions endpoint. Docs: [Guide](https://docs.grayswan.ai/cygnal/creating-responses) | [API Reference](https://docs.grayswan.ai/api-reference/cygnal/responses)

Get Policies

Get policies for an organization with pagination. By default, returns all policies (no limit). Use limit parameter for pagination. Response includes pagination metadata (total, has_more) to detect truncation. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/get-policies)

Create Policy

Create a new policy. The policy will be created under the organization associated with the API key. Requires admin role. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/create-policy)

Export Policies

Export all policies for an organization as JSON. Returns policies in a format suitable for import. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/export-policies)

Get Policy By Id

Get a policy by ID. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/get-policy-by-id) Raises: ResourceNotFoundError: If the policy does not exist.

Delete Policy

Delete a policy. Preset policies cannot be deleted. Requires admin role. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/delete-policy) Raises: ResourceNotFoundError: If the policy does not exist. PresetPolicyModificationError: If attempting to delete a preset policy. AdminRequiredError: If user is not an admin.

Update Policy

Update an existing policy. Only provided fields will be updated. Omit fields to leave them unchanged. Preset policies cannot be modified. Requires admin role. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/update-policy) Raises: ResourceNotFoundError: If the policy does not exist. PresetPolicyModificationError: If attempting to modify a preset policy. AdminRequiredError: If user is not an admin.

Export Policy By Id

Export a single policy as JSON. Returns the policy in a format suitable for import. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/export-policy-by-id) Raises: ResourceNotFoundError: If the policy does not exist.

Get Policy Versions

Get version history for a policy. Returns a list of all versions (metadata only) ordered by timestamp descending. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/get-policy-versions) Raises: ResourceNotFoundError: If the policy does not exist.

Get Policy At Version

Get the reconstructed policy state at a specific version. The policy state is reconstructed by applying version diffs in reverse. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/get-policy-at-version) Raises: ResourceNotFoundError: If the policy or version does not exist.

Import Policy

Import a single policy from JSON. IDs from the import are ignored; a new ID will be generated. Requires admin role. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/import-policy)

Bulk Import Policies

Bulk import multiple policies from JSON. IDs from the import are ignored; new IDs will be generated for each policy. Returns a summary of successful and failed imports. Requires admin role. Docs: [Guide](https://docs.grayswan.ai/policy-management/policies) | [API Reference](https://docs.grayswan.ai/api-reference/policies/bulk-import-policies)