openapi: 3.0.1 info: title: langfuse AnnotationQueues Datasets 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: Datasets paths: /api/public/v2/datasets: get: description: Get all datasets operationId: datasets_list tags: - Datasets 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 required: false schema: type: integer nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedDatasets' '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: [] post: description: Create a dataset operationId: datasets_create tags: - Datasets parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Dataset' '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/CreateDatasetRequest' /api/public/v2/datasets/{datasetName}: get: description: Get a dataset operationId: datasets_get tags: - Datasets parameters: - name: datasetName in: path required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Dataset' '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/datasets/{datasetName}/runs/{runName}: get: description: Get a dataset run and its items operationId: datasets_getRun tags: - Datasets parameters: - name: datasetName in: path required: true schema: type: string - name: runName in: path required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/DatasetRunWithItems' '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: [] delete: description: Delete a dataset run and all its run items. This action is irreversible. operationId: datasets_deleteRun tags: - Datasets parameters: - name: datasetName in: path required: true schema: type: string - name: runName in: path required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/DeleteDatasetRunResponse' '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/datasets/{datasetName}/runs: get: description: Get dataset runs operationId: datasets_getRuns tags: - Datasets parameters: - name: datasetName in: path required: true schema: type: string - 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 required: false schema: type: integer nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedDatasetRuns' '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: CreateDatasetRequest: title: CreateDatasetRequest type: object properties: name: type: string description: type: string nullable: true metadata: nullable: true inputSchema: nullable: true description: JSON Schema for validating dataset item inputs. When set, all new and existing dataset items will be validated against this schema. expectedOutputSchema: nullable: true description: JSON Schema for validating dataset item expected outputs. When set, all new and existing dataset items will be validated against this schema. required: - name DatasetRun: title: DatasetRun type: object properties: id: type: string description: Unique identifier of the dataset run name: type: string description: Name of the dataset run description: type: string nullable: true description: Description of the run metadata: description: Metadata of the dataset run datasetId: type: string description: Id of the associated dataset datasetName: type: string description: Name of the associated dataset createdAt: type: string format: date-time description: The date and time when the dataset run was created updatedAt: type: string format: date-time description: The date and time when the dataset run was last updated required: - id - name - metadata - datasetId - datasetName - createdAt - updatedAt 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 DeleteDatasetRunResponse: title: DeleteDatasetRunResponse type: object properties: message: type: string required: - message DatasetRunItem: title: DatasetRunItem type: object properties: id: type: string datasetRunId: type: string datasetRunName: type: string datasetItemId: type: string traceId: type: string observationId: type: string nullable: true description: The observation ID associated with this run item createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - datasetRunId - datasetRunName - datasetItemId - traceId - createdAt - updatedAt Dataset: title: Dataset type: object properties: id: type: string name: type: string description: type: string nullable: true description: Description of the dataset metadata: description: Metadata associated with the dataset inputSchema: nullable: true description: JSON Schema for validating dataset item inputs expectedOutputSchema: nullable: true description: JSON Schema for validating dataset item expected outputs projectId: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - id - name - metadata - projectId - createdAt - updatedAt DatasetRunWithItems: title: DatasetRunWithItems type: object properties: datasetRunItems: type: array items: $ref: '#/components/schemas/DatasetRunItem' required: - datasetRunItems allOf: - $ref: '#/components/schemas/DatasetRun' PaginatedDatasetRuns: title: PaginatedDatasetRuns type: object properties: data: type: array items: $ref: '#/components/schemas/DatasetRun' meta: $ref: '#/components/schemas/utilsMetaResponse' required: - data - meta PaginatedDatasets: title: PaginatedDatasets type: object properties: data: type: array items: $ref: '#/components/schemas/Dataset' meta: $ref: '#/components/schemas/utilsMetaResponse' required: - data - meta securitySchemes: BasicAuth: type: http scheme: basic