{
  "openapi": "3.1.0",
  "info": {
    "title": "AviSeek API",
    "version": "1.0.0",
    "description": "Search API for the AviSeek VRChat avatar index.\n\n**Public catalog and world API.** Anyone may build a VRChat world using the public API without account linking or a key. Commercial resale of the API requires written permission. See the [Terms of Service](/terms).\n\nIndex data is aggregated by [VRC Nexus](https://vrc-nexus.com/).\n\n### Rate limits\nEvery endpoint is rate limited per IP address. Responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`; a `429` also carries `Retry-After`. Read those headers rather than guessing - the limits below are the current values, not a promise.\n\n| Group | Limit |\n| --- | --- |\n| Avatar search and read endpoints | 600 / minute |\n| Typeahead (`/avatars/suggest`) | 900 / minute |\n| Bulk catalog (`/avatars/all`) | 30 / minute |\n| Submissions | 500 IDs / minute, 3000 / hour |\n| VRCX provider (`/vrcx`) | 120 / minute |\n| Reports | 5 / minute |\n| Signed-in writes | 30 / minute |\n| World endpoints | 240 / minute |\n| Global backstop (default) | 1200 / minute |",
    "contact": {
      "name": "VRChat Legends",
      "url": "https://vrchatlegends.com"
    },
    "license": {
      "name": "Personal, non-commercial use only",
      "url": "https://aviseek.vrchatlegends.com/terms"
    }
  },
  "servers": [
    {
      "url": "https://aviseek.vrchatlegends.com/api",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Catalog",
      "description": "Search the index. No authentication needed."
    },
    {
      "name": "Embeds",
      "description": "Badges, oEmbed and widgets for linking to AviSeek. No authentication needed."
    },
    {
      "name": "Insights",
      "description": "Public analytics for every listed avatar. Anonymous aggregates only, no authentication needed."
    },
    {
      "name": "Account",
      "description": "Requires a VRChat Legends session cookie. Sign in at /login."
    },
    {
      "name": "Creator",
      "description": "Description-code claims and analytics for signed-in creators."
    },
    {
      "name": "VRCX",
      "description": "Avatar database provider for VRCX. Paste https://aviapi.vrchatlegends.com/api/vrcx into VRCX under Settings > Advanced > Avatar database provider."
    },
    {
      "name": "Worlds",
      "description": "Plain GET, plain JSON, no key. Built for VRChat worlds (Udon `VRCStringDownloader` + a JSON parser) but usable by any client. Lists are long: `limit` up to 500, `/world/all` pages 1000 at a time."
    }
  ],
  "components": {
    "schemas": {
      "Avatar": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "avtr_00000000-1111-2222-3333-444444444444"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "authorId": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "authorVrclUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public VRChat Legends profile, when the creator has a verified one."
          },
          "imageUrl": {
            "type": "string",
            "description": "VRChat CDN thumbnail. Empty when we have no image we are allowed to serve."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags as published by VRChat."
          },
          "aiTags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags AviSeek derived from the name and description, drawn from a fixed vocabulary."
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pc",
                "quest",
                "ios"
              ]
            }
          },
          "performance": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "Excellent",
                "Good",
                "Medium",
                "Poor",
                "Very Poor"
              ]
            },
            "description": "Known per-platform ratings keyed by pc, quest or ios. Missing means unknown."
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "views": {
            "type": "integer"
          },
          "likes": {
            "type": "integer"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "WorldList": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "now": {
            "type": "string",
            "format": "date-time"
          },
          "total": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Pass as `offset` for the next page; null when done."
          },
          "avatars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Avatar"
            }
          }
        }
      },
      "VrcxAvatar": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "authorId": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "thumbnailImageUrl": {
            "type": "string"
          },
          "releaseStatus": {
            "type": "string",
            "enum": [
              "public"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "aviseekUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "securitySchemes": {
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "aviseek_session",
        "description": "Set by signing in with VRChat Legends."
      }
    }
  },
  "paths": {
    "/image-search/image": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Find avatars with visually similar thumbnails",
        "description": "Send raw JPG, PNG or WebP bytes (not multipart), up to 5 MiB and 20 million decoded pixels. Uploads are processed in memory, metadata is stripped and no upload or query vector is saved. Searches use cached thumbnail vectors; no thumbnails are fetched during search. Near-identical pHash matches rank first. Shared image/text limits: 10 requests/client/minute and 60 overall/minute.",
        "requestBody": {
          "required": true,
          "content": {
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Public avatar cards with cosine similarity, matchType, indexed count, model and dimensions."
          },
          "400": {
            "description": "Invalid image or description."
          },
          "413": {
            "description": "Upload exceeds 5 MiB."
          },
          "429": {
            "description": "Search rate limit reached. Retry-After is included."
          },
          "503": {
            "description": "Embedding service is starting, busy or unavailable."
          }
        }
      }
    },
    "/image-search/text": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Find avatars by a visual description",
        "description": "Embeds a description in the same 512-dimensional normalized EmbeddingGemma 2 space as catalog thumbnails. Similarity is cosine, not a confidence percentage. Uses the same rate limits as image search.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 500
                  }
                },
                "example": {
                  "text": "a white fox with blue eyes and a black jacket"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Public avatar cards with cosine similarity, matchType, indexed count, model and dimensions."
          },
          "400": {
            "description": "Invalid image or description."
          },
          "413": {
            "description": "Upload exceeds 5 MiB."
          },
          "429": {
            "description": "Search rate limit reached. Retry-After is included."
          },
          "503": {
            "description": "Embedding service is starting, busy or unavailable."
          }
        }
      }
    },
    "/avatars/roulette": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Choose a random public avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "description": "Requires a confirmed Patreon tier checked within 24 hours, or website admin access. Uses only the cached public catalog. Twelve requests per account per minute.",
        "responses": {
          "200": {
            "description": "Random avatar, or null when the public catalog is empty.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatar": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Avatar"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Current supporter or admin access required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Wait before another pick.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/{id}/report": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Report a catalog avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "description": "Requires a signed-in AviSeek account. Five reports per IP per minute. The server uses the authenticated account as reporter; caller-supplied account IDs are ignored.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "category"
                ],
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "private",
                      "removal",
                      "stolen",
                      "adult",
                      "harmful",
                      "broken",
                      "spam",
                      "other"
                    ]
                  },
                  "details": {
                    "type": "string"
                  },
                  "evidenceUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "example": {
                "category": "broken",
                "details": "The thumbnail no longer loads."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Report received, including whether it duplicates a recent report.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Check the category and details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Avatar not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Wait before another report.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/creator/claims/{id}/code": {
      "post": {
        "tags": [
          "Creator"
        ],
        "summary": "Generate a one-time avatar description code",
        "description": "Does not contact VRChat. Claim first, then generate a fresh unlist code. Only the hash is stored. Code expires in 30 minutes and is returned once; generating another invalidates the previous active code for that action. Limits: 10/account/hour, 200 overall/hour.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "claim",
                      "unlist"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request completed."
          },
          "400": {
            "description": "Invalid avatar, action or code."
          },
          "401": {
            "description": "VRChat Legends sign-in required."
          },
          "403": {
            "description": "Claim required or staff removal protected."
          },
          "404": {
            "description": "Avatar not found."
          },
          "409": {
            "description": "Code missing, expired, used or not in the current description."
          },
          "429": {
            "description": "Rate limit reached. Respect Retry-After."
          },
          "503": {
            "description": "VRChat verification unavailable."
          }
        }
      }
    },
    "/creator/claims/{id}/check": {
      "post": {
        "tags": [
          "Creator"
        ],
        "summary": "Explicitly check the VRChat description and claim or unlist",
        "description": "The only claim endpoint that contacts VRChat. Invalid, expired and used codes are rejected before an upstream request. A successful exact description match consumes the code. Unlisting requires an existing claim. Limits: 2/account/minute, 1/avatar/minute, 6 overall/minute, plus the shared VRChat gateway budget. This proves editing access, not legal copyright ownership.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "AVISEEK-CLAIM-<40 hexadecimal characters>"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request completed."
          },
          "400": {
            "description": "Invalid avatar, action or code."
          },
          "401": {
            "description": "VRChat Legends sign-in required."
          },
          "403": {
            "description": "Claim required or staff removal protected."
          },
          "404": {
            "description": "Avatar not found."
          },
          "409": {
            "description": "Code missing, expired, used or not in the current description."
          },
          "429": {
            "description": "Rate limit reached. Respect Retry-After."
          },
          "503": {
            "description": "VRChat verification unavailable."
          }
        }
      }
    },
    "/dislikes": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Your disliked avatar IDs",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "ids array."
          },
          "401": {
            "description": "VRChat Legends sign-in required."
          }
        }
      }
    },
    "/dislikes/{id}": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Dislike an avatar",
        "description": "One reaction per account and avatar. Disliking clears your like. Dislikes lower relevance, popularity, trending and recommendation quality. 120 mutations/account/minute; 2,000 retained dislikes per account.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok, liked, disliked, likes and dislikes."
          },
          "400": {
            "description": "Invalid avatar, action or code."
          },
          "401": {
            "description": "VRChat Legends sign-in required."
          },
          "404": {
            "description": "Avatar not found."
          },
          "429": {
            "description": "Rate limit reached. Respect Retry-After."
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove an avatar dislike",
        "description": "One reaction per account and avatar. Disliking clears your like. Dislikes lower relevance, popularity, trending and recommendation quality. 120 mutations/account/minute; 2,000 retained dislikes per account.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok, liked, disliked, likes and dislikes."
          },
          "400": {
            "description": "Invalid avatar, action or code."
          },
          "401": {
            "description": "VRChat Legends sign-in required."
          },
          "404": {
            "description": "Avatar not found."
          },
          "429": {
            "description": "Rate limit reached. Respect Retry-After."
          }
        }
      }
    },
    "/discord/status": {
      "get": {
        "tags": [
          "Discord"
        ],
        "summary": "Your Discord connection and Linked Role checks",
        "description": "Requires an AviSeek session. Returns only safe identity, sync status and the five server-derived checks; never OAuth tokens.",
        "responses": {
          "200": {
            "description": "Connection status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/discord/connect": {
      "post": {
        "tags": [
          "Discord"
        ],
        "summary": "Start Discord OAuth",
        "description": "Requires an AviSeek session and same-origin Origin header. Body: {returnTo: \"dashboard\"} or {returnTo: \"linked-roles\"}. Sets a short-lived HttpOnly state cookie and returns a Discord authorization URL.",
        "responses": {
          "200": {
            "description": "Authorization URL.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/discord/callback": {
      "get": {
        "tags": [
          "Discord"
        ],
        "summary": "Discord OAuth callback",
        "description": "Used by Discord after consent. Requires the same AviSeek session and state cookie as the connection request. Register this exact website URL in the Discord Developer Portal.",
        "responses": {
          "303": {
            "description": "Redirects to the Discord dashboard or Linked Roles page."
          }
        }
      }
    },
    "/discord/guilds": {
      "get": {
        "tags": [
          "Discord"
        ],
        "summary": "Discord servers you can administer",
        "description": "Requires a connected Discord account. Lists only servers the user owns or has Administrator permission in. Manage Server alone does not qualify.",
        "responses": {
          "200": {
            "description": "Eligible servers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/discord/guilds/{id}": {
      "get": {
        "tags": [
          "Discord"
        ],
        "summary": "Server bot settings and permitted channels",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Rechecks current Discord Administrator permission and bot membership. Returns an invite when the bot is absent.",
        "responses": {
          "200": {
            "description": "Server configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Administrator permission required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Discord"
        ],
        "summary": "Update bot settings for your server",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Same-origin authenticated request. Rechecks Administrator permission and effective bot channel permissions. Body requires enabled (boolean), private (boolean), channel (snowflake string or null). Changes apply only to this server.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled",
                  "private",
                  "channel"
                ],
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "private": {
                    "type": "boolean"
                  },
                  "channel": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Administrator permission required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/discord/sync": {
      "post": {
        "tags": [
          "Discord"
        ],
        "summary": "Sync your Linked Role checks",
        "description": "Same-origin authenticated request. Values come from AviSeek, not the request body. Identity and Patreon claims expire after 24 hours and are cleared on the next successful sync. Discord evaluates eligibility; members join Linked Roles in Discord.",
        "responses": {
          "200": {
            "description": "Updated connection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/discord/connection": {
      "delete": {
        "tags": [
          "Discord"
        ],
        "summary": "Disconnect Discord",
        "description": "Same-origin authenticated request. Clears role eligibility before revoking and deleting the encrypted OAuth grant. On a Discord outage, retry or remove the connection in Discord.",
        "responses": {
          "200": {
            "description": "Disconnected.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/vrcx": {
      "get": {
        "tags": [
          "VRCX"
        ],
        "summary": "VRCX avatar database provider",
        "description": "Answers the three lookups VRCX makes against an avatar database provider, using VRChat field names. Give exactly one of search, authorId or fileId. search returns up to 500 avatars ranked by relevance; a term we hold little for triggers one cached VRC Nexus lookup first. authorId returns the public avatars made by that VRChat user. fileId returns the one avatar whose image is that VRChat file, or 404. 120 requests per IP per minute.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Avatar name, creator or description text (2-100 characters).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "Maximum results, capped at 500. VRCX sends 5000.",
            "schema": {
              "type": "integer",
              "default": 500,
              "maximum": 500
            }
          },
          {
            "name": "authorId",
            "in": "query",
            "description": "A VRChat user id (usr_...).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "query",
            "description": "A VRChat image file id (file_...).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of avatars for search and authorId, or one avatar for fileId.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VrcxAvatar"
                      }
                    },
                    {
                      "$ref": "#/components/schemas/VrcxAvatar"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No listed avatar uses that image (fileId only).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/search": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Search the index",
        "description": "Matches every word against name, creator, description, VRChat tags and AviSeek tags (accent-insensitive, common synonyms such as proto/protogen included). q supports \"exact phrase\", -exclude, creator:name, tag:name and platform:pc|quest|ios|cross. When nothing matches, one typo-corrected retry runs and the response carries fuzzy=true and corrected. A term we hold little for triggers one cached lookup against VRC Nexus.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search text with optional operators: \"phrase\", -word, creator:, tag:, platform:.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "author",
            "in": "query",
            "description": "Filter by creator name or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "Filter by a VRChat tag or an AviSeek tag.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "pc, quest, or ios.",
            "schema": {
              "type": "string",
              "enum": [
                "pc",
                "quest",
                "ios"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Result order. relevance ranks by match quality (needs q).",
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "recent",
                "oldest",
                "name",
                "popular"
              ],
              "default": "recent"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-60.",
            "schema": {
              "type": "integer",
              "default": 24,
              "maximum": 60
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "facets",
            "in": "query",
            "description": "Set to 1 to include platform and tag counts for the result set.",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching avatars.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "fuzzy": {
                      "type": "boolean",
                      "description": "True when results come from a typo-corrected query."
                    },
                    "corrected": {
                      "type": "string",
                      "description": "The corrected query that produced these results."
                    },
                    "facets": {
                      "type": "object",
                      "properties": {
                        "platforms": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer"
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tag": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer"
                              }
                            }
                          }
                        }
                      }
                    },
                    "query": {
                      "type": "object",
                      "description": "How q was parsed: terms, phrases, exclude, creator, tag, platform."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/submit/status": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Check submitted avatars",
        "description": "Where each avatar stands: indexed (with url), queued or checking (position, etaSeconds), hidden (private, unlisted or blocked by the all-ages policy), gone, failed, blocked or not_submitted. Up to 500 IDs, though links over about 100 IDs are too long for some proxies, so use POST for big batches. Reads AviSeek data only and never asks VRChat, so not_submitted also tells you which IDs are new before you submit them. CORS open.",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "Comma-separated avtr_ IDs, up to 500.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status per avatar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fetcherOnline": {
                      "type": "boolean"
                    },
                    "queueLength": {
                      "type": "integer"
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "position": {
                            "type": "integer"
                          },
                          "etaSeconds": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Check a batch of avatars",
        "description": "The same as GET, for up to 500 IDs in a JSON body.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status per avatar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fetcherOnline": {
                      "type": "boolean"
                    },
                    "queueLength": {
                      "type": "integer"
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "position": {
                            "type": "integer"
                          },
                          "etaSeconds": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing ids or more than 500.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/submissions": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Your submissions",
        "description": "Avatars you submitted while signed in, with what happened to each.",
        "responses": {
          "200": {
            "description": "Your submissions and counts by status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Sign in required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/creators": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Creator directory",
        "description": "Every creator with public avatars, biggest first.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Filter by name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-60.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Creators.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/creators/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "One creator",
        "description": "A creator (usr_ ID) and their public avatars.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "popular, recent or name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-60.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Creator and avatars.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No public avatars by that creator.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/tags/{tag}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Avatars with a tag",
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-60.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag and avatars.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown tag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/platforms/{platform}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Avatars for a platform",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pc",
                "quest",
                "ios",
                "cross"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-60.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatars.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/badges/avatars.svg": {
      "get": {
        "tags": [
          "Embeds"
        ],
        "summary": "Catalog size badge",
        "description": "Shields-style SVG: \"AviSeek | 134,000+ avatars\". Optional label and theme (dark, light, flat).",
        "parameters": [
          {
            "name": "label",
            "in": "query",
            "description": "Left text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "theme",
            "in": "query",
            "description": "dark, light or flat.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG badge.",
            "content": {
              "image/svg+xml": {}
            }
          }
        }
      }
    },
    "/badges/avatar/{id}.svg": {
      "get": {
        "tags": [
          "Embeds"
        ],
        "summary": "Avatar badge",
        "description": "Shows the avatar name, or likes / views / platforms with metric=.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "description": "name (default), likes, views or platforms.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "theme",
            "in": "query",
            "description": "dark, light or flat.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG badge.",
            "content": {
              "image/svg+xml": {}
            }
          }
        }
      }
    },
    "/badges/creator/{id}.svg": {
      "get": {
        "tags": [
          "Embeds"
        ],
        "summary": "Creator badge",
        "description": "Number of public avatars by a creator (usr_ ID).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "theme",
            "in": "query",
            "description": "dark, light or flat.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG badge.",
            "content": {
              "image/svg+xml": {}
            }
          }
        }
      }
    },
    "/oembed": {
      "get": {
        "tags": [
          "Embeds"
        ],
        "summary": "oEmbed",
        "description": "oEmbed JSON for AviSeek avatar and creator page URLs (rich type with an iframe widget).",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "description": "An AviSeek avatar or creator page URL.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxwidth",
            "in": "query",
            "description": "200-800.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "oEmbed response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not embeddable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/suggest": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Typeahead suggestions",
        "description": "Avatar names, creators and tags that start with the given text (or contain a word that does). Minimum 2 characters. Content-policy filtered. Cached for 60 seconds.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Prefix, at least 2 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Suggestions per group, 1-10.",
            "schema": {
              "type": "integer",
              "default": 6,
              "maximum": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Suggestions grouped by kind.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "q": {
                      "type": "string"
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "authorName": {
                            "type": "string"
                          },
                          "imageUrl": {
                            "type": "string"
                          },
                          "platforms": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "creators": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tag": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/tags": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Most common tags",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-60.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/trending": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Most viewed avatars",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-20.",
            "schema": {
              "type": "integer",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trending avatars.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/popular-searches": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Top five search terms",
        "responses": {
          "200": {
            "description": "Search terms.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "terms": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bot/interactions": {
      "post": {
        "tags": [
          "Discord"
        ],
        "summary": "Receive signed Discord interactions",
        "description": "Discord-only webhook. Configure https://aviseek.vrchatlegends.com/api/bot/interactions in the Developer Portal. Requires X-Signature-Ed25519 and X-Signature-Timestamp with the exact signed JSON body. Opening this URL with GET shows endpoint notes; it does not validate the Discord integration.",
        "responses": {
          "200": {
            "description": "Interaction acknowledgement.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Discord public key is not configured.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/submit": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Queue an avatar for indexing",
        "description": "Public endpoint, no login or API key required. Send one avatarId (or url), an avatarIds array of 1 to 500 IDs or avatar URLs, or text: any pasted text up to 2 MB (a chat message, a VRChat log, JSON), from which every avtr_ ID is extracted (up to 500). Optional source: website, api, discord, world or extension. Signed-in submissions are credited to the account (see /avatars/submissions). Already indexed avatars come back with their AviSeek url; queued ones with position and etaSeconds. Every response includes statusPostUrl (POST {ids} to it, up to 500) and, for up to 100 IDs, a statusUrl link. At most 500 submitted items per minute and 3000 per hour per IP (500 requests for single submissions), including invalid and duplicate items. A batch returns HTTP 200 with accepted/rejected counts and ordered per-item results; check each result status and code. Single duplicates return 409. Queue capacity is 3000; batch overflow items receive queue_full, while a single submission gets HTTP 503. Retry-After advises when to retry. Accepted items join one paced background worker (one VRChat check every 8 seconds whatever the batch size) inside the shared VRChat safety budget. Private and blocked avatars remain excluded.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatarId": {
                    "type": "string",
                    "example": "avtr_00000000-1111-2222-3333-444444444444"
                  },
                  "text": {
                    "type": "string",
                    "description": "Any text containing VRChat avatar links or IDs."
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "website",
                      "api",
                      "discord",
                      "world",
                      "extension"
                    ]
                  },
                  "avatarIds": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "avtr_00000000-1111-2222-3333-444444444444",
                      "avtr_11111111-2222-3333-4444-555555555555"
                    ]
                  }
                },
                "oneOf": [
                  {
                    "required": [
                      "avatarId"
                    ]
                  },
                  {
                    "required": [
                      "avatarIds"
                    ]
                  },
                  {
                    "required": [
                      "text"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Single submission queued, or batch processed with ordered results containing index, id, status, position or rejection code.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer"
                    },
                    "accepted": {
                      "type": "integer"
                    },
                    "rejected": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not a valid avatar id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Avatar is blocked from submission.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Avatar is already indexed or queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "500 submitted items per minute, or 3000 per hour, exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "Verification queue full. Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stats": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Index totals",
        "responses": {
          "200": {
            "description": "Catalog counters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "indexed": {
                      "type": "integer"
                    },
                    "active": {
                      "type": "integer"
                    },
                    "listed": {
                      "type": "integer"
                    },
                    "hidden": {
                      "type": "integer"
                    },
                    "creators": {
                      "type": "integer"
                    },
                    "queue": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "Service is up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/summary": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Identity, settings and usage",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Account summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/settings": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Read AviSeek preferences",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Update AviSeek preferences",
        "description": "Partial update. Unknown keys are ignored and every value is clamped to a valid option.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaultPlatform": {
                    "type": "string"
                  },
                  "defaultSort": {
                    "type": "string"
                  },
                  "resultsPerPage": {
                    "type": "integer"
                  },
                  "compactGrid": {
                    "type": "boolean"
                  },
                  "reduceMotion": {
                    "type": "boolean"
                  },
                  "openLinksInNewTab": {
                    "type": "boolean"
                  },
                  "showAiTags": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/favorites": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Saved avatars",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Clear the collection",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Cleared.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/favorites/{id}": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Save an avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Unsave an avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/favorites/groups": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create a favorite group",
        "description": "A group is presentation only: the collection stays one list and each avatar belongs to at most one group, so renaming or deleting a group never unsaves anything.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string",
                    "description": "One of the fixed icon names returned by GET /favorites."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad name, duplicate, or group limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/favorites/groups/{groupId}": {
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Rename a group or change its icon",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Delete a group",
        "description": "Its avatars stay in the collection, just without a group.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/favorites/{id}/group": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Move a saved avatar into a group",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string",
                    "nullable": true,
                    "description": "null removes it from its group."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Moved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown group, or the avatar is not saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/likes/{id}": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Like an avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Liked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Unlike an avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unliked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/creator/avatars": {
      "get": {
        "tags": [
          "Creator"
        ],
        "summary": "Your avatars with analytics",
        "description": "Returns only avatars claimed with a one-time VRChat description code. Reading this endpoint does not contact VRChat.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Length of the daily series, 7-90.",
            "schema": {
              "type": "integer",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatars and analytics.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "No verified VRChat link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/creator/avatars/{id}/visibility": {
      "put": {
        "tags": [
          "Creator"
        ],
        "summary": "Relist an avatar you unlisted with a description code",
        "description": "Only listed=true is accepted. Unlisting requires a claim followed by a new unlisting code and explicit Check. Staff removals cannot be undone by creators.",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listed": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visibility updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/insights/overview": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Site-wide analytics",
        "description": "Totals for the window (impressions, views, outbound clicks, wears, likes, favorites), the same for the window before it, percent trend per counter, a daily series, and short leaderboards (views, trending, click-through, likes). Cached 30 seconds.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Window length, 7-90.",
            "schema": {
              "type": "integer",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/insights/avatars": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Every listed avatar, ranked by a metric",
        "description": "Avatars with recorded activity come first in the chosen order; the quiet rest of the catalog follows newest first, so a text search still finds an avatar with zero views. Each row carries lifetime totals, window totals, the previous window, percent trend, rates (ctr, click-through, like rate, save rate) and a 14 day view sparkline.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Match against name, creator, id and tags.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "author",
            "in": "query",
            "description": "Creator name or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "pc, quest, or ios.",
            "schema": {
              "type": "string",
              "enum": [
                "pc",
                "quest",
                "ios"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Ranking.",
            "schema": {
              "type": "string",
              "enum": [
                "views",
                "trending",
                "impressions",
                "outbound",
                "ctr",
                "likes",
                "favorites",
                "newest"
              ],
              "default": "views"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Window length, 7-90.",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-100.",
            "schema": {
              "type": "integer",
              "default": 30,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "tracked": {
                      "type": "integer",
                      "description": "How many matches have any recorded activity."
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/insights/avatars/{id}": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Deep dive on one avatar",
        "description": "The explorer row plus a daily series (every counter), audience breakdowns for views and outbound clicks (referring site, device, country, hour, site surface, platform, search terms), rank and percentile against every avatar with activity, peak days, activity span with daily averages, and how many listed avatars the creator has.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Window length, 7-90.",
            "schema": {
              "type": "integer",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar insights.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/all": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Every listed avatar, paginated",
        "description": "For developers mirroring the catalog. Pages of up to 1000; follow `nextOffset` until it is null. Cached two minutes.",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-1000.",
            "schema": {
              "type": "integer",
              "default": 1000,
              "maximum": 1000
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Order.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "popular",
                "name"
              ],
              "default": "recent"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/events": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Live avatar events (server-sent events)",
        "description": "A `text/event-stream`. Moderation frames are `{\"type\":\"blocked\"|\"unblocked\",\"id\":\"avtr_...\",\"at\":\"...\"}`. Counter frames are `{\"type\":\"counts\",\"id\":\"avtr_...\",\"views\":123,\"likes\":45,\"at\":\"...\"}`. Use the exact counter values rather than incrementing locally.",
        "responses": {
          "200": {
            "description": "Event stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/avatars/{id}/similar": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Avatars like this one",
        "description": "Nearest neighbours by description and thumbnail embedding. While the model is still indexing an avatar, shared tags and the same creator stand in; `source` says which was used (embedding, mixed or traits). Cached for ten minutes.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 24,
              "default": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Similar public avatars.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "embedding",
                        "mixed",
                        "traits",
                        "none"
                      ]
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Avatar is not listed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/badges": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Every embeddable badge and its options",
        "description": "SVG badges for the catalog, a creator, an avatar, a tag, a platform, the Discord bot and API status. All accept `label`, `theme`, `style` (flat, pill, large) and `logo=1`. Atom feeds of new avatars are at /feed.xml, /creators/{id}/feed.xml and /tags/{tag}/feed.xml on the website.",
        "responses": {
          "200": {
            "description": "Badge catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "badges": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "options": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/avatars/{id}/track": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Count a view or outbound click",
        "description": "Anonymous. The referring site, device family, CDN country and search term are bucketed for the insights charts; no identifiers are stored.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "view",
                      "outbound"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "description": "Where on the site the click happened, e.g. search, trending, favorites."
                  },
                  "platform": {
                    "type": "string"
                  },
                  "term": {
                    "type": "string",
                    "description": "The search text that surfaced the avatar, if any."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Counted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/ping": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Liveness plus limits",
        "responses": {
          "200": {
            "description": "Alive.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string"
                    },
                    "maxLimit": {
                      "type": "integer"
                    },
                    "allPage": {
                      "type": "integer"
                    },
                    "schema": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/endpoints": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Every world route with its parameters",
        "responses": {
          "200": {
            "description": "Endpoint table.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/stats": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Catalog counts",
        "responses": {
          "200": {
            "description": "Counters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/client": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Public compact world data, up to 120 avatars in one download",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search text",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "author",
            "in": "query",
            "description": "Creator name or id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public catalog, supporters, stats. No account data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/search": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Search the catalog",
        "description": "Same index as `/avatars/search`, with long pages (up to 500) and a `nextOffset` cursor. Every avatar carries `id`, `name`, `authorName`, `authorId`, `imageUrl`, `tags`, `aiTags`, `platforms`, `views` and `likes`.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "author",
            "in": "query",
            "description": "Creator name or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "VRChat or AviSeek tag.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "pc, quest, or ios.",
            "schema": {
              "type": "string",
              "enum": [
                "pc",
                "quest",
                "ios"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Order.",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "recent",
                "oldest",
                "name"
              ],
              "default": "popular"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-500.",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 500
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/list": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Browse without a query",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "description": "Order.",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "recent",
                "oldest",
                "name"
              ],
              "default": "popular"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "pc, quest, or ios.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-500.",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 500
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/all": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Every visible avatar, 1000 per page",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Result offset.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1-1000.",
            "schema": {
              "type": "integer",
              "default": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/trending": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Rising this week",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-500.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/promoted": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Paid avatar placements",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-50.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/promoted/groups": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Paid VRChat group placements",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-50.",
            "schema": {
              "type": "integer",
              "default": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Group list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/random": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "A different handful each call",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-500.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "pc, quest, or ios.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/avatars": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Several avatars by id",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "Comma separated avtr_ ids, up to 500.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar list plus `missing` ids.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Pass as `offset` for the next page; null when done."
                    },
                    "avatars": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Avatar"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/avatar/{id}": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "One avatar (counts a view)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatar": {
                      "$ref": "#/components/schemas/Avatar"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown avatar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/world/tags": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Most used tags",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-200.",
            "schema": {
              "type": "integer",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tags with counts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/searches": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Popular search terms",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-50.",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Terms.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/leaderboard": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Richest accounts",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-50.",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rank, username, balance, avatar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/supporters": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Supporters board",
        "description": "Active Patreon members of VRChat Legends with their tier title. Cached ten minutes.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1-200.",
            "schema": {
              "type": "integer",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Name and tier per supporter.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/admins": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Display names the world may treat as staff",
        "responses": {
          "200": {
            "description": "Admin list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/world/bundle": {
      "get": {
        "tags": [
          "Worlds"
        ],
        "summary": "Several sections in one call",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "description": "Comma separated: stats, trending, promoted, promotedGroups, random, tags, searches, leaderboard, admins, supporters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Rows per list section.",
            "schema": {
              "type": "integer",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`{ sections: { name: payload } }`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "No valid section named.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
