Answer

Automatically decomposes user messages into multiple sub-queries, performs searches, and synthesizes results using an LLM.

post/answer

Request

  • Base URL: https://api.octen.ai
  • URL: https://api.octen.ai/answer
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Request body

model'openai/gpt-6.1-sol' | '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' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.5' | 'minimax/minimax-m2.5' | 'qwen/qwen3.6-plus' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-flash-0731'

The model to use for query decomposition and response synthesis.

mode'queries_only' | 'queries_and_search' | '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.

max_queriesinteger

Maximum number of sub-queries to generate.

streamboolean

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

Example request

{
  "web_search_options": {
    "include_domains": [
      "octen.ai",
      "wikipedia.org"
    ],
    "exclude_domains": [
      "spam.com",
      "ads.example.net"
    ],
    "start_time": "2025-01-01T00:00:00+08:00",
    "end_time": "2025-01-01T00:00:00+08:00",
    "language": [
      "en",
      "zh"
    ]
  }
}

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).

OR

Changes

No recorded changes to this operation across all 1 revision of this API.