---
name: neosyntropy-extractor
description: Builds strict structured extraction and validation integrations with the NeoSyntropy Schema API. Use when converting text or JSON into typed objects, validating extracted fields, or preparing schema-driven API calls.
---

# NeoSyntropy Extractor

## Contract

- Endpoint: `POST https://api.neosyntropy.com/api/v1/schema`
- Read `NEOSYNTROPY_API_KEY` from the environment.
- Send `Authorization: Bearer $NEOSYNTROPY_API_KEY`.
- Keep the request in trusted server code.

The request contains `prompt`, `input`, and an object `output_schema`. The API returns `output`, `confidence`, and `out_of_distribution`.

## Implementation workflow

1. Define the smallest JSON Schema that represents the downstream contract.
2. Set `additionalProperties: false`.
3. Require only fields that must exist.
4. Represent missing information with nullable or optional fields.
5. Include two or three representative examples in the prompt when labels or formats are ambiguous.
6. Call `/schema`.
7. Validate `output` again with the same schema before storing data or causing side effects.
8. Reject or review low-confidence and out-of-distribution results.

## Few-shot prompt pattern

```text
Extract the support ticket.

Examples:
Input: "Charged twice for invoice 88"
Output: {"category":"billing","invoice_id":"88"}

Input: "Cannot log in after password reset"
Output: {"category":"account","invoice_id":null}

Return only fields defined by the supplied schema.
```

## Safety

- Never ask the model to invent absent values.
- Keep examples synthetic and free of credentials or customer secrets.
- Treat successful schema generation as constrained output, not business authorization.
- Do not invent undocumented endpoints or model IDs.

