extract
Extract
Extract entities or structured data from items.
Supports both msgpack and JSON request bodies (Content-Type header). Returns msgpack by default, JSON if Accept header requests it.
Args: model: Model name to use for extraction. http_request: FastAPI request object (for body and app state). accept: Accept header for response content negotiation. x_machine_profile: Machine profile header for routing validation.
Returns: ExtractResponse with extraction results for each item. Format depends on Accept header: msgpack (default) or JSON.
Raises: HTTPException: 400 for invalid input or profile mismatch, 404 if model not found, 503 if not loaded.
post/v1/extract/{model}
Path parameters
modelstring required
Headers
acceptstring nullable
X-SIE-MACHINE-PROFILEstring nullable
Request body
Example request
{
"items": [
{
"text": "Apple Inc. was founded by Steve Jobs in Cupertino, California."
}
],
"params": {
"labels": [
"person",
"organization",
"location"
]
}
}Response
Extraction completed successfully