Constructor
new Client(options:ClientConfig={}):Client
Namespaces
charts
create
create(Create a new chartrequest:CreateChartRequest):Promise<CreateChartResponse>
delete
delete(Delete a chartrequest:DeleteChartRequest):Promise<DeleteChartResponse>
get
get(Get a chart Retrieve a single chart by id.request:GetChartRequest):Promise<GetChartResponse>
list
list():List charts Retrieve all charts in the current scope.Promise<GetChartsResponse>
update
update(Update a chart Update a chart’s editable fields. Only fields included in the request body are modified.request:UpdateChartRequest):Promise<UpdateChartResponse>
datapoints
create
create(Create a new datapoint Create a single datapoint with inputs, history, ground truth, and metadata.request:CreateDatapointRequest):Promise<CreateDatapointResponse>
createBatch
createBatch(Create multiple datapoints in batch Create multiple datapoints from events using field mappings and optional filters.request:BatchCreateDatapointsRequest):Promise<BatchCreateDatapointsResponse>
delete
delete(Delete a specific datapoint Permanently delete a datapoint by its unique identifier.request:DeleteDatapointRequest):Promise<DeleteDatapointResponse>
get
get(Retrieve a specific datapoint Get a single datapoint by its unique identifier.request:GetDatapointRequest):Promise<GetDatapointResponse>
list
list(Retrieve a list of datapoints Retrieve datapoints, optionally filtered by a list of datapoint IDs or dataset name.request?:GetDatapointsRequest):Promise<GetDatapointsResponse>
update
update(Update a specific datapoint Update fields on an existing datapoint. Only the provided fields are modified.request:UpdateDatapointRequest):Promise<UpdateDatapointResponse>
datasets
addDatapoints
addDatapoints(Add datapoints to a dataset Add new datapoints to an existing dataset. Provide raw data objects and a field mapping that specifies which fields map to inputs, ground truth, and history.request:AddDatapointsRequest):Promise<AddDatapointsResponse>
create
create(Create a dataset Create a new dataset with an optional name, description, and initial set of datapoint IDs.request:CreateDatasetRequest):Promise<CreateDatasetResponse>
delete
delete(Delete a dataset Permanently delete a dataset by its unique identifier.request:DeleteDatasetRequest):Promise<DeleteDatasetResponse>
list
list(Get datasets Retrieve datasets, optionally filtered by dataset ID or name.request?:GetDatasetsRequest):Promise<GetDatasetsResponse>
removeDatapoint
removeDatapoint(Remove a datapoint from a dataset Remove a specific datapoint from a dataset. The datapoint itself is not deleted, only dereferenced from the dataset.request:RemoveDatapointRequest):Promise<RemoveDatapointResponse>
update
update(Update a dataset Update a dataset’s name, description, or list of datapoint IDs.request:UpdateDatasetRequest):Promise<UpdateDatasetResponse>
events
create
create(Create a new event Create a new event (span) within a session trace. The request body is a bare event object (norequest:CreateEventRequest):Promise<CreateEventResponse>
event wrapper).
Required properties:
event_type(string): Must be one of:chain,model,tool,session.inputs(object): Input data for the event.
event_id(string, UUID): Unique identifier for the event.session_id(string, UUID): Session/trace identifier.parent_id(string, UUID): Parent event ID. Defaults tosession_id.
event_name(string): Name of the event. Defaults to"unknown".source(string): Source of the event (e.g.sdk-python). Defaults to"unknown".
config(object): Configuration data (e.g. model parameters, prompt templates).outputs(object): Output data from the event.error(string or null): Error message if the event failed.children_ids(array of strings): IDs of child events.duration(number): Duration of the event in milliseconds.start_time(number): Unix timestamp in milliseconds for event start.end_time(number): Unix timestamp in milliseconds for event end.metadata(object): Additional metadata (e.g. token counts, cost).metrics(object): Custom metrics.feedback(object): Feedback data (e.g. ratings, ground truth).user_properties(object): User properties associated with the event.
Example response
createBatch
createBatch(Create a batch of events Create multiple events in a single request. Whenrequest:CreateEventBatchRequest):Promise<CreateEventBatchResponse>
single_session is
true, all events share the same session created from session_properties.
Required properties:
events(array of event objects): Each event must includeevent_type(one ofchain,model,tool,session) andinputs.
single_session(boolean): If true, all events share a single session created fromsession_properties. Defaults to false.session_properties(object): Session metadata used whensingle_sessionis true. May includesession_name,start_time,metadata.
is_single_session, session, and
per-event project are no longer accepted.
Example response
search
search(Retrieve events based on filters Search events via POST with filtering and pagination. This is the primary method for retrieving events from HoneyHive.request:SearchEventsRequest):Promise<SearchEventsResponse>
update
update(Update an event Update fields on an existing event. Only the provided fields are modified; omitted fields are left unchanged. Extra fields not listed below are accepted by the server but silently ignored.request:UpdateEventRequest):Promise<void>
Example request
experiments
compareRunEvents
compareRunEvents(Compare events between two experiment runs Retrieve and compare events between two experiment runs for detailed analysisrequest:GetExperimentCompareEventsRequest):Promise<GetExperimentCompareEventsResponse>
compareRuns
compareRuns(Retrieve experiment comparison Compare metrics and results between two experiment runsrequest:GetExperimentComparisonRequest):Promise<GetExperimentComparisonResponse>
createRun
createRun(Create a new evaluation run Create a new experiment run to track an evaluation against a dataset.request:CreateRunRequest):Promise<CreateRunResponse>
deleteRun
deleteRun(Delete an evaluation run Permanently delete an experiment run by its run ID.request:DeleteRunRequest):Promise<DeleteRunResponse>
getRun
getRun(Get details of an evaluation run Retrieve the full details of a single experiment run by its run ID.request:GetRunRequest):Promise<GetRunResponse>
getRunMetrics
getRunMetrics(Get event metrics for an experiment run Retrieve event metrics from ClickHouse for a specific experiment runrequest:GetExperimentRunMetricsRequest):Promise<GetExperimentRunMetricsResponse>
getRunSchema
getRunSchema(Get events schema for a single experiment run Retrieve the events schema (fields, datasets, mappings) for a single experiment run.request:GetRunSchemaRequest):Promise<GetRunSchemaResponse>
getRunsSchema
getRunsSchema(Get events schema across all experiment runs in a project Retrieve the aggregated events schema (fields, datasets, mappings) across all experiment runs in the project.request?:GetRunsSchemaRequest):Promise<GetRunsSchemaResponse>
getSummary
getSummary(Retrieve experiment summary Compute evaluation summary for an experiment run: pass/fail results, metric aggregations, per-datapoint results, event details, and the experiment run object.request:GetExperimentSummaryRequest):Promise<GetExperimentSummaryResponse>
listRuns
listRuns(Get a list of evaluation runs List experiment runs with optional filtering by dataset, status, name, date range, and specific run IDs. Results are paginated and sortable.request?:GetRunsRequest):Promise<GetRunsResponse>
updateRun
updateRun(Update an evaluation run Update fields on an existing experiment run such as name, status, metadata, or results.request:UpdateRunRequest):Promise<UpdateRunResponse>
metricVersions
create
create(Create a new metric version Snapshot the supplied metric definition as a new version. By default the version is created as a draft (request:CreateMetricVersionRequest):Promise<CreateMetricVersionResponse>
deployed: false); set deploy_immediately: true to also make it the live version in the same transaction.
deploy
deploy(Deploy a specific metric version Mark the named version as the live version for the metric, unmarking any previously deployed version.request:DeployMetricVersionRequest):Promise<DeployMetricVersionResponse>
list
list(List versions for a metric Retrieve all snapshot versions of the metric’s definition, ordered oldest-first. Returns the full version history unpaginated.request:GetMetricVersionsRequest):Promise<GetMetricVersionsResponse>
metrics
create
create(Create a new metricrequest:CreateMetricRequest):Promise<CreateMetricResponse>
delete
delete(Delete a metricrequest:DeleteMetricRequest):Promise<DeleteMetricResponse>
list
list(List all metricsrequest?:GetMetricsRequest):Promise<GetMetricsResponse>
run
run(Run a metric evaluation Execute a metric on a specific eventrequest:RunMetricRequest):Promise<RunMetricResponse>
update
update(Update an existing metric Update a metric’s editable fields. Only fields included in the request body are modified.request:UpdateMetricRequest):Promise<UpdateMetricResponse>
sessions
create
create(Start a new session Start a new session. The request body is a bare session object (norequest:CreateSessionRequest):Promise<CreateSessionResponse>
session wrapper). The server creates a session event and returns
it.
No required properties. Every field has a server-side fallback.
Auto-generated properties (provided by the server when omitted):
session_id(string, UUID): Server generates a UUIDv4 if omitted or if the supplied value is not a valid UUID.
event_name(string): Falls back tosession_namewhen not provided; defaults to"unknown"if both are absent.source(string): Defaults to"unknown".
session_name(string): Display name for the session.start_time(number): Session start time as Unix milliseconds. The session normalizer usesgetInt64()which only accepts numeric types; if a string is passed, the server silently falls back to the current time.end_time(number): Session end time as Unix milliseconds (same numeric-only caveat asstart_time).duration(number): Session duration in milliseconds.config(object): Configuration associated with the session.inputs(object): Input data for the session.outputs(object): Output data from the session.metadata(object): Arbitrary metadata.user_properties(object): User properties.children_ids(array of strings): IDs of child events.
session_id: posting twice with the same session_id
merges metadata/user_properties into the existing session and returns
the existing event.
createEventBatch
createEventBatch(Add a batch of events to a session Add a batch of events to an existing session. Each event in the batch is stored withrequest:CreateSessionEventBatchRequest):Promise<CreateSessionEventBatchResponse>
session_id set from the URL path, overriding any
session_id in the event body.
Each event must include event_type (one of chain, model, tool,
session) and inputs. Unknown top-level fields and unknown per-event
fields are rejected. Events are processed sequentially. For
higher-throughput ingestion across sessions, use
POST /v1/events/batch instead.

