Skip to content

Commit 6ecfec6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Document LLM Observability /api/v2/llm-obs/v1/annotated-interactions endpoint (#3567)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d717f6d commit 6ecfec6

14 files changed

Lines changed: 754 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41740,11 +41740,109 @@ components:
4174041740
format: int64
4174141741
type: integer
4174241742
type: object
41743+
LLMObsAnnotatedInteractionByTraceItem:
41744+
description: An annotated interaction returned by the cross-queue lookup, including the source queue metadata.
41745+
properties:
41746+
annotations:
41747+
description: List of annotations for this interaction.
41748+
items:
41749+
$ref: "#/components/schemas/LLMObsAnnotationItem"
41750+
type: array
41751+
content_id:
41752+
description: Upstream entity identifier (trace ID, session ID, or deterministic display_block ID).
41753+
example: "trace-abc-123"
41754+
type: string
41755+
created_at:
41756+
description: Timestamp when the interaction was added to the queue.
41757+
example: "2025-06-01T12:00:00Z"
41758+
format: date-time
41759+
type: string
41760+
display_block:
41761+
$ref: "#/components/schemas/LLMObsContentBlocks"
41762+
id:
41763+
description: Unique identifier of the interaction.
41764+
example: "interaction-456"
41765+
type: string
41766+
modified_at:
41767+
description: Timestamp when the interaction was last updated.
41768+
example: "2025-06-01T12:00:00Z"
41769+
format: date-time
41770+
type: string
41771+
queue_id:
41772+
description: Identifier of the annotation queue this interaction belongs to.
41773+
example: "queue-uuid-001"
41774+
type: string
41775+
queue_name:
41776+
description: Name of the annotation queue this interaction belongs to.
41777+
example: "My Annotation Queue"
41778+
type: string
41779+
type:
41780+
$ref: "#/components/schemas/LLMObsAnyInteractionType"
41781+
required:
41782+
- id
41783+
- type
41784+
- content_id
41785+
- created_at
41786+
- modified_at
41787+
- queue_id
41788+
- queue_name
41789+
- annotations
41790+
type: object
4174341791
LLMObsAnnotatedInteractionItem:
4174441792
description: An interaction with its associated annotations.
4174541793
oneOf:
4174641794
- $ref: "#/components/schemas/LLMObsTraceAnnotatedInteractionItem"
4174741795
- $ref: "#/components/schemas/LLMObsDisplayBlockAnnotatedInteractionItem"
41796+
LLMObsAnnotatedInteractionsByTraceDataAttributesResponse:
41797+
description: Attributes of the cross-queue annotated interactions response.
41798+
properties:
41799+
annotated_interactions:
41800+
description: List of annotated interactions across all queues for the requested content IDs.
41801+
items:
41802+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionByTraceItem"
41803+
type: array
41804+
total_count:
41805+
description: Total number of annotated interactions matching the query.
41806+
example: 1
41807+
format: int32
41808+
maximum: 2147483647
41809+
type: integer
41810+
required:
41811+
- annotated_interactions
41812+
- total_count
41813+
type: object
41814+
LLMObsAnnotatedInteractionsByTraceDataResponse:
41815+
description: Data object for the cross-queue annotated interactions response.
41816+
properties:
41817+
attributes:
41818+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceDataAttributesResponse"
41819+
id:
41820+
description: Opaque identifier for the response object.
41821+
example: "trace-query"
41822+
type: string
41823+
type:
41824+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceType"
41825+
required:
41826+
- id
41827+
- type
41828+
- attributes
41829+
type: object
41830+
LLMObsAnnotatedInteractionsByTraceResponse:
41831+
description: Response containing annotated interactions across all queues for the requested content IDs.
41832+
properties:
41833+
data:
41834+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceDataResponse"
41835+
required:
41836+
- data
41837+
type: object
41838+
LLMObsAnnotatedInteractionsByTraceType:
41839+
description: Resource type for cross-queue annotated interactions lookup.
41840+
enum:
41841+
- annotated_interactions_by_trace
41842+
example: annotated_interactions_by_trace
41843+
type: string
41844+
x-enum-varnames:
41845+
- ANNOTATED_INTERACTIONS_BY_TRACE
4174841846
LLMObsAnnotatedInteractionsDataAttributesResponse:
4174941847
description: Attributes containing the list of annotated interactions.
4175041848
properties:
@@ -42214,6 +42312,20 @@ components:
4221442312
- ENABLED
4221542313
- DISABLED
4221642314
- ADAPTIVE
42315+
LLMObsAnyInteractionType:
42316+
description: Type of an annotated interaction.
42317+
enum:
42318+
- trace
42319+
- experiment_trace
42320+
- session
42321+
- display_block
42322+
example: trace
42323+
type: string
42324+
x-enum-varnames:
42325+
- TRACE
42326+
- EXPERIMENT_TRACE
42327+
- SESSION
42328+
- DISPLAY_BLOCK
4221742329
LLMObsAzureOpenAIMetadata:
4221842330
description: Azure OpenAI-specific metadata for an integration account or inference request.
4221942331
properties:
@@ -122240,6 +122352,104 @@ paths:
122240122352
x-unstable: |-
122241122353
**Note**: This endpoint is in preview and is subject to change.
122242122354
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
122355+
/api/v2/llm-obs/v1/annotated-interactions:
122356+
get:
122357+
description: Returns annotated interactions across all annotation queues for the given content IDs. Results include queue metadata (ID and name) for each interaction.
122358+
operationId: GetLLMObsAnnotatedInteractionsByTraceIDs
122359+
parameters:
122360+
- description: One or more content IDs to retrieve annotated interactions for. At least one is required.
122361+
in: query
122362+
name: contentIds
122363+
required: true
122364+
schema:
122365+
items:
122366+
type: string
122367+
type: array
122368+
- description: Pagination offset. Must be >= 0. Defaults to 0.
122369+
in: query
122370+
name: offset
122371+
schema:
122372+
default: 0
122373+
format: int32
122374+
maximum: 2147483647
122375+
minimum: 0
122376+
type: integer
122377+
- description: Maximum number of results to return. Must be > 0. Defaults to 100.
122378+
in: query
122379+
name: limit
122380+
schema:
122381+
default: 100
122382+
format: int32
122383+
maximum: 2147483647
122384+
minimum: 1
122385+
type: integer
122386+
responses:
122387+
"200":
122388+
content:
122389+
application/json:
122390+
examples:
122391+
default:
122392+
value:
122393+
data:
122394+
attributes:
122395+
annotated_interactions:
122396+
- annotations:
122397+
- created_at: "0001-01-01T00:00:00Z"
122398+
created_by: "00000000-0000-0000-0000-000000000002"
122399+
id: annotation-789
122400+
interaction_id: interaction-456
122401+
label_values:
122402+
quality: good
122403+
modified_at: "0001-01-01T00:00:00Z"
122404+
modified_by: "00000000-0000-0000-0000-000000000002"
122405+
content_id: trace-abc-123
122406+
created_at: "2025-06-01T12:00:00Z"
122407+
id: interaction-456
122408+
modified_at: "2025-06-01T12:00:00Z"
122409+
queue_id: queue-uuid-001
122410+
queue_name: My Annotation Queue
122411+
type: trace
122412+
total_count: 1
122413+
id: trace-query
122414+
type: annotated_interactions_by_trace
122415+
schema:
122416+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceResponse"
122417+
description: OK
122418+
"400":
122419+
content:
122420+
application/json:
122421+
schema:
122422+
$ref: "#/components/schemas/JSONAPIErrorResponse"
122423+
description: Bad Request
122424+
"401":
122425+
content:
122426+
application/json:
122427+
schema:
122428+
$ref: "#/components/schemas/JSONAPIErrorResponse"
122429+
description: Unauthorized
122430+
"403":
122431+
content:
122432+
application/json:
122433+
schema:
122434+
$ref: "#/components/schemas/JSONAPIErrorResponse"
122435+
description: Forbidden
122436+
"429":
122437+
$ref: "#/components/responses/TooManyRequestsResponse"
122438+
"500":
122439+
content:
122440+
application/json:
122441+
schema:
122442+
$ref: "#/components/schemas/JSONAPIErrorResponse"
122443+
description: Internal Server Error
122444+
security:
122445+
- apiKeyAuth: []
122446+
appKeyAuth: []
122447+
summary: Get annotated interactions by content IDs
122448+
tags:
122449+
- LLM Observability
122450+
x-unstable: |-
122451+
**Note**: This endpoint is in preview and is subject to change.
122452+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
122243122453
/api/v2/llm-obs/v1/annotation-queues:
122244122454
get:
122245122455
description: |-

docs/datadog_api_client.v2.model.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18253,13 +18253,48 @@ datadog\_api\_client.v2.model.list\_vulnerable\_assets\_response module
1825318253
:members:
1825418254
:show-inheritance:
1825518255

18256+
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interaction\_by\_trace\_item module
18257+
--------------------------------------------------------------------------------------
18258+
18259+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interaction_by_trace_item
18260+
:members:
18261+
:show-inheritance:
18262+
1825618263
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interaction\_item module
1825718264
---------------------------------------------------------------------------
1825818265

1825918266
.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interaction_item
1826018267
:members:
1826118268
:show-inheritance:
1826218269

18270+
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_data\_attributes\_response module
18271+
-------------------------------------------------------------------------------------------------------------
18272+
18273+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_data_attributes_response
18274+
:members:
18275+
:show-inheritance:
18276+
18277+
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_data\_response module
18278+
-------------------------------------------------------------------------------------------------
18279+
18280+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_data_response
18281+
:members:
18282+
:show-inheritance:
18283+
18284+
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_response module
18285+
-------------------------------------------------------------------------------------------
18286+
18287+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_response
18288+
:members:
18289+
:show-inheritance:
18290+
18291+
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_by\_trace\_type module
18292+
---------------------------------------------------------------------------------------
18293+
18294+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotated_interactions_by_trace_type
18295+
:members:
18296+
:show-inheritance:
18297+
1826318298
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interactions\_data\_attributes\_response module
1826418299
--------------------------------------------------------------------------------------------------
1826518300

@@ -18512,6 +18547,13 @@ datadog\_api\_client.v2.model.llm\_obs\_anthropic\_thinking\_type module
1851218547
:members:
1851318548
:show-inheritance:
1851418549

18550+
datadog\_api\_client.v2.model.llm\_obs\_any\_interaction\_type module
18551+
---------------------------------------------------------------------
18552+
18553+
.. automodule:: datadog_api_client.v2.model.llm_obs_any_interaction_type
18554+
:members:
18555+
:show-inheritance:
18556+
1851518557
datadog\_api\_client.v2.model.llm\_obs\_azure\_open\_ai\_metadata module
1851618558
------------------------------------------------------------------------
1851718559

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get annotated interactions by content IDs returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_llm_obs_annotated_interactions_by_trace_i_ds"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = LLMObservabilityApi(api_client)
12+
response = api_instance.get_llm_obs_annotated_interactions_by_trace_i_ds(
13+
content_ids=[],
14+
)
15+
16+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ def __init__(
283283
"v2.delete_llm_obs_experiments": False,
284284
"v2.delete_llm_obs_projects": False,
285285
"v2.get_llm_obs_annotated_interactions": False,
286+
"v2.get_llm_obs_annotated_interactions_by_trace_i_ds": False,
286287
"v2.get_llm_obs_annotation_queue_label_schema": False,
287288
"v2.get_llm_obs_custom_eval_config": False,
288289
"v2.list_llm_obs_annotation_queues": False,

0 commit comments

Comments
 (0)