A Claude Code skill: Ollama Cloud API reference for LLM agents.
Most LLMs were trained when Ollama was local-only — their knowledge cuts off before
Ollama offered cloud models (https://ollama.com). Agents therefore routinely write Ollama
code with wrong endpoints, wrong auth, or wrong model naming. This skill fixes that: a
compact, fact-checked reference an agent can read before writing or debugging code that
calls Ollama — especially Ollama Cloud.
skillama-api/
├── SKILL.md # core facts + quickstart (loaded into context on invoke)
├── LICENSE # MIT
├── logo.png
└── references/ # read on demand
├── native-api.md # /api/chat, /api/generate, /api/embed, NDJSON streaming,
│ # thinking (`think`, `message.thinking`), tool calling
├── compat-openai.md # OpenAI-compatible /v1 — supported/unsupported fields,
│ # reasoning-effort mapping, /v1/responses limits
├── compat-anthropic.md # /v1/messages — Bearer auth (NOT x-api-key), SSE events,
│ # supported/unsupported features
├── account-and-tools.md # /api/balance, /api/usage, /api/web_search, /api/web_fetch,
│ # error codes, rate limits
└── models.md # cloud model catalog: names, capabilities, typical use cases
- Cloud = direct HTTP to
https://ollama.com/{api,v1}withAuthorization: Bearer $OLLAMA_API_KEY— no local Ollama install, no pull step. Key: https://ollama.com/settings/keys - Three compatible APIs: native (
/api/...), OpenAI-style (/v1/chat/completions, …), Anthropic-style (/v1/messages). - Model naming differs by path: direct API →
gemma4:31b(names fromGET /api/tags); CLI/app via a signed-in local server →gemma4:cloud. - Anthropic SDK on cloud needs
auth_token(Bearer) —x-api-keyis not accepted. - Native endpoints stream NDJSON by default; disable with
"stream": false. - Structured outputs (JSON schema) are not supported on cloud — prompt for JSON instead.
- Errors: JSON
{"error": "..."}; 429 carriesRetry-After; mid-stream errors arrive as an NDJSON line without changing the HTTP status.
ln -sfn /path/to/skillama-api ~/.claude/skills/skillama-api
# or copy: cp -r skillama-api ~/.claude/skills/For a project instead of a user install: move it to <project>/.claude/skills/skillama-api.
Agents get the skill automatically (it triggers on Ollama-related coding tasks), or you can invoke it directly in Claude Code:
/skillama-api
Verified end-to-end (2026-11-07): a fresh agent invoked the skill, read
SKILL.md + 3 references, and wrote a working program against the live API —
see the demo program agent_test.py (in skillama-api-demo/ next to this repo)
for an example of what an agent produces from this skill alone.
The model list and docs drift. The skill instructs agents to:
- verify against https://docs.ollama.com (index: https://docs.ollama.com/llms.txt)
- fetch live model names via
GET https://ollama.com/api/tags - check usage/balance limits at https://ollama.com/pricing
MIT — see LICENSE.
Ollama is a trademark of Ollama Inc., and Claude is a trademark of Anthropic, PBC. This project is an independent reference created for developer convenience; it is not affiliated with, endorsed by, or connected to either company. Model documentation summarized here belongs to Ollama and links to the original pages are always given.
