
A relay for relays — aggregate scattered AI relay stations into one unified gateway
Bring together all your New API / One API / OneHub / DoneHub / Veloera / AnyRouter / Sub2API sites
into one API Key, one endpoint, with automatic model discovery, smart routing, and cost optimization.
Docs · Quick Start · Deployment · Configuration · Client Integration · FAQ · Contributing
Try Metapi without deploying — full-featured demo instance:
| 🔗 Demo URL | metapi-t9od.onrender.com |
| 🔑 Admin Token | 123456 |
⚠️ Security Notice: This is a public demo. Do NOT enter any real API keys, credentials, or site information. Data may be reset at any time.
ℹ️ Note: Demo runs on Render free tier + OpenRouter free models (only
:freesuffixed models available). First visit may take 30-60s to wake up.
The AI ecosystem is seeing a growing number of aggregation relay stations based on New API / One API and similar projects. Managing balances, model lists, and API keys across multiple sites is scattered and time-consuming.
Metapi acts as the Meta-Aggregation Layer on top of these relay stations, unifying multiple sites into one endpoint (with configurable per-project downstream API Keys) — all downstream tools (Cursor, Claude Code, Codex, Open WebUI, etc.) can seamlessly access all models. Currently supported upstream platforms:
| Pain Point | How Metapi Solves It |
|---|---|
| One key per site, tedious client config | Unified proxy endpoint + optional per-project downstream keys — all site models auto-aggregated under /v1/* |
| No idea which site offers the cheapest model | Smart routing auto-selects the optimal channel by cost, balance, and usage |
| Site goes down, manual switching is a hassle | Auto-failover — failed channels cool down and traffic shifts automatically |
| Balances scattered everywhere | Centralized dashboard — at-a-glance overview with low-balance alerts |
| Daily check-ins across sites | Auto check-in — scheduled execution with reward tracking |
| Don't know which site has which models | Auto model discovery — new upstream models appear with zero config |
Dashboard — Balance distribution, spending trends, system overview
|
Model Marketplace — Cross-site model coverage, pricing comparison, measured metrics
|
Smart Routing — Multi-channel probability distribution, cost-priority routing
|
Account Management — Multi-site multi-account, health state tracking
|
Site Management — Upstream site configuration and status overview
|
Token Management — API Token lifecycle management
|
Model Playground — Interactive online model testing
|
Check-in Log — Auto check-in status and reward tracking
|
Usage Logs — Proxy request logs and cost breakdown
|
Availability Monitor — Channel health real-time monitoring
|
System Settings — Global parameters and security configuration
|
Notification Settings — Multi-channel alert and push configuration
|
Downstream Clients (Cursor · Claude Code · Codex · Open WebUI · Cherry Studio, etc.)
↓ Authorization: Bearer <PROXY_TOKEN>
Metapi Gateway
• Unified /v1 proxy for core OpenAI / Claude-compatible endpoints (Responses, Chat Completions, Messages, Completions, Embeddings, Images, Models)
• Smart Routing Engine — weighted selection by cost, balance, and availability; auto-cooldown & retry on failure
• Model Discovery — auto-aggregates all upstream models with zero config
• Format Conversion — transparent bidirectional OpenAI ⇄ Claude conversion
• Auto Check-in · Balance Management · Alerts & Notifications · Data Dashboard
↓
Upstream Platforms (New API · One API · OneHub · DoneHub · Veloera · AnyRouter · Sub2API …)
/v1/files
Smart Routing UI — supports exact match, wildcards, probability distribution, and more routing strategies
| Platform | Adapter | Description |
|---|---|---|
| New API | new-api |
Next-gen LLM gateway |
| One API | one-api |
Classic OpenAI API aggregation |
| OneHub | onehub |
Enhanced One API fork |
| DoneHub | done-hub |
Enhanced OneHub fork |
| Veloera | veloera |
API gateway platform |
| AnyRouter | anyrouter |
Universal routing platform |
| Sub2API | sub2api |
Subscription-based relay |
Adapters cover shared capabilities such as model discovery, balance access, token management, and proxy integration; login, check-in, and user-info flows vary by platform.
healthy / unhealthy / degraded / disabled four-state machine
Model Marketplace — browse all available models' coverage, pricing, and performance metrics in one place
Five notification channels supported:
| Channel | Description |
|---|---|
| Webhook | Custom HTTP push |
| Bark | iOS push notifications |
| ServerChan | WeChat notifications |
| Telegram Bot | Telegram message notifications |
| SMTP Email | Standard email notifications |
Alert scenarios: low balance warning, site/account anomalies, check-in failures, proxy request failures, token expiry reminders, daily summary reports. Alert cooldown mechanism (default: 300 seconds) prevents duplicate notifications.

Data Dashboard — balance distribution, spending trends, system health at a glance

Model Playground — interactive online testing, verify model availability and response quality
amd64, arm64, and armv7l (linux/arm/v7) server deployments```bash mkdir metapi && cd metapi
cat > docker-compose.yml << 'EOF' services: metapi: image: 1467078763/metapi:latest port
$ claude mcp add metapi \
-- python -m otcore.mcp_server <graph>