InferHub
InferHub — the AI inference marketplace

Maximize every token you spend on AI.

Call dozens of frontier models through one OpenAI- and Anthropic-compatible API, billed per million tokens in USDC and routed to the best-priced healthy provider. No monthly plan, no commitment — pay for what you use, at a fraction of official pricing.

💰 $3141789.69 saved by users vs official pricing
I want API access

Pay per token. Maximum value.

Top up USDC, grab one key, then npx @inferhub/helper — or call any model from your SDK. Stop calling, stop paying.

228.0Mtotal requests
12.76Ttokens routed

Top 5 consumer spending

All time
I have capacity

Turn idle capacity into USDC.

Connect one of the curated upstreams — Claude, Codex, z.ai, OpenCode Go, Command Code — and earn on the headroom you don't use.

$10,433.35ready to spend
$52,261.32paid to publishers

Top 5 publisher earnings

All time
Today (UTC)
479.5Krequests
37.5Binput tokens
31.5B cached (84%)
783.5Moutput tokens
50% off official pricing — or more USDC on Solana mainnet OpenAI + Anthropic compatible

Reach upstreams that normally live behind a monthly plan

ClaudeAnthropic-compatible
CodexOpenAI-compatible
z.ai GLMOpenAI-compatible
OpenCode GoOpenAI-compatible
Command CodeAI SDK compatible

One API, two protocols, a marketplace behind it

InferHub is an OpenAI- and Anthropic-compatible API with a marketplace behind it. Call any model with one key; route to capacity that fits your budget.

Get started in one command

Coding agents first: run the helper, paste your key, pick models. Or point your OpenAI / Anthropic SDK at InferHub — same request shape, same streaming, one key for both.

Coding agents
Claude Code · Codex · OpenCode · Hermes · OpenClaw · Cline
# Point Claude Code, Codex, OpenCode, Hermes, OpenClaw, Cline at InferHub
npx @inferhub/helper

# Interactive wizard:
#  1. paste API key  → validated via GET /v1/models
#  2. select agents
#  3. search & pick models
#  4. confirm → configs written
OpenAI SDK
Chat completions, streaming, tool calls
// OpenAI SDK → any upstream
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: proces...KEY,
  baseURL: "https://api.inferhub.dev/v1",
});

const res = await client.chat.completions.create({
  model: "claude/sonnet-4-5",
  messages: [{ role: "user", content: "Explain PKCE." }],
});
Anthropic SDK
Messages API, native Claude
// Anthropic SDK → Claude upstream
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: proces...KEY,
  baseURL: "https://api.inferhub.dev",
});

const res = await client.messages.create({
  model: "claude/opus-4-8",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Write a haiku." }],
});
Consumer combos
Route to the best provider within budget
// Consumer combo → first provider with capacity
const res = await client.chat.completions.create({
  model: "combo/code-assistant",
  messages: [{ role: "user", content: "Refactor this function." }],
  stream: true,
});

Full walkthrough in docs. Package: @inferhub/helper.

Models reachable without buying the plan

Per-Mtoken pricing in USDC — guaranteed at or below 50% of official rates. Publishers set their ask; the platform enforces the cap.

Free models are listed as free/<provider>/<model> and settle at $0, but only accounts with balance > 0 can call them. Free capacity is best-effort and can be unavailable or stopped at any time.

ModelInput / MtokOutput / Mtok

Two paths, same platform

For publishers

Put your model capacity to work

Your idle model capacity has headroom. Connect one of the curated upstreams once, set your per-Mtoken price, and earn USDC from capacity you'd otherwise waste. We track real upstream usage so you never get cut off unexpectedly.

    Publisher dashboard
    Connected capacityClaude · Codex · z.ai
    Your ask$0.40 / Mtok in
    Quota health5h: 38% · weekly: 21%
    Earnings (this period)128.40 USDC
    Available to withdraw≥ 5 USDC → Solana

    Pay-per-use for consumers, payout for publishers

    Consumers optionally attach a bid (x-max-input-price / x-max-output-price) and we route to a provider that meets it. Skip the bid and we route to the first provider with capacity within your budget. No subscription tier required on either side.

    Call models now, or let yours earn

    Deposit USDC and hit your first model in minutes — or connect a curated upstream and start earning from idle capacity. Both paths run on the same OpenAI- and Anthropic-compatible API, settled in USDC on Solana mainnet.

    Join the InferHub community on Discord

    Get support, request features, share suggestions, and follow updates. Whether you're calling models or publishing capacity, we're most responsive there.

    Join the Discord