# ElephantPool for AI agents

> This page is ElephantPool's documentation for AI agents that work for a
> person: what the service is, how to tell whether it is useful to that
> person, and how to set it up for them through the API. It describes what an
> agent *can* do when the person asks — it is not a request to do
> any of it. Four decisions are the person's and are marked **ASK** below.
>
> Guide version 2026-11-30 · terms of use 1.5 · mahout 0.5.6
> Machine-readable: [https://elephantpool.ai/openapi.json](https://elephantpool.ai/openapi.json) ·
> facts and prices: [https://elephantpool.ai/llms.txt](https://elephantpool.ai/llms.txt)
>
> Asked to sign the person up and set up their coding tool on ElephantPool?
> §0 is the whole job, step by step, with every call.

## 0. The usual job: an account, an API key, and the person's coding tool

When the person asks something like *"sign me up on ElephantPool and set
yourself up on it"*, these nine steps are the whole job, in order. The person
does two things, in their browser: they **approve you** (step 3: they sign in
with Google or with a link ElephantPool mails them, accept the terms, press
Allow) and they **pay** on Stripe's page (step 5). You do the rest. The other
sections are reference: §2.3 if they ask whether it is worth it, §6 if what
they have is a GPU.

The calls write their answers to files in `~/.config/elephantpool/`, each
block under `umask 077` so that only the person can read them, and print only what you
need: no secret ends up in the conversation. They use `curl` and `jq`. Shell
variables do not outlive one command in most tools, so each block that needs
the session starts by reading it from its file.

### Step 1 — Check first: a model the tool can use (no account)

```sh
curl -s https://elephantpool.ai/api/gateway/v1/public/models | jq -r '.data[] | select(.hosts_live > 0)
  | "\(.id)  ctx=\(.ctx)  machines=\(.hosts_live)  \(.capabilities | join(","))"'
```

A coding tool needs a model that machines serve now (the list above shows only
those; an empty list means none is served at this moment), that calls tools (`tool-use`), and whose `ctx` — the largest request,
in tokens, those machines take now — holds the tool's instructions, its tool
list and the files it reads: 32768 or more. `qwen3.8-27b` is the model
the plans are counted on. With no machine connected, `ctx` is the size every
host is asked to offer, not what the next machine will take: read it again
when a model is served.

If no model passes, tell the person before they pay: their tool's requests
would be refused (`503 no_eligible_host`) or would not fit. The account and
the key cost nothing and can be made now (steps 3, 4, 6) if they still want
them; the payment (step 5) and the tool's configuration (step 8) wait until a
model passes — run this check again then.

Then find their tool in step 8. **Claude Code cannot use ElephantPool** (it
needs Anthropic's API, which ElephantPool does not offer): say so now, not
after they paid.

### Step 2 — Ask once (ASK 1, 2 and 3 in one message)

Before you create anything, tell the person:

- an account in their name: ElephantPool's page will ask them to sign in, with
  Google or with a link mailed to them (there is no password). Ask which
  address they want the account under: you pass it in step 3 and the page
  fills it in, but they still sign in themself;
- the terms of use (version 1.5) and the privacy policy, which they accept
  on that page: https://elephantpool.ai/legal/conditions and https://elephantpool.ai/legal/privacy;
- paying: a monthly plan, EUR 12 to EUR 100 a month VAT included, the first month
  50% off for a subscription; or, if the account is offered one (step 5 tells
  you), the trial: a card check on Stripe, nothing charged, then a small credit
  that is not certain. They pay or check the card themself on Stripe's page;
  you never see the card;
- what you do afterwards: an API key with a monthly cap (EUR 20 unless they
  want another) and their tool's configuration, in a file you will name.

A message that works: *"ElephantPool needs an account in your name, and a plan
(EUR 12 to EUR 100 a month) or its trial if they offer you one (a card check, nothing
charged). I'll send you a link to approve me — you sign in there and accept
their terms — then a Stripe link to pay. I'll create the key and set up
<tool>. Go ahead?"*

### Step 3 — Get approved (the person's first click)

```sh
umask 077; mkdir -p ~/.config/elephantpool; cd ~/.config/elephantpool
curl -s -X POST https://elephantpool.ai/api/users/auth/agent/start -o start.json \
  -H 'Content-Type: application/json' \
  -d '{"client_name":"<the name the person knows you by>","intent":"builder","login_hint":"<their address>"}'
jq -r '"Open \(.verification_uri_complete) and check that it shows the code \(.user_code)."' start.json
```

`login_hint` is the address the person told you (leave it out if they did
not): the page fills it in on sign-in, and warns them if they are signed in
with another account. Only in this body — never in a link you hand over: an
address in a URL ends up in logs and in the browser's history. Nothing is
mailed to it and no account is made with it.

Send the person that line, and say: sign in with the address you chose, accept
the terms if the page asks, press Allow. (`client_name`: 1–60 letters, digits,
spaces and `. _ - ( ) / +`, not ElephantPool's own name; details in §4.A.)
Then wait for their answer. This asks every `interval` seconds for two
minutes; run it again until it prints `approved` — the code lives 15 minutes:

```sh
umask 077; cd ~/.config/elephantpool
for i in $(seq 24); do
  curl -s -X POST https://elephantpool.ai/api/users/auth/agent/token -o answer.json \
    -H 'Content-Type: application/json' \
    -d "{\"grant_type\":\"urn:ietf:params:oauth:grant-type:device_code\",\"device_code\":\"$(jq -r .device_code start.json)\"}"
  e=$(jq -r '.error // "approved"' answer.json)
  [ "$e" = approved ] && { mv answer.json session.json; break; }
  [ "$e" = authorization_pending ] || [ "$e" = slow_down ] || break
  sleep "$(jq -r .interval start.json)"; [ "$e" = slow_down ] && sleep 5
done; echo "$e"
```

`access_denied`: they refused — stop. `expired_token`: start step 3 again.

### Step 4 — The session, and the builder side

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
jq -c '{needs, personas: .user.personas, agent: .agent.id}' session.json
```

- `personas.builder` false: give the account the builder side. The answer
  carries a new access token (the sides live in it), which this keeps in
  `session.json`:

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s -X PATCH https://elephantpool.ai/api/users/me -o me.json \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' -d '{"personas":{"builder":true}}'
jq -e .token me.json > /dev/null && jq -s '.[0] + {access_token: .[1].token}' session.json me.json > s.json && mv s.json session.json
jq -c '.personas // .' me.json
```

- `needs` not empty: §5.1 (it happens only after the mailbox path).
- The access token lives 15 minutes. A `401` means renew it (the refresh token
  lives 90 days from its last use):

```sh
umask 077; cd ~/.config/elephantpool
curl -s -X POST https://elephantpool.ai/api/users/auth/agent/token -o answer.json \
  -H 'Content-Type: application/json' \
  -d "{\"grant_type\":\"refresh_token\",\"refresh_token\":\"$(jq -r .refresh_token session.json)\"}"
jq -e .access_token answer.json > /dev/null && jq -s '.[0] + .[1]' session.json answer.json > s.json && mv s.json session.json
rm -f answer.json
```

### Step 5 — Pay (ASK 3): the trial or a plan (the person's second click)

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s https://elephantpool.ai/api/gateway/billing -o billing.json -H "Authorization: Bearer $EP_TOKEN"
jq -c '{plan: .plan.status, trial: .trial.status, trial_eur: .trial.eur, trial_days: .trial.days}' billing.json
```

- `plan` is `"active"`: nothing to pay — step 6.
- `trial` is `"available"` and the person wants to try first: the card check.
  On a busy day the card is verified and the credit comes later (§7.1): never
  promise it. On 2026-11-30, the trial is offered until 2026-12-07T23:59:59+01:00 (`until` in GET /billing/trial; EUR 5 of credit, usable 14 days). After its end, `POST /billing/trial`
  answers 410 `TRIAL_OFFER_ENDED` and `trial` is no longer `"available"`: say
  the offer has ended and offer a plan. A trial already given runs to its term.

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s -X POST https://elephantpool.ai/api/gateway/billing/trial -o pay.json \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' -d '{"locale":"en"}'
```

- otherwise, the plan they chose. On 2026-11-30: `p12` Mini EUR 12 (33 M tokens in, 4 M out, 30 requests a minute), `p20` Start EUR 20 (60 M tokens in, 7 M out, 60 requests a minute), `p35` Build EUR 35 (120 M tokens in, 14 M out, 120 requests a minute), `p60` Ship EUR 60 (225 M tokens in, 26.5 M out, 240 requests a minute), `p100` Scale EUR 100 (400 M tokens in, 46.5 M out, 480 requests a minute). The authority, with the
  exact amounts and the ways to pay, is this list; `method` and `kind` come
  from its `methods`, and `auto` renews by itself and gets the first-month
  discount:

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s https://elephantpool.ai/api/gateway/billing/plans -o plans.json -H "Authorization: Bearer $EP_TOKEN"
jq -c '.plans[] | {id, name, price_eur}, (.methods[] | {id, kind})' plans.json
```

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s -X POST https://elephantpool.ai/api/gateway/billing/checkout -o pay.json \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' \
  -d '{"plan_id":"p20","method":"card","kind":"auto"}'
```

`jq -r .url ~/.config/elephantpool/pay.json` is the Stripe link: send it to the person, who pays (or
checks the card) there. Use their language in `locale` (`en` `fr` `de` `es`
`it` `nl`). Then read `GET https://elephantpool.ai/api/gateway/billing` every ten seconds or so, for
a few minutes, until `plan.status` is `"active"` or `trial.status` is
`"granted"`; for the trial, `GET https://elephantpool.ai/api/gateway/billing/trial` says when the check
is complete and, if no credit came, why (§7.1). A bank debit can take days
(`plan.payment_processing` is true): tell the person ElephantPool will mail
them, and go on with step 6.

### Step 6 — The key

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s -X POST https://elephantpool.ai/api/gateway/keys -o key.json \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' \
  -d '{"name":"<tool> on <machine>","monthly_cap_eur":20}'
jq -er .key key.json > api-key && jq -c '{_id, name, last4, monthly_cap_eur}' key.json && rm key.json
```

The key (`epk_` and 40 hex) is shown once: it is now in
`~/.config/elephantpool/api-key`, which the configurations of step 8 read,
directly or through the variable `ELEPHANTPOOL_API_KEY`. `monthly_cap_eur` caps
what this key may draw in a calendar month, at list prices: a runaway loop
cannot use up the month. A key works before the plan does; its calls answer
`402 insufficient_credits` until step 5 is done.

If the block prints nothing, no key was made: `api-key` holds `null` and
`key.json` the answer (`jq -c . key.json`). `403 TERMS_NOT_ACCEPTED` means
the terms of use are not accepted on this account, and no key is made
without them. Do not accept them in the person's name: send them back to the
approval page (step 3 again, a new link; the page asks them to tick the terms,
then Allow), or, if they accepted in so many words (ASK 2), record it as §5.1
says. Then run this block again.

### Step 7 — The first call, with a tool

```sh
curl -s https://app.elephantpool.ai/api/gateway/v1/chat/completions \
  -H "Authorization: Bearer $(cat ~/.config/elephantpool/api-key)" -H 'Content-Type: application/json' \
  -d '{"model":"qwen3.8-27b","max_tokens":1000,"messages":[{"role":"user","content":"What time is it in Brussels? Use the tool."}],
       "tools":[{"type":"function","function":{"name":"get_time","description":"Current time in a time zone",
       "parameters":{"type":"object","properties":{"tz":{"type":"string"}},"required":["tz"]}}}]}' \
  | jq -c '.choices[0].message.tool_calls // .error'
```

Use the model step 1 chose. A `get_time` call coming back means tools work
through ElephantPool. `insufficient_credits` (402): step 5 is not finished.
`no_eligible_host` (503): no machine serves that model now — back to step 1.
Do not point the person's tool at ElephantPool before this answers.

### Step 8 — Configure the person's tool

ElephantPool speaks the OpenAI Chat Completions API and nothing else. What
that means for each tool, from each tool's own documentation as read on
2026-11-27:

| Tool | With ElephantPool | Why |
|---|---|---|
| opencode | works | its `openai-compatible` provider calls `/chat/completions`, tools included |
| pi | works | `"api": "openai-completions"` in its `models.json` |
| Aider | works | the `openai/` prefix calls `/chat/completions`; it asks for edits as text, not as tool calls |
| Cline | works | its "OpenAI Compatible" provider |
| Continue | chat, edit and agent work; autocomplete does not | autocomplete asks for `/completions`, which is not served |
| Cursor | chat only, and the person sets it in the app | Cursor's servers send the requests (the prompts pass through Cursor); its Tab completion stays Cursor's; the key lives only in its settings screen |
| Codex CLI | **does not work** | its current releases speak only OpenAI's Responses API (`wire_api = "responses"` is the only value its configuration takes); `/responses` is not served |
| Claude Code | **does not work** | it speaks only Anthropic's Messages API (`/v1/messages`), which is not served; Anthropic does not support Claude Code with non-Claude models behind any gateway |

For the two that do not work, write nothing: tell the person, and offer one
of the tools above. Do not set up a translating proxy on your own.

Before you write to a file: copy it to a backup, change only ElephantPool's
entry, keep everything else the person set. First, the model and its sizes —
`M` is the model step 1 chose (`qwen3.8-27b` if it passed), `CTX` the context to
declare (its `ctx`), `OUT` the output budget (a quarter of that, at most
16384):

```sh
umask 077; cd ~/.config/elephantpool; M=qwen3.8-27b
curl -s https://elephantpool.ai/api/gateway/v1/public/models -o models.json
CTX=$(jq --arg m "$M" '.data[] | select(.id == $m) | .ctx' models.json)
R=$(jq --arg m "$M" '.data[] | select(.id == $m) | (.capabilities | index("reasoning") != null)' models.json)
printf 'M=%s\nCTX=%s\nOUT=%s\nR=%s\n' "$M" "$CTX" "$(( CTX / 4 < 16384 ? CTX / 4 : 16384 ))" "$R" > model.env; cat model.env
[ "$CTX" -ge 32768 ] || echo "ctx $CTX is too small for a coding tool: back to step 1"
jq -e --arg m "$M" '.data[] | select(.id == $m) | .hosts_live > 0' models.json > /dev/null || echo "no machine serves $M now: back to step 1"
```

Each block below starts by reading `model.env`, and reads the key from
`~/.config/elephantpool/api-key` (step 6).

**opencode** — `~/.config/opencode/opencode.json` (all projects) or
`opencode.json` in one project. This is the format opencode 1 reads and
opencode 2 still accepts; it makes ElephantPool the default model (drop the
last line of the filter to keep theirs):

```sh
. ~/.config/elephantpool/model.env; f=~/.config/opencode/opencode.json; mkdir -p ~/.config/opencode
[ -f "$f" ] && cp "$f" "$f.bak-$(date +%Y%m%d-%H%M%S)" || echo '{"$schema":"https://opencode.ai/config.json"}' > "$f"
jq --arg m "$M" --argjson ctx "$CTX" --argjson out "$OUT" --argjson r "$R" '
  .provider.elephantpool = {name: "ElephantPool", npm: "@ai-sdk/openai-compatible",
    options: {baseURL: "https://app.elephantpool.ai/api/gateway/v1", apiKey: "{file:~/.config/elephantpool/api-key}"},
    models: {($m): {name: $m, tool_call: true, reasoning: $r, limit: {context: $ctx, output: $out}}}}
  | .model = "elephantpool/\($m)"' "$f" > "$f.new" && mv "$f.new" "$f"
```

If the file has comments (`opencode.jsonc`), `jq` cannot read it: add the same
entry by hand. If it already uses opencode 2's own keys (`providers`,
`package`, `settings`), write the entry that way instead:
`"providers": {"elephantpool": {"package": "@opencode/ai/providers/openai-compatible",
"settings": {"baseURL": "https://app.elephantpool.ai/api/gateway/v1", "apiKey":
"{file:~/.config/elephantpool/api-key}"}, "models": {"<M>": {"capabilities":
{"tools": true}, "limit": {"context": <CTX>, "output": <OUT>}}}}}`.

**pi** — `~/.pi/agent/models.json` (or under `$PI_CODING_AGENT_DIR`); then
the person picks `elephantpool` / the model with `/model`:

```sh
. ~/.config/elephantpool/model.env; d=${PI_CODING_AGENT_DIR:-$HOME/.pi/agent}; f=$d/models.json; mkdir -p "$d"
[ -f "$f" ] && cp "$f" "$f.bak-$(date +%Y%m%d-%H%M%S)" || echo '{}' > "$f"
jq --arg m "$M" --argjson ctx "$CTX" --argjson out "$OUT" --argjson r "$R" --arg k "!cat $HOME/.config/elephantpool/api-key" '
  .providers.elephantpool = {baseUrl: "https://app.elephantpool.ai/api/gateway/v1", api: "openai-completions", apiKey: $k,
    models: [{id: $m, reasoning: $r, contextWindow: $ctx, maxTokens: $out}]}' "$f" > "$f.new" && mv "$f.new" "$f"
```

**Aider** — `~/.aider.conf.yml` (it also reads one at the root of the git
repository and in the current directory, the last one winning). Aider cannot
read the key from a file, so this one holds a copy of it: keep it at mode 600.
If the file exists, add the three lines to it instead of replacing it:

```sh
. ~/.config/elephantpool/model.env; f=~/.aider.conf.yml
[ -f "$f" ] && cp "$f" "$f.bak-$(date +%Y%m%d-%H%M%S)"
[ -f "$f" ] || { umask 077; printf 'openai-api-base: https://app.elephantpool.ai/api/gateway/v1\nopenai-api-key: %s\nmodel: openai/%s\n' \
  "$(cat ~/.config/elephantpool/api-key)" "$M" > "$f"; }
grep -qs "name: openai/$M\$" ~/.aider.model.settings.yml || {
  [ -f ~/.aider.model.settings.yml ] && cp ~/.aider.model.settings.yml ~/.aider.model.settings.yml.bak-$(date +%Y%m%d-%H%M%S)
  printf -- '- name: openai/%s\n  edit_format: diff\n  use_repo_map: true\n' "$M" >> ~/.aider.model.settings.yml; }
```

The last line tells Aider how to ask a model it does not know for edits;
without it Aider rewrites whole files. It still warns that it does not know
the model's context size: that warning is harmless.

**Cline** — in its settings (⚙️): API Provider **OpenAI Compatible**, Base URL
`https://app.elephantpool.ai/api/gateway/v1`, API Key: the key, Model ID: `M`, and under Model
Configuration the context window `CTX`. From Cline's CLI, the same in one
command:

```sh
. ~/.config/elephantpool/model.env
cline auth -p openai-compatible -k "$(cat ~/.config/elephantpool/api-key)" -m "$M" -b https://app.elephantpool.ai/api/gateway/v1
```

**Continue** — `~/.continue/config.yaml`; the key goes into
`~/.continue/.env`, which `secrets.` reads. Not the `autocomplete` role: it
needs `/completions`. If `config.yaml` exists, add the model under its
`models:` instead of replacing the file:

```sh
. ~/.config/elephantpool/model.env; mkdir -p ~/.continue; f=~/.continue/config.yaml
( umask 077; grep -qs '^ELEPHANTPOOL_API_KEY=' ~/.continue/.env || {
  [ -f ~/.continue/.env ] && cp ~/.continue/.env ~/.continue/.env.bak-$(date +%Y%m%d-%H%M%S)
  printf 'ELEPHANTPOOL_API_KEY=%s\n' "$(cat ~/.config/elephantpool/api-key)" >> ~/.continue/.env; }
  chmod 600 ~/.continue/.env )
[ -f "$f" ] && cp "$f" "$f.bak-$(date +%Y%m%d-%H%M%S)"
[ -f "$f" ] || cat > "$f" <<EOF
name: ElephantPool
version: 0.0.1
schema: v1
models:
  - name: $M (ElephantPool)
    provider: openai
    model: $M
    apiBase: https://app.elephantpool.ai/api/gateway/v1
    apiKey: \${{ secrets.ELEPHANTPOOL_API_KEY }}
    roles: [chat, edit, apply]
    capabilities: [tool_use]
    defaultCompletionOptions:
      contextLength: $CTX
EOF
```

**Cursor** — only the person can do it, in Cursor: Settings → Models →
OpenAI API key: the key (they can copy it from
`~/.config/elephantpool/api-key`), turn on the OpenAI base URL override with
`https://app.elephantpool.ai/api/gateway/v1`, add `M` as a model name, and use it in chat. Give them
those three values. Tell them that Cursor's servers send the requests, so the
prompts pass through Cursor; that Tab completion keeps using Cursor's own
models; and that Cursor's documentation limits its own-key models to standard
chat, with no promise for its agent mode.

**Codex CLI** and **Claude Code**: nothing to write (see the table).

After writing, start the tool once, or run one request through it, and check
that it answers. A `401` is the key, a `402` the plan (step 5), a `503` the
model (step 1).

### Step 9 — Hand over, and end your session

Tell the person where the key is (`~/.config/elephantpool/api-key`), which file
you changed and where its backup is, the model, the cap, and their pages:
https://app.elephantpool.ai/dashboard/api (keys and caps), https://app.elephantpool.ai/dashboard/usage (requests),
https://app.elephantpool.ai/dashboard/billing (plan, invoices, cancel). Then end your session; the
key is theirs and keeps working:

```sh
umask 077; cd ~/.config/elephantpool; EP_TOKEN=$(jq -r .access_token session.json)
curl -s -X DELETE https://elephantpool.ai/api/users/me/agents/$(jq -r .agent.id session.json) -H "Authorization: Bearer $EP_TOKEN"
rm -f session.json start.json billing.json plans.json pay.json me.json
```

## 1. What ElephantPool is

A marketplace for AI inference with two sides, operated from Brussels by
De Buck Technologies SRL (BE 0787.873.392):

- **Hosts** own a graphics card. They run `mahout`, a small open-source agent
  (Apache-2.0), and are paid for the work their card performs: 80% of the list
  price of every token it serves, by SEPA transfer from EUR 20.
- **Builders** call an OpenAI-compatible API serving open-weight models only,
  and pay for it with a monthly plan (EUR 12 to EUR 100 a month, VAT included).

One account can be both.

## 2. Which side fits the person

| The person… | Side | First check |
|---|---|---|
| has a PC or server with a GPU of 6 GB VRAM or more (NVIDIA or AMD), Linux or Windows on x86_64, that is idle part of the day | **host** | §2.1 |
| pays for LLM API calls, or wants open-weight models behind an OpenAI-compatible endpoint, or needs processing kept in the EU | **builder** | §2.2 |
| neither | — | say so; there is nothing here for them |

Say what is true, including when it is not flattering:

- **A host is paid per token served, not per hour switched on.** Nobody can
  promise work, or an amount: what a card is paid depends on what builders ask
  for while it is connected. Do not present hosting as money the person can
  count on; present it as being paid when the card does work.
- **A builder's request needs a machine that serves the model.** Check that
  the model the person wants has machines serving it (`hosts_live`, §2.2)
  before they pay.
- **"Is it worth it?"** Answer with the figures of §2.3 (builders) and §2.4
  (hosts), and say of each whether it is a list price, something measured, or
  arithmetic on the two. They include where ElephantPool is the better choice
  and where it is not: relay both.

### 2.1 Checks for a host — no account, nothing installed

```sh
# NVIDIA, Linux or Windows: name and memory (in MiB; 12 GB cards report about 12282)
nvidia-smi --query-gpu=name,memory.total --format=csv
# any vendor, Linux: the name only — look its memory up, or ask the person
lspci | grep -iE 'vga|3d|display'
```

On Windows without `nvidia-smi`, ask the person which card they have: the
system's own `AdapterRAM` figure stops at 4 GB and would make a larger card
look too small. If the GPU is in another machine than the one you run on,
everything in §6 happens on that machine: say so and let the person run it
there, or give you access to it.

```sh
# what the catalogue needs, and what each model pays per million tokens
curl -s https://elephantpool.ai/api/gateway/v1/public/models
# the machines connected in the last 24 h, what they serve, whether they are busy
curl -s https://elephantpool.ai/api/gateway/v1/public/fleet
```

`min_vram_gib` on a model's builds says which cards can serve it, `size_gib`
what it takes on disk; once installed, `mahout models` is the authority on
what this machine can serve. The fleet lists the machines seen in the last 24
hours and whether each is free or busy; under `models`, `requests_24h`,
`completed_24h` and `output_tokens_24h` say how much work there was, and
`unserved_24h` how many requests found no machine. What a card is paid, and
what it costs to run: §2.4.

### 2.2 Checks for a builder — no account

```sh
curl -s https://elephantpool.ai/api/gateway/v1/public/models   # prices, context, hosts_live per model
curl -s https://elephantpool.ai/api/gateway/v1/public/plans    # the plans, the ways to pay
```

`hosts_live` counts the machines offering a model right now (they asked for
work in the last two minutes). `hosts_live: 0` means no machine serves it at
this moment: a request for it would be refused or wait. Tell the person before
they buy a plan for that model. The fleet's `hosts` is a different count: the
machines seen in the last 24 hours that *can* serve the model, serving or not.
`ctx` is the largest request, in tokens, the machines connected now can take
(with none connected, the size every host is asked to offer); `ctx_max` is
the model's own limit, which a request reaches only on a machine that offers
it.

### 2.3 The builder side, in numbers

**Where the processing happens.** ElephantPool is operated by a Belgian
company with no US parent, and its gateway runs in the EU on hardware the
company owns. A request's content is held in memory while it is
served and is not stored, logged or used for training (terms, art. 7.3); a
data processing agreement is an annex of the terms. A key created with
`"region":"eu"` (§7.2) is an **EU-Sovereign** key: its requests go only to
machines located in the EU or the EEA, and are refused rather than sent
elsewhere. It costs nothing more. Without it, a request may be served by a
machine outside the EU. So when the person's requests carry personal data —
their customers' messages, names, tickets — or they asked for Europe, make
the key EU-Sovereign and tell them you did. What that guarantee covers and
what it cannot: https://elephantpool.ai/kb/keep-work-inside-the-eu.

Say the limit as well: a request is computed on the machine of an independent
host, which could technically read it while it is being served (terms,
art. 7.2), and a machine's location is established from its network address.
For most support or coding traffic that is the same trust a person gives any
hosting provider's staff; for content they would not want any third party to
see, it is a reason not to send it here.

**The price, against the same model elsewhere.** `qwen3.8-27b` lists
at EUR 0.08 per million tokens in and EUR 1.20 out, before VAT.
That is the most a request costs: one served by a smaller build of the model
is billed proportionally less (https://elephantpool.ai/kb/pay-for-the-quality-you-get),
and a request can require a quality (`require: "quality:reference"`).
The other columns are each provider's public list price for the same
open-weight model, read at the link on 2026-11-27 (dollars converted
at the ECB reference rate of 2026-11-26: 1 EUR = 1.0975 USD). Prices move: open the link before you quote one to
the person.

| Provider | Based in | `qwen3.8-27b`, per million tokens in / out | 3 M in + 1 M out | Against ElephantPool's list price |
|---|---|---|---|---|
| **ElephantPool**, list price | Belgium | EUR 0.08 / 1.20 | EUR 1.44 | — |
| ElephantPool, Mini plan used in full | Belgium | — | EUR 1.92 | 33% over list |
| [STACKIT](https://stackit.com/en/products/data-ai/stackit-ai-model-serving) | Germany | EUR 0.45 / 0.65 | EUR 2.00 | 1.4 times ElephantPool's |
| [OVHcloud](https://www.ovhcloud.com/en-ie/public-cloud/ai-endpoints/catalog/) | France | EUR 0.40 / 2.70 | EUR 3.90 | 2.7 times ElephantPool's |
| [IONOS](https://cloud.ionos.de/managed/ai-model-hub) | Germany | EUR 0.40 / 2.70 | EUR 3.90 | 2.7 times ElephantPool's |
| [Regolo](https://regolo.ai/pricing/) | Italy | EUR 0.50 / 3.40 | EUR 4.90 | 3.4 times ElephantPool's |
| [Scaleway](https://api.scaleway.com/product-catalog/v2alpha1/public-catalog/products?product_types=generative_apis&page_size=100) | France | EUR 0.60 / 3.30 — preview | EUR 5.10 | 3.5 times ElephantPool's |
| [T-Systems AI Foundation Services](https://docs.llmhub.t-systems.net/plans/) | Germany | EUR 0.50 / 2.50 — the plan that lists it asks a commitment of EUR 1,000 a month | EUR 4.00 | 2.8 times ElephantPool's |
| [Arkane Cloud](https://arkanecloud.com/pricing/) | France | USD 0.10 / 1.50 (about EUR 0.09 / 1.37) — listed as "Qwen 3.8" without a size; taken as the 27B | EUR 1.64 | 1.1 times ElephantPool's |
| [DeepInfra](https://deepinfra.com/pricing) | United States | USD 0.20 / 2.50 (about EUR 0.18 / 2.28) — list price; a 25% promotion was running on that date | EUR 2.82 | 2.0 times ElephantPool's |

**Where ElephantPool is not the cheapest.** Say this too:

- Cortecs, a router over European providers, lists the same model lower; on that date its price was that of Entrim, a provider with its data centre in Slovenia: EUR 0.09 / 0.359 per million tokens, EUR 0.63 on the same mix (https://api.cortecs.ai/v1/models).
- aki.io, in Germany, lists the same model lower on this mix (three in for one out; its output is cheaper, its input dearer): EUR 0.15 / 0.65 per million tokens, EUR 1.10 on the same mix (https://aki.io/models/).
- OpenAI's smallest current model, GPT-6 Luna — a different, proprietary model from a US company; the price is without the 10% it adds for regional processing: USD 0.10 / 0.50 per million tokens, EUR 0.73 on the same mix (https://developers.openai.com/api/docs/pricing).
- OpenAI's GPT-4o mini, which many small projects still run on — an older proprietary model, marked deprecated on that page: USD 0.15 / 0.60 per million tokens, EUR 0.96 on the same mix (https://developers.openai.com/api/docs/pricing, read on 2026-11-23).
- Anthropic's Claude Haiku 5.5 — a different, proprietary model from a US company, with no EU-only option on its own API: USD 0.10 / 0.50 per million tokens, EUR 0.73 on the same mix (https://platform.claude.com/docs/en/about-claude/pricing).
- Google's Gemini 2.5 Flash-Lite — a different, proprietary model from a US company: USD 0.10 / 0.40 per million tokens, EUR 0.64 on the same mix (https://ai.google.dev/gemini-api/docs/pricing, read on 2026-11-23).
- Mistral Small 4 — a different model, from a French company; list price USD 0.15 / 0.60, here with the 10% Mistral adds on its EU endpoint (https://docs.mistral.ai/inference/regional-inference): USD 0.165 / 0.66 per million tokens, EUR 1.05 on the same mix (https://docs.mistral.ai/inference/pricing).

In short: for an open-weight model served from Europe, ElephantPool's list
price is among the lowest; the smallest proprietary models of the large US
providers cost less per token. What ElephantPool adds there is EU-only
processing at no surcharge, no retention, and open weights — the same model
can be run elsewhere, or on the person's own hardware, so nothing locks them
in. Which of these matters is the person's call: ask what they send through
the model and what they pay today before you advise.

**What a plan costs against list prices.** Plan prices include 21% Belgian
VAT, which a business with a VAT number recovers:

- Mini: EUR 9.92 before VAT buys EUR 7.44 of use at list prices — 33% over list when the month is used in full.
- Start: EUR 16.53 before VAT buys EUR 13.20 of use at list prices — 25% over list when the month is used in full.
- Build: EUR 28.93 before VAT buys EUR 26.40 of use at list prices — 10% over list when the month is used in full.
- Ship: EUR 49.59 before VAT buys EUR 49.80 of use at list prices — list price when the month is used in full.
- Scale: EUR 82.64 before VAT buys EUR 87.80 of use at list prices — 6% under list when the month is used in full.

An extra pack, bought on top of a running plan, costs more per token than any
plan: EUR 8.26 before VAT for EUR 5.68 of use (46% over list), EUR 20.66 before VAT for EUR 14.32 of use (44% over list).

**What it costs to find out.** The smallest plan is EUR 12 a
month, EUR 6 the first month on a subscription, and can be
cancelled at any time. The API is OpenAI-compatible, so trying it on the
person's real requests is a base URL and a key, not a rewrite (§7.3). If
`GET https://elephantpool.ai/api/gateway/billing` shows a `promo` block, ElephantPool offered the
account credit: it is spent before anything else and needs no plan.

### 2.4 The host side, in numbers

**What is paid.** 80% of what each request it serves is billed — input tokens
as well as output — whatever the builder paid with. A request is billed at
the model's list price when the machine serves the model's largest build, and
proportionally less for a smaller one (the size of the build over the size of
the largest; https://elephantpool.ai/kb/pay-for-the-quality-you-get). A smaller build
decodes a little faster, which makes up part of the difference and not all of
it (compare the rows of the table). For instance, on the largest build,
a thousand requests of 3,000 tokens in and 1,000 out on `qwen3.8-27b` leave the host EUR 1.15: EUR 0.19 for the input, EUR 0.96 for the output.

**From a measured speed to an hourly figure.**

```
kept per hour served = measured tok/s × 3600 ÷ 1,000,000 × output price billed for that build, per million × 0.8
```

That counts output tokens only; input tokens come on top (the example above).

| Machine | Model, build | Requests at once | Measured | Output billed at, per million | Kept per hour served at that rate | Electricity per hour under load | How it was measured |
|---|---|---|---|---|---|---|---|
| one 24 GB card (Radeon RX 7900 XTX) | `qwen3.8-27b`, UD-Q4_K_M on llama.cpp, the build mahout chooses for that card; one request with 64K of context | 1 | 50.9 tok/s | EUR 1.00 | EUR 0.15 | about EUR 0.10 | `mahout bench` (mahout 0.4.1) on that card, 2026-11-24 |
| the same card | `qwen3.8-27b`, the same build; four requests sharing the context, 16K each | 4 | 85 tok/s | EUR 1.00 | EUR 0.24 | about EUR 0.10 | `mahout bench` (mahout 0.4.1) on that card, 2026-11-24 |
| the same card | `qwen3.8-27b`, UD-IQ4_XS on llama.cpp, a smaller build; one request with 64K of context | 1 | 53.2 tok/s | EUR 0.87 | EUR 0.13 | about EUR 0.10 | `mahout bench` (mahout 0.4.1) on that card, 2026-11-24 |
| the same card | `gemma-4-12b`, Q4_0 (QAT) on llama.cpp; one request with 32K of context | 1 | 47.3 tok/s | EUR 0.25 | EUR 0.03 | about EUR 0.10 | `mahout bench` (mahout 0.4.1) on that card, 2026-11-24 |
| the same card | `gemma-4-12b`, the same build; four requests sharing the context, 8K each | 4 | 165.5 tok/s | EUR 0.25 | EUR 0.12 | about EUR 0.10 | `mahout bench` (mahout 0.4.1) on that card, 2026-11-24 |
| a workstation with four 32 GB cards (4 x Radeon AI PRO R9700) | `qwen3.8-27b`, full precision on vLLM | 16 | 496 tok/s | EUR 1.20 | EUR 1.71 | about EUR 0.40 | measured on that workstation on 2026-11-11 with vLLM run outside mahout; mahout's own vLLM build of this model has not been measured on any machine yet; a build outside the catalogue is billed at the list price |

Three things to say with these figures:

- They are per hour **spent serving at that load**, not per hour connected. A
  period's pay is the rate times the hours the machine actually served. A
  month has about 730 hours; the rate times 730 is a ceiling that no machine
  has reached, not a forecast.
- What decides the hours is demand, and the network is young. Read the
  fleet's `requests_24h` and `output_tokens_24h` (§2.1) to the person as they
  are on the day. `unserved_24h` above zero on a model means requests are
  waiting for a machine like theirs.
- Electricity is the person's cost, about EUR 0.10 per card and
  per hour under load (a card drawing 300 W at a Belgian household tariff of about EUR 0.33 per kWh; use their own tariff).
  Compare it with the table: on output tokens alone, a single card that
  answers one request at a time keeps about what its electricity costs on the
  largest model, and less than that on a small, cheap one. What puts it above
  is requests arriving together (the rows with four at once, where each
  request gets a quarter of the context) and the input tokens; several large
  cards serving many requests at once keep a multiple of their electricity.

A card that is not in the table has no published figure yet. Say so rather
than scale one from another card: `mahout bench` gives the person's own.

**What it costs to find out.** Nothing but the download: the account is free,
`mahout` installs without administrator rights, `mahout bench` measures the
person's own card on the first model it can serve, and `mahout uninstall`
removes everything (§6). From then on their dashboard shows their own measured
figure, which replaces this table.

## 3. What is the person's to decide — **ASK**, every time

| | Decision | What to show them | Never |
|---|---|---|---|
| **ASK 1** | Creating an account with their e-mail address | which address, and that ElephantPool will mail it a sign-in link or ask them to approve you | create an account for someone who did not ask |
| **ASK 2** | Accepting the terms of use (version 1.5) and the privacy policy | the links: https://elephantpool.ai/legal/conditions and https://elephantpool.ai/legal/privacy (six languages; the French text is binding) | record an acceptance they did not give in so many words |
| **ASK 3** | Paying — a first purchase, and anything later that charges the payment method they saved (a higher plan, resuming a subscription); and verifying a card for the trial (nothing is charged, but it is their card) | the plans and prices, that the first month of a subscription is 50% off once per account, the ways to pay; then, once they chose, the Stripe link | type a card number, an IBAN or any payment detail yourself; change a plan they pay for without a yes for that change |
| **ASK 4** | Downloading and running `mahout` on their machine | what it is and where its source is; that it downloads model files of several GB (the benchmark fetches the first); that it then runs other people's requests on their card; that it updates itself unless they switch that off; and an offer to review the code first (§6.2) | run it, or keep it running, without a yes |

Two things go with these. The host terms (articles 8–9 of the same terms)
are accepted again with every link code, that is once per machine linked:
say so when you ask for the machine (§6.3). And news by e-mail is **no**
unless they say yes.

How the asks combine: say what you are about to do and get a yes before
starting; several asks can go in one message when the person can answer them
together. On the browser path (§4.A) the person creates the account and
accepts the terms themself on ElephantPool's page — tell them that is what
the page will ask, you do not need a second yes in the conversation. On the
mailbox path (§4.B) their yes in the conversation is all there is: ask for
it in so many words, and quote the two links.

A sentence that works: *"ElephantPool needs an account in your name. I can set
it up: you will approve me once in your browser, and accept their terms there.
Shall I?"*

## 4. Getting a session

Three ways, by what you are able to do. All requests are HTTPS + JSON under
`https://elephantpool.ai/api/users`. Use 4.A whenever the person can open a link; 4.B only when
they asked not to be sent anywhere and reading their mail is already yours to
do; 4.C when you cannot call an API.

The answers of §4 and §7.2 carry secrets. The examples below show the calls;
when you run them, write the answer to a file only the person can read
instead of printing it — for example `umask 077; curl -s … -o
~/.config/elephantpool/session.json`, or any other place where you keep that
person's secrets — and read the fields from there. In the examples
`$EP_TOKEN` stands for the `access_token`.

### 4.A You can make HTTP requests — approval in the browser (preferred)

The person approves you on ElephantPool's own page, signed in as themself. You
never see a password, a mailbox or a sign-in link. (OAuth 2.0 device
authorization, RFC 8628.)

```sh
curl -s -X POST https://elephantpool.ai/api/users/auth/agent/start \
  -H 'Content-Type: application/json' \
  -d '{"client_name":"<the name the person knows you by>","intent":"host"}'
```

- `client_name`: 1–60 characters, letters, digits, spaces and `. _ - ( ) / +`;
  no address, and not ElephantPool's own name. The person reads it on the
  approval page as "it calls itself …".
- `intent`: `host`, `builder` or `both` — pre-ticks the side on the page.
- optional `profile`: `{"name": "...", "country": "...", "building": "..."}`,
  only what the person told you; they see it before approving.
- optional `login_hint`: the e-mail address the person signs in with, if they
  told you. The page fills it in and warns them when they are signed in with
  another; nothing is mailed to it. In this body only, never in a link.

Answer:

```json
{ "device_code": "…", "user_code": "WDJB-MJHT",
  "verification_uri": "https://app.elephantpool.ai/agent",
  "verification_uri_complete": "https://app.elephantpool.ai/agent?code=WDJB-MJHT",
  "expires_in": 900, "interval": 5 }
```

Give the person `verification_uri_complete` **and** the `user_code`, and tell
them to check that the page shows the same code. On that page they sign in
(Google or a link by e-mail), choose their side and accept the terms if the
account is new (ASK 1 and ASK 2 happen there, by their own hand), and press
Allow. Meanwhile, poll no faster than `interval` seconds:

```sh
curl -s -X POST https://elephantpool.ai/api/users/auth/agent/token \
  -H 'Content-Type: application/json' \
  -d '{"grant_type":"urn:ietf:params:oauth:grant-type:device_code","device_code":"…"}'
```

`400 {"error":"authorization_pending"}` → keep polling. `slow_down` → wait
longer. `access_denied` → they refused: stop. `expired_token` → start again
(the code lives 15 minutes). `200` → §5.

### 4.B The person gave you access to their mailbox — the sign-in mail

Only when reading their mail is something they already allowed you to do.

```sh
curl -s -X POST https://elephantpool.ai/api/users/auth/magic-link \
  -H 'Content-Type: application/json' \
  -d '{"email":"<their address>","acquisition":{"utm_source":"agent","utm_medium":"<your name>"}}'
```

Within a minute a mail from ElephantPool arrives ("Your ElephantPool sign-in
link", or the same in fr/de/es/it/nl). It contains one link whose address
ends in `/api/users/auth/magic-link/verify?redirect=1&token=<64 hex>` (on this
site or on its `app.` host). Do not open that link as it is: opened, it signs
a browser in and is spent. Take the 64-hex token and call:

```sh
curl -s 'https://elephantpool.ai/api/users/auth/magic-link/verify?token=<64 hex>&agent=<your name, URL-encoded>'
```

The token works once and for 15 minutes. `agent=` makes yours an agent
session: the person sees it in their settings and can revoke it. The answer is
the session of §5; if its `needs` is not empty, do §5.1 before anything else.
The `acquisition` field is optional: it only tells ElephantPool that the
account came through an agent.

### 4.C You can only read pages and hand over links

Give the person one of these and tell them what they will find:

- https://app.elephantpool.ai/login?as=host — sign in or sign up to connect a GPU
- https://app.elephantpool.ai/login?as=builder — sign in or sign up to use the API
- https://elephantpool.ai/mahout — installing the host agent, step by step
- https://elephantpool.ai/models — models, prices and plans

## 5. Using the session

A successful answer from §4:

```json
{ "access_token": "<jwt>", "token": "<the same jwt>", "token_type": "Bearer", "expires_in": 900,
  "refresh_token": "epr_…", "refresh_expires_in": 7776000,
  "agent": { "id": "…", "name": "…" },
  "user": { "email": "…", "personas": { "builder": false, "host": true }, "termsVersion": "1.5" },
  "needs": [] }
```

- Send `Authorization: Bearer <access_token>` to the three APIs:
  `https://elephantpool.ai/api/users`, `https://elephantpool.ai/api/gateway`, `https://elephantpool.ai/api/hosts`.
- Three fields are secrets: `access_token`, `token` (the same value under the
  name the sign-in link has always used) and `refresh_token`.
- The access token lives 15 minutes (`expires_in`). Renew it with
  `POST https://elephantpool.ai/api/users/auth/agent/token` and
  `{"grant_type":"refresh_token","refresh_token":"epr_…"}`. The refresh token
  lives 90 days from its last use, or until the person revokes you.
- Both tokens are the person's secrets: in a file only they can read
  (`~/.config/elephantpool/session.json`, mode 600) or their secret manager,
  never in a transcript, a log or a commit. If the job was a one-off, end
  your session when it is done (below) rather than keep a token for 90 days.
- You can do what the person can do in their dashboard, with two limits: you
  cannot approve another agent, and you are never an operator. That includes
  the plan: a first purchase ends on Stripe's page, where the person pays;
  but changing a running subscription to a higher plan charges the payment
  method they saved **at once**, and resuming a cancelled one makes it renew.
  The person was told so when they let you in. Do either only on a yes given
  for that change, with its price (ASK 3).
- The person sees you in https://app.elephantpool.ai/dashboard/settings ("AI agents") and can
  end your access there: it stops at once on their account, their keys and
  their plan, and within the life of your access token on their machines'
  settings. To end your own session:
  `DELETE https://elephantpool.ai/api/users/me/agents/<agent.id>`.

### 5.1 When `needs` is not empty (path 4.B on a new account)

`"persona"`: the account has no side yet. `"terms"`: the terms were never
accepted. After ASK 2:

```sh
curl -s -X PATCH https://elephantpool.ai/api/users/me \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' \
  -d '{"personas":{"host":true},"termsAccepted":{"version":"1.5"},"news_consent":{"given":false,"version":"2026-11-18"}}'
```

Use `"host":true`, `"builder":true` or both, as the person said. The
acceptance is recorded as given through you. `news_consent` records the
answer to "news by e-mail?" and the wording it answered (`2026-11-18`
is the current one); send `false` unless the person said yes. When the answer
carries a `token`, it replaces the access token: the sides live in it. The
refresh token does not change. A `PATCH` only changes the fields it names.
Optional, only from what the person told you: `"name"`, `"country"`,
`"locale"` (`en` `fr` `de` `es` `it` `nl`, the language of our mails),
`"profile":{"building":"…"}`.

## 6. Host: put the person's GPU to work

### 6.1 Make sure the account has the host side

`GET https://elephantpool.ai/api/users/me` → `personas.host`. If false, send `PATCH
https://elephantpool.ai/api/users/me` with the body `{"personas":{"host":true}}` (as in §5.1) and
use the `token` it returns.

### 6.2 **ASK 4** — review, then install

`mahout` is one Rust binary of about 6 MB. It runs as the person's user, needs
no root and opens no inbound port; it makes outbound HTTPS calls only. It
downloads model weights (several GB each, checked against pinned hashes) and
runs an inference engine bound to 127.0.0.1, which then answers other
people's requests with the card. It updates itself from releases signed by
ElephantPool unless that is switched off (`mahout config set
auto_update=false`, or the switch on the machine's page). The source is on
gitlab.debuck.info, the forge of De Buck Technologies, the company that
operates ElephantPool.

What you can review before anything runs — offer it:

```sh
curl -fsSL https://elephantpool.ai/install-mahout.sh                  # the installer, about 70 lines of sh
git clone https://gitlab.debuck.info/elephantpool-oss/mahout   # the source of the binary
curl -fsSL https://elephantpool.ai/dl/mahout-linux-x86_64.sha256      # the checksum the installer verifies
curl -s https://elephantpool.ai/api/gateway/v1/agent                         # the signed manifest of the current release
```

The person may prefer to build from source (`cargo build --release`); that is
fine and documented in the repository.

Install, after their yes (Linux x86_64; installs to `~/.local/bin`, starts
nothing):

```sh
curl -fsSL https://elephantpool.ai/install-mahout.sh -o install-mahout.sh
head -1 install-mahout.sh      # must be #!/bin/sh — anything else, stop and say so
sh install-mahout.sh
mahout version
mahout probe --json        # what it sees: CPU, RAM, GPUs
mahout models              # what this machine can serve
```

Windows x86_64 (PowerShell): `irm https://elephantpool.ai/install-mahout.ps1 | iex` — it
installs for the user and offers one optional elevated step (a firewall rule
that cuts the inference engine off from the network); that prompt is the
person's to answer. macOS and ARM have no prebuilt binary.

### 6.3 Link the machine

A link code is one-time, lives 15 minutes, and carries the person's acceptance
of the host terms (articles 8–9 of the terms: what a host commits to, among
them the confidentiality of what the machine processes). It is part of ASK 2
for a host; say it.

```sh
curl -s -X POST https://elephantpool.ai/api/hosts/link-codes \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' \
  -d '{"accept_terms":{"version":"1.5"}}'
# → { "code": "…", "expiresAt": "…", "terms_version": "1.5" }

mahout up --code <code>
mahout status
```

`mahout up` only registers the machine under the person's account; it starts
nothing. When the person will do this later, without you: they get a code
themself on https://app.elephantpool.ai/dashboard/machines ("Get a link code"), with the same
command next to it — or you ask for one when they are at the machine.

### 6.4 Measure, then serve

```sh
mahout bench --model <id from `mahout models`>   # downloads the model the first time, then measures
mahout work                                      # serves until stopped
```

When several models fit, bench the first one `mahout models` lists as
servable unless the person prefers another; the download it triggers is part
of ASK 4.

`mahout work` is a long-running process. Ask the person how they want it kept
running — a terminal they keep open, `tmux`, or a `systemd --user` service —
and set up only what they chose. By default it pauses while someone is using
the machine. Settings: `mahout config`, or the machine's page in the
dashboard. Stop: Ctrl-C, `mahout pause`, or stopping the service you set up.
`mahout uninstall` removes what mahout stored on the machine (models, state,
identity) and says what it will delete first; anything you added around it —
a service unit — is yours to remove.

### 6.5 Check, and hand over

```sh
curl -s https://elephantpool.ai/api/hosts/hosts -H "Authorization: Bearer $EP_TOKEN"        # the machines and their state
curl -s https://elephantpool.ai/api/gateway/earnings -H "Authorization: Bearer $EP_TOKEN"   # what they were paid for
curl -s https://elephantpool.ai/api/gateway/demand -H "Authorization: Bearer $EP_TOKEN"     # what was asked for, and what this machine could have had
```

Then give the person their pages: https://app.elephantpool.ai/dashboard/machines (each machine,
its settings, what it served) and https://app.elephantpool.ai/dashboard/earnings (earnings and
the payout account, asked by Stripe once there is something to pay).

## 7. Builder: an API key that works

The account needs the builder side: `personas.builder` in `GET
https://elephantpool.ai/api/users/me`, else `PATCH` it as in §6.1.

### 7.1 The plan — **ASK 3**

```sh
curl -s https://elephantpool.ai/api/gateway/billing -H "Authorization: Bearer $EP_TOKEN"         # the account's plan, if any
curl -s https://elephantpool.ai/api/gateway/billing/plans -H "Authorization: Bearer $EP_TOKEN"   # plans, exact amounts, ways to pay
```

Plans on 2026-11-30 (the two calls above are the authority):
`p12` Mini EUR 12 (33 M tokens in, 4 M out, 30 requests a minute), `p20` Start EUR 20 (60 M tokens in, 7 M out, 60 requests a minute), `p35` Build EUR 35 (120 M tokens in, 14 M out, 120 requests a minute), `p60` Ship EUR 60 (225 M tokens in, 26.5 M out, 240 requests a minute), `p100` Scale EUR 100 (400 M tokens in, 46.5 M out, 480 requests a minute). Token figures are counted on `qwen3.8-27b`;
a cheaper model stretches the allowance; what is unused at the end of the month
is not carried over. Credit ElephantPool offered an account (the trial below,
a campaign) shows as `promo` in `GET /billing` (§2.3). When a month's allowance is used
up, requests are refused (`402 insufficient_credits`) until the next month,
a higher plan (`POST /billing/change`, charged at once — ASK 3), or an extra
pack (`POST /billing/packs/checkout`, a Stripe page for the person).

**The trial, to try before choosing.** There is no free plan, but an account
that has not had a trial can verify a card with Stripe — nothing is charged —
and ElephantPool then offers a small credit that works without a plan: the
amount and how many days it lasts are `trial.eur` and `trial.days` in
`GET https://elephantpool.ai/api/gateway/billing` (no `trial` block: not offered now). Once per card
and per account, within a daily total for the whole platform: on a busy day
the card is verified and the credit comes later (`trial.status: "waiting"`),
so never promise it. The person types the card on Stripe's page; you never
see it, type it or ask for it. Ask first, as for a payment page (ASK 3: it is
their card), then:

```sh
curl -s -X POST https://elephantpool.ai/api/gateway/billing/trial \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' -d '{"locale":"en"}'
# → { "url": "https://checkout.stripe.com/…" }
```

Give the person the `url` (or https://app.elephantpool.ai/dashboard/billing, where the same offer
has its button), then read `GET https://elephantpool.ai/api/gateway/billing/trial` every few
seconds. When `trial.check.status` is `"complete"`: `trial.status` `"granted"`
— the credit is the `promo` block of `GET /billing` and a key works now
(§7.2) —, `"waiting"`, or still `"available"` with `trial.check.outcome`
saying why (`card_used`: that card already brought a trial to another
account; `not_verified`: Stripe did not confirm it). A card from Apple Pay
or Google Pay is accepted like a typed one. `409
TRIAL_ALREADY_USED`: this account had its trial. Offered credit is used before
a plan's allowance; it is never paid to a machine of the same account.

After the person chose a plan and a way to pay:

```sh
curl -s -X POST https://elephantpool.ai/api/gateway/billing/checkout \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' \
  -d '{"plan_id":"p20","method":"card","kind":"auto"}'
# → { "url": "https://checkout.stripe.com/…" }
```

`method` and `kind` come from the `methods` list of `/billing/plans`: a
method of kind `auto` is a subscription that renews by itself and gets the
first-month discount; a method of kind `manual` pays one month at full price.
Give the person the `url`: they pay on Stripe's page. Then read
`GET https://elephantpool.ai/api/gateway/billing` every few seconds, for a few minutes, until
`plan.status` is `"active"`. With a bank debit it can take days
(`plan.payment_processing` is true): tell the person ElephantPool will mail
them, and stop waiting.

### 7.2 The key

```sh
curl -s -X POST https://elephantpool.ai/api/gateway/keys \
  -H "Authorization: Bearer $EP_TOKEN" -H 'Content-Type: application/json' \
  -d '{"name":"<what it is for>","monthly_cap_eur":20}'
# → { "_id": "…", "name": "…", "key": "epk_<40 hex>", "last4": "…", "monthly_cap_eur": 20, … }
```

A key can be created before any plan runs; calls made with it answer `402
insufficient_credits` until one does (the plan is chosen on
https://app.elephantpool.ai/dashboard/plan) or the account has offered credit (the trial, §7.1). The key is shown **once**. Put it where the person keeps secrets (their
environment file, their secret manager) and tell them where; do not echo it
back in the conversation unless they ask. When you run the call, send its
answer to a file (§4) or straight into the place the key belongs.
`monthly_cap_eur` limits what this one key may draw from the allowance in a
calendar month, counted at list prices (20 by default): a runaway loop then
cannot use up the whole month. `403 TERMS_NOT_ACCEPTED`: the terms of use
are not accepted on the account; the person ticks them on the approval page
(§4.A) or you record their acceptance as §5.1 says, then ask again. `"region":"eu"` makes an EU-Sovereign key:
every request made with it only goes to machines located in the EU/EEA.

### 7.3 The first call

```sh
curl https://app.elephantpool.ai/api/gateway/v1/chat/completions \
  -H "Authorization: Bearer $ELEPHANTPOOL_API_KEY" -H 'Content-Type: application/json' \
  -d '{"model":"qwen3.8-27b","messages":[{"role":"user","content":"Hello"}]}'
```

Any OpenAI SDK works with `base_url = "https://app.elephantpool.ai/api/gateway/v1"`; in a `.env`,
`OPENAI_BASE_URL=https://app.elephantpool.ai/api/gateway/v1` and `OPENAI_API_KEY=epk_…` is what most
tools read. (That host is the inference endpoint; the account API stays on https://elephantpool.ai.) Streaming is `"stream": true`. Function calling (`tools`,
`tool_choice`, `tool_calls`) works on the models whose `capabilities` include
`tool-use`. `GET https://app.elephantpool.ai/api/gateway/v1/models` lists the model ids. Chat completions
is the only API served: no `/responses`, `/completions`, `/embeddings`, and
no Anthropic `/messages` (step 8 of §0 says what that means for each tool). `503 no_eligible_host` means no connected machine can
serve the request now: say so, try a model with `hosts_live` above zero.
Do not point a working project at ElephantPool before a call has answered.
A request is processed on the machine of an independent host. Its content
exists only in memory while it is served and is never written to disk by
ElephantPool — not to a database, a log or a backup (terms, art. 7.3, which
also says what cannot be guaranteed about a third party's machine).

### 7.4 Hand over

https://app.elephantpool.ai/dashboard/api (keys and their caps), https://app.elephantpool.ai/dashboard/usage
(requests), https://app.elephantpool.ai/dashboard/billing (plan, invoices, cancel).

The person opens those pages signed in as themself: with Google, or with a
link ElephantPool mails them from https://app.elephantpool.ai/login. There is no password. Hand
over these addresses as written: the person is signed in on that host, the one
where they let you in.

## 8. Every route you may need

Full schemas: [https://elephantpool.ai/openapi.json](https://elephantpool.ai/openapi.json).

| Purpose | Route |
|---|---|
| Profile, sides, terms | `GET` / `PATCH https://elephantpool.ai/api/users/me` |
| Connected agents | `GET https://elephantpool.ai/api/users/me/agents`, `DELETE …/me/agents/{id}` |
| Keys | `GET` / `POST https://elephantpool.ai/api/gateway/keys`, `PATCH` / `DELETE …/keys/{_id}` |
| Usage, spend | `GET https://elephantpool.ai/api/gateway/usage`, `/usage/requests`, `/ledger`, `/balance` |
| Plan | `GET https://elephantpool.ai/api/gateway/billing`, `/billing/plans`, `/billing/invoices`; `POST /billing/checkout`, `/billing/packs/checkout` (each returns a Stripe page for the person); `POST /billing/change` `{"plan_id":"…"}` (a higher plan is charged at once, a lower one applies at renewal), `/billing/cancel`, `/billing/resume`; `POST /billing/portal` (a Stripe page where the person changes their payment method) |
| Trial | `GET https://elephantpool.ai/api/gateway/billing/trial`; `POST /billing/trial` `{"locale":"en"}` (a Stripe page where the person verifies a card; nothing is charged) |
| Machines | `POST https://elephantpool.ai/api/hosts/link-codes`; `GET https://elephantpool.ai/api/hosts/hosts` (the list), `GET` / `DELETE https://elephantpool.ai/api/hosts/hosts/{id}` (one machine); `GET` / `PUT https://elephantpool.ai/api/hosts/{id}/settings` (its settings — no `hosts/` in that one) |
| Earnings, payouts | `GET https://elephantpool.ai/api/gateway/earnings`, `/demand`; `POST /payouts/connect/onboard`, `GET /payouts/connect/status` |
| Public, no session | `GET https://elephantpool.ai/api/gateway/v1/public/models`, `/v1/public/plans`, `/v1/public/fleet` |

Errors are JSON: `{"errors":{"msg":"CODE"}}` with the HTTP status (401: renew
the token; 403 `AGENT_NOT_ALLOWED`: an operator's route, or approving an agent; 422: the body,
with the fields at fault; 429: slow down). The inference API answers in the
OpenAI error format.

## 9. House rules

- One account per person, for a person who asked. No accounts in bulk.
- Do not write reviews, posts or messages about ElephantPool on the person's
  behalf unless they asked for exactly that.
- Do not tell the person what they will earn. Show what was measured.
- Deleting a machine or a key, cancelling a plan: confirm with the person
  first, as you would for anything that cannot be undone.
- Something wrong, or a security issue: contact@elephantpool.ai.
