{"uid":"cap_vSUllZJr1m47NNz8wmrLU","slug":"google-gemini-via-locus-x402-668d40a5","name":"Google Gemini via Locus x402","description":"Multimodal AI — chat, vision, PDF/document processing, thinking/reasoning, and embeddings.","url":"https://gemini.x402.paywithlocus.com/gemini/chat?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"topK":{"type":"number"},"topP":{"type":"number"},"model":{"type":"string"},"contents":{"type":"array","items":{"type":"object","required":["parts"],"properties":{"role":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"fileData":{"type":"object","required":["mimeType","fileUri"],"properties":{"fileUri":{"type":"string"},"mimeType":{"type":"string"}},"additionalProperties":true},"inlineData":{"type":"object","required":["mimeType","data"],"properties":{"data":{"type":"string"},"mimeType":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}},"additionalProperties":true}},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["user","model"]},"parts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"fileData":{"type":"object","required":["mimeType","fileUri"],"properties":{"fileUri":{"type":"string"},"mimeType":{"type":"string"}},"additionalProperties":true},"inlineData":{"type":"object","required":["mimeType","data"],"properties":{"data":{"type":"string"},"mimeType":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},"content":{"type":"string"}},"additionalProperties":true}},"thinking":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"temperature":{"type":"number"},"stopSequences":{"type":"array","items":{"type":"string"}},"maxOutputTokens":{"type":"number"},"responseMimeType":{"type":"string"},"systemInstruction":{"type":"string"},"responseJsonSchema":{"type":"object","additionalProperties":true}}},"responseSchema":{"type":"json","example":{"data":{},"payment":{"scheme":"exact","settledUsdc":"0.001000","authorizedMaxUsdc":"0.001000"},"request":{"id":"00000000-0000-4000-8000-000000000000","statusUrl":"/requests/00000000-0000-4000-8000-000000000000"},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IBofD7n4qUU_AJOn2ghhc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calls Google Gemini multimodal AI models (chat, vision, PDF/document processing, structured output, and reasoning) via a pay-per-call x402 micropayment gateway.","exampleAgentPrompt":"Use Gemini 2.5 Flash with thinking enabled to analyze this scanned invoice PDF and extract the vendor name, total amount, and line items as structured JSON — here's the base64-encoded PDF data.","exampleUseCases":[{"title":"PDF invoice data extraction","prompt":"I have a base64-encoded PDF of a supplier invoice — use Gemini 2.5 Flash to pull out the vendor name, invoice number, date, and total amount as structured JSON."},{"title":"Multi-turn customer support reasoning","prompt":"I'm building a customer support bot — send this conversation history to Gemini 2.5 Pro with a system prompt saying 'You are a helpful support agent for a SaaS product' and get a reply for the user's latest message: 'My subscription didn't renew even though my card is on file.'"},{"title":"Image scene description for accessibility","prompt":"Describe this product photo in detail for an accessibility caption — send the image as inline base64 data to Gemini 2.0 Flash and return a plain-text description in two sentences."}],"resultDescription":"Returns a JSON object with a `data` field containing the Gemini model's response (text or structured JSON depending on responseMimeType), a `success` boolean, a `payment` object showing settled and authorized USDC amounts, and a `request` object with a unique request ID and a status URL for async tracking.","failureModes":["Insufficient USDC balance or failed x402 payment results in a 402 Payment Required error","Invalid Gemini model ID returns a 400 or model-not-found error","Malformed contents/messages array causes a 400 validation error","Base64-encoded inline image or PDF data that is corrupted or has wrong mimeType causes Gemini to return an error","Exceeding maxOutputTokens limit truncates the response","Providing both `contents` and `messages` fields simultaneously may cause ambiguous input handling","Requesting structured JSON output without setting responseMimeType to application/json returns plain text instead of parsed JSON"],"whenToPreferThis":"Choose this endpoint when you need to call Google Gemini models (Flash, Pro, or preview variants) with flexible multimodal input — especially for vision tasks, PDF/document extraction, structured JSON output with schema enforcement, or extended thinking/reasoning — and want pay-per-call micropayment billing via x402 without managing API keys or subscriptions. Prefer this over OpenAI-based endpoints when Gemini's long-context, native PDF handling, or reasoning budget controls are specifically needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:32:12.763Z","isFirstParty":false,"canonicalSlug":"google-gemini-via-locus-x402-668d40a5"}