AI Gateway
Sovereign European AI gateway in Rust: OpenAI, Anthropic, Gemini, sub-10ms pgvector search, ephemeral capability tickets, and NL2SQL.
One endpoint, N providers
The Aurabase AI Gateway is a unified HTTP and SDK surface for major LLM providers. The same code runs against OpenAI, Anthropic, and Google Gemini — you only change provider or rely on the project default.
The gateway incorporates four native pillars:
- Automated Fallback: Automatically falls back to a secondary provider when the primary suffers upstream outages or timeouts (5xx/408).
- Ephemeral Sessions: Issues short-lived capability tickets (300s TTL) with bounded token budgets, eliminating API key exposure in client frontends.
- Multi-Dimension pgvector: Dedicated dimensional column routing (
embedding_768,embedding_1536,embedding_3072) with sub-5ms HNSW similarity search. - AST-Verified NL2SQL: Synthesizes PostgreSQL queries validated by an Abstract Syntax Tree parser that forbids mutations and enforces row limits.
Supported LLM & Embedding Models
| Provider | Chat & Completion Models | Supported Embeddings |
|---|---|---|
| Anthropic | claude-3-5-sonnet, claude-3-5-haiku, claude-3-opus | — |
| OpenAI | gpt-4o, gpt-4o-mini, o1, o3-mini | text-embedding-3-small (1536), text-embedding-3-large (3072) |
| Google Gemini | gemini-1.5-pro, gemini-1.5-flash, gemini-2.0-flash | text-embedding-004 (768) |
| Custom / Ollama | Any OpenAI-compatible endpoint | Custom OpenAI-compatible embeddings |
Ephemeral sessions (Zero secret exposure)
Frontend single-page applications and mobile apps should never embed backend API keys (aura_anon_... or aura_sk_...) for open-ended LLM endpoints. Aurabase solves this with ephemeral capability sessions:
The ticket is bounded by the project's remaining monthly token quota. When the allocated session budget is depleted, the gateway rejects requests with HTTP 429 Too Many Requests (code: "session_budget_exceeded"), shielding your organization from client-side denial-of-wallet attacks.
Chat, streaming, pgvector & RAG
Audit logs & quotas
Every AI call is logged with prompt/completion tokens, reasoning tokens (Gemini thoughts included), provider, upstream model, duration, and status.
Real-Time Logs API
Inspect audit logs via GET /v1/ai/{project_id}/logs:
Rate limits are enforced on a per-project token bucket (10 req/min with burst 5 by default). Monthly plan limits apply across ai.requests, ai.input_tokens, and ai.output_tokens. Exceeding monthly plan limits returns HTTP 403 Forbidden (QUOTA_EXCEEDED).