Get started in minutes with our official Python SDK, npm package, and REST API. Full type hints, automatic retries, and batch processing built-in.
Drop-in replacement for OpenAI, Anthropic, and Gemini. One import change, automatic PHI redaction.
pip install redact-proxy
TypeScript support with full type definitions. Works with Node.js 16+ and modern browsers.
npm install @redact/proxy
Direct HTTP access for any language. OpenAPI spec available for code generation.
api.redact.health/v1
Copy and paste to get started. All examples use the same API patterns.
# Just change one import - that's it! from redact_proxy import OpenAI # instead of: from openai import OpenAI client = OpenAI() # Uses OPENAI_API_KEY from env # Your existing code works unchanged response = client.chat.completions.create( model="gpt-4", messages=[{ "role": "user", "content": "Summarize: Patient John Smith, DOB 01/15/1980, has diabetes." }] ) # PHI is automatically redacted before reaching OpenAI # OpenAI sees: "Patient [PATIENT_a1b2c3], DOB [DATE_d4e5f6], has diabetes." print(response.choices[0].message.content)
import { OpenAI } from '@redact/proxy'; const client = new OpenAI(); // Your existing code works unchanged const response = await client.chat.completions.create({ model: 'gpt-4', messages: [{ role: 'user', content: 'Summarize: Patient John Smith, DOB 01/15/1980, has diabetes.' }] }); // PHI is automatically redacted before reaching OpenAI console.log(response.choices[0].message.content);
# Direct REST API call curl -X POST https://api.redact.health/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H "X-LLM-Provider: openai" \ -d '{ "model": "gpt-4", "messages": [{ "role": "user", "content": "Summarize: Patient John Smith, DOB 01/15/1980, has diabetes." }] }' # Response includes redacted PHI info in headers # X-Redact-PHI-Found: 2 # X-Redact-Document-ID: doc_xyz789
Our drop-in SDK replacement is the fastest way to add HIPAA compliance to your LLM app. One import change, zero code refactoring. Works with OpenAI, Anthropic, and Gemini.