Local model runtimes7 projects, checked September 17, 2026

Open-source alternatives to the OpenAI API

The open-source alternatives to the OpenAI API are Ollama, LocalAI, llama.cpp, vLLM, Jan, TextGen and Speaches. Each runs open models on your own hardware behind an API other programs can call. LocalAI, llama.cpp and vLLM state OpenAI-compatible APIs, so existing code moves by changing the base URL; LocalAI also covers images, speech and embeddings. Ollama is the quickest start, with its own REST API. vLLM serves many users from GPUs. A team switches to keep data in-house and stop paying per token.

The quickest local start
Ollama
Every modality behind OpenAI-compatible APIs
LocalAI
The engine on any hardware
llama.cpp

7 of 7 carry an OSI licence. 7 of 7 run on your own machines. Figures read from GitHub on September 17, 2026.

Pick by need

One project per need, with the reason from its own README and the one thing to know before you choose it.

The quickest local start

Ollama

MIT, one command downloads and runs an open model behind a local REST API, built on llama.cpp, with Python and JavaScript libraries and a launcher for coding agents.

Know firstIts README does not state OpenAI API compatibility; check the docs for the endpoint your code needs.

OSI181,182 stars

Every modality behind OpenAI-compatible APIs

LocalAI

MIT, drop-in OpenAI, Anthropic and ElevenLabs-compatible APIs for chat, embeddings, images, speech and vision over 60+ backends, no GPU required, with keys and quotas.

Know firstMore configuration than Ollama, and the macOS app is unsigned.

OSI49,147 stars

The engine on any hardware

llama.cpp

MIT C and C++ engine with an OpenAI-compatible server and web interface, GGUF models at 1.5 to 8 bits, and 17 hardware backends from CPU to CUDA and Metal.

Know firstAn engine rather than an app: GGUF only, and no images or speech.

OSI128,617 stars

Serving many users from GPUs

vLLM

Apache-2.0, OpenAI and Anthropic-compatible APIs, 200+ architectures, wide quantisation, batching and parallelism across many GPUs.

Know firstBuilt for GPU servers and the people who run them, not for a laptop.

OSI92,054 stars

A local API with a chat window on top

Jan

Apache-2.0 desktop app that runs open models and serves an OpenAI-compatible API at localhost:1337 for other apps.

Know firstA desktop app for one machine, not a server.

OSI44,516 stars

A local API with every engine

TextGen

AGPL-3.0, five engines and an OpenAI and Anthropic-compatible API with tool calling, fully offline.

Know firstBuilt for technical users; full install is about 10 GB.

OSI47,683 stars

OpenAI's audio API on your own machine

Speaches

MIT server that serves transcription, translation and speech through the OpenAI API shape with Whisper, Kokoro and Piper models loaded on demand.

Know firstSpeech only, and its latest release is a release candidate.

OSI3,666 stars

What to take away

  • LocalAI, llama.cpp and vLLM state OpenAI-compatible APIs, so most code moves with a base URL change.
  • Ollama is the easiest start and the backend most apps in this directory support.
  • All seven are free software; the cost becomes your hardware, and each open model has its own licence.
  • The OpenAI API still wins on OpenAI's own models and on needing no hardware at all.

The projects, side by side

The facts that decide most choices. Each project's page carries the full panel.

ProjectBest forOpennessLicenceRuns asOwn machinesStars
OllamaThe quickest local startOSIMITInstaller, Docker, CLI, REST APIYes181,182
LocalAIEvery modality behind OpenAI-compatible APIsOSIMITDocker, macOS app, KubernetesYes49,147
llama.cppThe engine on any hardwareOSIMITServer (OpenAI-compatible API), CLI, Docker, Prebuilt binariesYes128,617
vLLMServing many users from GPUsOSIApache-2.0pip, Server (OpenAI-compatible API)Yes92,054
JanA local API with a chat window on topOSISee LICENSEDesktop app, Local OpenAI-compatible serverYes44,516
TextGenA local API with every engineOSIAGPL-3.0Desktop app (portable), pip, One-click installer, DockerYes47,683
SpeachesOpenAI's audio API on your own machineOSIMITDocker, Server (OpenAI-compatible API)Yes3,666

Licence and star figures read from GitHub on September 17, 2026. Stars are shown as a dated fact and were not used to rank this page.

Each project, in turn

Ollama

OSIThe quickest local start

An MIT tool for downloading and running open models on your own machine with one command, built on llama.cpp, with a REST API, Python and JavaScript libraries, and a launcher that connects coding agents to local models.

