{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisa-one/json-schema/aisa-one-generate-content-response-schema.json",
  "title": "GenerateContentResponse",
  "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/GenerateContentResponse",
  "additionalProperties": true,
  "properties": {
    "candidates": {
      "items": {
        "$ref": "#/$defs/Candidate"
      },
      "type": "array"
    },
    "modelVersion": {
      "type": "string"
    },
    "responseId": {
      "type": "string"
    },
    "usageMetadata": {
      "$ref": "#/$defs/UsageMetadata"
    }
  },
  "type": "object",
  "$defs": {
    "Candidate": {
      "additionalProperties": true,
      "properties": {
        "content": {
          "$ref": "#/$defs/Content"
        },
        "finishReason": {
          "type": "string"
        },
        "index": {
          "type": "integer"
        },
        "safetyRatings": {
          "items": {
            "type": "object"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Content": {
      "additionalProperties": true,
      "properties": {
        "parts": {
          "items": {
            "$ref": "#/$defs/Part"
          },
          "type": "array"
        },
        "role": {
          "enum": [
            "user",
            "model",
            "system",
            "assistant"
          ],
          "type": "string"
        }
      },
      "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"
    },
    "UsageMetadata": {
      "additionalProperties": true,
      "properties": {
        "candidatesTokenCount": {
          "type": "integer"
        },
        "promptTokenCount": {
          "type": "integer"
        },
        "totalTokenCount": {
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}