Annotate Single Item
Creates an annotation for a single queue item. This endpoint automatically associates the annotation with the correct trace, span, or thread based on the queue item.
**Validation rules:**
- For thread items: Use `expectedOutcome` (not `expectedOutput`)
- For trace/span items: Use `expectedOutput` (not `expectedOutcome`)
- Set `markAsCompleted: true` to automatically mark the queue item as completed after annotation (default: true)
Path parameters
itemId
The ID of the queue item to annotate.
Headers
CONFIDENT_API_KEY
The API key of your Confident AI project.
Request
This endpoint expects an object.
rating
Rating value (0-1 for THUMBS_RATING, 1-5 for FIVE_STAR_RATING)
type
Type of rating
Allowed values:
name
Name of the annotation
expectedOutcome
Expected outcome (for threads only)
expectedOutput
Expected output (for traces/spans only)
explanation
Explanation for the rating
flagged
Whether the item is flagged
markAsCompleted
Whether to mark the queue item as completed
Response
Successfully created annotation for queue item
success
data