HPP Router
HPP Router is an OpenAI-compatible LLM API gateway for the HPP ecosystem. It sends each request to the right model across providers, enforces a prepaid quota per consumer, and tracks usage — all behind a single API key and a single base URL.
https://router.hpp.io
Why HPP Router
- One API, many models. Call OpenAI, Anthropic, Moonshot, or local Ollama models through one OpenAI-compatible endpoint. Switch models by changing a single
modelstring. - Smart routing. Use the virtual model
hpprouter/autoand let the gateway pick a cost-appropriate model per request based on configurable rules. - Prepaid quota & usage tracking. Every request is checked against the consumer's remaining quota before it reaches a provider, and token usage is metered and billed against the resolved model's pricing.
- Drop-in compatibility. Existing OpenAI SDK code works by pointing the base URL at
https://router.hpp.ioand using your HPP Router API key.
How a request flows
Client → Kong Gateway (key-auth, rate-limiting, quota check)
→ llm-router (resolves provider/model, incl. hpprouter/auto)
→ upstream provider (OpenAI / Anthropic / Ollama)
→ response captured for async usage logging
→ PostgreSQL (consumer quotas, usage logs)
- A request arrives with your API key.
- The gateway authenticates the consumer and applies rate limits.
- The quota layer verifies the consumer still has available quota (fail-fast otherwise).
- The router resolves the target
provider/model— or, forhpprouter/auto, classifies the request and picks a model from rules. - The upstream provider is called and the response is returned to you.
- Token usage is extracted asynchronously (no added latency) and deducted from the consumer's quota.
Where HPP Router fits in the HPP ecosystem
HPP Router is the model router layer of the HPP stack — an AI-native L2 built for agents. It routes inference requests across the network (including HPP Coder), and API keys are issued through HPP Hub (see also the HPP Hub guide).
Next steps
- Quickstart — make your first request via REST, the TypeScript SDK, or the OpenAI SDK.
- Authentication — how to send your API key.
- Models & Pricing — list models and understand token-based billing.
- Smart Routing — how
hpprouter/autochooses a model. - API Reference — the full Consumer API contract.