Skip to main content
API referencePrice comparison

Price Comparison API

GET/v1/prices

Public endpoint - no authentication required. Returns a price comparison matrix across all providers for every model in the marketplace.

The endpoint takes no parameters and always returns the full matrix. Filter client-side on models[].model.

Examples
curl $SURPLUS_BASE_URL/prices

Fields

Model Entry

  • modelstring
    Standard marketplace model name
  • displayNamestring
    Human-readable name
  • modelProviderstring
    Model creator (Anthropic, OpenAI, xAI, Google, etc.)
  • providersarray
    Reference-pricing entries for catalog-mapped providers with publishable pricing for this model (see Provider Entry)
  • mediaTypestring
    Media class for media-metered models (optional; text models omit it)
  • mediaPricingobject
    Per-unit media reference pricing (optional; present with mediaType; see Media Pricing)

Provider Entry

  • providerstring
    Provider key (e.g. openrouter)
  • providerNamestring
    Human-readable provider name
  • providerModelIdstring
    The model id as that provider names it
  • pricingobject
    That provider's price entry (see below)

Price Entry (providers[].pricing)

input, output, cacheRead, cacheWrite, and reasoning are in USD per 1M tokens. Other optional fields state their own unit below.

  • inputnumber
    Input/prompt token price
  • outputnumber
    Output/completion token price
  • cacheReadnumber
    Cache hit price (optional)
  • cacheWritenumber
    Cache creation price (optional)
  • reasoningnumber
    Thinking/reasoning token price (optional)
  • webSearchnumber
    Web-search price (optional) - USD per web-search request. Present only for providers that publish web-search pricing (currently openrouter, bedrock, and bankr); omitted elsewhere.
  • imagenumber
    Image/media price (optional). For vision text models without mediaUnit, this is USD per 1M image tokens; when mediaUnit is present, this is USD per that unit.
  • imageInputPerMpnumber
    Image-input price in USD per megapixel (optional)
  • imageOutputPerMpnumber
    Generated-image price in USD per output megapixel (optional)
  • mediaUnitstring
    Human-readable unit for image media pricing (optional), such as image, 1K characters, minute, 1M tokens, job, or megapixel

providers[] is ordered by pricing.output, ascending - the cheapest output price first. That ordering is a rough convenience, not a total cost ranking; compare entries yourself if you need a specific workload's cost.

Media Pricing (mediaPricing)

Media model rows use a separate mixed-unit pricing object. All fields are present as numbers; a value of 0 means that pricing dimension does not apply to the model.

  • perImageUsdnumber
    USD per generated image
  • per1kCharsUsdnumber
    USD per 1,000 characters
  • perMinuteUsdnumber
    USD per minute of media
  • per1MTokensUsdnumber
    USD per 1M tokens
  • inputPer1MUsdnumber
    USD per 1M input tokens
  • outputPer1MUsdnumber
    USD per 1M output tokens
  • outputPerMpUsdnumber
    USD per output megapixel
One model, many provider prices
provider-acheapest output$0.29 /1M out
provider-b$0.34 /1M out
provider-cbut may be cheaper on input$0.58 /1M out
The array is sorted by output price as a convenience. It is not a total-cost ranking - your actual cost depends on your input/output mix, so sort it yourself if that matters.

Caching

The response is cached for 5 minutes (Cache-Control: public, max-age=300). The updated_at field indicates when the response was generated - at most ~5 minutes before you received it.

Reference-Pricing Providers

The live providers array is the sorted set of provider keys that appear in at least one providers[] pricing row. A row is published only when the catalog maps the model to a recognized provider and a positive reference price is available.

This is reference-pricing coverage, not seller onboarding or marketplace liquidity. A listed provider may have no active seller offer, and an onboarded seller/provider may be absent. Do not use this array to infer current availability, offer count, or provider health; treat the live response as the source of truth for the current reference-pricing set.

Interactive Price Table

See the live price comparison API for the current machine-readable matrix. Treat that response as the source of truth for current provider rows and counts.