Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJun 2, 2026·3 min de lecture

One API — Unified LLM Gateway for OpenAI, Claude, and Gemini

A self-hosted API management and distribution system that aggregates multiple LLM providers behind a single OpenAI-compatible interface with load balancing, rate limiting, and token quota management.

Prêt pour agents

Installation avec revue préalable

Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
One API LLM Gateway
Commande avec revue préalable
npx -y tokrepo@latest install 1039cfd7-5ec1-11f1-9bc6-00163e2b0d79 --target codex

Dry-run d'abord, confirmez les écritures, puis lancez cette commande.

Introduction

One API is a self-hosted LLM API gateway that lets you access OpenAI, Anthropic Claude, Google Gemini, and dozens of other providers through a single OpenAI-compatible endpoint. Teams use it to centralize API key management, enforce usage quotas, and switch between providers without changing application code.

What One API Does

  • Aggregates 30+ LLM providers behind one unified API endpoint compatible with the OpenAI format
  • Manages API keys, user tokens, and per-user quota limits through a web dashboard
  • Load-balances requests across multiple provider channels with automatic failover
  • Tracks token usage and costs per user, per channel, and per model
  • Supports streaming responses, function calling, and vision models across providers

Architecture Overview

One API is a Go application backed by SQLite or MySQL. The web dashboard is built with React. Incoming requests are routed through a channel selection layer that picks the best available provider based on priority, weight, and health status. Each channel wraps a specific provider adapter that translates between the OpenAI format and the native API format.

Self-Hosting & Configuration

  • Deploy via Docker, Docker Compose, or a single binary on Linux, macOS, or Windows
  • Set the database with SQL_DSN for MySQL or use the default embedded SQLite
  • Add provider channels through the admin UI with API keys and model mappings
  • Create user tokens with optional rate limits, expiration, and quota caps
  • Enable Redis for distributed rate limiting in multi-instance deployments

Key Features

  • OpenAI-compatible endpoint means zero code changes for existing applications
  • Built-in billing system tracks token consumption and supports recharge codes
  • Channel priority and weight system for cost optimization across providers
  • Automatic retry and failover when a provider returns errors or timeouts
  • Model mapping lets you expose custom model names that route to any backend

Comparison with Similar Tools

  • LiteLLM — Python-based proxy; One API offers a full admin UI with quota management
  • OpenRouter — Managed service; One API is fully self-hosted with no third-party dependency
  • Portkey AI Gateway — Focused on observability; One API emphasizes multi-tenant billing
  • API Gateway (Kong/APISIX) — General-purpose; One API is purpose-built for LLM token economics
  • Helicone — Logging-focused proxy; One API adds load balancing and provider aggregation

FAQ

Q: Which LLM providers does One API support? A: OpenAI, Azure OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Mistral, DeepSeek, Ollama, and many more. New providers are added regularly.

Q: Can I use One API with existing OpenAI SDK code? A: Yes. Point the base_url to your One API instance and use the issued token as the API key. No other changes are needed.

Q: Does it support streaming? A: Yes. Streaming, function calling, and multimodal (vision) requests are fully supported across compatible providers.

Q: How does quota management work? A: Admins set token quotas per user. Each request deducts from the quota based on actual token usage reported by the provider.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires