v1.4
Change the base URL. Keep the client.
Ai-Limi speaks a standard chat-completions surface. Point base_url at us, put a virtual key in the header, and your existing HTTP client works.
import httpx
client = httpx.Client(
base_url="https://api.ai-limi.dev/v1",
headers={"Authorization": "Bearer vk_live_web"},
)
chat = client.post("/chat/completions", json={
"model": "policy:support.prod",
"messages": [{"role": "user", "content": "Summarize this ticket"}],
})
Virtual keys
A virtual key is not an upstream secret. It carries an allowlist of models, a budget, and an owner. Rotate the host key in the vault; applications keep the same vk_ string.
POST /v1/keys
{
"name": "vk_eval_ci",
"budget_usd_daily": 40,
"models": ["small-text", "frontier-small", "flash"],
"expire_days": 30
}
Hard caps
Caps evaluate before the upstream round-trip. Priority: key daily → team weekly → workspace monthly → model request and token rates. The first ceiling that fails wins.
policy:
workspace_monthly_usd: 8000
teams:
research:
weekly_usd: 2200
on_breach: block
support:
weekly_usd: 1400
on_breach: degrade
degrade_to: small-text
Error shapes
Over-limit responses are 402 with a stable code so you can retry, step down, or show a pause to the user.
{
"error": {
"type": "limit_exceeded",
"code": "team_weekly_cap",
"message": "research weekly cap $2,200 reached",
"retry_at": "2026-09-21T00:00:00Z"
}
}
Security
TLS 1.3, independent audit in progress, optional customer-managed keys on Scale. Prompts are hashed for the ledger; raw bodies retain for 24h unless you extend it. We never train on your traffic.