# Coinlight Data Encoding Converter

> Coinlight Data Encoding Converter is a paid API for AI agents from coinlight-app.vercel.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-29).

Converts data between UTF-8, hex, base64, and base58 encodings in a single API call.

## Facts

- Endpoint: GET https://coinlight-app.vercel.app/p/encode?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coinlight-data-encoding-converter-5103d0c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UG41jJP_htvKyg97rkiJS

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 coinlight-data-encoding-converter-5103d0c9
```

Example prompt: Can you convert the string 'hello' from UTF-8 to base58? I need it in Solana's encoding format.

## When to prefer this

Choose this endpoint when you need lightweight, stateless encoding conversion between the four formats supported (utf8, hex, base64, base58) — especially when working with Solana keys or signatures that use base58. Prefer it over local code-based solutions when operating in an agent context without access to crypto libraries, or when working within the Coinlight ecosystem alongside Solana/EVM blockchain tools.

## Known failure modes

- Invalid 'from' or 'to' encoding value (not one of utf8/hex/base64/base58) — likely 400 error
- Data string that is not valid in the declared source encoding (e.g. malformed hex or base58) — may return error or garbled output
- Missing required 'data', 'from', or 'to' query parameters — validation error
- Payment failure or expired x402 token — 402 response

## How this service works

Coinlight charges USDC per API call with the x402 protocol on Solana and Base.

## Output

Returns a JSON object containing the converted/encoded output string and a label identifying the endpoint (e.g. 'Base58 / base64 / hex encoder'). The agent receives the re-encoded form of the input data in the requested target format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "examples": [
      {
       "to": "base58",
       "data": "hello",
       "from": "utf8"
      }
     ],
     "required": [
      "data",
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "enum": [
        "utf8",
        "hex",
        "base64",
        "base58"
       ],
       "type": "string",
       "description": "Target encoding."
      },
      "data": {
       "type": "string",
       "description": "Input data."
      },
      "from": {
       "enum": [
        "utf8",
        "hex",
        "base64",
        "base58"
       ],
       "type": "string",
       "description": "Encoding of data."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "endpoint": "Base58 / base64 / hex encoder"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coinlight-data-encoding-converter-5103d0c9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from coinlight-app.vercel.app](https://www.zero.xyz/host/coinlight-app.vercel.app/llms.txt)
