---
title: "Preview a Paid Endpoint"
method: POST
path: "/preview"
tags: ["Discovery"]
---

# Preview a Paid Endpoint

`POST /preview`

## Request

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

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.

## Request body

- PreviewRequest
  - `endpoint` string, required: Paid endpoint path to preview, e.g. "/answer" (a leading slash is added if you omit it)
  - `url` string, uri: Fetch-backed endpoints only (/fetch/basic, /contents, /map): run a real truncated preview of this URL

## Response `200`

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

- PreviewResponse
  - `endpoint` string
  - `method` string
  - `price` string: Human-readable price, resolved from the same PRICING source as the 402 challenge
  - `currency` string
  - `summary` string: One line on what the paid call returns
  - `sample` object: Recorded example of the real response shape
  - `sampleType` 'recorded'
  - `live` object: Present only when a live preview ran: { url, title, content, truncatedAt, note } — or { error } if the fetch failed
  - `livePreviewAvailable` boolean: True only for endpoints with no paid upstream (currently /fetch/basic, /contents, /map)
  - `livePreviewHint` string
  - `docs` string
  - `schema` string: URL of the OpenAPI document
  - `previewedAt` string
  - `requestId` string

## Other responses

- `400`: Invalid body, or an unsafe/malformed url
- `404`: Unknown endpoint — it is not one of the paid endpoints. See /discovery for the catalogue.
- `429`: Rate limit exceeded (10/hour)

---

[API](https://skmtc.dev/weblens/apis/weblens-api.md) · [All operations](https://skmtc.dev/weblens/apis/weblens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/weblens/apis/weblens-api/revisions/63a7e81b6921?raw)
