# Delx Commerce Schema Inference API

> Delx Commerce Schema Inference API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Infers the schema (field names, types, nullability) from an array of input records

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/schema-inference?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-schema-inference-api-15e4dfc3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y2ySYBL94CUAZGhF-O-Ny

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 delx-commerce-schema-inference-api-15e4dfc3 -d '<json body>'
```

Example prompt: Look at these JSON records and tell me what fields they have, what types each field is, and which ones can be null: [{"id":1,"active":true},{"id":2,"active":false}]

## When to prefer this

Use this endpoint when you need lightweight, instant schema detection from a sample of JSON records without setting up a full data catalog or schema registry. It is ideal for agents handling unknown or undocumented data sources, bootstrapping ETL pipelines, or quickly profiling a dataset before processing. Prefer it over manual inspection or heavier data-profiling tools when you need a pay-per-call, no-signup solution with verifiable delivery via x402.

## Known failure modes

- Empty records array returns no field info
- Highly heterogeneous or deeply nested records may produce ambiguous type counts
- Payment failure via x402 results in 402 response before inference runs
- Malformed JSON input returns a 400-level error
- Very large record arrays may time out or be truncated

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with a 'fields' map where each key is a field name and the value contains observed types (with counts) and nullability; also includes a schema version identifier, an advisory note that the inference is descriptive not prescriptive, and the total record count analyzed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "records": {
   "type": "array",
   "description": "Input field: records."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fields": {
   "id": {
    "types": {
     "int": 2
    },
    "nullable": false
   },
   "active": {
    "types": {
     "bool": 2
    },
    "nullable": false
   }
  },
  "schema": "delx/util-schema-inference/v1",
  "advisory": "Inference describes observed samples; it is not a validation contract.",
  "record_count": 2
 }
}
```

## More

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