Smart Conversion
Extract structured data from text
Extract structured data from text into JSON that matches your data structures.
Use this endpoint when you already have text content and don't need file upload. For file uploads, use /any/to-struct instead.
Request Body
{
"text": "John Doe\njohn@example.com\nSkills: Python, FastAPI...",
"schema": {
"type": "object",
"properties": {
"name": {"type": "string", "description": "Full name"},
"email": {"type": "string", "format": "email", "description": "Email address"}
}
}
}
Schema Requirements
All fields must include a description to help the LLM understand what to extract.
Rate Limiting
This endpoint has 3x rate limit weight due to LLM processing costs.
post/txt/to-struct
Request
- Base URL: https://api.filegraph.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.filegraph.ai/txt/to-struct
- Auth: API key in header X-API-Key
Request body
Example request
{
"schema": {
"properties": {
"name": {
"description": "Full name",
"type": "string"
},
"email": {
"description": "Email address",
"format": "email",
"type": "string"
}
},
"type": "object"
},
"text": "John Doe\njohn@example.com\nSkills: Python, FastAPI..."
}Response
Structured data successfully extracted
Example response
{
"extracted_data": {
"email": "john@example.com",
"name": "John Doe",
"skills": [
"Python",
"FastAPI",
"Docker"
]
},
"model_used": "gpt-4o-mini",
"processing_time_ms": 450
}Changes
No recorded changes to this operation across all 1 revision of this API.