-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
- "model": "claude-sonnet-4-20250514",
+ "model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello"}
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
-| `model` | string | Yes | Model ID (e.g., `claude-sonnet-4-20250514`) |
+| `model` | string | Yes | Model ID (e.g., `claude-sonnet-4-6`) |
| `messages` | array | Yes | Conversation messages |
| `max_tokens` | number | Yes | Maximum tokens to generate |
| `stream` | boolean | No | Enable streaming |
"id": "msg_abc123",
"type": "message",
"role": "assistant",
- "model": "claude-sonnet-4-20250514",
+ "model": "claude-sonnet-4-6",
"content": [
{
"type": "text",
client = Anthropic(base_url="http://localhost:3000/anthropic")
with client.messages.stream(
- model="claude-sonnet-4-20250514",
+ model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Write a haiku"}]
) as stream:
});
const stream = client.messages.stream({
- model: 'claude-sonnet-4-20250514',
+ model: 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Write a haiku' }]
});
## Content Types
-PasteGuard scans all text content in Anthropic requests:
+PasteGuard scans configured text roles in Anthropic requests. By default it scans:
- **User messages** — String content or text blocks
-- **Assistant messages** — Including thinking blocks
-- **System prompts** — String or content block array
- **Tool results** — Text content in tool responses
+
+Assistant messages and system prompts are available as scan roles, but are skipped by default. Add them to `pii_detection.scan_roles` or `secrets_detection.scan_roles` if you want PasteGuard to inspect them.
curl -X POST http://localhost:3000/api/mask \
-H "Content-Type: application/json" \
-d '{
- "text": "-----BEGIN RSA PRIVATE KEY-----\nMIIE...",
+ "text": "-----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----",
"detect": ["secrets"]
}'
```
curl -X POST http://localhost:3000/api/mask \
-H "Content-Type: application/json" \
-d '{
- "text": "Contact john@example.com with key -----BEGIN RSA PRIVATE KEY-----..."
+ "text": "Contact john@example.com with key -----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----"
}'
```