search_context_size
parameter allows you to control how much search context is retrieved from the web during query resolution, letting you balance cost and comprehensiveness.search_context_size
is low
"high"
increases search costs due to more extensive web retrieval. Use "low"
when cost efficiency is critical.search_context_size
field—passed via the web_search_options
object—determines how much search context is retrieved by the Sonar models. This setting can help you optimize for either:
low
)high
)medium
)low
: Best for short factual queries or when operating under strict token cost constraints.medium
: The default and best suited for general use cases.high
: Use for deep research, exploratory questions, or when citations and evidence coverage are critical.low
or medium
can significantly reduce overall token usage, especially at scale.low
for high-volume endpoints and selectively upgrading to high
for complex user prompts.search_context_size
alongside other features like search_domain_filter
to further control the scope of search.medium
with a focused domain filter often gives a good tradeoff between quality and cost.low
when cost optimization is more important than answer completeness.
2. Comprehensive Search Context (“high”)
This option maximizes the amount of search context used to answer the question, resulting in more thorough and nuanced responses.
high
for research-heavy or nuanced queries where coverage matters more than cost.
⸻