<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/kQVSWbzLa" -->

---
title: API pricing vs subscription: what my month of Codex...
description: A $100 ChatGPT Pro plan covered $745.16 worth of Codex usage priced at public API rates over 30 days. Without prompt caching, the same work would have cost...
canonical: https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: API pricing vs subscription: what my month of Codex would cost on the API | daily.dev
og:description: A $100 ChatGPT Pro plan covered $745.16 worth of Codex usage priced at public API rates over 30 days. Without prompt caching, the same work would have cost...
og:url: https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla
og:image: https://api.daily.dev/og/posts/kQVSWbzLa.png
og:image:alt: API pricing vs subscription: what my month of Codex would cost on the API
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API pricing vs subscription: what my month of Codex would cost on the API

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 12 min read · 7 upvotes · 4 comments

## Summary

A $100 ChatGPT Pro plan covered $745.16 worth of Codex usage priced at public API rates over 30 days. Without prompt caching, the same work would have cost $8,234.34, and 98% of the input was cached. The month included 11,899 model calls across 25 active days, with a median call sending 150,460 input tokens. Usage was uneven too: a median day cost $6.81 at API rates, while the busiest day cost $195.45. The post includes a Node.js script that reads Codex's local session logs and prices them at the rates listed in the post so others can run the same check.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/ai-subscription-vs-api-pricing>

## Questions this post answers

### Is it cheaper to use Codex through ChatGPT Pro or pay per token on the OpenAI API?

For heavy daily use, the subscription is far cheaper. One month of real Codex usage, 11,899 model calls across 25 active days, priced out to $745.16 at public API rates, well above the $100 ChatGPT Pro plan. Without prompt caching the same usage would have cost $8,234.34, since 98% of input tokens were cached.

_Weighing a coding agent subscription against API billing? daily.dev surfaces cost breakdowns like this as they're published._

### Why does prompt caching matter so much for AI coding agent API costs?

Prompt caching cuts the bill because every model call re-sends the full conversation, system prompt, and files read so far, often 150,000+ input tokens per call. OpenAI charges only 5% of normal input price for cached tokens. In one case, 98% of input was cached, cutting a GPT-6.1 Sol based month's cost from an uncached $8,234.34 down to $745.16.

_Developers estimating API spend for coding agents can track pricing mechanics like caching on daily.dev._

### What counts as a long-context surcharge on the GPT-6.1 Sol API pricing tier?

Requests sending more than 272,000 input tokens are billed at 2x the input rate and 1.5x the output rate on GPT-6.1 Sol. In one month of Codex usage, 2,024 calls exceeded that threshold, adding $111.41 to a $402.74 total for that model. Subscription usage through Codex itself carries no such long-context surcharge.

_Anyone budgeting for long-context AI coding sessions can keep tabs on pricing tiers like this via daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@nark3d** · 0 upvotes

> Caching changes the shape of the whole comparison: it's a bet on how you work.  Pick up a session the next morning and it may re-send the lot at full price.  The caching saving is real, but it depends on the pattern holding.  Nice to have the script so anyone can check their own split instead of guessing at it.

**@kartiknvj** · 0 upvotes

> My estimate of API cost was the naive one you call out, input tokens times the input price, which your numbers put 11x too high. Output being the smallest line at $46 of the $402.74 surprised me most. I keep coming back to the median call sending 150,460 input tokens off one typed line.

**@pdfopsdev** · 0 upvotes

> 98% cache hit rate is doing basically all the heavy lifting in that cost comparison. would love to see the same breakdown for someone running multiple parallel agent sessions, that tends to wreck cache reuse and the API bill gets a lot less flattering fast.

**@diyweb** · 0 upvotes

> The 98 percent cache hit rate is doing most of the work in that $745 versus $8,234 comparison, as the thread says. The saving is real, and it is also a bet on how you work: pick up a session the next morning and the same context may go back at full price. Parallel agent sessions tend to break cache reuse in the same way. The useful part of the post is the script, so anyone can measure their own split instead of guessing from the list price.

## Similar posts on daily.dev

