Minecraft Skin Generation API
Generate 64×64 Minecraft skin PNGs from text with the PixelSkin API. See request fields, response examples, concurrency limits, and credit pricing.
Last updated: 2026-11-25
Quickstart
Sign in and buy a credit pack. Once the payment settles, you can create an API key. The website’s free trial does not provide API access.
Create API KeyCreate a key, then run both blocks in the same Bash or Zsh session with curl and Python 3. Enter your sk_ key at the terminal prompt.
printf 'PixelSkin API key: '
read -r -s PIXELSKIN_API_KEY
printf '\n'
python3 - <<'PY' > request.json
import json
from uuid import uuid4
print(json.dumps({
"requestId": str(uuid4()),
"prompt": "A lighthouse keeper in a yellow raincoat",
}))
PYSet prompt in request.json and run the second block to save skin.png. Keep the request file for retries.
curl --fail-with-body --max-time 540 \
https://pixelskin.app/api/skin/generate \
-H "Authorization: Bearer $PIXELSKIN_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.json \
--dump-header response.headers \
--output response.json && python3 - <<'PY'
import base64
import json
from pathlib import Path
response = json.loads(Path("response.json").read_text())
if response.get("code") != 0:
raise SystemExit(response.get("message", "Generation failed"))
if not response["data"].get("png"):
raise SystemExit("No PNG returned. Keep response.json and requestId for support.")
prefix, _, png = response["data"]["png"].partition(",")
if prefix != "data:image/png;base64":
raise SystemExit("Expected a Base64 PNG")
Path("skin.png").write_bytes(base64.b64decode(png, validate=True))
PYRequest
POST https://pixelskin.app/api/skin/generate
Send Authorization: Bearer <key> and Content-Type: application/json.
| Field | Type | Details |
|---|---|---|
requestId | UUID · required | Create one per new skin. Reuse it with the original body on a retry. |
prompt | string · conditional | Skin description, up to 2,000 characters. Required unless reference is supplied. |
model | string · optional | openai/gpt-6.1-terra (default) or google/gemini-3.8-flash. |
reviewRounds | integer · optional | 0–2 additional model reviews. Defaults to 0 with an API key. |
reference | string · optional | Base64 PNG, JPEG, or WebP data URL, up to 2,000,000 characters. |
base | string · optional | A 64×64 PNG data URL to use as the starting skin, up to 200,000 characters. |
Response
Success is HTTP 200 with JSON code: 0. The PNG is returned as a Base64 data URL.
| Field | Details |
|---|---|
data.png | Base64 PNG data URL. Decode the part after the comma to save the image. |
data.width, data.height | Output dimensions in pixels. Both are 64. |
data.model | Model identifier returned by the provider. |
data.rounds[] | Per-round details: round (zero-based), plan, applied, rejected, and done. |
data.billing[] | One record per completed round: taskId, status, costCredits, and balance. A replay shows the original charge and current balance. |
Legacy fields
data.downloadUrl, data.editorUrl and data.expiresAt are retained for compatibility and currently return null. Save the PNG from data.png; legacy public download links are retired.
{
"code": 0,
"message": "ok",
"data": {
"png": "data:image/png;base64,iVBORw0KGgo…",
"width": 64,
"height": 64,
"model": "openai/gpt-6.1-terra",
"rounds": [
{
"round": 0,
"plan": "Yellow raincoat",
"applied": 42,
"rejected": 0,
"done": true
}
],
"billing": [
{
"taskId": "skin:…",
"status": "success",
"costCredits": 5,
"balance": 145
}
]
}
}Rate limits and concurrency
- Each account can run one paid model round at a time across API keys and the editor. A competing round can return
409. - Each runtime instance applies a minimum interval of 15 seconds per account and 2 seconds per IP. On
429, followRetry-After. - The JSON body can be up to 4 MiB. Data URL limits include the prefix.
- The endpoint responds synchronously. Each model round has an 8-minute timeout. Allow about 9 minutes for a single-round request.
API pricing
5 credits per default request. A successful request returns a 64×64 PNG.
| Pack | Price (USD) | Credits | Default generations |
|---|---|---|---|
| Starter | $4.90 | 150 | 30 |
| Creator | $8.90 | 450 | 90 |
| Studio | $19.90 | 1,050 | 210 |
API requests default to one round without automatic reviews. The table uses this default. Each optional review adds 5 credits; a failed round is refunded.
API access and refunds
API access requires a settled credit-pack purchase. Keys are paused if your last eligible purchase is refunded or pending refund. A new settled purchase restores access.
Credit packs are one-time purchases and credits do not expire. Buy credits.
Errors and retries
After a timeout or disconnect, resend the same request body, requestId, and account. A completed request returns the original PNG without an additional debit. Use a new UUID for a new skin.
| HTTP | Cause | Action |
|---|---|---|
400 / 413 | Invalid JSON or fields / body exceeds 4 MiB. | Fix the input before retrying. |
401 | Missing or invalid API key, or API access disabled. | Check your key and access. |
402 | Insufficient credits. | Add credits and retry the same request. |
403 | No eligible settled credit-pack purchase. | Wait for your purchase to settle or buy a new credit pack after a refund. |
409 | Round still running, account busy, or request ID reused with different input. | For active rounds, wait at least 15 seconds. For a conflict, restore the original body or use a new UUID for a new skin. |
422 / 502 | A failed round has been refunded. A replay of a failed round returns 422. | Use a new UUID if you want to start a new generation. |
429 | Rate limited. | Wait the number of seconds in the Retry-After header. |
500 / 503 | Server error or generation service unavailable. | Retry later with the same request body and ID. |
Check both HTTP status and the JSON code. Most errors include a message. To report a problem, send the HTTP status and requestId to PixelSkin support.
