# Strale Flatten JSON

> Strale Flatten JSON is a paid API for AI agents from api.strale.io, paid per call via x402, $0.0216/call, status unknown (last checked 2026-09-15).

Flattens a nested JSON object into a single-level key-value structure using a configurable delimiter and array handling strategy

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/flatten-json
- Price: $0.0216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-flatten-json-4db5393a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zb4vnqFNHbFtiSw_YtYnA

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 strale-flatten-json-4db5393a
```

Example prompt: Take this nested JSON object and flatten it into a single-level structure using '.' as the delimiter, and handle arrays by index so I can load it into BigQuery.

## When to prefer this

Choose this endpoint when you need a reliable, audited JSON flattening operation with configurable delimiter and array handling, especially in compliance-sensitive pipelines where the cryptographic audit chain matters. Prefer it over ad-hoc code when you need consistent behavior across 27 countries' data formats and want a REST-accessible, pay-per-call transformation without managing infrastructure.

## Known failure modes

- Missing required 'data' query parameter returns validation error
- Malformed or non-JSON input causes parse failure
- Unsupported array_handling value returns schema validation error
- Circular references in JSON may cause processing failure or timeout
- Extremely large or deeply nested JSON may exceed processing limits

## How this service works

The trust layer for AI agents — 250+ independently tested data capabilities across 27 countries. Execute capabilities via REST, MCP, A2A, or x402 micropayments. Every call returns an audit record with cryptographic chain hashing.

## Output

A flat, single-level JSON object where all nested keys are collapsed into dot-delimited (or custom-delimited) paths, arrays are handled per the chosen strategy (indexed or stringified), and every call includes a Strale audit record with cryptographic chain hash for traceability.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "description": "Nested JSON object"
      },
      "delimiter": {
       "type": "string",
       "description": "Default '.'"
      },
      "array_handling": {
       "type": "string",
       "description": "'index' or 'stringify'"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-flatten-json-4db5393a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
