# X Pay Text Rewrite API

> X Pay Text Rewrite API is a paid API for AI agents from www.api-xpay.com, paid per call via x402, $10/call, status unknown (last checked 2026-10-02).

Rewrites and improves submitted text using AI, paid per-request via x402 USDC on Base.

## Facts

- Endpoint: POST https://www.api-xpay.com/x402/rewrite?utm_source=zero.xyz
- Price: $10/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-pay-text-rewrite-api-a9cff849
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uNBg0GatFTFKYaNBKnOag

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 x-pay-text-rewrite-api-a9cff849 -d '<json body>'
```

Example prompt: Rewrite this text to sound more polished and professional using the X Pay text rewrite API: 'our product is good and people like it a lot and you should buy it today'.

## When to prefer this

Choose this endpoint when you need lightweight, pay-per-use text rewriting without a subscription, especially in autonomous agent workflows that already handle x402/USDC micropayments on Base. Ideal when you want to avoid API key management and pay only for what you use.

## Known failure modes

- Payment not received or insufficient USDC balance — 402 error returned
- Missing required fields (type, method, bodyType, body) — validation error
- Invalid bodyType enum value — request rejected
- Empty or malformed body object — unclear rewrite output
- Network congestion on Base causing payment settlement delay

## How this service works

AI rewrite of input text

## Output

Returns a JSON object containing a 'rewritten' field with the improved version of the submitted text, along with 'success' boolean, 'asset' (USDC), and 'network' (base) fields confirming the payment was processed on Base via USDC.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset": "USDC",
  "network": "base",
  "success": true,
  "rewritten": "Create this text sound better."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-pay-text-rewrite-api-a9cff849/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.api-xpay.com](https://www.zero.xyz/host/www.api-xpay.com/llms.txt)
