mineraidocs
Open the app

// docs · minerai-1

Everything minerai does, in the open.

minerai is an OpenAI-compatible AI for developers. It runs on graphics cards lent by the community instead of a data center. This page explains every part of it, shows what is live and what is not, and lets you check the network yourself.

// miners online–
// answers served–
// tokens generated–
// modelminerai-1

Reading the network…

// 01 · status

What works today

We only call something live when it runs in production. Everything else is marked for what it is.

PartStatus
Chat, API, streaming, miner networkLive
Miner checks: signed handshake, probation, canaries, reputation, bansLive
Wallet sign-in, accounts, API keys, balancesLive
Connectors: web, Solana, market data, GitHub, web pagesLive
End-to-end encrypted conversation syncLive
Balances in $MINERAI, one for one (no free credits)Built, opens when the token launches
Miner earnings: 80% of the $MINERAI spent on their answersLive
Automatic daily $MINERAI payoutsBuilt, dry runs until the operator turns them on
On-chain ledger proofsNot built
External security auditNot done yet

// 02 · quickstart

Your first request in two minutes

  1. Sign in with a Solana wallet in the app: Phantom, Solflare, Backpack, or a minerai wallet created in your browser. Then deposit $MINERAI: your balance is $MINERAI, one for one, and nothing is free.
  2. Copy your API key from the bottom left of the app, or from the API page. It starts with mk_.
  3. Call the API with any OpenAI client. Only the base URL and the key change.
curl {{BASE}}/v1/chat/completions \
  -H "Authorization: Bearer $MINERAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minerai-1",
    "messages": [{"role": "user", "content": "Write a debounce function in TypeScript"}]
  }'

// 03 · terminal

minerai in your terminal

One command installs minerai. It is an AI agent for your projects, and the same command mines. It updates itself.

irm {{BASE}}/install.ps1 | iex
CommandWhat it does
minerai loginConnects your account: paste the API key from the app's API page
mineraiThe agent, in the current folder. It reads files, writes files and runs commands, and asks before each write or command
minerai "question"One answer, then exit
minerai mineMines: your graphics card answers the network, you earn $MINERAI
minerai modelsThe models unlocked on the network (--model <name> picks one)
minerai balanceYour $MINERAI balance
minerai updateGets the latest version (it also updates by itself)

Inside the agent: /model, /models, /balance, /clear, /yes (approve everything), /exit. The agent can only touch files inside the folder you start it in.

// 04 · architecture

The life of a request

Three parts: your app, the router, and the miners. Click a step to see what happens there.

Your appAPI key · $MINERAI Routerchecks · bills MinerGPU · minerai-1 requestjobstreamanswer Your appAPI key · $MINERAI Routerchecks · bills MinerGPU · minerai-1 requestjobstreamanswer
  1. Authentication. The router hashes your key and finds your account. Only the SHA-256 of keys is stored.
  2. Limits. 20 requests per minute and 2 in parallel per IP. The answer length is capped by your balance, so you are never billed more than you hold.
  3. Connectors. If you turned them on, the router fetches fresh data and gives it to the model as numbered, untrusted sources.
  4. Dispatch. A miner is picked at random, weighted by reputation. You can't choose your miner, and neither can anyone else.
  5. Streaming. The miner generates on its GPU and streams through the router. If it fails before the first word, another miner takes over.
  6. Billing and receipt. The router bills the request, signs a receipt, and books 80% of the cost to the miner.

// 05 · api

API reference

The API follows OpenAI's Chat Completions format. Send your key as Authorization: Bearer mk_…. Base URL: {{BASE}}/v1.

POST /v1/chat/completions

FieldTypeDefaultNotes
messagesarrayrequired1 to 64 messages, roles system, user, assistant, 32,000 characters in total
streambooleanfalseServer-sent events in OpenAI format
max_tokensinteger1024Capped at 2,048 and at what your balance can pay for
temperaturenumber0.70 to 2
seedintegerrandomPassed to the miner
connectorsstring[][]Any of web, solana, market, github, page

Responses add a minerai object with the request's cost, your remaining balance in credits (that is, $MINERAI), and, with connectors, the tools used and their sources.

Try it

The answer streams here. Each run spends a little $MINERAI from your balance.

Other endpoints

GET/v1/modelsThe network model

Returns minerai-1. No key needed.

GET/api/accountBalance and usage

Your balance, today's usage, your last 50 requests and the pricing. Needs your key.

POST/api/account/rotateNew API key

Replaces the key used for the call. The old one stops working immediately.

POST/api/wallet/challengeSign-in message

Body { address }. Returns the Sign-In With Solana message to sign, valid 10 minutes, single use.

POST/api/wallet/verifySign in

Body { message, signature } (base64). Signs in to the wallet's account, creates it on first sign-in, or links the wallet to the account of the key you send.

GET/api/conversationsEncrypted chat sync

