Authentication
All requests require an API key in thex-api-key header:
Search Endpoint
POST /v1/search
Search the web and return matching documents.Request Body
Filter examples:
Response
Answer Endpoint
POST /v1/answer
Generate a direct, natural-language answer to a question, grounded in live web search results, with citations to the sources used.Request Body
With the pro tier:
Response
Theanswer field is markdown-formatted text, unless response_format requested structured output — then it is a JSON string matching your schema. Each citation’s content is populated only when include_content is true.
Error Responses
Errors return an HTTP status code and a JSON body carrying a stableerror.code to branch on:
/answer’s query and system_prompt, and how streaming errors differ.