Skip to main content
POST
/
v1
/
deepresearch
/
batches
/
{id}
/
tasks
Add tasks to batch
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
  }
}

Authorizations

x-api-key
string
header
required

Your Valyu API key. Get one at platform.valyu.ai

Path Parameters

id
string
required

Batch ID

Body

application/json
tasks
object[]
required

Array of tasks to add to the batch (1-100 tasks per request)

Required array length: 1 - 100 elements

Response

Tasks added successfully (accepted for processing)

batch_id
string

Batch ID

added
integer

Number of tasks successfully added

tasks
object[]

Array of tasks that were added

counts
object

Updated task counts for the batch