3 · Users & credits¶
Every job reserves credits (auto-estimated: VRAM × time), so an account needs a balance before it can run anything. There are two balances per account:
- Free credits (
free_balance) — auto-accrued to signed-up users, or minted by the admin. Run on org-owned nodes. - Paid credits (
paid_balance) — purchased via Stripe or admin-minted. Required forpaid=Trueworkloads on provider nodes; this is what generates provider earnings.
Commands below use the WebUI/API on the master — swap http://<MASTER_IP>:3000
for your https://app.… domain if you set up HTTPS.
Users sign themselves up¶
Send users to http://<MASTER_IP>:3000/signup. They enter their email, the
faucet verifies it, creates the account with auto-accruing free credits, and
emails them their token. (If SMTP isn't configured, the token is shown on screen
instead — enable email anytime from the web UI → Configuration → Email; it
applies on the next send, no restart.) This is the normal path — nothing for
you to do.
Admin onboards a user manually¶
From the WebUI Users page, or via API — both return a token + initial credits to hand to the user:
AT=$(grep '^ADMIN_TOKEN=' /opt/gridweave/deploy/.env | cut -d= -f2-)
curl -s -X POST http://localhost:8100/v1/auth/onboard -H "Authorization: Bearer $AT" \
-H 'Content-Type: application/json' -d '{"username":"demo-user","initial_credits":100}'
# → {"token":"...","credits":100}
Give the admin account credits¶
The admin identity (sub=admin) gets no auto-accrual — it starts at 0. To
run workloads as admin, mint credits to it (on the master; the credit service
is internal-only):
AT=$(grep '^ADMIN_TOKEN=' /opt/gridweave/deploy/.env | cut -d= -f2-)
curl -s -X POST http://localhost:8400/v1/credits/mint -H "X-Admin-Token: $AT" \
-H 'Content-Type: application/json' -d '{"user_id":"admin","amount":1000}'
Paid credits without Stripe¶
Card checkout is the normal way to buy paid credits (Stripe guide). The admin can also mint them directly:
curl -s -X POST http://localhost:8400/v1/credits/mint -H "X-Admin-Token: $AT" \
-H 'Content-Type: application/json' -d '{"user_id":"admin","amount":100,"token_type":"paid"}'
# → paid_balance += 100
Provider earnings — the full money path¶
For a provider to earn: a provider node must be joined
(guide 1 — owner ≠ "org", hourly rate > 0) and a
separate payer with paid credits runs a paid=True workload on it.
Self-use is a wash; free credits on org-owned nodes need none of this.
Next: 4 · Get paid with Stripe — let users buy credit packs by card.