Developers
Products
Quickstart

Start

Quickstart

Make your first AlloyMC API request with curl, JavaScript or Python, and show someone's avatar.

Updated · Markdown

No account and no key needed. Every example below works as it is.

1. Check that the API answers

curl https://api.alloymc.dev/v1/status
{
  "launcher": "0.2.1",
  "ok": true,
  "version": "0.1.9"
}

launcher is the newest Alloy release; version is the API server's own version.

2. Read a profile

Replace elchi with any handle (the part after alloymc.dev/@).

curl https://api.alloymc.dev/v1/users/elchi
{
  "handle": "elchi",
  "displayName": "Elchi",
  "private": false,
  "bio": "Makes Alloy.",
  "pronouns": "",
  "links": ["https://github.com/Elchi-dev"],
  "accent": "gold",
  "followers": 12,
  "following": 3,
  "createdAt": "2026-10-31T12:00:00Z",
  "minecraft": [],
  "avatarUrl": "https://api.alloymc.dev/v1/users/elchi/avatar.png?v=1a2b3c4d",
  "profileUrl": "https://alloymc.dev/@elchi"
}

A handle that doesn't exist answers 404 with an error object.

3. The same from JavaScript

This runs in a browser page or in Node 18 and newer:

const res = await fetch("https://api.alloymc.dev/v1/users/elchi");
if (!res.ok) throw new Error((await res.json()).error.message);
const user = await res.json();
console.log(`${user.displayName} has ${user.followers} followers`);

4. Or from Python

import requests

r = requests.get("https://api.alloymc.dev/v1/users/elchi", timeout=10)
r.raise_for_status()
user = r.json()
print(user["displayName"], user["followers"])

5. Show the avatar

Avatars are plain PNG links. Ask for the size you show (s= from 16 to 512) and keep the pixels crisp:

<img src="https://api.alloymc.dev/v1/users/elchi/avatar.png?s=128"
     width="64" height="64" alt="Elchi's avatar"
     style="image-rendering: pixelated">

More about sizes and caching in Images.

Next