Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.phala.com/llms.txt

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

Overview

On-demand Confidential AI API provides a secure, OpenAI-compatible interface for running AI models in TEE on GPU hardware. Pay per request with no infrastructure management. This enables developers to integrate AI applications with hardware-level privacy protection, ensuring user data remain confidential during inference. Browse available confidential AI models for your application. For dedicated GPU resources with hourly pricing, see Dedicated Models. Both options use the same API with identical features - the only difference is billing and resource allocation.

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. The examples below use phala/qwen3.5-27b; use List Models to choose a model for your workload.
# Install OpenAI SDK: `pip3 install openai`

from openai import OpenAI

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

response = client.chat.completions.create(
    model="phala/qwen3.5-27b",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is your model name?"},
    ],
)

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

Available Models

Confidential AI models are available through several GPU TEE providers. The live catalog is authoritative; query it before hardcoding model IDs:
curl https://api.redpill.ai/v1/models \
  -H "Authorization: Bearer <API_KEY>"
To list Phala-backed models only:
curl https://api.redpill.ai/v1/models/phala \
  -H "Authorization: Bearer <API_KEY>"
The following table reflects the current model families added in the RedPill model catalog update. Pricing and availability can change; use the API response for production routing.

Phala Provider

Model IDContextModalityPricing (input/output per 1M tokens)
phala/qwen3.5-27b262KText0.30/0.30 / 2.40
phala/qwen3-vl-30b-a3b-instruct128KVision + Text0.20/0.20 / 0.70
qwen/qwen3-embedding-8b32KEmbeddings0.01/0.01 / 0
phala/gemma-3-27b-it53KVision + Text0.11/0.11 / 0.40
phala/glm-4.7-flash202KText0.10/0.10 / 0.43
phala/gpt-oss-20b131KText0.04/0.04 / 0.15
phala/qwen-2.5-7b-instruct32KText0.04/0.04 / 0.10
phala/qwen2.5-vl-72b-instruct128KVision + Text0.40/0.40 / 1.20
phala/uncensored-24b32KText0.20/0.20 / 0.90
sentence-transformers/all-minilm-l6-v2512Embeddings0.005/0.005 / 0
phala/qwen2.5-vl-72b-instruct is a legacy alias that may route to phala/qwen3-vl-30b-a3b-instruct. Prefer the canonical ID returned by /v1/models.

NearAI Provider

Model IDContextModalityPricing (input/output per 1M tokens)
z-ai/glm-5203KText1.20/1.20 / 3.50
deepseek/deepseek-chat-v3.1164KText1.05/1.05 / 3.10
openai/gpt-oss-120b131KText0.10/0.10 / 0.49
qwen/qwen3-30b-a3b-instruct-2507262KText0.15/0.15 / 0.55
z-ai/glm-4.7131KText0.85/0.85 / 3.30

Chutes Provider

Model IDContextModalityPricing (input/output per 1M tokens)
z-ai/glm-5.1203KText1.21/1.21 / 4.20
moonshotai/kimi-k2.6262KText + Image1.09/1.09 / 4.60
qwen/qwen3.5-397b-a17b262KText0.55/0.55 / 3.50
qwen/qwen3-coder-next262KText0.18/0.18 / 1.20
minimax/minimax-m2.5197KText0.20/0.20 / 1.38
xiaomi/mimo-v2-flash262KText0.10/0.10 / 0.30
deepseek/deepseek-v3.2164KText0.32/0.32 / 0.48
moonshotai/kimi-k2.5262KText + Image0.60/0.60 / 3.00

Tinfoil Provider

Model IDContextModalityPricing (input/output per 1M tokens)
qwen/qwen3-coder-480b-a35b-instruct262KText2.00/2.00 / 2.00
moonshotai/kimi-k2-thinking262KText2.00/2.00 / 2.00
deepseek/deepseek-r1-0528163KText2.00/2.00 / 2.00
meta-llama/llama-3.3-70b-instruct131KText2.00/2.00 / 2.00
TEE provider presence and attestation support are not identical for every provider and model. For production verification, test Attestation Report with the exact model ID you plan to use.

Verify Your AI is Running Securely

After you make a request, use Request Signature to fetch the signature for that response. Then fetch a fresh Attestation Report with the returned signing_address to bind the response to TEE evidence.

Next Steps

Use the API reference and feature guides for the next step: