{"uid":"cap_UIy1915zum1VLiVB_EP-U","slug":"farout-pay-per-call-llm-inference-via-x402-38ad540d","name":"FarOut Pay-Per-Call LLM Inference via x402","description":"Pay-per-call LLM inference over x402. Frontier models (GLM, GPT, Gemini, Kimi, DeepSeek, MiniMax) billed per request in USDC on Base or Solana mainnet. No API key, no account. The 402 quotes your exact request; failed calls are never charged.","url":"https://farouter.tech/v1/metered/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from GET /v1/metered/models, e.g. glm-5.3. No provider prefix."},"stream":{"type":"boolean","description":"SSE streaming."},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant","tool"],"type":"string"},"content":{"type":"string"}}},"description":"Chat messages, [OI]-compatible {role, content}."},"max_tokens":{"type":"integer","description":"Output token budget. Drives the quote directly."}}},"responseSchema":{"type":"json","example":{"usage":{"prompt_tokens":6,"completion_tokens":8},"choices":[{"message":{"role":"assistant","content":"Hello! How can I help?"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_40ZjzeAGYN-_bFLAuMMjH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Routes a chat completion request to frontier LLMs (GLM, GPT, Gemini, Kimi, DeepSeek, MiniMax) and charges $0.001 USDC per call on Base or Solana via the x402 payment protocol — no API key or account required.","exampleAgentPrompt":"Using the FarOut metered endpoint with the DeepSeek model and a 512-token output budget, ask: 'Summarize the key risks of investing in small-cap crypto tokens in three bullet points.'","exampleUseCases":[{"title":"Autonomous agent calling LLMs without API keys","prompt":"I want you to answer the user's question using the FarOut pay-per-call router — pick the GLM-5.3 model, allow up to 256 output tokens, and use the message: 'What are three best practices for writing secure smart contracts?'"},{"title":"Budget-capped creative writing task","prompt":"Use the FarOut metered chat endpoint with GPT and a max of 800 tokens to write a short noir-style opening paragraph for a detective story set in a cyberpunk city."},{"title":"Multi-model comparison for research","prompt":"Send the same prompt — 'Explain transformer attention in one paragraph' — to both the Gemini and DeepSeek models on FarOut, each with a 300-token limit, so I can compare their answers side by side."}],"resultDescription":"An OpenAI-compatible JSON response containing a choices array with the assistant's reply message and finish_reason, plus a usage object reporting prompt_tokens and completion_tokens consumed. The response reflects the exact model selected and the token budget specified.","failureModes":["Payment declined or insufficient USDC balance — 402 response returned, no charge applied","Invalid or unsupported model ID — endpoint returns an error before charging","max_tokens not specified or set too low — response may be truncated or quota error returned","Network timeout during streaming — partial SSE stream, billing outcome uncertain","Malformed messages array (missing role or content) — validation error before inference begins"],"whenToPreferThis":"Choose this endpoint when an AI agent needs LLM inference without managing API keys, accounts, or subscriptions — especially in autonomous or agentic workflows where pay-per-call USDC micropayments via x402 are preferable to monthly billing. It is ideal when you want access to multiple frontier models (GLM, GPT, Gemini, Kimi, DeepSeek, MiniMax) through a single OpenAI-compatible interface, and when failed calls must never result in a charge.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:45:25.974Z","isFirstParty":false}