{
  "openapi": "3.0.3",
  "info": {
    "title": "MineSkin API",
    "version": "2.0.0",
    "description": "Client implementations: [Java](https://github.com/InventivetalentDev/MineskinClient) \n[NodeJS](https://github.com/InventivetalentDev/mineskin-client)\n\n [Examples](https://github.com/MineSkin/examples)\n\n ",
    "contact": {
      "name": "API Support",
      "url": "https://discord.gg/DeeNu3cUMp",
      "email": "info@mineskin.org"
    },
    "license": {
      "name": "MIT",
      "url": "https://github.com/MineSkin/api.mineskin.org/blob/master/LICENSE"
    },
    "termsOfService": "https://legal.inventivetalent.org/terms/mineskin"
  },
  "servers": [
    {
      "url": "https://api.mineskin.org"
    }
  ],
  "tags": [
    {
      "name": "generate"
    },
    {
      "name": "queue"
    },
    {
      "name": "skins"
    },
    {
      "name": "capes"
    },
    {
      "name": "user"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "API key header - Get your key from [account.mineskin.org](https://account.mineskin.org/keys)",
        "type": "http",
        "scheme": "bearer"
      }
    },
    "parameters": {
      "apiKey": {
        "name": "Authorization",
        "description": "API key from [account.mineskin.org](https://account.mineskin.org/keys)",
        "example": "Bearer da84de82e960d6c0510088279878c79365ad5118d350d619f20324a5494f156b",
        "in": "header",
        "schema": {
          "type": "string"
        }
      },
      "userAgent": {
        "name": "User-Agent",
        "description": "Custom User-Agent for your application, see [user-agent.dev](https://user-agent.dev/) for implementation examples. Alternatively you can also use the 'MineSkin-User-Agent' header.",
        "example": "ExampleApp/v1.0",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "ForbiddenErrorResponse": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              ]
            }
          }
        }
      },
      "GenerateErrorResponse": {
        "description": "Generator Error",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                },
                {
                  "properties": {
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "GenerateRateLimitResponse": {
        "description": "Rate Limited",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                },
                {
                  "properties": {
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "GenerateSuccessResponse": {
        "description": "Generator Success",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "type": "object",
                  "required": [
                    "skin"
                  ],
                  "properties": {
                    "skin": {
                      "$ref": "#/components/schemas/SkinInfo"
                    },
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    },
                    "usage": {
                      "$ref": "#/components/schemas/UsageInfo"
                    }
                  }
                },
                {
                  "$ref": "#/components/schemas/SuccessResponseBody"
                }
              ]
            }
          }
        }
      },
      "GenerateUserErrorResponse": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                },
                {
                  "properties": {
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "GenericErrorResponse": {
        "description": "Generic Error",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              ]
            }
          }
        }
      },
      "GenericResponse": {
        "description": "Generic Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GenericResponseBody"
            }
          }
        }
      },
      "GenericSuccessResponse": {
        "description": "Generator Success",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "type": "object",
                  "required": [
                    "skin"
                  ],
                  "properties": {
                    "skin": {
                      "$ref": "#/components/schemas/SkinInfo"
                    },
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    }
                  }
                },
                {
                  "$ref": "#/components/schemas/SuccessResponseBody"
                }
              ]
            }
          }
        }
      },
      "NotFoundErrorResponse": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              ]
            }
          }
        }
      },
      "QueueListResponse": {
        "description": "Queue List",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "jobs"
              ],
              "properties": {
                "jobs": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobInfo"
                  }
                }
              }
            }
          }
        }
      },
      "QueueProcessingResponse": {
        "description": "Job Processing",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "type": "object",
                  "required": [
                    "job"
                  ],
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/JobInfo"
                    },
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    },
                    "usage": {
                      "$ref": "#/components/schemas/UsageInfo"
                    }
                  }
                },
                {
                  "$ref": "#/components/schemas/SuccessResponseBody"
                }
              ]
            }
          }
        }
      },
      "QueueSuccessResponse": {
        "description": "Job Completed",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "type": "object",
                  "required": [
                    "job",
                    "skin"
                  ],
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/JobInfo"
                    },
                    "skin": {
                      "$ref": "#/components/schemas/SkinInfo"
                    },
                    "rateLimit": {
                      "$ref": "#/components/schemas/RateLimitInfo"
                    },
                    "usage": {
                      "$ref": "#/components/schemas/UsageInfo"
                    }
                  }
                },
                {
                  "$ref": "#/components/schemas/SuccessResponseBody"
                }
              ]
            }
          }
        }
      }
    },
    "schemas": {
      "CodeAndMessage": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "CreditsUsageInfo": {
        "deprecated": true,
        "type": "object",
        "required": [
          "used",
          "remaining"
        ],
        "properties": {
          "used": {
            "type": "number",
            "description": "Credits used for this request",
            "example": 1
          },
          "remaining": {
            "type": "number",
            "description": "Remaining credits",
            "example": 23
          }
        }
      },
      "DelayInfo": {
        "type": "object",
        "required": [
          "millis"
        ],
        "description": "Information about the delay between requests. These numbers will remain the same for all requests with the same API key. You can use this to send requests on a schedule, for example.",
        "properties": {
          "millis": {
            "type": "number",
            "description": "Delay between requests (in milliseconds) - depends on the API key used for this request",
            "example": 1200
          },
          "seconds": {
            "type": "number",
            "description": "Delay between requests (in seconds) - depends on the API key used for this request",
            "example": 1.2
          }
        }
      },
      "ErrorResponseBody": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GenericResponseBody"
          },
          {
            "type": "object",
            "properties": {
              "success": {
                "example": false
              },
              "errors": {
                "example": [
                  {
                    "code": "generic_error",
                    "message": "Something went wrong"
                  }
                ]
              }
            }
          }
        ]
      },
      "GenerateOptions": {
        "type": "object",
        "properties": {
          "variant": {
            "$ref": "#/components/schemas/SkinVariant"
          },
          "name": {
            "type": "string",
            "maxLength": 20
          },
          "visibility": {
            "$ref": "#/components/schemas/SkinVisibility"
          },
          "cape": {
            "type": "string",
            "format": "uuid",
            "description": "[BETA]\n Cape UUID to apply to this skin\n\nSee https://api.mineskin.org/v2/capes for a list of supported cape UUIDs"
          }
        },
        "example": {
          "variant": "classic",
          "name": "My Example Skin",
          "visibility": "public"
        }
      },
      "GeneratorInfo": {
        "type": "object",
        "required": [
          "version",
          "timestamp",
          "duration",
          "account",
          "server"
        ],
        "properties": {
          "version": {
            "type": "string"
          },
          "timestamp": {
            "type": "number"
          },
          "duration": {
            "type": "number"
          },
          "account": {
            "type": "string"
          },
          "server": {
            "type": "string"
          }
        }
      },
      "GenericResponseBody": {
        "type": "object",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeAndMessage"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeAndMessage"
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeAndMessage"
            }
          },
          "links": {
            "type": "object",
            "description": "Links to related resources",
            "properties": {
              "self": {
                "type": "string"
              }
            }
          }
        }
      },
      "JobInfo": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Job ID (Note: not necessarily a UUID)"
          },
          "status": {
            "type": "string",
            "description": "Job status\n\n- unknown: The job status is unknown\n- waiting: The job is waiting to be processed\n- active: The job is currently being processed\n- failed: The job has failed. The root 'errors' array may contain more details\n- completed: The job has completed. The 'result' field will contain the job result",
            "enum": [
              "unknown",
              "waiting",
              "active",
              "failed",
              "completed"
            ]
          },
          "result": {
            "type": "string",
            "description": "If the job is finished, this will return the result of the job (e.g. the skin UUID)"
          },
          "timestamp": {
            "type": "number",
            "description": "Timestamp (in milliseconds) when the job was created",
            "example": 1726829503123
          },
          "eta": {
            "type": "number",
            "description": "Estimated timestamp (in milliseconds) when the job will be completed. Only present after first submitting the job.",
            "example": 1726829603123
          }
        }
      },
      "KnownCape": {
        "type": "object",
        "required": [
          "uuid",
          "alias",
          "url"
        ],
        "properties": {
          "uuid": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "support": {
            "type": "string",
            "description": "Availability of the cape for generation. `public`: anyone with the `capes` grant, `owner`: only users with a linked Minecraft account that owns the cape, `none`: not available",
            "enum": [
              "public",
              "owner",
              "none"
            ]
          },
          "supported": {
            "type": "boolean",
            "deprecated": true,
            "description": "Use `support` instead. Only `true` for `public` capes"
          }
        },
        "example": {
          "uuid": "ef9e95b6-48a3-4fd7-93d4-7e7d9448d2f1",
          "alias": "15th Anniversary",
          "url": "http://textures.minecraft.net/texture/cd9d82ab17fd92022dbd4a86cde4c382a7540e117fae7b9a2853658505a80625",
          "hash": "cd9d82ab17fd92022dbd4a86cde4c382a7540e117fae7b9a2853658505a80625",
          "support": "public",
          "supported": true
        }
      },
      "UserCape": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KnownCape"
          },
          {
            "type": "object",
            "required": [
              "owned",
              "usable"
            ],
            "properties": {
              "owned": {
                "type": "boolean",
                "description": "Whether one of the user's linked Minecraft accounts owns this cape"
              },
              "usable": {
                "type": "boolean",
                "description": "Whether a generate request by this user with this cape would be accepted"
              }
            }
          }
        ]
      },
      "LimitInfo": {
        "type": "object",
        "required": [
          "limit",
          "remaining"
        ],
        "description": "Information about the rate limit for the current request.",
        "properties": {
          "limit": {
            "type": "number",
            "description": "Limit of requests in the current window (1 minute/1 hour).",
            "example": 60
          },
          "remaining": {
            "type": "number",
            "description": "Remaining requests in the current window.",
            "example": 58
          },
          "used": {
            "type": "number",
            "description": "Number of requests used in the current window.",
            "example": 2
          },
          "reset": {
            "type": "number",
            "description": "UNIX epoch timestamp (seconds) when the rate limit will reset.",
            "example": 1746869295
          }
        }
      },
      "MeClientInfo": {
        "type": "object",
        "required": [
          "client"
        ],
        "properties": {
          "client": {
            "type": "object",
            "description": "Client information",
            "properties": {
              "agent": {
                "type": "string",
                "description": "Client User-Agent",
                "example": "PostmanRuntime"
              },
              "key": {
                "type": "string",
                "description": "ID of the API key used for this request",
                "example": "21702ac21ab744d32b004fe0"
              },
              "user": {
                "type": "string",
                "description": "User ID",
                "example": "ef4c52b01fea4715982d8e67fd93ef2d"
              },
              "ip": {
                "type": "string",
                "description": "Client IP address",
                "example": "12.34.56.789"
              },
              "billable": {
                "type": "boolean",
                "description": "Whether the client is billable (i.e. has a paid plan)",
                "example": false
              }
            },
            "example": {
              "agent": "PostmanRuntime",
              "key": "21702ac21ab744d32b004fe0",
              "user": "ef4c52b01fea4715982d8e67fd93ef2d",
              "ip": "12.34.56.789",
              "billable": false
            }
          }
        }
      },
      "MeCreditsInfo": {
        "deprecated": true,
        "type": "object",
        "required": [
          "credit"
        ],
        "properties": {
          "credit": {
            "type": "object",
            "description": "Credits information",
            "properties": {
              "current": {
                "description": "Current credits used for this API key. May be empty if the API key has no credits (see returned warnings).",
                "type": "object",
                "required": [
                  "type",
                  "balance",
                  "total"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Type of credits",
                    "example": "paid"
                  },
                  "balance": {
                    "type": "number",
                    "description": "Current balance",
                    "example": 397
                  },
                  "total": {
                    "type": "number",
                    "description": "Total credits",
                    "example": 500
                  }
                }
              },
              "all": {
                "description": "All credits available for the current user",
                "type": "object",
                "required": [
                  "balance",
                  "total"
                ],
                "properties": {
                  "balance": {
                    "type": "number",
                    "description": "Total balance",
                    "example": 5839
                  },
                  "total": {
                    "type": "number",
                    "description": "Total credits",
                    "example": 10000
                  }
                }
              }
            },
            "example": {
              "current": {
                "type": "paid",
                "balance": 397,
                "total": 500
              },
              "all": {
                "balance": 5839,
                "total": 10000
              }
            }
          }
        }
      },
      "MeInfo": {
        "type": "object",
        "required": [
          "user",
          "grants"
        ],
        "properties": {
          "user": {
            "type": "string",
            "description": "User UUID (stripped)",
            "example": "ef4c52b01fea4715982d8e67fd93ef2d"
          },
          "grants": {
            "type": "object",
            "description": "Grants for this user",
            "example": {
              "delay": 3,
              "per_minute": 20,
              "per_hour": 100,
              "concurrency": 1,
              "priority": 0,
              "ad_free": true,
              "private_skins": true,
              "capes": true,
              "plan": "free"
            }
          }
        }
      },
      "MeKeyInfo": {
        "type": "object",
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "type": "object",
            "description": "API Key information",
            "properties": {
              "id": {
                "type": "string",
                "description": "API Key ID",
                "example": "21702ac21ab744d32b004fe0"
              },
              "name": {
                "type": "string",
                "description": "API Key name",
                "example": "Test Key"
              },
              "user": {
                "type": "string",
                "description": "User ID",
                "example": "ef4c52b01fea4715982d8e67fd93ef2d"
              },
              "createdAt": {
                "type": "string",
                "description": "Creation date",
                "example": "2022-11-01T18:06:58.634Z"
              },
              "allowedOrigins": {
                "type": "array",
                "description": "Allowed origins for this API key",
                "items": {
                  "type": "string"
                }
              },
              "allowedIps": {
                "type": "array",
                "description": "Allowed IPs for this API key",
                "items": {
                  "type": "string"
                }
              },
              "allowedAgents": {
                "type": "array",
                "description": "Allowed User-Agents for this API key",
                "items": {
                  "type": "string"
                }
              },
              "useCredits": {
                "type": "boolean",
                "description": "Whether this API key uses paid credits",
                "example": true
              }
            },
            "example": {
              "id": "21702ac21ab744d32b004fe0",
              "name": "Test Key",
              "user": "ef4c52b01fea4715982d8e67fd93ef2d",
              "createdAt": "2022-11-01T18:06:58.634Z",
              "allowedOrigins": [],
              "allowedIps": [
                "12.34.56.789"
              ],
              "allowedAgents": [
                "MineSkin-Test-App"
              ],
              "useCredits": true
            }
          }
        }
      },
      "MeteredUsageInfo": {
        "deprecated": true,
        "type": "object",
        "required": [
          "used"
        ],
        "properties": {
          "used": {
            "type": "number",
            "description": "Number of metered units used for this request",
            "example": 1
          }
        }
      },
      "NextRequest": {
        "type": "object",
        "required": [
          "absolute",
          "relative"
        ],
        "description": "Information about when the next request can be made. Use this to determine when to make the next request.",
        "properties": {
          "absolute": {
            "type": "number",
            "description": "Absolute timestamp (in milliseconds) after which the next request can be made",
            "example": 1726829503123
          },
          "relative": {
            "type": "number",
            "description": "Relative delay (in milliseconds) after which the next request can be made",
            "example": 800
          }
        }
      },
      "PartialSkinInfo": {
        "type": "object",
        "required": [
          "uuid",
          "variant",
          "visibility",
          "views"
        ],
        "properties": {
          "uuid": {
            "description": "Skin UUID (stripped)",
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/SkinVisibility"
          },
          "variant": {
            "$ref": "#/components/schemas/SkinVariant"
          },
          "views": {
            "type": "number"
          }
        },
        "example": {
          "uuid": "c891dfac4cd247a2a55743e7e82ce76f",
          "name": "Test Skin",
          "visibility": "public",
          "variant": "classic",
          "views": 1
        }
      },
      "PerWindowLimitInfo": {
        "type": "object",
        "required": [
          "minute"
        ],
        "description": "Rate Limit info for applicable time windows. The 'minute' fields mirror the 'X-Rate-Limit-' headers.",
        "properties": {
          "minute": {
            "$ref": "#/components/schemas/LimitInfo"
          },
          "hour": {
            "$ref": "#/components/schemas/LimitInfo"
          }
        }
      },
      "RateLimitInfo": {
        "type": "object",
        "required": [
          "next",
          "delay",
          "limit"
        ],
        "properties": {
          "next": {
            "$ref": "#/components/schemas/NextRequest"
          },
          "delay": {
            "$ref": "#/components/schemas/DelayInfo"
          },
          "limit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PerWindowLimitInfo"
              },
              {
                "type": "object",
                "required": [
                  "limit",
                  "remaining"
                ],
                "properties": {
                  "limit": {
                    "deprecated": true,
                    "type": "number",
                    "description": "Deprecated: Use the fields in 'minute' and 'hour' instead to get information about the individual rate limits.",
                    "example": 60
                  },
                  "remaining": {
                    "deprecated": true,
                    "type": "number",
                    "description": "Deprecated: Use the fields in 'minute' and 'hour' instead to get information about the individual rate limits.",
                    "example": 58
                  },
                  "used": {
                    "deprecated": true,
                    "type": "number",
                    "description": "Deprecated: Use the fields in 'minute' and 'hour' instead to get information about the individual rate limits.",
                    "example": 2
                  },
                  "reset": {
                    "deprecated": true,
                    "type": "number",
                    "description": "Deprecated: Use the fields in 'minute' and 'hour' instead to get information about the individual rate limits.",
                    "example": 1746869295
                  }
                }
              }
            ]
          }
        }
      },
      "SkinHashes": {
        "type": "object",
        "required": [
          "skin"
        ],
        "properties": {
          "skin": {
            "type": "string",
            "description": "Skin Hash"
          },
          "cape": {
            "type": "string",
            "description": "(optional) Cape Hash"
          }
        }
      },
      "SkinInfo": {
        "type": "object",
        "required": [
          "uuid",
          "variant",
          "visibility",
          "texture",
          "generator",
          "views",
          "duplicate"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/SkinVisibility"
          },
          "variant": {
            "$ref": "#/components/schemas/SkinVariant"
          },
          "texture": {
            "$ref": "#/components/schemas/SkinTexture"
          },
          "generator": {
            "$ref": "#/components/schemas/GeneratorInfo"
          },
          "views": {
            "type": "number"
          },
          "duplicate": {
            "type": "boolean"
          }
        },
        "example": {
          "uuid": "c891dfac4cd247a2a55743e7e82ce76f",
          "name": "Test Skin",
          "visibility": "public",
          "variant": "classic",
          "views": 1,
          "duplicate": false
        }
      },
      "SkinTexture": {
        "type": "object",
        "required": [
          "data",
          "hash",
          "url"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ValueAndSignature"
          },
          "hash": {
            "$ref": "#/components/schemas/SkinHashes"
          },
          "url": {
            "$ref": "#/components/schemas/SkinUrls"
          }
        }
      },
      "SkinUrls": {
        "type": "object",
        "required": [
          "skin"
        ],
        "properties": {
          "skin": {
            "type": "string",
            "description": "Skin Texture Url"
          },
          "cape": {
            "type": "string",
            "description": "(optional) Cape Texture Url"
          }
        }
      },
      "SkinVariant": {
        "type": "string",
        "enum": [
          "classic",
          "slim",
          "unknown"
        ],
        "default": "unknown"
      },
      "SkinVisibility": {
        "type": "string",
        "enum": [
          "public",
          "unlisted",
          "private"
        ],
        "default": "public"
      },
      "SuccessResponseBody": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GenericResponseBody"
          },
          {
            "type": "object",
            "properties": {
              "success": {
                "example": true
              },
              "errors": {
                "example": []
              },
              "messages": {
                "example": [
                  {
                    "code": "ok",
                    "message": "All good!"
                  }
                ]
              }
            }
          }
        ]
      },
      "UploadGenerateBody": {
        "type": "object",
        "description": "File Upload Generate Request Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/GenerateOptions"
          },
          {
            "required": [
              "file"
            ],
            "properties": {
              "file": {
                "description": "PNG image file to upload. You should use a client library like [MineSkin Java Client](https://github.com/InventivetalentDev/MineskinClient) to properly handle file uploads. See [github/examples](https://github.com/MineSkin/examples)",
                "type": "string",
                "format": "binary",
                "externalDocs": {
                  "description": "Example implementations",
                  "url": "https://github.com/MineSkin/examples"
                }
              }
            }
          }
        ]
      },
      "UrlGenerateBody": {
        "type": "object",
        "description": "URL Generate Request Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/GenerateOptions"
          },
          {
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "description": "URL to a PNG image. Also supports data URLs (base64-encoded images).",
                "type": "string"
              }
            },
            "example": {
              "url": "https://i.imgur.com/kQPrtYw.png"
            }
          }
        ]
      },
      "UsageInfo": {
        "type": "object",
        "properties": {
          "credits": {
            "$ref": "#/components/schemas/CreditsUsageInfo"
          },
          "metered": {
            "$ref": "#/components/schemas/MeteredUsageInfo"
          }
        }
      },
      "UserGenerateBody": {
        "type": "object",
        "description": "User Generate Request Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/GenerateOptions"
          },
          {
            "required": [
              "user"
            ],
            "properties": {
              "user": {
                "description": "Player UUID",
                "type": "string",
                "minLength": 32,
                "maxLength": 36
              }
            }
          }
        ]
      },
      "ValueAndSignature": {
        "type": "object",
        "required": [
          "value",
          "signature"
        ],
        "properties": {
          "value": {
            "type": "string",
            "description": "Skin Value"
          },
          "signature": {
            "type": "string",
            "description": "Skin Signature"
          }
        }
      }
    }
  },
  "paths": {
    "/v2/generate": {
      "post": {
        "summary": "Generate a skin",
        "description": "Note: this endpoint is not recommended. You should use the queue endpoints instead to submit jobs and check on their status periodically.\n\nQueue skin generation and wait for the result.",
        "tags": [
          "generate"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UrlGenerateBody"
                  },
                  {
                    "$ref": "#/components/schemas/UserGenerateBody"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "description": "File Upload Generate Request",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UploadGenerateBody"
                  },
                  {
                    "$ref": "#/components/schemas/UrlGenerateBody"
                  },
                  {
                    "$ref": "#/components/schemas/UserGenerateBody"
                  }
                ]
              },
              "encoding": {
                "file": {
                  "style": "form",
                  "contentType": "image/png"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/GenerateSuccessResponse"
          },
          "400": {
            "$ref": "#/components/responses/GenerateUserErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/GenerateRateLimitResponse"
          },
          "500": {
            "$ref": "#/components/responses/GenerateErrorResponse"
          }
        }
      }
    },
    "/v2/queue": {
      "get": {
        "summary": "List queue jobs",
        "description": "Get a list of recent queue jobs submitted by the current user.",
        "tags": [
          "queue"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/QueueListResponse"
          },
          "400": {
            "$ref": "#/components/responses/GenerateUserErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/GenerateRateLimitResponse"
          },
          "500": {
            "$ref": "#/components/responses/GenerateErrorResponse"
          }
        }
      },
      "post": {
        "summary": "Queue skin generation",
        "description": "Add a generation request to the queue.\n\nGenerating a single skin usually takes around 2 seconds, but can take longer depending API load and the number of generator jobs ahead of you in the queue.\n\nUse multipart/form-data to upload image files or application/json for url and user requests.",
        "tags": [
          "generate",
          "queue"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UrlGenerateBody"
                  },
                  {
                    "$ref": "#/components/schemas/UserGenerateBody"
                  }
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "description": "File Upload Generate Request",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UploadGenerateBody"
                  },
                  {
                    "$ref": "#/components/schemas/UrlGenerateBody"
                  },
                  {
                    "$ref": "#/components/schemas/UserGenerateBody"
                  }
                ]
              },
              "encoding": {
                "file": {
                  "style": "form",
                  "contentType": "image/png"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/QueueSuccessResponse"
          },
          "202": {
            "$ref": "#/components/responses/QueueProcessingResponse"
          },
          "400": {
            "$ref": "#/components/responses/GenerateUserErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/GenerateRateLimitResponse"
          },
          "500": {
            "$ref": "#/components/responses/GenerateErrorResponse"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "label": "MineSkin Client",
            "source": "MineSkinClient client = MineSkinClient.builder()\r\n        .requestHandler(JsoupRequestHandler::new)\r\n        .userAgent(\"MyMineSkinApp/v1.0\")\r\n        .apiKey(\"<api key>\")\r\n        .build();\r\nGenerateRequest request = GenerateRequest.upload(file)\r\n        .name(\"My Skin\")\r\n        .visibility(Visibility.PUBLIC);\r\nclient.queue().submit(request).thenAccept(response -> {\r\n    JobInfo job = response.getJob();\r\n});"
          }
        ]
      }
    },
    "/v2/queue/{jobId}": {
      "get": {
        "summary": "Get Job Status",
        "description": "Get the status of a generator job.\n\nThis endpoint is rate limited per job. it's recommended you check on the status of a generator job once every second, at most.",
        "tags": [
          "queue"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/QueueSuccessResponse"
          },
          "400": {
            "$ref": "#/components/responses/GenerateUserErrorResponse"
          },
          "429": {
            "$ref": "#/components/responses/GenerateRateLimitResponse"
          },
          "500": {
            "$ref": "#/components/responses/GenerateErrorResponse"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "label": "MineSkin Client",
            "source": "MineSkinClient client = MineSkinClient.builder()\r\n        .requestHandler(JsoupRequestHandler::new)\r\n        .userAgent(\"MyMineSkinApp/v1.0\")\r\n        .apiKey(\"<api key>\")\r\n        .build();\r\nGenerateRequest request = GenerateRequest.upload(file)\r\n        .name(\"My Skin\")\r\n        .visibility(Visibility.PUBLIC);\r\nclient.queue().get(\"<job id>\").thenAccept(response -> {\r\n    JobInfo job = response.getJob();\r\n});"
          }
        ]
      }
    },
    "/v2/delay": {
      "get": {
        "deprecated": true,
        "summary": "Get the current delay",
        "description": "Deprecated, no longer used with the new queue system.",
        "tags": [
          "delay"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Delay Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitInfo"
                }
              }
            }
          }
        }
      }
    },
    "/v2/skins/{uuid}": {
      "get": {
        "summary": "Get a skin by UUID",
        "description": "Get a skin by UUID",
        "tags": [
          "skins"
        ],
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Skin Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkinInfo"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundErrorResponse"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "label": "MineSkin Client",
            "source": "MineSkinClient client = MineSkinClient.builder()\n        .requestHandler(JsoupRequestHandler::new)\n        .userAgent(\"MyMineSkinApp/v1.0\")\n        .apiKey(\"<api key>\")\n        .build();\nclient.skins().get(\"<skin uuid>\").thenAccept(response -> {\n    Skin skin = response.getSkin();\n});"
          }
        ]
      }
    },
    "/v2/skins": {
      "get": {
        "summary": "Get a list of skins",
        "description": "Get a list of skins",
        "tags": [
          "skins"
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "description": "reference of the last skin in the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Skin List",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "skins"
                  ],
                  "properties": {
                    "skins": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PartialSkinInfo"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "self": {
                          "type": "string",
                          "format": "url"
                        },
                        "next": {
                          "description": "for pagination, link to the next page",
                          "type": "string",
                          "format": "url"
                        }
                      }
                    },
                    "search": {
                      "description": "search query used for this request",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/capes": {
      "get": {
        "summary": "Get a list of known capes",
        "description": "Get a list of known capes",
        "tags": [
          "capes"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Cape List",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "capes"
                  ],
                  "properties": {
                    "capes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KnownCape"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/me": {
      "get": {
        "summary": "Get the current user",
        "description": "Get information about the current user (i.e. the user associated with the API key)",
        "tags": [
          "user"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "User Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeInfo"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenErrorResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundErrorResponse"
          }
        }
      }
    },
    "/v2/me/capes": {
      "get": {
        "summary": "Get capes for the current user",
        "description": "Get the list of known capes, including whether the current user owns each cape through a linked Minecraft account and whether they can generate with it",
        "tags": [
          "user",
          "capes"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "User Cape List",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "capes"
                  ],
                  "properties": {
                    "capes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserCape"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/GenericErrorResponse"
          }
        }
      }
    },
    "/v2/me/apikey": {
      "get": {
        "summary": "Get the current API key",
        "description": "Get information about the API key used for this request",
        "tags": [
          "user"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "API Key Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeKeyInfo"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenErrorResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundErrorResponse"
          }
        }
      }
    },
    "/v2/me/client": {
      "get": {
        "summary": "Get the current client",
        "description": "Get information about the current client",
        "tags": [
          "user"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/userAgent"
          },
          {
            "$ref": "#/components/parameters/apiKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Client Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeClientInfo"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenErrorResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundErrorResponse"
          }
        }
      }
    }
  }
}