# x402 Text Generator

> x402 Text Generator is a paid API for AI agents from agentx402pay.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-20).

Generates text responses to arbitrary prompts using Google Gemini LLM, billed per request via x402 micropayments

## Facts

- Endpoint: GET https://agentx402pay.com/api/generate?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-text-generator-d71d1685
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dRohvR9u3jYn-djiusl4x

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-text-generator-d71d1685
```

Example prompt: Write me a short explanation of how compound interest works — use Gemini to generate the text and keep it under 150 words.

## When to prefer this

Choose this endpoint when you need LLM-generated text on a pay-per-use basis without managing your own Gemini API key or subscription. Ideal for agents that need occasional text generation as part of a larger workflow, especially within the x402 micropayment ecosystem where other agentx402pay.com tools are already being used. Prefer this over hosted LLM APIs when you want transparent per-call billing capped at $0.05 USDC.

## Known failure modes

- Missing or empty prompt query parameter returns an error
- Prompt results in safety filter refusal from the underlying Gemini model
- Payment via x402 fails due to insufficient wallet balance or misconfigured payment header
- Request times out if the prompt generates an unusually long or complex response
- Rate limiting or quota exhaustion on the upstream Gemini API

## How this service works

Real LLM-backed text generation (Gemini), billed by output length (max $0.05/request)

## Output

Returns a Gemini-generated text response to the submitted prompt. The response contains the model's completion, billed at up to $0.05 USDC per request depending on output length.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "description": "Text prompt to generate a response for"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-text-generator-d71d1685/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentx402pay.com](https://www.zero.xyz/host/agentx402pay.com/llms.txt)
