{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudinary/json-schema/cloudinary-analyze-aivision-moderation-request-schema.json",
  "title": "AnalyzeAIVisionModerationRequest",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudinary-analysis-openapi.yml#/components/schemas/AnalyzeAIVisionModerationRequest",
  "allOf": [
    {
      "$ref": "#/$defs/BaseAnalyzeRequest"
    },
    {
      "type": "object",
      "properties": {
        "rejection_questions": {
          "type": "array",
          "description": "A list of yes/no questions",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "maxItems": 10
        }
      }
    }
  ],
  "$defs": {
    "BaseAnalyzeRequest": {
      "properties": {
        "source": {
          "$ref": "#/$defs/Source"
        },
        "async": {
          "type": "boolean",
          "description": "Whether to perform the analysis asynchronously.\nIf true, the response is returned immediately and analysis is done in the background.\nOnce complete, a webhook notification will be sent to the specified URL and/or to the URLs defined in the Webhook Notifications settings of your Cloudinary Console."
        },
        "notification_url": {
          "type": "string",
          "description": "The webhook URL to notify when the analysis is complete. Only relevant when async is set to true."
        }
      },
      "required": [
        "source"
      ]
    },
    "Source": {
      "type": "object",
      "properties": {
        "asset_id": {
          "type": "string",
          "description": "The asset ID to analyze"
        },
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "The URI of the asset to analyze"
        }
      },
      "oneOf": [
        {
          "required": [
            "asset_id"
          ]
        },
        {
          "required": [
            "uri"
          ]
        }
      ]
    }
  }
}