Langfuse Sessions API

The Sessions API from Langfuse — 2 operation(s) for sessions.

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-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

langfuse-sessions-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: langfuse AnnotationQueues Sessions API
  version: "1.0"
  description: '## Authentication


    Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), 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: Sessions
paths:
  /api/public/sessions:
    get:
      description: Get sessions
      operationId: sessions_list
      tags:
      - Sessions
      parameters:
      - name: page
        in: query
        description: Page number, starts at 1
        required: false
        schema:
          type: integer
          nullable: true
      - 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.
        required: false
        schema:
          type: integer
          nullable: true
      - name: fromTimestamp
        in: query
        description: Optional filter to only include sessions created on or after a certain datetime (ISO 8601)
        required: false
        schema:
          type: string
          format: date-time
          nullable: true
      - name: toTimestamp
        in: query
        description: Optional filter to only include sessions created before a certain datetime (ISO 8601)
        required: false
        schema:
          type: string
          format: date-time
          nullable: true
      - name: environment
        in: query
        description: Optional filter for sessions where the environment is one of the provided values.
        required: false
        schema:
          type: array
          items:
            type: string
            nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSessions'
        '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: []
  /api/public/sessions/{sessionId}:
    get:
      description: Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`
      operationId: sessions_get
      tags:
      - Sessions
      parameters:
      - name: sessionId
        in: path
        description: The unique id of a session
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionWithTraces'
        '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: []
components:
  schemas:
    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
    PaginatedSessions:
      title: PaginatedSessions
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Session'
        meta:
          $ref: '#/components/schemas/utilsMetaResponse'
      required:
      - data
      - meta
    Trace:
      title: Trace
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of a trace
        timestamp:
          type: string
          format: date-time
          description: The timestamp when the trace was created
        name:
          type: string
          nullable: true
          description: The name of the trace
        input:
          nullable: true
          description: The input data of the trace. Can be any JSON.
        output:
          nullable: true
          description: The output data of the trace. Can be any JSON.
        sessionId:
          type: string
          nullable: true
          description: The session identifier associated with the trace
        release:
          type: string
          nullable: true
          description: The release version of the application when the trace was created
        version:
          type: string
          nullable: true
          description: The version of the trace
        userId:
          type: string
          nullable: true
          description: The user identifier associated with the trace
        metadata:
          nullable: true
          description: The metadata associated with the trace. Can be any JSON.
        tags:
          type: array
          items:
            type: string
          description: The tags associated with the trace.
        public:
          type: boolean
          description: Public traces are accessible via url without login
        environment:
          type: string
          description: The environment from which this trace originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
      required:
      - id
      - timestamp
      - tags
      - public
      - environment
    SessionWithTraces:
      title: SessionWithTraces
      type: object
      properties:
        traces:
          type: array
          items:
            $ref: '#/components/schemas/Trace'
      required:
      - traces
      allOf:
      - $ref: '#/components/schemas/Session'
    Session:
      title: Session
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
          format: date-time
        projectId:
          type: string
        environment:
          type: string
          description: The environment from which this session originated.
      required:
      - id
      - createdAt
      - projectId
      - environment
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic