# x402engine Gemini 2.0 Flash LLM API

> x402engine Gemini 2.0 Flash LLM API is a paid API for AI agents from x402engine.app, paid per call via x402, $0.006577/call, status unknown (last checked 2026-10-28).

Calls Google's Gemini 2.0 Flash multimodal LLM with a 1M-token context window via a pay-per-call micropayment endpoint

## Facts

- Endpoint: POST https://x402engine.app/api/llm/gemini-3.6-flash?utm_source=zero.xyz
- Price: $0.006577/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-gemini-2-0-flash-llm-api-c59f0c4c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KmK-1TgeI-XSFEHlrkGXR

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 x402engine-gemini-2-0-flash-llm-api-c59f0c4c -d '<json body>'
```

Example prompt: Use the Gemini Flash model to summarize the following 500-page research paper text and extract the top 5 key findings — it needs a large context window to handle the full document at once.

## When to prefer this

Choose this endpoint when you need fast Gemini Flash inference without managing a Google Cloud account or API keys, especially for tasks requiring a very large context window (up to 1M tokens). Ideal for AI agents that operate on a pay-per-call basis using USDC micropayments via the x402 protocol, avoiding subscription overhead for sporadic or variable workloads.

## Known failure modes

- Insufficient USDC balance causes HTTP 402 payment required error
- Prompt exceeds 1M token limit resulting in context length error
- Invalid or malformed request body returns 400 bad request
- Model temporarily unavailable returns 503 service unavailable
- Payment facilitator network congestion causes timeout

## How this service works

Google's latest fast multimodal model with a 1M-token context window

## Output

Returns a text completion or multimodal response from Google's Gemini 2.0 Flash model, including the generated content and any structured output depending on the prompt. The model supports up to 1M tokens of context, making it suitable for very long documents or multi-turn histories.

## 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)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "google/gemini-3.6-flash",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello!"
    },
    "finish_reason": "stop"
   }
  ],
  "content": "Hello!"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402engine-gemini-2-0-flash-llm-api-c59f0c4c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402engine.app](https://www.zero.xyz/host/x402engine.app/llms.txt)
