# 24K Labs JSON Schema Inferrer

> 24K Labs JSON Schema Inferrer is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Infers a JSON Schema from a sample JSON blob, returning a structured schema definition that describes the shape and required fields of the input.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/json-schema-infer
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-json-schema-inferrer-24eea410
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-t4b6FFd9evJjJHsvmuyz

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 24k-labs-json-schema-inferrer-24eea410 -d '<json body>'
```

Example prompt: Can you infer the JSON Schema for this sample JSON I got back from an API: {"id": 42, "name": "Alice", "email": "alice@example.com", "active": true}?

## When to prefer this

Use this endpoint when you need to automatically derive a formal JSON Schema from a concrete JSON example, especially when building API documentation, setting up data validation pipelines, or bootstrapping form validation without writing schemas by hand. Prefer it over manual schema authoring when you already have sample data and want a quick machine-generated starting point.

## Known failure modes

- Invalid or malformed JSON input returns an error response
- Empty JSON input may produce a minimal or empty schema
- Deeply nested or very large JSON blobs may produce incomplete or truncated schemas
- Ambiguous types (e.g. a field that is null) may result in overly permissive type inferences
- Network or payment processing errors may result in a 402 or 5xx response

## How this service works

A curated directory of x402 services — each one on the list on purpose, with the health, uptime, and independent trust grades from across the ecosystem gathered in one place.

## Output

Returns a JSON Schema object (draft-07 or similar) that describes the structure of the provided sample JSON, including inferred types for each field and a list of required properties.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "samples": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": {
   "type": "object",
   "required": [
    "id",
    "name"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-json-schema-inferrer-24eea410/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
