{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/omniapps-ca/json-schema/omniapps-ca-challenge-risk-request-schema.json",
  "title": "ChallengeRiskRequest",
  "description": "Structured risk-classification request for challenge-heavy workloads.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sairen-omniapps-ca-openapi.json#/components/schemas/ChallengeRiskRequest",
  "properties": {
    "target_context": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 8192,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Target Context",
      "description": "Raw page text, URL context, or challenge signal text to classify."
    },
    "input_data": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 8192,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Data",
      "description": "Backward-compatible alias for target_context."
    },
    "html": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 8192,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Html",
      "description": "HTML content alias for target_context."
    },
    "request_count": {
      "type": "integer",
      "maximum": 100000.0,
      "minimum": 0.0,
      "title": "Request Count",
      "description": "Observed request volume in the current window.",
      "default": 0
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 599.0,
          "minimum": 100.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Status Code",
      "description": "Observed HTTP status code associated with the request."
    },
    "user_agent": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 512
        },
        {
          "type": "null"
        }
      ],
      "title": "User Agent",
      "description": "User agent or browser fingerprint for bot-risk evaluation."
    },
    "challenge_type": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Challenge Type",
      "description": "Known challenge type, such as captcha, turnstile, cloudflare, or akamai."
    },
    "parameters": {
      "additionalProperties": true,
      "type": "object",
      "title": "Parameters",
      "description": "Optional execution metadata or legacy compatibility payload."
    }
  },
  "type": "object"
}