llama.cpp vs New API
A side-by-side comparison of two self-hosted local llm runners options — licensing, setup difficulty, resource needs, and what each one replaces.
| Feature | llama.cpp | New API |
|---|---|---|
| Deploy effort | Under-an-hour setup | Under-an-hour setup |
| Health score | 100 · Excellent | 100 · Excellent |
| Category | Local LLM Runners | Local LLM Runners |
| License | MIT | MIT |
| Language | C++ | Go |
| Setup difficulty | Hard | Medium |
| Min. RAM | 8,192 MB | 512 MB |
| Deployment | binary, bare-metal, docker | docker |
| GitHub stars | ★ 129,361 | ★ 48,815 |
| First released | 2023 | 2024 |
| Replaces | OpenAI API | OpenRouter, OpenAI API |
What are llama.cpp and New API?
llama.cpp
llama.cpp is a C/C++ inference engine for running LLaMA-family and many other models efficiently on CPUs and GPUs. It pioneered the GGUF quantized model format and powers a large portion of the local-AI ecosystem.
- GGUF quantization
- Runs on modest hardware
- Built-in HTTP server
- Broad GPU backend support
New API
New API is a large-model interface management and distribution system derived from One API, providing an OpenAI-compatible gateway with richer billing, rendering and provider support. It is designed for running a self-hosted AI relay service.
- OpenAI-compatible relay
- Multi-provider channels
- Detailed billing
- Modern dashboard
llama.cpp vs New API: key differences
Llama.cpp is written in C++, while New API is built with Go. New API is the lighter option, starting around 512 MB of RAM against 8,192 MB for llama.cpp. Llama.cpp has the considerably larger community, at 129,361 GitHub stars versus 48,815.
Why pick each one
Choose llama.cpp if…
- Runs on modest CPUs
- Broad hardware support
- Pioneered GGUF quantization
Watch out for
- Command-line focused
- Frequent breaking changes
Choose New API if…
- OpenAI-compatible gateway
- Broad provider support
- Built-in billing and quotas
Watch out for
- Docs primarily Chinese
- Niche relay use case
Frequently asked questions
Is llama.cpp or New API better?
Neither is universally better. llama.cpp has the larger community, while New API is simpler to set up (medium difficulty). Choose based on the comparison table above and your own setup.
Are llama.cpp and New API free and open-source?
Yes. llama.cpp is licensed under MIT and New API under MIT. Both can be self-hosted at no software cost.
Can I run llama.cpp and New API with Docker?
llama.cpp: yes. New API: yes.
Which is lighter on resources, llama.cpp or New API?
New API has the smaller minimum footprint at 512 MB of RAM, compared to about 8,192 MB for llama.cpp. Real-world usage depends on library size, user count, and enabled features.