{"uid":"cap_AINSGMiMe0nF0cN1BGD0M","slug":"model-access-gateway-gemini-3-1-pro-via-x402-e4971a56","name":"Model Access Gateway – Gemini 3.1 Pro via x402","description":"LLM inference API: OpenAI-compatible chat completions for 136 AI models (Claude, GPT, Gemini, Grok, DeepSeek, Qwen, Kimi, GLM), paid per call in USDC on Base with x402. No account, no API key, automatic refund if the model fails.","url":"https://agent402-arb.rosariovitale0096.workers.dev/llm/gemini-3.1-pro?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional: fixed by the route (google/gemini-3.1-pro)"},"tools":{"type":"array"},"stream":{"type":"boolean","description":"true: server-sent events after payment"},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"role":{"enum":["system","user","assistant","tool","developer"],"type":"string"},"content":{"type":["string","array","null"]}}},"minItems":1},"max_tokens":{"type":"integer","maximum":16384,"minimum":1,"description":"Optional, default 4096"},"temperature":{"type":"number","maximum":2,"minimum":0},"response_format":{"type":"object"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-7f3c2a91","model":"google/gemini-3.1-pro","usage":{"total_tokens":10,"prompt_tokens":9,"completion_tokens":1},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"OK"},"finish_reason":"stop"}],"created":1791979200}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0014","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.0014/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0014","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0014","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dMZrUFe9m22yS-chluWFb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0014","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs OpenAI-compatible chat completions against Google Gemini 3.1 Pro, billed per-request in USDC on Base via x402 with no account or API key required.","exampleAgentPrompt":"Send the message 'Summarize the key differences between transformer and diffusion models in 3 bullet points' to Gemini 3.1 Pro and give me back the response — pay for it per-request in USDC, no API key needed.","exampleUseCases":[{"title":"Crypto-native AI agent reasoning","prompt":"I'm building an autonomous agent that needs to reason step-by-step about a task without me managing API subscriptions — send this chain-of-thought prompt to Gemini 3.1 Pro and pay per call in USDC: 'You are a planning agent. Break down the goal of launching a product into 5 concrete weekly milestones.'"},{"title":"On-demand document summarization","prompt":"Take this contract text and have Gemini 3.1 Pro summarize it into plain English bullet points: 'The parties agree to a 12-month exclusive licensing arrangement for the patent portfolio described in Exhibit A…' — bill it per request, no account setup."},{"title":"Permissionless AI chat for a dApp","prompt":"My decentralized app needs to answer user questions without me holding any AI provider API keys — send 'What is impermanent loss in DeFi liquidity pools?' to Gemini 3.1 Pro via the x402 micropayment gateway and return the assistant's answer."}],"resultDescription":"Returns an OpenAI-style chat.completion JSON object containing the assistant's message content, the model name (google/gemini-3.1-pro), token usage breakdown (prompt, completion, total), finish reason, and a unique completion ID and timestamp.","failureModes":["402 Payment Required if x402 USDC payment on Base is not attached or insufficient","Model name not found if the path is wrong or model unavailable","Malformed request body returns 400 if required fields (messages, etc.) are missing","Rate limiting or worker timeout on very long prompts","Incorrect OpenAI-compat schema (e.g. missing 'messages' array) causes parse error","Network errors from Cloudflare Workers edge node"],"whenToPreferThis":"Choose this endpoint when you need Gemini 3.1 Pro inference with zero account setup — ideal for autonomous agents or dApps that want to pay per-call in USDC via x402 on Base rather than managing API keys or subscriptions. Prefer it over direct Google AI Studio when you need a crypto-native, OpenAI-compatible interface with no monthly commitment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T17:46:21.724Z","isFirstParty":false,"canonicalSlug":"model-access-gateway-gemini-3-1-pro-via-x402-e4971a56"}