TokenHub is available as a Docker image, Linux package, and offline installer Download now

Every model call,
controlled and on the record

From org structure and roles to API keys, audit logs and data redaction, TokenHub builds enterprise-grade governance into every layer of the gateway. It runs on your own servers: teams get scoped credentials, while provider keys, logs and sensitive data never leave your company.

  • Multi-level RBAC
  • Single sign-on
  • End-to-end audit trail
  • Self-hosted · air-gap ready
Org model

Four levels that mirror how your company works

Access and usage roll up through organization → team → project → member. Admins at the top set the security baseline; everyone below manages their own scope without losing control or getting stuck in approvals.

Organization
One identity source and sign-in policy, global security rules, and centrally managed provider keys
Team
Maps to a department or business unit, with its own budget and quotas; team admins manage their own members
Project
Issues API keys and sets the model allowlist, attached knowledge bases and rate limits
Member
Holds a separate role in each project; personal usage and every action are fully traceable
Role-based access control

Built-in roles out of the box, custom roles when you need them

Grant roles at the organization, team or project level. Permissions inherit and narrow automatically as you go down.

Super Admin

The org owner. Manages identity sources, global security policy, provider keys and overall budgets.

Org level · 1–2 people

Admin

Manages members, models, knowledge bases, budgets and API keys for the teams or projects they own.

Team / project level

Developer

Calls models, uses knowledge bases and manages their own API keys inside authorized projects.

Project level

Viewer

Sees usage reports and settings but can't change anything. A good fit for finance, auditors and business owners.

Any level
Custom roles

Need more than the built-ins? Mix and match permissions

For example, let “Data Labelers” upload and search knowledge base documents only, or let Finance view and export usage and cost reports only. Permissions go down to individual actions and can be scoped to where they apply.

Knowledge Base Ops · custom
kb:read kb:doc.upload kb:doc.delete model:invoke model:config cost:read member:invite

Permission matrix (built-in roles)

Permission Super Admin Admin Developer Viewer
Models
Add and configure model channels (provider keys / local endpoints)
Configure routing, failover and the model allowlist
Call models / use the Playground
Knowledge bases
Create / delete knowledge bases
Upload and manage documents
Search and Q&A
Users & permissions
Invite / remove members
Assign roles, create custom roles
Issue and revoke API keys
Configure SSO and identity sources
Usage & cost
View usage and cost reports
Set budgets and quotas
Export usage and cost reports
Audit
View audit logs
Export audit logs
Set log retention and external forwarding
  • Allowed
  • Partial: limited to their own teams / projects, or their own data
  • Not allowed
Single sign-on (SSO)

Use the accounts you already have. Onboarding and offboarding just happen.

Connect your identity provider and employees sign in to TokenHub with their work accounts. Org structure and membership sync on a schedule, so when someone leaves, their access and any API keys they own are shut off too.

  • Works with standard protocols and popular workplace platforms
  • Maps departments or groups to teams and default roles automatically
  • Require SSO and turn off password sign-in
  • Run multiple identity sources side by side for parent companies and subsidiaries

Standard protocols

LDLDAP / AD OIOIDC SASAML 2.0

Workplace platforms

WCWeCom DTDingTalk FSFeishu (Lark)
Employee Identity provider TokenHub Sync org & roles
API key management

Every key has clear boundaries

Teams only ever hold keys issued by TokenHub. Your raw provider keys stay encrypted inside the gateway you deploy and are never handed out. Each key is bound to a project, a set of models and an access policy.

Per-project keys

Issue separate keys per project and environment (prod / test), with usage attributed automatically.

Expiration

Set an expiry date and get reminded before it hits. No more “master keys” that live forever.

IP allowlists

Only accept calls from specific egress IPs or ranges, so a leaked key is useless outside your network.

Rate limits & quotas

Cap RPM, TPM and monthly quota so a runaway script can't blow through your budget. For per-employee keys, see Employee Quotas.

One-click revoke

Spot something odd? Revoke the key and it stops working within seconds. The action lands in the audit log.

Admin console · API keys (sample UI)
Project: AllStatus: All
  • support-bot-prodth-prod-••••-7f3a
    Support Bot600 RPM · 2 IP rules
    Expires 2027-03-31
    Active
  • code-assistant-teamth-dev-••••-c21e
    Code Assistant300 RPM · 20M tokens / mo
    Expires in 90 days
    Active
  • knowledge-qa-testth-test-••••-09b4
    Knowledge Q&A60 RPM · intranet only
    Expires in 7 days
    Expiring soon
  • contractor-tempth-tmp-••••-5d10
    Code Assistant30 RPM
    Revoked Oct 8
    Revoked
Audit logs

Every call leaves a trail

Who called which model, when, and what it cost. Model calls and admin actions are all logged, searchable and exportable.

