# PennyRail JSON Flatten

> PennyRail JSON Flatten is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Flattens a nested JSON object into a single-level key-value structure using dot or bracket notation

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/json.flatten--flatten-json
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-json-flatten-03e8cc28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Zp8GlR75wK-_NECw5-X4H

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 pennyrail-json-flatten-03e8cc28 -d '<json body>'
```

Example prompt: Can you flatten this nested JSON object for me — I need all the deeply nested keys collapsed into dot-notation at the top level so I can load it into a spreadsheet?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call JSON flattening operation without standing up your own transformation pipeline. Useful in agent workflows where you receive nested API responses and need to normalize them for downstream processing like CSV export, database insertion, or flat-field logging. Prefer this over general-purpose code execution when you want a lightweight, dedicated utility with no setup.

## Known failure modes

- Missing or malformed 'input' field returns a validation error
- Input containing circular references may cause processing failure
- Non-object input types (arrays, primitives at root) may be rejected or produce unexpected output
- Very large deeply nested objects may hit size or depth limits
- Network timeout on the Vercel serverless function under cold-start conditions

## How this service works

Machine-readable settlement service

## Output

A flattened JSON object where all nested keys are collapsed into a single level, typically using dot notation (e.g. 'address.city': 'New York') — returned as a JSON object with no nested structures.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-json-flatten-03e8cc28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
