Skins

API - Skins

Explanation of parameters
  • {pseudo} Player's nickname : Faragnight
  • {type} Allows you to choose between the full skin or the head of the player : head | body
  • {vr.hr} Vertical and horizontal rotation : 10.5
  • {hrh} Horizontal rotation of the head : 10
  • {vrll.vrrl} Vertical rotation of the left and right leg : 10.25
  • {vrla.vrra} Vertical rotation of the left and right arm : 25.12
  • {ratio} Sets the image size: Default 12
Obligatory parameter Optional parameter
Obtaining the skin via the nickname
HTML - Integration from the image tag
<img src="https://minecraft-api.com/api/skins/{pseudo}/{type}/{vr.hr}/{hrh}/{vrll.vrrl}/{vrla.vrra}/{ratio}" alt="Skin généré par Minecraft-api.com" />

PHP - Texture recovery in JSON format
<?php
$json = file_get_content('https://minecraft-api.com/api/skins/{pseudo}/{type}/{vr.hr}/{hrh}/{vrll.vrrl}/{vrla.vrra}/{ratio}/json');
echo $json;
?>
Response from API
Image (base64):


Skin de Faragnight

JSON:

{"skin": "base64..."}

Obtaining the player's head
HTML - Integration from the image tag
<img src="https://minecraft-api.com/api/skins/{pseudo}/{type}/{vr.hr}/{hrh}/{ratio}" alt="Tête généré par Minecraft-api.com" />

PHP - Texture recovery in JSON format
<?php
$json = file_get_content('https://minecraft-api.com/api/skins/{pseudo}/{type}/{vr.hr}/{hrh}/{ratio}/json');
echo $json;
?>
Response from API
Image (base64):


Minecraft-API.com skin player Minecraft-API.com skin player

JSON:

{"head": "base64..."}

New ! These routes complete the 3D render above with simplified formats, no need to set the rotations manually : username is enough.
2D avatar (flat face)
<img src="https://minecraft-api.com/api/skins/avatar.php?username={pseudo}&size=128" alt="Avatar generated by Minecraft-api.com" />
Parameters
  • username Player's nickname or UUID
  • size Size in pixels (8 to 512, 128 by default)
  • overlay "Hat/hair" layer : true (default) or false
3D bust (head + torso)
<img src="https://minecraft-api.com/api/skins/bust.php?username={pseudo}&ratio=12" alt="Bust generated by Minecraft-api.com" />
Parameters
  • username Player's nickname or UUID
  • ratio Render size (2 to 64, 12 by default)
3D full body
<img src="https://minecraft-api.com/api/skins/full.php?username={pseudo}&ratio=12" alt="Full body generated by Minecraft-api.com" />
Parameters
  • username Player's nickname or UUID
  • ratio Render size (2 to 64, 12 by default)