Skip to main content
POST
/
v1
/
deepresearch
/
batches
/
{id}
/
tasks
Add tasks to a 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": [
    {
      "query": "Analyze Tesla Q4 2024 earnings and forward guidance",
      "id": "task-tesla"
    },
    {
      "query": "Analyze Apple Q4 2024 earnings and iPhone sales",
      "id": "task-apple"
    },
    {
      "query": "Analyze Microsoft Q4 2024 earnings and Azure growth",
      "id": "task-msft"
    }
  ]
}
'
{
  "batch_id": "batch_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "added": 5,
  "tasks": [
    {
      "task_id": "<string>",
      "deepresearch_id": "<string>",
      "status": "queued"
    }
  ],
  "counts": {
    "total": 10,
    "queued": 3,
    "running": 2,
    "completed": 4,
    "failed": 1,
    "cancelled": 0
  }
}

Authorizations

X-API-Key
string
header
required

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

Path Parameters

id
string
required

Batch ID.

Body

application/json

Add tasks to an existing batch.

tasks
object[]
required

Tasks to add. Max 100 per request.

Required array length: 1 - 100 elements

Response

Tasks added and queued.

batch_id
string
required

ID of the batch.

Example:

"batch_a1b2c3d4-e5f6-7890-abcd-ef1234567890"

added
integer
required

Number of tasks added.

Example:

5

tasks
object[]
required

Created tasks with their assigned IDs.

counts
object
required

Task count breakdown for a batch.