Ask a question
Common options
Search and AI are billed separately - the
cost field breaks down both. Use data_max_price to cap search cost and fast_mode for lower latency.Streaming
Enable streaming to receive the answer progressively. The stream sends search results first, then content chunks, then metadata.search_results (sources, streamed first), content (partial answer text), metadata (final costs, tokens, full results), done, error.
Structured output
Pass a JSON schema instructured_output to get a parseable object back instead of prose:
Response format
structured_output, contents is a string. When you pass a structured_output schema, contents is instead a structured object matching that schema - in Python, check with isinstance(response.contents, dict).
Response fields
Response fields
Next steps
API reference
Complete parameter documentation
Python SDK
Python integration
TypeScript SDK
TypeScript integration
Integrations
LangChain, LlamaIndex, and more

