Identicraft
Minecraft avatar rendering library, CLI, and serverless API
- Version: 1.0
- Author: Shengwei Xiong
- Created: 27 November 2025
- Update: 22 January 2026
API Endpoints
Below here is the list of API Endpoints used by this project:
- 2D Avatar (Simple)
- 3D Avatar (Isometric)
- Full Body
- Bust Body
- Player Skin
GET /avatar/{username_or_uuid}/{size}.png
GET /cube/{username_or_uuid}/{size}.png
GET /body/{username_or_uuid}/{size}.png
GET /bust/{username_or_uuid}/{size}.png
GET /skin/{username_or_uuid}
If the size is not specified on the API, it will returns to 512px by default.
2D Avatar (Simple)
Returns a 2D front-facing avatar head. You can use either Minecraft Username or UUID.
https://identicraft.vercel.app/avatar/{username_or_uuid}/{size}.png
3D Avatar (Isometric)
Returns a 3D isometric view of the player's head. You can use either Minecraft Username or UUID.
https://identicraft.vercel.app/cube/{username_or_uuid}/{size}.png
Full Body
Returns a full-body render (head, torso, arms, legs) of the player's skin. You can use either Minecraft Username or UUID.
https://identicraft.vercel.app/body/{username_or_uuid}/{size}.png
Bust Body
Returns a bust render (head, torso, arms) of the player's skin. You can use either Minecraft Username or UUID.
https://identicraft.vercel.app/bust/{username_or_uuid}/{size}.png
Player Skin
Returns the raw Minecraft skin texture of any registered players.
https://identicraft.vercel.app/skin/{username_or_uuid}
CLI
You can render avatar, cube, full body, bust, and skin using CLI (Command Line Interface)!
- Here's How to Do it:
- Download this Repository
- Ensure Node.js is already Installed on v22 or above.
- Extract and Go to the Repository File
- Open Command Prompt on the Repository File, and Type these commands in order
npm install
npm link
npm run cli
To use the CLI, these are the commands available
== Long form ==
identicraft cube YOUR_USERNAME -output ANY_FILENAME_YOU_WANT.png
== Short form ==
idc cube YOUR_USERNAME -o ANY_FILENAME_YOU_WANT.png
== With custom size ==
idc avatar itsShiroharu -o shiroharu_face.png -s 256
== Full body render ==
idc body itsShiroharu -o shiroharu_body.png
== Get raw skin ==
idc skin itsShiroharu -o shiroharu_skin.png
- CLI Options:
-o, --output [file]- Output file path (default: output.png)-s, --size [size]- Size in pixels 8-512 (default: 512)-h, --help- Display help-V, --version- Display version
- Render Types:
avatar- 2D head (front-facing)cube- 3D isometric headbody- Full body renderbust- Half body (torso + head)skin- Raw skin texture
NPM Library (Programmatic Usage)
You can use this project to your project.
Install in your project:
npm install identicraft
ES6 Imports (Recommended):
import Identicraft from 'identicraft';
import { writeFileSync } from 'fs';
// Render avatar
const avatar = await Identicraft.renderAvatar('itsShiroharu', 256);
writeFileSync('shiroharu-avatar.png', avatar);
// Render cube
const cube = await Identicraft.renderCube('itsShiroharu', 128);
writeFileSync('shiroharu-cube.png', cube);
// Render body
const body = await Identicraft.renderBody('itsShiroharu', 256);
writeFileSync('shiroharu-body.png', body);
// Render bust
const bust = await Identicraft.renderBust('itsShiroharu', 128);
writeFileSync('shiroharu-bust.png', bust);
// Get raw skin
const skin = await Identicraft.getSkin('itsShiroharu');
writeFileSync('shiroharu-skin.png', skin);
// Universal render method
const image = await Identicraft.render('cube', 'itsShiroharu', 256);
writeFileSync('shiroharu-cube.png', image);
// Resolve UUID
const uuid = await Identicraft.resolveUUID('itsShiroharu');
console.log(uuid); // 4648016c70bc4c7dba73523ad5a30802
// Get skin URL
const skinURL = await Identicraft.getSkinURL(uuid);
console.log(skinURL);
CommonJS (Require):
const Identicraft = require('identicraft').default;
const { writeFileSync } = require('fs');
(async () => {
const avatar = await Identicraft.renderAvatar('itsShiroharu', 256);
writeFileSync('itsShiroharu.png', avatar);
})();
Named Imports:
import { renderAvatar, renderCube, resolveUUID } from 'identicraft';
const uuid = await resolveUUID('itsShiroharu');
const avatar = await renderAvatar('itsShiroharu', 128);
const cube = await renderCube('itsShiroharu', 256);
API References
| Method | Parameters | Returns | Description |
renderAvatar(username, size?) |
username: string, size: number | Promise\<Buffer\> | Render 2D avatar head |
renderCube(username, size?) |
username: string, size: number | Promise\<Buffer\> | Render 3D isometric head |
renderBody(username, size?) |
username: string, size: number | Promise\<Buffer\> | Render full body |
renderBust(username, size?) |
username: string, size: number | Promise\<Buffer\> | Render half body |
getSkin(username) |
username: string | Promise\<Buffer\> | Get raw skin texture |
render(type, username, size?) |
type: string, username: string, size: number | Promise\<Buffer\> | Universal render method |
resolveUUID(username) |
username: string | Promise\<string\> | Convert username to UUID |
getSkinURL(uuid) |
uuid: string | Promise\<string\> | Get skin texture URL |
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Shengwei Xiong
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.