Answer a question

by Exa

exa/answer

Answer a question from live web sources, with citations.

Billed per
call
Price
$0.01
Provider
Exa
Timeout
5 min

Overview

Accepts a question and returns a written answer grounded in pages found on the web, together with the citations it was built from. The model choice trades latency against depth. Supplying a JSON Schema turns the prose answer into a structured object matching that schema, which makes the endpoint usable as a typed extraction step, and a system prompt constrains tone, length, or format.

The answer, plus the citations behind it with their titles, URLs, and publication dates.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
querystringYesThe question to answer.
modelstringNoHow much research to do before answering.
textbooleanNoInclude the full page text of every citation.
outputSchemaobjectNoA JSON Schema; the answer comes back as an object matching it instead of prose.
systemPromptstringNoExtra instructions for how to answer.

Requests up to 1 MB.

Example

A call that works, with your own key.

curl https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"provider":"exa","endpoint":"answer","input":{"query":"What is an API gateway for agents?","model":"exa"}}'

Pricing

$0.01 per call on the default plan. Every run carries its price in the response.

Questions

Answer a question — AgentSky