curl --request GET \
--url 'https://api.orq.ai/v2/annotation-queues/01HXXXXXXXXXXXXXXXXXXXXXXX/items/item_01' \
--header 'Authorization: Bearer $ORQ_API_KEY'
import { Orq } from '@orq-ai/node';
const client = new Orq({ apiKey: process.env.ORQ_API_KEY });
const item = await client.annotationQueues.retrieveItem({
annotationQueueId: '01HXXXXXXXXXXXXXXXXXXXXXXX',
itemId: 'item_01',
});
console.log(item.spanId);
import os
from orq_ai_sdk import Orq
client = Orq(api_key=os.environ["ORQ_API_KEY"])
item = client.annotation_queues.retrieve_item(
annotation_queue_id="01HXXXXXXXXXXXXXXXXXXXXXXX",
item_id="item_01",
)
print(item.span_id)
{
"trace_id": "<string>",
"type": "span.generic",
"input": {},
"output": {},
"_id": "01KZKJHSPP994A2YG2M3TD3HNT",
"name": "<string>",
"duration": 123,
"total_tokens": 123,
"total_cost": 123,
"billable": true,
"session_id": "<string>",
"context": {
"trace_id": "<string>",
"span_id": "<string>"
},
"parent_id": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"events": [
{}
],
"attributes": {
"type": "generic",
"gen_ai": {
"operation": {
"name": "<string>"
},
"request": {
"model": "<string>",
"frequency_penalty": 123,
"max_tokens": 123,
"presence_penalty": 123,
"seed": 123,
"temperature": 123,
"top_p": 123,
"top_k": 123,
"stream": false,
"choice": {
"count": 123
},
"stop_sequences": [
"<string>"
],
"encoding_formats": [
"<string>"
],
"response_format": "<unknown>"
},
"system": "<string>",
"system_instructions": "<string>",
"response": {
"finish_reasons": [
"<string>"
],
"id": "<string>",
"model": "<string>"
},
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"cache_creation_tokens": 1,
"audio_tokens": 1
},
"completion_tokens_details": {
"reasoning_tokens": 1,
"audio_tokens": 1,
"accepted_prediction_tokens": 1,
"rejected_prediction_tokens": 1
}
},
"agent": {
"id": "<string>",
"name": "<string>",
"description": "<string>"
},
"conversation": {
"id": "<string>"
},
"tool": {
"name": "<string>",
"call": {
"id": "<string>",
"arguments": "<unknown>",
"result": "<unknown>"
},
"description": "<string>",
"definitions": "<unknown>"
},
"data_source": {
"id": "<string>"
},
"input": {
"messages": [
"<unknown>"
],
"prompt": "<string>"
},
"output": {
"messages": [
"<unknown>"
],
"completion": "<string>"
},
"provider": {},
"token": {},
"embeddings": {
"dimension": {
"count": 123
}
},
"evaluation": {
"name": "<string>",
"score": {
"value": 123,
"label": "<string>"
},
"explanation": "<string>",
"passed": true
}
},
"agent": {
"version": "<string>",
"environment": "<string>",
"iterations": {
"count": 1
}
},
"orq": {
"related_entities": {},
"workspace_id": "<string>",
"project_id": "<string>",
"contact_id": "<string>",
"identity_id": "<string>",
"api_key_id": "<string>",
"thread_id": "<string>",
"tags": [
"<string>"
],
"product": "<string>",
"billing": {
"total_cost": 1,
"input_cost": 1,
"output_cost": 1,
"cache_read_cost": 1,
"cache_write_cost": 1,
"audio_input_cost": 1,
"audio_output_cost": 1,
"reasoning_cost": 1,
"web_search_cost": 1,
"pricing_tier": "<string>",
"threshold_exceeded": true,
"billable": true,
"integration_id": "orq"
},
"latency": 123,
"time_to_first_token": 123,
"costs": 123,
"object_name": "<string>",
"variables": {},
"context": {},
"evaluations": [
{
"id": "<string>",
"evaluation_type": "evaluator",
"evaluator_id": "<string>",
"type": "bert_score",
"status": "completed",
"value": {
"f1": 123,
"precision": 123,
"recall": 123
},
"display_name": "<string>",
"passed": true,
"annotator": {
"actor_id": "<string>"
},
"explanation": "<string>",
"started_at": "2026-08-09T15:34:05.272Z",
"finished_at": "2026-08-09T15:34:05.272Z"
}
],
"guardrail": {
"enabled": true
},
"duration": 123,
"trace": {
"framework": {
"name": "<string>",
"version": "<string>"
},
"graph": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"span_ids": [
"<string>"
]
}
],
"edges": [
{
"source": "<string>",
"target": "<string>"
}
]
}
},
"internal": true,
"masking": {
"input": true,
"output": true,
"system": true
},
"settings": {}
},
"otel": {
"status_code": "OK",
"status_description": "<string>"
},
"otlp": {
"status": {
"message": "<string>"
}
},
"http": {
"response": {
"status_code": 123
}
},
"openresponses": {
"input": [
{
"id": "<string>",
"type": "item_reference"
}
],
"output": [
{
"id": "<string>",
"content": [
{
"text": "<string>",
"type": "input_text"
}
],
"type": "message"
}
],
"object": "<string>",
"created_at": 123,
"status": "<string>",
"completed_at": "<string>",
"incomplete_details": "<string>",
"error": "<string>",
"previous_response_id": "<string>",
"instructions": "<string>",
"safety_identifier": "<string>",
"prompt_cache_key": "<string>",
"user": "<string>",
"temperature": 123,
"top_p": 123,
"presence_penalty": 123,
"frequency_penalty": 123,
"parallel_tool_calls": true,
"stream": true,
"background": true,
"store": true,
"top_logprobs": 123,
"max_output_tokens": 123,
"max_tool_calls": 123,
"tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true,
"type": "function"
}
],
"tools_count": 123,
"tool_choice": "<string>",
"metadata": {},
"text": "<string>",
"stream_options": "<string>",
"reasoning": "<string>",
"include": "<string>",
"include_count": 123
},
"metadata": {}
}
}Retrieve an annotation queue item
Retrieves an item from the specified annotation queue in its expanded form. An annotation queue item is a pointer to a span; this endpoint returns the fully resolved span the item references.
curl --request GET \
--url 'https://api.orq.ai/v2/annotation-queues/01HXXXXXXXXXXXXXXXXXXXXXXX/items/item_01' \
--header 'Authorization: Bearer $ORQ_API_KEY'
import { Orq } from '@orq-ai/node';
const client = new Orq({ apiKey: process.env.ORQ_API_KEY });
const item = await client.annotationQueues.retrieveItem({
annotationQueueId: '01HXXXXXXXXXXXXXXXXXXXXXXX',
itemId: 'item_01',
});
console.log(item.spanId);
import os
from orq_ai_sdk import Orq
client = Orq(api_key=os.environ["ORQ_API_KEY"])
item = client.annotation_queues.retrieve_item(
annotation_queue_id="01HXXXXXXXXXXXXXXXXXXXXXXX",
item_id="item_01",
)
print(item.span_id)
{
"trace_id": "<string>",
"type": "span.generic",
"input": {},
"output": {},
"_id": "01KZKJHSPP994A2YG2M3TD3HNT",
"name": "<string>",
"duration": 123,
"total_tokens": 123,
"total_cost": 123,
"billable": true,
"session_id": "<string>",
"context": {
"trace_id": "<string>",
"span_id": "<string>"
},
"parent_id": "<string>",
"start_time": "<string>",
"end_time": "<string>",
"events": [
{}
],
"attributes": {
"type": "generic",
"gen_ai": {
"operation": {
"name": "<string>"
},
"request": {
"model": "<string>",
"frequency_penalty": 123,
"max_tokens": 123,
"presence_penalty": 123,
"seed": 123,
"temperature": 123,
"top_p": 123,
"top_k": 123,
"stream": false,
"choice": {
"count": 123
},
"stop_sequences": [
"<string>"
],
"encoding_formats": [
"<string>"
],
"response_format": "<unknown>"
},
"system": "<string>",
"system_instructions": "<string>",
"response": {
"finish_reasons": [
"<string>"
],
"id": "<string>",
"model": "<string>"
},
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"cache_creation_tokens": 1,
"audio_tokens": 1
},
"completion_tokens_details": {
"reasoning_tokens": 1,
"audio_tokens": 1,
"accepted_prediction_tokens": 1,
"rejected_prediction_tokens": 1
}
},
"agent": {
"id": "<string>",
"name": "<string>",
"description": "<string>"
},
"conversation": {
"id": "<string>"
},
"tool": {
"name": "<string>",
"call": {
"id": "<string>",
"arguments": "<unknown>",
"result": "<unknown>"
},
"description": "<string>",
"definitions": "<unknown>"
},
"data_source": {
"id": "<string>"
},
"input": {
"messages": [
"<unknown>"
],
"prompt": "<string>"
},
"output": {
"messages": [
"<unknown>"
],
"completion": "<string>"
},
"provider": {},
"token": {},
"embeddings": {
"dimension": {
"count": 123
}
},
"evaluation": {
"name": "<string>",
"score": {
"value": 123,
"label": "<string>"
},
"explanation": "<string>",
"passed": true
}
},
"agent": {
"version": "<string>",
"environment": "<string>",
"iterations": {
"count": 1
}
},
"orq": {
"related_entities": {},
"workspace_id": "<string>",
"project_id": "<string>",
"contact_id": "<string>",
"identity_id": "<string>",
"api_key_id": "<string>",
"thread_id": "<string>",
"tags": [
"<string>"
],
"product": "<string>",
"billing": {
"total_cost": 1,
"input_cost": 1,
"output_cost": 1,
"cache_read_cost": 1,
"cache_write_cost": 1,
"audio_input_cost": 1,
"audio_output_cost": 1,
"reasoning_cost": 1,
"web_search_cost": 1,
"pricing_tier": "<string>",
"threshold_exceeded": true,
"billable": true,
"integration_id": "orq"
},
"latency": 123,
"time_to_first_token": 123,
"costs": 123,
"object_name": "<string>",
"variables": {},
"context": {},
"evaluations": [
{
"id": "<string>",
"evaluation_type": "evaluator",
"evaluator_id": "<string>",
"type": "bert_score",
"status": "completed",
"value": {
"f1": 123,
"precision": 123,
"recall": 123
},
"display_name": "<string>",
"passed": true,
"annotator": {
"actor_id": "<string>"
},
"explanation": "<string>",
"started_at": "2026-08-09T15:34:05.272Z",
"finished_at": "2026-08-09T15:34:05.272Z"
}
],
"guardrail": {
"enabled": true
},
"duration": 123,
"trace": {
"framework": {
"name": "<string>",
"version": "<string>"
},
"graph": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"span_ids": [
"<string>"
]
}
],
"edges": [
{
"source": "<string>",
"target": "<string>"
}
]
}
},
"internal": true,
"masking": {
"input": true,
"output": true,
"system": true
},
"settings": {}
},
"otel": {
"status_code": "OK",
"status_description": "<string>"
},
"otlp": {
"status": {
"message": "<string>"
}
},
"http": {
"response": {
"status_code": 123
}
},
"openresponses": {
"input": [
{
"id": "<string>",
"type": "item_reference"
}
],
"output": [
{
"id": "<string>",
"content": [
{
"text": "<string>",
"type": "input_text"
}
],
"type": "message"
}
],
"object": "<string>",
"created_at": 123,
"status": "<string>",
"completed_at": "<string>",
"incomplete_details": "<string>",
"error": "<string>",
"previous_response_id": "<string>",
"instructions": "<string>",
"safety_identifier": "<string>",
"prompt_cache_key": "<string>",
"user": "<string>",
"temperature": 123,
"top_p": 123,
"presence_penalty": 123,
"frequency_penalty": 123,
"parallel_tool_calls": true,
"stream": true,
"background": true,
"store": true,
"top_logprobs": 123,
"max_output_tokens": 123,
"max_tool_calls": 123,
"tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true,
"type": "function"
}
],
"tools_count": 123,
"tool_choice": "<string>",
"metadata": {},
"text": "<string>",
"stream_options": "<string>",
"reasoning": "<string>",
"include": "<string>",
"include_count": 123
},
"metadata": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Annotation queue item retrieved.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
Unique trace ID
span.generic Show child attributes
Show child attributes
Show child attributes
Show child attributes
Name of the trace or block
Total time elapsed between the trace start and end timestamp
Total number of tokens used by the trace
Total cost of the trace
Whether the trace is billable
Unique ID to relate multiple traces together
Context information for the trace
Show child attributes
Show child attributes
Parent trace ID, if applicable
ISO timestamp indicating when the trace started
ISO timestamp indicating when the trace ended
List of events associated with this trace
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?