# URL Percent-Encoder and Decoder

> URL Percent-Encoder and Decoder is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Percent-encodes or decodes a string for safe use in URLs, converting special characters to and from their %XX representations.

## Facts

- Endpoint: POST https://twin.unykorn.org/encode-url?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-percent-encoder-and-decoder-81c146ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bpB8Rj4q0aBCUlnlh2WpY

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 url-percent-encoder-and-decoder-81c146ab -d '<json body>'
```

Example prompt: Percent-encode this string for me so I can safely embed it in a URL: 'hello world & café = 100%'.

## When to prefer this

Choose this endpoint when you need a pay-per-call, serverless percent-encoding or decoding operation with a blockchain payment receipt for auditability — particularly useful in agentic pipelines on the x402 network where on-chain receipts are required. For high-volume or free encoding needs, a local library function may be preferable; this endpoint is best when you need provable, receipted execution or are already operating within the UnyKorn/x402 ecosystem.

## Known failure modes

- Text input exceeds 49,152 character limit — request rejected
- Malformed or missing 'text' field in params — validation error
- Payment failure via x402 protocol — 402 response, no result returned
- Network timeout reaching twin.unykorn.org — connection error

## How this service works

Percent-encode and decode a string for URLs — Genesis402 / UnyKorn Operator Network

## Output

A JSON object with an 'ok' boolean, the transformation type ('encode-url'), the encoded or decoded result string, and a payment receipt containing the transaction hash, USD amount charged, and a unique receipt ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "text": {
     "type": "string",
     "maxLength": 49152
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "encode-url",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.001,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-percent-encoder-and-decoder-81c146ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
