cURL
curl --request POST \ --url https://api.valyu.ai/v1/deepresearch/batches/{id}/tasks \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' { "tasks": [ { "id": "tech_sector", "query": "Analyze technology sector performance in Q4 2024" }, { "id": "healthcare_sector", "query": "Research healthcare sector trends and key players", "urls": [ "https://healthcare-report.com/q4-2024" ] }, { "id": "energy_sector", "query": "Review renewable energy market developments", "strategy": "Focus on solar and wind energy only" } ] } '
{ "batch_id": "<string>", "added": 123, "tasks": [ { "task_id": "<string>", "deepresearch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "status": "queued", "query": "Analyze technology sector performance in Q4 2024", "created_at": "2023-11-07T05:31:56Z", "completed_at": "2023-11-07T05:31:56Z" } ], "counts": { "total": 123, "queued": 123, "running": 123, "completed": 123, "failed": 123, "cancelled": 123 } }
Reference for adding tasks to a batch via POST /v1/deepresearch/batches//tasks.
Your Valyu API key. Get one at platform.valyu.ai
Batch ID
Array of tasks to add to the batch (1-100 tasks per request)
1 - 100
Show child attributes
Tasks added successfully (accepted for processing)
Number of tasks successfully added
Array of tasks that were added
Updated task counts for the batch
Was this page helpful?