Skip to content

06 — Marketplace

Markdown

Sell from your own PC in 10 minutes

Run a model in Ollama or LM Studio, connect your computer to Inferit with one command, and set your price in dollars per 1M tokens. The seller app dials out to Inferit, so your computer needs no public address, open port or domain.

Open source

The seller app, inferit-seller, is open source (Apache-2.0) at github.com/InferitAI/inferit-seller, so you can read what runs on your machine. Buyers pay, and sellers are paid, in ITC (Inferit Test Credit) on Whitechain Sepolia.

What you need

  • A computer that can run the model you want to sell: macOS, Linux or Windows, with a GPU or Apple silicon and enough memory for it.
  • A local model server: Ollama or LM Studio (vLLM and the llama.cpp server work too).
  • Node.js 20 or newer (it brings npx). Or Docker instead.
  • A browser wallet (MetaMask or Rabby) on Whitechain Sepolia, with a little WBT, Whitechain's gas token, for one registration transaction. Get it from the Whitechain faucet (it asks for a GitHub account; Selling inference has the details). Without it the Sell workspace cannot register you, and Inferit refuses a listing from an unregistered wallet.

1. Run a model

Pick a ranked model your computer can run (ranking). Requests sent with model auto only go to ranked models, so a ranked model with no seller yet gets those requests first. On an 8 GB machine try Llama 3.1 8B; on 16 GB or more, gpt-oss-20b. Load it in your model server. Another open-weight model works too: you list it from the Sell workspace first (how). The seller app finds Ollama on port 11434, LM Studio on 1234, vLLM on 8000 and the llama.cpp server on 8080, all on 127.0.0.1.

Ollama
# Ollama (ollama.com): download a ranked model by its Ollama name.
ollama pull llama3.1:8b
ollama list   # what the seller app will find on http://127.0.0.1:11434
LM Studio
# LM Studio: download the model in the app, then start its local server
# (Developer tab, or from a terminal):
lms server start   # http://127.0.0.1:1234/v1

2. Sign in and register

Open the Sell workspace and sign in with your wallet (an off-chain signature, no gas). Then register your payout wallet on the escrow contract: one transaction from your wallet, paid in WBT, done once. An offer cannot go live before it.

App: Sell workspace · Contract: registerSeller(payout)

3. Add a machine

Under Your machines, choose Add a machine and name it (for example home-pc). The workspace creates a connection token for it (icn_…) and shows the command to run, with the token filled in.

The token is shown once. Copy the command before you close the dialog, and keep it out of chats, screenshots and git. The token can only connect this machine: it cannot list offers, read earnings or create keys. If it leaks, revoke the machine and add it again. Each computer needs its own token: two copies of the app with one token keep replacing each other's connection.

API: POST /v1/seller/nodes

4. Run the command

On the computer with the model, paste the command for its system; the Sell workspace shows the same commands with your token in place of icn_YOUR_TOKEN.

macOS and Linux (Terminal)
npx -y inferit-seller connect --token icn_YOUR_TOKEN && npx -y inferit-seller install-service
Windows (PowerShell)
npx.cmd -y inferit-seller connect --token icn_YOUR_TOKEN; if ($?) { npx.cmd -y inferit-seller install-service }
Docker
docker run -d --restart unless-stopped --name inferit-seller \
  -e INFERIT_TOKEN=icn_YOUR_TOKEN \
  --add-host=host.docker.internal:host-gateway \
  ghcr.io/inferitai/inferit-seller

The Docker command is written for a macOS or Linux shell; in PowerShell, put it on one line without the \ line breaks. On Linux, see No local server found first.

connect checks the token with Inferit and saves ~/.inferit-seller/config.json, readable only by you (mode 0600): the token, the connection address, the API address and the machine's name. install-service makes the app start when you log in and restart if it stops. Each time it starts, the app finds your model server and its models, then connects:

  • macOS: a LaunchAgent, ~/Library/LaunchAgents/cc.inferit.seller.plist (RunAtLoad and KeepAlive).
  • Linux: a systemd user unit, inferit-seller.service (Restart=always).
  • Windows: a Task Scheduler task, InferitSeller, that runs at logon.
  • Docker: no service; --restart unless-stopped brings the container back with Docker.

On Windows the command calls npx.cmd: PowerShell's default policy refuses to run npx's script form, and Windows PowerShell 5.1 has no &&, hence the if ($?).

5. Check it

Once the app connects, the workspace shows the machine online, with the models it found. Each is either matched to a model on the market, which you can sell, or marked not in the catalog yet: any open-weight chat model can be listed with List this model, then sold (list any open-weight model). From a terminal on the machine:

bash
npx -y inferit-seller status     # config, local servers and models found, market connection
npx -y inferit-seller doctor     # each check, with a fix for any that fails
# Windows (PowerShell): npx.cmd in place of npx

doctor checks that your model server answers, that it has models and which match the catalog, that Inferit is reachable, and that the token is accepted. Once you have listed a price, it also checks that each listing's context limit is within what your server serves. For each check that fails it says what to do.

6. Set your price and list

