Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 191 additions & 14 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3125,12 +3125,14 @@ paths:

- `model` - providedModelName, internalModelId, modelParameters

- `usage` - usageDetails, costDetails, totalCost
- `usage` - usageDetails, costDetails, totalCost, usagePricingTierName

- `prompt` - promptId, promptName, promptVersion

- `metrics` - latency, timeToFirstToken

- `trace_context` - tags, release, traceName


If not specified, `core` and `basic` field groups are returned.

Expand All @@ -3152,7 +3154,7 @@ paths:
Comma-separated list of field groups to include in the response.

Available groups: core, basic, time, io, metadata, model, usage,
prompt, metrics.
prompt, metrics, trace_context.

If not specified, `core` and `basic` field groups are returned.

Expand Down Expand Up @@ -3299,12 +3301,12 @@ paths:
"column": string, // Required. Column to filter on (see available columns below)
"operator": string, // Required. Operator based on type:
// - datetime: ">", "<", ">=", "<="
// - string: "=", "contains", "does not contain", "starts with", "ends with"
// - string: "=", "contains", "does not contain", "starts with", "ends with", "matches"
// - stringOptions: "any of", "none of"
// - categoryOptions: "any of", "none of"
// - arrayOptions: "any of", "none of", "all of"
// - number: "=", ">", "<", ">=", "<="
// - stringObject: "=", "contains", "does not contain", "starts with", "ends with"
// - stringObject: "=", "contains", "does not contain", "starts with", "ends with", "matches"
// - numberObject: "=", ">", "<", ">=", "<="
// - boolean: "=", "<>"
// - null: "is null", "is not null"
Expand Down Expand Up @@ -3395,11 +3397,28 @@ paths:

### Structured Data

- `input` (string) - Observation input. Supports accelerated token
search with the `matches` operator.

- `output` (string) - Observation output. Supports accelerated token
search with the `matches` operator.

- `metadata` (stringObject/numberObject/categoryOptions) - Metadata
key-value pairs. Use `key` parameter to filter on specific metadata
keys.


The `matches` operator is only supported for `input`, `output`, and
stringObject `metadata` filters. It performs token-based full-text
search using the events table text indexes. Case sensitivity differs
by target: `input` and `output` matches are case-insensitive, while
metadata value matches are case-sensitive. Use `contains` for
substring semantics. Any v2 `input` or `output` filter must be
accompanied by at least one `=` or `matches` filter on `input` or
`output`; standalone `contains`, `starts with`, `ends with`, and
`does not contain` filters on these columns are rejected.


## Filter Examples

```json
Expand All @@ -3423,6 +3442,12 @@ paths:
"key": "environment",
"operator": "=",
"value": "production"
},
{
"type": "string",
"column": "output",
"operator": "matches",
"value": "needle"
}
]

Expand Down Expand Up @@ -5287,8 +5312,9 @@ paths:
- name: limit
in: query
description: >-
Limit of items per page. If you encounter api issues due to too
large page sizes, try to reduce the limit.
Limit of items per page. Maximum 100. Defaults to 50. Requests with
a limit greater than 100 return HTTP 400. If you encounter api
issues due to too large page sizes, try to reduce the limit.
required: false
schema:
type: integer
Expand Down Expand Up @@ -6188,7 +6214,8 @@ paths:

- every evaluator prompt variable must be mapped exactly once

- `expected_output` mappings are only valid for `target=experiment`
- `expected_output` and `experiment_item_metadata` mappings are only
valid for `target=experiment`

- if `enabled=true`, Langfuse validates that the referenced evaluator
can currently run
Expand Down Expand Up @@ -7244,9 +7271,55 @@ components:
title: BlobStorageExportFrequency
type: string
enum:
- every_20_minutes
- hourly
- daily
- weekly
BlobStorageExportSource:
title: BlobStorageExportSource
type: string
enum:
- LEGACY_TRACES_OBSERVATIONS
- OBSERVATIONS_V2
- LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS
description: >-
What data the integration exports.

- `LEGACY_TRACES_OBSERVATIONS`: traces, observations, and scores tables
with a fixed column set. The `exportFieldGroups` field is not
applicable.

- `OBSERVATIONS_V2`: same data model as the
`/api/public/v2/observations` endpoint, plus scores. Columns are
controlled by `exportFieldGroups`.

- `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: both sets. For the
`OBSERVATIONS_V2` portion, columns are controlled by
`exportFieldGroups`.


**Note:** `OBSERVATIONS_V2` and the enriched-observations portion of
`LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` rely on the enriched
observations table (Langfuse Fast Preview / v4), which is currently
available on Langfuse Cloud only. See https://langfuse.com/docs/v4.
BlobStorageExportFieldGroup:
title: BlobStorageExportFieldGroup
type: string
enum:
- core
- basic
- time
- io
- metadata
- model
- usage
- prompt
- metrics
- tools
- trace_context
description: >-
Field group for the OBSERVATIONS_V2 and
LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS export.
CreateBlobStorageIntegrationRequest:
title: CreateBlobStorageIntegrationRequest
type: object
Expand Down Expand Up @@ -7309,6 +7382,49 @@ components:
description: >-
Enable gzip compression for exported files (.csv.gz, .json.gz,
.jsonl.gz). Defaults to true.
exportSource:
$ref: '#/components/schemas/BlobStorageExportSource'
nullable: true
description: >-
Data to export. When omitted on update, the existing value is
preserved. When omitted on create: pre-cutoff Cloud projects and
self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`;
post-cutoff Cloud projects (created on or after 2026-05-20)
auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups`
is provided.


