Infer

activev0.1.0<50ms avg

Schema inference, validation & type generation for agents.

What it does

POST any JSON and get back a JSON Schema, TypeScript type, Zod schema, or OpenAPI component. Agents use Infer to understand unknown data, validate tool outputs, and generate typed interfaces on the fly.

Try it live

POST/api/v1/infer/detect
Click "Run" to see the response

Endpoints

POST
/api/v1/infer/detect

Infer JSON Schema from data

POST
/api/v1/infer/validate

Validate data against a schema

POST
/api/v1/infer/generate

Generate TypeScript/Zod types from schema

Request / Response Schema
Field
Type
Required
Description
data
object | array
Yes
The JSON data to process
schema
object
Response
Inferred JSON Schema
format
string
Optional
Output format (typescript, zod)

Examples

cURLbash
curl -X POST https://neverparse.com/api/v1/infer/detect \
  -H &#39;Content-Type: application/json' \
  -d &#39;{"data": {"name": "Alice", "age": 30, "active": true}}'
TypeScripttypescript
const res = await fetch(class="token-string">&#39;https:class="token-comment">//neverparse.com/api/v1/infer/detect&#39;, {
  method: class="token-string">&#39;POST&#39;,
  headers: { class="token-string">&#39;Content-Type&#39;: class="token-string">&#39;application/json&#39; },
  body: JSON.stringify({ data: { name: class="token-string">&#39;Alice&#39;, age: 30, active: true } })
});
const { schema } = await res.json();
Pythonpython
import requests
res = requests.post(&class="token-comment">#39;https://neverparse.com/api/v1/infer/detect&#39;,
  json={&class="token-comment">#39;dataclass="token-string">&#39;: {&#39;nameclass="token-string">&#39;: &#39;Aliceclass="token-string">&#39;, &#39;ageclass="token-string">&#39;: 30, &#39;active&#39;: True}})
schema = res.json()[&class="token-comment">#39;schema&#39;]

Get started with Infer

Free tier available. No credit card required.

Documentation

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Rate Limits

Free
100 req/day
Pro
10,000 req/day
Enterprise
Unlimited

Error Codes

All errors return structured JSON with code, message, and details fields.

Error Responsejson
{
  "error": {
    "code": "INVALID_INPUT",
    "message": "The &#39;data&#39; field is required",
    "details": {
      "field": "data",
      "expected": "object | array"
    }
  }
}