# agent402.tools Base Encoding Detector

> agent402.tools Base Encoding Detector is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Auto-detects the encoding format of a string (base64, base32, hex, binary, decimal, or plain text) and returns confidence scores with decoded previews for each candidate format.

## Facts

- Endpoint: POST https://agent402.tools/api/base-detect
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-base-encoding-detector-8ec55aba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ylxHzfC6tzwxrX4zzcMA_

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 agent402-tools-base-encoding-detector-8ec55aba -d '<json body>'
```

Example prompt: Can you figure out what encoding format this string is using and show me a decoded preview: 'SGVsbG8gV29ybGQ='?

## When to prefer this

Use this endpoint when you have an unknown encoded string and need to determine its format before decoding or processing it further. Ideal for pipelines that receive encoded data from untrusted or varied sources where the encoding scheme is not specified. Prefer this over manual guessing or format-specific decoders when the encoding is ambiguous.

## Known failure modes

- Empty or missing 'text' field returns an error
- Strings that are ambiguous between formats may return multiple candidates with similar confidence scores
- Very short strings may yield low-confidence results across all formats
- Non-ASCII or binary-only input may fail to parse cleanly

## How this service works

Auto-detect the encoding format of a string: base64, base32, hex, binary, decimal, or plain text. Returns confidence scores and decoded preview for each candidate. Pure CPU, deterministic.

## Output

Returns a list of candidate encoding formats (base64, base32, hex, binary, decimal, plain text) each with a confidence score indicating likelihood and a decoded preview string showing what the data looks like when decoded under that format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "encoded string to identify"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "detected": "base64",
  "candidates": [
   {
    "format": "base64",
    "decoded": "Hello World",
    "confidence": 0.95
   },
   {
    "format": "hex",
    "confidence": 0.1
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-base-encoding-detector-8ec55aba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
