v19

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-084091267.1 KB
Tasks

Add Runs to Task Group

Initiates multiple task runs within a TaskGroup.

post/v1/tasks/groups/{taskgroup_id}/runs

Path parameters

taskgroup_idstring required

Query parameters

refresh_statusboolean

Headers

parallel-betastring nullable

Request body

Example request

{
  "default_task_spec": {
    "output_schema": {
      "json_schema": {
        "additionalProperties": false,
        "properties": {
          "gdp": {
            "description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
            "type": "string"
          }
        },
        "required": [
          "gdp"
        ],
        "type": "object"
      }
    },
    "input_schema": {
      "json_schema": {
        "additionalProperties": false,
        "properties": {
          "gdp": {
            "description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
            "type": "string"
          }
        },
        "required": [
          "gdp"
        ],
        "type": "object"
      }
    }
  },
  "inputs": [
    {
      "processor": "base",
      "source_policy": {
        "include_domains": [
          "wikipedia.org",
          "usa.gov",
          ".edu"
        ],
        "exclude_domains": [
          "reddit.com",
          "x.com",
          ".ai"
        ],
        "after_date": "2024-01-01"
      },
      "advanced_settings": {
        "location": "us"
      },
      "task_spec": {
        "output_schema": {
          "json_schema": {
            "additionalProperties": false,
            "properties": {
              "gdp": {
                "description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
                "type": "string"
              }
            },
            "required": [
              "gdp"
            ],
            "type": "object"
          }
        },
        "input_schema": {
          "json_schema": {
            "additionalProperties": false,
            "properties": {
              "gdp": {
                "description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
                "type": "string"
              }
            },
            "required": [
              "gdp"
            ],
            "type": "object"
          }
        }
      }
    }
  ]
}

Response

Successful Response

run_idsstring[] required

IDs of the newly created runs.

run_cursorstring nullable required

Cursor for these runs in the run stream at taskgroup/runs?last_event_id=<run_cursor>. Empty for the first runs in the group.

event_cursorstring nullable required

Cursor for these runs in the event stream at taskgroup/events?last_event_id=<event_cursor>. Empty for the first runs in the group.

Example response

{
  "status": {
    "modified_at": "2025-04-24T18:56:22.513132Z"
  }
}