Skip to main content
delete/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}
Request example
Response
delete/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}

Authorization

Authorizationstringheaderrequired#

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path parameters

knowledge_base_idstringrequired#
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.
research_task_idstringrequired#
Research task ID. From Create Research Task.

Responses

application/json
The task after cancellation. stage is canceled and completed_at is set. error stays null.
budget_usdnumber#
Spend ceiling from the request in USD. null when none was set.
completed_atnumber#
When the task reached completed, failed, or canceled, in epoch milliseconds. null while the task is running.
costobject#
Spend recorded so far.
created_atnumber#
Epoch milliseconds when the task was created.
errorstring#

Failure code, the same value as failure.code. Present only when stage is failed, and null otherwise, including for canceled tasks.

On a failed research task, failure.code is one of RESEARCH_TASK_CAPABILITY_REVOKED, RESEARCH_TASK_DISPATCH_DEAD, RESEARCH_TASK_EXECUTION_ATTEMPTS_EXHAUSTED, RESEARCH_TASK_FAILED, RESEARCH_TASK_PERMISSION_SNAPSHOT_INVALID, or RESEARCH_TASK_RUNTIME_SNAPSHOT_INVALID.

failureobject#

Error details. Present only when stage is failed, and null otherwise. Members without a value are null here. traceId is the task ID.

When action is retry, create a new task with Create Research Task.

idstring#
Research task ID. Use it as research_task_id in the task operations.
knowledge_space_idstring#
Internal ID of the knowledge base. Not the knowledge base ID in the path.
limitsobject#
Limits from the request, with snake_case keys. null when the request carried no limits. A member that was not sent is null. Convert the keys back to camelCase before sending them to Create Research Task again.
metadataobject#
The metadata object sent at creation, without keys that start with __knowledgeFs.
modestring#
Retrieval depth of the task: fast, deep, or research.
querystring#
The research question as stored.
query_imagesobject[]#
Images used in the original query. Omitted for text-only queries.
stagestring#

Where the task is in its lifecycle. Tasks move forward one stage at a time:

  • queued: accepted, waiting for a worker.
  • planning: resolving the retrieval plan.
  • retrieving: searching the knowledge base. A retrieval checkpoint may be written.
  • analyzing: reading and weighing the retrieved chunks.
  • generating: writing the answer. The final result is written during this stage.
  • completed: finished. Read its results with List Research Task Results.
  • failed: stopped with an error. See error and failure.
  • canceled: stopped by Cancel Research Task or by the budget.
  • paused: The task is paused. Check any failure details with the deployment operator, or cancel it.

completed, failed, and canceled are terminal.

top_kinteger#
Maximum number of chunks kept after the search results are merged and reranked: the request's topK, or the knowledge base's TOP K when omitted.
updated_atnumber#
Epoch milliseconds of the last update to the task record, including internal checkpoints and retry scheduling.