API information
Technical details
Base URL
https://api.minecraftitems.xyzAll 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.
/api/setupYour API key will only be shown once, so save it immediately.
Sending your key
Pass your API key as a query parameter:
/api/item/diamond_sword?apiKey=YOUR_API_KEYOr in the request body for POST requests:
{ "apiKey": "YOUR_API_KEY", ... }Rate limits
| Applies to | Limit |
|---|---|
| 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.
- 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.
{
"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": "Item not found",
"item": "invalid_item",
"availableItems": ["abandoned_camp_map", "acacia_boat", "..."],
"totalAvailable": 2059
}HTTP status codes
| Code | Meaning |
|---|---|
| 200 | Success — Image or JSON returned |
| 400 | Bad Request — Invalid parameters |
| 401 | Unauthorized — Invalid or missing API key |
| 404 | Not Found — Item or resource doesn't exist |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Server 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.
/api/item/diamond_sword 200 · image/png · 128×128
/api/item/netherite_pickaxe 200 · image/png · 128×128
/api/item/grass_block 200 · image/png · 512×512
/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:
/api/item/diamond_sword?rp=pack_abc123&apiKey=YOUR_KEYCustom model data
Use the cmd parameter to specify CustomModelData values:
/api/item/diamond_sword?rp=pack_abc123&cmd=1&apiKey=YOUR_KEYCORS 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.
- 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:
/api/item/diamond_sword/ size=4 200 · image/png · 512×512
JavaScript / Node.js
JavaScript / Node.jsconst response = await fetch( 'https://api.minecraftitems.xyz/api/item/diamond_sword/size=4' ); const imageBlob = await response.blob();Python
Pythonimport 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
cURLcurl -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.