{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grepr/json-schema/grepr-write-gemini-schema.json",
  "title": "WriteGemini",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grepr-gemini-integration-api-openapi.yml#/components/schemas/WriteGemini",
  "properties": {
    "name": {
      "description": "Name of the integration.",
      "pattern": "[a-zA-Z0-9 _-]{1,128}",
      "type": "string"
    },
    "payload": {
      "$ref": "#/$defs/Gemini"
    },
    "teamIds": {
      "default": [],
      "description": "The team IDs that this integration is associated with.",
      "items": {
        "description": "The team IDs that this integration is associated with.",
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "type": {
      "description": "The type of the integration. This is used to determine the payload type.",
      "enum": [
        "gemini"
      ],
      "type": "string"
    },
    "version": {
      "description": "Version of the integration. Should be increased by one for every new update in order for the write to succeed. Otherwise, a '409 Conflict' will be returned.",
      "format": "int32",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "name",
    "payload",
    "type",
    "version"
  ],
  "type": "object",
  "$defs": {
    "Gemini": {
      "description": "The payload containing integration data.",
      "properties": {
        "apiKey": {
          "description": "Masked API key for Google Gemini",
          "readOnly": true,
          "type": "string"
        },
        "integrationMaxTokens": {
          "description": "Total tokens all agents using this integration may consume per max-tokens window. Null uses the default of 200,000,000.",
          "format": "int64",
          "minimum": 1,
          "type": "integer"
        },
        "maxTokensWindowHours": {
          "description": "Length in hours of the UTC-aligned max tokens window; must be a divisor of 24. Null uses the default of 1.",
          "format": "int32",
          "maximum": 24,
          "minimum": 1,
          "type": "integer"
        },
        "supportsEmbedding": {
          "description": "Whether this provider offers an embeddings API and can back agent investigation memory.",
          "readOnly": true,
          "type": "boolean"
        },
        "validateKeysOnSave": {
          "default": true,
          "description": "Indicates whether to validate the API key when saving.",
          "type": "boolean"
        }
      },
      "type": "object",
      "x-type": {
        "type": "gemini"
      }
    }
  }
}