APILocal AI

Run a Local OpenAI-Compatible API Server for Any App

Serve local models through an OpenAI-compatible API with Ollama, LM Studio, llama-server or KoboldCpp, and connect chat apps, coding tools and scripts.

By the Uncensored AI Model Hub editorial team· Updated · 3 min read

An OpenAI-compatible API turns your local model into a drop-in replacement for hosted chat in thousands of apps.

Pick a server

Runner Start Base URL
Ollama Runs in the background http://localhost:11434/v1
LM Studio Developer tab, start server http://localhost:1234/v1
llama-server llama-server -m model.gguf http://localhost:8080/v1
KoboldCpp Launch with a model http://localhost:5001/v1

Test it

curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3:8b","messages":[{"role":"user","content":"Hello"}]}'

Connect apps

In any app with “OpenAI-compatible” or “custom endpoint” settings:

  1. Set the base URL from the table.
  2. Enter any API key.
  3. Choose the model name the server lists.

This works for Open WebUI, SillyTavern, coding assistants and the official OpenAI SDKs.

Settings that matter

Set context length on the server side; see the context length calculator. System prompts can be sent per request; draft one with the uncensored system prompt builder.

Security

Keep servers on localhost. See local LLM privacy.

Choosing a runner

Ollama vs LM Studio and llama.cpp vs Ollama.

Common questions

What base URL do I use for Ollama?

http://localhost:11434/v1 for the OpenAI-compatible API.

Do I need an API key?

Local servers usually ignore it, but many apps require a value, so enter any placeholder text.

Can I use it from another device?

Yes, by binding to your network address. Only do this on a trusted network and add authentication or a reverse proxy.

Related reading

Browse more: all guides · comparisons · glossary · free tools

Find your model in minutes.

Search the directory, check the licence and hardware, and start running uncensored AI models today.