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 ...
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
await orq.annotations.create({
traceId: "<id>",
spanId: "<id>",
});
}
run();
Show Parameters
{
"trace_id": str, # required
"span_id": str, # required
"annotations": Union[Annotations1, Annotations2], # required
"metadata": { # optional
"identity_id": Optional[str],
},
}
{
traceId: string; // required
spanId: string; // required
requestBody?: {
annotations: string; // required
metadata?: {
identityId?: string;
};
};
}
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>")
# Use the SDK ...
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
await orq.annotations.delete({
traceId: "<id>",
spanId: "<id>",
});
}
run();
Show Parameters
{
"trace_id": str, # required
"span_id": str, # required
"keys": List[str],
"parent_annotation_ids": List[str],
"metadata": { # optional
"identity_id": Optional[str],
},
}
{
traceId: string; // required
spanId: string; // required
requestBody?: {
keys?: string[];
parentAnnotationIds?: string[];
metadata?: {
identityId?: string;
};
};
}
Was this page helpful?