Google Rebuilds Gemini API Docs to Cut Agent Parsing Costs by 70%
Google consolidated every Gemini API doc into AI Studio, with Markdown twins, an llms.txt index, and automatic agent-friendly delivery to cut token costs.
Takeaways
- All Gemini API docs now consolidated at aistudio.google.com/docs with full reference and OpenAPI spec.
- Every page available as Markdown by appending
.mdor via user-agent based content negotiation. - Index at
/llms.txt(~18k tokens) and full bundle at/llms-full.txt(~10.76 MB). - 57% of docs responses served as Markdown in first week, roughly 70% smaller than HTML.
- Gemini Docs MCP server available for live documentation search from Claude Code or Codex.
- Single publish pipeline updates HTML, Markdown, llms.txt, and internal knowledge API simultaneously.
Google has consolidated the Gemini API docs at aistudio.google.com/docs and redesigned their delivery for coding agents. Every documentation page now has a Markdown counterpart, supported by a machine-readable index at /llms.txt and a complete bundle at /llms-full.txt.
The new setup lets agents retrieve reference material without parsing navigation, scripts, and other page markup. Smaller responses consume less context and can reduce the cost and latency of repeated documentation lookups.
One URL, two formats
Request routing uses the client’s user-agent string. Browsers and Googlebot receive rendered HTML, while recognized command-line tools, SDKs, and agent clients receive Markdown from the same URL. Those clients do not need to add a .md suffix.
Each HTML page also advertises its Markdown version and the /llms.txt index through document metadata and HTTP response headers. An agent that receives HTML can therefore discover the machine-readable resources without inspecting the site’s navigation.
Automation that requires deterministic output can request the explicit .md URL. This avoids relying on user-agent detection when using a custom HTTP client.
Google reports in its rebuild write-up that Markdown and llms.txt accounted for 57% of responses during the site’s first full week. The company measured an average size reduction of roughly 70% compared with rendered pages.
Pick the right feed
| Resource | Size | Best use |
|---|---|---|
/llms.txt |
74 KB, about 18,000 tokens | Navigation and on-demand page discovery |
Individual .md pages |
Varies by page | Targeted context for an agent task |
/llms-full.txt |
10.76 MB in a test download | Local search, grep, embeddings, and retrieval indexes |
For most coding-agent workflows, /llms.txt should serve as the table of contents. The full bundle is too large for a typical model context window, but it provides a convenient source for local retrieval systems.
- Give the agent
/llms.txtas its documentation index. - Fetch individual Markdown pages when a task requires them.
- Download
/llms-full.txtfor local search or retrieval-augmented generation.
Reference, guides, and MCP together
Alongside the new delivery system, Google has consolidated material previously split between ai.google.dev and AI Studio. The site now places the API reference, OpenAPI specification, guides, pricing, and coding-agent setup instructions in one documentation tree.
A dedicated Gemini Docs MCP server provides live documentation search to MCP-compatible clients, including Claude Code and Codex. Developers can install it with npx add-mcp, then let supported agents query the documentation as an external tool. MCP, or Model Context Protocol, defines how an AI client can call tools and retrieve data from connected services.
Less parsing in every agent loop
Agent workflows often retrieve the same reference pages many times while generating, testing, and repairing code. Markdown removes page furniture from those requests, while the index and full bundle support two distinct retrieval strategies: selective fetching for live tasks and local indexing for broader search.
Documentation teams can reproduce the design with a single publishing pipeline that generates HTML and Markdown from the same source, exposes an llms.txt index, packages a complete corpus, and advertises alternate formats through page metadata and HTTP headers. Keeping those outputs in one pipeline also reduces the risk that human-readable and agent-readable documentation drift apart.