New API vs Petals

A side-by-side comparison of two self-hosted local llm runners options — licensing, setup difficulty, resource needs, and what each one replaces.

Not the right match-up?
FeatureNew APIPetals
Deploy effortUnder-an-hour setupUnder-an-hour setup
Health score100 · Excellent24 · At risk
CategoryLocal LLM RunnersLocal LLM Runners
LicenseMITMIT
LanguageGoPython
Setup difficultyMediumHard
Min. RAM512 MB8,192 MB
Deploymentdockersource, docker
GitHub stars★ 48,815★ 10,585
First released20242022
ReplacesOpenRouter, OpenAI APIOpenAI API

What are New API and Petals?

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

Petals

Petals lets you run and fine-tune large language models in a distributed, BitTorrent-style network where each participant hosts part of the model. It enables self-hosting models too large for a single machine.

  • Distributed model hosting
  • Run models larger than one GPU
  • Collaborative inference swarm
  • Fine-tuning support

New API vs Petals: key differences

New API is written in Go, while Petals is built with Python. New API is the lighter option, starting around 512 MB of RAM against 8,192 MB for Petals. Petals is the more established project (first released 2022), while New API arrived in 2024. New API has the considerably larger community, at 48,815 GitHub stars versus 10,585.

Why pick each one

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
New API details

Choose Petals if…

  • Released under the MIT license
  • First-class Docker support for quick deployment
  • Mature project with 10.6k GitHub stars
  • Written in Python
Petals details

Frequently asked questions

Is New API or Petals better?

New API is the stronger all-round pick: it has both the larger community and the simpler medium setup. Consider Petals if its specific feature set fits your needs better.

Are New API and Petals free and open-source?

Yes. New API is licensed under MIT and Petals under MIT. Both can be self-hosted at no software cost.

Can I run New API and Petals with Docker?

New API: yes. Petals: yes.

Which is lighter on resources, New API or Petals?

New API has the smaller minimum footprint at 512 MB of RAM, compared to about 8,192 MB for Petals. Real-world usage depends on library size, user count, and enabled features.

Related comparisons