Hidden Image and File Costs: A Spending Walkthrough
You attach a screenshot or lecture handout and ask a short question. Before repeating that workflow across a semester or side project, check what the attachment adds to the bill. Start with one representative task, then work through the following steps to establish a useful spending baseline.
Start with the answer you actually need
Choose a narrow task, such as explaining one chart from a lecture handout. Write down what a satisfactory answer must include: the trend, the axis units, and one limitation. Keep that question unchanged throughout your tests so you can compare input choices rather than different assignments.
Next, identify the minimum evidence needed. Try the chart and its caption before submitting the entire handout. Keep the original available for checking context, but make the smaller version your first test rather than assuming every page deserves a place in the request.
Check how the attachment becomes model input
Do not use the attachment's download size as your token estimate. For Claude image inputs, token usage depends on image dimensions and processing rules. Making an image smaller in bytes is not necessarily the same as reducing its billable visual input. Check the selected model's current image documentation before predicting savings. ([platform.claude.com](https://platform.claude.com/docs/en/build-with-claude/vision))
PDFs deserve a separate check. Claude's PDF processing extracts text and also processes pages visually, so costs can include both text tokens and image tokens. A document that looks like ordinary reading material can therefore carry more input than its visible word count suggests. ([platform.claude.com](https://platform.claude.com/docs/en/build-with-claude/pdf-support))
Prepare a smaller version without losing evidence
Make a copy containing only the relevant pages. For a screenshot, crop unrelated windows, empty margins, and navigation panels. Keep axis labels, legends, footnotes, and any surrounding text needed to interpret the result. Treat these edits as experiments whose value you will measure, not guaranteed percentage savings.
If the question concerns wording rather than appearance, also prepare a text-only version. Compare its answer with the original document's answer before adopting it. Reject the text-only approach if it loses table relationships, equations, or visual evidence needed for your task.
Run one baseline and inspect the usage
Submit the original input once with your fixed question. Record the model, input tokens, output tokens, reported cost, and whether the answer meets your checklist. Then repeat with the smaller input. Where the provider supports token counting, use that estimate before sending a larger document; Claude's token-counting endpoint accepts images and PDFs. ([platform.claude.com](https://platform.claude.com/docs/en/build-with-claude/token-counting?trk=article-ssr-frontend-pulse_little-text-block&utm_source=openai))
MyRelay's per-request token and cost view gives you a practical place to inspect these trials. Compare the complete request charge, not just the attachment: retain the same answer requirements so an unexpectedly long response does not distort your comparison.
Test a follow-up before trusting file reuse
Now ask a second question about the same material. Check whether your client includes the attachment again, and inspect the resulting usage. File upload and inference are separate operations in Gemini's Files API; having a reusable file reference should not be treated as proof that subsequent analysis is free. ([ai.google.dev](https://ai.google.dev/gemini-api/docs/files))
Likewise, do not put assumed cache discounts into your budget. Gemini documents implicit caching savings when requests hit a cache, subject to eligibility requirements. Verify reported cached usage and actual charges before relying on those savings in a repeated workflow. ([ai.google.dev](https://ai.google.dev/gemini-api/docs/caching))
Turn the trial into a repeatable spending limit
Choose the least expensive tested input that still produces an acceptable answer. Multiply its measured request cost by your expected number of documents and questions. Add room for corrections, and set a limit on automatic retries before running a batch. Recheck a few results as you go rather than spending the whole allowance unattended.
Create a MyRelay account to track these experiments within one personal, pay-as-you-go budget. Keep a short record of the input version, answer quality, and observed cost. Your goal is not the smallest attachment at any price; it is a dependable answer with a cost you have actually measured.