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:
anthropic/claude-fable-5,
anthropic/claude-opus-5,
anthropic/claude-opus-4.8,
anthropic/claude-opus-4.6,
anthropic/claude-sonnet-5,
anthropic/claude-sonnet-4.6,
anthropic/claude-haiku-4.5,
google/gemini-3.5-flash,
google/gemini-3.1-pro-preview,
google/gemini-3.1-flash-lite,
google/gemini-3-flash-preview,
openai/gpt-5.6-sol,
openai/gpt-5.5-pro,
openai/gpt-5.5,
openai/gpt-5.4,
moonshotai/kimi-k3,
moonshotai/kimi-k2.6,
moonshotai/kimi-k2.5,
minimax/minimax-m2.5,
qwen/qwen3.6-plus,
deepseek/deepseek-v4-pro,
deepseek/deepseek-v4-flash
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, except highlight.max_tokens defaults to 256. 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 chat.completion object with queries and search_results at the top level. When stream=true, returns a stream of chat.completion.chunk objects with types: queries (generated sub-queries), search_done (search results), content (incremental content), finish (completion signal), and usage (token usage).

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

request_id
string
required

The unique identifier for this request.

object
enum<string>
required

The object type, always chat.completion for non-streaming responses.

Available options:
chat.completion
created
number
required

Unix timestamp (in seconds) of when the completion was created.

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.

meta
object

Metadata for the Answer response.

warning
string | null

Warning message, if any.