# Runaway LLM Token Breaker & Infinite Agent Loop Kill-Switch [KIT-02]
> Protect your OpenAI and Anthropic API keys from infinite recursive agent retry loops. Deterministic sub-5ms edge circuit breaker for $29 one-time with zero monthly subscription.

## Specifications
- Canonical Documentation: https://topaigateway.com/api/runaway-token-breaker
- Production Endpoint: https://topaigateway.com/v1/api/09-tokenslimmer
- Method: POST
- Category: FinOps & Agent Budget Insurance
- Subscription Pack: Runaway Token Breaker (Lifetime License) ($29 one-time (Zero Recurring Subscription))
- Latency Target: < 5 ms
- Free Tier: 100 free requests/month (no credit card required)

## Quickstart (cURL)
```bash
curl -X POST https://topaigateway.com/v1/api/09-tokenslimmer \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Inspect and compress agent loop context..."}'
```

## Sample Request
```json
{
  "prompt": "Recursive agent tool call loop check: verify budget cap and prune redundant AST tokens."
}
```

## Sample Response
```json
{
  "success": true,
  "toolkit": "Runaway Token Breaker ($29 Lifetime)",
  "loop_guard": "ARMED_SUB_5MS",
  "spend_cap_enforced": "$5.00 / session",
  "latency_ms": 1.8
}
```

## SDK Code Samples
### TypeScript / Node.js
```typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://topaigateway.com/v1",
  apiKey: process.env.OPENAI_API_KEY
});
```

### Python
```python
from openai import OpenAI

client = OpenAI(
    base_url="https://topaigateway.com/v1",
    api_key="YOUR_OPENAI_KEY"
)
```

## Performance Benchmarks
- Kill-Switch Latency: < 5 ms
- License Model: $29 Once
- Included Quota: 100,000 req/mo
- Subscription Fee: $0.00 / mo

## Compliance & Governance
- European Union DORA (UE) 2022/2554 Article 30 Compliant
- Zero-Retention & Zero-PII Policy: Prompts are executed on memory-only V8 isolates
- 1-Click Upgrade Portal: https://topaigateway.com/#pricing
