liveBook · Manning

Cost

As explained in Build Applications with Local AI Models on a Mac

The monetary expense of operating an AI system, including service charges and local operating expenses.

Cost is the practical expense of using AI. A cloud service may charge a monthly subscription or bill an application for each use. Running a model locally avoids those service charges, but still requires hardware and electricity. section 14.3 section 14.3.1 section 16.5.6

For an API, count both input tokens—the content sent to the model—and output tokens—the content it generates. Multiply each count, in millions, by its own rate, then add the amounts. Check current prices: rates vary by model and service tier, and tool charges may add to the bill. section 16.5.6 section 14.3.1

The same token counts, different bills

At the listed standard rates, 1 million input tokens and 100,000 output tokens cost $7.50 with Claude Opus 4.5/4.6 or $0.42 with MiniMax M2.5. Equal token counts do not guarantee equal task quality or the same token usage on a real task. section 16.5.6

Cost matters especially for autonomous agents. One task can trigger dozens or hundreds of calls as an agent reasons, uses tools, and revises its plan. Measure actual token use and tool charges before choosing a hosted API or local model; also compare task quality, latency, hardware, and energy costs. A hybrid setup can keep everyday or sensitive tasks local and use cloud AI when greater capability is needed. section 16.5.6 section 14.6

Table 16.1 Approximate API token prices and local-deployment cost

Model

Input cost per 1M tokens

Output cost per 1M tokens

Type

Claude Opus 4.5/4.6

$5.00

$25.00

Proprietary

GPT-5.2

$1.75

$14.00

Proprietary

MiniMax M2.5 (API)

$0.30

$1.20

Open-source

Local deployment

Hardware and electricity

No API token fee

Self-hosted

Standard API rates checked September 8, 2026; cache, batch, priority, and tool charges are excluded. Local inference still incurs hardware and energy costs.

Compare separate input and output rates with local deployment’s hardware and electricity costs. These standard API rates were checked September 8, 2026; the table excludes cache, batch, priority, and tool charges. section 16.5.6

How Build Applications with Local AI Models on a Mac covers it

How deep it goes
Works through input- and output-token billing, then calls for measured usage and broader operating-cost comparisons.
Examples
Compares two bills for identical token counts and provides a table of API rates and local-deployment expenses.
What it assumes
Introduces input- and output-token billing through a simple multiplication example without requiring prior API-pricing knowledge.
What you can do after
Evaluate/understand it by estimating bills from measured tokens and tool charges, then comparing hosted and local operating costs.
How it connects
Connects cost to API pricing, autonomous agents, local inference, hardware, electricity, task quality, and latency.

Also explained in

Compare how 10 books explain cost →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Applications with Local AI Models on a Mac. The section links point to the parts of the book it draws on.