- [Cheap AI tokens are running out](https://daily.dev/posts/cheap-ai-tokens-are-running-out-qoi8vhswo) · LeadDev · 1 upvotes · 0 comments
- [OpenAI’s new $100 tier targets developers hitting Codex \(and Claude Code\) limits](https://daily.dev/posts/openai-s-new-100-tier-targets-developers-hitting-codex-and-claude-code-limits-a63cw44kk) · The New Stack · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#llm](https://daily.dev/tags/llm), [#chatgpt](https://daily.dev/tags/chatgpt), [#ai-inference](https://daily.dev/tags/ai-inference), [#openai-codex](https://daily.dev/tags/openai-codex)

[View this post on daily.dev](https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"API pricing vs subscription: what my month of Codex would cost on the API","url":"https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla"},"datePublished":"2026-11-10T09:46:09.761Z","dateModified":"2026-11-10T09:46:43.469Z","description":"A $100 ChatGPT Pro plan covered $745.16 worth of Codex usage priced at public API rates over 30 days. Without prompt caching, the same work would have cost...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/292119a21e645e03cafcc8ffb6cc0596?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/292119a21e645e03cafcc8ffb6cc0596?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"ai-agents,llm,chatgpt,ai-inference,openai-codex","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"API pricing vs subscription: what my month of Codex would cost on the API"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla","comment":[{"@type":"Comment","text":"Caching changes the shape of the whole comparison: it’s a bet on how you work.  Pick up a session the next morning and it may re-send the lot at full price.  The caching saving is real, but it depends on the pattern holding.  Nice to have the script so anyone can check their own split instead of guessing at it.","datePublished":"2026-11-13T11:29:01.903Z","url":"https://daily.dev/posts/kQVSWbzLa#c-InleJY5Rh","author":{"@type":"Person","name":"Adam","url":"https://daily.dev/nark3d","image":"https://avatars.githubusercontent.com/u/2162621?v=4"}},{"@type":"Comment","text":"My estimate of API cost was the naive one you call out, input tokens times the input price, which your numbers put 11x too high. Output being the smallest line at $46 of the $402.74 surprised me most. I keep coming back to the median call sending 150,460 input tokens off one typed line.","datePublished":"2026-11-10T17:30:01.460Z","url":"https://daily.dev/posts/kQVSWbzLa#c-O4yizQwyt","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"}},{"@type":"Comment","text":"98% cache hit rate is doing basically all the heavy lifting in that cost comparison. would love to see the same breakdown for someone running multiple parallel agent sessions, that tends to wreck cache reuse and the API bill gets a lot less flattering fast.","datePublished":"2026-11-11T18:08:00.304Z","url":"https://daily.dev/posts/kQVSWbzLa#c-4Ro187xXq","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"}},{"@type":"Comment","text":"The 98 percent cache hit rate is doing most of the work in that $745 versus $8,234 comparison, as the thread says. The saving is real, and it is also a bet on how you work: pick up a session the next morning and the same context may go back at full price. Parallel agent sessions tend to break cache reuse in the same way. The useful part of the post is the script, so anyone can measure their own split instead of guessing from the list price.","datePublished":"2026-11-14T16:20:33.507Z","url":"https://daily.dev/posts/kQVSWbzLa#c-UqCLTXpAA","author":{"@type":"Person","name":"DiyWeb","url":"https://daily.dev/diyweb","image":"https://media.daily.dev/image/upload/s--dgS6jDeN--/f_auto/v1790879420/avatars/avatar_774zDwMaRTNS1fv5OKStX?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/api-pricing-vs-subscription-what-my-month-of-codex-would-cost-on-the-api-kqvswbzla#faq","mainEntity":[{"@type":"Question","name":"Is it cheaper to use Codex through ChatGPT Pro or pay per token on the OpenAI API?","acceptedAnswer":{"@type":"Answer","text":"For heavy daily use, the subscription is far cheaper. One month of real Codex usage, 11,899 model calls across 25 active days, priced out to $745.16 at public API rates, well above the $100 ChatGPT Pro plan. Without prompt caching the same usage would have cost $8,234.34, since 98% of input tokens were cached. Weighing a coding agent subscription against API billing? daily.dev surfaces cost breakdowns like this as they're published."}},{"@type":"Question","name":"Why does prompt caching matter so much for AI coding agent API costs?","acceptedAnswer":{"@type":"Answer","text":"Prompt caching cuts the bill because every model call re-sends the full conversation, system prompt, and files read so far, often 150,000+ input tokens per call. OpenAI charges only 5% of normal input price for cached tokens. In one case, 98% of input was cached, cutting a GPT-6.1 Sol based month's cost from an uncached $8,234.34 down to $745.16. Developers estimating API spend for coding agents can track pricing mechanics like caching on daily.dev."}},{"@type":"Question","name":"What counts as a long-context surcharge on the GPT-6.1 Sol API pricing tier?","acceptedAnswer":{"@type":"Answer","text":"Requests sending more than 272,000 input tokens are billed at 2x the input rate and 1.5x the output rate on GPT-6.1 Sol. In one month of Codex usage, 2,024 calls exceeded that threshold, adding $111.41 to a $402.74 total for that model. Subscription usage through Codex itself carries no such long-context surcharge. Anyone budgeting for long-context AI coding sessions can keep tabs on pricing tiers like this via daily.dev."}}]}
```

