Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer token used for request authentication. Alternatively, you can send the API key in the x-api-key header. Note: A payment method is required to use the API.

Body

application/json

Request body for the Answer API.

messages
object[]
required

A list of messages comprising the conversation so far. User and assistant messages in chronological order for multi-turn conversations.

model
enum<string>
default:anthropic/claude-sonnet-4.6

The model to use for query decomposition and response synthesis.

Available options:
openai/gpt-6.1-sol,
openai/gpt-6.1-terra,
openai/gpt-6-astra,
openai/gpt-5.6-sol,
openai/gpt-5.6-terra,
openai/gpt-5.6-luna,
openai/gpt-5.4,
anthropic/claude-fable-5.1,
anthropic/claude-fable-5,
anthropic/claude-opus-5.5,
anthropic/claude-opus-5,
anthropic/claude-opus-4.8,
anthropic/claude-opus-4.6,
anthropic/claude-sonnet-5.5,
anthropic/claude-sonnet-5,
anthropic/claude-sonnet-4.6,
anthropic/claude-haiku-5.5,
anthropic/claude-haiku-4.5,
google/gemini-4-argon,
google/gemini-3.8-flash,
google/gemini-3.5-flash,
google/gemini-3.5-flash-lite,
google/gemini-3.1-pro-preview,
google/gemini-3.1-flash-lite,
google/gemini-3-flash-preview,
moonshotai/kimi-k3.1-pro,
moonshotai/kimi-k3,
minimax/minimax-m3.1-flash,
minimax/minimax-m3,
qwen/qwen3.6-plus,
deepseek/deepseek-v4.1-flash-1017,
deepseek/deepseek-v4-pro-0813,
deepseek/deepseek-v4-pro,
deepseek/deepseek-v4-flash-0731
mode
enum<string>
default:full

Controls the execution depth. queries_only: only decompose the message into sub-queries without performing searches; queries_and_search: decompose into sub-queries and return search results without LLM synthesis; full: decompose, search, and synthesize a final response using the LLM.

Available options:
queries_only,
queries_and_search,
full
max_queries
integer
default:30

Maximum number of sub-queries to generate.

Required range: 1 <= x <= 30
web_search_options
object

Search options. Shares the same parameters and defaults as the Web Search API. Queries are automatically generated from the messages.

stream
boolean
default:false

Whether to enable streaming output. When true, returns chat.completion.chunk objects incrementally with types: queries, search_done, content, finish, and usage.

Response

Successful Answer response. When stream=false, returns a single response object. When stream=true, returns a stream of chat.completion.chunk objects.

A non-streaming Answer response. Returned when stream=false.

request_id
string
required

The unique identifier for this request.

model
string
required

The model used for this completion.

choices
object[]
required

A list of completion choices containing the synthesized response.

queries
string[]

The list of sub-queries automatically generated from the user message by the system.

search_results
object[]

Search results grouped by query. Each sub-query has a corresponding result group.

references
object[]

All search results as one numbered list, in the same order as search_results.

meta
object

Metadata for the Answer response.

warning
string | null

Warning message, if any.