RedPill’s OpenAI-compatible API works seamlessly with popular AI frameworks and SDKs.

Quick Start

All integrations follow the same pattern:
1

Install the SDK

Install your preferred framework or SDK
2

Configure Base URL

Point to RedPill’s API endpoint: https://api.redpill.ai/v1
3

Add API Key

Use your RedPill API key for authentication
4

Choose Models

Select from 218+ models with provider prefix (e.g., openai/gpt-4o)

Why Use RedPill?

All requests flow through hardware-protected Trusted Execution Environments, regardless of which framework you use.
Access models from OpenAI, Anthropic, Google, DeepSeek, and more through a single API.
Works with any tool that supports OpenAI’s API format - just change the base URL.
Use Phala’s TEE models for end-to-end confidential AI processing.

Integration Comparison

FrameworkBest ForLanguageDifficulty
OpenAI SDKSimple integrationsPython, TypeScriptEasy
LangChainComplex AI apps, RAGPython, TypeScriptMedium
Vercel AI SDKReact/Next.js UIsTypeScriptEasy
LangfuseObservabilityPython, TypeScriptEasy

Example: Switch to RedPill

Before (Direct OpenAI)

from openai import OpenAI

client = OpenAI(api_key="sk-openai-key")

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

After (RedPill with TEE Protection)

from openai import OpenAI

client = OpenAI(
    api_key="sk-redpill-key",
    base_url="https://api.redpill.ai/v1"  # Only 1 line change!
)

response = client.chat.completions.create(
    model="openai/gpt-4o",  # Add provider prefix
    messages=[{"role": "user", "content": "Hello"}]
)
That’s it! Just 2 small changes and you get TEE privacy protection + access to 218+ models.

Community Integrations

These tools also work with RedPill’s OpenAI-compatible API:
  • Continue - AI code assistant for VS Code
  • Cursor - AI-powered code editor
  • LibreChat - ChatGPT-like interface
  • BetterChatGPT - Web UI for OpenAI API
  • ChatGPT Next Web - Self-hosted ChatGPT web UI

Need Help?