Skip to main content
POST
Answers

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messages
UserMessage · object[]
required

The conversation so far. Exactly one user message is supported, e.g. [{"role": "user", "content": "Explain quantum computing"}].

Required array length: 1 element
model
enum<string>
default:brave-pro

Model ID used to generate the response.

Available options:
brave-pro,
brave
max_completion_tokens
integer | null
metadata
Metadata · object | null

Accepted for OpenAI SDK compatibility and currently ignored: the pairs are not stored or returned.

seed
integer | null

Accepted for OpenAI SDK compatibility and currently ignored: answers are not reproducible.

stream
boolean
default:true
web_search_options
WebSearchOptions · object | null
country
string
default:us
language
string
default:en
safesearch
string
default:moderate
enable_entities
boolean
default:false

Whether to include inline entity tags in the answer. Requires stream=true and is not supported in research mode.

enable_citations
boolean
default:false

Whether to include inline citation tags in the answer. Requires stream=true and is not supported in research mode.

enable_research
boolean
default:false

Whether to answer with iterative deep research instead of a single search. Requires stream=true.

research_allow_thinking
boolean
default:true

Accepted for compatibility. Ignored by the mixer engine behind this API, which always runs research with extended thinking off.

research_maximum_number_of_tokens_per_query
integer
default:8192

Maximum number of tokens to gather per research query.

Required range: 1024 <= x <= 16384
research_maximum_number_of_queries
integer
default:20

Maximum number of search queries research mode may issue in total.

Required range: 1 <= x <= 50
research_maximum_number_of_iterations
integer
default:4

Maximum number of research iterations.

Required range: 1 <= x <= 5
research_maximum_number_of_seconds
integer
default:180

Time budget for research, in seconds.

Required range: 1 <= x <= 300
research_maximum_number_of_results_per_query
integer
default:30

Maximum number of search results to consider per research query.

Required range: 1 <= x <= 60

Response

Successful Response

choices
ChoiceChunk · object[]
required
created
integer
required
id
string
required
model
enum<string>
default:brave-pro
Available options:
brave-pro,
brave
system_fingerprint
string | null
object
enum<string>
default:chat.completion.chunk
Available options:
chat.completion.chunk
Allowed value: "chat.completion.chunk"
usage
OpenAIUsage · object | null