Back

Blog details

AI Writes 29% of New Code: What That Means for API Docs

AIOZ Network
6 min readAugust 11, 2026
aioz-streamexplainerdeveloper-apis
AI writes 29 percent of new code: what that means for API documentation

A 2026 study in Science found AI wrote an estimated 29% of new Python functions from US contributors by early 2025, up from 5% in 2022. For API docs, that means more of the code calling your API now starts with a tool reading your docs.

TL;DR:

  • A 2026 study in Science found AI wrote an estimated 29% of new Python functions from US contributors by early 2025, up from 5% in 2022.
  • Less experienced programmers use AI in 37% of their code, more than the 27% figure for experienced programmers, but the productivity gains go almost entirely to the experienced group.
  • The study measured Python on GitHub specifically, not "most software" broadly, worth keeping in mind before treating this as a universal claim.
  • As more code gets written with an AI assistant in the loop, docs formatted for a person scrolling a page are read less, and docs formatted for a model to load directly matter more.
  • This is the same reason behind AIOZ Stream's llms.txt files: machine-readable documentation is becoming a second audience, not a nice-to-have.

Updated Oct 28, 2026: shorter opening, the study's country figures, a labelled chart, question-style headings, and the current llms.txt files and assistant instructions from the AIOZ Stream docs.

What did the study measure?

Researchers Simone Daniotti, Johannes Wachs, Xiangnan Feng and Frank Neffke trained a classifier to spot AI-generated Python functions. They ran it across more than 30 million GitHub commits from roughly 170,000 developers and published the results in Science in early 2026.

That scope is narrow on purpose: Python, GitHub, and functions, not every language or every code host. It's a large, solid dataset, but it isn't a census of all software, and the study doesn't claim to be one. Keep that in mind before you quote the 29% figure as "a third of all code."

Bar charts from the 2026 Science study: share of new Python code written with coding assistants by country in early 2025, United States in 2022 versus early 2025, and by programmer experience level

The number that matters

By early 2025, an estimated 29% of new Python functions from US contributors were AI-generated, up from 5% in 2022. That is roughly a sixfold increase in three years. Other countries showed lower but rising shares over the same period. The Complexity Science Hub's summary lists France at 24%, Germany at 23%, India at 20%, Russia at 15% and China at 12% as of early 2025.

The direction isn't ambiguous, and coding tools have shipped a lot since the study's data window closed, so you should read 29% as a snapshot from early 2025, not as a ceiling.

Why do less experienced programmers benefit less?

The topline number isn't the most interesting part. Less experienced programmers use AI in 37% of their code, while experienced programmers use it in only 27%. You might expect that to close the skill gap, but it doesn't. The study found the productivity and exploration gains, such as working faster, trying unfamiliar libraries and taking on less routine tasks, came almost entirely from the experienced group.

That's an uncomfortable finding if you hoped AI assistants would level the field. A likely explanation is judgment. To get value from a generated suggestion, you need to tell when it's right, when it's subtly wrong, and when it answers a question you didn't ask. A beginner hasn't built that skill yet.

Here is a case you may recognize: a generated function calls an API in an unfamiliar order. If you're an experienced developer, you can often tell something's off from the shape of the code, even before you run it. A beginner has no such instinct, so a plausible but wrong suggestion looks just as convincing as a correct one.

What does this mean for API documentation?

Set the equity question aside and look at the mechanical fact underneath. A rising share of the code that touches any API was drafted by something reading the documentation, not by a developer reading it directly. That changes what good documentation means for you as an API provider.

Docs written for a person, with a sidebar, highlighted examples and a search box, are tuned for a reading experience a model never has. A model doesn't scroll, click through or benefit from visual hierarchy the way you do. What it needs is the operational detail: the exact auth pattern, the base URL and the order of operations, in a format that doesn't cost it much context to parse.

Why HTML docs are a worse fit for this than they used to be

None of this makes rendered HTML docs useless, and you should keep yours. People still read them, and they remain the canonical reference. But a browser-first doc site carries structure that only makes sense for a human: navigation, marketing copy, expandable sections and screenshots.

An AI assistant loading that page as context pays for all of it before it reaches the request shape, the field names and the sequencing. A flatter, plain-text format skips that cost, which is the reasoning behind the llms.txt convention.

What this doesn't mean

It's easy to round "29% of new Python functions on GitHub" up to "AI writes most software now," and the study doesn't say that. It covers one language, one code host and function-level generation, not whole applications or other languages.

