# X402 Cloud AI Text Generation (Gemini)

> X402 Cloud AI Text Generation (Gemini) 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-01).

Generates AI text responses via a pay-per-call x402 USDC endpoint backed by Google Gemini, accepting plain text prompts or structured contents arrays

## Facts

- Endpoint: GET https://api.x402cloud.space/generate?utm_source=zero.xyz
- Price: $0.01229/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-cloud-ai-text-generation-gemini-8608332a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IXfpXo4IR9THCF5n2TS1k

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-text-generation-gemini-8608332a
```

Example prompt: Using the x402Cloud Gemini endpoint, generate a concise product description for a standing desk called 'ErgoRise Pro' — keep the response under 200 tokens.

## When to prefer this

Choose this endpoint when you need pay-per-call Gemini text generation without a monthly subscription, especially for autonomous AI agents, trading bots, or RAG pipelines that require programmatic USDC micropayments via the x402 protocol. Prefer it over direct Google Gemini API when you need x402-native billing or when your agent stack already handles x402 payment headers.

## Known failure modes

- Payment not received or insufficient USDC — returns 402 Payment Required
- Prompt exceeds 32,000 character limit — validation error
- maxOutputTokens out of range (must be 1–8192) — parameter error
- Empty or missing prompt/contents — 400 Bad Request
- Model unavailable or overloaded — 503 Service Unavailable
- Malformed generationConfig object — 400 Bad Request

## 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, plus a usageMetadata object detailing token consumption for the call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Alias for prompt."
  },
  "prompt": {
   "type": "string",
   "maxLength": 32000,
   "minLength": 1,
   "description": "Plain text prompt for agent-friendly calls."
  },
  "contents": {
   "type": "array",
   "description": "Gemini generateContent contents array."
  },
  "maxOutputTokens": {
   "type": "integer",
   "default": 256,
   "maximum": 8192,
   "minimum": 1
  },
  "generationConfig": {
   "type": "object",
   "description": "Generation controls such as maxOutputTokens."
  }
 }
}
```

## 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-text-generation-gemini-8608332a/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)
