{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisa-one/json-schema/aisa-one-generate-content-request-schema.json",
  "title": "GenerateContentRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aisa-one-ai-models-api-openapi.yml#/components/schemas/GenerateContentRequest",
  "properties": {
    "cachedContent": {
      "description": "Optional cached content ID",
      "type": "string"
    },
    "contents": {
      "description": "Content of the conversation, required",
      "items": {
        "$ref": "#/$defs/Content"
      },
      "type": "array"
    },
    "generationConfig": {
      "$ref": "#/$defs/GenerationConfig"
    },
    "safetySettings": {
      "items": {
        "$ref": "#/$defs/SafetySetting"
      },
      "type": "array"
    },
    "systemInstruction": {
      "$ref": "#/$defs/Content"
    },
    "toolConfig": {
      "description": "Optional tool configuration",
      "type": "object"
    },
    "tools": {
      "description": "Optional tools the model can use",
      "items": {
        "$ref": "#/$defs/Tool"
      },
      "type": "array"
    }
  },
  "required": [
    "contents"
  ],
  "type": "object",
  "$defs": {
    "Content": {
      "additionalProperties": true,
      "properties": {
        "parts": {
          "items": {
            "$ref": "#/$defs/Part"
          },
          "type": "array"
        },
        "role": {
          "enum": [
            "user",
            "model",
            "system",
            "assistant"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "GenerationConfig": {
      "type": "object"
    },
    "Part": {
      "additionalProperties": true,
      "properties": {
        "inline_data": {
          "description": "Inline binary data for multimodal content.",
          "type": "object"
        },
        "text": {
          "description": "Generated or input text content.",
          "type": "string"
        },
        "thoughtSignature": {
          "description": "Provider-generated thought signature metadata.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SafetySetting": {
      "type": "object"
    },
    "Tool": {
      "type": "object"
    }
  }
}