---
title: "Sanitize agent context"
method: POST
path: "/v1/sanitize-context"
---

# Sanitize agent context

`POST /v1/sanitize-context`

## Request

- Base URL: `https://api.scrubmytext.com`
- URL: `https://api.scrubmytext.com/v1/sanitize-context`
- Auth: one of:
  - none
  - HTTP bearer

Normalize untrusted context and optionally redact sensitive patterns. Includes a 3-call unauthenticated monthly trial per public IP. After the trial, use a subscription bearer key or x402 pay-per-call when enabled.

## Request body

- object
  - `text` string, required
  - `mode` 'standard' | 'strict' | 'unicode'
  - `redact_sensitive` boolean

## Response `200`

Successful result

## Other responses

- `400`: Invalid input
- `401`: API key required or invalid
- `402`: Trial exhausted / x402 Payment Required when pay-per-call is enabled
- `429`: Monthly usage limit reached

---

[API](https://skmtc.dev/scrubmytext/apis/scrubmytext-agent-infrastructure-api.md) · [All operations](https://skmtc.dev/scrubmytext/apis/scrubmytext-agent-infrastructure-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrubmytext/apis/scrubmytext-agent-infrastructure-api/revisions/54ace36baccf?raw)
