Skip to content

REST API

Haylee Schäfer edited this page Feb 9, 2021 · 7 revisions

MineSkin can be accessed via its RESTful API, located at https://api.mineskin.org.

When making requests, please send a custom User-Agent header.

The following info is outdated, check here for the latest documentation.

Generation

POST /generate/url

  • Generates a texture from an image URL

Required Parameters

Name Description
url The URL

POST /generate/upload

  • Generates a texture from an uploaded image

Required Parameters

Name Description
file The File

GET /generate/user/:uuid

  • Generates a texture from an existing user

Required Parameters

Name Description
:uuid The user's UUID

/generate - Parameters & Response

All the /generate routes also take these optional parameters:

Name Description
model The skin model, either empty or slim
visibility 0 for public, 1 for private
name The generated skin's name

and they produce the following response on success:

{
    "id": 42903,
    "name": "",
    "data": {
        "uuid": "098f2a04-0fc7-478b-9b30-1d6f5dc21073",
        "texture": {
            "value": "eyJ0aW1lc3RhbXAiOjE1MDQ2MDk2MDY0NjksInByb2ZpbGVJZCI6IjIzZjFhNTlmNDY5YjQzZGRiZGI1MzdiZmVjMTA0NzFmIiwicHJvZmlsZU5hbWUiOiIyODA3Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9kOWMyNTQ2MWJkODExYzk1ODZkODIxOGQ5ZmY0NTJhMWY1NmM1MDQ5MjgyZGZhYjAyMGM1ZmNlMzFiNDQ3MyJ9fX0=",
            "signature": "eWzMvykVci274As2htIEDijhoLOMR/yKrFT9+S+asGENt2KhIfR84fD1HPclWMYvSixlJPEsMnBUVichnQQnp8zSuBNlYD/Md/NbhsTkngmvRXfvplKokqmmVdmpY3y4OSZ3c1T3CxUtXSHnqhV250xlbL0j8hkaVk9+HDZUXuiXbTy+EB+LOtYpFwpoq28ARefAQ9OBD4n7iAETIZLwgK7hB4khIKHaJyY1DPo8H70zGI9DA9qiQC9We7RZuoRWmkoy/Ra8G4ugE5Wz0fWg4c0ASkWN8DWETrSROUYYicJXCfRLPvjfuXoMK7qDCcnSfxNVGVoT1OM6FjnQP9/H2H94962tYFM0ruHrhWaycTtVb33B/QtCyhGxnBu41cnab9166olVMSpU7yxdRK24L61XCUWVt6TfGCl+M9j3jgwfEoECEYFxQ26ErqdkGJU0t8S9LJJ+bBThBg6ILmlf9oel8iC7iz8CltWvw7io01BYIQ5XxPALfKfng6TZjRM1Fg/WZPjUutTic87a2RZb4ALTI32kIlCVMtGmCXn5QMve+RAtauTK3TcV68r3OXK4ryUwkfTUOCGQdTHpR5ygH6X1TEueDQAd48Swb4EGcT0J2PgbhvSv0teZYW3eGx86R9rcgvAYWnLJIIfIYIZYUHWqehSaPg+AERhH41lBOeI=",
            "url": "http://textures.minecraft.net/texture/d9c25461bd811c9586d8218d9ff452a1f56c5049282dfab020c5fce31b4473"
        }
    },
    "timestamp": 1504609606.579,
    "duration": 7574,
    "accountId": 11,
    "private": false,
    "views": 1,
    "nextRequest": 0
}

(https://mineskin.org/42903)

Key Description
id The skin's ID
name The name specified in the request
data The texture data
timestamp UNIX timestamp when the skin was generated
duration Duration the skin took to generate, in milliseconds
accountId ID of the account used for generation
private Whether this skin is private
views View count
nextRequest Time (in seconds) to wait until the next request

Note: The data.uuid is randomly generated but can still be used either for creating a GameProfile, or in /give commands.

Rate Limiting

MineSkin's rate limit is based on the amount of accounts available to the API. Each account is only used once per minute, so the delay in seconds is 60seconds / #accounts.

The current delay is included in every generate response, in the nextRequest field.