# PennyRail JSON Flatten (Dot-Path)

> PennyRail JSON Flatten (Dot-Path) 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 dot-path keyed flat object via a paid REST endpoint

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/json.flatten--dot-path-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-dot-path-beacfef6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jmPkCWbGehqJBqzMod7ZD

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-dot-path-beacfef6 -d '<json body>'
```

Example prompt: Can you flatten this nested JSON object into dot-path keys for me? The object is {"user":{"profile":{"name":"Alice","age":30},"roles":["admin","editor"]}} — I need it as a flat key-value map like user.profile.name = Alice.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-use JSON flattening operation and want a hosted microservice rather than running your own transformation logic. It is well-suited for agent workflows that occasionally need to normalize nested API responses, config blobs, or event payloads into flat dot-path structures without setting up a dedicated data pipeline. Prefer alternatives (e.g. a local utility or a general ETL service) for high-volume batch flattening where per-call micropayments would be costly.

## Known failure modes

- Missing or malformed 'input' field returns a 400-level error
- Payment not attached or insufficient USDC balance causes a 402 Payment Required response
- Extremely large or deeply recursive JSON may time out or exceed size limits
- Non-object input types (arrays at root, primitives) may produce unexpected output or errors
- Network/Vercel cold-start may add latency on first call

## How this service works

Machine-readable settlement service

## Output

A flat JSON object where each originally nested field is represented as a dot-separated key (e.g. 'a.b.c') mapping to its scalar or leaf value. The response schema allows any additional properties, so all flattened key-value pairs are returned at the top level of the response object.

## 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-dot-path-beacfef6/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)
