GitHub hosts HunyuanVideo, Tencent's open-source framework for large-scale video generation models, enabling AI-driven video creation.
polyrouter
About polyrouter
polyrouter acts as a self-hosted gateway that presents a single endpoint and API key to route requests to different large language models across multiple providers. It supports explicit model selection, header-based routing rules, and smart layers that automatically choose models based on workload type such as code, vision, structured research, or writing. The tool enforces hard spend limits, tracks costs with snapshot pricing at request time, and provides a dashboard for monitoring requests, costs, providers, and routing decisions. Routing follows an explicit-first approach where the first matching rule is applied, with fallback chains that can be reordered. Smart layers include structural, semantic, and cascade options, while workload targets allow binding specific request classes to particular models or tiers. The system records detailed metadata for each request including tokens, costs, latency, and the exact routing reason, but does not store prompt or response bodies by default.
Key features
- Unified API endpoint for multiple LLM providers
- Explicit model selection and header-based routing rules
- Smart routing layers (structural, semantic, cascade)
- Workload-based routing (code, vision, research, writing)
- Hard spend limits and cost tracking with snapshot pricing
- Configurable fallback chains with drag-and-reorder in dashboard
- Detailed request metadata including tokens, costs, and latency
- Multi-arch Docker image for self-hosting
Use cases
- Centralizing LLM API access across multiple providers
- Cost control and monitoring for production LLM usage
- Routing requests to appropriate models based on workload type
Pros
- Single endpoint and API key for multiple LLM providers
- Explicit-first routing with configurable fallback chains
- Hard spend limits and real-time cost tracking
- Dashboard for monitoring requests, costs, and routing decisions
- Supports OpenAI and Anthropic API compatibility
Cons
- Self-hosting required for full functionality
- No cloud-hosted option mentioned
- Metadata-only storage by default, prompt/response bodies not stored unless explicitly enabled
Frequently asked questions about polyrouter
What is Polyrouter and what does it do?
Polyrouter is a self-hosted gateway that provides a single endpoint and API key to route requests across multiple large language model providers. It automatically selects models based on explicit rules, header-based routing, or smart layers that classify workloads such as code, vision, structured research, or writing.
Who should use Polyrouter?
Polyrouter is designed for developers, teams, or organizations that need to manage multiple LLM providers efficiently, enforce spend limits, and maintain control over routing decisions while ensuring privacy and reliability in production environments.
How does Polyrouter handle routing decisions?
Routing follows an explicit-first approach where the first matching rule is applied, with fallback chains that can be reordered. Smart layers include structural, semantic, and cascade options, while workload targets allow binding specific request classes to particular models or tiers.
Does Polyrouter track costs and spending?
Yes, Polyrouter enforces hard spend limits, tracks costs with snapshot pricing at request time, and provides a dashboard for monitoring requests, costs, providers, and routing decisions without storing prompt or response bodies by default.
Can Polyrouter be self-hosted?
Yes, Polyrouter is available as a self-hosted, open-source solution that can be deployed via a multi-arch Docker image, allowing users to maintain control over their keys, data, and infrastructure.
What kind of metadata does Polyrouter record for each request?
Polyrouter records detailed metadata for each request, including tokens, costs, latency, and the exact routing reason, but does not store prompt or response bodies unless encrypted body capture is explicitly enabled.