MIT, one command downloads and runs an open model behind a local REST API, built on llama.cpp, with Python and JavaScript libraries and a launcher for coding agents.

Know firstIts README does not state OpenAI API compatibility; check the docs for the endpoint your code needs.

Licence
MIT
Runs as
Installer, Docker, CLI, REST API
Platforms
macOS, Windows, Linux, Docker
Hosted option
None from the maintainers
Last release
v0.34.2, Sep 15, 2026

LocalAI

OSIEvery modality behind OpenAI-compatible APIs

An MIT engine that runs text, vision, voice, image and video models on any hardware, no GPU required, behind drop-in OpenAI, Anthropic and ElevenLabs-compatible APIs, over 60+ backends including llama.cpp, vLLM and whisper.cpp.

MIT, drop-in OpenAI, Anthropic and ElevenLabs-compatible APIs for chat, embeddings, images, speech and vision over 60+ backends, no GPU required, with keys and quotas.

Know firstMore configuration than Ollama, and the macOS app is unsigned.

Licence
MIT
Runs as
Docker, macOS app, Kubernetes
Platforms
macOS, Linux containers, Kubernetes
Hosted option
None from the maintainers
Last release
v4.10.0, Sep 17, 2026

llama.cpp

OSIThe engine on any hardware

The MIT C and C++ inference engine behind much of local AI, running GGUF models with 1.5 to 8-bit quantisation on CPUs, Apple Silicon and 17 hardware backends, with an OpenAI-compatible server and a web interface built in.

MIT C and C++ engine with an OpenAI-compatible server and web interface, GGUF models at 1.5 to 8 bits, and 17 hardware backends from CPU to CUDA and Metal.

Know firstAn engine rather than an app: GGUF only, and no images or speech.

Licence
MIT
Runs as
Server (OpenAI-compatible API), CLI, Docker, Prebuilt binaries
Platforms
Apple Silicon, x86, RISC-V, Android, 17 hardware backends including CUDA, Metal, Vulkan and ROCm
Hosted option
None from the maintainers
Last release
v0.4.1, Sep 14, 2026

vLLM

OSIServing many users from GPUs

An Apache-2.0 engine from UC Berkeley's Sky Computing Lab for high-throughput model serving, with an OpenAI-compatible and Anthropic Messages API, 200+ model architectures, wide quantisation support, and parallelism across many GPUs.

Apache-2.0, OpenAI and Anthropic-compatible APIs, 200+ architectures, wide quantisation, batching and parallelism across many GPUs.

Know firstBuilt for GPU servers and the people who run them, not for a laptop.

Licence
Apache-2.0
Runs as
pip, Server (OpenAI-compatible API)
Platforms
NVIDIA, AMD and Intel GPUs, x86, ARM and PowerPC CPUs, TPUs, Gaudi, Ascend and Apple Silicon through plugins
Hosted option
None from the maintainers
Last release
v0.29.0, Sep 9, 2026

Jan

OSIA local API with a chat window on top

An Apache-2.0 desktop app from Menlo Research that downloads and runs open models from Hugging Face on your own computer, connects to OpenAI, Anthropic and others when you want, serves a local OpenAI-compatible API, and supports MCP.

Apache-2.0 desktop app that runs open models and serves an OpenAI-compatible API at localhost:1337 for other apps.

Know firstA desktop app for one machine, not a server.

Licence
See the LICENSE file
Runs as
Desktop app, Local OpenAI-compatible server
Platforms
Windows 10 or later, macOS 13.6 or later, Linux (deb, AppImage, Arm64)
Hosted option
None from the maintainers
Last release
v0.8.4, Jul 23, 2026

TextGen

OSIA local API with every engine

An AGPL-3.0 desktop app for local models, formerly text-generation-webui, with five engines including llama.cpp and ExLlamaV3, an OpenAI and Anthropic-compatible API, tool calling, file chat, image generation and LoRA training, fully offline.

AGPL-3.0, five engines and an OpenAI and Anthropic-compatible API with tool calling, fully offline.

Know firstBuilt for technical users; full install is about 10 GB.

Licence
AGPL-3.0
Runs as
Desktop app (portable), pip, One-click installer, Docker
Platforms
Linux, Windows, macOS
Hosted option
None from the maintainers
Last release
v4.9, May 20, 2026

Speaches

OSIOpenAI's audio API on your own machine

