# Nuri Router > Discover models over HTTP or MCP. Pay for metered answers with direct Base USDC through PayAI, using x402 v2 exact-after-answer invoices. No router account or prepaid balance. Origin: https://router.paymentrequired.com Website: https://router.paymentrequired.com/ ## Simplest integration: ask_expert Use ask_expert({"question":"Your task and relevant context"}) when stuck, uncertain, or checking a solution. No model selection is required. Never put tokens or wallet keys in the question. Connect to https://router.paymentrequired.com/mcp/expert to expose only this tool. Configure an access token in the transport Authorization: Bearer header for zero caller charge; provider credits are still consumed. Invalid tokens fail closed, never falling back to paid access. Without a token, use an x402-aware MCP wallet client or the repository's clients/ask-expert.mjs stdio bridge. The bridge hides signatures and recovery IDs from the model. Its owner supplies a dedicated wallet and explicit per-call and lifetime spending caps. It persists a private UUID before calling, reserves the exact amount before signing, and never pays again after an ambiguous outcome. Identical question text reuses the bridge's saved answer. No account/key setup belongs in the model's prompt. Native ask_expert accepts question (1–32768 characters) and optional private UUIDv4 request_id. Native clients must preserve request_id across retries. The server chooses an available configured expert and requests at most 2048 output tokens. A confirmed unpaid upstream failure may try one fallback; an issued invoice pins the original model for payment and recovery. Token access returns an answer without a payment request. Paid access uses the same x402 metadata protocol as chat below; the invoice resource remains the canonical /mcp?invoice=… URL. ## Public endpoints - POST /mcp/expert — the recommended one-tool endpoint, ask_expert. - POST /mcp — advanced tools plus ask_expert; stateless Streamable HTTP, JSON responses, POST only. - GET /v1/model-tests — all configured models, including unavailable/token-only entries, sanitized availability.checked_at, availability.stale, and availability.resets_at_ms. Read-only. Unknown reset is null; a past reset is not proof of recovery. - GET /v1/models — free current model catalog with per-model payment, pricing and limits. - POST /v1/chat/completions — prepare an answer without a signature, then submit an approved payment to retrieve it. Paid responses are buffered JSON, not streamed. - GET /healthz — free service liveness and deployment metadata; not evidence of model availability or payment success. - GET /llms.txt — this contract. - POST /v1/orbs — paid orb: exactly 0.05 USDC per orb through Circle Gateway (x402 v2 exact, GatewayWalletBatched), not the PayAI invoice flow above. Body {task, model?, ttl_s?}; model one of mimo-v2.6-flash, muse-spark-1.3, gpt-5.6-luna; ttl_s 30–600. One orb is a fresh Hermes CLI sandbox with no network and no memory that runs the task (up to 600 s and 100 model steps) and is then deleted. An unsigned request returns the 402 challenge and starts nothing. Returns orb_id and a private per-orb token. Keep a private UUIDv4 Idempotency-Key to recover the same orb at zero charge. - GET /v1/orbs/limits — free orb price and caps. - GET /v1/orbs/{id}, GET /v1/orbs/{id}/result, DELETE /v1/orbs/{id} — free status, result and kill with Authorization: Bearer ; a wrong token returns 404. ## Discover and connect Codex CLI remote MCP registration, for discovery: codex mcp add nuri-router --url https://router.paymentrequired.com/mcp SDK-neutral connection parameters: transport = Streamable HTTP, URL = https://router.paymentrequired.com/mcp. Adapt configuration syntax to the client. Free HTTP discovery: curl -sS https://router.paymentrequired.com/v1/models Registering this server does not enable payment. Generic MCP clients require an x402-aware signer or wallet bridge for paid chat. The signer must support x402 v2 exact EIP-3009 on Base and preserve the private invoice resource in the payment payload. ## Models and prices Read data[].id and each model's payment.pricing. Never infer availability from the configured catalog, a previous count or /healthz. Only the current returned catalog is discovery evidence; availability can change before a request. An empty catalog provides no current availability evidence. A failed catalog request leaves availability unknown. For coding, choose an exact ID from the current catalog. Never substitute a different model silently. Per-model pricing fields are currency, input_per_million, output_per_million, request_fee and max_authorized_usdc. Do not apply a global tariff to every model. Missing prices are not zero. A free flag or missing payment metadata does not grant unauthenticated public free inference; authenticated internal paths are not part of this public contract. The current authorization ceiling is 1 USDC per request, not 0.01 USDC and not the charge. Confirm the ceiling against the selected model's metadata. The exact invoice is determined after provider-reported token usage is metered at that model's rates plus its request fee. The wallet signs that exact invoice amount, not an upto authorization for the full ceiling. ## MCP tools - ask_expert: one question with automatic expert selection; token access or x402. See simplest integration above. - list_models: free discovery; returns current models and payment metadata. - quote: free non-payable estimate for a model; does not generate an answer or charge the buyer. Exact-after-answer estimates have payable: false. They are not invoices to sign. - chat: unsigned calls consume provider compute to prepare an answer and return a payable invoice as an isError tool result. The answer is withheld until payment. Use explicit model, text messages (system/user/assistant), optional max_tokens and private request_id. On approved retry, payment goes in params._meta["x402/payment"]. Preserve the identical model, messages, options, request_id and private invoice resource. ## HTTP request and payment sequence 1. Discover a model and inspect its per-model prices. Use a new private random UUID for each new logical request. 2. Prepare: POST application/json to /v1/chat/completions with explicit model, messages, optional max_tokens and stream: false. Pass the UUID in Idempotency-Key. Unsigned preparation consumes provider compute but does not charge the buyer. Do not use it for polling or health checks. Additional HTTP options depend on the upstream model. 3. Invoice: after generating and metering an answer, the service returns HTTP 402 with a base64-encoded PAYMENT-REQUIRED header. Retain its private resource URL, including the invoice token. The answer is not yet released. 4. Wallet approval: verify amount, recipient, expiry, network and asset. Network is Base mainnet eip155:8453. USDC asset is 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913. Settlement uses PayAI with x402 v2 exact, EIP-3009. No Gateway deposit. The same 402 may also include a Lightning BOLT11 invoice. 5. Paid retry: for USDC, repeat the identical body and Idempotency-Key with PAYMENT-SIGNATURE. For Lightning, pay the BOLT11 invoice from WWW-Authenticate and retry the identical request with Authorization: L402 :. MCP Lightning clients send the same credential in params._meta["l402/authorization"]. The response includes charged sats and supports zero-charge replay. Preserve the invoice resource from the challenge in the signed payment payload. Successful settlement returns buffered answer JSON, usage and a PAYMENT-RESPONSE receipt. Do not use stream: true for public paid chat. ## Recovery and uncertain settlement Keep Idempotency-Key (HTTP) or request_id (MCP), the exact request body/model, invoice resource and receipt private. Never put them in public examples, source control, browser URLs or analytics. Payment signatures alone are not a private recovery credential. For a confirmed completed request, the same private key and body can retrieve the stored answer with no new payment. Preserve these values; do not generate a new UUID for a retry. Respect the advertised responseRecoveryHours and invoice expiry. Do not promise indefinite retention or atomic payment-and-delivery guarantees. If settlement is pending or unknown, stop. Do not make a new payment, create a fresh authorization or change the key to bypass the state. A timeout does not prove payment failed. Keep the request ID, invoice and any receipt for manual reconciliation with the service operator. Confirm settlement before deciding any next action. The website polls status metadata every 30 seconds while visible. Refresh never generates answers or submits payments. Only an explicit public Test button sends a fixed 64-token mini-request, capped at 20 new public tests per rolling hour across all visitors, with a 60-second cache. Empty responses are not successful text-answer tests.