All alternatives

Open source alternatives to OpenAI API

Hosted API for OpenAI models, billed per token and used by apps that do not run a model themselves. These 4 projects cover the same ground. They are ordered by GitHub stars, with the licence and last commit shown so you can check whether a project is maintained before you move a team onto it.

474.5k stars combined4 projects4 committed in the last 30 daysplatform.openai.com

The shortlist

Highest star count first. Not a review score.

OllamaSelf-hosted

AI assistants & chat · Go

188.8k

Get up and running with Inkling, Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

Alternative to OpenAI API

Licence
MIT
Last commit
3 days ago
Repo
ollama/ollama

llama.cppSelf-hosted

AI assistants & chat · C++

137k

LLM inference in C/C++

Alternative to OpenAI API

Licence
MIT
Last commit
2 days ago
Repo
ggml-org/llama.cpp

vLLMSelf-hosted

AI assistants & chat · Python

98k

A high-throughput and memory-efficient inference and serving engine for LLMs

Alternative to OpenAI API

Licence
Apache-2.0
Last commit
2 days ago
Repo
vllm-project/vllm

LocalAISelf-hosted

AI assistants & chat · Go

50.7k

LocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.

Alternative to OpenAI API

Licence
MIT
Last commit
2 days ago
Repo
mudler/LocalAI

Before you switch

Three facts from this list, not a sales pitch.

Activity
4 of 4 projects had a commit in the last 30 days.
Licences
MIT (3), Apache-2.0 (1).
Largest project
Ollama with 188.8k stars, last commit 3 days ago.

Stars and commits read from GitHub on 2 December 2026. A star is a bookmark, not a guarantee; check the licence and run the install on a spare machine before you migrate.

Where to run your pick

Many of these projects ship as a Docker image or a single binary. A small VPS is enough to try one; move to a managed platform when other people depend on it.

Plain links today; paid placements are labelled. Sponsor this page.

Know a project we missed?

Send the repository URL; we check it against GitHub before adding it.

Suggest a project

Source for every listing: GitHub. Not affiliated with OpenAI API or the projects listed.