Ed Grzetich Original Research 2026

Tokens Not Jokin'

Every time an AI coding tool reads your API docs, it costs tokens. But does the format of those docs matter? We ran 12,000 integration tests across 5 AI models to find out.

12,000 integration tests
5 AI models tested
5 doc formats compared

Your docs have two audiences now

Developers still read your API docs. But increasingly, AI coding tools read them first. Every token your documentation consumes is a token that can't be used for reasoning, code generation, or context about the user's project.

The question
How much?
Does format affect token cost? And if so, by how much?
Who's affected
Everyone
Any API whose docs are consumed by AI coding tools
What nobody's measuring
The cost of format
Teams measure doc readability and completeness. Almost nobody measures token efficiency or AI comprehension rates by format. This book changes that.

The questions we tested

Which documentation format is most token-efficient for AI consumption?
We tested 5 formats head-to-head. The results are in the book.
Does format affect AI code generation quality, or just cost?
We measured both. The answer has implications for how you build docs.
Do bigger AI models handle all formats equally?
We tested across model sizes from 7B to 200B+ parameters.
Can you serve both humans and AI from a single doc source?
The book includes a complete single-source, dual-output architecture.
How do you test your own docs for AI readiness?
Full testing toolkit and methodology included in the appendices.

Not opinions. Tests.

Built a clean test API

Every popular API is in LLM training data. Testing with Stripe's docs means you're measuring memorization, not comprehension. We built a custom API from scratch to eliminate contamination.

Same API, five formats

Identical information documented in five different formats. Same endpoints, same parameters, same constraints. The only variable is how it's structured.

Tested across model sizes

From 7B parameter models to 200B+. Format preferences change with model capability, and the patterns aren't what you'd predict.

Measured what matters

Token efficiency, code generation pass rates, error handling quality, and overall accuracy. Not just "does it work" but "how well, at what cost."

Research, framework, implementation

Part I

No Joke

The problem nobody's measuring. Why your doc format creates a hidden tax on every AI interaction with your API.

3 chapters
Part II

The Tests Don't Lie

12,000 integration tests. 5 formats. 5 models. The complete results, with data on token efficiency, code generation quality, and error handling.

5 chapters
Part III

Dead Serious

The decision framework. How to choose the right format for your team, test your own docs, and optimize without rewriting everything.

3 chapters
Part IV

The Build

Single source, dual output. Author once, generate docs for both humans and AI. Complete implementation with build pipeline.

3 chapters
Part V + Appendices

The Punchline

Where documentation is heading. Plus the complete testing toolkit, the BookClub API reference in all formats, and everything you need to reproduce the research yourself.

2 chapters + 3 appendices

See what your docs cost

Paste your API documentation and see the token cost in real time. The first step to understanding the problem.

// Paste any API documentation
// See what it costs AI tools to read

$ paste your docs above

Tokens: ???
Context window used: ???
Estimated annual cost: ???

// Now imagine that number could be significantly smaller.
// The book shows you how much, and why.
Try the Docs Cost Calculator →
Ed Grzetich

Independent researcher studying how API documentation format affects AI code generation. Building MCP servers that bridge REST APIs and conversational AI interfaces. 15+ years in technical documentation across defense (General Dynamics/NASA), fintech (Mastercard), and cloud computing (AWS). Presented "Making Data Conversational: Building MCP Servers as API Bridges" at AI in Fort Wayne.

Get the findings

Early access — in progress, free updates as chapters ship

Available on Leanpub. All formats: PDF, EPUB, and web. Buy now, get every future update free as new chapters publish.

Get the research updates

New findings, chapter releases, and documentation strategy insights. No spam, no fluff.