API Reference
Auto-generated
Extract
API reference for extract endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.POST /api/v1/extract
POST
/api/v1/extractExtract structured data from content
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| content | string | Required | Raw content to extract from (HTML, text, markdown, or base64-encoded PDF) |
| content_type | "html" | "text" | "markdown" | Optional | Type of the provided contentDefault: html |
| extraction_schema | object | Optional | extraction_schema |
| extraction_profile | "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | Optional | extraction_profile |
| extraction_prompt | string | Optional | extraction_prompt |
| formats | string[] | Optional | Output formats for content transformationDefault: ['json'] |
| source_url | string | Optional | source_url |
| evidence | boolean | Optional | Include field provenance/evidence for extracted fieldsDefault: False |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/extract \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "example_content",
"content_type": "..."
}'Response Example
JSON
{
"extract_id": "example",
"formats": {},
"credits_used": 0,
"model_used": "example",
"extraction_method": "example",
"content_size_chars": 0
}