An OpenAI-compatible server under MIT for streaming transcription, translation and text to speech, loading Whisper, Kokoro and Piper models on demand, described by its maintainers as Ollama for speech models.

MIT server that serves transcription, translation and speech through the OpenAI API shape with Whisper, Kokoro and Piper models loaded on demand.

Know firstSpeech only, and its latest release is a release candidate.

Licence
MIT
Runs as
Docker, Server (OpenAI-compatible API)
Platforms
Docker on GPU or CPU
Hosted option
None from the maintainers
Last release
v0.9.0-rc.3, Dec 27, 2025

How to choose

The questions that settle it, in the order they usually come up.

  1. Does existing OpenAI SDK code need to keep working?

    LocalAI, llama.cpp, vLLM, Jan, TextGen and Speaches state OpenAI-compatible APIs; change the base URL. Check Ollama's docs for the endpoint you use.

  2. Is it one machine or many users?

    One machine: Ollama, llama.cpp or Jan. Many users from GPUs: vLLM. Many users across modalities: LocalAI.

  3. Do you need images, speech or embeddings too?

    LocalAI covers them all; Speaches covers speech; vLLM serves embedding models.

Where the OpenAI API is still the better choice

the OpenAI API, in the vendor's own words, is OpenAI's hosted API for its models, documented at developers.openai.com, which describes itself as "guides, API docs, and examples for the OpenAI API." openai.com. The cases below are where that still wins.

  • You need OpenAI's own models; open models are a different set, and the gap depends on the task.
  • You have no GPU and need large-model quality at speed; hosted inference needs no hardware.
  • You want one vendor to run, scale and patch the service for you.
  • You need features built into OpenAI's platform, such as its own tools and fine-tuning service, exactly as they are.

How this page was checked

Numbers from GitHub, dated

Stars, licence, last commit and last release are read from the GitHub API by a script every week and carry the date they were read. Nobody types them.

Claims from the README

What each project does is written from its own README and LICENSE, read in full on the date shown, and phrased as the project's claim. The sources are listed at the end.

What is never said

That a project is faster, better or cheaper than the OpenAI API. A price for anyone. A user count. A roadmap. If a fact is not on this page, it was not in the source.

OSI Open source (OSI licence)
The code, and the weights where the project is a model, carry a licence on the OSI approved list.
Source available Source available
The code is public, and the licence limits what you may do with it. Read the LICENSE file before commercial use.
Open weights Open weights
The model weights can be downloaded and run. The training data or code is closed, or the weights carry a restriction the code does not.

Questions people ask

What is the best open-source alternative to the OpenAI API?

Ollama (MIT) for the quickest local start. LocalAI (MIT) for drop-in OpenAI-compatible APIs across chat, embeddings, images and speech in one server. llama.cpp (MIT) for the engine on any hardware with an OpenAI-compatible server. vLLM (Apache-2.0) for serving many users from GPUs with OpenAI and Anthropic-compatible APIs.

Which alternatives are drop-in replacements for OpenAI's API?

LocalAI, llama.cpp and vLLM state OpenAI-compatible APIs in their READMEs, as do Jan, TextGen and Speaches. Code written against the OpenAI SDK points at them by changing the base URL. Ollama's README describes its own REST API and does not state OpenAI compatibility.

Can I replace OpenAI's embeddings, images and audio too?

LocalAI lists embeddings, image generation, audio to text, text to audio and realtime speech behind OpenAI-compatible APIs. Speaches serves transcription and speech through OpenAI's audio API shape. vLLM serves embedding models; llama.cpp and Ollama focus on language models.

Do I need a GPU to replace the OpenAI API?

Not for every job. llama.cpp runs on CPUs with quantisation down to 1.5 bits, LocalAI states no GPU is required, and Ollama builds on llama.cpp. A GPU makes larger models fast; vLLM is built around GPUs for serving at scale.

Are these OpenAI API alternatives free?

The software is: Ollama, LocalAI and llama.cpp are MIT, vLLM is Apache-2.0, and none of their READMEs describes a paid tier. The cost becomes your own hardware and power, and each open model you run carries its own licence to read.

Sources

  1. OpenAI API documentation, OpenAI's own description, read September 17, 2026
  2. Ollama README, read September 17, 2026
  3. LocalAI README, read September 17, 2026
  4. llama.cpp README, read September 17, 2026
  5. vLLM README, read September 17, 2026

Running one of these inside your own environment, with your own data and your own security rules, is the kind of work Reveneau does. Read how a forward deployed engagement works.