api

api is a skill for Claude Code from mudler/LocalAI. It costs 47 tokens per session (1,359 once invoked), scanned A, original, MIT.

Instructions for calling a LocalAI server over HTTP, the standard way software sends requests across a network. LocalAI provides endpoints compatible with the OpenAI API for tasks such as chat, text completion, embeddings, images, and speech.

In plain words
What is it for?
Use them to check a LocalAI server, list its models, authenticate requests, and send chat, completion, response, embedding, image, speech, transcription, or reranking requests.
Why use it?
They provide the server address, readiness check, authentication rules, model lookup, and request paths needed to make calls safely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the localai plugin — 3 skills, 1 command shipped together

Good fit Use them to check a LocalAI server, list its models, authenticate requests, and send chat, completion, response, embedding, image, speech, transcription, or reranking requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mudler/localai/api
About the project

LocalAI is an inference server that runs language, vision, voice, image, and video models through compatible APIs on local hardware. It is used to operate models privately across different hardware, including CPU-only systems, and supports applications, agents, and multi-user services. The catalogue contains instructions for using LocalAI.

mudler/LocalAI · 50,617 stars · on GitHub · localai.io

Install

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.

Any agent
npx skills add mudler/LocalAI --skill api
Clone the repo
git clone --depth 1 https://github.com/mudler/LocalAI

Made for: Claude Code.

Or install localai, the plugin that ships this one along with the rest of its 3 skills, 1 command.

Wrote 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.

agentmods badge for api

README.md
[![agentmods](https://agentmods.dev/badge/skills/mudler/localai/api/github.svg)](https://agentmods.dev/skills/mudler/localai/api)
Your own site
<a href="https://agentmods.dev/skills/mudler/localai/api"><img src="https://agentmods.dev/badge/skills/mudler/localai/api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api

Your own site · 80×15
<a href="https://agentmods.dev/skills/mudler/localai/api"><img src="https://agentmods.dev/badge/skills/mudler/localai/api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,359 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01359
Opus 5.5 $0.00019 $0.00544
Sonnet 5.5 $0.00009 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 2d ago against content hash 795142b75df2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api 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 2d 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 -s -o /dev/null -w '%{http_code}\n' $LOCALAI/readyz
plugins/localai/skills/api/SKILL.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Call the LocalAI API

LocalAI serves an OpenAI-compatible API. A client made for the OpenAI API works when you point its base URL at the server and use a model name that the server has.

Full reference: https://localai.io/docs/api/ and the server's own page at /swagger/index.html.

Before you start

  1. Set the address. The default port is 8080.

    LOCALAI=http://localhost:8080
    
  2. If the server has API keys, send one with each request. Both headers work:

    -H "Authorization: Bearer $LOCALAI_API_KEY"
    -H "x-api-key: $LOCALAI_API_KEY"
    

    Never print the key or write it in a file.

  3. Check that the server is ready. 200 means ready.

    curl -s -o /dev/null -w '%{http_code}\n' $LOCALAI/readyz
    
  4. List the models. Use a name from this list. Never guess a name.

    curl -s $LOCALAI/v1/models -H "Authorization: Bearer $LOCALAI_API_KEY" | jq -r '.data[].id'
    

    No model, or not the right kind: install one first (skill localai:models).

OpenAI-compatible endpoints

Task Method and path
Chat POST /v1/chat/completions
Text completion POST /v1/completions
Responses API POST /v1/responses
Anthropic Messages API POST /v1/messages
Embeddings POST /v1/embeddings
Image from text POST /v1/images/generations
Text to speech POST /v1/audio/speech
Speech to text POST /v1/audio/transcriptions
Models GET /v1/models

Chat

curl -s $LOCALAI/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCALAI_API_KEY" \
  -d '{
    "model": "MODEL",
    "messages": [{"role": "user", "content": "Say hello in one word."}]
  }' | jq -r '.choices[0].message.content'

Add "stream": true to get server-sent events. Tools and function calling use the OpenAI tools field: https://localai.io/docs/api/openai-functions/

Embeddings

curl -s $LOCALAI/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{"model": "MODEL", "input": "The cat sat on the mat."}' \
  | jq '.data[0].embedding | length'

Read the full file on GitHub · 158 lines

Changes

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.

  1. 2d ago First seen · 158 lines · 47 tokens per session scan A 795142b75df2

Subscribe to this mod's changes

api is a skill published in the GitHub repository mudler/LocalAI (50,617 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 1,359 once invoked, about $0.0002 per session on Opus 5.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-11-28.

Related

api compared with skills from other repositories

api next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
apimudler/LocalAISkill51ktodayMITA47Claude Code
openrouterbobmatnyc/claude-mpm-skillsSkill794mo agoMITB32Claude Code
llm-integrationLuuOW/meridian-mcpSkill01mo agoMITA29Claude Code, Codex
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
serving-llms-vllmNousResearch/hermes-agentSkill267ktodayMITA27Claude Code, Codex
open-sourcebrowser-use/browser-useSkill122ktodayMITA101Claude Code
sglang-diffusion-performancesgl-project/sglangSkill39ktodayApache-2.0A29Claude Code, Codex