ai_structured
ai_structured — Structured extraction with YOUR schema: turn any text into a JSON object that matches a JSON Schema (or shorthand like name:string,amount:number,due:date,tags:string[],status:open|closed). Unknown values come back null (no guessing); output is validated offline (types, enum, required, min/max, lengths, items, date/email formats), numeric/boolean strings are coerced, and the model gets one automatic retry with the errors. text= and schema= required (text up to 12000 chars, 60 properties). Price: $0.008 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>",
"schema": "<schema>"
},
"name": "ai_structured"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Invoice 4471 from Acme Corp, total $1,250.00 due 2026-12-15. Contact billing@acme.com. | |
| schema | Yes | invoice_number:string,vendor:string,total:number,due:date,email:email,paid:boolean |