# Exa Answer - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/model-apis-exa-answer

# Exa Answer

POST

/

v3

/

exa

/

answer

Try it

Exa Answer

cURL

```
curl --request POST \
--url https://api.novita.ai/v3/exa/answer \
--header 'Authorization: &#x3C;authorization>' \
--header 'Content-Type: &#x3C;content-type>' \
--data '
{
"query": "&#x3C;string>",
"text": true,
"outputSchema": {},
"type": "&#x3C;string>",
"properties": {},
"required": [
"&#x3C;string>"
],
"items": {},
"additionalProperties": {}
}
'
```

```
import requestsurl = "https://api.novita.ai/v3/exa/answer"payload = { "query": "&#x3C;string>", "text": True, "outputSchema": {}, "type": "&#x3C;string>", "properties": {}, "required": ["&#x3C;string>"], "items": {}, "additionalProperties": {}}headers = { "Content-Type": "&#x3C;content-type>", "Authorization": "&#x3C;authorization>"}response = requests.post(url, json=payload, headers=headers)print(response.text)
```

```
const options = { method: 'POST', headers: {'Content-Type': '&#x3C;content-type>', Authorization: '&#x3C;authorization>'}, body: JSON.stringify({ query: '&#x3C;string>', text: true, outputSchema: {}, type: '&#x3C;string>', properties: {}, required: ['&#x3C;string>'], items: {}, additionalProperties: {} })};fetch('https://api.novita.ai/v3/exa/answer', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
```

```
&#x3C;?php$curl = curl_init();curl_setopt_array($curl, [ CURLOPT_URL => "https://api.novita.ai/v3/exa/answer", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'query' => '&#x3C;string>', 'text' => true, 'outputSchema' => [ ], 'type' => '&#x3C;string>', 'properties' => [ ], 'required' => [ '&#x3C;string>' ], 'items' => [ ], 'additionalProperties' => [ ] ]), CURLOPT_HTTPHEADER => [ "Authorization: &#x3C;authorization>", "Content-Type: &#x3C;content-type>" ],]);$response = curl_exec($curl);$err = curl_error($curl);curl_close($curl);if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
```

```
package mainimport (	"fmt"	"strings"	"net/http"	"io")func main() {	url := "https://api.novita.ai/v3/exa/answer"	payload := strings.NewReader("{\n \"query\": \"&#x3C;string>\",\n \"text\": true,\n \"outputSchema\": {},\n \"type\": \"&#x3C;string>\",\n \"properties\": {},\n \"required\": [\n \"&#x3C;string>\"\n ],\n \"items\": {},\n \"additionalProperties\": {}\n}")	req, _ := http.NewRequest("POST", url, payload)	req.Header.Add("Content-Type", "&#x3C;content-type>")	req.Header.Add("Authorization", "&#x3C;authorization>")	res, _ := http.DefaultClient.Do(req)	defer res.Body.Close()	body, _ := io.ReadAll(res.Body)	fmt.Println(string(body))}
```

```
HttpResponse&#x3C;String> response = Unirest.post("https://api.novita.ai/v3/exa/answer") .header("Content-Type", "&#x3C;content-type>") .header("Authorization", "&#x3C;authorization>") .body("{\n \"query\": \"&#x3C;string>\",\n \"text\": true,\n \"outputSchema\": {},\n \"type\": \"&#x3C;string>\",\n \"properties\": {},\n \"required\": [\n \"&#x3C;string>\"\n ],\n \"items\": {},\n \"additionalProperties\": {}\n}") .asString();
```

```
require 'uri'require 'net/http'url = URI("https://api.novita.ai/v3/exa/answer")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Post.new(url)request["Content-Type"] = '&#x3C;content-type>'request["Authorization"] = '&#x3C;authorization>'request.body = "{\n \"query\": \"&#x3C;string>\",\n \"text\": true,\n \"outputSchema\": {},\n \"type\": \"&#x3C;string>\",\n \"properties\": {},\n \"required\": [\n \"&#x3C;string>\"\n ],\n \"items\": {},\n \"additionalProperties\": {}\n}"response = http.request(request)puts response.read_body
```

200

```
{
"400": {},
"401": {},
"403": {},
"404": {},
"429": {},
"500": {},
"502": {},
"503": {},
"requestId": "&#x3C;string>",
"answer": {},
"citations": [
{}
],
"title": "&#x3C;string>",
"url": "&#x3C;string>",
"publishedDate": "&#x3C;string>",
"author": "&#x3C;string>",
"id": "&#x3C;string>",
"image": "&#x3C;string>",
"favicon": "&#x3C;string>",
"text": "&#x3C;string>"
}
```