For each matched model, the workspace asks for a price in dollars per 1M tokens, input and output (paid in ITC). Next to it the form shows:

  • what a buyer pays for it: your full price plus the 5% marketplace commission, which the buyer pays on top;
  • the model's catalog list price, for comparison;
  • a context limit, when your server runs the model with less context than the catalog lists (Ollama often serves 4096 or 8192 tokens of a model that allows 32768). It is filled in with what the seller app reports, and Inferit sends longer prompts to other sellers. Keep it at most what your server serves (raise it to sell longer prompts).

For example, a seller asking $0.04 per 1M input tokens and $0.06 per 1M output tokens for Llama 3.1 8B (list $0.05 and $0.08) keeps that full price, and a buyer pays $0.042 and $0.063 per 1M tokens. List sends a live 1-token probe to your machine over its connection and, if it answers, creates the offer, pointing at your machine. The offer then takes a buyer's request whenever it is the cheapest healthy offer on Inferit for it.

the same, with the API
# What "List" sends (the session from wallet sign-in). The API takes prices as integers in millionths of a
# dollar per 1M tokens: "40000" = $0.04 per 1M tokens.
curl -s -X POST https://api-production-c74b9.up.railway.app/v1/seller/offers \
  -H "Authorization: Bearer $SESSION" \
  -H 'content-type: application/json' \
  -d '{
    "model": "meta-llama/llama-3.1-8b-instruct",
    "kind": "endpoint",
    "endpointUrl": "connector://node_…/v1",
    "pricing": { "mode": "per_token", "inputPerM": "40000", "outputPerM": "60000" },
    "availability": "intermittent",
    "licenseAck": true
  }'
# endpointUrl: your machine's address on Inferit (GET /v1/seller/nodes lists it).
# availability "intermittent": a computer that is on part of the day.

App: Sell workspace · API: POST /v1/seller/offers

Payment: usage settles in batches on chain, what you are owed accrues in the escrow, and withdrawEarnings() sends it to your payout wallet in ITC (payouts). The seller that serves a request sees it: follow the seller rules of the acceptable use policy, including no logging, retaining or training on buyer requests.

The seller app's commands

bash
inferit-seller connect --token icn_… [--api <url>] [--name <name>]
                              # check the token, save ~/.inferit-seller/config.json
inferit-seller start          # run in the foreground (config file or environment)
inferit-seller install-service    # start at login, restart if it stops
inferit-seller uninstall-service  # remove that
inferit-seller status         # config, local servers and models, market connection
inferit-seller doctor         # checks with plain-English fixes
inferit-seller --version
inferit-seller --help

# Run any of them with npx (nothing to install):
#   npx -y inferit-seller <command>
# or install the app once from npm:
#   npm i -g inferit-seller
# or run it straight from its source repository (needs Git):
#   npx -y github:InferitAI/inferit-seller <command>

