Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/blaizzy/mlx-vlm/server-inferencenpx skills add Blaizzy/mlx-vlm --skill server-inferencegit clone --depth 1 https://github.com/Blaizzy/mlx-vlmWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/blaizzy/mlx-vlm/server-inference)<a href="https://agentmods.dev/skills/blaizzy/mlx-vlm/server-inference"><img src="https://agentmods.dev/badge/skills/blaizzy/mlx-vlm/server-inference.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00080 | $0.00921 |
| Opus 5 | $0.00040 | $0.00461 |
| Sonnet 5 | $0.00016 | $0.00184 |
| Haiku 4.5 | $0.00008 | $0.00092 |
Grade A, and why
server-inference scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl http://127.0.0.1:8080/health How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Server Inference
Use this workflow for the FastAPI server and API-compatible inference.
First Checks
- Identify the server command, model, port, request endpoint, request body, and expected response.
- Start with health/model-list checks before debugging generation.
- Separate server startup failures from request-handling failures.
- Keep streaming and non-streaming repros separate.
Startup
uv run mlx_vlm.server \
--model <model-or-path> \
--port 8080
Useful startup flags include --adapter-path, --trust-remote-code, --log-level, --enable-thinking, --thinking-budget, --draft-model, --draft-kind, --kv-bits, --kv-quant-scheme, --max-kv-size, and --vision-cache-size.
Minimal Checks
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/v1/models
curl http://127.0.0.1:8080/metrics
Minimal chat request:
curl -s http://127.0.0.1:8080/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "<model-or-path>",
"messages": [{"role": "user", "content": "Say hello."}],
"max_tokens": 32,
"stream": false
}'
Minimal Responses API request:
curl -s http://127.0.0.1:8080/v1/responses \
-H 'Content-Type: application/json' \
-d '{
"model": "<model-or-path>",
"input": "Say hello.",
"max_output_tokens": 32
}'
Endpoint Surface (beyond chat/responses)
The server exposes more than chat — cover or route to these as needed:
- Anthropic Messages API:
/v1/messages, plus/v1/messages/countfor token counting. - Audio:
/v1/audio/speech(TTS),/v1/audio/transcriptionsand/v1/audio/translations(STT). - Images:
/v1/images/generationsand/v1/images/edits(diffusion image models). - Cache & metrics:
/v1/cache/stats,/v1/cache/reset,/v1/metrics. - Models:
/v1/modelslists models loaded by this process by default. Use--model-discovery hf-cachefor shared Hugging Face cache discovery — seeSkill("mlx-vlm-skills:hf-cache-models").
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 87 lines · 80 tokens per session scan A 93ce0a3a0013
server-inference is a skill published in the GitHub repository Blaizzy/mlx-vlm (5,466 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 921 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
mlx-model-porting
Guides and validates architecture-aware ports of PyTorch/Hugging Face models to Apple MLX, inspects existing local MLX projects, and plans evidence-gated optimizations for Apple Silicon. Use when the user asks to run, port, convert, inspect, quantize, benchmark, or fix a model (LLM, VLM, audio/TTS/ASR, diffusion, SSM…
annotating-variants
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST, VEP/SnpEff/ANNOVAR offline) and links variants to gnomAD population frequencies and the clinical context OpenMed extracts. Use when the user wants to predict variant consequences, map HGVS to genomic…
auditing-part11-trails
Generates and verifies 21 CFR Part 11-style audit trails — who/what/when, electronic signatures, and tamper-evidence — for OpenMed pipelines in GxP and clinical-trial (GCP) settings. Use when the user runs OpenMed in a regulated/validated environment and needs an attributable, time-stamped, tamper-evident record of…
batch-processing-clinical-text
Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a…
bridging-presidio-and-spacy
Combine OpenMed clinical NLP with Microsoft Presidio, spaCy, or LangChain through OpenMed's built-in interop adapter registry (openmed.interop). Covers the lazy adapter registry (availableadapters, getadapter, adapterspec), the presidio/spacy/langchain pip extras, and the verified callables — Presidio…
building-patient-timelines
Assemble a chronological patient timeline from OpenMed-extracted clinical events, normalizing dates and resolving relative time expressions on-device. Use when the user wants to build a patient timeline, order events from clinical notes, reconstruct a longitudinal history, plot a course of illness, or turn…