# G-Forge NDJSON To JSON Array

> G-Forge NDJSON To JSON Array is a paid API for AI agents from api.getretold.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-24).

Converts newline-delimited JSON (NDJSON/JSON Lines) text into a single JSON array, validating each line and rejecting malformed or duplicate-key records.

## Facts

- Endpoint: POST https://api.getretold.com/services/agent-auto-launch-ndjson/invoke?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/g-forge-ndjson-to-json-array-d6a7bf3b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nE5GS2D3hxpY6j5Gn5h5l

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 g-forge-ndjson-to-json-array-d6a7bf3b -d '<json body>'
```

Example prompt: Take this NDJSON export and convert it into a proper JSON array so I can pass it to the next step — skip any empty lines: '{"id":1,"name":"Alice"}
{"id":2,"name":"Bob"}
'

## When to prefer this

Use this endpoint when you have NDJSON or JSON Lines formatted text (from a database export, log file, or streaming API response) and need a standard JSON array for downstream processing. It is the right choice when you need strict validation — it rejects malformed JSON and duplicate keys rather than silently dropping bad records. Prefer it over generic text parsers when correctness and predictability matter. Not suitable for file uploads, streaming inputs, or large datasets that exceed the bounded text input limit.

## Known failure modes

- Malformed JSON on any line causes rejection of the entire input with a parse error
- Duplicate keys within a single JSON object cause rejection
- Missing final newline causes a parse error (trailing newline required)
- Input text that is empty or contains only whitespace may return an empty array or error
- Non-JSON content (e.g. CSV or plain text) passed as NDJSON will be rejected

## How this service works

Turn newline-delimited JSON exports into one JSON array for downstream processing. Parse supplied NDJSON or JSON Lines text with LF or CRLF endings. A final newline is required; empty-line skipping is optional. Rejects malformed JSON and duplicate keys. Bounded text input, not file reading or streaming.

## Output

A JSON array containing one element per valid non-empty line from the input NDJSON text. Each element is a parsed JSON object. Malformed JSON lines or objects with duplicate keys cause the request to be rejected with an error rather than silently skipped.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {
   "type": "object",
   "required": [
    "text"
   ],
   "properties": {
    "text": {
     "type": "string"
    },
    "ignore_empty_lines": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/g-forge-ndjson-to-json-array-d6a7bf3b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.getretold.com](https://www.zero.xyz/host/api.getretold.com/llms.txt)
