Why Migrate?

Same API - Drop-in replacement ✅ TEE Protection - All requests hardware-protected ✅ 218+ Models - Not just OpenAI models ✅ Same Price - No markup ✅ Verifiable - Cryptographic attestation

Migration Steps

1

Get RedPill API Key

Sign up at redpill.ai and generate API key
2

Update Base URL

Change base URL from OpenAI to RedPill:
# Before
client = OpenAI(api_key="sk-...")

# After
client = OpenAI(
    api_key="YOUR_REDPILL_KEY",
    base_url="https://api.redpill.ai/v1"  # Add this line
)
3

Test

Make a test request - everything else stays the same!

Code Changes

Python

# Before (OpenAI)
from openai import OpenAI
client = OpenAI(api_key="sk-...")

# After (RedPill)
from openai import OpenAI
client = OpenAI(
    api_key="YOUR_REDPILL_KEY",
    base_url="https://api.redpill.ai/v1"
)

# All other code stays identical!
response = client.chat.completions.create(...)

JavaScript

// Before
const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY
});

// After
const client = new OpenAI({
  apiKey: process.env.REDPILL_API_KEY,
  baseURL: 'https://api.redpill.ai/v1'  // Add this line
});

Go

// Before
config := openai.DefaultConfig(apiKey)

// After
config := openai.DefaultConfig(apiKey)
config.BaseURL = "https://api.redpill.ai/v1"  // Add this line

Environment Variables

Update your .env file:
# Before
OPENAI_API_KEY=sk-...

# After
REDPILL_API_KEY=sk-...
REDPILL_BASE_URL=https://api.redpill.ai/v1

What Stays the Same

✅ All SDK methods ✅ Request/response format ✅ Streaming ✅ Function calling ✅ Vision models ✅ Embeddings ✅ Error handling

What’s New

🆕 TEE Protection - All requests protected 🆕 218+ Models - Access Anthropic, Google, Meta, etc. 🆕 Attestation - Verify TEE execution 🆕 Signatures - Cryptographic proof

Model Mapping

OpenAI ModelRedPill Equivalent
gpt-4gpt-4 (same)
gpt-4-turbogpt-4-turbo (same)
gpt-3.5-turbogpt-3.5-turbo (same)
-phala/deepseek-chat-v3-0324 (TEE)
-anthropic/claude-3.5-sonnet
All OpenAI models work identically on RedPill, plus 200+ additional models!

Pricing

RedPill charges the same price as OpenAI, with TEE protection included at no extra cost.

Gradual Migration

Test with a few requests first:
# Use RedPill for testing
test_client = OpenAI(
    api_key="REDPILL_KEY",
    base_url="https://api.redpill.ai/v1"
)

# Keep OpenAI for production (temporarily)
prod_client = OpenAI(api_key="OPENAI_KEY")

# Switch when confident

Checklist

  • Get RedPill API key
  • Update environment variables
  • Change base URL in code
  • Test with sample requests
  • Monitor usage/costs
  • Full migration

Get Started

Start using RedPill now →