Annotation Layers
Annotation layers are containers for annotations and can be used to "version" annotations and experiment outputs.
Create Annotation Layer
POST
https://api.annolab.ai/v1/layer/create
Create a new annotation layer for your project
Headers
Authorization
string
Where you put your api key. Creating a project requires a key with "Write" permissions.
{"Authorization": "Api-key XXXXXXX-XXXXXXX-XXXXXXX"}
Request Body
layerName
string
Name of the layer that will be created
projectIdentifier
string
Identifier of the project containing the layer. Either the id or the unique name.
isGold
boolean
boolean for whether the layer being created is a "Gold Set" i.e. a layer with data that will be considered truth when compared against annotation or experiment layers
description
string
Name of the project you wish to create. Must be unique for your group
{
"projectName": "New NER Project",
"projectId": 1,
"layerName": "NER Gold",
"id": 5,
"isGold": true,
"description": 'Use the NER Schema for this layer. Only "approved" annotations should be kept in this layer'
}
Examples of how to make a layer create request
import requests
ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'
layer = {
'projectIdentifier': 'New NER Project',
'layerName': 'NER Gold'
'isGold': True,
'description': 'Use the NER Schema for this layer. Only "approved" annotations should be kept in this layer'
}
headers = {
'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}
url = 'https://api.annolab.ai/v1/layer/create'
response = requests.post(url, headers=headers, json=layer)
print(response.json())
Last updated
Was this helpful?