{"uid":"cap_H3VmmYMW0JH7VmnmPmmw_","slug":"onchain-router-ai-model-chat-completions-via-usdc-c93ec47a","name":"Onchain Router – AI Model Chat Completions via USDC","description":"Request-priced LLM inference · 0% service fee launch promotion","url":"https://llm.agenticfi.wtf/v1/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["gemini-3.6-flash","gemini-3.5-flash-lite","gemini-3.5-flash","gemini-3.1-flash-lite","gemini-2.5-flash","gemini-2.5-pro","gemini-2.5-flash-lite"],"type":"string"},"stream":{"type":"boolean","const":false},"messages":{"type":"array"},"max_tokens":{"type":"integer","maximum":65536,"minimum":1}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl_example","model":"gemini-3.6-flash","usage":{"total_tokens":0,"prompt_tokens":0,"completion_tokens":0},"object":"chat.completion","choices":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ACJco-jALmAQY5waemZWK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Routes OpenAI-compatible chat completion requests to Google Gemini models, charging $0.002 USDC per call with an on-chain payment receipt.","exampleAgentPrompt":"Using the Onchain Router with Gemini 2.5 Flash, generate a 200-word product description for a noise-cancelling headphone called 'AuraSound Pro' — pay with USDC per request and give me back the completion.","exampleUseCases":[{"title":"Crypto-native chatbot backend","prompt":"Send this user message — 'Explain quantum entanglement in simple terms' — to Gemini 2.5 Flash through the Onchain Router, cap the response at 512 tokens, and pay the $0.002 USDC fee per call."},{"title":"Automated content generation pipeline","prompt":"Use the Onchain Router with Gemini 2.5 Pro to write a 3-paragraph blog post intro about decentralized finance, paying per request in USDC so every generation is logged on-chain."},{"title":"On-chain AI agent task execution","prompt":"I'm building an autonomous agent — route the system prompt and user task 'summarize this news article' through the Onchain Router using Gemini 2.5 Flash Lite, limit to 1024 tokens, and use USDC micropayments so each inference has an auditable receipt."}],"resultDescription":"A JSON object in OpenAI chat.completion format containing: a unique completion ID, the model used, token usage breakdown (prompt, completion, total), and an array of message choices with the generated text. A USDC payment receipt is also recorded on-chain per call.","failureModes":["Insufficient USDC balance — payment fails and request is rejected","Invalid or unsupported model enum value — schema validation error","max_tokens exceeds 65536 limit — request rejected","stream:true sent (not supported) — error returned","Network or provider outage — upstream Gemini API error propagated","Malformed messages array — JSON schema validation failure"],"whenToPreferThis":"Choose this endpoint when you need OpenAI-compatible chat completions backed by Google Gemini models and want to pay per-request in USDC with an on-chain receipt — ideal for crypto-native agents, Web3 applications, or any workflow requiring auditable micropayment records per LLM inference. Prefer it over direct Google AI APIs when you need provider neutrality, stablecoin billing, or durable blockchain receipts without managing API keys per provider.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:31:00.023Z","isFirstParty":false}