{
  "openapi": "3.1.0",
  "info": {
    "title": "Feral File Exhibitions API",
    "description": "API to retrieve exhibitions, series, and artworks from Feral File. Each exhibition contains multiple series, and each series contains artworks. Search exhibitions and series by keyword.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://feralfile.com"
    }
  ],
  "paths": {
    "/api/llm/exhibitions": {
      "get": {
        "operationId": "getExhibitionList",
        "description": "Get a paginated list of exhibitions. Use 'keyword' and sortBy=relevance to search by name.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": { "type": "integer", "default": 5, "maximum": 5 }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": { "type": "integer", "default": 0 }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": { "type": "string", "default": "openAt" }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["ASC", "DESC"],
              "default": "DESC"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "description": "Keyword to search exhibitions by name.",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with exhibition list"
          }
        }
      }
    },
    "/api/llm/series": {
      "get": {
        "operationId": "getSeriesByExhibition",
        "description": "Get a paginated list of series within an exhibition. Use 'keyword' to search series names.",
        "parameters": [
          {
            "name": "exhibitionID",
            "in": "query",
            "required": true,
            "schema": { "type": "string" }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": { "type": "integer", "default": 5, "maximum": 5 }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": { "type": "integer", "default": 0 }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": { "type": "string", "default": "displayIndex" }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["ASC", "DESC"],
              "default": "ASC"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "description": "Keyword to search series by name.",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with series list"
          }
        }
      }
    },
    "/api/llm/artworks": {
      "get": {
        "operationId": "getArtworksBySeries",
        "description": "Get a paginated list of artworks in a given series. If series.settings.maxArtwork == 1, only one artwork with name = series.title.",
        "parameters": [
          {
            "name": "seriesID",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "format": "uuid" }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": { "type": "integer", "default": 5, "maximum": 5 }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": { "type": "integer", "default": 0 }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": { "type": "string", "default": "index" }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["ASC", "DESC"],
              "default": "ASC"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with artworks in the specified series"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}
