This API returns a textual representation of a file.
The supported file formats are listed in RAG File Formats.
Check the generic variables needed to use the API.
Method |
Path |
Description |
POST |
/omni-parser/process |
Processes a file (such as pdf, docx, pptx) and returns a textual representation. |
- Method: POST
- Path: $BASE_URL/v1/omni-parser/process
- Parameters: The available options are listed in geai Ingestion Provider.
The expected response uses the format below. Some elements may be optional, depending on the file type:
{
"status": "string", // success, failed
"parts": [ // list of elements
{
"page": integer, // available depending on the file type
"type": "string", // type of element: Title, UncategorizedText, Title, NarrativeText, ListItem, Row
"text": "string" // the content of the element,
"midTime": integer // only available with Video
},
...
]
}
# page 4 to 6 from a sample PDF
curl --location '$BASE_URL/v1/omni-parser/process' \
-H 'Authorization: Bearer $SAIA_PROJECT_APITOKEN' \
-F 'file=@"/C:/temp/sample.pdf"' \
-F 'startPage="4"' \
-F 'endPage="6"'
# Get the transcript dialogue from the sample video
curl --location '$BASE_URL/v1/omni-parser/process' \
-H 'Authorization: Bearer $SAIA_PROJECT_APITOKEN' \
-H 'file=@"/C:/temp/sample.mp4"' \
-F 'dialogue="true"'
# use the small whisper model to process the audio
curl --location '$BASE_URL/v1/omni-parser/process' \
-H 'Authorization: Bearer $SAIA_PROJECT_APITOKEN' \
-F 'file=@"/C:/temp/sample.mp3"' \
-F 'whisperModel="small"'
# process a presentation, use gpt-4.1-mini to interpret images
curl --location '$BASE_URL/v1/omni-parser/process' \
-H 'Authorization: Bearer $SAIA_PROJECT_APITOKEN' \
-F 'file=@"/C:/temp/sample.pptx"' \
-F 'model="openai/gpt-4.1-mini"' \
-F 'strategy="hi_res"'
# process a spreadsheet with table format
curl --location '$BASE_URL/v1/omni-parser/process' \
-H 'Authorization: Bearer $SAIA_PROJECT_APITOKEN' \
-F 'file=@"/C:/temp/sample.xlsx"' \
-F 'model="openai/gpt-4o-mini"' \
-F 'structure="table"'
- The API is synchronous.
- Check the statusCode when different from 200.
Since May 2025 release.
API Reference
geai Ingestion Provider