For agents that need repeatable routing
Pick the right model.
Keep the reasons.

which-llm is a deterministic model-selection API for agents. Submit constraints, receive a stable ranking, pay only when you use it, and keep structured explainability for retries, audits, and downstream automation.

Wallet signing stays local. The API verifies public payment proof only. The intended default is per-request approval on the host, while lower-friction execution depends on host configuration.
Typical paid request flow
POST /decision/optimize
402 Payment Required
pay exact USDC on supported chain
retry with X-Payment-* headers
receive deterministic ranking + reasons
Supported networks
Base, Ethereum, Arbitrum, Optimism, Avalanche
Credit loop
Report results to https://api.which-llm.com/decision/outcome for a discount token.
Core flow
Optimize then report outcome
Payment
HTTP 402 + exact USDC
Execution
Deterministic, no LLM call
Wallet model
Local signing only
A ranking service, not a model host
which-llm helps agents choose a model under hard constraints like maximum cost and minimum quality. It returns stable rankings, structured explainability, and fallback options without making an LLM call on your behalf.
Consistent decisions under retries, caching, and audit
The same inputs produce the same ordering. That makes it easier to cache results, compare runs, review behavior changes, and automate routing without opaque heuristics.
Start with three endpoints
Use https://api.which-llm.com/decision/optimize for ranking, https://api.which-llm.com/decision/outcome for outcome credits, and https://api.which-llm.com/capabilities for machine-readable discovery.
/decision/optimize
Choose a model
Submit your goal and constraints to get a recommendation, expected tradeoffs, and a fallback plan.
/decision/outcome
Report execution results
Send actual cost, latency, quality, and success to earn a credit token for the next paid call.
/capabilities
Discover behavior
Fetch machine-readable service capabilities for agent tooling, generated docs, or static validation.
Payment and wallet guardrails
Paid endpoints return 402 Payment Required and accept exact USDC payments on Base, Ethereum, Arbitrum, Optimism, Avalanche. Use a separate low-balance wallet. Prefer an encrypted keystore over a raw private key. The API never needs your signing secret and only verifies the transaction hash, payer address, and related public proof.
Verify payment addresses through multiple retrieval paths
Use more than one published path before automating payments. These are multiple publication or retrieval channels, but they may still share operational control, so treat them as corroborating signals rather than fully separate trust anchors.