You're about to remove a field from an endpoint, or rename one in an event message. You aren't sure who reads it, so you ask your AI coding agent to search every service and tell you. It's a reasonable move. It also has a price, and on a 50 service codebase that price is paid in tokens, every time you ask.
We build Graphwake, which tells the teams that consume an API or an event when a change in its contract is about to break them. Graphwake isn't a coding assistant and never reads code: it works from your OpenAPI and AsyncAPI documents. Below is our estimate of what that scan costs with today's models, and what you get for the money.
Why one question reads so much
Your agent doesn't load the whole codebase at once. It searches, opens a file, follows a reference, opens three more. Every step sends the conversation so far back to the model, so the code it already read is billed again on each turn.
For an endpoint, the trail runs through controllers, generated clients, backends for frontends and gateway config. For an event message, it runs through the publisher, every consumer handler, and the topic or queue names, which usually live in config rather than code.
The assumptions
These are estimates, not measurements. Swap in your own numbers.
- Codebase: 50 services, about 20,000 lines each, about 10 tokens per line.
- Low case: the agent reads 2% of the code, the context is sent about 3 times across turns, and the answer is 5,000 output tokens.
- High case: it reads 5% of the code, the context is sent about 5 times, and the answer is 15,000 output tokens.
- Prices: standard list prices per million tokens on November 22, 2026. Where a provider charges more for long prompts and the code read passes that limit, all input in that question uses the higher rate (a simplification). Gemini 4 Carbon uses its price from December 1, 2026.
- Prompt caching: most coding tools cache the context they resend. The "With prompt caching" column bills the code once at full price and every resend at about 10% of the input price.
- Usage: 20 developers, 3 endpoint or event changes each per week, 1.5 questions per change, about 4.33 weeks a month. That's about 390 questions a month.
Table 1: the codebase
| Estimate | |
|---|---|
| Services | 50 |
| Lines of code (about 20,000 per service) | 1,000,000 |
| Tokens (about 10 per line) | 10,000,000 |
| Fits in one context window? | No, it's about 10x a 1M token window |
So the agent has to search and pick. It never sees the whole thing at once.
Table 2: one question (estimate)
| Model | Low | High | With prompt caching |
|---|---|---|---|
| Claude Opus 5.5 | $2.50 | $10.30 | $1.06 to $3.10 |
| Claude Haiku 5.5 | $0.31 | $1.29 | $0.13 to $0.39 |
| GPT-6.2 Astra | $5.00 | $40.90 | $2.12 to $12.10 |
| GPT-6 Luna | $0.06 | $0.51 | $0.03 to $0.15 |
| Gemini 4 Carbon | $2.50 | $10.30 | $1.06 to $3.10 |
| Gemini 3.1 Flash-Lite | $0.16 | $0.65 | $0.07 to $0.20 |
Low: 600,000 input and 5,000 output tokens. High: 2,500,000 input and 15,000 output tokens.
One question on a flagship model costs about $1 to $41, depending on the model and on caching. A small model costs cents. Neither number looks big on its own. The bill comes from asking again and again.
Table 3: one month, about 390 questions (estimate)
| Model | Low | High | With prompt caching |
|---|---|---|---|
| Claude Opus 5.5 | $974 | $4,014 | $413 to $1,208 |
| Claude Haiku 5.5 | $122 | $502 | $51.64 to $151 |
| GPT-6.2 Astra | $1,949 | $15,939 | $826 to $4,715 |
| GPT-6 Luna | $24.36 | $199 | $10.33 to $58.94 |
| Gemini 4 Carbon | $974 | $4,014 | $413 to $1,208 |
| Gemini 3.1 Flash-Lite | $61.38 | $252 | $26.30 to $76.97 |
With a flagship model, a team pays roughly $400 to $16,000 a month for this one kind of question. Small models bring that down to tens or hundreds of dollars. If price were the only problem, a small model would solve it. The bigger cost is what the scan doesn't give you. And if your company pays per seat instead of per token, the same tokens still count against your usage limits.
What the money doesn't buy
- A map. The scan leaves nothing behind. Next week's change starts from zero and you pay again.
- The same answer twice. Run the question again and the agent opens different files and may return a different list. "No usages found" isn't the same as "unused".
- The readers hidden in config. For events, topic names, subscriptions and serializers often sit in YAML, environment variables or infrastructure code. A code search finds the publisher and can miss readers.
- Code it can't open. Mobile apps, integrations built by other companies and other teams' repositories aren't in the scan. We wrote about that in Does your AI assistant know who uses your API?
- People. Even a perfect list of call sites doesn't say which team owns them or where to tell them.
How Graphwake handles this
Graphwake keeps the map so nobody has to rebuild it for every question. Each consumer team subscribes to the endpoints and messages it uses. Graphwake reads your OpenAPI specs, and your AsyncAPI documents for Kafka and Azure Service Bus, from CI or a URL. When a change is about to break someone, Graphwake tells only those teams, in Slack, Microsoft Teams or email. With the CI step, that happens while the change is still a pull request.
With Graphwake MCP, your own assistant (Claude Code, Cursor, GitHub Copilot and other clients that accept an API key) asks that map instead of scanning code. "Who consumes this endpoint?" is one tool call with a short answer. "What would my edited spec break?" sends only the OpenAPI file. Graphwake compares it with the live one and returns the breaking changes, the affected teams and the impact score. Nothing is stored and nobody is alerted.
Nothing gets reread, so the four hundredth question is as small as the first, and you get the same answer each time. The answer names the teams, not just files.
Example: your assistant asks the map instead of reading every service.
To be fair: if all your services live in one small repository and every caller is in it, a code search can be enough. The numbers above grow with the size of the codebase and with how often you ask.
Originally published on graphwake.com.
Have you ever checked what one "who uses this?" question costs your team in tokens?
About Graphwake. We build Graphwake, a dependency map for your APIs. It watches your OpenAPI specs, knows which teams consume each endpoint, and tells only those teams in Slack, Microsoft Teams or email when a change is about to break them. Start a 14-day free trial at graphwake.com

Top comments (0)