Skip to main content

Why migrate

  • Same multi-provider access: a broad range of models through one endpoint.
  • Attested gateway: the gateway runs in a TEE and signs a receipt for every response.
  • Drop-in: works with OpenAI client libraries, like OpenRouter.
  • Verifiable: cryptographic attestation you can check yourself.
  • Confidential models: is_tee models run on a verified upstream enclave.

Key difference

FeatureOpenRouterThis platform
Multi-providerYesYes (a broad range of models)
Gateway in TEENoYes. The gateway runs in a TEE and signs receipts.
AttestationNoConfidential (is_tee) models attest the upstream.
Routed modelsForwarded to providerForwarded to the third-party provider

Migration Steps

1

Get an API Key

Sign up at redpill.ai
2

Update Endpoint

# Before (OpenRouter)
client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="YOUR_OPENROUTER_KEY"
)

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

Update Model Names

Some model names may differ - check /v1/models

Model Name Changes

OpenRouter uses provider prefixes:
# OpenRouter naming
"openai/gpt-4"
"anthropic/claude-sonnet-4.5"

# RedPill naming (same format!)
"openai/gpt-5"
"anthropic/claude-sonnet-4.5"
The platform uses the same provider/model format!

Code Changes

Before (OpenRouter)

from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ.get("OPENROUTER_API_KEY"),
)

response = client.chat.completions.create(
    extra_headers={
        "HTTP-Referer": "https://yourapp.com",
        "X-Title": "Your App"
    },
    model="openai/gpt-4",
    messages=[{"role": "user", "content": "Hello"}]
)

After (RedPill)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.redpill.ai/v1",
    api_key=os.environ.get("API_KEY"),
)

response = client.chat.completions.create(
    model="openai/gpt-5",
    messages=[{"role": "user", "content": "Hello"}]
)

New TEE Features

After migration, you can:

1. Verify TEE Execution

# Get attestation
attestation = requests.get(
    "https://api.redpill.ai/v1/aci/attestation",
    headers={"Authorization": f"Bearer {api_key}"}
)

2. Use Confidential Models

# confidential (is_tee) models
response = client.chat.completions.create(
    model="z-ai/glm-5",
    messages=[...]
)

3. Get the signed receipt

# Cryptographic proof, by receipt id or chat id
receipt = requests.get(
    f"https://api.redpill.ai/v1/aci/receipts/{receipt_id}",
    headers={"Authorization": f"Bearer {api_key}"}
)

Pricing Comparison

Both use pay-as-you-go, but the platform adds TEE protection at no extra cost.

Gradual Migration

Run both in parallel:
# Test with RedPill
redpill = OpenAI(
    base_url="https://api.redpill.ai/v1",
    api_key="REDPILL_KEY"
)

# Keep OpenRouter (temporarily)
openrouter = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="OPENROUTER_KEY"
)

# Compare responses
redpill_resp = redpill.chat.completions.create(...)
openrouter_resp = openrouter.chat.completions.create(...)

Benefits after migration

  • Requests served through an attested TEE gateway
  • Cryptographic attestation and signed receipts
  • Confidential (is_tee) models
  • Verifiable execution

Get Started

Start using the platform now →