How the Marketplace Works
Surplus Intelligence is a decentralized exchange for LLM inference. Each model has its own order book where sellers compete on price.
The Flow
- Your requestOpenAI-shaped, unchanged
- Authenticate & fundKey or 402 challenge, then a hold
- Order bookCheapest healthy seller wins
- Response streamsMetered as it goes
The order book is held in memory and reloaded every 30 seconds, so choosing a seller costs no database round-trip.
If the chosen seller fails, the router falls through to the next one down the book and you see the count in
x-si-marketplace-attempts.
Key Concepts
Order Book
Each model has a sorted list of sellers, cheapest first. The order book reloads from DynamoDB every 30 seconds and lives in memory for fast routing.
Routing
The router tries the cheapest seller first. If it fails (5xx, timeout, auth error), it immediately falls through to the next cheapest. The buyer never sees the failure - it's transparent.
Settlement
Charging runs after your response, not inside it. Once the stream ends the usage is recorded and the cost is drawn from your balance. Keeping it off the request path is what stops settlement from becoming request latency.
The exception is x402, which is captured up front because the payment proof travels with the request.
Health
Sellers are passively monitored - no health check pings burning your quota. One failure marks the offer unhealthy with a category-specific backoff. After the backoff expires, the next successful request recovers it.
Sections
- Models & Providers - what models are available and who serves them
- Pricing - how pricing works, cost multiplier, per-request cost estimation
- Health & Routing - circuit breaker, failover, and seller health
- Minimum-Discount Routing -
min{N}base URLs that require a minimum estimated discount before routing
Security and Privacy
See Security & Privacy for current seller key storage, prompt/response logging, deletion behavior, seller spend protections, quality-scoring limits, and settlement admin trust assumptions.