{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloro-dev/json-schema/cloro-dev-batch-task-request-schema.json",
  "title": "BatchTaskRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloro-dev-async-api-openapi.yml#/components/schemas/BatchTaskRequest",
  "type": "object",
  "required": [
    "taskType",
    "payload"
  ],
  "properties": {
    "taskType": {
      "type": "string",
      "enum": [
        "AIMODE",
        "GOOGLE",
        "GOOGLE_NEWS",
        "GEMINI",
        "CHATGPT",
        "COPILOT",
        "PERPLEXITY",
        "GROK"
      ],
      "description": "The AI provider to use for this task."
    },
    "payload": {
      "type": "object",
      "description": "The provider's request body, validated against the same schema as its sync endpoint (for example `ChatGPTMonitorRequest`). That makes `country` required here too, or `gl` on the Google endpoints."
    },
    "priority": {
      "type": "integer",
      "description": "Task priority level (1-10). Higher numbers are processed first. Defaults to 1.",
      "minimum": 1,
      "maximum": 10,
      "default": 1
    },
    "idempotencyKey": {
      "type": "string",
      "description": "Unique string to prevent duplicate task creation. Must be unique across your account."
    },
    "webhook": {
      "type": "object",
      "description": "Webhook configuration for task completion notification.",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL to receive the webhook POST request when the task completes."
        }
      },
      "required": [
        "url"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}