A

APIHub

api gateway reseller

Module 4 · Gateway AI & admin panel

Một API key.
Nhiều nhà cung cấp AI.

APIHub chạy trên Cloudflare Pages, Workers và D1: gateway OpenAI-compatible non-streaming, tính tiền theo model, cùng admin panel duyệt nạp và cấu hình giá bán.

Frontend

Next.js static export

Deploy lên Cloudflare Pages

API

Cloudflare Worker

Worker riêng, không dùng Node runtime

Dữ liệu

Cloudflare D1

Migration SQL, không dùng Prisma/SQLite file

Bảo mật

WebCrypto

PBKDF2 cho mật khẩu, session HttpOnly lưu hash trong D1

Gateway

OpenAI-compatible

Chat completions non-streaming, Bearer key, rate limit theo key

Admin

Vận hành trong D1

Duyệt nạp tiền, khóa tài khoản, model/giá bán và chính sách

Nền tảng hiện có

  • • Next.js + TypeScript + Tailwind, build static export.
  • • Worker API + D1, migration SQL và setting công khai.
  • • Đăng ký, đăng nhập, đăng xuất; session HttpOnly lưu hash trong D1.
  • • Dashboard số dư, API key (chỉ hiện key gốc một lần), nạp tiền và lịch sử.
  • • Gateway /v1/models và /v1/chat/completions non-streaming, mock/live, rate limit theo key.
  • • Admin duyệt nạp, khóa tài khoản, quản lý model/giá bán và nội dung chính sách.

Chưa mở bán chính thức. Gateway chỉ hỗ trợ chat completions văn bản, không streaming, embeddings, ảnh, audio, rerank hoặc webhook.