security. Anything that can reach the port can use the server; keep it on localhost unless you mean to share it.
Who it is forA developer who wants to test an LLM app against a local model instead of a paid API.
The problemSwitching an app from a hosted API to a local model usually means rewriting the client.
The outcomeYour app sending requests to http://localhost:5001/v1 and getting local completions.
What you need first
- The KoboldCpp executable for Windows, Linux or macOS from the latest release (no installation required)
- A GGUF text model downloaded separately, for example from Hugging Face
- Optional: a GPU for offloading layers; the model size and context length decide how much memory you need
Steps
- Start the server with a model, for example
./koboldcpp-linux-x64 --model /path/to/model.gguf - Use http://localhost:5001/v1 as the OpenAI-compatible API base in your app
- Open the interactive API documentation at http://localhost:5001/api to see the endpoints
- Set a custom
--portif 5001 is taken, and change the base URL to match
Prompt for your agent
With LostRuins/koboldcpp running <my GGUF model>, point <my app> at the OpenAI-compatible base http://localhost:5001/v1, send one chat request, and report the response and the endpoint used.
Caveat. Image, speech, embedding and music endpoints only work when the matching models are loaded.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for LostRuins/koboldcpp and "Point your apps at a local OpenAI-compatible API"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer