{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "ggml-org-llama-cpp--serve-openai-compatible-local-api",
 "repo": "ggml-org/llama.cpp",
 "repo_url": "https://github.com/ggml-org/llama.cpp",
 "repo_slug": "ggml-org-llama-cpp",
 "title": "Serve a local model behind an OpenAI-compatible API",
 "page_title": "llama.cpp OpenAI compatible server: serve a local model",
 "summary": "Start llama serve to give your apps an OpenAI-style endpoint and a built-in web UI.",
 "who": "A developer whose app uses the OpenAI SDK and who wants to test against a free local model.",
 "problem": "Paying for API calls during development adds up.",
 "outcome": "A local OpenAI-compatible server your existing code can point at.",
 "steps": [
  "Install llama.cpp",
  "Run `llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF`",
  "Open the built-in web UI to test",
  "Point your OpenAI client base URL at the local server"
 ],
 "agent_prompt": "Start `llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF`, then send one chat completion from <app> to it. Confirm the response came from the local server, not a cloud API.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "Small models like the 0.8B example are fast but much weaker than hosted frontier models.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "c++",
 "requirements": [
  "macOS, Linux or Windows",
  "Enough RAM or VRAM for the chosen GGUF model"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ggml-org-llama-cpp/serve-openai-compatible-local-api/",
 "md": "https://dedupedai.com/use-cases/ggml-org-llama-cpp/serve-openai-compatible-local-api/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ggml-org-llama-cpp--serve-openai-compatible-local-api.json",
 "api_version": "v1"
}
