# Quickstart

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

## 1. Check that the API answers

```bash
curl https://api.alloymc.dev/v1/status
```

```json
{
  "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/@`).

```bash
curl https://api.alloymc.dev/v1/users/elchi
```

```json
{
  "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](https://api.alloymc.dev/docs/conventions#errors).

## 3. The same from JavaScript

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

```js
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

```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:

```html
<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](https://api.alloymc.dev/docs/images).

## Next

- Show a whole profile card: [Recipes](https://api.alloymc.dev/docs/recipes#a-profile-card-on-your-site).
- Learn the rules every endpoint follows: [Conventions](https://api.alloymc.dev/docs/conventions).
- Browse everything: [API reference](https://api.alloymc.dev/docs/reference).
