---
title: "Apply Guardrail"
method: POST
path: "/apply_guardrail"
---

# Apply Guardrail

`POST /apply_guardrail`

Apply a guardrail to text input and return the processed result.

This endpoint allows testing guardrails by applying them to custom text inputs.

## Request body

- ApplyGuardrailRequest
  - `guardrail_name` string, required
  - `text` string, required
  - `language` string, nullable
  - `entities` PiiEntityType[], nullable

## Response `200`

Successful Response

- ApplyGuardrailResponse
  - `response_text` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/1e929292ddd5/schema)
