# X402 Cloud AI Inference – Gemini generateContent

> X402 Cloud AI Inference – Gemini generateContent is a paid API for AI agents from api.x402cloud.space, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-26).

Generates text content using a specified Gemini model via a pay-per-call x402 USDC endpoint

## Facts

- Endpoint: POST https://api.x402cloud.space/v1beta/models/%7Bmodel_name%7D:generateContent?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-26
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-cloud-ai-inference-gemini-generatecontent-9ffe3162
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cR3ItfZ704OnsFaD9DB4v

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-generatecontent-9ffe3162 -d '<json body>'
```

Example prompt: Using the Gemini inference endpoint at X402 Cloud, generate a 300-token response to this prompt: 'Explain the concept of zero-knowledge proofs in simple terms' — use gemini-2.0-flash as the model.

## When to prefer this

Choose this endpoint when an autonomous AI agent needs to call Gemini for text generation using USDC micropayments via the x402 protocol, without requiring a Google API key or monthly subscription. Ideal for agentic pipelines, RAG backends, and trading bots that need pay-per-call billing at low per-request cost ($0.003 USDC).

## Known failure modes

- 402 Payment Required if USDC payment header is missing or insufficient
- Invalid model_name in URL path returns 404 or model-not-found error
- Prompt exceeds 32,000 character limit returns validation error
- maxOutputTokens above 8192 returns parameter out-of-range error
- Empty or missing prompt/contents returns bad request error
- Network timeout if model inference takes too long under load

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

Returns a JSON object with a candidates array containing the model's generated text parts, plus usageMetadata with token counts for input and output. The primary text output is found at candidates[0].content.parts[0].text.

## 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-generatecontent-9ffe3162/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)
