RepromptDocs

Get a fast, source-backed answer

POST
/ask

Retrieves web results and generates a concise single-hop answer. This endpoint is not intended for deep research.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
query*string

Natural-language web query.

Length1 <= length <= 1000

Response Body

A fast narrative answer with its normalized sources.

application/json
  1. response
query*string
answer*string

Fast narrative answer grounded in the provided sources.

sources*array<>
Example Request
curl -X POST 'https://api.repromptai.com/v1/ask' \  -H 'Content-Type: application/json' \  -d '{  "query": "What is the difference between a web search API and a research agent?"}'
Example Response
{  "query": "string",  "answer": "string",  "sources": [    {      "title": "string",      "url": "http://example.com",      "snippet": "string",      "position": 1,      "date": "string"    }  ]}