Reference
How Bull Inference works
Two-sided marketplace for LLM inference. Sellers list capacity. Buyers call one OpenAI-compatible API. Default path: card → USDC ledger credits on /key. Float-free: Buy USDC → Approve, or pure $ANSEM. Sellers earn $ANSEM on card spends.
- 01CallBuyer hits /v1 with an inf_ key
- 02RouteBull picks the cheapest live offer
- 03SettleSeller serves · settle on Solana
01 The idea in one minute
Sellers connect an OpenAI-compatible upstream (OpenRouter, Venice, Groq, a self-hosted box), pick a model, set a discount, and list an offer. They earn $ANSEM by default (card path). Wallet USDC when they accept it and the buyer pays USDC.
Buyers get an inf_… key, buy card credits (or optionally Approve $ANSEM), and call /v1/chat/completions like OpenAI. Bull Inference picks the cheapest matching offer and pays the seller.
02 Buy inference, step by step
- Open Get keyOpen Get key (or /key) and sign in with Privy (email, X, or Solana wallet).
- Buy credits → mint keyBuy credits with a card (Loaded USDC) → mint your
inf_…key. - Revoke a keyOn /key, past keys show a Revoke control. Revoked keys stop immediately; mint a new one anytime.
- Check the boardLive offers on /market. If a model has no sellers yet, requests fail until someone lists, see Empty markets.
- Call the APIUse your
inf_…key against the OpenAI-compatible base URL. Prefer images without curl? Open /playground. After a session, Savings / Metrics → Share for an OG card.
Pay with $ANSEM
On Get key, pick Buy USDC (MoonPay/Coinbase → Approve) or the $ANSEM tab. Card credits are the default. Sellers settle in $ANSEM via auto settle-batch for the card path.
Power desk (full balances triad + SOL slider): /market?fund=advanced.
curl https://api.bullinf.fun/v1/chat/completions \
-H "Authorization: Bearer inf_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello"}]
}'03 Cursor / OpenAI SDK
Bull Inference is an OpenAI-compatible drop-in. Point Cursor, the OpenAI SDK, or Hermes at the API host and use your inf_… key.
- Base URL
https://api.bullinf.fun/v1(no trailing path beyond/v1). - API keyYour
inf_…key from /key. Empty Loaded / allowance returns402. Optional daily/monthly USD spend caps viaPATCH /api/buyer/keys/{key_hash}; exceeding a cap returns429. - Model idLive board id from /market or
GET /v1/models. Routers:auto,auto-cheap,fast,auto-balance,auto-intel,fusion.
openai.base_url = "https://api.bullinf.fun/v1"
openai.api_key = "inf_…"
# Cursor: Settings → Models → OpenAI Compatible
# Base URL: https://api.bullinf.fun/v1
# API Key: inf_…Default routing uses trusted seller upstreams only. Opt into unverified sellers under Get key → Prefs (or PATCH /api/buyer/routing). Chat completions forward OpenAI tool_calls so agent loops keep working.
04 Agents, Market, Hive, Buzz
Buzz = rooms. Bull Market = public inference. Hive = private Community GPUs. Point the agent’s LLM client at Bull; keep coordination in Buzz/Slack/whatever you already use.
- Market (public)Mint
inf_…on /key → Copy agent env → paste into Hermes / Goose / Cursor. Default model =fast. - Hive (Community)Pair
hive-nodeon /hive →OPENAI_BASE_URL=http://127.0.0.1:9337/v1withmodel=best. - Buzz (optional rooms)Join Buzz for messages. Leave LLM provider on Market or Hive, never set Buzz as
OPENAI_BASE_URL.
export OPENAI_BASE_URL=https://api.bullinf.fun/v1
export OPENAI_API_KEY=inf_…
# model: fast05Team & workspaces
Every buyer starts in a personal org. Create a team org when you want shared spend, keys, and usage across people.
- Open TeamGo to /team. Sign in with the same Privy session.
- Create a teamYou become owner and billing user. Keep Loaded card credits topped up — that treasury pays for the whole team.
- Invite membersAdmins/owners mint an invite link (
/team#join=…). Treat it like a secret. - Mint keys in a workspaceSwitch org/workspace on the desk (or set
X-Bull-Org/X-Bull-Workspace). Members mint keys without funding Solana themselves. - Roles
owner/admin/member. Removing a member revokes keys they minted.
06 Sell capacity, step by step
- Sign in on /marketSame wallet login as buyers. Open List offer.
- Pick a trusted providerAllowlisted hosts (OpenRouter, Venice, Groq). These offers show up for default buyers.
- Or use a custom URLAny OpenAI-compatible base URL. Listing is unverified, buyers must opt in.
- Choose model + discountCatalog model id and price vs list. Platform take-rate is seller-side.
- Get paidDefault earn $ANSEM. Card / ledger spends clear in $ANSEM from treasury float via auto settle-batch.
07 Trusted vs unverified sellers
Trusted
Allowlisted provider hosts. Default buyer routing includes these. No extra opt-in.
Unverified
Custom / unknown hosts. Unverified badge. Buyers must opt in before traffic can reach them.
The market can list anything OpenAI-compatible; buyers choose whether to trust unknown endpoints with their prompts.
08 BYOK, optional, not the main path
Bring-your-own-key lets you register a private upstream. Chat tries it before marketplace sellers. On success you pay a thin relay fee (default ~2% of the marketplace quote); the seller gets $0. Your lab/provider bills you separately.
Use BYOK when you already have a lab key, or need a model no seller lists.
Skip BYOK when you just want market inference, buy credits via Get key, mint a key, call /v1.
09 If markets look empty
An empty board means no one has listed an offer yet, not that buyers must use BYOK. Until at least one seller lists a trusted offer for a model, chat for that model has nowhere to route.
10Gifts, extension & images
Beyond the marketplace desk: send $ANSEM to people on X, generate reply images from a Chrome extension, or try image models in the browser playground.
- Send an X giftOn /gift, fund an
@handlewith $ANSEM. Share the link. - ClaimRecipient opens the gift link → Sign in with X as that handle → claim. Already on wallet/email? Link X on the same Privy account.
- Chrome extensionLoad unpacked from
chrome-extension/→ authorize on /extension/connect. Privacy: /privacy. - Image playground/playground, mint a key inline, spend Loaded credits or Approved $ANSEM, confirm cost before generate.
11 Bull Hive, Community mesh
Separate product from the $ANSEM marketplace. Membership in a Community is the gate. Peers share local models over mesh-llm / iroh. Bull API handles admission and pairing, it never sees prompts. Hive Earn never lists on /market.
- Open the Hive deskGo to /hive. Connect with Privy. Create or join a Community.
- Pair a machineInstall
hive-node→hive-node pair→ authorize on /hive. - Share + agents
hive-node share --model …. Point agents athttp://127.0.0.1:9337/v1(model=best).
docs/hive.md.Ready to call /v1?
Connect, buy credits, mint an inf_ key — under a minute.