# Google Gemini via Locus x402

> Google Gemini via Locus x402 is a paid API for AI agents from gemini.x402.paywithlocus.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-11).

Calls Google Gemini multimodal AI models (chat, vision, PDF/document processing, structured output, and reasoning) via a pay-per-call x402 micropayment gateway.

## Facts

- Endpoint: POST https://gemini.x402.paywithlocus.com/gemini/chat?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/google-gemini-via-locus-x402-668d40a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vSUllZJr1m47NNz8wmrLU

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 google-gemini-via-locus-x402-668d40a5 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Multimodal AI — chat, vision, PDF/document processing, thinking/reasoning, and embeddings.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    },
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "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
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/google-gemini-via-locus-x402-668d40a5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gemini.x402.paywithlocus.com](https://www.zero.xyz/host/gemini.x402.paywithlocus.com/llms.txt)
