{
  "openapi": "3.1.0",
  "info": {
    "title": "AnimeAkashicRecords (AAR) Search & Retrieval Engine",
    "description": "Industrial-Grade, Ultra-Low-Latency (~500ms) Neural Hybrid Search & Retrieval Engine over Anime, Manga, Light Novels, and Visual Novels.\n\n### Recommended Integration Profiles & Use Cases:\n- **Streaming Services & Media Catalogs:** Powers instant search-as-you-type and discovery across titles, obscure character traits, and vague plot descriptions in ~500ms.\n- **AI Chatbots & Conversational RAG:** Provides high-density context blocks with exact provenance, character synergy, and structured metadata to prevent hallucinations.\n- **Autonomous AI Agents:** Operates as a fast, deterministic tool with strict structured scope filtering (years, formats, adult tags) and zero conversational bloat.\n\n### Query Breakdown & Performance Modes:\n- **Default Mode (`query_breakdown=false`):** Blazing-fast native hybrid retrieval fusing dense semantic vectors, lexical search, and neural reranking without LLM overhead (~500ms).\n- **Optional LLM Breakdown (`query_breakdown=true`):** Pass `query_breakdown: true` to decompose complex, multi-part, or comparative queries via an LLM prior to vector retrieval.",
    "version": "1.3.0"
  },
  "servers": [
    {
      "url": "https://api.aarecords.tech",
      "description": "Production API Gateway"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_health_get",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Health Health Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/stats": {
      "get": {
        "summary": "Stats",
        "description": "Public catalog statistics, media counts, and index health.\nExtended cluster and model configs are returned for verified admin keys.",
        "operationId": "stats_stats_get",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stats Stats Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "post": {
        "summary": "Search Post",
        "operationId": "search_post_search_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Search Post Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Search Get",
        "operationId": "search_get_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "Search query or question",
              "title": "Q"
            },
            "description": "Search query or question"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 100,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "description": "Max documents to return",
              "title": "Limit"
            },
            "description": "Max documents to return"
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Explicitly mark query as NSFW/adult to skip LLM query refinement and proceed directly to vector embedding.",
              "default": false,
              "title": "Nsfw"
            },
            "description": "Explicitly mark query as NSFW/adult to skip LLM query refinement and proceed directly to vector embedding."
          },
          {
            "name": "query_breakdown",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Whether to decompose compound queries using an LLM (true, adds ~400-800ms) or use the default high-speed native hybrid engine (~500ms) without LLM decomposition (false). Default: false.",
              "default": false,
              "title": "Query Breakdown"
            },
            "description": "Whether to decompose compound queries using an LLM (true, adds ~400-800ms) or use the default high-speed native hybrid engine (~500ms) without LLM decomposition (false). Default: false."
          },
          {
            "name": "rerank",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Whether to apply cross-encoder reranking. Set to false for ultra-low latency (~250ms). Default: null (follows server config).",
              "title": "Rerank"
            },
            "description": "Whether to apply cross-encoder reranking. Set to false for ultra-low latency (~250ms). Default: null (follows server config)."
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search mode: 'hybrid' or 'semantic'",
              "default": "hybrid",
              "title": "Mode"
            },
            "description": "Search mode: 'hybrid' or 'semantic'"
          },
          {
            "name": "include_text",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include passage text in chunks",
              "default": true,
              "title": "Include Text"
            },
            "description": "Include passage text in chunks"
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Return a minimal, token-efficient payload (~1.2k-1.5k tokens for 10 results) ideal for small-context LLMs and RP bots. Default: false.",
              "default": false,
              "title": "Compact"
            },
            "description": "Return a minimal, token-efficient payload (~1.2k-1.5k tokens for 10 results) ideal for small-context LLMs and RP bots. Default: false."
          },
          {
            "name": "lm_compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true (implies compact=true), distills only query-relevant facts via Ministral 14B into a tiny factual context block. Default: false.",
              "default": false,
              "title": "Lm Compact"
            },
            "description": "When true (implies compact=true), distills only query-relevant facts via Ministral 14B into a tiny factual context block. Default: false."
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Relational details to attach per result (repeatable or comma-separated: staff, characters, relations)",
              "title": "Include"
            },
            "description": "Relational details to attach per result (repeatable or comma-separated: staff, characters, relations)"
          },
          {
            "name": "adult",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter adult content (true/false)",
              "title": "Adult"
            },
            "description": "Filter adult content (true/false)"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by media type (repeatable or comma-separated: anime, manga, visual_novel, light_novel, manhwa, manhua)",
              "title": "Type"
            },
            "description": "Filter by media type (repeatable or comma-separated: anime, manga, visual_novel, light_novel, manhwa, manhua)"
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by genre (repeatable or comma-separated)",
              "title": "Genre"
            },
            "description": "Filter by genre (repeatable or comma-separated)"
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by tag (repeatable or comma-separated)",
              "title": "Tag"
            },
            "description": "Filter by tag (repeatable or comma-separated)"
          },
          {
            "name": "theme",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by theme (repeatable or comma-separated)",
              "title": "Theme"
            },
            "description": "Filter by theme (repeatable or comma-separated)"
          },
          {
            "name": "studio",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by studio (repeatable or comma-separated)",
              "title": "Studio"
            },
            "description": "Filter by studio (repeatable or comma-separated)"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exact release year",
              "title": "Year"
            },
            "description": "Exact release year"
          },
          {
            "name": "min_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum release year",
              "title": "Min Year"
            },
            "description": "Minimum release year"
          },
          {
            "name": "max_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Maximum release year",
              "title": "Max Year"
            },
            "description": "Maximum release year"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by work status (repeatable or comma-separated: finished, releasing, upcoming, cancelled, hiatus)",
              "title": "Status"
            },
            "description": "Filter by work status (repeatable or comma-separated: finished, releasing, upcoming, cancelled, hiatus)"
          },
          {
            "name": "staff",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by staff/person names (repeatable or comma-separated)",
              "title": "Staff"
            },
            "description": "Filter by staff/person names (repeatable or comma-separated)"
          },
          {
            "name": "character",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by character names (repeatable or comma-separated)",
              "title": "Character"
            },
            "description": "Filter by character names (repeatable or comma-separated)"
          },
          {
            "name": "author",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by author names (repeatable or comma-separated)",
              "title": "Author"
            },
            "description": "Filter by author names (repeatable or comma-separated)"
          },
          {
            "name": "required_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by works possessing specific external IDs (e.g. 'tmdb_id', 'tmdb,kitsu', 'mal+imdb'). Empty returns all.",
              "title": "Required Ids"
            },
            "description": "Filter by works possessing specific external IDs (e.g. 'tmdb_id', 'tmdb,kitsu', 'mal+imdb'). Empty returns all."
          },
          {
            "name": "director",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by director names (repeatable or comma-separated)",
              "title": "Director"
            },
            "description": "Filter by director names (repeatable or comma-separated)"
          },
          {
            "name": "composer",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by composer/music names (repeatable or comma-separated)",
              "title": "Composer"
            },
            "description": "Filter by composer/music names (repeatable or comma-separated)"
          },
          {
            "name": "voice_actor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by voice actor names (repeatable or comma-separated)",
              "title": "Voice Actor"
            },
            "description": "Filter by voice actor names (repeatable or comma-separated)"
          },
          {
            "name": "title",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by exact/partial titles (repeatable or comma-separated)",
              "title": "Title"
            },
            "description": "Filter by exact/partial titles (repeatable or comma-separated)"
          },
          {
            "name": "include_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Restrict search strictly to these IDs (repeatable or comma-separated; accepts any supported ID format e.g. mal:52991, al:154587, aar:1, imdb:tt0388629)",
              "title": "Include Ids"
            },
            "description": "Restrict search strictly to these IDs (repeatable or comma-separated; accepts any supported ID format e.g. mal:52991, al:154587, aar:1, imdb:tt0388629)"
          },
          {
            "name": "exclude_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exclude these IDs from search results before reranking (repeatable or comma-separated; accepts any supported ID format)",
              "title": "Exclude Ids"
            },
            "description": "Exclude these IDs from search results before reranking (repeatable or comma-separated; accepts any supported ID format)"
          },
          {
            "name": "min_score",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum score (0-10)",
              "title": "Min Score"
            },
            "description": "Minimum score (0-10)"
          },
          {
            "name": "answer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Compose prose answer using LLM (admin only)",
              "default": false,
              "title": "Answer"
            },
            "description": "Compose prose answer using LLM (admin only)"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Search Get Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/ask": {
      "post": {
        "summary": "Ask",
        "description": "Mirror of /search with AI answer composition permanently enabled.\nReturns ranked documents, chunks, relations, and synthesized answer with citations.",
        "operationId": "ask_ask_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Ask Ask Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Ask Get",
        "description": "GET mirror of /search with AI answer composition permanently enabled.",
        "operationId": "ask_get_ask_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "Search query or question",
              "title": "Q"
            },
            "description": "Search query or question"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 100,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "description": "Max documents to return",
              "title": "Limit"
            },
            "description": "Max documents to return"
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Explicitly mark query as NSFW/adult to skip LLM query refinement and proceed directly to vector embedding.",
              "default": false,
              "title": "Nsfw"
            },
            "description": "Explicitly mark query as NSFW/adult to skip LLM query refinement and proceed directly to vector embedding."
          },
          {
            "name": "query_breakdown",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Whether to decompose compound queries using an LLM (true, adds ~400-800ms) or use the default high-speed native hybrid engine (~500ms) without LLM decomposition (false). Default: false.",
              "default": false,
              "title": "Query Breakdown"
            },
            "description": "Whether to decompose compound queries using an LLM (true, adds ~400-800ms) or use the default high-speed native hybrid engine (~500ms) without LLM decomposition (false). Default: false."
          },
          {
            "name": "rerank",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Whether to apply cross-encoder reranking. Set to false for ultra-low latency (~250ms). Default: null.",
              "title": "Rerank"
            },
            "description": "Whether to apply cross-encoder reranking. Set to false for ultra-low latency (~250ms). Default: null."
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search mode: 'hybrid' or 'semantic'",
              "default": "hybrid",
              "title": "Mode"
            },
            "description": "Search mode: 'hybrid' or 'semantic'"
          },
          {
            "name": "include_text",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include passage text in chunks",
              "default": true,
              "title": "Include Text"
            },
            "description": "Include passage text in chunks"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Relational details to attach per result (repeatable or comma-separated: staff, characters, relations)",
              "title": "Include"
            },
            "description": "Relational details to attach per result (repeatable or comma-separated: staff, characters, relations)"
          },
          {
            "name": "adult",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter adult content (true/false)",
              "title": "Adult"
            },
            "description": "Filter adult content (true/false)"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by media type (repeatable or comma-separated: anime, manga, visual_novel, light_novel, manhwa, manhua)",
              "title": "Type"
            },
            "description": "Filter by media type (repeatable or comma-separated: anime, manga, visual_novel, light_novel, manhwa, manhua)"
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by genre (repeatable or comma-separated)",
              "title": "Genre"
            },
            "description": "Filter by genre (repeatable or comma-separated)"
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by tag (repeatable or comma-separated)",
              "title": "Tag"
            },
            "description": "Filter by tag (repeatable or comma-separated)"
          },
          {
            "name": "theme",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by theme (repeatable or comma-separated)",
              "title": "Theme"
            },
            "description": "Filter by theme (repeatable or comma-separated)"
          },
          {
            "name": "studio",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by studio (repeatable or comma-separated)",
              "title": "Studio"
            },
            "description": "Filter by studio (repeatable or comma-separated)"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exact release year",
              "title": "Year"
            },
            "description": "Exact release year"
          },
          {
            "name": "min_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum release year",
              "title": "Min Year"
            },
            "description": "Minimum release year"
          },
          {
            "name": "max_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Maximum release year",
              "title": "Max Year"
            },
            "description": "Maximum release year"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by work status (repeatable or comma-separated: finished, releasing, upcoming, cancelled, hiatus)",
              "title": "Status"
            },
            "description": "Filter by work status (repeatable or comma-separated: finished, releasing, upcoming, cancelled, hiatus)"
          },
          {
            "name": "min_score",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Minimum score (0-10)",
              "title": "Min Score"
            },
            "description": "Minimum score (0-10)"
          },
          {
            "name": "required_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma or plus-separated required external IDs (e.g. 'tmdb,imdb', 'tmdb_id+tvdb_id')",
              "title": "Required Ids"
            },
            "description": "Comma or plus-separated required external IDs (e.g. 'tmdb,imdb', 'tmdb_id+tvdb_id')"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Ask Get Ask Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/recommend": {
      "post": {
        "summary": "Recommend Post",
        "description": "Content discovery & recommendation endpoint based on vector centroid,\nfranchise/sequel suppression, media type scoping, and tag/genre overlap.",
        "operationId": "recommend_post_recommend_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecommendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecommendResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/recommend/{work_id}": {
      "get": {
        "summary": "Recommend Get",
        "description": "Quick recommendation endpoint for a single work ID.",
        "operationId": "recommend_get_recommend__work_id__get",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Work Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Max recommendations to return",
              "default": 10,
              "title": "Limit"
            },
            "description": "Max recommendations to return"
          },
          {
            "name": "target_scope",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional target media type (e.g. 'anime')",
              "title": "Target Scope"
            },
            "description": "Optional target media type (e.g. 'anime')"
          },
          {
            "name": "exclude_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Whether to suppress sequels and franchise siblings",
              "default": true,
              "title": "Exclude Franchise"
            },
            "description": "Whether to suppress sequels and franchise siblings"
          },
          {
            "name": "adult",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include adult content",
              "default": false,
              "title": "Adult"
            },
            "description": "Include adult content"
          },
          {
            "name": "required_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter recommendations by required external IDs (e.g. 'tmdb', 'tmdb+imdb')",
              "title": "Required Ids"
            },
            "description": "Filter recommendations by required external IDs (e.g. 'tmdb', 'tmdb+imdb')"
          },
          {
            "name": "include_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Restrict recommendations strictly to these IDs (repeatable or comma-separated; accepts any supported ID format)",
              "title": "Include Ids"
            },
            "description": "Restrict recommendations strictly to these IDs (repeatable or comma-separated; accepts any supported ID format)"
          },
          {
            "name": "exclude_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exclude these IDs from recommendations (repeatable or comma-separated; accepts any supported ID format)",
              "title": "Exclude Ids"
            },
            "description": "Exclude these IDs from recommendations (repeatable or comma-separated; accepts any supported ID format)"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecommendResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/suggest": {
      "post": {
        "summary": "Create Contribution",
        "description": "Submit a new user contribution or suggestion (\"اقتراحات أو إضافات\"):\n- ADD_WORK: Report a missing anime, manga, visual novel, or light novel\n- ADD_ALIAS: Suggest a missing alternate title, English name, or Arabic alias\n- EDIT_METADATA: Suggest corrections for tags, year, studios, or synopsis\n- FEATURE_OR_VIBE: Suggest new vibe tags or system features\n\nFeatures automatic deduplication against existing 144k catalog and hash-based upvoting.",
        "operationId": "create_contribution_suggest_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContributionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/contributions": {
      "post": {
        "summary": "Create Contribution",
        "description": "Submit a new user contribution or suggestion (\"اقتراحات أو إضافات\"):\n- ADD_WORK: Report a missing anime, manga, visual novel, or light novel\n- ADD_ALIAS: Suggest a missing alternate title, English name, or Arabic alias\n- EDIT_METADATA: Suggest corrections for tags, year, studios, or synopsis\n- FEATURE_OR_VIBE: Suggest new vibe tags or system features\n\nFeatures automatic deduplication against existing 144k catalog and hash-based upvoting.",
        "operationId": "create_contribution_contributions_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContributionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContributionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/lore/arc-index": {
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Arc Index Query",
        "operationId": "arc_index_query_lore_arc_index_get",
        "parameters": [
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Work ID or prefixed ID (e.g. mal:21, imdb:tt0388629)",
              "title": "Work Id"
            },
            "description": "Work ID or prefixed ID (e.g. mal:21, imdb:tt0388629)"
          },
          {
            "name": "mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mal Id"
            }
          },
          {
            "name": "anilist_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anilist Id"
            }
          },
          {
            "name": "aar_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Aar Id"
            }
          },
          {
            "name": "imdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Imdb Id"
            }
          },
          {
            "name": "tmdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tmdb Id"
            }
          },
          {
            "name": "tvdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tvdb Id"
            }
          },
          {
            "name": "kitsu_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kitsu Id"
            }
          },
          {
            "name": "anidb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anidb Id"
            }
          },
          {
            "name": "anisearch_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anisearch Id"
            }
          },
          {
            "name": "anime_planet_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anime Planet Slug"
            }
          },
          {
            "name": "vndb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Vndb Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Arc Index Query Lore Arc Index Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/lore/arc-index/{work_id}": {
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Arc Index Path",
        "operationId": "arc_index_path_lore_arc_index__work_id__get",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Work Id"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Arc Index Path Lore Arc Index  Work Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/advanced_search": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Search Post",
        "operationId": "advanced_search_post_advanced_search_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Search Post Advanced Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Search Get",
        "operationId": "advanced_search_get_advanced_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "Search query",
              "title": "Q"
            },
            "description": "Search query"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "'scene', 'episode', or 'arc'",
              "default": "scene",
              "title": "Granularity"
            },
            "description": "'scene', 'episode', or 'arc'"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 15,
              "title": "Limit"
            }
          },
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Work Id"
            }
          },
          {
            "name": "canonical_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Canonical Id"
            }
          },
          {
            "name": "aar_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Aar Id"
            }
          },
          {
            "name": "mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mal Id"
            }
          },
          {
            "name": "anilist_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anilist Id"
            }
          },
          {
            "name": "vndb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Vndb Id"
            }
          },
          {
            "name": "kitsu_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kitsu Id"
            }
          },
          {
            "name": "anidb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anidb Id"
            }
          },
          {
            "name": "anisearch_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anisearch Id"
            }
          },
          {
            "name": "anime_planet_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anime Planet Slug"
            }
          },
          {
            "name": "tmdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tmdb Id"
            }
          },
          {
            "name": "imdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Imdb Id"
            }
          },
          {
            "name": "tvdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tvdb Id"
            }
          },
          {
            "name": "franchise_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Franchise Id"
            }
          },
          {
            "name": "include_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true with work_id/mal_id, expand filter to the entire franchise",
              "default": false,
              "title": "Include Franchise"
            },
            "description": "If true with work_id/mal_id, expand filter to the entire franchise"
          },
          {
            "name": "exclude_franchise_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Exclude Franchise Id"
            }
          },
          {
            "name": "episode_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Episode Number"
            }
          },
          {
            "name": "min_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Episode"
            }
          },
          {
            "name": "max_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Episode"
            }
          },
          {
            "name": "arc_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Id"
            }
          },
          {
            "name": "arc_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Name"
            }
          },
          {
            "name": "character",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Single character name, alias, or MAL character ID",
              "title": "Character"
            },
            "description": "Single character name, alias, or MAL character ID"
          },
          {
            "name": "characters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated list of up to 10 characters that must co-appear",
              "title": "Characters"
            },
            "description": "Comma-separated list of up to 10 characters that must co-appear"
          },
          {
            "name": "character_mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Single MyAnimeList character ID (e.g. 723)",
              "title": "Character Mal Id"
            },
            "description": "Single MyAnimeList character ID (e.g. 723)"
          },
          {
            "name": "character_mal_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated list of up to 10 MAL character IDs that must co-appear",
              "title": "Character Mal Ids"
            },
            "description": "Comma-separated list of up to 10 MAL character IDs that must co-appear"
          },
          {
            "name": "concept",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Concept"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location"
            }
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Genre"
            }
          },
          {
            "name": "format_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Format Type"
            }
          },
          {
            "name": "min_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Year"
            }
          },
          {
            "name": "max_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Year"
            }
          },
          {
            "name": "filler_mode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "'all' (default), 'canon_only', or 'filler_only'",
              "default": "all",
              "title": "Filler Mode"
            },
            "description": "'all' (default), 'canon_only', or 'filler_only'"
          },
          {
            "name": "exclude_filler",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Exclude Filler"
            }
          },
          {
            "name": "exclude_recap",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Exclude Recap"
            }
          },
          {
            "name": "use_reranker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Use Reranker"
            }
          },
          {
            "name": "query_breakdown",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Query Breakdown"
            }
          },
          {
            "name": "include_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to restrict search to (any supported ID format)",
              "title": "Include Ids"
            },
            "description": "Comma-separated IDs to restrict search to (any supported ID format)"
          },
          {
            "name": "exclude_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to exclude before reranking (any supported ID format)",
              "title": "Exclude Ids"
            },
            "description": "Comma-separated IDs to exclude before reranking (any supported ID format)"
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false.",
              "default": false,
              "title": "Compact"
            },
            "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false."
          },
          {
            "name": "lm_compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false.",
              "default": false,
              "title": "Lm Compact"
            },
            "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false."
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Search Get Advanced Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/advanced-search": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Search Post",
        "operationId": "advanced_search_post_advanced_search_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Search Post Advanced Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Search Get",
        "operationId": "advanced_search_get_advanced_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "Search query",
              "title": "Q"
            },
            "description": "Search query"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "'scene', 'episode', or 'arc'",
              "default": "scene",
              "title": "Granularity"
            },
            "description": "'scene', 'episode', or 'arc'"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 15,
              "title": "Limit"
            }
          },
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Work Id"
            }
          },
          {
            "name": "canonical_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Canonical Id"
            }
          },
          {
            "name": "aar_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Aar Id"
            }
          },
          {
            "name": "mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mal Id"
            }
          },
          {
            "name": "anilist_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anilist Id"
            }
          },
          {
            "name": "vndb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Vndb Id"
            }
          },
          {
            "name": "kitsu_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kitsu Id"
            }
          },
          {
            "name": "anidb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anidb Id"
            }
          },
          {
            "name": "anisearch_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anisearch Id"
            }
          },
          {
            "name": "anime_planet_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anime Planet Slug"
            }
          },
          {
            "name": "tmdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tmdb Id"
            }
          },
          {
            "name": "imdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Imdb Id"
            }
          },
          {
            "name": "tvdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tvdb Id"
            }
          },
          {
            "name": "franchise_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Franchise Id"
            }
          },
          {
            "name": "include_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true with work_id/mal_id, expand filter to the entire franchise",
              "default": false,
              "title": "Include Franchise"
            },
            "description": "If true with work_id/mal_id, expand filter to the entire franchise"
          },
          {
            "name": "exclude_franchise_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Exclude Franchise Id"
            }
          },
          {
            "name": "episode_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Episode Number"
            }
          },
          {
            "name": "min_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Episode"
            }
          },
          {
            "name": "max_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Episode"
            }
          },
          {
            "name": "arc_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Id"
            }
          },
          {
            "name": "arc_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Name"
            }
          },
          {
            "name": "character",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Single character name, alias, or MAL character ID",
              "title": "Character"
            },
            "description": "Single character name, alias, or MAL character ID"
          },
          {
            "name": "characters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated list of up to 10 characters that must co-appear",
              "title": "Characters"
            },
            "description": "Comma-separated list of up to 10 characters that must co-appear"
          },
          {
            "name": "character_mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Single MyAnimeList character ID (e.g. 723)",
              "title": "Character Mal Id"
            },
            "description": "Single MyAnimeList character ID (e.g. 723)"
          },
          {
            "name": "character_mal_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated list of up to 10 MAL character IDs that must co-appear",
              "title": "Character Mal Ids"
            },
            "description": "Comma-separated list of up to 10 MAL character IDs that must co-appear"
          },
          {
            "name": "concept",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Concept"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location"
            }
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Genre"
            }
          },
          {
            "name": "format_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Format Type"
            }
          },
          {
            "name": "min_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Year"
            }
          },
          {
            "name": "max_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Year"
            }
          },
          {
            "name": "filler_mode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "'all' (default), 'canon_only', or 'filler_only'",
              "default": "all",
              "title": "Filler Mode"
            },
            "description": "'all' (default), 'canon_only', or 'filler_only'"
          },
          {
            "name": "exclude_filler",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Exclude Filler"
            }
          },
          {
            "name": "exclude_recap",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Exclude Recap"
            }
          },
          {
            "name": "use_reranker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Use Reranker"
            }
          },
          {
            "name": "query_breakdown",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Query Breakdown"
            }
          },
          {
            "name": "include_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to restrict search to (any supported ID format)",
              "title": "Include Ids"
            },
            "description": "Comma-separated IDs to restrict search to (any supported ID format)"
          },
          {
            "name": "exclude_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to exclude before reranking (any supported ID format)",
              "title": "Exclude Ids"
            },
            "description": "Comma-separated IDs to exclude before reranking (any supported ID format)"
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false.",
              "default": false,
              "title": "Compact"
            },
            "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false."
          },
          {
            "name": "lm_compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false.",
              "default": false,
              "title": "Lm Compact"
            },
            "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false."
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Search Get Advanced Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/advanced_recommend": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Recommend Post",
        "operationId": "advanced_recommend_post_advanced_recommend_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedRecommendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Recommend Post Advanced Recommend Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Recommend Get",
        "operationId": "advanced_recommend_get_advanced_recommend_get",
        "parameters": [
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "'scene', 'episode', or 'arc'",
              "default": "scene",
              "title": "Granularity"
            },
            "description": "'scene', 'episode', or 'arc'"
          },
          {
            "name": "seed_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Positive seed ID (scene_id, episode_id, arc_id, or work#ep/arc)",
              "title": "Seed Id"
            },
            "description": "Positive seed ID (scene_id, episode_id, arc_id, or work#ep/arc)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Positive natural-language description",
              "title": "Q"
            },
            "description": "Positive natural-language description"
          },
          {
            "name": "negative_q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Negative natural-language description",
              "title": "Negative Q"
            },
            "description": "Negative natural-language description"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 15,
              "title": "Limit"
            }
          },
          {
            "name": "exclude_same_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Exclude Same Franchise"
            }
          },
          {
            "name": "exclude_same_work",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Exclude Same Work"
            }
          },
          {
            "name": "max_per_work",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2,
              "title": "Max Per Work"
            }
          },
          {
            "name": "min_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Year"
            }
          },
          {
            "name": "max_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Year"
            }
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Genre"
            }
          },
          {
            "name": "format_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Format Type"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Recommend Get Advanced Recommend Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/advanced-recommend": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Recommend Post",
        "operationId": "advanced_recommend_post_advanced_recommend_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedRecommendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Recommend Post Advanced Recommend Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Advanced Recommend Get",
        "operationId": "advanced_recommend_get_advanced_recommend_get",
        "parameters": [
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "'scene', 'episode', or 'arc'",
              "default": "scene",
              "title": "Granularity"
            },
            "description": "'scene', 'episode', or 'arc'"
          },
          {
            "name": "seed_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Positive seed ID (scene_id, episode_id, arc_id, or work#ep/arc)",
              "title": "Seed Id"
            },
            "description": "Positive seed ID (scene_id, episode_id, arc_id, or work#ep/arc)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Positive natural-language description",
              "title": "Q"
            },
            "description": "Positive natural-language description"
          },
          {
            "name": "negative_q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Negative natural-language description",
              "title": "Negative Q"
            },
            "description": "Negative natural-language description"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 15,
              "title": "Limit"
            }
          },
          {
            "name": "exclude_same_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Exclude Same Franchise"
            }
          },
          {
            "name": "exclude_same_work",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Exclude Same Work"
            }
          },
          {
            "name": "max_per_work",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2,
              "title": "Max Per Work"
            }
          },
          {
            "name": "min_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Year"
            }
          },
          {
            "name": "max_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Year"
            }
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Genre"
            }
          },
          {
            "name": "format_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Format Type"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Advanced Recommend Get Advanced Recommend Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/lore_ask": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Lore Ask Post",
        "operationId": "lore_ask_post_lore_ask_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoreAskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lore Ask Post Lore Ask Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Lore Ask Get",
        "operationId": "lore_ask_get_lore_ask_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "Question about anime scenes, episodes, or arcs",
              "title": "Q"
            },
            "description": "Question about anime scenes, episodes, or arcs"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "'scene', 'episode', or 'arc'",
              "default": "scene",
              "title": "Granularity"
            },
            "description": "'scene', 'episode', or 'arc'"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 8,
              "title": "Limit"
            }
          },
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Work Id"
            }
          },
          {
            "name": "mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mal Id"
            }
          },
          {
            "name": "anilist_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anilist Id"
            }
          },
          {
            "name": "imdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Imdb Id"
            }
          },
          {
            "name": "anime_planet_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anime Planet Slug"
            }
          },
          {
            "name": "anidb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anidb Id"
            }
          },
          {
            "name": "arc_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Id"
            }
          },
          {
            "name": "arc_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Name"
            }
          },
          {
            "name": "episode_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Episode Number"
            }
          },
          {
            "name": "min_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Episode"
            }
          },
          {
            "name": "max_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Episode"
            }
          },
          {
            "name": "character",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Character"
            }
          },
          {
            "name": "concept",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Concept"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location"
            }
          },
          {
            "name": "query_breakdown",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Query Breakdown"
            }
          },
          {
            "name": "include_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to restrict search to",
              "title": "Include Ids"
            },
            "description": "Comma-separated IDs to restrict search to"
          },
          {
            "name": "exclude_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to exclude",
              "title": "Exclude Ids"
            },
            "description": "Comma-separated IDs to exclude"
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false.",
              "default": false,
              "title": "Compact"
            },
            "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false."
          },
          {
            "name": "lm_compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false.",
              "default": false,
              "title": "Lm Compact"
            },
            "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false."
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lore Ask Get Lore Ask Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/lore-ask": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Lore Ask Post",
        "operationId": "lore_ask_post_lore_ask_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoreAskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lore Ask Post Lore Ask Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Lore Ask Get",
        "operationId": "lore_ask_get_lore_ask_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000,
              "description": "Question about anime scenes, episodes, or arcs",
              "title": "Q"
            },
            "description": "Question about anime scenes, episodes, or arcs"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "'scene', 'episode', or 'arc'",
              "default": "scene",
              "title": "Granularity"
            },
            "description": "'scene', 'episode', or 'arc'"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 8,
              "title": "Limit"
            }
          },
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Work Id"
            }
          },
          {
            "name": "mal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mal Id"
            }
          },
          {
            "name": "anilist_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anilist Id"
            }
          },
          {
            "name": "imdb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Imdb Id"
            }
          },
          {
            "name": "anime_planet_slug",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anime Planet Slug"
            }
          },
          {
            "name": "anidb_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Anidb Id"
            }
          },
          {
            "name": "arc_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Id"
            }
          },
          {
            "name": "arc_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Arc Name"
            }
          },
          {
            "name": "episode_number",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Episode Number"
            }
          },
          {
            "name": "min_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Episode"
            }
          },
          {
            "name": "max_episode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Episode"
            }
          },
          {
            "name": "character",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Character"
            }
          },
          {
            "name": "concept",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Concept"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Location"
            }
          },
          {
            "name": "query_breakdown",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Query Breakdown"
            }
          },
          {
            "name": "include_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to restrict search to",
              "title": "Include Ids"
            },
            "description": "Comma-separated IDs to restrict search to"
          },
          {
            "name": "exclude_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated IDs to exclude",
              "title": "Exclude Ids"
            },
            "description": "Comma-separated IDs to exclude"
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false.",
              "default": false,
              "title": "Compact"
            },
            "description": "Return a minimal, token-efficient payload ideal for small-context LLMs and RP platforms. Default: false."
          },
          {
            "name": "lm_compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false.",
              "default": false,
              "title": "Lm Compact"
            },
            "description": "When true (implies compact=true; Pro tier or higher), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block. Default: false."
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lore Ask Get Lore Ask Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/track": {
      "post": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Log referral or UTM visit",
        "operationId": "track_visit_track_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrackPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Track Visit Track Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/autocomplete/characters": {
      "get": {
        "tags": [
          "Advanced Lore Engine (Scenes / Episodes / Arcs)"
        ],
        "summary": "Autocomplete Characters",
        "description": "Autocomplete lore-indexed characters with MAL IDs and portrait images.",
        "operationId": "autocomplete_characters_autocomplete_characters_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 120,
              "description": "Character name or alias prefix/substring",
              "default": "",
              "title": "Q"
            },
            "description": "Character name or alias prefix/substring"
          },
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional work ID (any supported format) to scope characters",
              "title": "Work Id"
            },
            "description": "Optional work ID (any supported format) to scope characters"
          },
          {
            "name": "include_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "If true with work_id, include characters across the full franchise",
              "default": false,
              "title": "Include Franchise"
            },
            "description": "If true with work_id, include characters across the full franchise"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 8,
              "title": "Limit"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Autocomplete Characters Autocomplete Characters Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/character/search": {
      "get": {
        "tags": [
          "Character Visuals"
        ],
        "summary": "Search characters by visual appearance (Pro+ / Normal Tier)",
        "operationId": "character_search_get_character_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 500,
              "description": "Visual appearance description",
              "title": "Q"
            },
            "description": "Visual appearance description"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 30,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "male",
                    "female",
                    "ambiguous",
                    "non_human",
                    "unknown"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Allowed: male, female, ambiguous, non_human, unknown",
              "title": "Gender"
            },
            "description": "Allowed: male, female, ambiguous, non_human, unknown"
          },
          {
            "name": "age_group",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "infant",
                    "child",
                    "teen",
                    "young_adult",
                    "adult",
                    "middle_aged",
                    "elderly",
                    "ageless_or_unknown"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Allowed: infant, child, teen, young_adult, adult, middle_aged, elderly, ageless_or_unknown",
              "title": "Age Group"
            },
            "description": "Allowed: infant, child, teen, young_adult, adult, middle_aged, elderly, ageless_or_unknown"
          },
          {
            "name": "species",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Species"
            }
          },
          {
            "name": "work_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Work Id"
            }
          },
          {
            "name": "use_reranker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Use Reranker"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Character Search Get Character Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Character Visuals"
        ],
        "summary": "Search characters by visual appearance (Pro+ / Normal Tier)",
        "operationId": "character_search_post_character_search_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CharacterSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Character Search Post Character Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/character/{mal_id}/similar": {
      "get": {
        "tags": [
          "Character Visuals"
        ],
        "summary": "Find visually similar anime/manga characters (Pro+ / Normal Tier)",
        "operationId": "get_similar_characters_character__mal_id__similar_get",
        "parameters": [
          {
            "name": "mal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Mal Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 30,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "exclude_same_franchise",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Exclude characters from the same franchise/series",
              "default": true,
              "title": "Exclude Same Franchise"
            },
            "description": "Exclude characters from the same franchise/series"
          },
          {
            "name": "exclude_same_work",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Exclude characters from the exact same work",
              "default": true,
              "title": "Exclude Same Work"
            },
            "description": "Exclude characters from the exact same work"
          },
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "male",
                    "female",
                    "ambiguous",
                    "non_human",
                    "unknown"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Allowed: male, female, ambiguous, non_human, unknown",
              "title": "Gender"
            },
            "description": "Allowed: male, female, ambiguous, non_human, unknown"
          },
          {
            "name": "age_group",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "infant",
                    "child",
                    "teen",
                    "young_adult",
                    "adult",
                    "middle_aged",
                    "elderly",
                    "ageless_or_unknown"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Allowed: infant, child, teen, young_adult, adult, middle_aged, elderly, ageless_or_unknown",
              "title": "Age Group"
            },
            "description": "Allowed: infant, child, teen, young_adult, adult, middle_aged, elderly, ageless_or_unknown"
          },
          {
            "name": "species",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Species"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Similar Characters Character  Mal Id  Similar Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/resolve": {
      "get": {
        "summary": "Public Resolve Entity",
        "operationId": "public_resolve_entity_resolve_get",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300,
              "description": "Title, alias, or external ID to resolve",
              "title": "Name"
            },
            "description": "Title, alias, or external ID to resolve"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Public Resolve Entity Resolve Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/utility/import-list": {
      "get": {
        "summary": "Public Import Profile List",
        "description": "Import a user's public AniList or MyAnimeList profile into AAR work IDs:\nreturns positive_seeds (high-rated), negative_seeds (low-rated/dropped),\nwatched_ids (for exclude_ids), and plan_to_watch_ids (for include_ids).",
        "operationId": "public_import_profile_list_utility_import_list_get",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Profile platform: 'anilist' or 'mal'",
              "default": "anilist",
              "title": "Source"
            },
            "description": "Profile platform: 'anilist' or 'mal'"
          },
          {
            "name": "username",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "description": "Public AniList or MyAnimeList username",
              "title": "Username"
            },
            "description": "Public AniList or MyAnimeList username"
          },
          {
            "name": "media_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "List media type: 'anime' or 'manga'",
              "default": "anime",
              "title": "Media Type"
            },
            "description": "List media type: 'anime' or 'manga'"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Public Import Profile List Utility Import List Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "Get Llms Txt",
        "operationId": "get_llms_txt_llms_txt_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdvancedRecommendRequest": {
        "properties": {
          "granularity": {
            "type": "string",
            "title": "Granularity",
            "description": "'scene', 'episode', or 'arc'",
            "default": "scene"
          },
          "positive_ids": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "additionalProperties": true,
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Positive Ids",
            "description": "Positive seed IDs or dicts"
          },
          "negative_ids": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "additionalProperties": true,
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Ids",
            "description": "Negative seed IDs or dicts"
          },
          "positive_queries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Positive Queries",
            "description": "Positive natural-language descriptions"
          },
          "negative_queries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Queries",
            "description": "Negative natural-language descriptions"
          },
          "limit": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 15
          },
          "exclude_same_franchise": {
            "type": "boolean",
            "title": "Exclude Same Franchise",
            "default": true
          },
          "exclude_same_work": {
            "type": "boolean",
            "title": "Exclude Same Work",
            "default": true
          },
          "max_per_work": {
            "type": "integer",
            "title": "Max Per Work",
            "default": 2
          },
          "min_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Year"
          },
          "max_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Year"
          },
          "genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "format_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format Type"
          },
          "character": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character"
          },
          "concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Concept"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "include_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Ids",
            "description": "Restrict recommendations strictly to these IDs (any supported ID format)"
          },
          "exclude_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Ids",
            "description": "Exclude these IDs from recommendations (any supported ID format)"
          }
        },
        "type": "object",
        "title": "AdvancedRecommendRequest"
      },
      "AdvancedSearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query",
            "description": "Scene, episode, or arc search query"
          },
          "granularity": {
            "type": "string",
            "title": "Granularity",
            "description": "'scene', 'episode', or 'arc'",
            "default": "scene"
          },
          "limit": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 15
          },
          "work_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Id",
            "description": "Any of the 10 ID formats (e.g. 'mal:21', 'imdb:tt0388629', 'ap:one-piece')"
          },
          "canonical_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Id"
          },
          "aar_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aar Id"
          },
          "mal_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mal Id"
          },
          "anilist_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anilist Id"
          },
          "vndb_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vndb Id"
          },
          "kitsu_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kitsu Id"
          },
          "anidb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anidb Id"
          },
          "anisearch_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anisearch Id"
          },
          "anime_planet_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anime Planet Slug"
          },
          "tmdb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tmdb Id"
          },
          "imdb_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imdb Id"
          },
          "tvdb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tvdb Id"
          },
          "franchise_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Franchise Id"
          },
          "include_franchise": {
            "type": "boolean",
            "title": "Include Franchise",
            "description": "If true with work_id/mal_id, expand filter to the entire franchise",
            "default": false
          },
          "exclude_franchise_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Franchise Id"
          },
          "episode_number": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Episode Number"
          },
          "min_episode": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Episode"
          },
          "max_episode": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Episode"
          },
          "arc_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arc Id"
          },
          "arc_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arc Name"
          },
          "character": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character",
            "description": "Single character name, alias, or MAL character ID (e.g. 'Nami' or 'mal_char:723')"
          },
          "characters": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Characters",
            "description": "Up to 10 characters (names, aliases, or 'mal_char:<id>') that must ALL co-appear in the scene/episode"
          },
          "character_mal_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character Mal Id",
            "description": "Single MyAnimeList character ID (e.g. 723 for Nami)"
          },
          "character_mal_ids": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character Mal Ids",
            "description": "Up to 10 MyAnimeList character IDs (e.g. [723, 40]) that must ALL co-appear in the scene/episode"
          },
          "concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Concept"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "format_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format Type"
          },
          "min_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Year"
          },
          "max_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Year"
          },
          "filler_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filler Mode",
            "description": "Episode canon filter: 'all' (default), 'canon_only' (excludes filler & recap), or 'filler_only'",
            "default": "all"
          },
          "exclude_filler": {
            "type": "boolean",
            "title": "Exclude Filler",
            "description": "Optional (default false). If true, excludes MAL-flagged filler episodes/scenes.",
            "default": false
          },
          "exclude_recap": {
            "type": "boolean",
            "title": "Exclude Recap",
            "description": "Optional (default false). If true, excludes MAL-flagged recap episodes/scenes.",
            "default": false
          },
          "use_reranker": {
            "type": "boolean",
            "title": "Use Reranker",
            "default": true
          },
          "query_breakdown": {
            "type": "boolean",
            "title": "Query Breakdown",
            "default": false
          },
          "include_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Ids",
            "description": "Restrict results strictly to these IDs (any supported ID format)"
          },
          "exclude_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Ids",
            "description": "Exclude these IDs before reranking (any supported ID format)"
          },
          "compact": {
            "type": "boolean",
            "title": "Compact",
            "description": "Return a minimal, token-efficient payload (~680 tokens for 5 scenes / ~1.3k for 10 scenes) ideal for small-context LLMs and RP platforms. Default: false.",
            "default": false
          },
          "lm_compact": {
            "type": "boolean",
            "title": "Lm Compact",
            "description": "When true (implies compact=true), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block without truncation. Default: false.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "AdvancedSearchRequest"
      },
      "CharacterSearchRequest": {
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 500,
            "minLength": 2,
            "title": "Q",
            "description": "Visual appearance description query"
          },
          "limit": {
            "type": "integer",
            "maximum": 30.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 10
          },
          "gender": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "male",
                  "female",
                  "ambiguous",
                  "non_human",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Gender",
            "description": "Filter by gender: male, female, ambiguous, non_human, unknown"
          },
          "age_group": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "infant",
                  "child",
                  "teen",
                  "young_adult",
                  "adult",
                  "middle_aged",
                  "elderly",
                  "ageless_or_unknown"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Age Group",
            "description": "Filter by age_group: infant, child, teen, young_adult, adult, middle_aged, elderly, ageless_or_unknown"
          },
          "species": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Species",
            "description": "Filter by species: human, angel, elf, demon, etc."
          },
          "work_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Id",
            "description": "Optional work ID to restrict search to characters in that work"
          },
          "use_reranker": {
            "type": "boolean",
            "title": "Use Reranker",
            "description": "Enable neural reranking for high-precision visual ranking",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "q"
        ],
        "title": "CharacterSearchRequest"
      },
      "ContributionCreateRequest": {
        "properties": {
          "contribution_type": {
            "$ref": "#/components/schemas/ContributionType",
            "description": "Type: ADD_WORK, ADD_ALIAS, EDIT_METADATA, FEATURE_OR_VIBE"
          },
          "media_type": {
            "$ref": "#/components/schemas/MediaType",
            "description": "Media type: anime, manga, visual_novel, light_novel, manhwa, manhua",
            "default": "anime"
          },
          "title": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "title": "Title",
            "description": "Title of the work or suggestion summary"
          },
          "target_work_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Work Id",
            "description": "Target work ID (required for ADD_ALIAS or EDIT_METADATA)"
          },
          "alt_titles": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 15,
            "title": "Alt Titles",
            "description": "Alternative names or aliases"
          },
          "synopsis_or_note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3000
              },
              {
                "type": "null"
              }
            ],
            "title": "Synopsis Or Note",
            "description": "Notes, reason, or curator remarks"
          },
          "custom_description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Description",
            "description": "User-provided synopsis, review, or detailed custom description of the work"
          },
          "suggested_tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 30,
            "title": "Suggested Tags",
            "description": "Tags, themes, or genres"
          },
          "reference_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Url",
            "description": "MAL, AniList, VNDB, or official link"
          },
          "submitter_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Submitter Id",
            "default": "anonymous"
          }
        },
        "type": "object",
        "required": [
          "contribution_type",
          "title"
        ],
        "title": "ContributionCreateRequest"
      },
      "ContributionResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          },
          "submission_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submission Id"
          },
          "canonical_work_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Work Id"
          },
          "upvotes_count": {
            "type": "integer",
            "title": "Upvotes Count",
            "default": 1
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "title": "ContributionResponse"
      },
      "ContributionType": {
        "type": "string",
        "enum": [
          "ADD_WORK",
          "ADD_ALIAS",
          "EDIT_METADATA",
          "FEATURE_OR_VIBE"
        ],
        "title": "ContributionType"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "LoreAskRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query",
            "description": "Scene, episode, or arc search query"
          },
          "granularity": {
            "type": "string",
            "title": "Granularity",
            "description": "'scene', 'episode', or 'arc'",
            "default": "scene"
          },
          "limit": {
            "type": "integer",
            "maximum": 25.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 8
          },
          "work_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Id",
            "description": "Any of the 10 ID formats (e.g. 'mal:21', 'imdb:tt0388629', 'ap:one-piece')"
          },
          "canonical_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Id"
          },
          "aar_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aar Id"
          },
          "mal_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mal Id"
          },
          "anilist_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anilist Id"
          },
          "vndb_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vndb Id"
          },
          "kitsu_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kitsu Id"
          },
          "anidb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anidb Id"
          },
          "anisearch_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anisearch Id"
          },
          "anime_planet_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anime Planet Slug"
          },
          "tmdb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tmdb Id"
          },
          "imdb_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imdb Id"
          },
          "tvdb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tvdb Id"
          },
          "franchise_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Franchise Id"
          },
          "include_franchise": {
            "type": "boolean",
            "title": "Include Franchise",
            "description": "If true with work_id/mal_id, expand filter to the entire franchise",
            "default": false
          },
          "exclude_franchise_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Franchise Id"
          },
          "episode_number": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Episode Number"
          },
          "min_episode": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Episode"
          },
          "max_episode": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Episode"
          },
          "arc_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arc Id"
          },
          "arc_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arc Name"
          },
          "character": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character",
            "description": "Single character name, alias, or MAL character ID (e.g. 'Nami' or 'mal_char:723')"
          },
          "characters": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Characters",
            "description": "Up to 10 characters (names, aliases, or 'mal_char:<id>') that must ALL co-appear in the scene/episode"
          },
          "character_mal_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character Mal Id",
            "description": "Single MyAnimeList character ID (e.g. 723 for Nami)"
          },
          "character_mal_ids": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character Mal Ids",
            "description": "Up to 10 MyAnimeList character IDs (e.g. [723, 40]) that must ALL co-appear in the scene/episode"
          },
          "concept": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Concept"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "format_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format Type"
          },
          "min_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Year"
          },
          "max_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Year"
          },
          "filler_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filler Mode",
            "description": "Episode canon filter: 'all' (default), 'canon_only' (excludes filler & recap), or 'filler_only'",
            "default": "all"
          },
          "exclude_filler": {
            "type": "boolean",
            "title": "Exclude Filler",
            "description": "Optional (default false). If true, excludes MAL-flagged filler episodes/scenes.",
            "default": false
          },
          "exclude_recap": {
            "type": "boolean",
            "title": "Exclude Recap",
            "description": "Optional (default false). If true, excludes MAL-flagged recap episodes/scenes.",
            "default": false
          },
          "use_reranker": {
            "type": "boolean",
            "title": "Use Reranker",
            "default": true
          },
          "query_breakdown": {
            "type": "boolean",
            "title": "Query Breakdown",
            "default": false
          },
          "include_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Ids",
            "description": "Restrict results strictly to these IDs (any supported ID format)"
          },
          "exclude_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Ids",
            "description": "Exclude these IDs before reranking (any supported ID format)"
          },
          "compact": {
            "type": "boolean",
            "title": "Compact",
            "description": "Return a minimal, token-efficient payload (~680 tokens for 5 scenes / ~1.3k for 10 scenes) ideal for small-context LLMs and RP platforms. Default: false.",
            "default": false
          },
          "lm_compact": {
            "type": "boolean",
            "title": "Lm Compact",
            "description": "When true (implies compact=true), distills only query-relevant lore facts via Ministral 14B into a tiny factual context block without truncation. Default: false.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "LoreAskRequest"
      },
      "MediaType": {
        "type": "string",
        "enum": [
          "anime",
          "manga",
          "visual_novel",
          "light_novel",
          "manhwa",
          "manhua",
          "all"
        ],
        "title": "MediaType"
      },
      "RecommendRequest": {
        "properties": {
          "seed_work_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 100,
            "minItems": 1,
            "title": "Seed Work Ids",
            "description": "1 to 100 canonical work IDs (e.g. ['work:anime:mal_9253_al_9253'])"
          },
          "negative_work_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Negative Work Ids",
            "description": "Optional disliked work IDs to steer away from (up to 100)"
          },
          "target_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Scope",
            "description": "Optional media type filter: 'anime', 'manga', 'visual_novel', 'light_novel', 'manhwa', 'manhua'"
          },
          "exclude_same_franchise": {
            "type": "boolean",
            "title": "Exclude Same Franchise",
            "description": "Whether to suppress sequels, prequels, movies, and spin-offs of seed works via DB relation graph",
            "default": true
          },
          "include_adult": {
            "type": "boolean",
            "title": "Include Adult",
            "description": "Include adult/NSFW content in recommendations",
            "default": false
          },
          "include_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Include Ids",
            "description": "Restrict recommendations strictly to these IDs (accepts any supported ID format: work_id, mal:..., al:..., aar:..., vndb:..., imdb:..., tmdb:..., kitsu:..., anidb:..., tvdb:..., ap:...)"
          },
          "exclude_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Exclude Ids",
            "description": "Exclude these IDs from recommendations (accepts any supported ID format)"
          },
          "required_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required Ids",
            "description": "Require external IDs e.g. ['tmdb', 'imdb', 'tvdb'] or 'tmdb,imdb'"
          },
          "limit": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 10
          }
        },
        "type": "object",
        "required": [
          "seed_work_ids"
        ],
        "title": "RecommendRequest"
      },
      "RecommendResponse": {
        "properties": {
          "seed_work_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Seed Work Ids"
          },
          "target_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Scope"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "latency_ms": {
            "type": "number",
            "title": "Latency Ms"
          },
          "recommendations": {
            "items": {
              "$ref": "#/components/schemas/RecommendedWorkItem"
            },
            "type": "array",
            "title": "Recommendations"
          }
        },
        "type": "object",
        "required": [
          "seed_work_ids",
          "target_scope",
          "total",
          "latency_ms",
          "recommendations"
        ],
        "title": "RecommendResponse"
      },
      "RecommendedWorkItem": {
        "properties": {
          "aar_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aar Id"
          },
          "work_id": {
            "type": "string",
            "title": "Work Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "title_english": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title English"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "release_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Year"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "popularity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Popularity"
          },
          "final_score": {
            "type": "number",
            "title": "Final Score"
          },
          "vector_similarity": {
            "type": "number",
            "title": "Vector Similarity"
          },
          "tag_overlap_score": {
            "type": "number",
            "title": "Tag Overlap Score"
          },
          "shared_tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Shared Tags"
          },
          "genres": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Genres"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "mal_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mal Id"
          },
          "anilist_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anilist Id"
          },
          "vndb_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vndb Id"
          },
          "kitsu_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kitsu Id"
          },
          "anidb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anidb Id"
          },
          "anisearch_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anisearch Id"
          },
          "anime_planet_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Anime Planet Slug"
          },
          "format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format"
          },
          "tmdb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tmdb Id"
          },
          "tmdb_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tmdb Type"
          },
          "tmdb_season": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tmdb Season"
          },
          "imdb_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imdb Id"
          },
          "tvdb_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tvdb Id"
          },
          "merged_works": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Merged Works"
          }
        },
        "type": "object",
        "required": [
          "work_id",
          "title",
          "type",
          "final_score",
          "vector_similarity",
          "tag_overlap_score",
          "shared_tags",
          "genres"
        ],
        "title": "RecommendedWorkItem"
      },
      "ScopeIn": {
        "properties": {
          "types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Types"
          },
          "genres": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genres"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "themes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Themes"
          },
          "studios": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Studios"
          },
          "years": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Years"
          },
          "min_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Year"
          },
          "max_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Year"
          },
          "min_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Score"
          },
          "min_episodes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Episodes"
          },
          "max_episodes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Episodes"
          },
          "episodes": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Episodes"
          },
          "buckets": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Buckets"
          },
          "statuses": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Statuses"
          },
          "status": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "adult": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Adult"
          },
          "work_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Ids"
          },
          "exclude_work_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Work Ids"
          },
          "titles": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Titles"
          },
          "staff_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Staff Names"
          },
          "director_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Director Names"
          },
          "author_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Names"
          },
          "composer_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer Names"
          },
          "voice_actor_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Actor Names"
          },
          "character_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Character Names"
          },
          "required_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ScopeIn",
        "description": "Hard corpus scope. Unknown fields are rejected rather than ignored."
      },
      "SearchRequest": {
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Question"
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScopeIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          },
          "include_text": {
            "type": "boolean",
            "title": "Include Text",
            "default": true
          },
          "compact": {
            "type": "boolean",
            "title": "Compact",
            "description": "Return a minimal, token-efficient payload (~1.2k-1.5k tokens for 10 results) ideal for small-context LLMs and RP bots. Drops chunks, merged_works, sources, and trims descriptions. Default: false.",
            "default": false
          },
          "lm_compact": {
            "type": "boolean",
            "title": "Lm Compact",
            "description": "When true (implies compact=true), distills only query-relevant facts via Ministral 14B into a tiny factual context block for small-context RP/LLM models. Default: false.",
            "default": false
          },
          "include": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include"
          },
          "answer": {
            "type": "boolean",
            "title": "Answer",
            "default": false
          },
          "mode": {
            "type": "string",
            "title": "Mode",
            "description": "Search mode: 'hybrid' (lexical + semantic vectors) or 'semantic' (pure semantic vectors)",
            "default": "hybrid"
          },
          "nsfw": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nsfw",
            "description": "Explicitly mark query as NSFW/adult to skip LLM query refinement and proceed directly to vector embedding.",
            "default": false
          },
          "query_breakdown": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query Breakdown",
            "description": "Whether to decompose compound queries using an LLM (true, adds ~400-800ms) or use the default high-speed native hybrid engine (~500ms) without LLM decomposition (false). Default: false.",
            "default": false
          },
          "required_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required Ids",
            "description": "Filter results to works having specific IDs (e.g. 'tmdb', 'imdb', 'tvdb', 'mal', 'anilist', 'anidb', 'kitsu', 'vndb', 'anisearch', 'anime_planet'). Empty returns all."
          },
          "rerank": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rerank",
            "description": "Whether to apply cross-encoder reranking. Set to false for ultra-low latency (~250ms). Default: null (follows server config)."
          }
        },
        "type": "object",
        "required": [
          "question"
        ],
        "title": "SearchRequest"
      },
      "TrackPayload": {
        "properties": {
          "utm_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source"
          },
          "utm_medium": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium"
          },
          "utm_campaign": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref"
          },
          "referrer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Referrer"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          }
        },
        "type": "object",
        "title": "TrackPayload"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}