# X402 Cloud AI Inference - Gemini Stream Generate Content

> X402 Cloud AI Inference - Gemini Stream Generate Content 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).

Streams AI-generated text responses from Gemini models via pay-per-call USDC micropayment using the x402 protocol

## Facts

- Endpoint: POST https://api.x402cloud.space/v1beta/models/%7Bmodel_name%7D:streamGenerateContent?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-stream-generate-content-dae3a2f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vpSEWeC-r0jDOr_OM770J

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-stream-generate-content-dae3a2f4 -d '<json body>'
```

Example prompt: Use Gemini via x402Cloud to stream a response to this prompt: 'Explain the concept of zero-knowledge proofs in simple terms' — cap the output at 512 tokens.

## When to prefer this

Choose this endpoint when your AI agent or backend needs pay-per-call Gemini inference without a Google API subscription, especially in autonomous agent pipelines, trading bots, or RAG systems that benefit from x402 USDC micropayments and streaming output rather than polling.

## Known failure modes

- 402 Payment Required if USDC payment header is missing or insufficient
- Invalid model_name in path returns 404 or 400
- Prompt exceeding 32000 characters returns validation error
- maxOutputTokens above 8192 returns schema validation error
- Empty or missing prompt/contents field returns 400 bad request
- Network timeout on long streaming responses

## 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 streaming JSON response containing an array of candidates, each with content parts holding generated text, plus usageMetadata with token counts. The response mirrors the Gemini generateContent API format.

## 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-stream-generate-content-dae3a2f4/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)
