curl -H "Authorization: Bearer <token>" -d '{
"text": [INPUT TEXT],
"schema": {
"product": {
"type": "object",
"properties": {
"title": { "type": "string" },
"brand": { "type": "string" },
"price": {
"type": "number",
},
"currency_code": {
"type": "string"
},
"color": {
"type": "string",
}
}
}
}
}' https://api.isomeric.ai/generate
{
"product": {
"brand": "Aura",
"color": "Gravel with White Mat",
"currency_code": "USD",
"price": "179.00",
"title": "Carver Mat"
}
}
Data Extraction
Generate Structures Data From Text
Use this endpoint to design your own prompt for transforming website text into structured JSON.
POST
/
generate
curl -H "Authorization: Bearer <token>" -d '{
"text": [INPUT TEXT],
"schema": {
"product": {
"type": "object",
"properties": {
"title": { "type": "string" },
"brand": { "type": "string" },
"price": {
"type": "number",
},
"currency_code": {
"type": "string"
},
"color": {
"type": "string",
}
}
}
}
}' https://api.isomeric.ai/generate
{
"product": {
"brand": "Aura",
"color": "Gravel with White Mat",
"currency_code": "USD",
"price": "179.00",
"title": "Carver Mat"
}
}
Headers
Use your API key to authenticate the request.
Body
Show Toggle object
Show Toggle object
The text for which you want to extract data from
The JSON schema representing the data you would like extracted.See our guide on prompt design for more info.Also note that while standard JSON does not guarantee key order within objects, with Isomeric prompt design, we ensure the order of your keys is passed through to our inference engine as-is. This is because the order of keys can often influence the quality of data extraction.
Response
The response will be the exactjson you specified in the schema key of your request unless you set mode to stream.
curl -H "Authorization: Bearer <token>" -d '{
"text": [INPUT TEXT],
"schema": {
"product": {
"type": "object",
"properties": {
"title": { "type": "string" },
"brand": { "type": "string" },
"price": {
"type": "number",
},
"currency_code": {
"type": "string"
},
"color": {
"type": "string",
}
}
}
}
}' https://api.isomeric.ai/generate
{
"product": {
"brand": "Aura",
"color": "Gravel with White Mat",
"currency_code": "USD",
"price": "179.00",
"title": "Carver Mat"
}
}
⌘I