{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-task-group-response-schema.json",
  "title": "TaskGroupResponse",
  "description": "Response object for a task group, including its status and metadata.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-tasks-api-openapi.yml#/components/schemas/TaskGroupResponse",
  "properties": {
    "taskgroup_id": {
      "type": "string",
      "title": "Taskgroup ID",
      "description": "ID of the group."
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "User-provided metadata stored with the group."
    },
    "status": {
      "$ref": "#/$defs/TaskGroupStatus",
      "description": "Status of the group."
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At",
      "description": "Timestamp of the creation of the group, as an RFC 3339 string."
    }
  },
  "type": "object",
  "required": [
    "taskgroup_id",
    "status",
    "created_at"
  ],
  "$defs": {
    "TaskGroupStatus": {
      "properties": {
        "num_task_runs": {
          "type": "integer",
          "title": "Num Task Runs",
          "description": "Number of task runs in the group."
        },
        "task_run_status_counts": {
          "additionalProperties": {
            "type": "integer"
          },
          "propertyNames": {
            "enum": [
              "queued",
              "action_required",
              "running",
              "completed",
              "failed",
              "cancelling",
              "cancelled"
            ]
          },
          "type": "object",
          "title": "Task Run Status Counts",
          "description": "Number of task runs with each status."
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active",
          "description": "True if at least one run in the group is currently active, i.e. status is one of {'cancelling', 'queued', 'running'}."
        },
        "status_message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status Message",
          "description": "Human-readable status message for the group."
        },
        "modified_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Modified At",
          "description": "Timestamp of the last status update to the group, as an RFC 3339 string."
        }
      },
      "type": "object",
      "required": [
        "num_task_runs",
        "task_run_status_counts",
        "is_active",
        "status_message",
        "modified_at"
      ],
      "title": "TaskGroupStatus",
      "description": "Status of a task group."
    }
  }
}