**Cloud-only deprecation gate (effective 2026-05-20):** For projects
created on or after 2026-05-20 on Langfuse Cloud,
`LEGACY_TRACES_OBSERVATIONS` and
`LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP
400. Omitting `exportSource` on these projects silently defaults to
`OBSERVATIONS_V2` rather than the schema column default. Use
`OBSERVATIONS_V2` for all new integrations. Projects created before
2026-05-20 and self-hosted deployments are unaffected.
exportFieldGroups:
type: array
items:
$ref: '#/components/schemas/BlobStorageExportFieldGroup'
nullable: true
description: >-
Field groups to include in each exported row.


For exportSource `OBSERVATIONS_V2` or
`LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if
provided. When omitted on create, the column default (all groups)
applies. When omitted on update, the existing value is preserved.


For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be
omitted or null. Sending an array (including an empty array) returns
400, because that source uses a fixed column set and does not honor
field groups.


`exportFieldGroups` requires `exportSource` to be provided in the
same request.
required:
- projectId
- type
Expand Down Expand Up @@ -7357,6 +7473,19 @@ components:
nullable: true
compressed:
type: boolean
exportSource:
$ref: '#/components/schemas/BlobStorageExportSource'
exportFieldGroups:
type: array
items:
$ref: '#/components/schemas/BlobStorageExportFieldGroup'
nullable: true
description: >-
Field groups included in each exported row for `OBSERVATIONS_V2` /
`LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` sources. Always `null`
when exportSource is `LEGACY_TRACES_OBSERVATIONS` (the field does
not apply to that source; any legacy DB value is hidden from the
public surface).
nextSyncAt:
type: string
format: date-time
Expand Down Expand Up @@ -7391,6 +7520,7 @@ components:
- fileType
- exportMode
- compressed
- exportSource
- createdAt
- updatedAt
BlobStorageIntegrationsResponse:
Expand Down Expand Up @@ -7432,9 +7562,9 @@ components:
Compare `lastSyncAt` against your

ETL bookmark to determine if new data is available. Note that exports
run with a 30-minute lag buffer,
run with a 20-minute lag buffer,

so `lastSyncAt` will always be at least 30 minutes behind real-time.
so `lastSyncAt` will always be at least 20 minutes behind real-time.
BlobStorageIntegrationStatusResponse:
title: BlobStorageIntegrationStatusResponse
type: object
Expand Down Expand Up @@ -7990,6 +8120,12 @@ components:
format: double
nullable: true
description: The total cost of the observation in USD
usagePricingTierName:
type: string
nullable: true
description: >-
The name of the pricing tier applied to this observation's usage
costs
promptId:
type: string
nullable: true
Expand All @@ -8015,7 +8151,44 @@ components:
modelId:
type: string
nullable: true
description: The matched model ID
description: >-
The matched model ID. Null when the `model` field group is not
requested.
inputPrice:
type: string
nullable: true
description: >-
The input token price (USD per unit) from the matched model,
serialized as a decimal string (e.g. "0.0001"). Null when the
`model` field group is not requested.
outputPrice:
type: string
nullable: true
description: >-
The output token price (USD per unit) from the matched model,
serialized as a decimal string (e.g. "0.0001"). Null when the
`model` field group is not requested.
totalPrice:
type: string
nullable: true
description: >-
The total token price (USD per unit) from the matched model,
serialized as a decimal string (e.g. "0.0001"). Null when the
`model` field group is not requested.
traceName:
type: string
nullable: true
description: The name of the parent trace
tags:
type: array
items:
type: string
nullable: true
description: Tags from the parent trace (denormalized onto the observation)
release:
type: string
nullable: true
description: The release version of the parent trace
required:
- id
- startTime
Expand Down Expand Up @@ -11811,7 +11984,7 @@ components:
generations, spans, and events.
It supports mapping from `input`, `output`, and `metadata`.
- `experiment` evaluates live experiment executions and can additionally
map `expected_output`.
map `expected_output` and `experiment_item_metadata`.
It currently supports filtering by `datasetId`.
Discover valid dataset IDs with `GET /api/public/v2/datasets`, then use the returned dataset `id` values in your filter.
unstableEvaluationRuleStatus:
Expand Down Expand Up @@ -11839,6 +12012,7 @@ components:
- output
- metadata
- expected_output
- experiment_item_metadata
description: >-
Source field used to populate a prompt variable.

Expand All @@ -11850,8 +12024,8 @@ components:

- `target=observation` supports `input`, `output`, and `metadata`

- `target=experiment` supports `input`, `output`, `metadata`, and
`expected_output`
- `target=experiment` supports `input`, `output`, `metadata`,
`expected_output`, and `experiment_item_metadata`


Source semantics:
Expand All @@ -11865,6 +12039,9 @@ components:

- `expected_output`: the experiment item's expected output. Only valid
for `target=experiment`.

- `experiment_item_metadata`: the experiment item's metadata object.
Only valid for `target=experiment`.
unstableEvaluatorModelConfig:
title: unstableEvaluatorModelConfig
type: object
Expand Down Expand Up @@ -12327,7 +12504,7 @@ components:
- `target=observation`: `input`, `output`, `metadata`

- `target=experiment`: `input`, `output`, `metadata`,
`expected_output`
`expected_output`, `experiment_item_metadata`
jsonPath:
type: string
nullable: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langfuse-cli",
"version": "0.0.10",
"version": "0.0.11",
"description": "Interact with Langfuse API from the command line",
"author": "Langfuse",
"license": "MIT",
Expand Down