{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "yanun0323-whallm--script-local-model-via-openai-api",
 "repo": "yanun0323/Whallm",
 "repo_url": "https://github.com/yanun0323/Whallm",
 "repo_slug": "yanun0323-whallm",
 "title": "Call the local model from a script through its API",
 "page_title": "How to call the local model from a script through its API with Whallm",
 "summary": "Send requests from your own code to Whallm's OpenAI-compatible endpoint running on your Mac.",
 "who": "A developer or automation builder who wants a script or agent to call a local model instead of a hosted API.",
 "problem": "A script needs a model endpoint that is free of per-request hosting and keeps data on the local machine.",
 "outcome": "A script that lists available model IDs and sends a chat request to the local server, returning the model's answer.",
 "steps": [
  "Start Whallm and select Start Server in the Server page. The default address is http://127.0.0.1:11434.",
  "Request GET /v1/models from http://127.0.0.1:11434 to list the API model IDs.",
  "Use the model ID from that list in your script, not the display name, and set base_url to http://127.0.0.1:11434/v1.",
  "If you set an API key in Whallm, send the same key from your script; the README example uses no key."
 ],
 "agent_prompt": "In the yanun0323/Whallm repo, read the README sections on the API and Connect Codex, then write a short script that calls GET /v1/models at http://127.0.0.1:11434 and prints each API model ID. Run it against a running Whallm server, and verify that the printed IDs match the model ID table in docs/usage.md.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The server handles one request at a time with one loaded model, so concurrent requests from a script will queue, and the README says tool calls are executed by the client, not by Whallm.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Apple Silicon Mac running macOS 15 or later",
  "64 GiB memory recommended, with more disk space than the chosen model's files (Qwen models about 118 to 119 GiB, DeepSeek V4.1 above 458 GiB)",
  "Fast internal, Thunderbolt or USB4 SSD",
  "Network access to download the Whallm release and model weights"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/yanun0323-whallm/script-local-model-via-openai-api/",
 "md": "https://dedupedai.com/use-cases/yanun0323-whallm/script-local-model-via-openai-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/yanun0323-whallm--script-local-model-via-openai-api.json",
 "api_version": "v1"
}
