Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.redpill.ai/llms.txt

Use this file to discover all available pages before exploring further.

Get Your API Key

  1. Sign up at redpill.ai
  2. Navigate to the Dashboard
  3. Generate your API key
  4. Add credits to your account
Keep your API key secure! Never commit it to version control or expose it in client-side code.

Make Your First Request

RedPill is OpenAI-compatible. Just change the base URL:
curl https://api.redpill.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "openai/gpt-5",
    "messages": [
      {
        "role": "user",
        "content": "Explain how RedPill protects my privacy"
      }
    ]
  }'
All requests automatically flow through RedPill’s privacy-protected gateway, regardless of which model you choose.

Try Different Models

RedPill supports 50+ models through one OpenAI-compatible API:
curl https://api.redpill.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "z-ai/glm-5.1",
    "messages": [{"role": "user", "content": "What are the privacy features?"}]
  }'

Browse All Models

See the complete model catalog →

Use GPU TEE Confidential AI Models

GPU TEE models run inference inside private GPU enclaves with cryptographic attestation:
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.redpill.ai/v1"
)

# GLM 5.1 - Chutes GPU TEE
response = client.chat.completions.create(
    model="z-ai/glm-5.1",
    messages=[
        {"role": "user", "content": "Analyze this sensitive financial data: ..."}
    ]
)

print(response.choices[0].message.content)
View all 26 GPU TEE models at Confidential AI Models

Streaming Responses

Enable streaming for real-time responses:
stream = client.chat.completions.create(
    model="openai/gpt-5",
    messages=[{"role": "user", "content": "Write a story about privacy"}],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Verify Private Execution

There are two verification levels:
VerificationAPI endpointWhat it proves
Model attestation/v1/attestation/reportThe model server is running in genuine TEE hardware with a fresh nonce
Request signature/v1/signature/{request_id}A specific response is signed by the TEE key for that model instance
For the strongest proof, verify both and bind them together with signing_address:
# 1. Make a request and get the request ID
RESPONSE=$(curl -s https://api.redpill.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"phala/qwen-2.5-7b-instruct","messages":[{"role":"user","content":"Hello"}]}')

REQUEST_ID=$(echo $RESPONSE | jq -r '.id')
SIGNATURE=$(curl -s "https://api.redpill.ai/v1/signature/$REQUEST_ID?model=phala/qwen-2.5-7b-instruct" \
  -H "Authorization: Bearer YOUR_API_KEY")
SIGNING_ADDRESS=$(echo $SIGNATURE | jq -r '.signing_address')
NONCE=$(openssl rand -hex 32)

# 2. Get fresh attestation for the same signer
curl "https://api.redpill.ai/v1/attestation/report?model=phala/qwen-2.5-7b-instruct&nonce=$NONCE&signing_address=$SIGNING_ADDRESS" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 3. Get the request signature
echo $SIGNATURE
The complete verifier checks the request hash, response hash, signature, TEE quote, GPU attestation, nonce, and signer binding:
git clone https://github.com/redpill-ai/redpill-verifier.git
cd redpill-verifier
pip install requests eth-account

export API_KEY=YOUR_API_KEY
python3 signature_verifier.py --model phala/qwen-2.5-7b-instruct

Learn About Attestation

Understand how to verify private execution →

List Available Models

Discover all models and their capabilities:
curl https://api.redpill.ai/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

Function Calling

Use function calling with any supported model:
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get current weather",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {"type": "string"},
                    "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
                },
                "required": ["location"]
            }
        }
    }
]

response = client.chat.completions.create(
    model="openai/gpt-5",
    messages=[{"role": "user", "content": "What's the weather in SF?"}],
    tools=tools
)

print(response.choices[0].message.tool_calls)

Advanced Function Calling

Learn more about function calling →

Next Steps

TEE-Protected Gateway

Learn how the gateway TEE works

Supported Models

Browse all 50+ models and GPU TEE providers

API Reference

Complete API documentation

Confidential AI

Phala TEE models & attestation

Need Help?