# 24KLabs Base64/Hex/URL Codec

> 24KLabs Base64/Hex/URL Codec is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Encode or decode strings across base64, base64url, hex, and URL/percent-encoding formats.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/base64-hex-codec
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24klabs-base64-hex-url-codec-8dd4ef53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YLnYo251MXBGgpdMHrd86

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 24klabs-base64-hex-url-codec-8dd4ef53 -d '<json body>'
```

Example prompt: Can you decode this base64url string for me: 'aGVsbG8td29ybGQ'? I want to see the original plain text.

## When to prefer this

Choose this endpoint when you need a quick, reliable server-side encoding or decoding transformation across base64, base64url, hex, or URL/percent-encoding — especially useful in agentic workflows where you cannot run client-side code, need consistent cross-format conversion, or are chaining with other 24KLabs utilities on the same platform.

## Known failure modes

- Invalid input string for the chosen decode operation (e.g. non-base64 characters in base64 decode) — returns an error
- Unsupported encoding format specified — returns a validation error
- Malformed request body missing required fields — returns 400-level error

## How this service works

Encode or decode a string across base64, base64url, hex, and URL/percent encoding.

## Output

Returns the transformed string in the requested output encoding format (e.g. a base64-encoded string, a decoded UTF-8 string, hex digits, or percent-encoded text), along with metadata about the operation performed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "op": {
   "type": "string"
  },
  "input": {
   "type": "string"
  },
  "alphabet": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "aGVsbG8gd29ybGQ="
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24klabs-base64-hex-url-codec-8dd4ef53/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
