{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apidirect-io/json-schema/apidirect-io-batch-request-schema.json",
  "title": "BatchRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apidirect-io-batch-api-openapi.yml#/components/schemas/BatchRequest",
  "type": "object",
  "required": [
    "requests"
  ],
  "properties": {
    "requests": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "description": "The calls to run, 1 to 100 of them, in any mix of endpoints.",
      "items": {
        "$ref": "#/$defs/BatchRequestItem"
      }
    }
  },
  "$defs": {
    "BatchRequestItem": {
      "type": "object",
      "required": [
        "endpoint"
      ],
      "properties": {
        "endpoint": {
          "type": "string",
          "pattern": "^/v1(/[a-z0-9\\-]+)+$",
          "description": "The endpoint path to call, for example `/v1/twitter/user`. Every endpoint except `/v1/web/ai-mode` and `/v1/time` is allowed."
        },
        "params": {
          "type": "object",
          "maxProperties": 25,
          "description": "The query parameters the endpoint takes when called directly. Values must be strings or numbers (send booleans as \"true\").",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "tag": {
          "type": "string",
          "maxLength": 100,
          "description": "Optional label echoed back on this item's result."
        }
      }
    }
  }
}