SDK Reference
Annotations SDK Reference
SDK reference for the Annotations API, available in Node.js and Python.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
SDK reference for the Annotations API, available in Node.js and Python.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.annotations.create(trace_id="<id>", span_id="<id>", annotations=[])
# Use the SDK ...
Show Parameters
{
"trace_id": str, # required
"span_id": str, # required
"annotations": { # required
"key": str, # required
"value": Union[str, float, List[str]], # required
},
"metadata": { # optional
"identity_id": Optional[str],
},
}
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.annotations.delete(trace_id="<id>", span_id="<id>", keys=[
"<value 1>",
])
# Use the SDK ...
Show Parameters
{
"trace_id": str, # required
"span_id": str, # required
"keys": List[str], # required
}
Was this page helpful?