Custom API
Set up custom API for ML-assisted labeling
Examples
Custom API for span labeling

Custom API for row labeling

Custom API for bounding box labeling

Custom API for document labeling

Last updated
{
"id": "[project_id]",
"name": "[project_name]",
"documents": [
{
"id": "[document_id_1]",
"sentences": [
{
"id": 0, // zero-based line number of the document
"text": "first message",
"metadata": []
},
{
"id": 1,
"text": "first message",
"metadata": []
},
]
}
]
}{
"id": "[project_id]",
"documents": [
{
"id": "[document_id_1]",
"labels": [
{
"id": 0,
"entities": [
{
"label": "LOCATION",
"start_char": 10,
"end_char": 18,
"layer": 0
},
{
"label": "PERSON",
"start_char": 20,
"end_char": 29,
"layer": 1
},
]
},
{
"id": 1,
"entities": []
}
]
}
]
}[
{ "id": 0, "text": "I feel good." },
{ "id": 1, "text": "I don't like it." }
][
{ "id": 0, "label": "POSITIVE" },
{ "id": 1, "label": "NEGATIVE" }
]{
"document": {
"id": "[document_id_1]",
"presignedURL": "[document_presigned_url]",
},
"readingResult": [
{
"id":"[bbox_id_1]",
"label": "O",
"caption": "First"
"shapes": [
{
"pageIndex": 0,
"points": [
{
"x": 211.51411561127316,
"y": 99.08677657682311
},
{
"x": 266.385241834969,
"y": 99.08677657682311
},
{
"x": 266.385241834969,
"y": 105.74680188808318
},
{
"x": 211.51411561127316,
"y": 105.74680188808318
}
]
}
}
]
},
{
"id":"[bbox_id_2]",
"label": "O",
"caption": "Message"
"shapes": [
{
"pageIndex": 0,
"points": [
{
"x": 269.38763779813405,
"y": 99.09397660418664
},
{
"x": 318.98117111775315,
"y": 99.09397660418664
},
{
"x": 318.98117111775315,
"y": 105.73240183335614
},
{
"x": 269.38763779813405,
"y": 105.73240183335614
}
]
}
}
]
}
]
}{
"id": "[document_id_1]",
"labels": [
{
"id":"[bbox_id_1]",
"label": "LOCATION",
"caption": "First",
"confidence_score": 0.90,
"shapes": [
{
"pageIndex": 0,
"points": [
{
"x": 211.51411561127316,
"y": 99.08677657682311
},
{
"x": 266.385241834969,
"y": 99.08677657682311
},
{
"x": 266.385241834969,
"y": 105.74680188808318
},
{
"x": 211.51411561127316,
"y": 105.74680188808318
}
]
}
]
},
{
"id":"[bbox_id_2]",
"label": "PERSON",
"caption": "Message",
"confidence_score": 0.90,
"shapes": [
{
"pageIndex": 0,
"points": [
{
"x": 269.38763779813405,
"y": 99.09397660418664
},
{
"x": 318.98117111775315,
"y": 99.09397660418664
},
{
"x": 318.98117111775315,
"y": 105.73240183335614
},
{
"x": 269.38763779813405,
"y": 105.73240183335614
}
]
}
]
}
]
}{
"document": {
"id": "[document_id_1]",
"presignedURL": "[document_presigned_url]"
}
}{
"id": "[document_id_1]",
"[your_document_question_a]": "POSITIVE",
"[your_document_question_b_with_multiple_answer]": ["NEWS", "ARTICLE"]
}