qmetrics.net

Best Open-Source Alternatives to Anthropic API

Anthropic API by Anthropic is a commercial product. These open-source projects say they can replace it.

The most popular open-source alternative to Anthropic API is LocalAI, with 50.6k GitHub stars. Other open-source alternatives to Anthropic API are oMLX. Most Anthropic API alternatives here are Machine Learning Infrastructure tools. The first 1 say in their own README or website that they can replace Anthropic API (the quote is shown under each one); the other 1 do the same job, shown with their own description.

Stars and activity updated 27 November 2026.

Sort:Most starsRecentA–Z

oMLX

Apple Silicon MLX LLM inference server and menu bar app

oMLX serves text, vision, embedding, and rerank models on Mac hardware with continuous batching and tiered KV caching. It exposes OpenAI- and Anthropic-compatible APIs and a local admin dashboard.

★ 24k⟳ yesterdayApache-2.0
Open Source Alternative to:Anthropic API
“Drop-in replacement for OpenAI and Anthropic APIs.”

Also does the same job as Anthropic API

These projects don't call themselves a Anthropic API alternative, but two independent checks of their own description found they do the same main job.

LocalAI

Self-hosted OpenAI-compatible server for running open AI models locally

LocalAI runs open models for chat, images, speech, video and music on your own hardware, with OpenAI- and Anthropic-compatible APIs. It works on CPU or GPU and adds team chats, files, agents and add-ons.

★ 50.6k⟳ todayMIT
Open Source Alternative to:Anthropic APIChatGPTGemini+1
“The API speaks the OpenAI and Anthropic formats.”

Compare Anthropic API alternatives

Questions about Anthropic API alternatives

Is there an open-source alternative to Anthropic API?

Yes. 2 open-source projects can replace Anthropic API, for example LocalAI and oMLX. 1 of them says so in its own documentation; the other 1 do the same job.

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

LocalAI (50.6k GitHub stars) is the most popular open-source alternative to Anthropic API on GitHub. The best choice depends on your needs: compare them side by side, for example LocalAI vs oMLX.

Are the open-source alternatives to Anthropic API free?

All of the 2 projects listed here are free to use under an open-source license, with no license fee: all permissive (such as MIT). Running software on your own server still costs hosting and upkeep, and many projects also sell a hosted version.

Related commercial products

Claude Cowork

Anthropic

15 open-source alternatives

ChatGPT

OpenAI

12 open-source alternatives

Anthropic Claude

Anthropic

11 open-source alternatives

Claude Code

Anthropic

11 open-source alternatives

Gemini

Google

10 open-source alternatives

OpenAI API

OpenAI

5 open-source alternatives