WhoMember, team, project and the key used
WhenMillisecond timestamps and source IP
Which modelThe model requested and the one actually routed to
How muchInput / output tokens and estimated provider cost
Admin console · Audit logs (sample data)
Last 24 hoursType: All
Sample audit log
TimeMemberProjectEventModelTokensProvider costResult
10-14 10:42:18ChenCode AssistantModel calldeepseek-chat2,184$0.0008Success
10-14 10:41:55Support botSupport BotModel callqwen-plus1,026$0.0003Success
10-14 10:39:07LinKnowledge Q&AKB search + calllocal/qwen2.5-14b3,410$0.0000Success
10-14 10:36:44ZhaoKnowledge Q&AModel callqwen-plus——Blocked
10-14 10:30:12WangCode AssistantRevoked API key th-tmp-••••-5d10———Admin action
10-14 10:12:03System admin—Set Lin's role to Developer———Admin action

* UI and data are samples, shown to illustrate how the feature works

Data security

Sensitive data stays in. Harmful content stays out.

Requests are scanned and redacted before they reach a model, responses are reviewed before they come back, and everything is encrypted in transit and at rest.

Sensitive terms & PII redaction

NamePhoneNational IDEmailCustom terms
What the employee typed

Please review the loan application for customer John Smith (phone (555) 013-8000, ID number 110101-1990-0101-XXXX) and send the result to john.smith@example.com.

What the model actually receives

Please review the loan application for customer [NAME_1] (phone [PHONE_1], ID number [ID_1]) and send the result to [EMAIL_1].

When the model responds, placeholders can be swapped back to the original values before the answer reaches an authorized employee. Redaction rules can be set per project and per model: for example, always redact for cloud models and relax the rules for local models on your internal network. All personal details in this example are fictitious.

Sensitive terms & PII redaction

Built-in detectors for phone numbers, ID numbers, bank cards, emails and more, plus regex and custom word lists. On a match, redact, block or just alert.

Content moderation

Checks both inputs and outputs for policy violations, confidential material and out-of-scope requests. Matching requests are blocked and logged, and third-party moderation services can plug in.

Encryption in transit & at rest

HTTPS / TLS end to end. Provider keys, API keys and sensitive log fields are encrypted at rest, and you decide whether raw requests and responses are stored at all.

Deployment

Runs on your servers, not ours

TokenHub is software you download and deploy yourself. There's no hosted service. Your data, keys and logs stay on your own servers. Pick the setup that fits your scale and network.

Docker

Single server

One machine and a few commands. Great for individuals, small teams and proofs of concept.

  • Up and running with Docker / Docker Compose
  • Config and data volumes kept separate for easy upgrades and backups
  • Connect cloud and local models side by side
Production

Cluster / high availability

Scale out across multiple instances in your own data center or private cloud to handle production traffic.

  • Multiple nodes behind a load balancer, no single point of failure
  • Runs on Kubernetes and other container platforms
  • Plugs into your identity, monitoring and logging stack
No internet needed

Air-gapped deployment

Local models, local knowledge bases and a local vector store. Data never leaves your internal network.

  • Fully functional with no internet access
  • Offline installer and offline upgrades
  • Built for isolated government and enterprise networks

Compliance & certifications Coming soon

We're still compiling our compliance and certification details and will publish them here once confirmed. If your procurement or security review needs a completed questionnaire or a write-up of how the software handles data, get in touch.

Contact us →
FAQ

Access & security questions

Will our provider API keys be exposed to teams or employees?

No. Raw provider keys are configured in the gateway only by a Super Admin or an authorized Admin, and they're stored encrypted. Teams and employees only hold keys issued by TokenHub, which you can revoke or rotate at any time without touching anything on the provider side.

Can it connect to our existing AD / LDAP and org structure?

Yes. TokenHub supports LDAP / AD, OIDC and SAML 2.0, as well as WeCom, DingTalk and Feishu (Lark). Your org structure syncs on a schedule, and departments or groups map automatically to TokenHub teams and default roles.

How granular can permissions get?

Down to “can this member, in this project, call this model or access this knowledge base.” Built-in roles cover the common cases, and custom roles let you combine individual permissions and scope them to an organization, team or project.

How long are audit logs kept? Can we export them or send them to our log platform?

You set the retention period. Logs can be filtered by member, project, model, time and more, exported to CSV, or forwarded via webhooks or log shipping to the logging and security analytics tools you already use.

Does redaction hurt answer quality?

Redaction swaps in meaningful placeholders (like “[NAME_1]”) and keeps the sentence structure intact, so most Q&A and summarization tasks are barely affected. Original values can be restored in the response based on your policy. If a workflow truly needs the raw text, enable redaction for cloud models only and relax it for local models on your internal network.

What do we need to deploy TokenHub?

The gateway runs on an ordinary Linux server. A single server only needs Docker, and cluster and air-gapped setups are supported too. You only need GPUs if you plan to run local LLMs. Exact sizing depends on your concurrency and model choice. See the download page for installation steps, and reach out through our commercial licensing inquiry to plan a commercial deployment.

Does TokenHub ever see our business data?

No. TokenHub is software you download and run yourself. There's no hosted service and no account to sign up for. Requests, knowledge bases, logs and keys all live on your own servers. When you call a cloud model, the request goes straight from your server to the provider you configured, and you pay that provider directly.

Let the gateway handle governance. You focus on the business.

Free for personal and non-commercial use. For commercial deployments, contact us about a commercial license and we'll help you plan around your identity setup, compliance needs and infrastructure.