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.
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.