Skip to main content
GET
Get DeepResearch task status and results
Retrieve task progress and, when available, its output and supporting sources. Use the deepresearch_id returned when you created the task.

Handle the lifecycle

Every task body has warnings, [] when there are none. They describe problems with the request, not the run. Each entry in warnings is an object, not a string. It has a type, a message and an optional detail:
Branch on type, and show message to your user. For a type that you do not know, show message. Older tasks can hold plain strings. Treat a string as the message. For all the types, see warnings. Read the newer fields in new code:
  • cost_detail, cost_credits and cost_breakdown_credits for cost. cost_breakdown is deprecated as the only cost source.
  • research_mode and research_output_formats for a mode or format that the older fields cannot hold, for example instant or structured_report. The response then leaves out mode or output_formats. Read research_mode, and use mode when research_mode is not present. Do the same for the formats.
  • error_code on a failed task, next to error.
  • pending_deliverables for deliverables that the task has not produced yet.
  • images[].chart_kind for newer chart kinds.
The API still sends the older fields. Valyu will remove them later with at least 30 days’ notice. See the newer response fields. Persist the task ID and use a bounded polling interval. Avoid creating another task simply because an individual status request times out.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get yours at platform.valyu.ai.

Path Parameters

id
string
required

DeepResearch task ID.

Response

Task status and results.

Full status and results of a DeepResearch task.

deepresearch_id
string
required

Unique identifier for the research task.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

status
enum<string>
required

Current task status.

  • queued - Waiting for capacity
  • running - Research in progress
  • awaiting_input - HITL checkpoint active, waiting for user response
  • paused - HITL checkpoint timed out, state saved, respond anytime to resume (your balance must cover the task when it resumes)
  • completed - Research finished successfully
  • failed - Research failed
  • cancelled - Task was cancelled
Available options:
queued,
running,
awaiting_input,
paused,
completed,
failed,
cancelled
Example:

"completed"

query
string
required

The original research query.

Example:

"Comprehensive analysis of CRISPR gene therapy clinical trials"

mode
enum<string>
required

Research mode used for this task. Deprecated for reading the true mode: it keeps only the older values. Use research_mode.

Available options:
fast,
standard,
heavy,
max
Example:

"standard"

created_at
string<date-time>
required

ISO 8601 timestamp of task creation.

Example:

"2024-06-15T10:30:00.000Z"

title
string | null

Short title for the task, when available.

output_formats
(enum<string> | object)[]

Output formats requested for this task. Deprecated for reading the true formats: it keeps only the older values. Use research_output_formats.

Available options:
markdown,
pdf,
toon
Example:
research_mode
enum<string>

The research mode, present only when it is not one of the older values (for example instant). The response then leaves out mode. Read this field, and use mode when it is not present.

Available options:
instant,
fast,
standard,
heavy,
max
Example:

"instant"

research_output_formats
(string | object)[]

The output formats, present only when a format is not one of the older values (for example structured_report). The response then leaves out output_formats. Read this field, and use output_formats when it is not present.

Example:
public
boolean

Whether the task results are publicly accessible.

Example:

false

metadata
object

Metadata you attached when creating the task (or the batch task).

batch_id
string

Batch ID if this task belongs to a batch.

batch_task_id
string

User-provided task ID within a batch.

progress
object

Research progress. Present when status is "running".

output_type
enum<string>

Format of the output. Present when status is "completed".

Available options:
markdown,
json,
toon
Example:

"markdown"

output

Research output. Markdown string or JSON object depending on output_type. Present when status is "completed" (may be partial on "failed" or "cancelled").

total_word_count
integer

Word count of the report, when available.

sources
object[]

Sources used during research. Present when status is "completed", "failed", or "cancelled".

cost
number

Total cost billed for this task (base mode price + any tool surcharges). Failed tasks are not billed, even if this field is non-zero.

Example:

0.625

cost_breakdown
object
deprecated

Itemized cost breakdown. Only present when the task has completed.

Example:
cost_detail
object

Line-by-line cost of the task. Use this field as the source of cost detail. Only present when the task has completed.

cost_credits
number

Total cost of the task in credits.

Example:

100

cost_breakdown_credits
object

The same keys as cost_breakdown, with each value in credits.

Example:
tools
object

Resolved tools configuration for this task.

completed_at
string<date-time>

ISO 8601 timestamp of task completion. Present when status is "completed".

Example:

"2024-06-15T10:35:00.000Z"

pdf_url
string<uri>

URL to the generated PDF report. Present when "pdf" was in output_formats.

images
object[]

Images generated during research (charts, AI-generated, screenshots). Present when status is "completed".

pending_deliverables
object[]

Deliverables that you requested and the task has not produced yet. deliverables lists only completed and failed files.

deliverables
object[]

Generated deliverable files (CSV, Excel, PowerPoint, Word, PDF). Lists only completed and failed files. Present when deliverables were requested.

messages
object[]

Conversation trace of the research agent. Present when status is "running" or "completed".

error
string

Error message. Present when status is "failed". Do not use it as your only error signal. Branch on error_code.

error_code
string

Stable code for the failure. Present when status is "failed", next to error.

Example:

"search.sources_not_entitled"

warnings
(object | string)[]

Problems with the request, and brand kit or cover art files that could not be used. Always present, [] when there are none. Each entry is an object with type, message and an optional detail, not a string. New warning types may be added at any time. Older tasks may hold plain strings; treat a string as the message. See Warnings.

Something the request skipped or adjusted. A warning means the request succeeded. New type values may be added at any time, so handle unknown ones by showing message. See Warnings.

hitl_config
object

HITL configuration. Present when HITL was enabled on task creation.

interaction
object

Current HITL checkpoint. Present when status is awaiting_input or paused.

hitl_history
object[]

History of completed HITL checkpoints. Present after any checkpoint completes.