openapi: 3.2.0 info: title: TrustBoost PII Sanitizer Sanitize API version: 2.6.0 description: Privacy firewall for autonomous AI agent pipelines. Sanitizes PII before text reaches LLMs. Every paid sanitization anchored on Solana. contact: email: teodorofodocrispin@gmail.com license: name: MIT url: https://github.com/teodorofodocrispin-cmyk/TrustBoost-PII-Sanitizer/blob/main/LICENSE servers: - url: https://api.trustboost.dev description: Production tags: - name: Sanitize paths: /sanitize: post: summary: Sanitize PII from text description: Detects and redacts PII from text before it reaches an LLM. Supports 8 languages and 5 context modes. operationId: sanitize_pii requestBody: required: true content: application/json: schema: type: object required: - text properties: text: type: string description: Text to sanitize. Max 10,000 chars. tx_hash: type: string description: Use TRIAL for 50 free sanitizations. default: TRIAL wallet_address: type: string description: Agent identifier for quota tracking. context: type: string enum: - general - legal - financial - medical - code default: general responses: '200': description: Sanitization successful content: application/json: schema: type: object properties: status: type: string example: success data: type: object properties: sanitized_content: type: string safety_score: type: number minimum: 0 maximum: 1 risk_category: type: string enum: - CLEAN - SENSITIVE - PRIVATE - CRITICAL entities_removed: type: boolean entities: type: array items: type: object context_applied: type: string usage_metrics: type: object '402': description: Payment required — x402 payment info '413': description: Text too long — split into chunks tags: - Sanitize get: summary: x402 discovery operationId: sanitize_discovery description: Returns HTTP 402 with PAYMENT-REQUIRED header for x402 validators. responses: '402': description: Payment required tags: - Sanitize /sanitize/preview: post: summary: Free PII preview — no wallet required operationId: sanitize_preview description: 3 free sanitizations per IP per hour. Max 500 chars. requestBody: required: true content: application/json: schema: type: object required: - text properties: text: type: string responses: '200': description: Preview result tags: - Sanitize