Estimate the price of an operation

Returns the exact USD price this API would charge for an operation on an input of the given size, without fetching or processing anything. Free. Use it before paying: send X-Max-Cost-USD on the real request to have the API refuse (412) instead of charging more than you allowed. The list price is returned even when the request could end up free (free tier, or a compress that does not shrink the file).

post/v1/estimate

Request

  • Base URL: https://api.pictomancer.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.pictomancer.ai/v1/estimate
  • Auth: none declared

Request body

operationstring required

Operation to price. One of resize, compress, convert, crop, optimize_for_vision, optimize_generated, pipeline. analyze is always free.

input_bytesinteger required

Size of the input image in bytes. Get it from analyze_image (free) if you do not know it.

formatstring nullable

Requested output format; only avif changes the price.

quality_targetboolean

Whether the request will use quality_target (SSIM search surcharge).

Response

Successful Response

operationstring required

Operation that was priced.

price_usdnumber required

Exact list price in USD the API would charge.

base_usdnumber required

Base price of the operation(s) before multipliers and surcharges.

surcharges_usdobject required

Surcharges applied, keyed by name (avif, quality_target); empty when none.

size_multipliernumber required

Multiplier applied for the input size tier.

pipeline_discountnumber nullable required

Volume discount factor for pipelines of 3+ operations; null otherwise.

within_free_tierboolean required

Whether the caller is still within the free tier.

free_tier_remaininginteger required

Free-tier requests left for the caller.

currencystring required

Settlement currency.

networkstring required

Settlement network.

Changes

No recorded changes to this operation across all 1 revision of this API.