Langfuse DatasetItems API

The DatasetItems API from Langfuse — 2 operation(s) for datasetitems.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/public/dataset-items Add an item to a dataset · Dataset items create #
Ask an LLM
“How do I add a prompt and expected output to a dataset?”
“Can I upsert a dataset item by its id?”
Tell an agent
Add {input} to dataset {datasetName} with expected output {expectedOutput}.
Upsert dataset {datasetName} item {id} with status {status}.
GET /api/public/dataset-items List items in a dataset · Dataset items list #
Ask an LLM
“What items are in a dataset?”
“Can I see a dataset's items as they were at a past version?”
Tell an agent
List items in dataset {datasetName}.
Show {datasetName} items as of version {version}.
GET /api/public/dataset-items/{id} Get a dataset item · Dataset items get #
Ask an LLM
“What input and expected output does a dataset item have?”
“Can I fetch one dataset item by id?”
Tell an agent
Get dataset item {id}.
Show the input and expected output of dataset item {id}.
DELETE /api/public/dataset-items/{id} Delete a dataset item · Dataset items delete #
Ask an LLM
“How do I remove a dataset item and its runs?”
“Is deleting a dataset item permanent?”
Tell an agent destructive · confirm first
Delete dataset item {id}.
Remove dataset item {id} and all its run items.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/langfuse:langfuse-datasetitems-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

langfuse-datasetitems-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: langfuse Dataset Items API
  version: ''
  description: '## Authentication


    Authenticate with the API using Basic Auth, get API keys in the project settings:


    - username: Langfuse Public Key

    - password: Langfuse Secret Key


    ## Exports


    - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml'
tags:
- name: DatasetItems
paths:
  /api/public/dataset-items:
    post:
      description: Create a dataset item
      operationId: datasetItems_create
      tags:
      - DatasetItems
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetItem'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDatasetItemRequest'
      summary: Dataset items create
      x-summary-source: derived
    get:
      description: 'Get dataset items. Optionally specify a version to get the items as they existed at that point in time.

        Note: If version parameter is provided, datasetName must also be provided.'
      operationId: datasetItems_list
      tags:
      - DatasetItems
      parameters:
      - name: datasetName
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: sourceTraceId
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: sourceObservationId
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: version
        in: query
        description: 'ISO 8601 timestamp (RFC 3339, Section 5.6) in UTC (e.g., "2026-01-21T14:35:42Z").

          If provided, returns state of dataset at this timestamp.

          If not provided, returns the latest version. Requires datasetName to be specified.'
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - name: page
        in: query
        description: page number, starts at 1
        required: false
        schema:
          type:
          - integer
          - 'null'
      - name: limit
        in: query
        description: limit of items per page
        required: false
        schema:
          type:
          - integer
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetItems'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      summary: Dataset items list
      x-summary-source: derived
  /api/public/dataset-items/{id}:
    get:
      description: Get a dataset item
      operationId: datasetItems_get
      tags:
      - DatasetItems
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetItem'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      summary: Dataset items get
      x-summary-source: derived
    delete:
      description: Delete a dataset item and all its run items. This action is irreversible.
      operationId: datasetItems_delete
      tags:
      - DatasetItems
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteDatasetItemResponse'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      summary: Dataset items delete
      x-summary-source: derived
components:
  schemas:
    PaginatedDatasetItems:
      title: PaginatedDatasetItems
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DatasetItem'
        meta:
          $ref: '#/components/schemas/utilsMetaResponse'
      required:
      - data
      - meta
    DatasetStatus:
      title: DatasetStatus
      type: string
      enum:
      - ACTIVE
      - ARCHIVED
    utilsMetaResponse:
      title: utilsMetaResponse
      type: object
      properties:
        page:
          type: integer
          description: current page number
        limit:
          type: integer
          description: number of items per page
        totalItems:
          type: integer
          description: number of total items given the current filters/selection (if any)
        totalPages:
          type: integer
          description: number of total pages given the current limit
      required:
      - page
      - limit
      - totalItems
      - totalPages
    DeleteDatasetItemResponse:
      title: DeleteDatasetItemResponse
      type: object
      properties:
        message:
          type: string
          description: Success message after deletion
      required:
      - message
    DatasetItem:
      title: DatasetItem
      type: object
      properties:
        id:
          type: string
        status:
          $ref: '#/components/schemas/DatasetStatus'
        input:
          description: Input data for the dataset item
        expectedOutput:
          description: Expected output for the dataset item
        metadata:
          description: Metadata associated with the dataset item
        sourceTraceId:
          type:
          - string
          - 'null'
          description: The trace ID that sourced this dataset item
        sourceObservationId:
          type:
          - string
          - 'null'
          description: The observation ID that sourced this dataset item
        datasetId:
          type: string
        datasetName:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - status
      - input
      - expectedOutput
      - metadata
      - datasetId
      - datasetName
      - createdAt
      - updatedAt
    CreateDatasetItemRequest:
      title: CreateDatasetItemRequest
      type: object
      properties:
        datasetName:
          type: string
        input: {}
        expectedOutput: {}
        metadata: {}
        sourceTraceId:
          type:
          - string
          - 'null'
        sourceObservationId:
          type:
          - string
          - 'null'
        id:
          type:
          - string
          - 'null'
          description: Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets.
        status:
          $ref: '#/components/schemas/DatasetStatus'
          description: Defaults to ACTIVE for newly created items
      required:
      - datasetName
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
x-provenance:
  method: harvested
  publisher: Langfuse
  source: https://cloud.langfuse.com/generated/api/openapi.yml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)