# infr.sh — inference routing

Updated: 2026-05-28 · 2% routed + standard fees apply

2% routing fee on upstream inference (upstream × 1.02). Standard payment-rail and onramp fees apply separately — Stripe card, Tempo/x402 gas, Coinbase, MoonPay, etc. Catalog reads are free.

## Quote first (free)

```
GET https://www.infr.sh/api/prices/{model-id}
POST https://www.infr.sh/api/prices/quote
```

## Run inference

```
POST https://www.infr.sh/api/v/{model-id}
Content-Type: application/json

{ "prompt": "...", "image_url": "..." }
```

### Auth paths

1. **Anonymous trial** — no headers; $0.20 total via signed cookie, then 402
2. **Privy bearer** — `Authorization: Bearer <privy-token>`; debits USD credits
3. **MPP / HTTP 402** — no API key; 402 challenge → pay Tempo (USDC Base) or Stripe card → retry with `Payment` header

Agents: use `mppx` client or raw two-roundtrip curl. See https://www.infr.sh/docs.

## Plan a chain

```
POST https://www.infr.sh/api/orchestrate
{ "goal": "...", "expected_calls": 1000, "constraints": { "license": "commercial" } }
```

## SDK

```ts
import { Infr } from 'infr'
const infr = new Infr({ baseUrl: 'https://www.infr.sh' })
await infr.prices.get('seedream-4.5')
```
