An AI edit is priced in credits, and the obvious way to estimate a bill — credits per request, times requests — overstates it by orders of magnitude. What costs credits is the inference, and a page that shows the same cut-out to a million visitors runs the network once.

The rates

  • ai_crop, cropping around the subject rather than the centre: 1 credit.
  • ai_enhance, tone and colour correction: 1 credit. No network is involved, and it is priced as what it is.
  • ai_remove_bg, a cut-out into transparency: 5 credits.
  • ai_upscale: 5 credits per doubling, so 2x is 5 and 4x is 10.

A request is charged for everything it asks for, as one number. ?ai_crop=true&ai_remove_bg=true&ai_upscale=2x costs 11, and is either done in full or refused; it is never half-performed and half-charged.

A cache hit costs nothing

Every AI parameter is part of the cache key, because it changes the pixels. So the first request for a cut-out of sofa.jpg at 800 pixels wide runs the network, is charged, and stores the result. Every later request for that exact URL is a cache hit: no inference, and no credits. Charging for it would bill twice for one piece of work.

The consequence is the useful part. The credit cost of a page is the cost of its distinct renditions, not of its traffic. A thousand visitors or a million make no difference to the AI bill; a new width, a new crop or a new image does.

Working it out for a catalogue

Say a shop has 2,000 products and shows each one cut out on a white background, at the three widths its srcset offers. Each width is its own rendition, so each is its own inference:

2,000 products × 3 widths × 5 credits = 30,000 credits

That is spent as the renditions are first requested, and then the catalogue is served from cache. The same arithmetic says where the money goes when it changes:

  • A fourth width adds a quarter again — one new rendition per product.
  • A new product costs 15 credits, once.
  • A replaced photograph is a new original, so its renditions are made, and charged, again.

Fewer widths is the cheapest saving available, and it is usually free in quality too: the case for a short list is in the widths you actually need.

When a rendition is charged again

A cached rendition does not live for ever, so it is worth being exact about what happens when it expires. The node asks the origin whether the original has changed. If it has not — a 304, which is what an unchanged image almost always gets — the rendition it already holds is served again, with no inference and no charge. Credits are spent again only when the original has changed, or when the rendition is no longer held anywhere and has to be made from scratch. An origin that sends neither an ETag nor a Last-Modified date cannot be asked, so its images are rebuilt on expiry; serve your originals with one or the other.

What happens at the limit

Past the month's allowance, new AI work is refused with a 402 rather than billed, so there is no surprise invoice. What has already been made keeps being served: an account out of credits still gets every AI rendition the cache holds, and only a request that would run the network again is refused. Images without AI parameters are unaffected either way. The allowance starts again with the calendar month.

The add-ons and their monthly credits are on the pricing section of the home page. Results are automated, so look at a cut-out or a crop before you put it in front of customers: a crop can miss the subject, and a cut-out can have rough edges.