Skip to main content

Overview

Confidential AI API provides a secure, OpenAI-compatible interface for running AI models in TEE on GPU hardware. This enables developers to integrate AI applications with hardware-level privacy protection, ensuring user data remain confidential during inference.

Prerequisites

Before you begin, ensure you have enough funds to get the API key. You need at least $5 in your account. Go to Dashboard and click Deposit to add funds. Navigate to DashboardConfidential AI API and click Enable. Then create your first API key and click the key to copy.
GPU TEE API Generate Key
Once you get the API Key, you can start making requests to the Confidential AI API.

Make Your Secure Request

Replace <API_KEY> with your actual API key in the examples below. We use DeepSeek V3 0324 model as an example, but you can choose any other available models.
# Install OpenAI SDK: `pip3 install openai`

from openai import OpenAI

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

response = client.chat.completions.create(
    model="phala/deepseek-chat-v3-0324",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is your model name?"},
    ],
    stream=True
)
print(response.choices[0].message.content)

Available Models

We support 6+ models running in GPU TEE. Click the GPU TEE checkbox to see all options.
ModelNameContext
DeepSeek V3 0324phala/deepseek-chat-v3-0324163K
Llama 3.3 70B Instructphala/llama-3.3-70b-instruct131K
GPT OSS 120Bphala/gpt-oss-120b131K
Qwen3 Coderphala/qwen3-coder262K
Qwen2.5 7B Instructphala/qwen-2.5-7b-instruct32K

Verify Your AI is Running Securely

Once you finished your secure request, every response comes with cryptographic proof that it ran in a secure TEE. This proof is generated by the TEE. ensures the response is secure and trustworthy. Click Verify to learn how to verify your AI is running securely.

Next Steps

There are some advanced features you could use with Confidential AI API.
  • Tool Calling help you call tools from your AI models.
  • Images and Vision help you use images and vision models in Confidential AI.
  • Structured Output help you get structured output from your AI models.
  • Streaming help you get streaming response from your AI models.
  • Playground help you play with Confidential AI models in a private environment.
I