# x402engine Gemini 3.1 Pro LLM Endpoint

> x402engine Gemini 3.1 Pro LLM Endpoint is a paid API for AI agents from x402engine.app, paid per call via x402, $0.028883/call, status unknown (last checked 2026-10-12).

Sends a chat completion request to Google Gemini 3.1 Pro via a pay-per-call HTTP 402 micropayment API, returning an OpenAI-compatible response

## Facts

- Endpoint: POST https://x402engine.app/api/llm/gemini-3.1-pro?utm_source=zero.xyz
- Price: $0.028883/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-gemini-3-1-pro-llm-endpoint-f3adbc99
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1Kudr2lq8FxjdoxP8mwqV

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-3-1-pro-llm-endpoint-f3adbc99 -d '<json body>'
```

Example prompt: Ask Gemini 3.1 Pro: 'Explain the trade-offs between microservices and monolithic architectures in 3 bullet points' and pay the per-call fee with USDC on Base.

## When to prefer this

Choose this endpoint when you need Google Gemini 3.1 Pro specifically — not GPT-4 or Claude — and want to pay only per call without managing API keys or subscriptions. Ideal for agents that need an OpenAI-compatible interface with Gemini's multimodal capabilities (PDF, image, video, audio inputs), function calling, and optional streaming. Prefer this over self-managed Gemini API access when you want crypto micropayment billing (USDC on Base/Solana, USDm on MegaETH) and no upfront commitment.

## Known failure modes

- Payment not settled — HTTP 402 returned if USDC/USDm payment fails or is insufficient
- Invalid messages format — missing required 'messages' array or malformed role values causes validation error
- Model capability mismatch — using unsupported parameters (seed, stop, top_p) for this model variant
- Context length exceeded — very long message arrays or large file inputs may hit token limits
- Streaming failure — SSE stream may drop if network connection is interrupted after payment settlement
- Tool call format error — malformed function definitions in tools array cause rejection

## How this service works

125 production APIs behind HTTP 402 micropayments. 87 LLMs, Kling V3 and Hailuo video generation, image generation, code execution, travel search, web scraping, TTS, and transaction simulation. Pay with USDC on Base, USDm on MegaETH, or USDC on Solana.

## Output

Returns an OpenAI-compatible JSON object containing the model name ('google/gemini-3.1-pro-preview'), a choices array with the assistant message (role, content, finish_reason), and a top-level content field with the response text. Supports streaming SSE when stream=true.

## 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.1-pro-preview",
  "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-3-1-pro-llm-endpoint-f3adbc99/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)
