# How Much Does Claude Code Cost? Real Session Costs by Model

DevFeed: [How Much Does Claude Code Cost? Real Session Costs by Model](<https://devfeed.tech/articles/how-much-does-claude-code-cost-real-session-costs-by-model-107657.md>)

Original publisher: [Read original article](<https://openrouter.ai/blog/insights/claude-code-cost/>)

Author: OpenRouter

Published: 2026-10-30T00:00:00Z

Content type: article

Language: en

Sources: [OpenRouter](<https://devfeed.tech/sources/openrouter.md>)

Topics: [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [Model Routing](<https://devfeed.tech/topics/model-routing.md>), [cost-optimization](<https://devfeed.tech/topics/cost-optimization.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [alternatives](<https://devfeed.tech/tags/alternatives.md>), [anthropic](<https://devfeed.tech/tags/anthropic.md>), [anthropic-claude-haiku-5-5](<https://devfeed.tech/tags/anthropic-claude-haiku-5-5.md>), [api](<https://devfeed.tech/tags/api.md>), [api-key](<https://devfeed.tech/tags/api-key.md>), [app](<https://devfeed.tech/tags/app.md>), [bill](<https://devfeed.tech/tags/bill.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [cost](<https://devfeed.tech/tags/cost.md>), [costs](<https://devfeed.tech/tags/costs.md>), [free](<https://devfeed.tech/tags/free.md>), [install](<https://devfeed.tech/tags/install.md>), [median](<https://devfeed.tech/tags/median.md>), [model](<https://devfeed.tech/tags/model.md>), [openrouter](<https://devfeed.tech/tags/openrouter.md>), [request](<https://devfeed.tech/tags/request.md>), [sessions](<https://devfeed.tech/tags/sessions.md>)

## AI overview

Claude Code is free to install; API-key users pay for the model it calls. OpenRouter's medians from real sessions in the 30 days to October 18, 2026, put a 2-9-turn session at $0.31 on Opus 5.5 and $0.16 on Sonnet 5.5; longer sessions cost more, and Sonnet is about half Opus at each length. The first request is often costliest because it writes the system prompt, tool definitions, and project context to the prompt cache; later turns read that cached context at a lower rate. In one empty-folder test, 17,047 cache-write tokens cost $0.085, while real projects can add context. The post recommends Sonnet as the default, Haiku for background jobs and sub-agents, shorter sessions or `/compact`, and API-key credit limits. It cautions that Claude Code's `total_cost_usd` may misprice OpenRouter models; the Activity page reflects actual charges. Other providers' models can be used through OpenRouter, but should be tested on your own tasks because Claude Code is built for Anthropic models.

## Source excerpt

Claude Code is free to install, and what you pay for is the model it calls. We publish the median cost of real Claude Code sessions on OpenRouter by model and session length. This post shows those costs, why the first request costs the most, what a month of use comes to, and how to lower the bill.