Research-backed calculator guide
AI Inpainting Cost per Image: Price Masked Repairs and Revisions
Estimate AI inpainting API pricing per image by separating the vendor meter, mask complexity, retries, acceptance yield, and monthly repair volume.
Quick answer
AI inpainting API pricing per image is not one universal number. A vendor may charge a flat operation fee, credits, API units, GPU runtime, megapixels, diffusion steps, or image tokens. The useful unit for a production budget is usually cost per accepted repair, not the headline price of one request.
Use this sequence:
- Record the provider's billed meter and unit, such as dollars per successful generation, credits per image, or seconds of active GPU time.
- Define one inpainting request. It normally includes an input image, a mask that marks editable pixels, and a prompt describing the replacement or repair. Stability's documentation describes those three inputs and says the mask controls inpainting strength by pixel. [2] [3]
- Measure acceptance yield: accepted outputs divided by submitted attempts. If 75 of 100 outputs pass review, the yield is 0.75 and the rework multiplier is 1 ÷ 0.75 = 1.3333.
- Divide the billed cost of expected attempts by the number of accepted images. Add storage, image transfer, moderation, human review, and engineering costs separately.
As checked on November 2, 2026, Stability AI documents one inpaint generation at 5 credits, and its pricing page says 1 credit equals $0.01. That is a $0.05 vendor charge per successful generation before taxes or surrounding workflow costs. [1] [2] Replicate's page for the Stability inpainting model displayed an approximate $0.0027 runtime cost per run, while warning that the amount varies with inputs. [4] Those figures are not a quality-adjusted comparison: they use different meters, models, and operating assumptions.
For a quick estimate, use:
cost per accepted repair = (vendor cost per attempt × expected attempts) ÷ accepted repairs
or, when yield is stable:
cost per accepted repair = vendor cost per attempt ÷ acceptance yield
The rest of this guide shows how to make that calculation auditable.
What counts as one inpainting image?
An inpainting image is an edit to an existing image where only a selected region is regenerated or replaced. The unchanged pixels remain context for the model. A mask can be a separate black-and-white image or an alpha channel. Stability's API reference specifies that a black mask means no inpainting strength and a white mask means maximum strength; it also supports an optional mask-growth setting to soften seams. [2]
That definition matters for pricing because “one image” can hide several different workloads:
- Small repair: a blemish, scratch, or tiny object. The provider may still charge the same flat operation fee as a large repair.
- Large replacement: a person, product, or background region. The API call may be one image, but it can demand more retries or a larger output size.
- Multiple candidates: one source image sent with four samples. A provider that charges per output can turn that request into four billable images.
- Revision loop: the first image is rejected, the mask is widened, or the prompt changes. Every new attempt belongs in the ledger.
The mask area is therefore a quality and rework driver even when it is not a direct billing dimension. Log it as a workload field rather than assuming that a flat per-image price captures the whole cost.
How providers meter inpainting cost
Flat credits or operation units
A credit model is easy to budget when the operation and success definition are clear. Stability's published price is 5 credits for a successful inpaint generation, with 1 credit equal to $0.01 on its pricing page. [1] [2] That makes the vendor charge $0.05 per successful generation at the checked rate. The word “successful” matters: a rejected output still consumes a successful generation if the API returns it, while failed requests can have different treatment depending on the provider's billing policy.
Runtime-based inference
Replicate describes its public-model billing as pay-as-you-go compute time for the active processing period. Its billing documentation says setup and idle time for public models is free, while deployments can incur setup, idle, and active instance time. [5] The inspected Stable Diffusion inpainting model page displayed approximately $0.0027 per run and said the estimate varies with inputs and uses an Nvidia A100 80 GB GPU. [4]
Treat that number as a dated vendor estimate, not a guaranteed tariff. A change in model version, hardware, input settings, queue, or output behavior can change the effective charge. Record the page date and the exact model identifier whenever you import a runtime estimate into a budget.
Pixel, step, or output-dependent pricing
Some endpoints express the rate as a base amount plus a variable amount for megapixels or steps. That creates a different formula:
attempt cost = base charge + (output megapixels × steps × variable rate)
If your provider uses this meter, do not compare its base charge directly with a flat $0.05 operation. Normalize both to the same output dimensions, steps, number of candidates, and acceptance yield. If the vendor quotes credits rather than dollars, preserve both values in the ledger and write down the exchange assumption.
Image-token pricing
Some multimodal platforms present image-related pricing in tokens rather than a single inpainting operation. OpenAI's allowlisted pricing page lists image model input and output rates per 1 million tokens and points readers to an image-generation cost calculator. [6] That is not a direct inpainting-per-image quote. If you use an image-token model for masked editing, obtain the actual request's usage fields and calculate input-image, prompt, output-image, and cached-input components separately. Do not convert a token price into a per-image number without specifying image size, detail level, output size, and token counts.
Worked cost example
Assume a catalog team wants 1,000 accepted product-image repairs in one month. Each source image has one mask and one replacement prompt. The team reviews every result. Based on a pilot, 75% of submitted attempts are accepted on the first returned output. The target acceptance yield is therefore 0.75.
The team wants a transparent estimate, not a promise of visual quality. It compares two published vendor meters checked on November 2, 2026: Stability's 5 credits per successful inpaint and $0.01 per credit, and Replicate's displayed approximate $0.0027 per run for the inspected Stable Diffusion inpainting model. [1] [4]
| Step | Input or assumption | Stability example | Replicate example |
|---|---|---|---|
| 1. Accepted repairs needed | Monthly target | 1,000 images | 1,000 images |
| 2. Acceptance yield | Pilot assumption | 75% | 75% |
| 3. Expected attempts | 1,000 ÷ 0.75 | 1,333.33 runs | 1,333.33 runs |
| 4. Vendor meter per attempt | Dated published/observed figure | 5 credits × $0.01 = $0.05 | Approx. $0.0027/run |
| 5. Estimated API charge | Attempts × meter | $66.67 | About $3.60 |
| 6. API cost per accepted repair | API charge ÷ 1,000 | $0.0667 | About $0.0036 |
In a real invoice, round up to whole requests. That means 1,334 attempts rather than 1,333.33. The rounded Stability estimate is 1,334 × $0.05 = $66.70, and the rounded Replicate estimate is 1,334 × $0.0027 = $3.6018, or about $3.60 before any account, storage, transfer, or review charge.
These results do not say that Replicate is “cheaper” for the same job. The model pages describe different systems and different meters. They also do not include the team's review labor. If a reviewer spends 20 seconds per returned image and the batch produces 1,334 outputs, review time is 26,680 seconds, or about 7.41 hours. At an internal review rate of $30 per hour, review adds about $222.30. The Stability example's fully loaded accepted-repair cost would then be roughly ($66.70 + $222.30) ÷ 1,000 = $0.289 per accepted repair, before storage and engineering. This is an internal assumption, not a vendor quote.
Build a repair ledger that survives revisions
Create one row per attempt, not one row per source image. Useful fields include job_id, source_image_id, provider, model, request_id, mask_area_percent, input_dimensions, output_dimensions, candidate_count, vendor_unit, vendor_unit_price, attempt_cost, accepted, failure_reason, review_seconds, and created_at.
A row-level ledger prevents three common errors. First, it distinguishes an API failure from a valid but rejected image. Second, it shows whether the same source image was billed three times because the mask was revised. Third, it lets finance reconcile the model's usage report with the provider invoice.
For each batch, calculate four separate numbers:
- Attempt cost: the provider charge attributable to the request.
- Accepted-output cost: total attempt cost divided by accepted outputs.
- Rework rate: rejected or retried attempts divided by all attempts.
- Fully loaded cost: accepted-output cost plus review, storage, transfer, moderation, and engineering allocations.
Keep the vendor charge and internal cost in separate columns. A provider quote can change; your acceptance yield can change; and reviewer time can change. Combining them into one opaque “per image” number makes the budget look precise while hiding the actual drivers.
Use the Model pricing comparison route when you need to compare published model meters, then use the AI token cost calculator only for providers that expose token-based image usage. If your pipeline also calls text models for prompt rewriting, logging, or review, the LLM cost calculator can keep those token charges separate from the image-edit ledger.
What to ask before accepting a per-image quote
Ask whether “image” means a request, a successful generation, an output candidate, or a megapixel band. Ask whether a request with four candidates is four billable images. Ask whether failed moderation, invalid masks, timeouts, and client cancellations are charged. Ask whether the price changes by resolution, number of steps, model family, priority tier, region, or batch mode.
Also ask for the usage fields that appear on the invoice. A useful answer includes the model name, unit count, unit price, request or job identifier, and the period in which the charge was incurred. If the provider gives only a monthly credit balance, create your own request-level ledger before production.
Limitations and exclusions
The prices above are dated observations from vendor pages checked on November 2, 2026. They are not guarantees, quotes for your account, or a promise that two models deliver equivalent edits. Vendor pages can change, and runtime estimates can vary with model versions and inputs.
The example excludes VAT or sales tax, image upload and download bandwidth, object storage, CDN delivery, moderation, queue infrastructure, prompt-generation calls, human review, support plans, and the engineering cost of mask creation. It assumes one output candidate per attempt and a stable 75% acceptance yield. Replace those assumptions with measured production data.
The example also does not assume that a larger mask always costs more. Some providers charge a flat operation fee, while larger or more complex masks can increase the chance of rework. Measure that relationship in your own workload by storing mask-area bands and acceptance outcomes.
Run your scenario
Turn this framework into an editable estimate.
Use dated, source-linked assumptions and see cost per request, successful task and month.
FAQ
What is the cheapest AI inpainting API per image?
There is no defensible universal winner from a headline rate alone. The inspected pages use different billing units and models. A runtime estimate, a five-credit flat operation, and a token-based image charge are not directly interchangeable. Compare cost per accepted repair after holding output size, candidate count, acceptance yield, and workflow costs constant.
Does an inpainting API charge for the mask separately?
Often the mask is an input to the inpainting operation rather than a separate billable image, but billing rules vary. Stability's inpaint reference lists image, prompt, and optional mask as request fields and publishes a flat 5-credit successful generation rate. [2] That does not establish the billing policy for every provider. Confirm whether mask upload, preprocessing, or a mask-detection step is separately metered.
How do retries change cost per image?
Retries increase the denominator of billed attempts while the accepted-output target stays fixed. If the acceptance yield is 80%, multiply a one-attempt price by 1 ÷ 0.80 = 1.25 to estimate API cost per accepted repair. If a human revision changes the mask and prompt, record it as a new attempt. Do not hide it inside the original image's row.
Is “per image” the same as “per successful image”?
No. “Per image” may mean per request, per generated candidate, per successful API response, or per output image. Ask the vendor for the exact meter and failure treatment. In your own ledger, use separate fields for submitted, successful, accepted, and delivered images so those terms cannot be conflated.
Should I include review labor in an inpainting API price?
Yes, if the goal is a unit-economics or production budget. Keep it separate from the vendor API charge, but include it in the fully loaded cost per accepted repair. Review labor becomes material when the acceptance yield is low or when every output needs a manual decision. The worked example shows how a modest API charge can be smaller than review time.
Primary sources checked
Pricing and product behavior can change. These sources support the time-sensitive claims in this guide; verify current provider terms before committing spend.