Architecture Overview
Raven is an open-source AI gateway you self-host on your own infrastructure. It acts as an intelligent proxy between your application and LLM providers. Every request flows through a pipeline of modules that handle authentication, routing, guardrails, caching, and logging.Organizations
An organization is your workspace in Raven. All resources — providers, keys, budgets, team members — belong to an organization.- Each user can belong to multiple organizations
- Resources are isolated between organizations
Virtual Keys
Virtual keys are API keys that your applications use to authenticate with Raven. They are not your provider API keys — they’re Raven-managed keys that map to your configured providers.| Feature | Description |
|---|---|
| Prefix | Keys start with rk_live_ or rk_test_ |
| Rate Limits | Per-key RPM and RPD limits |
| Environment | Separate live and test environments |
| Expiration | Optional expiration date |
| Budgets | Attach cost budgets to individual keys |
Providers
A provider is a configured connection to an LLM service. You store your credentials once, and Raven handles routing requests to the right provider based on the model requested.Supported Providers
OpenAI
Anthropic
Models
Models are the LLM models available through your configured providers. Raven maintains a catalog of models with metadata including:- Pricing — Input and output token costs
- Context window — Maximum token capacity
- Capabilities — Chat, function calling, vision, etc.
Request Pipeline
Every request that hits the Raven gateway goes through this pipeline:Environments
Raven supports two environments:- Live — Production traffic. Keys prefixed with
rk_live_. - Test — Development and testing. Keys prefixed with
rk_test_.