Discovery

Preview a Paid Endpoint

See what a paid endpoint costs and what it returns BEFORE paying. Free, rate limited to 10/hour per IP. Returns the live price (derived from the same PRICING source as the 402 challenge), a one-line summary, and a recorded sample of the exact response shape. A real, truncated LIVE preview runs only for endpoints whose marginal cost is a plain fetch (currently /fetch/basic, /contents, /map) and only when you pass a url; endpoints backed by a metered upstream (SerpAPI, Anthropic) never run live for free and return the recorded sample instead. Responds 404 for an endpoint that is not sold.

post/preview

Request

  • Base URL: https://api.weblens.dev
  • URL: https://api.weblens.dev/preview
  • Auth: none required

Request body

endpointstring required

Paid endpoint path to preview, e.g. "/answer" (a leading slash is added if you omit it)

urlstring uri

Fetch-backed endpoints only (/fetch/basic, /contents, /map): run a real truncated preview of this URL

Example request

{
  "endpoint": "/answer",
  "url": "https://example.com"
}

Response

Price, summary, recorded sample and (when available) a live truncated preview

endpointstring
methodstring
pricestring

Human-readable price, resolved from the same PRICING source as the 402 challenge

currencystring
summarystring

One line on what the paid call returns

sampleobject

Recorded example of the real response shape

sampleType'recorded'
liveobject

Present only when a live preview ran: { url, title, content, truncatedAt, note } — or { error } if the fetch failed

livePreviewAvailableboolean

True only for endpoints with no paid upstream (currently /fetch/basic, /contents, /map)

livePreviewHintstring
docsstring
schemastring

URL of the OpenAPI document

previewedAtstring
requestIdstring

Changes

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