Are you the author? Sign in to claim
Open-source AI reseller panel with customer API keys, prepaid balances, usage limits, model pricing, and profit analytic
TokenPanel is an open-source, self-hosted platform for tracking AI usage, managing users and accounts, enforcing budgets and rolling limits, and exposing a governed OpenAI- and Anthropic-compatible API.
Connect providers, issue API keys, set model prices and budgets, enforce limits, and see cost and usage from one dashboard — whether for internal teams, clients, or product metering.
No enterprise feature wall. No paid source tier for core features. TokenPanel is licensed under AGPLv3 so the platform stays open when modified and offered as a hosted service.
Most LLM gateways focus on routing requests across providers. TokenPanel adds who can use what, at what cost, and under which limits.
Use it when you need:
If LiteLLM is the provider gateway, TokenPanel is the open-source access, billing, and dashboard layer on top.
Install TokenPanel on a Linux server:
curl -fsSL https://raw.githubusercontent.com/tokenpanel/tokenpanel/main/manager/install.sh | sudo bash
Prefer local development? Jump to Local Development.
Accounts and access
AI gateway
/v1/models and /v1/chat/completions/v1/messagesProvider and model control
Budgets and limits
Dashboard
Operations
Production install on a Linux server:
curl -fsSL https://raw.githubusercontent.com/tokenpanel/tokenpanel/main/manager/install.sh | sudo bash
The installer:
main branch to /opt/tokenpanel/etc/tokenpanel/var/tokenpanel/sharedcurl | sudo bashAfter install:
tokenpanel status
tokenpanel backup
tokenpanel update
tokenpanel logs -f
TokenPanel uses one operator-edited config file:
/etc/tokenpanel/tokenpanel.yml
Example:
domain: panel.example.com
adminEmail: admin@example.com
timezone: UTC
proxy:
mode: caddy
trustProxy: true
trustCloudflare: false
database:
user: tokenpanel
password: change-me
name: tokenpanel
api:
jwtSecret: change-me-to-a-long-random-secret
After editing it, apply the change:
tokenpanel config render
tokenpanel restart
During updates, tokenpanel update re-renders configuration automatically.
Generated deployment files live in:
/etc/tokenpanel/generated/
Do not edit generated files. Edit tokenpanel.yml instead.
Create a customer and API key in the dashboard, then point OpenAI-compatible clients at your TokenPanel domain:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "tp_live_your_customer_key",
baseURL: "https://your-tokenpanel-domain.com/v1",
});
const response = await client.chat.completions.create({
model: "default-chat",
messages: [{ role: "user", content: "Write a short welcome email." }],
});
console.log(response.choices[0]?.message.content);
Anthropic-compatible clients can call the same customer key through Authorization: Bearer:
curl https://your-tokenpanel-domain.com/v1/messages \
-H "Authorization: Bearer tp_live_your_customer_key" \
-H "Content-Type: application/json" \
-d '{
"model": "default-chat",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Explain token resale in one paragraph."}]
}'
TokenPanel uses Bun workspaces and Docker Compose.
bun install
cp -f .env.example .env
bun run docker:start
Local URLs:
http://localhost:5173http://localhost:3000http://localhost:3000/healthUseful commands:
bun run test
bun run typecheck
bun run lint
bun run build
TokenPanel has two API surfaces:
/admin/* for users managing organizations, providers, models, customers, plans, API keys, invites, analytics, and playground requests/v1/* for customer API keys calling OpenAI-compatible and Anthropic-compatible endpointsCore data lives in MongoDB with Effect Schema TypeScript schemas. Billing settlement uses MongoDB transactions so usage records, customer balance debits, balance ledger entries, and rate-limit counters commit together.
TokenPanel is built as an open-source alternative to closed feature tiers around AI gateway operations. The goal is simple: if the feature exists, self-hosted users should have it.
You can self-host it, inspect it, modify it, and run it for your customers. If you modify TokenPanel and offer it as a hosted network service, AGPLv3 requires you to make the corresponding source code available to users of that service.
TokenPanel is under active development. Review release notes and back up production data before upgrades. APIs, configuration, and deployment behavior may change before the first stable release.
Security reports should follow SECURITY.md. Contributions are welcome through CONTRIBUTING.md.
TokenPanel is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only). See LICENSE.
This is not legal advice. If you plan to redistribute TokenPanel or offer a modified hosted service, review the license with counsel.
Project management using GitHub Issues + Git worktrees for parallel agent execution
Core skills library for Claude Code with 20+ battle-tested skills including TDD, debugging, and brainstorming
Coding agent session manager supporting Claude Code, Gemini CLI, Codex, and more
191 agents, 155 skills, and 82 plugins cross-compatible with Claude Code, Cursor, and Codex