Skip to content
Testnet demo on Whitechain Sepolia: test tokens (ITC) only, no real money. Requests are served by a real open-weight model on the founder's machine when it is online, otherwise by a demo seller that returns canned responses.
Inferit

Quickstart

Get gas, fund an escrow, sign in, create a key and make your first call, then watch it settle on Whitechain. About five minutes on testnet. The guided version of this page is Start here. Building an agent with no wallet UI and no gas? Use x402 instead.

0. Add Whitechain Sepolia and get WBT

Add the network (chain id 1874) and the ITC token to your wallet:

Then get a little test WBT for gas from the Whitechain faucet. At the time of writing it asks for a GitHub account at least 30 days old and gives about 0.5 WBT per 24 hours. You need at least 0.002 WBT for the approve and deposit transactions; the site blocks deposits below that.

1. Fund the escrow

Open Start here (or Buy) and connect the wallet. Then:

  1. Claim test ITC (Inferit Test Credit) from the token faucet. It has no monetary value.
  2. Approve the escrow and call depositAndSetCap: your deposit, the most the operator may ever settle from you (the cap; the form suggests your deposit, at most 25 ITC), and when that permission expires (7 days by default).

Escrow activity on Whitechain is public chain data, so fund from a dedicated wallet if you do not want your spending linked to your main address.

2. Sign in and create a key

Sign the one-time challenge message (no gas). This gives you a 24h session for account routes. Create an API key; it is shown exactly once, so store it in your environment:

bash
export INFERIT_API_KEY='ik_...'

3. Call the API

Any OpenAI-compatible client works: change the base URL and the key. The examples use a model with a live offer right now (the hosted demo serves qwen/qwen-2.5-14b-instruct, also reachable as qwen2.5:14b-instruct).

bash
curl https://api-production-c74b9.up.railway.app/v1/chat/completions \
  -H "Authorization: Bearer $INFERIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen-2.5-14b-instruct",
    "messages": [{"role": "user", "content": "Write a haiku about spare GPUs."}]
  }'

Streaming is a byte-faithful relay of the seller's server-sent events:

bash
curl -N https://api-production-c74b9.up.railway.app/v1/chat/completions \
  -H "Authorization: Bearer $INFERIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen/qwen-2.5-14b-instruct","stream":true,"messages":[{"role":"user","content":"Count to five."}]}'
stream.mjs
import OpenAI from 'openai';

const client = new OpenAI({ baseURL: 'https://api-production-c74b9.up.railway.app/v1', apiKey: process.env.INFERIT_API_KEY });

const stream = await client.chat.completions.create({
  model: 'qwen/qwen-2.5-14b-instruct',
  messages: [{ role: 'user', content: 'Explain escrow in one sentence.' }],
  stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? '');

4. See it settle

The API settles usage in batches: once your unsettled usage reaches 0.10 ITC, or after at most an hour. Each batch is one settle transaction on the escrow. Your dashboard lists per-request costs and your escrow events with links to the explorer, first as pending finality, then finalized once the L1 block is final (see Finality). Market-wide totals are on On-chain metrics. Only token counts and costs are recorded; prompts and completions are never stored.

Routing controls

bash
# Only route to offers at least 30% below list price
curl https://api-production-c74b9.up.railway.app/min30/v1/chat/completions -H "Authorization: Bearer $INFERIT_API_KEY" ...

# Same thing as a header (the strictest of path, header and key setting wins)
curl https://api-production-c74b9.up.railway.app/v1/chat/completions -H "x-min-discount: 30" ...

Every response carries x-request-id, x-inferit-attempts, x-inferit-buyer-cost-micro, x-inferit-offer (an opaque hash, not the seller's identity) and x-inferit-rail. Settlement itself is public: see On-chain visibility.