Ciphertext only. See Privacy.

GET/api/networkLive network

Miners online with reputation and stats, the router's public key, totals. No key needed.

GET/api/transparencySolvency report

Vault value next to what is owed to users and miners. No key needed. See Transparency.

GET/api/miner/<wallet>Miner earnings

Held, payable, paid and cancelled earnings of a miner wallet.

Errors

StatusTypeMeaning
401authentication_errorMissing or unknown key
402insufficient_creditsBalance too low
403permission_errorThe account has no linked wallet
429rate_limitToo many requests
502upstream_errorA miner failed mid-answer
503no_capacityNo miner free within 30 seconds

// 06 · connectors

Fresh data, fetched by the router

Connectors run on the router, never on a miner's PC. Their results reach the model as numbered sources it cites as [1], [2], framed as untrusted text so a web page can't give it orders. Each successful call costs 0.5 $MINERAI, with at most 4 per request.

Web search

The model decides when a question needs fresh information and writes the query.

Solana

Paste an address or a transaction: balances, holdings, token authorities, transfers. Read-only, mainnet.

Market data

Type $SOL: price, volume, liquidity. Symbols resolve through a verified token list, and copycat tokens are flagged.

GitHub

Paste a repository or file link: metadata, README, open issues, file contents. Public repositories.

Web pages

Paste any link and the model reads it. Private and internal addresses are refused.

// 07 · pricing

A stable price, paid in $MINERAI

Your balance is $MINERAI, one for one: deposit 1,000 $MINERAI and your balance is 1,000. Requests have a fixed price in dollars and are paid in $MINERAI at the token's average price over the last hour. The higher the coin, the fewer tokens a request takes, so the AI stays affordable and miners keep a steady income whatever the market does.

Every $MINERAI you spend is split: 80% to the miner who served you, 10% burned for good, 10% to the treasury. Holders of 1,000,000 $MINERAI or more (in their wallet plus their balance) pay 20% less.

The flywheel

Everything that comes in ends up as demand for $MINERAI, and everything that goes out is held or burned:

  • Pay with SOL or USDC. Your wallet can pay in $MINERAI, SOL or USDC. SOL and USDC are taken at their dollar value, and every few minutes the treasury buys $MINERAI with them on the market (Jupiter). Every answer is a buy.
  • Miners stake to mine. A miner's reward wallet lets the treasury take an amount of $MINERAI: that's its stake, and the tokens never leave the wallet. More stake brings up to 3× more answers; below the minimum, no answers. A miner banned for cheating loses part of its stake, burned.
  • The treasury burns. Each week, half of the treasury's 10% is burned, on chain, with the miners' daily payout.
  • Holders get more. 20% off from 1,000,000 $MINERAI; the bigger models from 100,000; twice the rate limits.
  • Coins launched with minerai pay a small fee in SOL (shown before you sign), bought into $MINERAI.
  • Invite & earn. Share your link: for six months you earn 5% of what your friends spend, from the treasury's part.

The stats card shows it all live: answers paid, $MINERAI bought back, staked by miners, burned.

// per request–
// per day–
// per month–
// $MINERAI today–
Market cap (1B supply)1,000 output tokens ($0.001)MinerBurned
$50k20 $MINERAI162
$500k2 $MINERAI1.60.2
$5M0.2 $MINERAI0.160.02

// 08 · wallets

Signing in never moves funds

You sign in by signing a short text message in the standard Sign-In With Solana format. It is not a transaction: it costs nothing and cannot move a single token. Your wallet shows it as a message to sign, with the site's domain, and warns you if the domain doesn't match.

// the exact messageNot a transaction

      

What the router checks

  • The nonce is its own, used once, less than 10 minutes old.
  • The domain and URI are this site.
  • The ed25519 signature matches the address.
  • One wallet belongs to one account.

The minerai wallet

  • Generated in your browser with Web Crypto.
  • Encrypted with your password: PBKDF2, 150,000 rounds, then AES-GCM-256.
  • Never sent to the router. Exportable to Phantom or Solflare.
  • Lose the password and the browser data, and nobody can recover it.

// 09 · privacy

Your conversations are end-to-end encrypted

Conversations sync between your devices, but the router only ever stores ciphertext it cannot read.

1
A key per account. Your browser creates a random 256-bit conversation key.
2
Encrypted before upload. Each conversation is encrypted with AES-GCM in your browser, then synced.
3
Unlocked by your wallet. The key is uploaded wrapped with a key derived from your wallet's signature. Sign in with the same wallet anywhere and your browser unwraps it.
4
Signing out forgets everything on that device: key, conversations, conversation key.

One honest limit: to answer you, a miner has to read your prompt. Prompts are in clear text on the router and on one miner while they are being answered. Never paste passwords, private keys or personal data.

// 10 · mining

Lend your GPU, earn from every answer

