Schema inference, validation & type generation for agents.
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.
/api/v1/infer/detectInfer JSON Schema from data
/api/v1/infer/validateValidate data against a schema
/api/v1/infer/generateGenerate TypeScript/Zod types from schema
curl -X POST https://neverparse.com/api/v1/infer/detect \
-H 'Content-Type: application/json' \
-d '{"data": {"name": "Alice", "age": 30, "active": true}}'const res = await fetch(class="token-string">39;https:class="token-comment">//neverparse.com/api/v1/infer/detect39;, {
method: class="token-string">39;POST39;,
headers: { class="token-string">39;Content-Type39;: class="token-string">39;application/json39; },
body: JSON.stringify({ data: { name: class="token-string">39;Alice39;, age: 30, active: true } })
});
const { schema } = await res.json();import requests
res = requests.post(&class="token-comment">#39;https://neverparse.com/api/v1/infer/detect39;,
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;active39;: True}})
schema = res.json()[&class="token-comment">#39;schema39;]Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYAll errors return structured JSON with code, message, and details fields.
{
"error": {
"code": "INVALID_INPUT",
"message": "The 39;data39; field is required",
"details": {
"field": "data",
"expected": "object | array"
}
}
}