{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "oobabooga-textgen--use-textgen-as-a-local-openai-compatible-api",
 "repo": "oobabooga/textgen",
 "repo_url": "https://github.com/oobabooga/textgen",
 "repo_slug": "oobabooga-textgen",
 "title": "Use your local model as an OpenAI-compatible API",
 "page_title": "How to use your local model as an OpenAI-compatible API with Textgen",
 "summary": "Start TextGen with --api and point existing OpenAI or Anthropic client code at it.",
 "who": "A developer who wants to test apps against a local model for free.",
 "problem": "API bills and rate limits slow down local development.",
 "outcome": "A local endpoint that speaks the OpenAI and Anthropic API formats, with tool calling.",
 "steps": [
  "Install TextGen with the portable venv steps",
  "Launch with `python server.py --portable --api --auto-launch`",
  "Point your OpenAI-compatible client at the local server",
  "Try tool-calling with a custom .py tool or an MCP server"
 ],
 "agent_prompt": "Start oobabooga/textgen with `python server.py --portable --api --auto-launch`, then change <my app> to use the local OpenAI-compatible API and run its tests.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "This card is written from the oobabooga/textgen README, not from a test run by Deduped. Before you start, make sure you have Windows, Linux or macOS. Check the repo for newer instructions before you rely on these steps.",
 "category": "Personal productivity",
 "tags": [
  "Personal productivity"
 ],
 "lang": "python",
 "requirements": [
  "Windows, Linux or macOS",
  "Python 3.9+ for the manual install, or a portable build",
  "A GGUF model file from Hugging Face and enough RAM or VRAM for it"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/oobabooga-textgen/use-textgen-as-a-local-openai-compatible-api/",
 "md": "https://dedupedai.com/use-cases/oobabooga-textgen/use-textgen-as-a-local-openai-compatible-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/oobabooga-textgen--use-textgen-as-a-local-openai-compatible-api.json",
 "api_version": "v1"
}
