{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compoid-com/json-schema/compoid-com-structured-decision-request-schema.json",
  "title": "StructuredDecisionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compoid-com-systemone-api-openapi.yml#/components/schemas/StructuredDecisionRequest",
  "properties": {
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "state": {
      "title": "State",
      "description": "What the questions are about: text or JSON."
    },
    "questions": {
      "additionalProperties": {
        "$ref": "#/$defs/QuestionSpec"
      },
      "type": "object",
      "title": "Questions",
      "description": "Question id to question, asked in this order."
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Instructions",
      "description": "Context placed ahead of the questions."
    },
    "images": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Images",
      "description": "Image URLs or data URLs, for models that see."
    },
    "audio": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Audio",
      "description": "Audio URLs or data URLs, for models that hear."
    },
    "videos": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Videos",
      "description": "Video URLs or data URLs, for models that see."
    },
    "chat_template_kwargs": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chat Template Kwargs"
    },
    "cache_salt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cache Salt",
      "description": "If specified, the prefix cache will be salted with the provided string to prevent an attacker to guess prompts in multi-user environments. The salt should be random, protected from access by 3rd parties, and long enough to be unpredictable (e.g., 43 characters base64-encoded, corresponding to 256 bit)."
    },
    "priority": {
      "type": "integer",
      "maximum": 9.223372036854776e+18,
      "minimum": -9.223372036854776e+18,
      "title": "Priority",
      "default": 0
    },
    "request_id": {
      "type": "string",
      "title": "Request Id"
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "state",
    "questions"
  ],
  "$defs": {
    "QuestionSpec": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type"
        },
        "instructions": {
          "title": "Instructions",
          "default": ""
        },
        "criteria": {
          "title": "Criteria"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "type"
      ],
      "title": "QuestionSpec"
    }
  }
}