# minify-json-html

> minify-json-html is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Minifies JSON, HTML, CSS, or simple JS content by stripping comments, whitespace, and redundancy, returning the minified text with byte savings statistics.

## Facts

- Endpoint: GET https://intel.rallylive.ca/dev/minify
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/minify-json-html-aeaf0789
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UDVwInTJ4YgvzltqAxTs2

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 minify-json-html-aeaf0789
```

Example prompt: Can you minify this HTML for me and tell me how many bytes I'm saving? I want all comments and inter-tag whitespace stripped out.

## When to prefer this

Choose this endpoint when you need a quick, lightweight minification pass on JSON, HTML, CSS, or simple JS and want byte-savings stats included in the response. It is ideal for agent pipelines that need to reduce payload sizes before transmission or storage. Prefer it over manual regex stripping because it handles type detection automatically and preserves semantically significant whitespace (e.g. inside pre and textarea tags). Note that it is not a full JS parser, so for complex JavaScript minification a dedicated JS minifier would be more appropriate.

## Known failure modes

- Missing or empty input content returns an error
- Unsupported content types (e.g. binary files, XML) may not be recognized or minified correctly
- Complex JavaScript (beyond comment/blank-line stripping) may not be fully minified since the endpoint is not a full JS parser
- Malformed HTML or JSON may produce unexpected output or errors

## How this service works

Minifier for JSON (re-serialised compact), HTML (comments and inter-tag whitespace stripped, pre/textarea preserved), CSS (comments, whitespace, trailing semicolons) and simple JS (comments and blank lines; not a full parser). Returns the minified text, detected type, and bytes before/after with the saving percentage. $0.01 per document.

## Output

Returns the minified version of the submitted document, the auto-detected content type (JSON/HTML/CSS/JS), the original byte count, the minified byte count, and the percentage of bytes saved.

## 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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/minify-json-html-aeaf0789/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
