xuya-dev

xuya-dev / token-hub

Public

TokenHub 是一个去中心化的 AI API 共享平台,别人使用你的渠道,你获得余额返利。

16
1
85% credibility
Found May 21, 2026 at 16 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Vue
AI Summary

TokenHub is an open AI API sharing platform that lets channel providers share their idle AI API access while consumers access multiple AI models (OpenAI, Anthropic, Google, DeepSeek, and more) through a single unified API key. The platform automatically handles load balancing across multiple channels, converts request formats between different AI providers, implements rate limiting, and manages three-phase billing (pre-charge, settle, refund) with 8-decimal precision. Channel owners can earn 0-50% revenue share on every call made through their shared channels. The system includes features like daily check-in rewards, redemption codes for balance top-ups, and automatic health checking that disables failing channels. Security measures include AES-GCM encryption for stored API keys and SHA-256 hashing for user keys.

How It Works

1
🔍 Discover TokenHub

You hear about a platform where people share AI API access, and you want to try it out to access different AI models through one simple key.

2
📝 Create Your Account

You sign up with your email and password, or use the LinuxDo one-click login option if you have that account.

3
💰 Get Starting Credits

You receive a small starting balance to experiment with, and you can check in daily to earn more free credits.

4
🔑 Get Your Unified API Key

You create an API key that works like a master key, letting you call any of the supported AI models through one simple interface.

5
🤖 Start Building with AI

You use your key with any AI tool or code you already know, calling GPT, Claude, Gemini, or other models seamlessly without managing multiple accounts.

6
Choose Your Path
💳
Use AI Models

Call AI models, generate images, create speech, or make videos through your unified key and pay only for what you use.

📤
Share Your Keys

If you have spare API capacity, submit your own channels and earn a share of every call others make through them.

🎉 Everything Works Together

You access powerful AI models through one simple key, while the platform handles the complex routing, billing, and security behind the scenes.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 16 to 16 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is token-hub?

TokenHub is a decentralized AI API sharing platform that lets you pool API keys from multiple LLM providers and earn money when others use your channels. Think of it as a marketplace where channel providers share their idle API quota, and consumers get a single unified `sk-hub-xxx` key to hit OpenAI, Anthropic, Google, DeepSeek, and more -- no SDK rewrites needed. The platform handles load balancing across multiple keys, converts request/response formats between providers, enforces rate limits, and bills users down to 8 decimal places in USD. Channel owners set their own commission rate (0-50%) and get automatic payouts.

The backend runs on Java 21 with Spring Boot, using MySQL for persistence and Redis for rate limiting. The frontend is Vue 3 with TypeScript. Everything containerizes with Docker.

Why is it gaining traction?

The killer feature is the OpenAI-compatible API. You literally just change your `base_url` and `api_key` -- no code changes. Behind the scenes, it routes to the best available upstream channel, handles streaming for both OpenAI and Anthropic formats, and rotates keys automatically when health checks fail. The three-phase billing (pre-consume, settle, refund) means you never overcharge users, and the revenue sharing is transparent -- channel providers see exactly what they earned per call.

Who should use this?

Operators who want to run their own API proxy without the operational overhead of managing multiple provider accounts and billing logic. Developers tired of rate limits on personal API keys who want to pool resources with others. Anyone building a SaaS AI product who needs a unified gateway with built-in billing and usage tracking.

Verdict

TokenHub is a well-architected solution for API key sharing with solid fundamentals -- proper encryption, distributed rate limiting, and a clean multi-tenant billing model. However, with only 16 stars and no visible test suite, it's early-stage software. The 0.85% credibility score reflects this: solid design, but unproven at scale. If you want to self-host an AI API hub, it's worth evaluating -- just don't deploy it to production without thorough testing first.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.