{
  "openapi": "3.0.3",
  "info": {
    "title": "Blockatar API",
    "version": "2.3.4",
    "description": "Minecraft and MineTogether avatar and render image API."
  },
  "servers": [
    {
      "url": "https://blockatar.net"
    }
  ],
  "paths": {
    "/avatars/{uuid}": {
      "get": {
        "summary": "Get a Minecraft avatar by UUID.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "Mojang UUID in dashed or dashless form.",
            "schema": {
              "type": "string",
              "pattern": "^([0-9a-fA-F]{32}|[0-9a-fA-F-]{36})$"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Avatar size in pixels.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 512,
              "default": 160
            }
          },
          {
            "name": "overlay",
            "in": "query",
            "required": false,
            "description": "Apply Minecraft skin overlay layers. Presence implies true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "default",
            "in": "query",
            "required": false,
            "description": "Fallback UUID, MHF_Steve, MHF_Alex, or a percent-encoded image URL.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image response",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "307": {
            "description": "Redirect to a fallback image URL."
          },
          "404": {
            "description": "Image not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path, identifier, size, scale, or default.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/renders/head/{uuid}": {
      "get": {
        "summary": "Get a Minecraft head render by UUID.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "Mojang UUID in dashed or dashless form.",
            "schema": {
              "type": "string",
              "pattern": "^([0-9a-fA-F]{32}|[0-9a-fA-F-]{36})$"
            }
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "description": "Render scale factor.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 6
            }
          },
          {
            "name": "overlay",
            "in": "query",
            "required": false,
            "description": "Apply Minecraft skin overlay layers. Presence implies true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "rotation",
            "in": "query",
            "required": false,
            "description": "Turn head and body renders to another character-facing direction.",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                90,
                180,
                270
              ],
              "default": 0
            }
          },
          {
            "name": "default",
            "in": "query",
            "required": false,
            "description": "Fallback UUID, MHF_Steve, MHF_Alex, or a percent-encoded image URL.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image response",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "307": {
            "description": "Redirect to a fallback image URL."
          },
          "404": {
            "description": "Image not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path, identifier, size, scale, or default.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/renders/body/{uuid}": {
      "get": {
        "summary": "Get a Minecraft body render by UUID.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "Mojang UUID in dashed or dashless form.",
            "schema": {
              "type": "string",
              "pattern": "^([0-9a-fA-F]{32}|[0-9a-fA-F-]{36})$"
            }
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "description": "Render scale factor.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 6
            }
          },
          {
            "name": "overlay",
            "in": "query",
            "required": false,
            "description": "Apply Minecraft skin overlay layers. Presence implies true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "rotation",
            "in": "query",
            "required": false,
            "description": "Turn head and body renders to another character-facing direction.",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                90,
                180,
                270
              ],
              "default": 0
            }
          },
          {
            "name": "default",
            "in": "query",
            "required": false,
            "description": "Fallback UUID, MHF_Steve, MHF_Alex, or a percent-encoded image URL.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image response",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "307": {
            "description": "Redirect to a fallback image URL."
          },
          "404": {
            "description": "Image not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path, identifier, size, scale, or default.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mt/avatars/{hash}": {
      "get": {
        "summary": "Get a MineTogether avatar by hash.",
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "description": "MineTogether raw long hash, MT-prefixed medium hash, or MT-prefixed short hash.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$|^MT[0-9a-fA-F]{28}$|^MT[0-9a-fA-F]{15}$"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Avatar size in pixels.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 512,
              "default": 160
            }
          },
          {
            "name": "overlay",
            "in": "query",
            "required": false,
            "description": "Apply Minecraft skin overlay layers. Presence implies true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "default",
            "in": "query",
            "required": false,
            "description": "Fallback UUID, MHF_Steve, MHF_Alex, or a percent-encoded image URL.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image response",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "307": {
            "description": "Redirect to a fallback image URL."
          },
          "404": {
            "description": "Image not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path, identifier, size, scale, or default.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mt/renders/head/{hash}": {
      "get": {
        "summary": "Get a MineTogether head render by hash.",
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "description": "MineTogether raw long hash, MT-prefixed medium hash, or MT-prefixed short hash.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$|^MT[0-9a-fA-F]{28}$|^MT[0-9a-fA-F]{15}$"
            }
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "description": "Render scale factor.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 6
            }
          },
          {
            "name": "overlay",
            "in": "query",
            "required": false,
            "description": "Apply Minecraft skin overlay layers. Presence implies true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "rotation",
            "in": "query",
            "required": false,
            "description": "Turn head and body renders to another character-facing direction.",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                90,
                180,
                270
              ],
              "default": 0
            }
          },
          {
            "name": "cosmetics",
            "in": "query",
            "required": false,
            "description": "Use the MineTogether cosmetic composition render path. Presence implies overlay.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "default",
            "in": "query",
            "required": false,
            "description": "Fallback UUID, MHF_Steve, MHF_Alex, or a percent-encoded image URL.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image response",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "307": {
            "description": "Redirect to a fallback image URL."
          },
          "404": {
            "description": "Image not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path, identifier, size, scale, or default.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mt/renders/body/{hash}": {
      "get": {
        "summary": "Get a MineTogether body render by hash.",
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "description": "MineTogether raw long hash, MT-prefixed medium hash, or MT-prefixed short hash.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$|^MT[0-9a-fA-F]{28}$|^MT[0-9a-fA-F]{15}$"
            }
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "description": "Render scale factor.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 6
            }
          },
          {
            "name": "overlay",
            "in": "query",
            "required": false,
            "description": "Apply Minecraft skin overlay layers. Presence implies true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "rotation",
            "in": "query",
            "required": false,
            "description": "Turn head and body renders to another character-facing direction.",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                90,
                180,
                270
              ],
              "default": 0
            }
          },
          {
            "name": "cosmetics",
            "in": "query",
            "required": false,
            "description": "Use the MineTogether cosmetic composition render path. Presence implies overlay.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "default",
            "in": "query",
            "required": false,
            "description": "Fallback UUID, MHF_Steve, MHF_Alex, or a percent-encoded image URL.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image response",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "307": {
            "description": "Redirect to a fallback image URL."
          },
          "404": {
            "description": "Image not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path, identifier, size, scale, or default.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "Get the OpenAPI description for this API.",
        "responses": {
          "200": {
            "description": "OpenAPI JSON document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}