Stravia
Stravia is a local, self-hostable AI gateway written in Rust. It gives your coding agents, SDKs, and chat interfaces a single gateway endpoint while handling upstream provider connections, failover routing, API key budgets, platform-hosted tools, and request observability.
What Stravia does
- Unified gateway protocols: Serve
OpenAI Chat Completions,OpenAI Responses(HTTP and WebSocket),Anthropic Messages,Google Gemini, andMCP(/mcp) from one instance. - Purpose-based model routes: Group upstream models under logical
Model IDroutes typed byinference,image_generation, orweb_search, with priority lanes, pre-commit failover, and thinking-level mapping. - API keys with spend and tool controls: Issue scoped keys with allowed models, sliding-window RPM limits, decimal spend budgets, MCP access, and per-capability transparent tool injection.
- Built-in platform capabilities: Host
Web search,Media understanding(image, Office documents, audio),Media generation,History recall, and localCredential Protectionwithout trusting every client with upstream keys. - Observable operations: Inspect live and historical interactions, per-bucket usage and cost analytics, upstream provider allowance windows, and exportable diagnostics.
Desktop vs. Server at a glance
| Aspect | Stravia Desktop | Stravia Server |
|---|---|---|
| Runtime | Native Tauri app (Win / macOS / Linux) | Headless binary, Docker image, or NixOS module |
| Admin auth | Automatic native session (NativeAdminSession) | One-time /setup token + cookie session login |
| Client setup | Writes global config files directly (Write configuration) | Generates portable config snippets to copy |
| Database | Built-in SQLite (no Redis required) | SQLite or PostgreSQL (PostgreSQL requires Redis ≥ 6.2) |
See Deployment Modes: Desktop vs Server for hosting details and security boundaries.
Where to go next
- First time here? Follow Getting Started to configure a provider, create your first model route, issue an API key, and verify a request.
- Connecting an agent? Jump to Connect Clients for
Codex,ChatGPT,Claude Code,OpenCode,OMP, and 7 more built-in integrations. - Upgrading to v0.7.8? Read What's New & Upgrading to v0.7.8 before replacing your binary or database schema.