A miner runs minerai-1 on its graphics card and answers the questions the router sends it. It needs an NVIDIA, AMD or Apple GPU with 8 GB of memory or more.

One command installs everything and starts mining. The Become a miner window in the app writes it for you with your Solana address already in it. Next time, just type minerai mine.

irm "{{BASE}}/install.ps1?wallet=YOUR_SOLANA_ADDRESS" | iex
  1. Installs the minerai command, and Node.js and Ollama if they are missing (winget on Windows, Homebrew on macOS, the official script on Linux).
  2. Downloads the code from this router: the same open-source files as in the repository. Open the install link in a browser to read the script before running it.
  3. Prepares minerai-1 on first launch, about 5 GB, only once.
  4. Starts mining. Keep the window open; Ctrl+C stops it. No port to open, and only your public address is used.

Bigger models, on their own

When the network unlocks a bigger model, every miner whose card can hold it downloads and installs it in the background, without stopping. Bigger models cost users more per answer, so they pay miners more: minerai-1 Pro pays 2× per token, Coder 3×. A card with more memory earns more. The miner also installs new versions of itself between answers.

Graphics cards

Works, with 8 GB of GPU memory or more

  • NVIDIA GeForce GTX 10 and 16, RTX 20, 30, 40 and 50 series
  • NVIDIA RTX and Quadro workstation cards
  • AMD Radeon RX 6800, 6900, 6950 and RX 7000 series
  • Apple M1, M2, M3 and M4 Macs with 16 GB of memory

Doesn't work

  • Cards under 8 GB: GTX 1650, GTX 1060, RTX 2060, 4 to 6 GB laptop GPUs
  • Intel graphics, integrated or Arc
  • AMD Radeon RX 6700 and older on Windows
  • Intel Macs, Macs with 8 GB, computers without a GPU

The miner checks your card at startup and warns you if it has less than 8 GB.

// per answer–
// per day–
// per month–

How miners are checked

  • A signed handshake on every connection.
  • Probation: no user traffic until a first check is passed.
  • Canary questions at random times, checked by the router.
  • Token counts capped by what the router actually relayed.
  • Reputation drops on failures; at zero, the identity is banned.

How miners are paid

  • 80% of the $MINERAI each answer cost the user. Prices are stable in dollars, so the income is too.
  • Held 24 hours, cancelled if the miner is banned for cheating.
  • Paid daily in $MINERAI, from 100 $MINERAI owed.
  • Paid automatically once the operator turns payouts on.

// 11 · transparency

Check our numbers yourself

This report is read live from /api/transparency. The rule it checks: what the vault holds must cover what is owed to users and miners.

// user balances–
// owed to miners–80% of the tokens spent, held and payable
// deposits credited–
// treasury–

Every job produces a receipt signed by the router's key, published at /api/network. Payout batches are public at /api/payouts/<date>. Deposits and payouts are Solana transactions anyone can open in an explorer.

// 12 · security

How we protect you, and our limits

RiskWhat stops it
Stolen API keys from a data leakKeys are stored as SHA-256 hashes only
A miner faking or tampering with answersProbation, random canaries, reputation, bans, 24 h earnings hold
A miner inflating its usageCounts capped by the text the router relayed
A phishing site copying mineraiSign-in messages bound to the real domain, never a transaction
A web page attacking the routerThe page reader refuses private addresses and re-checks every redirect
Script injection through an answerAnswers are sanitized and the app runs under a strict Content Security Policy
Copycat tokens in market dataVerified token list first, look-alikes flagged in the answer

What we will never do: ask for your seed phrase or private key, DM you first, ask you to approve a transaction to sign in, or promise returns. Found a vulnerability? Report it privately through GitHub's Security → Report a vulnerability.

// 13 · open source

Read every line

The router, the miner, the app and the training pipeline are open source under Apache 2.0. Everything described on this page can be checked in the code: how keys are hashed, how canaries work, how balances are counted, how conversations are encrypted.

// 14 · faq

Questions people ask

Is minerai a scam?

Judge by what you can check: the code is open, signing in never involves a transaction, the solvency report is live on this page, and everything not running yet is labeled as such. We never ask for a seed phrase and never promise returns.

Can miners read my conversations?

A miner sees the prompt it is answering, while it answers. Your saved conversations are end-to-end encrypted and unreadable by the router. Don't paste secrets.

Why do I need a wallet?

A wallet is your account: it signs you in on any device, unlocks your encrypted conversations, and holds the $MINERAI you deposit or earn. It replaces email and password, and signing in costs nothing.

What happens if the router goes down?

You can't send requests until it is back. Your balance and conversations are kept.

Is the token an investment?

No. $MINERAI is what you spend on AI calls. Nothing on minerai promises a return or a price.

Can I run my own router?

Yes. The router is one Node.js process with a Dockerfile; the self-hosting guide in the repository lists every setting.