# CoCo Percentage Calculator

> CoCo Percentage Calculator 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).

Computes the percentage of one number relative to another, returning the numeric result and an explanation string.

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/percent?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-percentage-calculator-37b99c68
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G5hUfDH-4Ulm9DRi6Id1u

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-percentage-calculator-37b99c68
```

Example prompt: What percentage is 45 out of 180? Use a=45 and b=180 to get the result.

## When to prefer this

Choose this endpoint when you need a quick, paid, on-demand percentage computation with a built-in human-readable explanation. Useful in agent workflows where arithmetic results need to be surfaced to end users with a clear textual explanation, or when you want to offload math to an external service rather than computing inline.

## Known failure modes

- Missing required query params 'a' or 'b' returns an error or undefined result
- Division by zero if b=0 may return an error or null result
- Non-numeric strings passed as a or b may cause a parse error
- Invalid 'mode' value may fall back to default or return an error

## 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

A JSON object containing a numeric 'result' field (the percentage value, e.g. 10 meaning 10%) and an optional 'explain' string that spells out the computation in plain language (e.g. '10.0% of 100.0').

## 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": {
      "a": {
       "type": "string"
      },
      "b": {
       "type": "string"
      },
      "mode": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "result"
     ],
     "properties": {
      "result": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": 10,
  "explain": "10.0% of 100.0"
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-percentage-calculator-37b99c68/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)
