Skip to content
BYOK Tools

llama-swap

Proxy that swaps local models on demand behind one OpenAI-compatible endpoint.

4.2 editor score•Local AI•Free & open source•Verified 22 Nov 2026

Best for

People who want to run models on their own hardware, especially if you want to keep your key on your own device and self-host.

Skip it if

You use a provider other than OpenAI-compatible.

Rank in Local AI

12th of 28 by editor score

Key Safety

92/100 (grade A), safer than 44% of its category

Overview

llama-swap sits in front of llama.cpp, vLLM or other local servers and starts the right model when a request names it, unloading others to free memory. Apps see one OpenAI-compatible endpoint with many models.

Key features

  • On-demand model swapping
  • Works with any OpenAI-compatible server
  • Model groups
  • Web UI and logs

Works with these providers

1 provider option. Usage is billed by the provider at its list price.

Our verdict

llama-swap is ranked 12th of 28 local AI on BYOK Tools and sits mid-pack on key safety. Its standout strength: makes many local models practical on one GPU. The main trade-off: config file setup.

What we like

  • Makes many local models practical on one GPU

Watch out for

  • Config file setup

How llama-swap compares

Against the highest-rated local AI on BYOK Tools. Scores are out of 5 (editor) and 100 (Key Safety).

llama-swap compared with other local AI
ToolEditor scoreKey SafetyPricingProvidersOpen sourceLocal modelsKey stays local
llama-swap4.292Open source1
Ollama4.892Open source1
llama.cpp4.792Open source1
LM Studio4.760Free1–
vLLM4.792Open source1
  • Prioritising key safety? Jan scores 93/100.

How to use llama-swap with your own API key

  1. 1

    Create an API key

    llama-swap works with local or self-hosted endpoints, so you may not need a cloud key at all.

  2. 2

    Set a spending limit

    Set a monthly budget or usage cap in the provider dashboard before you start. It is the simplest protection against a leaked key or a runaway agent.

  3. 3

    Install llama-swap

    Install llama-swap from the command line using the instructions in its repository or docs.

  4. 4

    Add your key

    Paste the key into llama-swap's provider or model settings. Your key is stored on your device and requests go directly to the provider.

  5. 5

    Optional: add a local model

    Install Ollama or LM Studio and point llama-swap at its local endpoint for private, offline work with no per-token cost.

BYOK Key Safety Score

Key handling in llama-swap

How we score
92/ 100

Grade A

Your key is stored on your device and requests go directly to the provider.

Category average: 87/100

  • Key storage

    Key stays on your device; requests go direct to the provider.

    40/40
  • Auditable code

    Open source: anyone can verify how keys are handled.

    25/25
  • Self-hosting

    Can run entirely on your own infrastructure.

    15/15
  • Offline option

    Supports local models, so no key is needed at all for private work.

    10/10
  • Provider choice

    1 provider option, which lets you pick the provider whose data terms you trust.

    2/10

Whatever the score, give each app its own key, set a monthly spend limit with your provider, and revoke keys you no longer use. Read the key-safety checklist.

llama-swap FAQ

Does llama-swap support bring your own key?
Yes. llama-swap accepts your own API key from OpenAI-compatible. Usage is billed by the provider at its API rates.
Where does llama-swap store my API key?
On your device. Requests go directly from llama-swap to the provider. Its BYOK Tools Key Safety Score is 92/100.
Is llama-swap free?
Open source: Free & open source. API usage is billed separately by your model provider.
How much does it cost to use llama-swap with my own API key?
It depends on the model and how much you use it. Most people spend a few dollars a month on API usage; use the BYOK Tools cost calculator for an estimate. Local models cost nothing per token.
Is llama-swap open source?
Yes. The source code is at https://github.com/mostlygeek/llama-swap. It can also be self-hosted.
Can llama-swap run local models?
Yes. It can connect to local runtimes such as Ollama or LM Studio, so no API key is needed for private or offline use.
Which platforms does llama-swap support?
CLI, Linux, macOS, Windows, Self-hosted.
What are the best alternatives to llama-swap?
Popular alternatives include llama.cpp, Ollama, LocalAI and GPUStack. See the comparison table above for pricing, providers and key safety side by side.

Community reviews

No reviews yet.