{"uid":"cap_GjeKUKTG-9s1f5ml7gTkL","slug":"x402-tokens-gemini-2-5-flash-chat-completions-00ece96b","name":"x402-tokens Gemini 2.5 Flash Chat Completions","description":"google/gemini-2.5-flash — ceiling; reconciled to actual cost after the call, at 2026-09-10T03:20:45.668Z","url":"https://x402-tokens.fly.dev/v1/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.000405","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.000405/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.000405","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.000405","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JY1nP2NFWaOjw5JyzRf7x","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.000405","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Proxies chat completion requests to Google's Gemini 2.5 Flash model with per-call micropayment billing via x402, reconciled to actual token cost","exampleAgentPrompt":"Send this conversation to Gemini 2.5 Flash and get a response: 'You are a helpful assistant. User: Summarize the key differences between transformer and RNN architectures in three bullet points.'","exampleUseCases":[{"title":"Agent reasoning with Gemini Flash","prompt":"Use Gemini 2.5 Flash to analyze this customer support ticket and suggest the best resolution category and a draft reply: 'My order #4821 arrived damaged and I need a refund or replacement.'"},{"title":"Pay-per-call LLM for content drafting","prompt":"Send this to Gemini 2.5 Flash and return the result: system prompt is 'You are a professional copywriter', user message is 'Write a 3-sentence product description for a bamboo travel mug that keeps drinks hot for 12 hours.'"},{"title":"Automated summarization pipeline","prompt":"Run this through Gemini 2.5 Flash — I need a concise TL;DR of the following research abstract for a newsletter: [paste abstract here]. Keep it under 50 words."}],"resultDescription":"Returns an OpenAI-compatible chat completion JSON response with the generated assistant message, token usage counts (prompt tokens, completion tokens, total tokens), finish reason, and model metadata. Billing is reconciled to actual token cost after the call.","failureModes":["Payment failure or insufficient USDC balance returns 402 Payment Required","Invalid or malformed request body returns 400 Bad Request","Upstream Gemini API unavailability returns 502 or 503","Rate limiting from upstream model provider returns 429","Token limit exceeded for input returns an error with details","Network timeout if the generated response is very long"],"whenToPreferThis":"Choose this endpoint when you need access to Google Gemini 2.5 Flash without managing a Google API key, want pay-per-call billing in USDC with no monthly subscription, are building an agent that uses the x402 payment protocol natively, or need an OpenAI-compatible chat completions interface backed by Gemini. Prefer over self-managed Google API access when you want usage-based micropayment reconciliation and minimal setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:34:35.601Z","isFirstParty":false}