# Quickstart

## 1. Get an account number

Open [https://chat.smallpaper.io](https://chat.smallpaper.io) and press **Create a new account**. You get a 20-digit number like
`4192 0837 5561 2094 7381`.

That number is the whole account: no email, no password, **no recovery**. It is also your API
key. Write it down — we store only a hash, so it cannot be shown again.

## 2. Fund it

A new account starts empty, so the chat and the API both answer `402 insufficient_balance`
until you fund it. Press **Top up** in the chat UI and name an amount. Payment is by crypto,
and balances never expire.

Without a browser: `GET https://chat.smallpaper.io/api/funding` for the allowed range, then
`GET https://chat.smallpaper.io/checkout?usd=25` with your key as the Bearer returns `{"checkout_url"}`; pay it, and
poll `GET https://api.smallpaper.io/api/me` until the balance rises. The [API](https://smallpaper.io/docs/api.md) page has the
whole flow, signup included.

## 3. Call it

```sh
curl https://api.smallpaper.io/v1/chat/completions \
  -H "Authorization: Bearer $SMALLPAPER_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "model": "glm-5.3-flash-abliterated",
    "messages": [{"role": "user", "content": "Say hello in five words."}]
  }'
```

With the OpenAI SDK, change two settings and nothing else:

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.smallpaper.io/v1", api_key="41920837556120947381")
print(client.chat.completions.create(
    model="glm-5.3-flash-abliterated",
    messages=[{"role": "user", "content": "Say hello in five words."}],
).choices[0].message.content)
```

## 4. Point a coding agent at it

See [opencode](https://smallpaper.io/docs/opencode.md) for a one-line installer. Any agent that speaks
chat-completions needs only the base URL and the key.

**Codex** (the OpenAI CLI): add a provider to `~/.codex/config.toml` and select it.

```toml
model_provider = "smallpaper"
model = "glm-5.3-flash-abliterated"

[model_providers.smallpaper]
name = "Small Paper"
base_url = "https://api.smallpaper.io/v1"
env_key = "SMALLPAPER_API_KEY"
wire_api = "chat"
```

**Claude Code** speaks the Anthropic Messages API, which Small Paper does not serve: pointing
`ANTHROPIC_BASE_URL` here gets a 404. Use a translating proxy (LiteLLM), opencode, or Codex.

## Checking your balance

```sh
curl https://api.smallpaper.io/api/me -H "Authorization: Bearer $SMALLPAPER_API_KEY"
```

Returns the balance, total spent and request count. A non-streamed chat-completions
response also carries `X-Balance-Microdollars`; a streamed one cannot, its headers go first.
