SecretAI
Trusted AI for users who value their privacy. Leveraging Intel TDX and NVIDIA Confidential Computing capabilities to provide fully confidential AI interactions.
Quick Start
Python
""" Secret AI — OpenAI-compatible example. Secret AI's confidential LLM workers expose a standard OpenAI-compatible API, so you can talk to them with the regular `openai` Python client. The Secret AI SDK is used only to discover a worker URL from Secret Network's on-chain registry; the model is then read from the worker itself, which is the source of truth for what it currently serves. Run: export SECRET_AI_API_KEY='your_api_key_here' # from https://aidev.scrtlabs.com/ python example_openai.py """ import os from openai import OpenAI from secret_ai_sdk.secret import Secret # 1. Resolve a worker URL from the on-chain registry. # The registry maps model names to the workers that host them. We use the # first advertised model purely to look up a worker URL. secret_client = Secret() worker_url = secret_client.get_urls(model=secret_client.get_models()[0])[0] base_url = f"{worker_url.rstrip('/')}/v1" # OpenAI-compatible endpoint # 2. Point the standard OpenAI client at the Secret AI worker. client = OpenAI( base_url=base_url, api_key=os.environ["SECRET_AI_API_KEY"], ) # 3. Ask the worker which model it actually serves (the live source of truth). model = client.models.list().data[0].id # 4. Chat as you would with any OpenAI model. response = client.chat.completions.create( model=model, temperature=1.0, messages=[ {"role": "system", "content": "You are my friend."}, {"role": "user", "content": "I miss my cat."}, ], ) print(response.choices[0].message.content)
List available models
GET/api/aimodels
Returns the models currently served by Secret AI along with their worker URL and per-million-token pricing. This endpoint is public — no API key is required — and is CORS-enabled, so you can call it directly from the browser or a server.
Request
curl https://secretai.scrtlabs.com/api/aimodels
Response
{
"models": [
{
"key": "qwen3-coder:30b",
"name": "Qwen3-Coder:30B",
"url": "https://secretai-jedi.scrtlabs.com:21434",
"inputPricePerMillion": 0.03,
"outputPricePerMillion": 0.12,
"cachedInputPricePerMillion": 0.015
},
{
"key": "qwen3-vl:30b",
"name": "Qwen3-VL:30B",
"url": "https://secretai-jedi.scrtlabs.com:21434",
"inputPricePerMillion": 0.03,
"outputPricePerMillion": 0.12,
"cachedInputPricePerMillion": 0.015
},
{
"key": "gpt-oss:120b",
"name": "GPT-OSS:120B",
"url": "https://secretai-jedi.scrtlabs.com:21434",
"inputPricePerMillion": 0.15,
"outputPricePerMillion": 0.5,
"cachedInputPricePerMillion": 0.075
}
]
}