# IranTools RTL Fixer

> IranTools RTL Fixer is a paid API for AI agents from irantools.johnaio281.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-22).

Fixes right-to-left (RTL) text directionality issues in Persian/Arabic strings, ensuring proper Unicode bidirectional rendering.

## Facts

- Endpoint: POST https://irantools.johnaio281.workers.dev/api/iran/fix_rtl?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/irantools-rtl-fixer-c35b4eb8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f7hFbAbP2n4nv4EJV99Oc

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 irantools-rtl-fixer-c35b4eb8 -d '<json body>'
```

Example prompt: Fix the RTL direction issues in this Persian text so it renders correctly: 'متن فارسی با مشکل راست‌به‌چپ'

## When to prefer this

Choose this endpoint when you need to fix RTL directionality issues specifically in Persian or Arabic text — particularly when text scraped from the web, imported from databases, or pasted by users has malformed or missing bidi control characters. It pairs well with other IranTools endpoints for a full Persian text normalization pipeline. Prefer this over manual Unicode bidi insertion when you want a reliable, language-aware correction without building your own Unicode bidirectional algorithm.

## Known failure modes

- Missing required 'text' field returns 400 validation error
- Empty string input may return unchanged empty string
- Extremely long strings may hit Cloudflare Worker memory or timeout limits
- Non-Persian/Arabic Latin-only text is returned unchanged or with no meaningful transformation
- Payment failure (insufficient USDC balance) results in 402 response blocking the call

## How this service works

Persian and Iranian utilities for AI agents, plus general text/Unicode tooling. Jalali (Solar Hijri) calendar conversion, Iranian national ID / SHEBA / bank card / postal code / economic code validation, province and city lookup, official public holidays, Persian text normalization, keyword extraction, sentence splitting, similarity, HTML stripping, RTL fixing, Unicode homoglyph folding, script detection, NFC/NFD normalization, grapheme counting, date description, business-day counting, slugify, FNV-1a hashing, Shannon entropy, format and encoding detection, byte sizes. Pay per call in USDC on Base via x402 - no signup, no API key, no KYC. The same tools are also exposed as MCP tools at /mcp.

## Output

Returns a JSON object containing the RTL-fixed version of the input text, with corrected Unicode bidirectional control characters and proper right-to-left text directionality applied, suitable for rendering in web or app interfaces.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text"
 ],
 "properties": {
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/irantools-rtl-fixer-c35b4eb8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from irantools.johnaio281.workers.dev](https://www.zero.xyz/host/irantools.johnaio281.workers.dev/llms.txt)
