Structure to your schema
Any messy input, text, HTML, an email, plus YOUR JSON schema → output shaped to it, validated against your required fields and property types, with an automatic corrective retry and a `valid` flag.
POST/v1/structure
The example in the published schema
charged 00 credits
- auth (bearer key)
- per-key throttle
- validate body
- balance precheck
- run the capability
- charge credits ON SUCCESS ONLY
- JSON
The request body/v1/structure
{ "input": "Hey — new order from Dana Reyes, dana@brightco.io. 3 large planters, ship to 44 Vine St Portland OR by the 20th.", "schema": { "type": "object", "required": [ "customer", "items" ], "properties": { "customer": { "type": "object" }, "items": { "type": "array" }, "shipTo": { "type": "string" }, "deadline": { "type": "string" } } } }
The responsepublished example
// sending the call
// 0 credits charged so farcurl https://api.thecompound.tech/v1/structure \
-H "Authorization: Bearer $COMPOUND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"Hey — new order from Dana Reyes, dana@brightco.io. 3 large planters, ship to 44 Vine St Portland OR by the 20th.","schema":{"type":"object","required":["customer","items"],"properties":{"customer":{"type":"object"},"items":{"type":"array"},"shipTo":{"type":"string"},"deadline":{"type":"string"}}}}'Scored
8 of 8 field checks passed when the eval suite last ran against production, on 2026-07-08. Every endpoint's score
The Extract & structure guide has this endpoint with its example response. The reference has every parameter.
More from Extract & structure
Field extraction $0.04/callPull a field set you define out of any block of text. You name the fields; you get typed values with confidence.Classification $0.02/callRoute or tag text against your own taxonomy, a label, a confidence, and a one-line rationale.Record normalization $0.05/batchA batch of messy records → clean canonical rows, with a change log of every fix (casing, formats, dedup-ready values).Entity matching $0.08/runTwo record sets → which rows are the same real-world thing, with confidence and reasoning. Fuzzy names, typos, aliases handled.Batch categorization $0.03/batchUp to a hundred items against your taxonomy in one call, products, transactions, tickets, each with a confidence.