---
title: "Grounded Answer"
method: POST
path: "/answer"
tags: ["Research"]
---

# Grounded Answer

`POST /answer`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/answer`
- Auth: API key in header `Payment-Signature`

Grounded answer with inline [n] citations: searches the web, fetches sources, and answers strictly from them. Price: $0.05.

## Request body

- object
  - `query` string, required: The question to answer
  - `sources` number: How many web sources to search, fetch, and cite

## Response `200`

A direct answer with inline [n] citations to real sources.

- object
  - `query` string
  - `answer` string: Answer text with inline [n] citation markers
  - `citations` object[]: Citation list with index, url, title
    - `index` integer
    - `url` string
    - `title` string
  - `confidence` number
  - `answeredAt` string
  - `requestId` string

## Other responses

- `400`: The body failed validation
- `402`: Payment required — x402 v2 protocol. Parse the PAYMENT-REQUIRED response header (base64-encoded JSON), sign the payment with your wallet, then retry the request with the Payment-Signature request header.

---

[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)
