Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

hotfix: openapi spec not included in public folder during build

Marc Klingenfa9e90ed756a
diff --git a/web/public/.gitignore b/web/public/.gitignore
index 0ea87c04d0..9cf06e40c4 100644
--- a/web/public/.gitignore
+++ b/web/public/.gitignore
@@ -1 +1 @@
-openapi*.yml
\ No newline at end of file
+# openapi*.yml
\ No newline at end of file
diff --git a/web/public/openapi-client.yml b/web/public/openapi-client.yml
new file mode 100644
index 0000000000..b14a895218
--- /dev/null
+++ b/web/public/openapi-client.yml
@@ -0,0 +1,104 @@
+openapi: 3.0.1
+info:
+ title: langfuse
+ version: ''
+paths:
+ /api/public/scores:
+ post:
+ description: Add a score to the database, upserts on id
+ operationId: score_create
+ tags:
+ - Score
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Score'
+ '400':
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: string
+ '401':
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: string
+ '403':
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: string
+ '405':
+ description: ''
+ content:
+ application/json:
+ schema:
+ type: string
+ security:
+ - BearerAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateScoreRequest'
+components:
+ schemas:
+ CreateScoreRequest:
+ title: CreateScoreRequest
+ type: object
+ properties:
+ id:
+ type: string
+ traceId:
+ type: string
+ name:
+ type: string
+ value:
+ type: number
+ format: double
+ observationId:
+ type: string
+ comment:
+ type: string
+ required:
+ - traceId
+ - name
+ - value
+ Score:
+ title: Score
+ type: object
+ properties:
+ id:
+ type: string
+ traceId:
+ type: string
+ name:
+ type: string
+ value:
+ type: number
+ format: double
+ observationId:
+ type: string
+ timestamp:
+ type: string
+ format: date-time
+ comment:
+ type: string
+ required:
+ - id
+ - traceId
+ - name
+ - value
+ - timestamp
+ securitySchemes:
+ BearerAuth:
+ type: http
+ scheme: bearer
diff --git a/web/public/openapi-server.yml b/web/public/openapi-server.yml
new file mode 100644
index 0000000000..32575df62f
--- /dev/null
+++ b/web/public/openapi-server.yml
@@ -0,0 +1,2696 @@
+openapi: 3.0.1
+info:
+ title: langfuse
+ 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
+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: &ref_0
+ - BasicAuth: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateDatasetItemRequest'
+ /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: *ref_0
+ /api/public/dataset-run-items:
+ post:
+ description: Create a dataset run item
+ operationId: datasetRunItems_create
+ tags:
+ - DatasetRunItems
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DatasetRunItem'
+ '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: *ref_0
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateDatasetRunItemRequest'
+ /api/public/datasets:
+ get:
+ description: Get all datasets
+ operationId: datasets_list
+ tags:
+ - Datasets
+ parameters:
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ nullable: true
+ - name: limit
+ in: query
+ 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: *ref_0
+ 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: *ref_0
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateDatasetRequest'
+ /api/public/datasets/{datasetName}:
+ get:
+ description: Get a dataset and its items
+ 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: *ref_0
+ /api/public/datasets/{datasetName}/runs/{runName}:
+ get:
+ description: Get a dataset run and its items
+ operationId: datasets_getRuns
+ 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/DatasetRun'
+ '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: *ref_0
+ /api/public/health:
+ get:
+ description: Check health of API and database
+ operationId: health_health
+ tags:
+ - Health
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HealthResponse'
+ '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: {}
+ '503':
+ description: ''
+ /api/public/ingestion:
+ post:
+ description: Batched ingestion for Langfuse Tracing
+ operationId: ingestion_batch
+ tags:
+ - Ingestion
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IngestionResponse'
+ '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: *ref_0
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ batch:
+ type: array
+ items:
+ $ref: '#/components/schemas/IngestionEvent'
+ required:
+ - batch
+ /api/public/metrics/daily:
+ get:
+ description: Get daily metrics of the Langfuse project
+ operationId: metrics_daily
+ tags:
+ - Metrics
+ 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
+ - name: traceName
+ in: query
+ description: Optional filter by the name of the trace
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: userId
+ in: query
+ description: Optional filter by the userId associated with the trace
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: tags
+ in: query
+ description: Optional filter for metrics where traces include all of these tags
+ required: false
+ schema:
+ type: array
+ items:
+ type: string
+ nullable: true
+ - name: fromTimestamp
+ in: query
+ description: >-
+ Optional filter to only include traces on or after a certain
+ timestamp
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ - name: toTimestamp
+ in: query
+ description: Optional filter to only include traces before a certain timestamp
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyMetrics'
+ '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: *ref_0
+ /api/public/observations/{observationId}:
+ get:
+ description: Get a observation
+ operationId: observations_get
+ tags:
+ - Observations
+ parameters:
+ - name: observationId
+ in: path
+ description: >-
+ The unique langfuse identifier of an observation, can be an event,
+ span or generation
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObservationsView'
+ '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: *ref_0
+ /api/public/observations:
+ get:
+ description: Get a list of observations
+ operationId: observations_getMany
+ tags:
+ - Observations
+ 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: name
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: userId
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: type
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: traceId
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: parentObservationId
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: fromStartTime
+ in: query
+ description: >-
+ Retrieve only observations with a start_time greater than this
+ timestamp.
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ObservationsViews'
+ '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: *ref_0
+ /api/public/projects:
+ get:
+ description: Get Project associated with API key
+ operationId: projects_get
+ tags:
+ - Projects
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Projects'
+ '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: *ref_0
+ /api/public/prompts:
+ get:
+ description: Get a prompt
+ operationId: prompts_get
+ tags:
+ - Prompts
+ parameters:
+ - name: name
+ in: query
+ required: true
+ schema:
+ type: string
+ - name: version
+ in: query
+ required: false
+ schema:
+ type: integer
+ nullable: true
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Prompt'
+ '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: *ref_0
+ post:
+ description: Create a prompt
+ operationId: prompts_create
+ tags:
+ - Prompts
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Prompt'
+ '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: *ref_0
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreatePromptRequest'
+ /api/public/scores:
+ post:
+ description: Create a score
+ operationId: score_create
+ tags:
+ - Score
+ parameters: []
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Score'
+ '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: *ref_0
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateScoreRequest'
+ get:
+ description: Get a list of scores
+ operationId: score_get
+ tags:
+ - Score
+ 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: userId
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: name
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: fromTimestamp
+ in: query
+ description: Retrieve only scores newer than this timestamp.
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ - name: source
+ in: query
+ description: Retrieve only scores from a specific source.
+ required: true
+ schema:
+ $ref: '#/components/schemas/ScoreSource'
+ - name: operator
+ in: query
+ description: Retrieve only scores with <operator> value.
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: value
+ in: query
+ description: Retrieve only scores with <operator> value.
+ required: false
+ schema:
+ type: number
+ format: double
+ nullable: true
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Scores'
+ '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: *ref_0
+ /api/public/scores/{scoreId}:
+ get:
+ description: Get a score
+ operationId: score_get-by-id
+ tags:
+ - Score
+ parameters:
+ - name: scoreId
+ in: path
+ description: The unique langfuse identifier of a score
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Score'
+ '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: *ref_0
+ delete:
+ description: Delete a score
+ operationId: score_delete
+ tags:
+ - Score
+ parameters:
+ - name: scoreId
+ in: path
+ description: The unique langfuse identifier of a score
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: ''
+ '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: *ref_0
+ /api/public/sessions/{sessionId}:
+ get:
+ description: Get a session
+ 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: *ref_0
+ /api/public/traces/{traceId}:
+ get:
+ description: Get a specific trace
+ operationId: trace_get
+ tags:
+ - Trace
+ parameters:
+ - name: traceId
+ in: path
+ description: The unique langfuse identifier of a trace
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TraceWithFullDetails'
+ '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: *ref_0
+ /api/public/traces:
+ get:
+ description: Get list of traces.
+ operationId: trace_list
+ tags:
+ - Trace
+ 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: userId
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: name
+ in: query
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: fromTimestamp
+ in: query
+ description: Retrieve only traces newer than this timestamp.
+ required: false
+ schema:
+ type: string
+ format: date-time
+ nullable: true
+ - name: orderBy
+ in: query
+ description: >-
+ Format of the string [field].[asc/desc]. Fields: id, timestamp,
+ name, userId, release, version, public, bookmarked, sessionId.
+ Example: timestamp.asc
+ required: false
+ schema:
+ type: string
+ nullable: true
+ - name: tags
+ in: query
+ description: Only traces that include all of these tags will be returned.
+ required: false
+ schema:
+ type: array
+ items:
+ type: string
+ nullable: true
+ responses:
+ '200':
+ description: ''
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Traces'
+ '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: *ref_0
+components:
+ schemas:
+ Trace:
+ title: Trace
+ type: object
+ properties:
+ id:
+ type: string
+ description: The unique identifier of a trace
+ timestamp:
+ type: string
+ format: date-time
+ name:
+ type: string
+ nullable: true
+ input:
+ nullable: true
+ output:
+ nullable: true
+ sessionId:
+ type: string
+ nullable: true
+ release:
+ type: string
+ nullable: true
+ version:
+ type: string
+ nullable: true
+ userId:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ tags:
+ type: array
+ items:
+ type: string
+ nullable: true
+ public:
+ type: boolean
+ nullable: true
+ description: Public traces are accessible via url without login
+ required:
+ - id
+ - timestamp
+ TraceWithDetails:
+ title: TraceWithDetails
+ type: object
+ properties:
+ htmlPath:
+ type: string
+ description: Path of trace in Langfuse UI
+ latency:
+ type: number
+ format: double
+ description: Latency of trace in seconds
+ totalCost:
+ type: number
+ format: double
+ description: Cost of trace in USD
+ observations:
+ type: array
+ items:
+ type: string
+ description: List of observation ids
+ scores:
+ type: array
+ items:
+ type: string
+ description: List of score ids
+ required:
+ - htmlPath
+ - latency
+ - totalCost
+ - observations
+ - scores
+ allOf:
+ - $ref: '#/components/schemas/Trace'
+ TraceWithFullDetails:
+ title: TraceWithFullDetails
+ type: object
+ properties:
+ htmlPath:
+ type: string
+ description: Path of trace in Langfuse UI
+ totalCost:
+ type: number
+ format: double
+ description: Cost of trace in USD
+ observations:
+ type: array
+ items:
+ $ref: '#/components/schemas/ObservationsView'
+ scores:
+ type: array
+ items:
+ $ref: '#/components/schemas/Score'
+ required:
+ - htmlPath
+ - totalCost
+ - observations
+ - scores
+ allOf:
+ - $ref: '#/components/schemas/Trace'
+ Session:
+ title: Session
+ type: object
+ properties:
+ id:
+ type: string
+ createdAt:
+ type: string
+ format: date-time
+ projectId:
+ type: string
+ required:
+ - id
+ - createdAt
+ - projectId
+ SessionWithTraces:
+ title: SessionWithTraces
+ type: object
+ properties:
+ traces:
+ type: array
+ items:
+ $ref: '#/components/schemas/Trace'
+ required:
+ - traces
+ allOf:
+ - $ref: '#/components/schemas/Session'
+ Observation:
+ title: Observation
+ type: object
+ properties:
+ id:
+ type: string
+ traceId:
+ type: string
+ nullable: true
+ type:
+ type: string
+ name:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ completionStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ model:
+ type: string
+ nullable: true
+ modelParameters:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MapValue'
+ nullable: true
+ input:
+ nullable: true
+ version:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ output:
+ nullable: true
+ usage:
+ $ref: '#/components/schemas/Usage'
+ nullable: true
+ level:
+ $ref: '#/components/schemas/ObservationLevel'
+ statusMessage:
+ type: string
+ nullable: true
+ parentObservationId:
+ type: string
+ nullable: true
+ promptId:
+ type: string
+ nullable: true
+ required:
+ - id
+ - type
+ - startTime
+ - level
+ ObservationsView:
+ title: ObservationsView
+ type: object
+ properties:
+ modelId:
+ type: string
+ nullable: true
+ inputPrice:
+ type: number
+ format: double
+ nullable: true
+ outputPrice:
+ type: number
+ format: double
+ nullable: true
+ totalPrice:
+ type: number
+ format: double
+ nullable: true
+ calculatedInputCost:
+ type: number
+ format: double
+ nullable: true
+ calculatedOutputCost:
+ type: number
+ format: double
+ nullable: true
+ calculatedTotalCost:
+ type: number
+ format: double
+ nullable: true
+ latency:
+ type: number
+ format: double
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/Observation'
+ Usage:
+ title: Usage
+ type: object
+ description: Standard interface for usage and cost
+ properties:
+ input:
+ type: integer
+ nullable: true
+ description: Number of input units (e.g. tokens)
+ output:
+ type: integer
+ nullable: true
+ description: Number of output units (e.g. tokens)
+ total:
+ type: integer
+ nullable: true
+ description: Defaults to input+output if not set
+ unit:
+ $ref: '#/components/schemas/ModelUsageUnit'
+ nullable: true
+ inputCost:
+ type: number
+ format: double
+ nullable: true
+ description: USD input cost
+ outputCost:
+ type: number
+ format: double
+ nullable: true
+ description: USD output cost
+ totalCost:
+ type: number
+ format: double
+ nullable: true
+ description: USD total cost, defaults to input+output
+ Score:
+ title: Score
+ type: object
+ properties:
+ id:
+ type: string
+ traceId:
+ type: string
+ name:
+ type: string
+ value:
+ type: number
+ format: double
+ source:
+ $ref: '#/components/schemas/ScoreSource'
+ observationId:
+ type: string
+ nullable: true
+ timestamp:
+ type: string
+ format: date-time
+ comment:
+ type: string
+ nullable: true
+ required:
+ - id
+ - traceId
+ - name
+ - value
+ - source
+ - timestamp
+ DatasetCore:
+ title: DatasetCore
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ description:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ projectId:
+ type: string
+ createdAt:
+ type: string
+ format: date-time
+ updatedAt:
+ type: string
+ format: date-time
+ required:
+ - id
+ - name
+ - projectId
+ - createdAt
+ - updatedAt
+ DatasetWithReferences:
+ title: DatasetWithReferences
+ type: object
+ properties:
+ items:
+ type: array
+ items:
+ type: string
+ description: list of dataset item ids
+ runs:
+ type: array
+ items:
+ type: string
+ description: list of dataset run names
+ required:
+ - items
+ - runs
+ allOf:
+ - $ref: '#/components/schemas/DatasetCore'
+ Dataset:
+ title: Dataset
+ type: object
+ description: Dataset including all items
+ properties:
+ items:
+ type: array
+ items:
+ $ref: '#/components/schemas/DatasetItem'
+ runs:
+ type: array
+ items:
+ type: string
+ required:
+ - items
+ - runs
+ allOf:
+ - $ref: '#/components/schemas/DatasetCore'
+ DatasetItem:
+ title: DatasetItem
+ type: object
+ properties:
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/DatasetStatus'
+ input:
+ nullable: true
+ expectedOutput:
+ nullable: true
+ metadata:
+ nullable: true
+ sourceTraceId:
+ type: string
+ nullable: true
+ sourceObservationId:
+ type: string
+ nullable: true
+ datasetId:
+ type: string
+ datasetName:
+ type: string
+ createdAt:
+ type: string
+ format: date-time
+ updatedAt:
+ type: string
+ format: date-time
+ required:
+ - id
+ - status
+ - datasetId
+ - datasetName
+ - createdAt
+ - updatedAt
+ 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
+ createdAt:
+ type: string
+ format: date-time
+ updatedAt:
+ type: string
+ format: date-time
+ required:
+ - id
+ - datasetRunId
+ - datasetRunName
+ - datasetItemId
+ - traceId
+ - createdAt
+ - updatedAt
+ DatasetRun:
+ title: DatasetRun
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ description:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ datasetId:
+ type: string
+ datasetName:
+ type: string
+ createdAt:
+ type: string
+ format: date-time
+ updatedAt:
+ type: string
+ format: date-time
+ datasetRunItems:
+ type: array
+ items:
+ $ref: '#/components/schemas/DatasetRunItem'
+ required:
+ - id
+ - name
+ - datasetId
+ - datasetName
+ - createdAt
+ - updatedAt
+ - datasetRunItems
+ ModelUsageUnit:
+ title: ModelUsageUnit
+ type: string
+ enum:
+ - CHARACTERS
+ - TOKENS
+ - MILLISECONDS
+ - SECONDS
+ - IMAGES
+ description: Unit of usage in Langfuse
+ ObservationLevel:
+ title: ObservationLevel
+ type: string
+ enum:
+ - DEBUG
+ - DEFAULT
+ - WARNING
+ - ERROR
+ MapValue:
+ title: MapValue
+ oneOf:
+ - type: string
+ nullable: true
+ - type: integer
+ nullable: true
+ - type: boolean
+ nullable: true
+ - type: array
+ items:
+ type: string
+ nullable: true
+ DatasetStatus:
+ title: DatasetStatus
+ type: string
+ enum:
+ - ACTIVE
+ - ARCHIVED
+ ScoreSource:
+ title: ScoreSource
+ type: string
+ enum:
+ - API
+ - REVIEW
+ - EVAL
+ CreateDatasetItemRequest:
+ title: CreateDatasetItemRequest
+ type: object
+ properties:
+ datasetName:
+ type: string
+ input:
+ nullable: true
+ expectedOutput:
+ nullable: true
+ metadata:
+ nullable: true
+ sourceTraceId:
+ type: string
+ nullable: true
+ sourceObservationId:
+ type: string
+ nullable: true
+ id:
+ type: string
+ nullable: true
+ description: Dataset items are upserted on their id
+ required:
+ - datasetName
+ CreateDatasetRunItemRequest:
+ title: CreateDatasetRunItemRequest
+ type: object
+ properties:
+ runName:
+ type: string
+ runDescription:
+ type: string
+ nullable: true
+ description: Description of the run. If run exists, description will be updated.
+ metadata:
+ nullable: true
+ description: Metadata of the dataset run, updates run if run already exists
+ datasetItemId:
+ type: string
+ observationId:
+ type: string
+ nullable: true
+ traceId:
+ type: string
+ nullable: true
+ description: >-
+ traceId should always be provided. For compatibility with older SDK
+ versions it can also be inferred from the provided observationId.
+ required:
+ - runName
+ - datasetItemId
+ PaginatedDatasets:
+ title: PaginatedDatasets
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/DatasetWithReferences'
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
+ CreateDatasetRequest:
+ title: CreateDatasetRequest
+ type: object
+ properties:
+ name:
+ type: string
+ description:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ required:
+ - name
+ HealthResponse:
+ title: HealthResponse
+ type: object
+ properties:
+ version:
+ type: string
+ description: Langfuse server version
+ example: 1.25.0
+ status:
+ type: string
+ example: OK
+ required:
+ - version
+ - status
+ IngestionEvent:
+ title: IngestionEvent
+ oneOf:
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - trace-create
+ - $ref: '#/components/schemas/TraceEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - score-create
+ - $ref: '#/components/schemas/ScoreEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - event-create
+ - $ref: '#/components/schemas/CreateEventEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - generation-create
+ - $ref: '#/components/schemas/CreateGenerationEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - generation-update
+ - $ref: '#/components/schemas/UpdateGenerationEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - span-create
+ - $ref: '#/components/schemas/CreateSpanEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - span-update
+ - $ref: '#/components/schemas/UpdateSpanEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - sdk-log
+ - $ref: '#/components/schemas/SDKLogEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - observation-create
+ - $ref: '#/components/schemas/CreateObservationEvent'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - observation-update
+ - $ref: '#/components/schemas/UpdateObservationEvent'
+ required:
+ - type
+ ObservationType:
+ title: ObservationType
+ type: string
+ enum:
+ - SPAN
+ - GENERATION
+ - EVENT
+ IngestionUsage:
+ title: IngestionUsage
+ oneOf:
+ - $ref: '#/components/schemas/Usage'
+ - $ref: '#/components/schemas/OpenAIUsage'
+ OpenAIUsage:
+ title: OpenAIUsage
+ type: object
+ description: Usage interface of OpenAI for improved compatibility.
+ properties:
+ promptTokens:
+ type: integer
+ nullable: true
+ completionTokens:
+ type: integer
+ nullable: true
+ totalTokens:
+ type: integer
+ nullable: true
+ OptionalObservationBody:
+ title: OptionalObservationBody
+ type: object
+ properties:
+ traceId:
+ type: string
+ nullable: true
+ name:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ metadata:
+ nullable: true
+ input:
+ nullable: true
+ output:
+ nullable: true
+ level:
+ $ref: '#/components/schemas/ObservationLevel'
+ nullable: true
+ statusMessage:
+ type: string
+ nullable: true
+ parentObservationId:
+ type: string
+ nullable: true
+ version:
+ type: string
+ nullable: true
+ CreateEventBody:
+ title: CreateEventBody
+ type: object
+ properties:
+ id:
+ type: string
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/OptionalObservationBody'
+ UpdateEventBody:
+ title: UpdateEventBody
+ type: object
+ properties:
+ id:
+ type: string
+ required:
+ - id
+ allOf:
+ - $ref: '#/components/schemas/OptionalObservationBody'
+ CreateSpanBody:
+ title: CreateSpanBody
+ type: object
+ properties:
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/CreateEventBody'
+ UpdateSpanBody:
+ title: UpdateSpanBody
+ type: object
+ properties:
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/UpdateEventBody'
+ CreateGenerationBody:
+ title: CreateGenerationBody
+ type: object
+ properties:
+ completionStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ model:
+ type: string
+ nullable: true
+ modelParameters:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MapValue'
+ nullable: true
+ usage:
+ $ref: '#/components/schemas/IngestionUsage'
+ nullable: true
+ promptName:
+ type: string
+ nullable: true
+ promptVersion:
+ type: integer
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/CreateSpanBody'
+ UpdateGenerationBody:
+ title: UpdateGenerationBody
+ type: object
+ properties:
+ completionStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ model:
+ type: string
+ nullable: true
+ modelParameters:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MapValue'
+ nullable: true
+ usage:
+ $ref: '#/components/schemas/IngestionUsage'
+ nullable: true
+ promptName:
+ type: string
+ nullable: true
+ promptVersion:
+ type: integer
+ nullable: true
+ allOf:
+ - $ref: '#/components/schemas/UpdateSpanBody'
+ ObservationBody:
+ title: ObservationBody
+ type: object
+ properties:
+ id:
+ type: string
+ nullable: true
+ traceId:
+ type: string
+ nullable: true
+ type:
+ $ref: '#/components/schemas/ObservationType'
+ name:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ completionStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ model:
+ type: string
+ nullable: true
+ modelParameters:
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MapValue'
+ nullable: true
+ input:
+ nullable: true
+ version:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ output:
+ nullable: true
+ usage:
+ $ref: '#/components/schemas/Usage'
+ nullable: true
+ level:
+ $ref: '#/components/schemas/ObservationLevel'
+ nullable: true
+ statusMessage:
+ type: string
+ nullable: true
+ parentObservationId:
+ type: string
+ nullable: true
+ required:
+ - type
+ TraceBody:
+ title: TraceBody
+ type: object
+ properties:
+ id:
+ type: string
+ nullable: true
+ timestamp:
+ type: string
+ format: date-time
+ nullable: true
+ name:
+ type: string
+ nullable: true
+ userId:
+ type: string
+ nullable: true
+ input:
+ nullable: true
+ output:
+ nullable: true
+ sessionId:
+ type: string
+ nullable: true
+ release:
+ type: string
+ nullable: true
+ version:
+ type: string
+ nullable: true
+ metadata:
+ nullable: true
+ tags:
+ type: array
+ items:
+ type: string
+ nullable: true
+ public:
+ type: boolean
+ nullable: true
+ description: Make trace publicly accessible via url
+ SDKLogBody:
+ title: SDKLogBody
+ type: object
+ properties:
+ log: {}
+ required:
+ - log
+ ScoreBody:
+ title: ScoreBody
+ type: object
+ properties:
+ id:
+ type: string
+ nullable: true
+ traceId:
+ type: string
+ name:
+ type: string
+ value:
+ type: number
+ format: double
+ observationId:
+ type: string
+ nullable: true
+ comment:
+ type: string
+ nullable: true
+ required:
+ - traceId
+ - name
+ - value
+ BaseEvent:
+ title: BaseEvent
+ type: object
+ properties:
+ id:
+ type: string
+ timestamp:
+ type: string
+ metadata: {}
+ required:
+ - id
+ - timestamp
+ - metadata
+ TraceEvent:
+ title: TraceEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/TraceBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ CreateObservationEvent:
+ title: CreateObservationEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/ObservationBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ UpdateObservationEvent:
+ title: UpdateObservationEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/ObservationBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ ScoreEvent:
+ title: ScoreEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/ScoreBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ SDKLogEvent:
+ title: SDKLogEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/SDKLogBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ CreateGenerationEvent:
+ title: CreateGenerationEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/CreateGenerationBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ UpdateGenerationEvent:
+ title: UpdateGenerationEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/UpdateGenerationBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ CreateSpanEvent:
+ title: CreateSpanEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/CreateSpanBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ UpdateSpanEvent:
+ title: UpdateSpanEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/UpdateSpanBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ CreateEventEvent:
+ title: CreateEventEvent
+ type: object
+ properties:
+ body:
+ $ref: '#/components/schemas/CreateEventBody'
+ required:
+ - body
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ IngestionSuccess:
+ title: IngestionSuccess
+ type: object
+ properties:
+ id:
+ type: string
+ status:
+ type: integer
+ required:
+ - id
+ - status
+ IngestionError:
+ title: IngestionError
+ type: object
+ properties:
+ id:
+ type: string
+ status:
+ type: integer
+ message:
+ type: string
+ nullable: true
+ error:
+ nullable: true
+ required:
+ - id
+ - status
+ IngestionResponse:
+ title: IngestionResponse
+ type: object
+ properties:
+ successes:
+ type: array
+ items:
+ $ref: '#/components/schemas/IngestionSuccess'
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/IngestionError'
+ required:
+ - successes
+ - errors
+ DailyMetrics:
+ title: DailyMetrics
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyMetricsDetails'
+ description: A list of daily metrics, only days with ingested data are included.
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
+ DailyMetricsDetails:
+ title: DailyMetricsDetails
+ type: object
+ properties:
+ date:
+ type: string
+ countTraces:
+ type: integer
+ countObservations:
+ type: integer
+ totalCost:
+ type: number
+ format: double
+ usage:
+ type: array
+ items:
+ $ref: '#/components/schemas/UsageByModel'
+ required:
+ - date
+ - countTraces
+ - countObservations
+ - totalCost
+ - usage
+ UsageByModel:
+ title: UsageByModel
+ type: object
+ description: >-
+ Daily usage of a given model. Usage corresponds to the unit set for the
+ specific model (e.g. tokens).
+ properties:
+ model:
+ type: string
+ nullable: true
+ inputUsage:
+ type: integer
+ outputUsage:
+ type: integer
+ totalUsage:
+ type: integer
+ required:
+ - inputUsage
+ - outputUsage
+ - totalUsage
+ Observations:
+ title: Observations
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Observation'
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
+ ObservationsViews:
+ title: ObservationsViews
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/ObservationsView'
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
+ Projects:
+ title: Projects
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Project'
+ required:
+ - data
+ Project:
+ title: Project
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ required:
+ - id
+ - name
+ CreatePromptRequest:
+ title: CreatePromptRequest
+ oneOf:
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - chat
+ - $ref: '#/components/schemas/CreateChatPromptRequest'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - text
+ - $ref: '#/components/schemas/CreateTextPromptRequest'
+ required:
+ - type
+ CreateChatPromptRequest:
+ title: CreateChatPromptRequest
+ type: object
+ properties:
+ name:
+ type: string
+ isActive:
+ type: boolean
+ description: Should the prompt be promoted to production immediately?
+ prompt:
+ type: array
+ items:
+ $ref: '#/components/schemas/ChatMessage'
+ config:
+ nullable: true
+ required:
+ - name
+ - isActive
+ - prompt
+ CreateTextPromptRequest:
+ title: CreateTextPromptRequest
+ type: object
+ properties:
+ name:
+ type: string
+ isActive:
+ type: boolean
+ description: Should the prompt be promoted to production immediately?
+ prompt:
+ type: string
+ config:
+ nullable: true
+ required:
+ - name
+ - isActive
+ - prompt
+ Prompt:
+ title: Prompt
+ oneOf:
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - chat
+ - $ref: '#/components/schemas/ChatPrompt'
+ required:
+ - type
+ - type: object
+ allOf:
+ - type: object
+ properties:
+ type:
+ type: string
+ enum:
+ - text
+ - $ref: '#/components/schemas/TextPrompt'
+ required:
+ - type
+ BasePrompt:
+ title: BasePrompt
+ type: object
+ properties:
+ name:
+ type: string
+ version:
+ type: integer
+ config: {}
+ required:
+ - name
+ - version
+ - config
+ ChatMessage:
+ title: ChatMessage
+ type: object
+ properties:
+ role:
+ type: string
+ content:
+ type: string
+ required:
+ - role
+ - content
+ TextPrompt:
+ title: TextPrompt
+ type: object
+ properties:
+ prompt:
+ type: string
+ required:
+ - prompt
+ allOf:
+ - $ref: '#/components/schemas/BasePrompt'
+ ChatPrompt:
+ title: ChatPrompt
+ type: object
+ properties:
+ prompt:
+ type: array
+ items:
+ $ref: '#/components/schemas/ChatMessage'
+ required:
+ - prompt
+ allOf:
+ - $ref: '#/components/schemas/BasePrompt'
+ CreateScoreRequest:
+ title: CreateScoreRequest
+ type: object
+ properties:
+ id:
+ type: string
+ nullable: true
+ traceId:
+ type: string
+ name:
+ type: string
+ value:
+ type: number
+ format: double
+ observationId:
+ type: string
+ nullable: true
+ comment:
+ type: string
+ nullable: true
+ required:
+ - traceId
+ - name
+ - value
+ Scores:
+ title: Scores
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Score'
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
+ Traces:
+ title: Traces
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/TraceWithDetails'
+ meta:
+ $ref: '#/components/schemas/utilsMetaResponse'
+ required:
+ - data
+ - meta
+ Sort:
+ title: Sort
+ type: object
+ properties:
+ id:
+ type: string
+ required:
+ - id
+ 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
+ securitySchemes:
+ BasicAuth:
+ type: http
+ scheme: basic