ScriptsMay 14, 2026·2 min read

One API — Unified LLM API Gateway (Docker)

One API is a self-hosted LLM API gateway: unify OpenAI/Claude/Gemini/DeepSeek endpoints, manage keys, and deploy via Docker in minutes (33.7k★).

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Stage only · 29/100Stage only
Agent surface
Any MCP/CLI agent
Kind
Script
Install
Bundle
Trust
Trust: Established
Entrypoint
docker run --name one-api -d --restart always -p 3000:3000 justsong/one-api
Universal CLI install command
npx tokrepo install 65f4b9a7-d932-51b8-aa22-6f0ff7cff276
Intro

One API is a self-hosted LLM API gateway: unify OpenAI/Claude/Gemini/DeepSeek endpoints, manage keys, and deploy via Docker in minutes (33.7k★).

Best for: Developers who want one endpoint for multiple providers, with centralized key management and predictable routing for agents

Works with: Docker (recommended), optional MySQL, and downstream clients that can point to a single OpenAI-compatible base URL

Setup time: 10-30 minutes

Main

  • Multi-provider gateway: positioned as a unified API layer for many model providers, so agents can talk to “one base URL” instead of custom clients per vendor.
  • Docker-first deployment: the README provides runnable docker run commands (SQLite and MySQL variants) and a Compose option.
  • Operational knobs: documents env vars and multi-node notes (session secret, sync frequency, Redis) for production-ish usage.
  • Good for agent fleets: centralizes key/quotas so you can rotate credentials without touching every agent or tool.

FAQ

  • Do I need MySQL?: No. The README shows an SQLite-based docker run; use MySQL when you need multi-node or stronger persistence.
  • How do I upgrade safely?: The README suggests a watchtower-based update command; test on a staging instance first.
  • What is the first integration?: Point one client at the gateway base URL and verify a single model call before migrating everything.
🙏

Source & Thanks

Source: https://github.com/songquanpeng/one-api > License: MIT > GitHub stars: 33663 · forks: 6429

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets