{"uid":"cap_nwc66EU2RHu866FA1mOGe","slug":"model-access-gateway-gemini-2-0-flash-chat-completions-x402-e881580d","name":"Model Access Gateway – Gemini 2.0 Flash Chat Completions (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://modelaccessgateway.com/llm/gemini-3.8-flash?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional: fixed by the route (google/gemini-3.8-flash)"},"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.8-flash","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_1lzEC0guMuTaYKu2mBYil","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":"OpenAI-compatible chat completions via Google Gemini 2.0 Flash, paid per call in USDC on Base using the x402 protocol — no account or API key required.","exampleAgentPrompt":"Send this conversation to Gemini Flash — system prompt 'You are a helpful assistant', user message 'Summarize the benefits of compound interest in three bullet points' — keep the response under 300 tokens and pay the $0.0014 USDC fee per call.","exampleUseCases":[{"title":"Anonymous AI chat for privacy-focused app","prompt":"I need to call a fast Gemini model from my app without registering for a Google API key — just send the user's message 'What are the top 5 programming languages in 2025?' as a user turn and pay per call in USDC."},{"title":"Structured JSON output extraction","prompt":"Ask Gemini Flash to extract the company name, date, and total amount from this invoice text, and return the result as JSON — set response_format to json and keep max_tokens at 512."},{"title":"Streaming real-time AI assistant response","prompt":"Stream a Gemini Flash reply to the user's question 'Explain quantum entanglement simply' so I can display tokens as they arrive — enable streaming and use a temperature of 0.7."}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's message content, finish reason (e.g. 'stop'), token usage breakdown (prompt, completion, total), model name, completion ID, and created timestamp. If streaming is enabled, server-sent events are returned token by token after the x402 payment is processed. If the model fails, an automatic USDC refund is issued.","failureModes":["Insufficient USDC balance or x402 payment failure — call rejected before inference runs","Model unavailable or overloaded — automatic refund issued, no content returned","Invalid messages array (empty or missing role field) — 400 validation error","max_tokens exceeds 16384 — rejected with schema validation error","Temperature out of range (0–2) — parameter rejected","Malformed response_format object — may cause generation error or unexpected output"],"whenToPreferThis":"Choose this endpoint when you need fast, cheap Gemini Flash inference without any Google account, API key, or subscription — ideal for autonomous agents that hold USDC on Base and want per-call micropayment billing via x402. Prefer it over standard Google AI Studio or OpenAI when you want anonymous, accountless access, crypto-native payment, and OpenAI SDK compatibility. The automatic refund on model failure makes it low-risk for automated pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:35:14.396Z","isFirstParty":false,"canonicalSlug":"model-access-gateway-gemini-2-0-flash-chat-completions-x402-e881580d"}