# Inference402 Text Rewrite

> Inference402 Text Rewrite is a paid API for AI agents from inference402.worlddata402.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-19).

Rewrites input text into a specified tone (formal, casual, marketing, or simple) using Llama 3.3 70B, payable per-call in USDC via x402

## Facts

- Endpoint: GET https://inference402.worlddata402.workers.dev/v1/rewrite?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/inference402-text-rewrite-df4e4f68
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EDVp5FGDCGF5_rEY0sORS

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 inference402-text-rewrite-df4e4f68
```

Example prompt: Rewrite this customer support reply in a formal tone: 'Hey! Sorry stuff broke, we're on it and should have a fix pretty soon.'

## When to prefer this

Choose this endpoint when you need tone-controlled text rewriting without managing API keys or subscriptions — ideal for agents that need to pay per call in USDC via the x402 protocol. It is especially useful when you need one of four well-defined tones (formal, casual, marketing, simple) and optionally want output in a specific language. Prefer over hosted LLM APIs when you need permissionless, accountless, micropayment-based access.

## Known failure modes

- Text exceeds 4000 character limit — request rejected
- Invalid tone enum value — returns error
- Payment not settled in USDC on Base mainnet — 402 response blocks the call
- Malformed ISO 639-1 language code — may default or error
- Model latency spike causing timeout on long texts

## How this service works

Pay-per-call AI inference for agents: chat (Llama 3.3 70B / 3.1 8B), structured JSON, summarize, translate (incl. Egyptian Arabic), extract, classify, sentiment, keywords, rewrite, embeddings, moderation, vision and speech-to-text. USDC on Base mainnet over x402. No API key, no account.

## Output

Returns a JSON object containing the rewritten text in the requested tone, the tone label applied, and the model used (e.g. @cf/meta/llama-3.3-70b-instruct-fp8-fast).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lang": {
   "type": "string",
   "description": "ISO 639-1 output language; defaults to the input language"
  },
  "text": {
   "type": "string",
   "maxLength": 4000
  },
  "tone": {
   "enum": [
    "formal",
    "casual",
    "marketing",
    "simple"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "We are currently experiencing a service outage. Our team is working on a fix, which we expect within the hour.",
  "tone": "formal",
  "model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/inference402-text-rewrite-df4e4f68/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from inference402.worlddata402.workers.dev](https://www.zero.xyz/host/inference402.worlddata402.workers.dev/llms.txt)
