# x402 Text Generator

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

Generates AI-powered text insights from a prompt, billed by output length up to $0.05 per request via the x402 micropayment protocol

## Facts

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

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-5bc1749c
```

Example prompt: Generate an AI text insight about the concept of compound interest — keep it concise and interesting.

## When to prefer this

Choose this endpoint when you need lightweight, on-demand text generation billed by output length with no subscription required — ideal for agentic workflows that need occasional AI-written content without committing to a full LLM API contract. Prefer it over general LLM APIs when cost predictability per call and micropayment compatibility (x402/USDC) are priorities.

## Known failure modes

- Missing required 'prompt' query parameter returns a validation error
- Payment failure or insufficient USDC balance blocks request execution
- Empty or very short prompt may produce minimal or low-quality output
- Request exceeds $0.05 cap if output is very long, potentially truncating response
- Network timeout if the underlying generation model is slow to respond

## How this service works

Usage-based text generation, billed by output length (max $0.05/request)

## Output

Returns a JSON object containing the generated text string, the original prompt echoed back, and the number of billed characters — enabling downstream agents to track cost proportionally to 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"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Generated insight #1 about \"tell me something interesting\".",
  "prompt": "tell me something interesting",
  "billedCharacters": 62
 }
}
```

## More

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