whatisgithub

What is tokhub?

yaojingang/tokhub — explained in plain English

Analysis updated 2026-05-18

188TypeScriptAudience · ops devopsComplexity · 4/5LicenseSetup · moderate

In one sentence

An open source, self-hosted monitoring dashboard and gateway that checks whether AI API providers are truly working and routes your requests to the healthiest one.

Mindmap

mindmap
  root((TokHub))
    What it does
      Monitors AI API providers
      Ranks and recommends channels
      OpenAI compatible gateway
    Tech stack
      Go
      React
      PostgreSQL
      Redis
    Health checks
      Network connectivity
      Model availability
      Real generation test
    Use cases
      Self hosted API monitoring
      Multi provider routing
      Usage and cost tracking
    Audience
      Ops teams
      API resellers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Monitor whether AI API providers are truly generating replies, not just reachable.

USE CASE 2

Run a public status and recommendation page for AI API relay channels.

USE CASE 3

Give a team a shared OpenAI-compatible gateway that routes across multiple upstream providers.

USE CASE 4

Track usage, cost, and alerts for AI API keys across an organization.

What is it built with?

GoReactTypeScriptPostgreSQLRedisDocker

How does it compare?

yaojingang/tokhubeisenjimmy/quantkatipally/openlive
Stars188187189
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity4/53/53/5
Audienceops devopsgeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Ships with a one-command Docker Compose quick start, but production use requires setting real secret keys and environment variables.

Use freely for any purpose, including commercial use, as long as you keep the required copyright and license notices.

So what is it?

TokHub is a monitoring and gateway system for people who run or use AI API relay services, the middlemen that sit between you and providers like OpenAI, Anthropic, or Gemini and forward your requests to them. It combines a public status page, a ranked list of providers, a workspace for individual users, an admin backend, and a gateway that speaks the same language as OpenAI's API, all in one open source project you can run on your own server with Docker. The problem it aims to fix is that most status pages only say a service is "up" or "down" without saying whether the failure is in DNS, a security certificate, login credentials, the list of available models, or the actual reply generation. TokHub checks health in three layers instead. The first layer tests basic network reachability: resolving the address, connecting, and checking the security handshake. The second layer calls the provider's model list endpoint to confirm the login key works and the requested model actually exists. The third layer sends a minimal real chat request and checks that a proper reply comes back, catching cases where a service looks reachable but is not actually generating anything useful. These three checks are combined into an overall status such as healthy, degraded, or down, along with a health score. Users can save public channels they like or add their own private ones, each with its own address, model, and quota. Everyone gets a personal OpenAI-compatible gateway that can route requests across several upstream providers, choosing the best one by lowest latency, highest success rate, or lowest cost, and automatically skipping ones that are currently failing. Security keys are encrypted, gateway keys are only shown once at creation, and the system blocks requests aimed at internal or local network addresses to reduce abuse. The backend is written in Go with PostgreSQL and Redis, the frontend in React and TypeScript, and the whole project is released under the Apache 2.0 license.

Copy-paste prompts

Prompt 1
Walk me through deploying TokHub with Docker Compose using its .env.example file.
Prompt 2
Explain how TokHub's three-layer probing tells apart a network failure from a real generation failure.
Prompt 3
Show me how to configure TokHub's gateway to route by lowest cost across multiple upstreams.
Prompt 4
Help me set the production environment variables TokHub needs before going live.

Frequently asked questions

What is tokhub?

An open source, self-hosted monitoring dashboard and gateway that checks whether AI API providers are truly working and routes your requests to the healthiest one.

What language is tokhub written in?

Mainly TypeScript. The stack also includes Go, React, TypeScript.

What license does tokhub use?

Use freely for any purpose, including commercial use, as long as you keep the required copyright and license notices.

How hard is tokhub to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is tokhub for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.