Generate an answer to a question using Exa search results, with optional citations and source text. This is a passthrough to Exa’s Answer API, exposed through the Novita gateway with a platform route prefix.
To authenticate with your Novita API key, get one from the [Novita dashboard](https://novita.ai/settings/key-management). Base URL: `https://api.novita.ai`.

##

[​](#quickstart)

Quickstart

```
curl -X POST 'https://api.novita.ai/v3/exa/answer' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"query": "What is the latest valuation of SpaceX?"
}'
```

##

[​](#request-headers)

Request Headers

All endpoints require platform API authentication.

[​](#param-content-type)

Content-Type

string

required

Use `application/json`.

[​](#param-authorization)

Authorization

string

required

Platform API key, formatted as `Bearer <api_key>`.

##

[​](#request-body)

Request Body

[​](#param-query)

query

string

required

Natural-language question or instruction. Minimum length is 1.

[​](#param-text)

text

boolean

Whether to return source page text. Default is `false`.

[​](#param-output-schema)

outputSchema

object

JSON Schema Draft 7 object for structured answer output. See [Answer Output Schema](#answer-output-schema).

###

[​](#answer-output-schema)

Answer Output Schema

`outputSchema` accepts a JSON Schema object for structured answer output.

[​](#param-type)

type

string

JSON Schema root type, commonly `object`.

[​](#param-properties)

properties

object

Field definitions for the structured answer.

[​](#param-required)

required

string[]

Required property names.

[​](#param-items)

items

object

Array item schema when a property is an array.

[​](#param-additional-properties)

additionalProperties

boolean | object

Whether undeclared fields are allowed, or a schema for additional fields.

##

[​](#examples)

Examples

###

[​](#basic-answer)

Basic answer

```
curl -X POST 'https://api.novita.ai/v3/exa/answer' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"query": "What is the latest valuation of SpaceX?",
"text": true
}'
```

###

[​](#structured-answer)

Structured answer

```
curl -X POST 'https://api.novita.ai/v3/exa/answer' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"query": "What is the latest valuation of SpaceX?",
"outputSchema": {
"type": "object",
"properties": {
"valuation": {"type": "string"},
"asOfDate": {"type": "string"}
},
"required": ["valuation"]
}
}'
```

###

[​](#answer-with-source-text)

Answer with source text

Set `text: true` to return the full source text alongside each citation, useful when you want to display or re-verify the evidence.

```
curl -X POST 'https://api.novita.ai/v3/exa/answer' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"query": "What are the main causes of coral bleaching?",
"text": true
}'
```

###

[​](#list-shaped-structured-answer)

List-shaped structured answer

An `outputSchema` can return an array when you expect several items rather than a single fact.

```
curl -X POST 'https://api.novita.ai/v3/exa/answer' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"query": "Which countries border Switzerland?",
"outputSchema": {
"type": "object",
"properties": {
"countries": {
"type": "array",
"items": {"type": "string"}
}
},
"required": ["countries"]
}
}'
```

##

[​](#response)

Response

[​](#param-request-id)

requestId

string

Unique request identifier.

[​](#param-answer)

answer

string | object

Generated answer. It can be structured according to [Answer Output Schema](#answer-output-schema).

[​](#param-citations)

citations

object[]

Search results used to generate the answer.

###

[​](#citation-object)

Citation Object

[​](#param-title)

title

string

Source title.

[​](#param-url)

url

string

Source URL.

[​](#param-published-date)

publishedDate

string

Published date when available.

[​](#param-author)

author

string

Author when available.

[​](#param-id)

id

string

Exa document ID.

[​](#param-image)

image

string

Associated image URL.

[​](#param-favicon)

favicon

string

Site favicon URL.

[​](#param-text-1)

text

string

Source text when requested.

##

[​](#errors)

Errors

The platform may return standard HTTP errors before forwarding the request, and Exa may return upstream errors after forwarding.

[​](#param-400)

400

status

Invalid request body or unsupported parameter value.

[​](#param-401)

401

status

Missing or invalid API key.

[​](#param-403)

403

status

Access denied by platform or upstream provider.

[​](#param-404)

404

status

Route or requested resource not found.

[​](#param-429)

429

status

Rate limit exceeded.

[​](#param-500)

500

status

Internal server error.

[​](#param-502)

502

status

Upstream provider error.

[​](#param-503)

503

status

Service unavailable.

##

[​](#notes)

Notes

- All request bodies are JSON.

- Extra Exa parameters not listed here may be passed through.

- Response shapes can vary depending on request options.

- This document intentionally omits billing-related fields.

##

[​](#references)

References

For more details, see the [Exa Answer API reference](https://exa.ai/docs/reference/answer).

Last modified on July 15, 2026
