# JSON Root Type

> JSON Root Type is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Inspects serialized JSON text and returns its root type (object, array, etc.) and a size signal as a cheap preflight check.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-type
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-root-type-c502413a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_StBW1qT_8AljQVkA_8tAM

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 json-root-type-c502413a -d '<json body>'
```

Example prompt: Before I run my heavy JSON pipeline on this blob, can you quickly check the root type and size of this JSON text: '{"users":[1,2,3],"count":3}'?

## When to prefer this

Choose this endpoint when you need a fast, cheap preflight check on JSON structure before committing to heavier downstream processing. It is ideal for routing logic, pipeline guards, or any scenario where you need to know the root type and approximate size without full parsing. At $0.001 USDC with no subscription or API key required, it fits naturally into agentic pipelines that need lightweight JSON introspection.

## Known failure modes

- Malformed or unparseable JSON input returns a structured validation error (not billed)
- Empty string input may return a validation error
- Extremely large JSON strings may timeout or be rejected
- Missing json_text field returns a validation error

## How this service works

JSON root type and size. Use as a cheap preflight before heavier JSON processing. Returns root type (object/array/…) and a size signal. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.

## Output

Returns the root type of the JSON (e.g. object, array, string, number, boolean, null) and a size signal indicating the scale of the payload, charged at $0.001 USDC per successful call; structured validation errors are not billed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json_text": {
   "type": "string",
   "description": "Serialized JSON text to inspect or reformat."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "size": 2,
  "schema": "delx/json-type/v1",
  "root_type": "dict"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-root-type-c502413a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
