DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to call the local model from scripts over HTTP with Lithos Metal

Send chat requests to the local server from your own code, with optional streaming.

Who it is forA developer building a script or small app that needs LLM text generation on their own Mac.

The problemThe developer wants to call a model from code without a cloud account, and needs a predictable HTTP endpoint for it.

The outcomeA script that gets a completion from the local model through the Chat Completions endpoint, streaming or not.

What you need first

  • An Apple silicon Mac running macOS 26 or later
  • Enough unified memory for the target model, draft model, and context (the README tests Qwen models on a 40-core M5 Max with 48 GB)
  • Homebrew, or Xcode Command Line Tools and Python 3.12 for a source build
  • Client tools such as opencode, claude, codex, or hermes installed separately, if you use the launchers

Steps

  1. Install the package with brew install lithos-ai/tap/lithos-metal.
  2. Start the server with lithos-metal serve --model nvidia/Qwen3.8-27B-NVFP4.
  3. Send a chat request with curl http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"nvidia/Qwen3.8-27B-NVFP4","messages":[{"role":"user","content":"Explain how a GPU megakernel works."}],"max_completion_tokens":256,"stream":true}'. (inferred, check the README)
  4. Point your script's OpenAI-compatible client at http://127.0.0.1:8000 and use the same model name.

Prompt for your agent

Using the lithos-metal repo at https://github.com/lithos-ai/lithos-metal, with the server running via `lithos-metal serve --model nvidia/Qwen3.8-27B-NVFP4`, write a short script that sends <your prompt> to http://127.0.0.1:8000/v1/chat/completions and prints the reply. Expected output is the model's text reply. Verify the script receives an HTTP 200 response before reporting success.

Caveat. The README says Responses is stateless and tools run in the client, so the script must send the full conversation each time and handle tool calls itself.

Share: X LinkedIn Hacker News Email Copy link

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 [email protected] and we will look at it promptly. Full disclaimer page