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 Key

Create 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.

Prepare request.json
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",
}))
PY

Set prompt in request.json and run the second block to save skin.png. Keep the request file for retries.

Generate skin.png
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))
PY

Request

POST https://pixelskin.app/api/skin/generate

Send Authorization: Bearer <key> and Content-Type: application/json.

FieldTypeDetails
requestIdUUID · requiredCreate one per new skin. Reuse it with the original body on a retry.
promptstring · conditionalSkin description, up to 2,000 characters. Required unless reference is supplied.
modelstring · optionalopenai/gpt-6.1-terra (default) or google/gemini-3.8-flash.
reviewRoundsinteger · optional0–2 additional model reviews. Defaults to 0 with an API key.
referencestring · optionalBase64 PNG, JPEG, or WebP data URL, up to 2,000,000 characters.
basestring · optionalA 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.

FieldDetails
data.pngBase64 PNG data URL. Decode the part after the comma to save the image.
data.width, data.heightOutput dimensions in pixels. Both are 64.
data.modelModel 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.

Example response (abbreviated)
{
  "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, follow Retry-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.

PackPrice (USD)CreditsDefault generations
Starter$4.9015030
Creator$8.9045090
Studio$19.901,050210

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.

HTTPCauseAction
400 / 413Invalid JSON or fields / body exceeds 4 MiB.Fix the input before retrying.
401Missing or invalid API key, or API access disabled.Check your key and access.
402Insufficient credits.Add credits and retry the same request.
403No eligible settled credit-pack purchase.Wait for your purchase to settle or buy a new credit pack after a refund.
409Round 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 / 502A 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.
429Rate limited.Wait the number of seconds in the Retry-After header.
500 / 503Server 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.