Source Files
Source files are files that contain things you want to annotate or run models on. Currently we support PDF and .txt file formats
Last updated
Source files are files that contain things you want to annotate or run models on. Currently we support PDF and .txt file formats
Last updated
GET
https://api.annolab.ai/v1/source/{source_id}
Returns basic source information, including a signed URL to download the original file and its tags.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
POST
https://api.annolab.ai/v1/source/upload-pdf
Upload a PDF and specify an OCR method to apply. (optional) invoke a workflow of AI models
POST
https://api.annolab.ai/v1/source/create-text
Create a new text file source within a directory.
This code shows how to create a new text file source
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
source_id*
Int
Id of the source
Authorization*
String
Your API key
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
Authorization*
String
Where you put your api key. Creating a directory requires a key with "Write" permissions.
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
projectIdentifier*
string|number
Either id of the project or name of the project where file will reside
directoryIdentifier
string
name of the directory where the file will reside
sourceIdentifier*
string
Name of the source that will be created
ocrProvider
string
Only used if processMode is set to OCR. Valid values are "textract", "textract_plus", and "gcv". "textract_plus" recommended for highest quality
preprocessor
string
Valid options are "faa" and None.
groupName*
string
Name of the group that owns the project
tags
CanonicalTag[]
Array of CanonicalTag objects
workflow
string
Workflow (aka package of AI models) that will be invoked immediately after upload. Recommend "FAA_CD" or "FAA_CD_WITH_TAGGING"
processMode
string
Use "OCR" if the pdf is not already text enriched. Use "EXTRACT" if pdf already has text embedded
Authorization*
string
Where you put your api key. Creating a directory requires a key with "Write" permissions.
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
projectIdentifier
string
Identifier for the project that will contain the source file. Either the id or the unique name
directoryIdentifier
string
Identifier for the directory that will contain the source file. Either the id or the unique name
sourceName
string
Name of the file you wish to create
text
string
Text that exists within the file