{
"model_id": "gemini-2.5-flash",
"text_or_documents": "Lady Juliet gazed longingly at the stars, her heart aching for Romeo",
"prompt": "\n\t\t\tExtract characters, emotions, and relationships in order of appearance.\n\t\t Use exact text for extractions. Do not paraphrase or overlap entities.\n\t\t Provide meaningful attributes for each entity to add context.\n\t\t\t",
"examples": [
{
"extractions": [
{
"attributes": {
"emotional_state": "wonder"
},
"extraction_class": "character",
"extraction_text": "ROMEO"
},
{
"attributes": {
"feeling": "gentle awe"
},
"extraction_class": "emotion",
"extraction_text": "But soft!"
},
{
"attributes": {
"type": "metaphor"
},
"extraction_class": "relationship",
"extraction_text": "Juliet is the sun"
}
],
"text": "\n\t\t\t\t\tROMEO. But soft! What light through yonder window breaks? It is the east, and Juliet is the sun.\n\t\t\t\t\t"
}
]
}
curl --location --request POST 'https://api.302.ai/302/langextract/task' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_id": "gemini-2.5-flash",
"text_or_documents": "Lady Juliet gazed longingly at the stars, her heart aching for Romeo",
"prompt": "\n\t\t\tExtract characters, emotions, and relationships in order of appearance.\n\t\t Use exact text for extractions. Do not paraphrase or overlap entities.\n\t\t Provide meaningful attributes for each entity to add context.\n\t\t\t",
"examples": [
{
"extractions": [
{
"attributes": {
"emotional_state": "wonder"
},
"extraction_class": "character",
"extraction_text": "ROMEO"
},
{
"attributes": {
"feeling": "gentle awe"
},
"extraction_class": "emotion",
"extraction_text": "But soft!"
},
{
"attributes": {
"type": "metaphor"
},
"extraction_class": "relationship",
"extraction_text": "Juliet is the sun"
}
],
"text": "\n\t\t\t\t\tROMEO. But soft! What light through yonder window breaks? It is the east, and Juliet is the sun.\n\t\t\t\t\t"
}
]
}'
"string"