# Gemini 2.5 Flash LLM via x402 Gateway

> Gemini 2.5 Flash LLM via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.009000/call, status unknown (last checked 2026-10-12, last successful call 2026-06-13).

Send a chat message to Google's Gemini 2.5 Flash model and receive a generated text response, billed per call via x402 micropayment

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/llm/gemini-flash?utm_source=zero.xyz
- Price: $0.009000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Last successful call: 2026-06-13
- Success rate: 100% of calls made through Zero
- Rating: 4.8 / 5 from 2 reviews
- Activations on Zero: 62
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-a5827205
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ugD5KG83NiYtGq-VZqFap

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-gateway-production-up-railway-app-a5827205 -d '<json body>'
```

Example prompt: Ask Gemini Flash to explain how transformer neural networks work — something thorough but not too long.

## When to prefer this

Choose this endpoint when you need a fast, cost-efficient LLM for everyday text generation, Q&A, summarization, or reasoning tasks and want a balance between speed and quality. Prefer over GPT-4 class models when latency and cost matter more than top-tier reasoning. Prefer over GPT-5 tiers when you want Google's model characteristics. Best for high-volume agentic workflows where per-call cost must stay low.

## Known failure modes

- Insufficient x402 payment or missing payment header returns 402 Payment Required
- Malformed messages array (missing role or content) returns 400 Bad Request
- Upstream Google/OpenRouter API unavailability returns 502 or 503
- Rate limiting or quota exceeded on upstream provider returns 429
- Empty or null content in messages returns validation error

## How this service works

Google's fast model — great balance of speed, quality, and cost for everyday tasks

## Output

Returns a JSON object containing the generated text content from Gemini 2.5 Flash, along with detailed token usage (prompt tokens, completion tokens, total tokens), upstream inference cost breakdown in USD, and the model identifier. The response mirrors the structure of a standard LLM chat completion.

## Example request

```json
{
 "messages": [
  {
   "role": "user",
   "content": "What is artificial intelligence?"
  }
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "messages"
     ],
     "properties": {
      "seed": {
       "type": "integer",
       "description": "Model-supported seed; see /docs/llm-capabilities.md."
      },
      "stop": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "array",
         "items": {
          "type": "string"
         },
         "maxItems": 4
        }
       ],
       "description": "Model-supported stop; see /docs/llm-capabilities.md."
      },
      "tools": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "function"
        ],
        "properties": {
         "type": {
          "enum": [
           "function"
          ],
          "type": "string"
         },
         "function": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "strict": {
            "type": "boolean"
           },
           "parameters": {
            "type": "object"
           },
           "description": {
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Client-executed function definitions; return results using role=tool and tool_call_id."
      },
      "top_p": {
       "type": "number",
       "description": "Model-supported top_p; see /docs/llm-capabilities.md."
      },
      "stream": {
       "type": "boolean",
       "description": "Return live OpenAI-compatible SSE after payment settlement."
      },
      "plugins": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "pdf"
        ],
        "properties": {
         "id": {
          "enum": [
           "file-parser"
          ],
          "type": "string"
         },
         "pdf": {
          "type": "object",
          "properties": {
           "engine": {
            "enum": [
             "native"
            ],
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Optional native PDF parser only; automatically enabled for file inputs."
      },
      "messages": {
       "type": "arra
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-a5827205/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production.up.railway.app](https://www.zero.xyz/host/x402-gateway-production.up.railway.app/llms.txt)
