Anno Lab API (V1)
Search…
⌃K

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
post
https://api.annolab.ai
/v1/source/upload-pdf
Upload a PDF
post
https://api.annolab.ai
/v1/source/create-text
Create Source Text
This code shows how to create a new text file source
Python
import requests
ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'
source = {
'projectIdentifier': 'New NER Project',
'directoryIdentifier': 'Wikipedia Subset',
'sourceName': 'athens.txt'
'text': 'Athens (Greek: Αθήνα, Athína), is the capital city of Greece with a metropolitan population of 3.7 million inhabitants.'
}
headers = {
'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}
url = 'https://api.annolab.ai/v1/source/create-text'
response = requests.post(url, headers=headers, json=source)
print(response.json())