Plan Research Task
Estimates a research task without creating it. Returns the resolved retrieval depth and estimates of cost, latency, and work, including whether they fit the proposed budget.
For the plan, create, poll, and read flow, see Run a Research Task.
1 min read
post/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/plan
Request example
Response
post/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/plan
Authorization
Path parameters
Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (
…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.Body
application/jsonSpend ceiling in USD to compare with the cost estimate. Sets
budget.exceeds_budget and budget.remaining_budget_usd in the response.Range: >= 0
Retrieval depth:
fast, deep, or research (see Retrieval Depth). Omit it to use the knowledge base's default depth, retrieval.default_mode in Get Knowledge Base Settings.Options:
fastdeepresearchnullThe question. Use a nonblank query. Also limited to 16,384 UTF-8 bytes.
Length: max 16000Pattern: \S
Maximum number of chunks kept after the search results are merged and reranked. Explicit values must be between 1 and 50. If omitted, uses the knowledge base's published TOP K setting, which can be up to 100. Higher values give the model more context and more noise. Lower values stay focused and can miss relevant chunks.
Range: 1–50
Responses
application/json
The plan and its estimates.
Work, cost, and latency estimates for the task. Compare them with the
limits you intend to send to Create Research Task.Internal ID of the knowledge base. Not the knowledge base ID in the path.
The question with surrounding whitespace removed.
Version of the estimator.