Answer a question
exa/answerAnswer a question from live web sources, with citations.
- call
- $0.01
- Exa
- 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.
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | The question to answer. |
| model | string | No | How much research to do before answering. |
| text | boolean | No | Include the full page text of every citation. |
| outputSchema | object | No | A JSON Schema; the answer comes back as an object matching it instead of prose. |
| systemPrompt | string | No | Extra 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.
