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.
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.
Top 5 consumer spending
All timeTurn 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.
Top 5 publisher earnings
All timeReach upstreams that normally live behind a monthly plan
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.
One key, both protocols
Hit /v1/chat/completions or /v1/messages with a single InferHub API key. Or run npx @inferhub/helper to wire Claude Code, Codex, OpenCode, and more in seconds.
Combos: one name, many upstreams
combo/<slug> virtual models check your budget, then route to the first provider with available capacity. One model name, automatic failover, no manual re-rolls.
Real upstream quota tracking
We poll Claude, Codex, and z.ai for live 5-hour and weekly usage windows. No manual caps — exhaustion is detected from the source of truth, so your provider never cuts you off without warning.
Pay-per-use in USDC
Tokens are metered per million and deducted from your balance in real time. Stop calling, stop paying. No subscription to cancel. USDC on Solana mainnet.
Credentials encrypted at rest
Every provider key is encrypted at rest and injected only at the wire — we never expose your raw credential. Release control and rotation anytime.
Per-provider proxy pool
Each publisher's outbound traffic rides a least-used proxy from its configured pool, keeping upstream fingerprints stable and traffic distributed.
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.
# 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 → any upstream
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.INFERHUB_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 → Claude upstream
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.INFERHUB_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 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.
| Model | Input / Mtok | Output / Mtok |
|---|---|---|
| ag/claude-opus-4-6-thinking | $0.02 | $0.1 |
| ag/claude-sonnet-4-6 | $0.006 | $0.03 |
| ag/gemini-3.6-flash-high | $0.00075 | $0.00375 |
| ag/gemini-3.7-flash-high | $0.00075 | $0.00375 |
| ag/gemini-3.8-flash-high | $0.00075 | $0.00375 |
| ag/gemini-pro-agent | $0.002 | $0.012 |
| cc/claude-fable-5 | $1 | $5 |
| cc/claude-fable-5-1 | $1 | $5 |
| cc/claude-haiku-4-5 | $0.1 | $0.5 |
| cc/claude-opus-4-6 | $0.5 | $2.5 |
| cc/claude-opus-4-7 | $0.5 | $2.5 |
| cc/claude-opus-4-8 | $0.5 | $2.5 |
Two paths, same platform
Land on the consumer path to call models on pay-per-use, or the publisher path to share capacity and earn.
Deposit USDC, generate one API key, and call any model through /v1/chat/completions or /v1/messages. Optionally attach a bid with x-max-input-price / x-max-output-price and we route to a provider that meets it.
Pick a curated upstream — Claude, Codex, z.ai, OpenCode Go, or Command Code — connect its key, set your per-Mtoken ask, and your capacity joins the pool.
Tokens are metered per million and deducted from the consumer balance in real time. Publishers see earnings accrue and withdraw to Solana mainnet once they clear the 5 USDC minimum. Stop calling, stop paying.
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.
- Credentials encrypted at rest — we never expose your raw key.
- Upstreams connect with a scoped API key — no other privileges required.
- Live 5-hour and weekly quota monitoring protects your account from surprise exhaustion.
- Per-provider outbound proxy pool routes your traffic through least-used egress.
- Instant USDC settlement on Solana mainnet; withdraw at the 5 USDC minimum.
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.
- ✓One key for OpenAI- and Anthropic-compatible endpoints
- ✓combo/<slug> routing across providers, budget-aware
- ✓Real-time balance deduction — stop calling, stop paying
- ✓Optional bid headers to cap your per-Mtoken spend
- ✓Curated upstreams: Claude, Codex, z.ai, OpenCode Go, Command Code
- ✓Live 5h and weekly quota windows tracked for you
- ✓Earnings accrue per settled request, withdrawable at 5 USDC
- ✓Per-provider proxy pool keeps your upstream stable
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