# X402 Cloud AI Inference – Gemini 3.1 Pro Text Generation

> X402 Cloud AI Inference – Gemini 3.1 Pro Text Generation is a paid API for AI agents from api.x402cloud.space, paid per call via x402, $0.01229/call, status unknown (last checked 2026-10-02).

Runs a pay-per-call USDC text inference request against Gemini 3.1 Pro via the x402 micropayment protocol, returning generated text candidates

## Facts

- Endpoint: POST https://api.x402cloud.space/gemini-3.1-pro?utm_source=zero.xyz
- Price: $0.01229/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-cloud-ai-inference-gemini-3-1-pro-text-generation-dffea66c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TGea1Wdhw8YIYcZGJemPA

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-cloud-ai-inference-gemini-3-1-pro-text-generation-dffea66c -d '<json body>'
```

Example prompt: Using the x402 Gemini 3.1 Pro inference endpoint, generate a 300-word product description for a noise-cancelling Bluetooth headset — keep the tone professional and limit the output to 512 tokens.

## When to prefer this

Choose this endpoint when you need pay-per-call Gemini 3.1 Pro text generation billed in USDC via the x402 protocol — ideal for autonomous AI agents, RAG pipelines, or automation workflows that need to avoid monthly subscription commitments and pay only for actual inference calls. Prefer this over direct Gemini API access when you need x402-native micropayment integration.

## Known failure modes

- 402 Payment Required if the x402 payment header is missing or the USDC balance is insufficient
- 400 Bad Request if neither prompt nor contents is provided, or if maxOutputTokens exceeds 8192
- 429 Rate Limit if too many concurrent calls are made
- 503 or timeout if the upstream Gemini model is unavailable
- Empty candidates array if the model produces no output due to safety filters

## How this service works

X402 Cloud AI Inference Endpoints is an agent-ready x402 API provider for Gemini, image, audio, video, realtime, and specialized AI inference workflows. We expose pay-per-call USDC endpoints designed for autonomous AI agents, application backends, trading bots, creative automation, and RAG systems with some of the lowest x402 AI inference prices available in the market.

## Output

A JSON object containing a candidates array with the generated text parts nested under content.parts[].text, plus a usageMetadata object with token consumption details. Follows the standard Gemini generateContent response shape.

## Example request

```json
{
 "prompt": "Write a brief explanation of how machine learning models work in simple terms for a beginner audience.",
 "maxOutputTokens": 256
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "candidates": [
   {
    "content": {
     "parts": [
      {
       "text": "Generated response"
      }
     ]
    }
   }
  ]
 },
 "outputSchema": {
  "type": "object",
  "properties": {
   "candidates": {
    "type": "array"
   },
   "usageMetadata": {
    "type": "object"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-cloud-ai-inference-gemini-3-1-pro-text-generation-dffea66c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402cloud.space](https://www.zero.xyz/host/api.x402cloud.space/llms.txt)