It also doesn't mean you can trust generated code by default. The same checks apply as everywhere else in this series: confirm the order of operations, make sure a status gets polled rather than assumed, and test against the real API before you ship anything an assistant wrote. And a study of what got committed says nothing about how much of that code was later rewritten, heavily reviewed or reverted. Commit-level detection catches the moment code entered a repository, not the human correction around it.

How AIOZ Stream handles it

AIOZ Stream publishes plain-text versions of its API docs alongside the regular site, not instead of it. The LLM Docs page describes three kinds of file, all without HTML or MDX:

  • llms.txt: an index file following the llmstxt.org standard, with behavioral instructions for super intelligence assistants and links to each section file.
  • llms-full.txt: the complete reference in one file, for tools with large context windows.
  • Section files such as media-video.md and live-streaming.md: one per API area, 12 in total, with SDK method signatures, end-to-end examples and fallback fetch patterns.

You can pull the index or the full reference with the commands the docs give:

curl -o aioz-stream-llms.txt https://aiozstream.network/docs/llms.txt
curl -o aioz-stream-llms-full.txt https://aiozstream.network/docs/llms-full.txt

The index opens with a short list of rules for the assistant reading it. Among them: keep credentials in environment variables, create a media object before uploading the file, poll the video until its status is done before returning playback URLs, and create a stream key before a live session. Those are the same ordering mistakes that trip up generated code, written down where a coding tool will see them.

The docs page also shows how to attach the files in Claude, Cursor, ChatGPT and GitHub Copilot. For a tool that should call the API instead of only reading about it, see our post on AIOZ Stream's MCP server. To set up the files for your own editor, start with the AIOZ Stream LLM Docs page.

Frequently Asked Questions

Where does the 29% figure come from?
A 2026 study in Science by Daniotti, Wachs, Feng and Neffke, based on a classifier trained to detect AI-generated code across more than 30 million GitHub commits from about 170,000 developers.

Does this mean most software today is AI-written?
No. The study measured new Python functions on GitHub specifically, not software in general, and even within that scope the figure is under a third.

Why do less experienced programmers use AI more but benefit less?
The study found productivity and exploration gains are concentrated among experienced programmers, likely because judging whether a generated suggestion is correct takes experience beginners haven't built yet.

How does this connect to AIOZ Stream's llms.txt files?
As more code gets written with an AI assistant in the loop, documentation formatted for that assistant to load directly becomes more useful. That's the reasoning behind maintaining llms.txt alongside the standard docs.

Should I stop reading the regular API docs and rely on an AI assistant instead?
No. The regular docs remain the canonical reference. An AI assistant speeds up a first draft; checking it against the real docs and real API behavior is still on you.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

MPEG-TS vs fMP4 for HLS Segments and When to Use Each

MPEG-TS vs fMP4 for HLS: how 188-byte TS packets and fMP4 init segments differ, what each costs in overhead, which codecs need fMP4, and when TS still fits.

aioz-stream
7 min readNovember 17, 2026
blog thumbnail

Live Streaming vs VOD (Video on Demand) and When to Use Each

Live streaming vs VOD comes down to when your audience watches. Three questions help you pick live, on demand or both, with real costs and AIOZ Stream limits.

aioz-streamguide
6 min readNovember 13, 2026
blog thumbnail

How Does Live Streaming Work? From Encoder to Viewer

How does live streaming work? Video is captured, encoded, sent over RTMP, transcoded, cut into HLS segments and served to players. See each stage end to end.

aioz-streamguide
7 min readNovember 12, 2026
blog thumbnail

How Web Video Players Work: HTML5 Video, MSE and EME

How web video players work: the HTML5 video element plays media, MSE lets JavaScript feed it HLS and DASH segments, and EME unlocks DRM-protected streams.

aioz-streamguide
7 min readNovember 11, 2026
blog thumbnail

SRT vs VTT Subtitle Formats and When to Use Each One

SRT vs VTT explained: how the two subtitle formats differ in timestamps, headers and styling, which one browsers, HLS and YouTube expect, and how to convert.

aioz-stream
6 min readNovember 10, 2026
blog thumbnail

What Is Live to VOD? Saving a Livestream as a Video

Live to VOD records a livestream and turns it into an on-demand video viewers can replay. Here's how the conversion works and how AIOZ Stream saves a broadcast.

aioz-streamguide
6 min readNovember 06, 2026