One API Hub: A Practical Guide to Managing All Your One-API Compatible Sites in One Place

“Instead of juggling five browser tabs every morning, keep every AI service key on a single, lightweight key-ring.”


Table of Contents

  1. Why One API Hub Exists
  2. What It Actually Does—Feature Map
  3. Before You Start—Minimal Prerequisites
  4. Local Development—Get It Running in 15 Minutes
  5. Production Deployment—One-Line Docker Launch
  6. Frequently Asked Questions (FAQ)
  7. What to Tackle Next

1. Why One API Hub Exists

If you have ever worked with New API, Veloera, VoAPI, or OneHub—all of them One-API compatible platforms—you probably know the drill:

Pain Point Everyday Reality
Five different dashboards Five logins, five passwords, five tabs
“I think I still have credits on site C” No one remembers; credits go unused
Manual key backups Copy-paste marathon, high risk of typos
Daily check-ins Open each site, click the button, repeat

One API Hub gathers those scattered pieces into a single, low-maintenance web service. Log in once, see every balance, back up every key, and trigger daily check-ins from one screen. No external accounts, no extra fees, no lock-in.


2. What It Actually Does—Feature Map

2.1 Unified Admin Login

  • Single-user admin mode secured with JWT.
  • The interface only asks for a password; the username is always admin.

2.2 Site Management

Action What Happens
Add Paste the site URL and your credential (cookie or token).
Edit Change the credential or add a note.
Delete Removes the site from the dashboard; the upstream service is untouched.

2.3 Real-Time Credential Validation

When you add or update a site, the back-end immediately calls the target’s /user or /dashboard endpoint. If the credential fails, you get a clear “Invalid token” message before you even close the modal.

2.4 Account Snapshot

The dashboard pulls and displays:

  • User name
  • Total credits
  • Used credits
  • Remaining credits

2.5 API Key Overview

Every key under every site is listed in one table:

Column Purpose
Key (masked) Click to copy full string
Used credits Live numbers from upstream
Remaining credits Calculated automatically

2.6 Daily Check-In Automation

The hub detects the site type and calls the correct check-in endpoint—often /user/checkin. Success or failure appears right next to the site name with the amount of credits gained (if any).

2.7 Import & Export in JSON

  • Export → download a single JSON file containing every site and key.
  • Import → upload the same file to restore or migrate.

2.8 Home Dashboard Cards

  • Total number of sites
  • Total number of API keys
  • Combined credits across every site
  • Overall usage rate

home
Figure 1: Dashboard overview

setting
Figure 2: Site settings page


3. Before You Start—Minimal Prerequisites

Item Minimum Comfortable
Node.js 18.x 20.x LTS
Package manager npm, pnpm, or yarn npm
Operating system Windows, macOS, or Linux Linux server
RAM 512 MB free 1 GB
Disk 100 MB SSD with daily backup

4. Local Development—Get It Running in 15 Minutes

Step 1: Clone or Download

git clone <repository-url>
cd one-api-hub

Step 2: Install Dependencies

npm ci

npm ci is faster and stricter than npm install, ideal for reproducible builds.

Step 3: Start Dev Mode

npm run dev

Two URLs will appear in the terminal:

  • Frontend dev server → http://localhost:3000
  • Backend API → http://localhost:8000

Open http://localhost:3000, enter the default password admin123456, and you will land inside the admin panel.

Step 4: Add Your First Site

  1. Click Site ManagementAdd Site.
  2. Fill in the Site Name, URL, and Credential.
  3. Hit Validate & Save.
  4. The dashboard refreshes and shows your credits immediately.

5. Production Deployment—One-Line Docker Launch

5.1 Build the Image

docker build -t one-api-hub:latest .

5.2 Prepare Environment Variables

Copy the sample file and adjust:

cp .env.example .env
nano .env

A minimal production .env:

NODE_ENV=production
PORT=8000
ADMIN_INITIAL_PASSWORD=your-very-strong-password
JWT_SECRET=change-me-too

5.3 Run the Container

docker run -d \
  --name one-api-hub \
  -p 8000:8000 \
  --env-file .env \
  -v one-api-hub:/data \
  -v one-api-hub:/app/logs \
  one-api-hub:latest

After the container starts, visit http://<your-server-ip>:8000, log in with the password you set, and you are live.


6. Frequently Asked Questions (FAQ)

Question Plain Answer
Does it support multiple users? Not at the moment. It is intentionally single-admin. For small teams, place a reverse proxy with Basic Auth in front.
I forgot the admin password. Now what? Stop the container, delete /data/data.db, restart, and set a new ADMIN_INITIAL_PASSWORD.
Where is the database file? Development: ./data/data.db inside the project folder. Production: /data/data.db inside the container (Docker volume).
How do I upgrade to a newer version? docker pull or rebuild the image → docker stopdocker rmdocker run with the same volume mounts.
Where are the logs? Container logs: docker logs one-api-hub. File logs: /app/logs inside the container, mapped to a volume.
Can I run HTTPS? The container serves plain HTTP. Put Nginx or Caddy in front for TLS termination.
Will my credentials leak? No. Credentials are stored only in your local SQLite file; nothing is sent to third parties.
Does it run on a Raspberry Pi? Yes. The image is multi-arch (linux/arm64). Memory usage stays under 100 MB.

7. What to Tackle Next

  • Nightly backups – a cron job that tars /data/data.db and uploads it to S3 or any object storage.
  • Prometheus metrics – expose container CPU and RAM, plus a custom gauge for “total credits remaining” so you can page yourself when credits drop below 5 USD.
  • Fork & extend – the code base is TypeScript front and back, deliberately small. Add multi-user support or Webhook notifications if you need them.
  • Share feedback – open an issue or pull request. The project grows when real users point out real friction.

Closing Thought

One API Hub will not make coffee for you, but it will keep you from hunting through browser bookmarks just to see if you still have 3 USD left on site number four. Clone it, build it, forget about the juggling act.