open-context open-context
November 23, 2026 · 6 min read

Ollama vs. Cloud APIs: What AI Preference Analysis Costs

Running open-context's AI analysis through Ollama costs nothing per token — the price is local hardware, 5GB to 40GB of RAM or VRAM depending on which model you pick. Running the same two analysis calls through a hosted LLM API instead costs real, metered money, but at current published rates a single conversion runs about two cents on the cheapest model tier. For one person converting one ChatGPT export, the hosted API is actually cheaper in raw dollars. open-context defaults to Ollama anyway, because the real cost comparison isn't about a single run.

Key takeaways

  • open-context's analyzer makes exactly two AI calls per conversion — one for communication preferences, one for factual memory — each capped at 100,000 input tokens.
  • Ollama has no per-token charge. The cost is hardware: open-context's four documented models range from 5GB RAM (llama3:8b) up to 40GB (llama3:70b).
  • At current published Claude API rates, the same two calls cost roughly $0.02 on the cheapest model tier and roughly $0.40 on a mid-tier model — cheap for one run, but it scales linearly with every conversion.
  • Conversation text only ever leaves your machine if you enable AI analysis, and only to the Ollama host you configure — never to a third party by default.
  • The real tradeoff is sunk hardware cost and slower local inference versus recurring per-token billing with zero setup — not "free vs. paid."

What open-context's AI analysis actually calls

OllamaPreferenceAnalyzer makes two calls to ollama.generate(): analyzePreferences() and analyzeMemory(). Both build their prompt from the same prepareConversationText() helper, which sorts conversations chronologically and stops adding more once the text would exceed maxTokens (100,000, approximated as 400,000 characters). Each call is priced — in token terms — independently, so a full conversion with AI analysis enabled can send up to 100,000 input tokens twice: once for the preferences prompt, once for the memory prompt.

The two prompts ask for different things. buildAnalysisPrompt() asks for 2-3 paragraphs of natural-language communication style, written as the user speaking. buildMemoryPrompt() asks for three short sections — work context, personal context, top of mind — written in third person. Neither prompt asks for anything long, so the output tokens on both calls stay small relative to the input.

The Ollama side of the ledger: hardware, not tokens

Ollama never meters a token. Instead, the cost is whatever machine the model needs to sit on. open-context's README documents four supported models and what each one actually needs — see Ollama Model Sizes Explained for the full breakdown:

ModelRAM / VRAMSpeedQuality
llama3:8b5GBFastGood
gpt-oss:20b (default)13GBMediumHigh
qwen2.5:32b20GBMediumHigh
llama3:70b40GBSlowHighest

That RAM or VRAM is a one-time cost, or a sunk cost if you already own the hardware for other reasons. It doesn't change whether you convert one export or run the analyzer a thousand times. The tradeoff is inference speed — a 40GB model on a CPU-only machine can take minutes per call — and the fact that you're on the hook for keeping Ollama running and the model pulled.

The hosted-API side of the ledger: a worked example

open-context doesn't support a hosted LLM API today — its own FAQ is explicit that this isn't built yet — but pricing one out is a useful way to see where the money actually goes. Anthropic's published Claude API rates give real numbers to work with. At the cheapest current tier, input tokens run $0.10 per million (for prompts up to 100,000 tokens) and output tokens run $0.50 per million.

Two calls at the 100,000-token cap is 200,000 input tokens, or 0.2 million. At $0.10/MTok that's $0.02. The generated preferences and memory documents are short — a few hundred tokens each — so even a generous 2,000 combined output tokens adds only about $0.001 at $0.50/MTok. One full conversion: about two cents.

Swap in a mid-tier model instead — $2 per million input tokens, $10 per million output tokens at the same published rates — and the same run costs roughly $0.40 to $0.42. The per-conversion cost scales directly with which model you point the analyzer at, something Ollama's flat-hardware pricing doesn't do at all.

Where the real cost shows up

Two cents sounds trivial, and for one person running one conversion, it is. The cost stops being trivial in three places:

Batch conversions. Converting a folder of exports in a loop multiplies the hosted bill by every file — ten exports is twenty cents, a hundred is two dollars, on top of whatever model tier you picked. Ollama's hardware cost doesn't move at all.

Shared deployments. Run open-context's Docker image for a team and every conversion anyone triggers meters against the same API key. A local Ollama host behind the same container has a fixed hardware cost no matter how many people use it.

Iteration. Tuning buildAnalysisPrompt() or trying a different model means re-running the same conversations repeatedly during development. Each retry against a hosted API is billed; each retry against Ollama is free.

There's also a cost that isn't denominated in dollars. open-context's README is specific about this: conversation text only reaches an LLM when AI analysis is enabled, and only the Ollama host you configure ever sees it — never a third party. See Why open-context Uses Ollama Instead of a Hosted LLM API for the privacy side of that design. Routing the same calls through a hosted API means your raw chat history crosses someone else's network, in exchange for metered pricing instead of RAM.

Why open-context defaults to Ollama anyway

The default isn't about raw dollar cost for a single conversion — a hosted API usually wins that comparison. It's about the combination of zero marginal cost per run, data that never leaves infrastructure you control, and a batch or team workload where "times a hundred" matters more than "times one." The Docker image reaches a host-machine Ollama instance automatically through host.docker.internal:11434, which makes "point it at your own model" the path of least resistance rather than an afterthought.

When a hosted API would make more sense

If you're converting one export, once, on a machine with no spare RAM for a local model, the math favors a hosted API — a few cents beats downloading tens of gigabytes of model weights for a single run. open-context's own FAQ leaves the door open for this: Claude API support "may" come later, but isn't built today. Until then, --skip-preferences remains the actual zero-cost, zero-network option — it skips AI analysis entirely and produces a markdown conversion in seconds.

Convert your own chat history, locally, with or without AI analysis.

Get started with open-context →

FAQ

Does open-context support using the Claude API or another hosted LLM API instead of Ollama?

Not yet. open-context's own FAQ says Claude API support isn't built, though it may be added later. Today, AI-powered preference and memory analysis runs only through Ollama.

How many AI calls does one conversion actually make?

Exactly two — one to generate the preferences document, one to generate the memory document — each built from the same conversation text and each capped at 100,000 input tokens.

Is my conversation data ever sent anywhere besides my own Ollama instance?

No. Conversation text reaches an LLM only when AI analysis is enabled, and only the Ollama host you configure receives it. Running with --skip-preferences skips the network call entirely.

Does running a bigger Ollama model cost more money?

Not per token — Ollama doesn't meter usage. A bigger model costs more RAM or VRAM to load and more time per inference, which is a hardware and patience cost rather than a billing one.

Is a hosted LLM API actually more expensive than Ollama?

Per token, no — one conversion runs a few cents at current published rates. The cost difference shows up at scale: batch conversions, shared deployments, and repeated iteration all multiply a hosted bill linearly, while Ollama's hardware cost stays fixed regardless of how many times you run it.