--upstream <url> names the model server yourself (an OpenAI-compatible base URL, such as http://127.0.0.1:11434/v1) instead of detecting it. The environment variables of the earlier sidecar still work: CONNECT_URL, CONNECT_TOKEN, UPSTREAM_BASE_URL, MODEL_MAP, MODEL_META and the rest (connector mode). When MODEL_MAP is unset, the app builds it from the models it matched.

Your machines are listed in the Sell workspace: online or offline, when each was last seen, the app's version and the models found. You can rename a machine, or revoke it: its token stops working, its connection closes at once and its offers leave routing.

Troubleshooting

Sleep, reboots and changing networks

While the computer sleeps or is off, your offers take no requests; after a 60-second grace they show as offline, and buyers are served by other sellers. When it wakes, the app reconnects by itself, waiting a little longer after each failed try, up to about a minute. After a reboot the service starts the app again when you log in.

  • If the machine still shows offline a few minutes after waking, run doctor. Under the service, an app that has had no connection for 10 minutes exits so the service starts a fresh copy (INFERIT_WATCHDOG_MINUTES changes the wait, 0 turns it off); run in a terminal, it logs an error and keeps trying. You can also restart it yourself: uninstall-service then install-service, or log out and back in.
  • To keep selling, stop the computer sleeping while it is plugged in: on macOS in System Settings (Energy, or Battery then Options), on Windows in Settings, System, Power, and on Linux in your desktop's power settings. On macOS and Linux, install-service --keep-awake keeps the computer awake while the app runs.
  • On Linux, a user service starts at login. install-service also turns on lingering so it starts at boot; if it says it could not, run sudo loginctl enable-linger $USER once.
  • A computer that is on only part of the day suits "availability": "intermittent": being offline then does not count against the offer's health (availability).

Unhealthy after an idle spell

Ollama unloads a model after 5 idle minutes by default, and loading a 14B model again can take a minute on a laptop. Inferit's health check gives up after about 15 s, so a check that comes after an idle spell fails and the offer shows as unhealthy. The seller app keeps each Ollama model it sells loaded while it runs (INFERIT_KEEP_WARM, on by default), so the model stays in memory, and doctor shows the last cold-load time. With keep-warm off, set OLLAMA_KEEP_ALIVE for the Ollama server (for example 1h) and restart Ollama.

Laptop on battery

Keep a laptop plugged in while it sells. On battery it sleeps when the lid closes and shuts down when the battery runs out, whatever the app does, and a sleeping or shut-down computer cannot sell: buyers are served by other sellers until it is back.

Context smaller than the catalog

A model server may run a model with less context than the model allows: Ollama uses 4096 tokens in many versions unless it is told otherwise. A listing must not accept longer prompts than your server serves, or the server cuts them. The seller app reads the served context from your server (Ollama says it only while the model is loaded, so the app checks again every minute) and the listing form fills in the limit. doctor warns when a listing's limit is above it.

  • To sell longer prompts with Ollama, set OLLAMA_CONTEXT_LENGTH for the Ollama server (for example 32768, as far as memory allows) and restart Ollama. In the Ollama app the same setting is the context length in its settings. A longer context uses more memory: if the model no longer fits, Ollama runs part of it on the CPU and answers more slowly.
  • Then raise the listing's limit: under Offers in the Sell workspace, choose Edit and enter the new context limit. Keep it at most what the server serves (ollama ps shows it while the model is loaded).
  • In LM Studio, load the model with a longer context length; vLLM and the llama.cpp server take it as a start option.
Ollama: a longer context
# macOS (the Ollama app): set it, then quit and reopen Ollama.
launchctl setenv OLLAMA_CONTEXT_LENGTH 32768
# Linux (the systemd service): sudo systemctl edit ollama, add the two lines below, then sudo systemctl restart ollama
#   [Service]
#   Environment="OLLAMA_CONTEXT_LENGTH=32768"
# Or, running it yourself:
OLLAMA_CONTEXT_LENGTH=32768 ollama serve
ollama ps          # CONTEXT shows what a loaded model is served with

List any open-weight model

The app matches each local model name against the market's models (GET /v1/models, fields id and aliases), ignoring case and a :latest tag: for example Ollama's qwen2.5:14b-instruct is qwen/qwen-2.5-14b-instruct. A chat model it cannot match is reported as not in the catalog yet. Any open-weight model whose licence allows paid serving can be listed, and once it is listed any seller can sell it:

  1. In the Sell workspace, open your machine's Models and choose List this model beside it.
  2. Check the form. The Hugging Face repo is filled in when the local name carries one (an Ollama hf.co/Org/Model:Q4_K_M pull, a vLLM or LM Studio Org/Model name); with a repo, Inferit checks that it is public and ungated and reads its licence from the model card. Without one (weights that are not on Hugging Face), name the model your-name/model-name and pick its licence. The context is what your server serves.
  3. Confirm the licence when asked: a licence with conditions (the Llama and Gemma licences, for example) or one Inferit cannot read needs your confirmation that it allows paid hosted serving and that you meet its conditions.
  4. Wait a few seconds: the market tells the app, which maps your local model to the new listing and serves it without a restart (app 0.3.3 or newer; restart an older app, or update it). The price form opens on the machine's card: price it in dollars per 1M tokens as in step 6. A seller-listed model has no list price, so the form shows no list comparison and buyers see no discount for it.
  • Refused: non-commercial and research-only licences, closed models (a hosted API is not open weights), gated or private repos, models that are not chat models, and a catalog model or a name close to one, such as its base model (the answer names the catalog model: offer it when it is the model you serve).
  • Limits: 10 new models per account a day, 50 in all.
  • The app reads your server's models when it starts. After you download another model, restart it (uninstall-service then install-service) so it reports the new one.
  • If your local model is a catalog model under another name, map it yourself. MODEL_MAP replaces the automatic matching (the app then serves only what it names), so list every model you serve. Map a model only to the id of that same model: you are responsible for what you serve.
bash
# Serve a local model under the market id it is (example values).
MODEL_MAP='{"meta-llama/llama-3.1-8b-instruct":"my-llama-build"}' \
  npx -y inferit-seller start

Why no port, domain or proxy

The app opens one outbound, authenticated WebSocket (wss, port 443) to Inferit and answers requests over it, and it calls your model server on 127.0.0.1 only. Nothing on your computer listens to the internet, so you need no open port, domain, certificate, reverse proxy or tunnel, and Ollama needs no change to its host settings. A home router, NAT or a VPN is fine as long as the computer can reach HTTPS sites. A network that blocks WebSockets, such as some company proxies, is not.

"No local server found"

  • Start your model server: open the Ollama app (or run ollama serve), or start LM Studio's local server.
  • A server on another port: pass --upstream http://127.0.0.1:<port>/v1 to connect.
  • Docker: the container reaches your computer's model server at host.docker.internal. On Linux, Ollama listens on 127.0.0.1 only by default, which a container cannot reach that way; run the container with --network host and -e UPSTREAM_BASE_URL=http://127.0.0.1:11434/v1 instead of --add-host. docker logs inferit-seller shows what the app found.

Windows

  • "Running scripts is disabled on this system": type npx.cmd, not npx, as in the command above.
  • spawn git ENOENT (only with the github: command): install Git for Windows, open a new PowerShell window and run the command again, or use npx -y inferit-seller, which needs no Git.

More on how selling works (licences, health, availability, payouts and what buyers see) is on Selling inference.