talira

Access all LLM through the standard OpenAI API format, easy to deploy & use

open sourceMITself-hostablefree

One API is a self-hosted LLM API management and key redistribution system: you add your own upstream API keys as channels (OpenAI and Azure OpenAI, Anthropic Claude including AWS, Google Gemini, Mistral, DeepSeek, xAI, Groq, Cohere, Ollama, Cloudflare Workers AI and many Chinese providers such as Baidu ERNIE, Alibaba Qwen, Zhipu ChatGLM, Moonshot and ByteDance Doubao), and it exposes them through one OpenAI-compatible API, translating requests for providers with other formats. Users get access tokens with expiry, quota, allowed IP ranges and models; quota is charged by group and model multipliers on token counts, with redemption codes to top up balances, invite rewards and a recharge link, and channels are load balanced, retried on failure and tested automatically. It's a single Go binary with a web UI and Docker images, using SQLite or MySQL, with Redis and multi-machine deployment for scale. It's MIT licensed with a required footer attribution, and New API is built on it; its last release was v0.6.10 in February 2025.

Ways to install

Hosted for you

Problems it solves

  • give my team one OpenAI-compatible endpoint that routes to OpenAI, Claude, Gemini and DeepSeek
  • hand out API keys to colleagues with their own quotas without sharing our real OpenAI key
  • self-hosted LLM API gateway that load balances across several provider keys
  • use Chinese models like Qwen, ERNIE and ChatGLM from apps that only speak the OpenAI API
  • track how many tokens each user of our internal AI service has used
  • set different prices per model and per user group for an AI API I resell
  • issue redemption codes that top up users' balances on my AI API site
  • restrict an AI API key to certain models and to our office IP range
  • fail over to another provider key automatically when a request errors
  • test all my LLM provider keys on a schedule and disable the ones that fail
  • run an AI API key management system as one binary or Docker container with SQLite
  • point ChatGPT Next Web at my own AI key distribution server instead of an OpenAI key

Features

  • OpenAI-compatible API in front of OpenAI, Azure OpenAI, Anthropic Claude (incl. AWS), Google Gemini, Mistral, DeepSeek, xAI, Groq, Cohere, Ollama and Cloudflare Workers AI
  • Chinese providers: Baidu ERNIE, Alibaba Qwen, Zhipu ChatGLM, iFlytek Spark, Tencent Hunyuan, Moonshot, Baichuan, MiniMax, ByteDance Doubao and SiliconCloud
  • request and response translation for providers whose API isn't OpenAI-format
  • channel management with bulk creation, model lists, groups and load balancing
  • pick a channel per request by appending its ID to the token
  • access tokens with expiry, quota, allowed IP ranges and allowed models
  • quota by group and model multipliers on prompt and completion tokens, shown in USD if wanted
  • redemption codes generated and exported in bulk to top up balances
  • user invite rewards, announcements, recharge link and initial balance for new users
  • model mapping, automatic retry on failure and scheduled channel tests and balance updates
View 6 more
  • image generation endpoint and Cloudflare AI Gateway support
  • management API with system access tokens
  • email, GitHub, Feishu and WeChat Official Account login; Cloudflare Turnstile
  • custom system name, logo, footer, home and about pages, and themes
  • SQLite by default, MySQL or PostgreSQL (PostgreSQL support still being adapted), Redis cache and multi-machine deployment
  • single binary for Linux, macOS and Windows, Docker images

Limitations

  • Footer attribution required: the README requires a credit and link to One API at the bottom of the page, also in derivative projects, unless you get permission23
  • Not for unfiled public AI services in China: the README says not to offer generative AI services that haven't been filed under China's Interim Measures to the public in China2

Capabilities

Has an APIplan not known

Forks

  • New API An AI gateway for models, applications, and agents. Its own project since 2023.

Alternatives

The same job

These do what One API does.

  1. LiteLLM The AI Gateway for platform teams.
  2. Bifrost Open-source, high-performance AI gateway that works as your LLM gateway, MCP gateway and agent gateway.
  3. New API An AI gateway for models, applications, and agents
  4. Portkey AI Gateway A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
  5. CLIProxyAPI Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code and Devin as an OpenAI/Gemini/Claude/Codex compatible API service
  6. OmniRoute The free AI gateway: one endpoint for hundreds of providers, with quota-aware fallback

Compare One API with the top 3