Annotate Annotation Queue Item
(v2)POST
Records your team's annotation of one queue item and marks it complete, returning the ids of what was written. Send annotations for criteria ratings, formResponses for answers to the queue's annotation form, or both; answering the form requires annotatorEmail.
curl -X POST "https://api.confident-ai.com/v2/annotation-queues/{annotationQueueId}/items/{queueItemId}/annotate" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"annotations": [
{
"fieldType": "THUMBS_RATING",
"value": true,
"name": "Helpfulness",
"explanation": "Answered the question and cited the right source.",
"expectedOutput": "Mount Everest is 8,848 metres tall.",
"expectedOutcome": "The user learns how tall Mount Everest is.",
"imagesMapping": {}
}
],
"formResponses": [
{
"label": "How helpful was the answer?",
"value": "Very helpful"
}
],
"annotatorEmail": "jane@acme.com",
"flagged": false,
"markAsCompleted": true
}'{
"success": true,
"data": {
"annotationIds": [
"<ANNOTATION-ID>"
],
"formResponseIds": [
"<ANNOTATION-FORM-RESPONSE-ID>"
]
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/annotation-queues/<ANNOTATION-QUEUE-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
annotationQueueIdstringRequiredThe id of the annotation queue the item belongs to.
queueItemIdstringRequiredThe id of the queue item.
Request body
annotationslist of objectsThe criteria ratings to record on the item, one entry per criterion.
Show 7 propertiesHide 7 properties
fieldTypeenumThe kind of rating. Defaults to
THUMBS_RATING.Show 2 enum valuesHide 2 enum values
THUMBS_RATINGFIVE_STAR_RATING
valueboolean | integerRequiredThe rating to record:
trueorfalsefor aTHUMBS_RATING, 1 to 5 for aFIVE_STAR_RATING.Show 2 variantsHide 2 variants
boolean
- OR
integer
namestringA name for what this rating is for. On a queue with a form, it matches a rating field's label; on a queue without one, omit it for the default rating.
explanationstringWhy the rating was given.
expectedOutputstringThe output the target should have produced. Only for an item holding a trace or span.
expectedOutcomestringThe outcome the conversation should have reached. Only for an item holding a thread.
imagesMappingobjectImages referenced by
[DEEPEVAL:IMAGE:<key>]markers in the text fields, keyed by that marker's key.
formResponseslist of objectsThe annotations for the fields of the queue's annotation form. Sending them requires
annotatorEmail.Show 2 propertiesHide 2 properties
labelstringRequiredThe label of the form field being answered, exactly as the form spells it.
valueanyThe annotation value, in the shape the field's type expects: a string for
TEXT, a number forNUMBERorFLOAT, a boolean forBOOLEAN, one of the options in the field'sconfigforCHOICE, and a list of them forMULTIPLE_CHOICE.
annotatorEmailstringThe email address of the project member the work is credited to. Required when
formResponsesare sent, and what makes the annotation visible on the platform.flaggedbooleanWhether to flag the item for a second opinion.
markAsCompletedbooleanWhether to mark the item annotated, taking it out of the pending list. Defaults to
true.
Response
Annotate Annotation Queue Item succeeded.
successbooleanIndicates if the request was successful.
dataobjectWhat one item's annotation wrote.
Show 2 propertiesHide 2 properties
annotationIdslist of stringsThe ids of the annotations recorded, one per criterion rated.
formResponseIdslist of stringsThe ids of the form answers recorded, one per field answered.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.