Migrating to V2
The MineSkin API V2 introduces some changes to how skins are generated. This guide will outline the most important changes to help you migrate to the new endpoints.
Try V2 Now
To try out the new API without making changes to your existing code, you can enable the compatibility layer on V1 endpoints. This will act as a proxy to the new API and its features while retaining the old request and response format.
To enable the compatibility, pass ?v2=true as a query parameter on the /generate endpoints. Alternatively you can enable compatibility for all requests made by your API key in the API key settings.
Migrate to V2
- For the most basic migration, simply exchange
POST /generate/upload(or /url, /user) withPOST /v2/generate.- If you use custom visibility settings, make sure to exchange the IDs with strings so
publicinstead of0andunlistedinstead of1. - Note: if you also still use the legacy skin model names, those need to be either
classicorslimin V2 (or simply omit it to automatically detect the variant).
- If you use custom visibility settings, make sure to exchange the IDs with strings so
- Finally, adjust your response parsing to use the new JSON structure - see the comparison in V2 Changes.
- Most importantly, skin value and signature is moved from
data.texture.valuetoskin.texture.data.value. SeePOST /v2/generatefor details.
- To also make use of the new queue system, make the request and response changes above but adjust your code to first call POST
POST /v2/queueand then checkGET /queue/:jobIdonce every few seconds until the job iscompleted(orfailed).- Note: if you queue a lot of jobs, you can also use the
GET /queueendpoint to list all jobs and their status to avoid getting rate-limited.
- Note: if you queue a lot of jobs, you can also use the