{"uid":"cap_4C34h6p6WSg1ajLzXxYVq","slug":"agent402-gemini-api-proxy-f666fbfc","name":"Agent402 Gemini API Proxy","description":"Google's native generateContent wire on the base tier. Send Gemini's own request shape (contents, systemInstruction, generationConfig, function declarations) and get Gemini's own response shape (candidates, usageMetadata) back. Point a Google GenAI SDK at this gateway and pay per request with USDC, no account. Also answers the Google-shaped path /v1beta/models/<model>:generateContent.","url":"https://agent402.tools/v1/gemini?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional; the Google-shaped path carries it (/v1beta/models/<model>:generateContent)"},"tools":{"type":"array","description":"[{functionDeclarations:[{name, description, parameters}]}]"},"contents":{"type":"array","description":"Gemini turns: [{role, parts:[{text}|{inlineData}]}]"},"generationConfig":{"type":"object","description":"maxOutputTokens, temperature, topP, stopSequences, responseMimeType, responseSchema"},"systemInstruction":{"type":"object","description":"Optional system turn: {parts:[{text}]}"}}},"responseSchema":{"type":"json","example":{"candidates":[{"index":0,"content":{"role":"model","parts":[{"text":"x402 is an HTTP-native way for agents to pay per request with USDC."}]},"finishReason":"STOP"}],"modelVersion":"google/gemini-3.5-flash-lite","usageMetadata":{"totalTokenCount":32,"promptTokenCount":14,"candidatesTokenCount":18}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NK4ZzNe1Zru7Q07f56P4T","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Proxies requests to Google Gemini language models via pay-per-call x402 micropayments — no signup or API keys required","exampleAgentPrompt":"Send this multi-turn conversation to Gemini 2.5 Flash and get a response — system instruction is 'You are a helpful assistant', user says 'Explain what x402 is in one sentence', and use up to 200 output tokens.","exampleUseCases":[{"title":"Keyless Gemini for autonomous agent","prompt":"I'm building an AI agent that needs to call Gemini without managing API keys — send the user message 'What is the capital of France?' to Gemini 2.5 Flash with a system instruction saying you are a concise assistant and return the answer."},{"title":"Structured JSON output from Gemini","prompt":"Use Gemini to extract a structured response from this text: 'John Smith, age 34, lives in Austin TX' — set responseMimeType to application/json and use a schema with fields name, age, and city."},{"title":"Gemini tool-calling in agentic pipeline","prompt":"Call Gemini with function calling enabled — declare a tool called get_weather with parameters location and unit, send the user message 'What's the weather in Tokyo?', and return whatever function call Gemini decides to make."}],"resultDescription":"Returns a Gemini-format JSON response containing an array of candidates, each with a content object (role: model, parts with text), a finishReason (e.g. STOP), the modelVersion string, and usageMetadata showing promptTokenCount, candidatesTokenCount, and totalTokenCount.","failureModes":["Payment not attached or insufficient USDC — returns HTTP 402 requiring x402 payment","Invalid model path or unsupported model name — returns error from upstream Gemini","Malformed contents array (missing role or parts) — upstream validation error","Token limit exceeded for input — finishReason may be MAX_TOKENS","Tool declaration schema malformed — function calling may fail silently or error","Rate limit or quota exhaustion on upstream Google endpoint — 429 or 503 propagated"],"whenToPreferThis":"Choose this endpoint when you need to call Google Gemini (especially Gemini 2.5 Flash) without a Google API key or account, want to pay per call in USDC via x402 micropayments, are building an autonomous agent that needs LLM access with no pre-registration, or want native Gemini API compatibility (same request/response shape) with metered billing. Prefer this over OpenAI-compatible endpoints when you specifically need Gemini's multimodal input format, structured output with responseSchema, or Gemini's native tool/function-calling interface.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:17:33.440Z","isFirstParty":false,"canonicalSlug":"agent402-gemini-api-proxy-f666fbfc"}