# SiteCheck Encode/Decode

> SiteCheck Encode/Decode is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-04).

Encodes or decodes a string using a specified scheme such as base64, hex, URL, HTML, punycode, or quoted-printable

## Facts

- Endpoint: POST https://api.sitecheck-api.workers.dev/api/encode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-encode-decode-82a8e04c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IzSn6WK8td8wF5GuNSoJw

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 sitecheck-encode-decode-82a8e04c -d '<json body>'
```

Example prompt: Can you encode the string 'Hello World & Co.' to HTML encoding using SiteCheck's encode endpoint?

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call encoding or decoding operation without setting up a local library, especially for schemes like punycode (internationalized domain names), quoted-printable (email), or any of the supported formats in a serverless agent workflow.

## Known failure modes

- Unsupported scheme value returns an error
- Missing 'input' field results in a validation error
- Invalid direction value (not 'encode' or 'decode') may return an error
- Malformed input for a given scheme (e.g. invalid base64 when decoding) may return an error or garbled output

## How this service works

Encode or decode text as base64, base64url, hex, URL (percent) encoding, HTML entities, punycode (domain names) or quoted-printable. Body { input, scheme, direction }, up to 1 MB. Invalid input to decode is a 400 that names the position of the first bad character. Unknown HTML entities are reported, not guessed. Pure code, no outside request.

## Output

Returns a JSON object containing the transformed output string, the scheme used, the direction (encode or decode), a source note indicating the computation method, and a checkedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "The text to encode or decode (JSON body field)"
  },
  "scheme": {
   "type": "string",
   "description": "base64, base64url, hex, url, html, punycode or quoted-printable"
  },
  "direction": {
   "type": "string",
   "description": "encode (default) or decode"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "output": "xn--bcher-kva.de",
  "scheme": "punycode",
  "source": "Computed here (pure code)",
  "checkedAt": "2026-10-15T14:07:52.199Z",
  "direction": "encode"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-encode-decode-82a8e04c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.sitecheck-api.workers.dev](https://www.zero.xyz/host/api.sitecheck-api.workers.dev/llms.txt)
