# songquanpeng/one-api

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/songquanpeng-one-api).**

29,742 stars · 5,719 forks · JavaScript · mit

## Links

- GitHub: https://github.com/songquanpeng/one-api
- Homepage: https://openai.justsong.cn/
- awesome-repositories: https://awesome-repositories.com/repository/songquanpeng-one-api.md

## Topics

`api` `api-gateway` `azure-openai-api` `chatgpt` `claude` `ernie-bot` `gemini` `gpt` `openai` `openai-api` `proxy`

## Description

One API is a centralized gateway and orchestration platform designed to consolidate multiple artificial intelligence model providers into a single, standardized interface. It functions as a reverse proxy that intercepts incoming API requests and routes them to various third-party services, abstracting the underlying provider credentials through a unified token management system.

The platform provides comprehensive administrative tools for managing API keys, rotating credentials, and enforcing security policies across diverse service integrations. It includes a persistent database-backed system for tracking real-time usage metrics and managing user-specific credit quotas, ensuring controlled resource distribution. Users can monitor these activities and configure system parameters through a self-hosted administrative dashboard.

Beyond its core routing and orchestration capabilities, the project supports flexible deployment across containerized or multi-machine environments. It also allows for visual customization of the frontend interface through a directory-based asset replacement mechanism, enabling consistent branding across the administrative dashboard.

## Tags

### Artificial Intelligence & ML

- [LLM Gateways](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-gateways.md) — Consolidates multiple artificial intelligence model providers into a single standardized API to simplify integration and authentication.
- [Model Provider Adapters](https://awesome-repositories.com/f/artificial-intelligence-ml/model-provider-adapters.md) — Normalizes disparate API responses from different artificial intelligence services into a unified format for consistent downstream consumption.
- [Model Provider Management](https://awesome-repositories.com/f/artificial-intelligence-ml/model-provider-management.md) — Centralizes multiple model API keys to simplify usage tracking and access protocols. ([source](https://github.com/songquanpeng/one-api#readme))
- [Model Orchestrators](https://awesome-repositories.com/f/artificial-intelligence-ml/model-orchestrators.md) — Aggregates diverse artificial intelligence vendor credentials and service endpoints into a unified infrastructure for scalable development.

### Security & Cryptography

- [Secret Management Systems](https://awesome-repositories.com/f/security-cryptography/secret-management-systems.md) — Managing and rotating multiple API credentials from various providers in one secure location to reduce administrative overhead and improve security.
- [API Credential Managers](https://awesome-repositories.com/f/security-cryptography/api-credential-managers.md) — Managing and rotating multiple third-party service credentials in one secure location to reduce administrative overhead and improve system security.
- [Authentication Strategies](https://awesome-repositories.com/f/security-cryptography/authentication-strategies.md) — Secures protected endpoints by validating incoming requests with session cookies or bearer tokens. ([source](https://github.com/songquanpeng/one-api/blob/main/docs/API.md))
- [Credential Management](https://awesome-repositories.com/f/security-cryptography/credential-management.md) — Provides centralized mapping of user-specific keys to external provider credentials for secure service access.
- [Credential Abstraction Layers](https://awesome-repositories.com/f/security-cryptography/credential-abstraction-layers.md) — Maps internal user-specific API keys to multiple external provider credentials to abstract and secure underlying service access.

### Web Development

- [API Gateways](https://awesome-repositories.com/f/web-development/api-gateways.md) — Consolidates multiple third-party service providers into a single standardized endpoint.
- [API Adapters](https://awesome-repositories.com/f/web-development/api-adapters.md) — Normalizes disparate API responses from different services into a unified format.
- [Service Integrations](https://awesome-repositories.com/f/web-development/service-integrations.md) — Connects third-party applications through a unified endpoint for seamless data exchange. ([source](https://github.com/songquanpeng/one-api#readme))

### DevOps & Infrastructure

- [Infrastructure Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/infrastructure-orchestrators.md) — Launching and scaling backend applications across diverse environments using containerized setups to ensure consistent performance and reliable service availability.
- [Configuration Management](https://awesome-repositories.com/f/devops-infrastructure/configuration-management.md) — Initializes operational parameters and security settings from host environment variables.
- [Deployment Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/deployment-orchestrators.md) — Standardizes the deployment process across containerized and binary hosting targets. ([source](https://github.com/songquanpeng/one-api#readme))

### Data & Databases

- [Usage Accounting](https://awesome-repositories.com/f/data-databases/usage-accounting.md) — Tracks real-time usage metrics and credit balances within a persistent data store.

### Networking & Communication

- [Request Routers](https://awesome-repositories.com/f/networking-communication/request-routers.md) — Intercepts incoming API calls and dynamically forwards them to third-party providers.
- [API Usage Proxies](https://awesome-repositories.com/f/networking-communication/api-usage-proxies.md) — Intercepts and routes incoming requests to external providers while enforcing authentication and security policies.

### Business & Productivity Software

- [Usage Tracking Systems](https://awesome-repositories.com/f/business-productivity-software/usage-tracking-systems.md) — Track and update account credit balances for specific users by sending standardized requests to monitor consumption and enforce usage limits within the system. ([source](https://github.com/songquanpeng/one-api/blob/main/docs/API.md))

### System Administration & Monitoring

- [Usage Quota Managers](https://awesome-repositories.com/f/system-administration-monitoring/usage-quota-managers.md) — Enforces resource consumption limits and usage quotas to ensure fair distribution across user accounts.
- [Administrative Dashboards](https://awesome-repositories.com/f/system-administration-monitoring/administrative-dashboards.md) — Provides a deployable administrative interface for managing system configuration, user access, and service monitoring.

### User Interface & Experience

- [Theming Engines](https://awesome-repositories.com/f/user-interface-experience/theming-engines.md) — Define and register unique visual styles using dedicated directories and configuration files to ensure a consistent look and feel across your entire user interface. ([source](https://github.com/songquanpeng/one-api/blob/main/web/README.md))
