Crie imagens compostas com múltiplas skins de Minecraft usando o endpoint POST de composição.
Índice de documentação: /api/templates
POST /api/minecraft/render/composition
Este endpoint aceita um array JSON com até 10 items (nicks ou URLs de skins) e retorna uma imagem PNG composta.
Envie um POST com um JSON Array contendo os itens. Cada item pode ter:
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
value | string | ✓ | Nick do jogador ou URL da skin |
type | string | ✗ | "nick" ou "url" (auto-detectado se omitido) |
label | string | ✗ | Texto a exibir abaixo da skin (padrão: nick ou vazio) |
[
{"value": "St4rx3"},
{"value": "Notch"},
{"value": "Dinnerbone"}
]
[
{"value": "St4rx3", "label": "Admin"},
{"value": "Notch", "label": "Criador"},
{"value": "jeb_", "label": "Desenvolvedor"}
]
[
{
"value": "https://textures.minecraft.net/texture/...",
"type": "url",
"label": "Skin Custom"
},
{"value": "Notch"}
]
[
{"value": "St4rx3", "label": "Jogador 1"},
{
"value": "https://textures.minecraft.net/texture/...",
"type": "url",
"label": "Skin Custom"
}
]
curl -X POST https://nebulaapi.com/api/minecraft/render/composition \
-H "Content-Type: application/json" \
-d '[
{"value": "St4rx3"},
{"value": "Notch"}
]' \
--output composition.png
import requests
url = "https://nebulaapi.com/api/minecraft/render/composition"
data = [
{"value": "St4rx3", "label": "Admin"},
{"value": "Notch", "label": "Creator"}
]
response = requests.post(url, json=data)
with open("composition.png", "wb") as f:
f.write(response.content)
fetch('https://nebulaapi.com/api/minecraft/render/composition', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify([
{value: 'St4rx3', label: 'Admin'},
{value: 'Notch', label: 'Creator'}
])
})
.then(response => response.blob())
.then(blob => {
const url = URL.createObjectURL(blob);
const img = document.createElement('img');
img.src = url;
document.body.appendChild(img);
});
A resposta é uma imagem PNG com: