{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/skavio-eu/json-schema/skavio-eu-batch-spec-schema.json",
  "title": "BatchSpec",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/skavio-eu-processing-openapi.json#/components/schemas/BatchSpec",
  "properties": {
    "operation": {
      "type": "string",
      "maxLength": 64,
      "title": "Operation"
    },
    "upload_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 100,
      "title": "Upload Ids"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/BatchItemSpec"
      },
      "type": "array",
      "maxItems": 100,
      "title": "Items"
    },
    "options": {
      "additionalProperties": true,
      "type": "object",
      "title": "Options"
    },
    "fields": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 30,
      "title": "Fields"
    },
    "instructions": {
      "type": "string",
      "maxLength": 1500,
      "title": "Instructions",
      "default": ""
    },
    "workflow_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Workflow Id"
    },
    "webhook_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Id"
    },
    "webhook_mode": {
      "type": "string",
      "enum": [
        "batch",
        "items",
        "both"
      ],
      "title": "Webhook Mode",
      "default": "batch"
    },
    "max_credits": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100000000.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Credits"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "operation"
  ],
  "$defs": {
    "BatchItemSpec": {
      "properties": {
        "upload_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 100,
          "minItems": 1,
          "title": "Upload Ids"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "upload_ids"
      ],
      "title": "BatchItemSpec"
    }
  }
}