Skip to content

API information

Technical details

Everything you need to know about integrating the Minecraft Item API into your project.

Base URL

https://api.minecraftitems.xyz

All API endpoints are relative to this base URL. HTTPS is required for all requests.

Authentication

Most endpoints work without authentication. However, some features require an API key:

  • Creating shareable links
  • Uploading custom resource packs
  • Using custom resource packs in renders

Getting a key

To get an API key, make a POST request to /api/setup with your username.

POST/api/setup

Your API key will only be shown once, so save it immediately.

Sending your key

Pass your API key as a query parameter:

Query parameter
/api/item/diamond_sword?apiKey=YOUR_API_KEY

Or in the request body for POST requests:

Request body
{ "apiKey": "YOUR_API_KEY", ... }

Rate limits

Applies toLimit
All requests (per IP)1,000 requests per minute
API key creation (per IP)1 key per hour
Resource pack uploads (per IP)2 uploads per hour

Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in all responses. If you exceed the limit, you'll receive a 429 status code.

Response headers
X-RateLimit-Limit:
1000
X-RateLimit-Remaining:
999
X-RateLimit-Reset:
2026-01-01T12:01:00.000Z

Response formats

Image responses

Item, GUI, tooltip, and player list endpoints return PNG images directly. GIF endpoints return GIF images. The Content-Type header indicates the format.

image/png
Static item renders, GUIs, tooltips
image/gif
Animated rotating items

JSON responses

Share endpoints, setup endpoints, and stats endpoints return JSON.

JSON response
{
  "success": true,
  "url": "https://api.minecraftitems.xyz/api/share/abc123",
  "expiresAt": "2024-01-01T00:00:00.000Z"
}

Error responses

Errors return JSON with an error message and appropriate HTTP status code.

Error response
{
  "error": "Item not found",
  "item": "invalid_item",
  "availableItems": ["abandoned_camp_map", "acacia_boat", "..."],
  "totalAvailable": 2059
}

HTTP status codes

CodeMeaning
200Success — Image or JSON returned
400Bad Request — Invalid parameters
401Unauthorized — Invalid or missing API key
404Not Found — Item or resource doesn't exist
429Too Many Requests — Rate limit exceeded
500Server Error — Something went wrong

Caching

Rendered images are cached server-side to improve response times. Identical requests will return cached results when available.

Item, GUI and tooltip renders
Cached for 1 hour
GIF renders
Cached for 1 hour
Shareable links
Expire after 30 days without access
Resource pack renders
Cached separately per pack

Image responses include Cache-Control: public, max-age=3600 for client-side caching.

Supported content

The API supports all items and blocks from Minecraft Java Edition, updated to the latest version.

Item names

Use the Minecraft internal item ID (e.g., diamond_sword, netherite_pickaxe). Names are case-insensitive.

  • Diamond sword
    /api/item/diamond_sword

    200 · image/png · 128×128

  • Netherite pickaxe
    /api/item/netherite_pickaxe

    200 · image/png · 128×128

  • Grass block, rendered in 3D
    /api/item/grass_block

    200 · image/png · 512×512

  • Diamond sword, requested in capitals
    /api/item/DIAMOND_SWORD

    200 · same image as diamond_sword

Color codes

Tooltips and display names support Minecraft color codes using the § symbol:

  • §0Black
  • §1Dark Blue
  • §2Dark Green
  • §3Dark Aqua
  • §4Dark Red
  • §5Purple
  • §6Gold
  • §7Gray
  • §8Dark Gray
  • §9Blue
  • §aGreen
  • §bAqua
  • §cRed
  • §dPink
  • §eYellow
  • §fWhite
  • §l Bold
  • §o Italic
  • §n Underline
  • §m Strikethrough
  • §r Reset

Resource packs

Upload custom Minecraft resource packs to render items with your own textures and models. Perfect for servers with custom items using CustomModelData.

Requirements

  • Valid Minecraft resource pack format (.zip)
  • Maximum file size: 500MB
  • Must contain valid pack.mcmeta
  • API key required for upload

Using resource packs

After uploading, use the rp query parameter with your pack ID:

Request URL with a pack
/api/item/diamond_sword?rp=pack_abc123&apiKey=YOUR_KEY

Custom model data

Use the cmd parameter to specify CustomModelData values:

Request URL with CustomModelData
/api/item/diamond_sword?rp=pack_abc123&cmd=1&apiKey=YOUR_KEY

CORS policy

The API supports Cross-Origin Resource Sharing (CORS) for all origins. You can make requests from any domain, including browser-based JavaScript applications.

For image endpoints, you can also use the URLs directly in <img> tags without any CORS issues.

CORS headers on every response
Access-Control-Allow-Origin:
*
Access-Control-Allow-Methods:
GET, POST, DELETE
Access-Control-Allow-Headers:
Content-Type

Language examples

Each example below requests the same render:

  • Diamond sword at size 4
    /api/item/diamond_sword/size=4

    200 · image/png · 512×512

  • JavaScript / Node.js

    JavaScript / Node.js
    const response = await fetch(
      'https://api.minecraftitems.xyz/api/item/diamond_sword/size=4'
    );
    const imageBlob = await response.blob();
  • Python

    Python
    import requests
    
    response = requests.get(
        'https://api.minecraftitems.xyz/api/item/diamond_sword/size=4'
    )
    with open('sword.png', 'wb') as f:
        f.write(response.content)
  • cURL

    cURL
    curl -o sword.png \
      'https://api.minecraftitems.xyz/api/item/diamond_sword/size=4'
  • HTML (direct embed)

    HTML (direct embed)
    <img
      src="https://api.minecraftitems.xyz/api/item/diamond_sword/size=4"
      alt="Diamond Sword"
    />

Ready to start?

Try the API in the Playground, or check out the full documentation for detailed endpoint references.