# JSON Flatten

> JSON Flatten is a paid API for AI agents from grokzilla.shop, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-15).

Flattens a nested JSON object into a single-level key-value structure via a paid microservice endpoint

## Facts

- Endpoint: POST https://grokzilla.shop/api/skills/json-flatten
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-flatten-aa31c83f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_03KEYBHf239G5dgThQTXA

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 json-flatten-aa31c83f -d '<json body>'
```

Example prompt: Can you flatten this nested JSON object for me — I need it converted to a single-level key-value structure so I can load it into a CSV: {"user":{"name":"Alice","address":{"city":"Denver","zip":"80201"}}}

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call JSON flattening microservice without spinning up your own transformation infrastructure. It is ideal for AI agents that occasionally need to normalize nested JSON on the fly, especially within x402-compatible payment workflows where micropayments per operation are acceptable.

## Known failure modes

- Invalid or malformed JSON input body returns an error response
- Missing required 'input' field or wrong type/method values cause validation failure
- Payment failure via x402 protocol results in 402 Payment Required before processing
- Extremely large or deeply recursive JSON objects may time out or exceed size limits
- Non-object JSON root types (arrays, primitives) may not be supported

## How this service works

Agent-ready microservices with x402 + Stripe rails, volume primitives, tutorials, and applet UI.

## Output

Returns a JSON response with an 'ok' boolean indicating success and the endpoint path. The actual flattened JSON object is the primary payload, collapsing all nested keys into a single-level structure (typically using dot-notation or underscore-separated key paths).

## 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": {
    "body": {
     "type": "object"
    },
    "path": {
     "type": "string"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string"
    },
    "bodyType": {
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "path": "/api/skills/json-flatten"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-flatten-aa31c83f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grokzilla.shop](https://www.zero.xyz/host/grokzilla.shop/llms.txt)
