Skip to main content
POST
Run a multi-step investigation and receive a cited report. Provide a focused question, the intended audience and the evidence or comparisons the report needs to cover.

Start, store and retrieve

  1. Create a task and store its deepresearch_id in your application.
  2. Poll Get status, or configure a completion webhook.
  3. When status is completed, read output, sources and any requested deliverables.
  4. Handle failed and cancelled separately from successful completion. If checkpoints are enabled, handle awaiting_input and paused too.
The response can carry warnings about the request, for example named datasets outside your plan, a tool the chosen mode doesn’t have, or a cover_art or brand kit file that cannot be used. The task still runs. Each warning is an object with type, message and an optional detail, not a string. Relay each message to your user. Use research_strategy to guide investigation and report_format to describe presentation. Choose output_formats for machine-readable output, or request deliverables for files. A json deliverable takes an optional JSON Schema in schema. It is separate from output_formats. See deliverables. Report instructions express the requested result; validate the returned output before inserting it into a downstream workflow. For repeatable tasks, run a Workflow with workflow_id and workflow_params instead of freeform query fields.

Modes and billing

Tool add-ons (screenshots, code execution, browser use, extra deliverables) are charged on top: Excel, PowerPoint and Word files are 55 credits each. HTML files are 100 credits each. Neither has an included file. For CSV and JSON, one file per task is included (they share it), then 15 credits for each extra file. PDF files are always included and never charged. See pricing. When you create a task, its mode price is held against your balance until the task is charged. If your balance, minus amounts held for your other queued and running tasks, can’t cover it, the request returns 402 with an Insufficient credits error and no task is created. A 503 with Billing temporarily unavailable means billing couldn’t be checked; no task was created, so retry with backoff. Failed tasks are free. Cancelling a running or awaiting_input task charges the full mode price; cancelling a queued or paused task is free.

Authorizations

X-API-Key
string
header
required

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

Body

application/json

Request to create a DeepResearch task.

A task can be either freeform (provide query/input plus optional research_strategy, report_format, etc.) or workflow-driven (provide workflow_id + workflow_params). The two modes are mutually exclusive: passing workflow_id alongside freeform fields (query, input, research_strategy, report_format) returns 400 workflow_and_freeform_mutually_exclusive. When running a workflow, any mode/deliverables/tools you pass in the body override the template defaults.

query
string
required

The research query or question. Use query (preferred) or input (deprecated). Maximum 25,000 characters. Mutually exclusive with workflow_id.

Maximum string length: 25000
Example:

"Comprehensive analysis of CRISPR gene therapy clinical trials in 2024"

input
string
deprecated

Deprecated. Use query instead.

workflow_id
string

Beta. Slug of a workflow to run instead of a freeform query. When set, the task is resolved from the workflow's prompt template using workflow_params. Mutually exclusive with freeform fields (query, input, research_strategy, report_format); supplying both returns 400 workflow_and_freeform_mutually_exclusive. See the Workflows endpoints.

Example:

"ib-company-profile"

workflow_params
object

Beta. Values for the workflow's template variables, keyed by variable key. Required when workflow_id is set. Values must satisfy the workflow's declared variable types and validation rules.

Example:
workflow_version
integer

Beta. Pin the run to a specific immutable version of the workflow. Defaults to the workflow's current version when omitted. Only valid with workflow_id.

Required range: x >= 1
Example:

1

mode
enum<string>
default:standard

Research mode controlling depth and cost. Prices are credits per task; tool add-ons are extra. See pricing.

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

"standard"

model
enum<string>
deprecated

Deprecated. Use mode instead.

Available options:
fast,
standard,
heavy,
max
strategy
string
deprecated

Deprecated. Use research_strategy instead. Natural language strategy to guide the research agent's approach.

Example:

"Focus on Phase 3 trials and compare efficacy data across studies"

research_strategy
string

Natural language strategy to guide the research phase. Controls how the agent searches, what sources to prioritize, and research methodology. Combined length of research_strategy and report_format must not exceed 15,000 characters.

Maximum string length: 15000
Example:

"Focus on Phase 3 trials and compare efficacy data across studies"

report_format
string

Natural language instructions for the output format. Has highest priority and overrides default formatting. Controls structure, style, length, and presentation of the final report. Combined length of research_strategy and report_format must not exceed 15,000 characters.

Maximum string length: 15000
Example:

"Write a 2-page executive summary with bullet points and a comparison table"

Search configuration for DeepResearch tasks.

urls
string<uri>[]

URLs to include in the research context. Max 50. The first 10 are free. Each extra URL costs 8 credits. Scanned pages (OCR) in URL files cost 2.4 credits per page, for tasks created from 2026-11-13.

