# CoCo Encode Tool

> CoCo Encode Tool is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Encodes input data (e.g. base64) and returns the encoded result as a JSON object

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/encode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-encode-tool-9dd9e262
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xE53ZGBPX7YYi9SPAFH0S

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 coco-encode-tool-9dd9e262
```

Example prompt: Can you base64 encode the text 'hello world' using the CoCo encode tool and give me the result?

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call encoding service (e.g. base64) accessible via HTTP GET without running any local code. It suits agents operating in environments where local encoding libraries aren't available, or when you want a metered, auditable encoding call via the x402 micropayment protocol.

## Known failure modes

- Missing required query parameters may return an error or empty result
- Invalid input type not matching 'http' const will fail schema validation
- Service unavailability on a personal/lab domain could cause 5xx errors
- Payment not completed via x402 protocol results in 402 Payment Required response

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

Returns a JSON object with two fields: 'op' (the name of the encoding operation performed, e.g. 'base64') and 'result' (the encoded output string, e.g. 'ZXhhbXBsZQ==').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "op"
     ],
     "properties": {
      "op": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "base64",
  "result": "ZXhhbXBsZQ=="
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-encode-tool-9dd9e262/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
