LibertAI API

The private
inference API.

A drop-in, OpenAI-compatible endpoint for GLM-5.2 and the leading open models. Confidential by design, with subscriptions or pay-per-token credits, no KYC. Keep your SDK, change one line.

Works with the OpenAI SDK · cURL · Python · JavaScript
chat.completions
# the same request you already send OpenAI
curl https://api.libertai.io/v1/chat/completions \
  -H "Authorization: Bearer $LIBERTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "messages": [{"role": "user", "content": "Explain confidential inference."}],
    "stream": true
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.libertai.io/v1",
    api_key="ltai-••••",
)

stream = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "Explain confidential inference."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.libertai.io/v1",
  apiKey: process.env.LIBERTAI_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "glm-5.2",
  messages: [{ role: "user", content: "Explain confidential inference." }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
Response · streaming · glm-5.2

Works with the tools you already use

OpenAI SDKLangChainLlamaIndexVercel AI SDKcurlPython
The best way to build private

One endpoint. The open-model catalog. Confidential by design.

The full OpenAI-compatible surface, running on a decentralized network that cannot keep your data. Everything you'd expect from a modern inference API, with privacy built into the architecture.

Drop-in compatible

Your code already works.

The API mirrors the OpenAI spec across chat, tools, vision, embeddings and streaming. Point your client at a new base URL and keep everything else: SDK, prompts and stack.

Read the migration guide
the entire migration
# one line changes
- base_url = "https://api.openai.com/v1"
+ base_url = "https://api.libertai.io/v1"
Confidential by design

The infrastructure can't remember you.

Requests are processed and forgotten. Sensitive workloads run inside Trusted Execution Environments with remote attestation, so you can verify the enclave instead of trusting a policy.

See how privacy works
enclave · attested
sha256:9f2c…a17e · verified
Nothing stored
Nothing trained on you
Attested in hardware
The catalog

The leading open models, one key.

GLM-5.2 leads, and the rest of the catalog is one parameter away. Prices shown are per-token credit rates; subscriptions cover steady usage at a fixed price.

Browse all models
models
GLM-5.2 FLAGSHIP$1.40 / $4.40
Qwen3.5 122B$0.90 / $3.10
Gemma 4 31B$0.18 / $0.70
DeepSeek V4 Flash$0.14 / $0.55
Hermes 3 8B · TEE$0.08 / $0.30
Two ways to pay

Subscribe, or pay per token.

A subscription gives you a fixed monthly price for steady usage. Direct credits bill per million tokens, and overflow past your subscription is charged at the same per-token rate. No seats, no KYC.

Pricing details
billing · this month
Subscription · fixed price
Overflow · credits, per 1M tokens
flat monthly price, then $1.40 in / $4.40 out per 1M · figures illustrative
The same API, however you build

Call it from anywhere.

A plain HTTPS endpoint that speaks the OpenAI dialect. Reach for the terminal, the official SDKs, or wire it straight into your agents.

terminal
curl api.libertai.io/v1/chat/completions \
  -H "Authorization: Bearer …" \
  -d '{"model":"glm-5.2", …}'

From the terminal

One curl call and you're streaming tokens. Great for scripts and quick tests.

sdk
from openai import OpenAI
client = OpenAI(base_url="…libertai.io/v1")
client.chat.completions.create(…)

With the OpenAI SDK

Use the official Python or JavaScript clients. Only the base URL changes.

agents
tools = [{"type": "function",
  "function": {"name": "search"}}]
client.chat.completions.create(tools=tools)

Inside your agents

Function calling and JSON output plug into the agent frameworks you already run.

What developers say

Built for the people shipping.

"Swapped one base URL and our whole stack was private. Nothing else in the codebase changed."

Backend engineer
AI startup

"Same class of output as the closed flagships, at a fraction of the token cost. Easy call for us."

Indie developer
Solo SaaS

"No KYC, no waitlist. I had a private endpoint answering requests before my coffee was cold."

Founder
Early-stage team

"The attestation story is what sold our security team. We can verify the enclave, not just read a policy."

Platform lead
Regulated industry

"Function calling worked out of the box with our existing agent framework. Genuinely drop-in."

ML engineer
Agents company

"Open models, my choice of weights, and nothing logged. This is how inference should work."

Privacy engineer
Consumer app

Build private, today.

Create a key, change one line, ship.