torii-gateRun Multiple Queries

Audience: Developers

Run Multiple Queries with Async Taskgroup

Run multiple research queries with shared configuration (profile, webhook) using the taskgroup API.

Create a task group with multiple queries

curl -X POST 'https://stag-gl-deep-research.obrol.id/v1/taskgroup' \
  -H 'X-API-Key: stag-gl-deep-research.obrol.id-key' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'query=["What is AI?", "What is machine learning?", "What is deep learning?"]' \
  --data-urlencode 'profile=GPTR-QUICK'

Response includes taskgroup_id and a tasks array of task IDs. All tasks share the same profile and optional webhook.

Stream from the whole group

Consume a single stream that aggregates events from all tasks in the group:

curl -N 'https://stag-gl-deep-research.obrol.id/v1/taskgroup/your-taskgroup-id/stream' \
  -H 'X-API-Key: stag-gl-deep-research.obrol.id-key'

Check group status and get results

  • Group status: GET /v1/taskgroup/{taskgroup_id} — derived from member task statuses (e.g. SUCCESS, PARTIAL_FAILURE).

  • Task result: GET /v1/taskgroup/{taskgroup_id}/tasks/{task_id} or GET /v1/tasks/{task_id}.

See Examples and Taskgroups API for full request/response formats.

Last updated