# PennyRail JSON Object Flattener

> PennyRail JSON Object Flattener 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-notation keys

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/json.flatten--flatten-object
- 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-object-flattener-74dcbb8b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZyocgxV1DP3EqGfkG1hLK

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-object-flattener-74dcbb8b -d '<json body>'
```

Example prompt: Take this nested JSON object — {"user":{"name":"Alice","address":{"city":"Denver","zip":"80201"}},"active":true} — and flatten it into a single-level object with dot-notation keys.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call flattening of a single nested JSON object without managing your own transformation logic. It is ideal for lightweight agent workflows that occasionally need to normalize JSON structure before storage, export, or environment injection, and where spinning up a local utility function is impractical. Prefer alternatives if you need recursive array unrolling, custom delimiter support, or batch processing of many objects at once.

## Known failure modes

- Missing or empty 'input' field returns a validation error
- Non-object value for 'input' (e.g. array or string) may return an error or unexpected output
- Payment failure via x402 protocol results in 402 status and no transformation
- Circular references in input object may cause processing errors
- Extremely large or deeply nested objects may time out or exceed payload limits

## How this service works

Machine-readable settlement service

## Output

A flat JSON object where all nested keys have been collapsed into top-level dot-notation string keys (e.g. 'user.address.city') mapped to their corresponding primitive values, with no remaining nested objects.

## 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-object-flattener-74dcbb8b/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)
