CLAUDE LABJP
SONNET5 — Claude Sonnet 5 is now the default model in Claude Code, with a native 1M-token context and promo pricing through Aug 31MCPTUNNEL — MCP tunnels arrives as a Research Preview, letting you reach MCP servers inside private networksIDP — Admins can now provision MCP connectors via their IdP (starting with Okta); Asana, Figma, Linear and more support managed authSANDBOX — Claude Managed Agents can now run tool execution in your own self-hosted sandbox instead of Anthropic's infrastructureFAST — Fast mode for Opus 4.7 is deprecated and will be removed on July 24; migrate to fast mode for Opus 4.8FIXES — Recent fixes cover public gateway endpoints, a confirm prompt for external git worktrees, and MCP request timeoutsSONNET5 — Claude Sonnet 5 is now the default model in Claude Code, with a native 1M-token context and promo pricing through Aug 31MCPTUNNEL — MCP tunnels arrives as a Research Preview, letting you reach MCP servers inside private networksIDP — Admins can now provision MCP connectors via their IdP (starting with Okta); Asana, Figma, Linear and more support managed authSANDBOX — Claude Managed Agents can now run tool execution in your own self-hosted sandbox instead of Anthropic's infrastructureFAST — Fast mode for Opus 4.7 is deprecated and will be removed on July 24; migrate to fast mode for Opus 4.8FIXES — Recent fixes cover public gateway endpoints, a confirm prompt for external git worktrees, and MCP request timeouts
Articles/API & SDK
API & SDK/2026-07-13Advanced

Full-Size or Downscaled? A Per-Image Resolution Rule for Opus 4.7's High-Resolution Vision

Opus 4.7 finally read the fine texture in my wallpapers, so I sent everything at full size. My weekly image tokens jumped 2.4x. Here is the preflight that decides resolution and model per image, with the measured savings.

Claude API115Vision3Cost Design2Indie Dev21Opus 4.7

Premium Article

When I moved the auto-tagging pipeline for my Dolice wallpaper apps over to Opus 4.7 — released in July 2026 with its stronger high-resolution vision — I could suddenly feel it picking up the fine stuff: the gradients in traditional Japanese patterns, the thin lines in ukiyo-e prints.

Delighted, I started sending every image through at full size. The next week I looked at the input-token bill and stopped. Accuracy really had improved, but the image-input tokens alone had swollen to roughly 2.4x the prior week.

"Just downscale everything" was not the answer either. Splitting landscape from portrait is fine at 512px, but the moment I needed to tell two near-duplicate wallpapers apart, or read small text inside a sample UI image, downscaling broke the result. What I needed was neither "shrink everything" nor "send everything full-size," but a rule that decides, per image, how much resolution that particular image actually demands.

Here is how I built that decision rule, and how much it cut my weekly cost.

Image tokens are set by area — downscaling tunes information, not just cost

The first thing worth internalizing: the tokens Claude bills for an image are driven almost entirely by pixel area. The documented estimate is:

input tokens ≈ (width px × height px) ÷ 750

Images whose long edge exceeds 1568px, or that exceed roughly 1.15M pixels, are downscaled by the API before processing. So past a certain size, sending full-size buys you no extra tokens billed — it just wastes upload bandwidth while the tokens flatten out.

Below are the approximate input tokens per resolution tier that I measured with count_tokens in my wallpaper pipeline. The formula is only an estimate, so in production I strongly recommend measuring with the count_tokens endpoint — it drifts by tens of tokens.

Long edge sentApprox. pixelsInput tokens (measured)Input cost per 10k images (Sonnet 5 intro $2/M)
384px~150k~200~$4.0
512px~260k~350~$7.0
768px~590k~790~$15.8
1024px~1.05M~1,400~$28.0
Near the cap (~1.15M px)~1.15M~1,540~$30.8

Building the table is what made it click for me: 384px versus 1024px is a 7x cost difference per 10k images. Sending everything full-size meant I was paying the most expensive row even to classify a landscape. Downscaling stopped feeling like a quality compromise and started feeling like what it is — dropping resolution down to the information the decision actually needs.

One trap: if you accidentally stuff an image into a text field as a base64 string, this area-based billing does not apply and you burn an order of magnitude more tokens. Everything here assumes you pass images as image blocks. I dug into that failure mode in saving tokens with tool-result image blocks.

Where downscaling helps, and where it breaks

Whether you can drop resolution depends on which grain of the image the task is reading. When I sorted my 30 wallpaper categories into "survives downscaling" and "doesn't," they split cleanly into two layers.

The labels that tolerate 512px were the ones looking at overall composition or theme. Landscape, portrait, abstract, seasonal — Opus 4.7 nails those even at 384–512px. In some cases downscaling actually stabilized the result by removing noise.

The labels that need full size were the ones where a fine difference decides the answer. Three cases in particular:

Kind of decisionWhat downscaling causesLong edge needed
Fine texture (patterns, gradients, grain effects)Texture collapses and gets mislabeled as "solid color"1024px+
Near-duplicate detection (two almost-identical images)The difference disappears; distinct images called "same"1024px+
Small text inside the image (sample UI, logos)Text becomes unreadable; content misreadNear the cap

Opus 4.7's high-resolution improvement pays off precisely in this lower layer. With the previous model, fine texture was shaky even at full size; with 4.7, hand it full resolution and it reads it reliably. Which is the whole point: pay for full size only on the images that benefit from high-resolution vision, and downscale the rest. That line is the backbone of the decision rule.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Image tokens scale with pixel area and flatten near a 1568px long edge and ~1.15M pixels — why you should measure with count_tokens instead of trusting the formula
Coarse labels survive downscaling; fine texture and small text need full size. Where downscaling quietly destroys accuracy
A two-stage ladder that classifies downscaled first and escalates to full-size plus Opus 4.7 only when needed, with working Python and a week of real numbers
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-07-10
Don't Trust the Confidence Score: Per-Class Calibration and Abstain Routing for Vision Classification
Overall accuracy looked fine while individual categories quietly collapsed. Here is how I calibrated Claude Vision's self-reported confidence per class and routed abstentions to a human queue.
API & SDK2026-07-12
When You Give an API Key an Expiration Date, Expiry Becomes a Plan Instead of an Accident
The Console now lets you set expiration dates on API keys. Here is how to fold planned expiry into unattended operations — with overlapping dual keys and a local expiry ledger — so your nightly jobs never go dark.
API & SDK2026-07-10
My Nightly Batch Was Quietly Running on a Bigger Model — Declaring Per-Task Model Ceilings and Enforcing Them
Scatter model names through your code and a cheap batch job will eventually run on an expensive model. Here is a manifest that declares a ceiling per task, a deny-by-default resolver, and a morning audit that catches drift — with working code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →