Skip to main content
POST

Portkey is now PRISMA AIRS AI Gateway. See it in action.

Contact Us

Authorizations

x-portkey-api-key
string
header
required

Body

application/json
name
string
required

Name of the guardrail

Example:

"Content Safety Check"

target
enum<string>
default:llm

Target type for the guardrail. Use "llm" for LLM API requests (default) or "mcp_tools" for MCP tool calls.

Available options:
llm,
mcp_tools
workspace_id
string<uuid>

Workspace UUID (required if organisation_id not provided and not using API key)

organisation_id
string<uuid>

Organisation UUID (required if workspace_id not provided and not using API key)

checks
object[]

Array of guardrail checks to apply. Required for "llm" target; optional for "mcp_tools" target.

Minimum array length: 1
actions
object

Actions to take when guardrail checks fail or pass. Required for "llm" target; optional for "mcp_tools" target.

Response

Guardrail created successfully

id
string
required

Unique identifier of the created guardrail

slug
string
required

URL-friendly slug for the guardrail

version_id
string
required

Version identifier for the guardrail configuration

Last modified on August 3, 2026