---
title: "Push events for an LLM Observability experiment"
method: POST
path: "/api/v2/llm-obs/v1/experiments/{experiment_id}/events"
tags: ["LLM Observability"]
---

# Push events for an LLM Observability experiment

`POST /api/v2/llm-obs/v1/experiments/{experiment_id}/events`

Push spans and metrics for an LLM Observability experiment.

## Path parameters

- `experiment_id` string, required

## Request body

- LLMObsExperimentEventsRequest — Request to push spans and metrics for an LLM Observability experiment.
  - `data` LLMObsExperimentEventsDataRequest, required — Data object for pushing experiment events.
    - `attributes` LLMObsExperimentEventsDataAttributesRequest, required — Attributes for pushing experiment events including spans and metrics.
      - `metrics` LLMObsExperimentMetric[] — List of metrics to push for the experiment.
        - `assessment` 'pass' | 'fail' — Assessment result for an LLM Observability experiment metric.
        - `boolean_value` boolean — Boolean value. Used when `metric_type` is `boolean`.
        - `categorical_value` string — Categorical value. Used when `metric_type` is `categorical`.
        - `error` LLMObsExperimentMetricError — Error details for an experiment metric evaluation.
          - `message` string — Error message associated with the metric evaluation.
        - `json_value` object — JSON value. Used when `metric_type` is `json`.
        - `label` string, required — Label or name for the metric.
        - `metadata` object — Arbitrary metadata associated with the metric.
        - `metric_type` 'score' | 'categorical' | 'boolean' | 'json', required — Type of metric recorded for an LLM Observability experiment.
        - `reasoning` string — Human-readable reasoning for the metric value.
        - `score_value` number, double — Numeric score value. Used when `metric_type` is `score`.
        - `span_id` string, required — The ID of the span this metric measures.
        - `tags` string[] — List of tags associated with the metric.
        - `timestamp_ms` integer, required — Timestamp when the metric was recorded, in milliseconds since Unix epoch.
      - `spans` LLMObsExperimentSpan[] — List of spans to push for the experiment.
        - `dataset_id` string, required — Dataset ID associated with this span.
        - `duration` integer, required — Duration of the span in nanoseconds.
        - `meta` LLMObsExperimentSpanMeta — Metadata associated with an experiment span.
          - `error` LLMObsExperimentSpanError — Error details for an experiment span.
            - `message` string — Error message.
            - `stack` string — Stack trace of the error.
            - `type` string — The error type or exception class name.
          - `expected_output` object — Expected output for the span, used for evaluation.
          - `input` AnyValue, nullable — An arbitrary object value with additional properties.
          - `output` AnyValue, nullable — An arbitrary object value with additional properties.
        - `name` string, required — Name of the span.
        - `project_id` string, required — Project ID associated with this span.
        - `span_id` string, required — Unique identifier of the span.
        - `start_ns` integer, required — Start time of the span in nanoseconds since Unix epoch.
        - `status` 'ok' | 'error', required — Status of the span.
        - `tags` string[] — List of tags associated with the span.
        - `trace_id` string, required — Trace ID for the span.
    - `type` 'events', required — Resource type for LLM Observability experiment events.

## Response `202`

Accepted

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.dev/datadog/apis/api-v2.md) · [All operations](https://skmtc.dev/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
