Anthropic's recently launched Files API consumed slightly more tokens than simply pasting documents into each request, according to a technical test published August 28 on The New Stack. The experiment, which compared three methods of feeding reference material to Claude Sonnet 5, found that uploading a file once and referencing it by ID cost 125 more input tokens across five requests than pasting the same document five times. All fifteen answers across the three testing approaches were accurate, but the feature that actually cut costs wasn't the Files API—it was prompt caching, which the tester added at the last minute.

The test used a fabricated 1,200-word API reference document for a fictional invoicing company and ran five developer questions through three scenarios. The first approach pasted the full reference into every request. The second uploaded the reference once via the Files API and cited its file ID in each subsequent request. The third pasted the reference into the system prompt with prompt caching turned on. Each question cost roughly 3,050 input tokens in both the pasting and Files API approaches, but the Files API added about 25 tokens of overhead per request. Prompt caching billed the document in full only once—as a 2,990-token cache write on the initial request—then read it from cache on the four following requests at about one-tenth the normal rate. Cache writes carry a 25 percent premium over standard input, making the first request the priciest, but subsequent requests cost only 48 to 63 regular input tokens each for the questions themselves. The cache expires after five minutes of inactivity, so the savings assume requests arrive steadily.

The tester wrote that the Files API and prompt caching address separate problems. The Files API manages documents by giving developers one uploaded copy referenced by ID, handles formats like PDFs and images that can't be pasted, and now supports expiration settings—but it doesn't change cost because the document is still processed for every request. Prompt caching, on the other hand, targets the expense of billing the same document repeatedly. In this workload, caching reduced billed input to roughly a third of pasting across five requests, and the gap widens with each additional request because the document is read at about a tenth of the normal rate after the first call. The tradeoffs for caching include the five-minute expiry window, which requires steady traffic, and restructuring the request to add a cache marker.

According to the report, the two features can be used together when both document management and cost reduction are priorities, since Files API documents can be cache-marked just like pasted text. Pasting still makes sense for prototyping and one-off calls, where uploading first adds an unnecessary step, and for documents that change with every request, where neither feature offers savings. The tester noted that this applies to short reference text, since documents under 1,024 tokens can't be cached on most models. Pasting also has the fewest moving parts—no upload step, no file IDs, no stored copies to track. The bottom line: the Files API ties pasting on cost, while prompt caching delivers the reduction the tester initially expected from file uploads. For teams running high-volume support bots or similar workloads with stable reference material, the economics favor caching over file management alone. The choice between convenience and cost savings now depends less on which feature to adopt and more on whether request volume justifies the caching setup.