# Strale Schema Infer

> Strale Schema Infer is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054/call, status unknown (last checked 2026-10-10).

Infers a JSON schema from a given object structure, detecting required fields and property types

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/schema-infer?utm_source=zero.xyz
- Price: $0.054/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-schema-infer-25043dbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OQ2EmVxqvEmfpXj30yFbW

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-schema-infer-25043dbc
```

Example prompt: Can you infer the JSON schema from this object — it has fields like 'name' (string), 'age' (number), and 'email' (string), and 'name' and 'email' are required?

## When to prefer this

Choose this endpoint when you need to automatically derive a formal JSON schema from a known set of properties and required fields, especially in data pipeline setup, API contract generation, or validation rule creation — without manually authoring schema definitions. It pairs well with other Strale validation endpoints and returns a cryptographically auditable result.

## Known failure modes

- Missing or malformed 'properties' input returns a 400 error
- Empty properties object yields a minimal or trivial schema
- Ambiguous type hints may produce overly broad inferred types
- Network timeout on cold start may return 504
- Unsupported property structures may not be fully represented in output schema

## 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

Returns an inferred JSON schema object describing the structure of the input, including detected property types, required field lists, and a formal schema definition suitable for validation or documentation use.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "required": {
   "type": "string"
  },
  "properties": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-schema-infer-25043dbc/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)