Maximum array length: 50
Example:
files
object[]

Files to analyze as part of the research. Max 10. Scanned pages (OCR) cost 2.4 credits per page, for tasks created from 2026-11-13.

Maximum array length: 10
output_formats
(enum<string> | object)[]

Desired output formats. Defaults to ["markdown"].

  • "markdown" - Markdown report (default)
  • "pdf" - PDF document (can combine with "markdown")
  • "toon" - Token-efficient structured output; requires a JSON Schema object to also be supplied
  • JSON Schema object - Structured JSON output

A JSON Schema object cannot be combined with "markdown" or "pdf". "toon" requires a JSON Schema object.

Available options:
markdown,
pdf,
toon
Example:
metadata
object

Arbitrary key-value metadata to attach to the task.

Example:
mcp_servers
object[]

MCP servers to provide additional tools during research. Max 5.

Maximum array length: 5
code_execution
boolean
default:false
deprecated

Deprecated: use tools.code_execution instead. Enable code execution capability.

tools
object

Controls which optional tools the research agent can use. Each tool accepts an object with enabled (boolean, default true) and optional max_calls (integer, capped at system default).

previous_reports
string[]

DeepResearch task IDs to use as context for this task. Max 3.

Maximum array length: 3
Example:
webhook_url
string<uri>

HTTPS URL to receive a webhook POST when the task completes. Signed with HMAC-SHA256.

Example:

"https://example.com/webhooks/deepresearch"

alert_email

Email notification on completion. Pass a string (email address) or an object with email and optional custom_url. The custom_url must contain {id} which gets replaced with the task ID. Email must belong to your organization.

brand_collection_id
string

Brand kit to apply to the PDF report and the deliverables. Send a kit ID from the Valyu platform, or "none" for no branding. If you don't send it, the organisation's default kit applies to the report and any deliverables, if the default kit is ready. Brand kits need the Comfortably Pro, Serious Business or Enterprise plan. See Brand kits.

Example:

"YOUR_KIT_ID"

cover_art
object

Cover art for this one report. It replaces the brand kit's cover art on the PDF report cover, the PDF deliverable and the title slide of a PPTX deck, and works without a kit. Send exactly one of data or url. The picture must be a PNG or JPEG, at most 2 MB after base64 decoding, and at least 800 px on the short side. Cropping it to the A4 page must keep at least 25% of it. For a large picture, send url. A malformed field returns 400. A picture that cannot be used, including a private or unreachable url, never fails the task: the kit's cover art or the standard cover applies, and warnings carries cover_art_not_used. See Brand kits.

deliverables
(string | object)[]

Deliverable files to generate from the research (e.g. Excel reports, presentations). Max 10.

Maximum array length: 10

A deliverable to generate from the research. Can be a string (natural language description, max 500 chars) or a structured object.

Maximum string length: 500
hitl
object

Human-in-the-loop configuration. Enable checkpoints that pause execution at key decision points. Not available for batch requests.

share_with
string[]

People or company domains who can open the report. Each entry is an email address (name@company.com) or a whole company domain (@company.com). The report stays private: only these people and members of your organization can open it. Viewers open the share link and sign in to Valyu with that email address, which must be verified. A domain covers anyone with a verified email at exactly that domain, not its subdomains. Public email providers such as gmail.com and outlook.com can't be shared as a domain; add those people individually. An invalid entry returns 400 and no task is created. Max 100. See Share a report.

Maximum array length: 100
Example:
share_notify
boolean
default:true

Email each person in share_with a link to the report. Domains are never emailed.

Response

Research task created and queued.

Response after creating a DeepResearch task.

deepresearch_id
string
required

Unique identifier for the research task.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

status
enum<string>
required

Initial task status. "running" if started immediately, "queued" if waiting for capacity.

Available options:
running,
queued
Example:

"running"

mode
enum<string>
required

Research mode used for this task.

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"

metadata
object

Metadata attached to the task.

public
boolean

Whether the task is publicly accessible.

Example:

false

webhook_secret
string

HMAC-SHA256 secret for verifying webhook payloads. Only present when webhook_url was provided.

message
string

Status message. Present when task is queued.

warnings
object[]

Problems with the request, for example named datasets outside your plan, a tool the mode doesn't have, a cover_art that cannot be used, or share_with_not_applied when sharing could not be applied after the task was created. The task still runs. Each entry is an object with type, message and an optional detail, not a string. New warning types may be added at any time. See Warnings.

sharing
object

Who the report is shared with. Present when share_with was applied.