Turn input into typed data.
Send an input and output schema to extract validated JSON. The dedicated schema endpoint keeps extraction separate from reasoning and routing.
POST /api/v1/schemaNEOSYNTROPY API / DIRECT ACCESS
Extract structured data. Request a reasoning step. Choose a route.
Use HTTP from your application without adopting the Python framework.
const response = await fetch(
`https://api.neosyntropy.com/api/v1/schema`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NEOSYNTROPY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "Extract the refund request.",
"input": {
"text": "Refund $40 for order ORD-204. The item arrived damaged."
},
"output_schema": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"amount": {
"type": "number"
},
"reason": {
"type": "string"
}
}
}
}),
},
);
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
// Uncertainty policy: never execute an uncertain or unfamiliar result.
const confidence = Number(result.confidence ?? result.output?.confidence ?? 0);
const outOfDistribution = Boolean(
result.out_of_distribution ?? result.output?.out_of_distribution,
);
if (outOfDistribution || confidence < 0.8) {
throw new Error(
`Unsafe AI result: confidence=${confidence}, out_of_distribution=${outOfDistribution}`,
);
}
console.log(result);Illustrative decoded output. Your application can reject low-confidence or out-of-distribution results before they continue.
/api/v1/schemaYOUR TASK. DEFINED BOUNDARIES.THE API CAPABILITIES
Send an input and output schema to extract validated JSON. The dedicated schema endpoint keeps extraction separate from reasoning and routing.
POST /api/v1/schemaSend a task, evidence, and permitted tools. The dedicated reasoning endpoint returns a bounded result with confidence for your application to validate before continuing.
POST /api/v1/reasoningSend context, candidates, and one fallback. The dedicated route endpoint returns an approved execution plan for your application to validate and execute.
POST /api/v1/routeSign in, create a project, and issue a key with framework:invoke access.
Choose available project models or connect vendor credentials through BYOK.
Copy a server-side HTTP example. Keep your key out of browser code.
Check status codes, validate output, and decide what your application executes next.