Create, poll, result
The core loop is three calls: create a task, wait for it to finish, read the output. The SDK’swait helper handles polling for you.
Research modes
Mode controls depth, latency, and price. Set it oncreate.
Task statuses
The
wait helper handles queued and intermediate states for you - it polls until a terminal status.
Output formats
Default output is markdown. Addpdf, or pass a JSON Schema for structured data.
Structured JSON output
Structured JSON output
Pass a JSON Schema as the single output format to get research results as structured data:You cannot mix JSON Schema with
markdown/pdf - use one or the other.Guiding research and output
Two optional parameters shape the run.research_strategy guides the search phase (what to look for, which sources to prioritise); report_format controls the final output (structure, style, length).
The older
strategy parameter is deprecated. Use research_strategy instead; it takes precedence if both are sent.Search configuration
Thesearch object controls which sources are queried and how results are filtered. Request-level settings are enforced and cannot be overridden by the agent.
search_type, included_sources, excluded_sources
search_type, included_sources, excluded_sources
search_type - which backends to query:"all"(default): web + proprietary sources"web": general web, news, articles only"proprietary": academic, finance, patents, etc. only
included_sources restricts to only these source types. excluded_sources removes them. Use one, not both. You can also pass individual dataset ids (valyu/valyu-arxiv), domains (nature.com), or a saved collection:<name> - see Targeting sources. Available presets:Presets don’t overlap.
academic is papers and preprints only - clinical trials, drug labels, WHO and NIH grants live in health, and ChEMBL/Open Targets/PubChem live in chemistry. To cover life sciences broadly in one preset, use medical.source_biases
source_biases
Soft ranking hints that nudge (but don’t hard-filter) which sources appear. Keys are domains/paths, values are integers from -5 (demote) to +5 (boost).
Dates, category, country
Dates, category, country
start_date/end_date- ISOYYYY-MM-DD. Filters by publication and event date across all sources. Use either bound or both for a range.category- source-dependent category filter.country_code- ISO 3166-1 alpha-2 (e.g."US","GB"). Biases web results toward a region; academic/proprietary sources may ignore it.
Tools
Optional capabilities the agent can use during a task. All are off by default and must be explicitly enabled. You enable them; the agent decides when to use them.{ enabled, max_calls }. max_calls can only be lowered below the system default, never raised. See Pricing for surcharges.
Per-tool limits and image metadata
Per-tool limits and image metadata
Screenshots - max 15/task (5 MB download cap, 1280×4000 px report cap). Appear in
images with image_type: "screenshot" plus source_url and captured_at.Code execution - Python only, 5-60s timeout (default 30s), no network access, text output via print().Browser use - max 5 sessions/task.Charts - free, unlimited. Appear in images with image_type: "chart" plus chart_type, x_axis_label, y_axis_label, and data_series. Chart types include line, bar, area, pie, scatter, heatmap, boxplot, histogram, waterfall, timeline, and more.File attachments and URLs
Attach documents (PDFs, images, Office files) to analyze as part of research, or pass specific URLs to include.400 ({ "error": "..." }) on any violation.
Supported file types and limits
Supported file types and limits
Total across all files: 100 MB. PPTX is converted to markdown slide-by-slide before being sent to the model. Extracted text is truncated at 500K characters.
Task management
Webhooks
Provide awebhook_url to get a POST notification when a task completes or fails, instead of polling. The response includes a webhook_secret for signature verification.
Verifying webhook signatures
Verifying webhook signatures
Each request includes Always return a
X-Webhook-Signature (sha256=<hex> HMAC) and X-Webhook-Timestamp (ms). Reconstruct timestamp.payload, HMAC-SHA256 it with your secret, and compare in constant time.2xx quickly and process the payload asynchronously.Payload, retries, and events
Payload, retries, and events
The payload is the full task object (
deepresearch_id, status, output, pdf_url, sources, cost, error, timestamps, etc.).Webhooks fire on completed and failed only - not on cancelled. Use the status endpoint to track cancellations.Failed deliveries retry up to 5 times with exponential backoff (1s → 2s → 4s → 8s → 16s), 15s timeout per attempt. 4xx responses are not retried; 5xx are.Human-in-the-loop
Add optional checkpoints that pause execution for human review - clarifying questions, plan review, source filtering, or outline review.HITL guide
Configure and respond to HITL checkpoints
Best practices
- Pick the right mode -
fastfor lookups,standardfor most work,heavy/maxonly when depth and fact verification justify the cost. - Narrow scope - use
searchfilters andstart_date/end_dateto focus on relevant content. - Be specific - clear queries plus
research_strategyandreport_formatproduce better reports. - Use webhooks in production to avoid polling overhead. If polling, scale the interval to the mode (a few seconds for
fast, up to 30-60s formax).
Limitations
Next steps
Batch processing
Run many research tasks in parallel
Workflows
Templated, versioned research for repeatable work
API reference
Complete endpoint documentation
Python SDK
Python SDK reference

