v2

latestOpenAPI 3.1.02026-07-3171165552.0 KB
Assistant

Get Assistant Task

Poll the status and results of an assistant task. Call this endpoint repeatedly until the status is SUCCESS.

Task States

StatusDescription
PENDINGTask is queued, not yet started
STARTEDTask is actively processing — info contains progress details
SUCCESSTask completed — result contains the full response
FAILURETask failed — error contains the error message
CANCELLEDTask was cancelled via the cancel endpoint
REVOKEDTask was revoked

Progress Info (during STARTED)

While the task is running, the info field provides real-time progress:

{
  "id": "abc123",
  "status": "STARTED",
  "info": {
    "step": "EXECUTING_SEARCHES",
    "stepNumber": 3,
    "response": "partial response text...",
    "searches": ["query 1", "query 2"],
    "publicationsUsed": ["10.1234/example"],
    "publicationsConsulting": ["Author et al., Title, Journal, 2024"],
    "currentSearch": "current query being executed"
  }
}

Processing steps in order:

  1. SCHEDULING_ASSISTANT — task queued
  2. GENERATING_SEARCH_STRATEGY — AI generating search queries
  3. EXECUTING_SEARCHES — running queries against Elasticsearch
  4. RETRIEVING_UPLOADED_DOCUMENTS — loading reference check documents (if applicable)
  5. RETRIEVING_PRIMARY_SOURCES — enriching with primary source data
  6. COMPOSING_RESPONSE — preparing context for LLM
  7. GENERATING_RESPONSE — LLM generating the answer

Success Result

{
  "id": "abc123",
  "status": "SUCCESS",
  "result": {
    "title": "How does protein structure affect function?",
    "sessionId": 42,
    "slug": "how-does-protein-structure-affect-function-xK9mP",
    "turns": [...],
    "lastUpdated": "2025-01-15",
    "createdAt": "2025-01-15",
    "tooManySessions": false
  }
}

Turn Structure

Each assistant turn in the turns array contains:

FieldTypeDescription
rolestr"user" or "assistant"
contentstrResponse text with numbered citation markers like [1], [2]
structuredResponselist or nullStructured response data (when useStructuredResponse was true)
referenceslistCited references (see below)
searchStrategylist[str] or nullSearch queries that were used
warningstr or nullWarning message if applicable
modelstr or nullThe model that generated this response
settingsdict or nullSettings applied (e.g., AI-suggested rankBy, yearFrom, yearTo)
publicationsConsultedlist[dict] or nullAll publications considered (including unused ones)

Reference Structure

Each reference in the references array:

FieldTypeDescription
answerstrThe relevant text passage (citation statement or abstract excerpt)
textslist[str]Text passages used
contextstrSurrounding context of the passage
titlestrPaper title
doistrPaper DOI
linkstrLink to the scite report page
typestr"abstract" or "citation_statement"
paperobjectFull paper metadata (title, authors, journal, year, date, abstract, tally, DOI, etc.)
patentobject or nullPatent data if from patent search
refCheckIdstr or nullReference check task ID if from uploaded document
get/api_partner/assistant/tasks/{task_id}

Path parameters

task_idstring required

Headers

authorizationstring

Set to Bearer <token> to pass token for authorization.

Set to Bearer <token> to pass token for authorization.

Response

Successful Response

idstring nullable
statusstring nullable
errorstring nullable