coaiajs 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,11 @@
1
1
  openapi: 3.1.0
2
2
  info:
3
3
  title: Langfuse Ceremony Observations
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  description: >-
6
- Focused Langfuse v4 action surface for a Custom GPT. It can create a trace,
7
- append nested observations to an existing trace through OTLP/HTTP JSON,
8
- inspect observations, and perform the ceremony's core prompt, dataset,
9
- score, comment, and project operations. A trace is created by exporting a
10
- root observation; append a child by reusing the 32-character traceId,
11
- generating a fresh 16-character spanId, and setting parentSpanId to the
12
- parent observation's ID. Spans are immutable.
6
+ Focused Langfuse v4 Custom GPT actions for creating root observations, appending nested child observations through
7
+ OTLP/HTTP JSON, reading observations, and managing projects, prompts, datasets, scores, comments, and media. Spans
8
+ are immutable.
13
9
  license:
14
10
  name: MIT
15
11
  identifier: MIT
@@ -36,38 +32,19 @@ tags:
36
32
  description: Apply and inspect evaluations and score configurations.
37
33
  - name: Comments
38
34
  description: Attach and inspect comments on Langfuse objects.
35
+ - name: Media
36
+ description: Create upload records and inspect or finalize uploaded media.
39
37
  paths:
40
38
  /api/public/otel/v1/traces:
41
39
  post:
42
40
  operationId: observations_export
43
41
  summary: Create a trace or append observations
44
- description: |-
45
- Export one or more complete, immutable OTLP spans to Langfuse.
46
-
47
- To create a trace, export a root span with a new 32-hex traceId, a new
48
- 16-hex spanId, and no parentSpanId. The root span is the trace's root
49
- observation.
50
-
51
- To append an observation, reuse the traceId, generate a new spanId,
52
- and set parentSpanId to the 16-hex ID of its parent observation. Use
53
- the same traceId on every span in a trace. Never reuse a spanId.
54
-
55
- Include trace attributes such as langfuse.trace.name,
56
- langfuse.user.id, langfuse.session.id, and langfuse.trace.tags on every
57
- appended span because Langfuse v4 stores trace context on observations.
58
- Serialize observation input/output JSON into stringValue. Use current
59
- Unix epoch nanoseconds encoded as decimal strings; endTimeUnixNano must
60
- be greater than or equal to startTimeUnixNano.
61
- tags: [Observations]
62
- parameters:
63
- - name: x-langfuse-ingestion-version
64
- in: header
65
- required: true
66
- description: Always send the literal value 4 for real-time Langfuse v4 ingestion.
67
- schema:
68
- type: string
69
- enum: ["4"]
70
- default: "4"
42
+ description: >-
43
+ Export immutable OTLP spans. For a new trace, use a new traceId and a root span without parentSpanId. To append,
44
+ reuse traceId, create a fresh spanId, and set parentSpanId to an existing observation ID. Encode input/output as
45
+ JSON strings.
46
+ tags:
47
+ - Observations
71
48
  requestBody:
72
49
  required: true
73
50
  content:
@@ -87,7 +64,7 @@ paths:
87
64
  scopeSpans:
88
65
  - scope:
89
66
  name: custom-gpt-ceremony
90
- version: "0.4.0"
67
+ version: 0.4.2
91
68
  spans:
92
69
  - traceId: 4bf92f3577b34da6a3ce929d0e0e4736
93
70
  spanId: 00f067aa0ba902b7
@@ -104,10 +81,10 @@ paths:
104
81
  stringValue: ceremony-trace
105
82
  - key: langfuse.observation.input
106
83
  value:
107
- stringValue: '{"request":"begin ceremony"}'
84
+ stringValue: "{\"request\":\"begin ceremony\"}"
108
85
  - key: langfuse.observation.output
109
86
  value:
110
- stringValue: '{"status":"started"}'
87
+ stringValue: "{\"status\":\"started\"}"
111
88
  - key: langfuse.trace.tags
112
89
  value:
113
90
  arrayValue:
@@ -134,10 +111,10 @@ paths:
134
111
  stringValue: gpt-4.1
135
112
  - key: langfuse.observation.input
136
113
  value:
137
- stringValue: '{"prompt":"Reflect"}'
114
+ stringValue: "{\"prompt\":\"Reflect\"}"
138
115
  - key: langfuse.observation.output
139
116
  value:
140
- stringValue: '{"answer":"Reflection complete"}'
117
+ stringValue: "{\"answer\":\"Reflection complete\"}"
141
118
  status:
142
119
  code: 1
143
120
  appendChild:
@@ -152,7 +129,7 @@ paths:
152
129
  scopeSpans:
153
130
  - scope:
154
131
  name: custom-gpt-ceremony
155
- version: "0.4.0"
132
+ version: 0.4.2
156
133
  spans:
157
134
  - traceId: 4bf92f3577b34da6a3ce929d0e0e4736
158
135
  spanId: 3c16a3e45742d4c7
@@ -170,10 +147,10 @@ paths:
170
147
  stringValue: ceremony-trace
171
148
  - key: langfuse.observation.input
172
149
  value:
173
- stringValue: '{"step":"continue"}'
150
+ stringValue: "{\"step\":\"continue\"}"
174
151
  - key: langfuse.observation.output
175
152
  value:
176
- stringValue: '{"status":"complete"}'
153
+ stringValue: "{\"status\":\"complete\"}"
177
154
  status:
178
155
  code: 1
179
156
  responses:
@@ -189,60 +166,96 @@ paths:
189
166
  $ref: "#/components/responses/ApiError"
190
167
  default:
191
168
  $ref: "#/components/responses/ApiError"
192
- x-openai-isConsequential: true
193
-
169
+ x-openai-isConsequential: false
194
170
  /api/public/v2/observations:
195
171
  get:
196
172
  operationId: observations_list
197
173
  summary: List observations or inspect a trace
198
174
  description: >-
199
- Query observations with cursor pagination. To inspect a trace after an
200
- export, pass its traceId and request fields
201
- core,basic,time,io,metadata,model,usage,trace_context. The returned id
202
- is the observation/span ID and parentObservationId is its physical
203
- parent. Input and output are raw JSON strings and may need parsing.
204
- tags: [Observations]
175
+ Query observations by cursor or traceId. Request the needed field groups. Returned id values are
176
+ observation/span IDs and parentObservationId defines nesting. Input/output may be raw JSON strings.
177
+ tags:
178
+ - Observations
205
179
  parameters:
206
- - $ref: "#/components/parameters/ObservationFields"
207
- - $ref: "#/components/parameters/Cursor"
208
- - $ref: "#/components/parameters/ObservationLimit"
180
+ - name: fields
181
+ in: query
182
+ schema:
183
+ type: string
184
+ default: core,basic,time,io,metadata,model,usage,trace_context
185
+ description: Comma-separated v2 observation field groups.
186
+ - name: cursor
187
+ in: query
188
+ schema:
189
+ type: string
190
+ description: Cursor returned by the preceding response.
191
+ - name: limit
192
+ in: query
193
+ schema:
194
+ type: integer
195
+ minimum: 1
196
+ maximum: 1000
197
+ default: 50
209
198
  - name: traceId
210
199
  in: query
211
- schema: { type: string }
200
+ schema:
201
+ type: string
212
202
  description: Exact 32-hex trace ID.
213
203
  - name: parentObservationId
214
204
  in: query
215
- schema: { type: string }
205
+ schema:
206
+ type: string
216
207
  description: Return direct children of this 16-hex observation ID.
217
208
  - name: isRootObservation
218
209
  in: query
219
- schema: { type: boolean }
210
+ schema:
211
+ type: boolean
220
212
  description: Set true to return logical root observations only.
221
213
  - name: name
222
214
  in: query
223
- schema: { type: string }
215
+ schema:
216
+ type: string
224
217
  - name: userId
225
218
  in: query
226
- schema: { type: string }
219
+ schema:
220
+ type: string
227
221
  - name: sessionId
228
222
  in: query
229
- schema: { type: string }
223
+ schema:
224
+ type: string
230
225
  - name: type
231
226
  in: query
232
227
  schema:
233
228
  type: string
234
- enum: [SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL]
229
+ enum:
230
+ - SPAN
231
+ - GENERATION
232
+ - EVENT
233
+ - AGENT
234
+ - TOOL
235
+ - CHAIN
236
+ - RETRIEVER
237
+ - EVALUATOR
238
+ - EMBEDDING
239
+ - GUARDRAIL
235
240
  - name: level
236
241
  in: query
237
242
  schema:
238
243
  type: string
239
- enum: [DEBUG, DEFAULT, WARNING, ERROR]
244
+ enum:
245
+ - DEBUG
246
+ - DEFAULT
247
+ - WARNING
248
+ - ERROR
240
249
  - name: fromStartTime
241
250
  in: query
242
- schema: { type: string, format: date-time }
251
+ schema:
252
+ type: string
253
+ format: date-time
243
254
  - name: toStartTime
244
255
  in: query
245
- schema: { type: string, format: date-time }
256
+ schema:
257
+ type: string
258
+ format: date-time
246
259
  responses:
247
260
  "200":
248
261
  description: Observations and an optional next-page cursor.
@@ -257,13 +270,13 @@ paths:
257
270
  default:
258
271
  $ref: "#/components/responses/ApiError"
259
272
  x-openai-isConsequential: false
260
-
261
273
  /api/public/projects:
262
274
  get:
263
275
  operationId: projects_list
264
276
  summary: List projects
265
277
  description: List projects accessible to the configured Langfuse API credentials. Use project IDs when creating comments.
266
- tags: [Projects]
278
+ tags:
279
+ - Projects
267
280
  responses:
268
281
  "200":
269
282
  description: Project list.
@@ -278,24 +291,38 @@ paths:
278
291
  default:
279
292
  $ref: "#/components/responses/ApiError"
280
293
  x-openai-isConsequential: false
281
-
282
294
  /api/public/v2/prompts:
283
295
  get:
284
296
  operationId: prompts_list
285
297
  summary: List managed prompts
286
- tags: [Prompts]
298
+ tags:
299
+ - Prompts
287
300
  parameters:
288
301
  - name: name
289
302
  in: query
290
- schema: { type: string }
303
+ schema:
304
+ type: string
291
305
  - name: label
292
306
  in: query
293
- schema: { type: string }
307
+ schema:
308
+ type: string
294
309
  - name: tag
295
310
  in: query
296
- schema: { type: string }
297
- - $ref: "#/components/parameters/Page"
298
- - $ref: "#/components/parameters/PageLimit"
311
+ schema:
312
+ type: string
313
+ - name: page
314
+ in: query
315
+ schema:
316
+ type: integer
317
+ minimum: 1
318
+ default: 1
319
+ - name: limit
320
+ in: query
321
+ schema:
322
+ type: integer
323
+ minimum: 1
324
+ maximum: 100
325
+ default: 50
299
326
  responses:
300
327
  "200":
301
328
  description: Prompt summaries.
@@ -314,7 +341,8 @@ paths:
314
341
  operationId: prompts_create
315
342
  summary: Create a managed prompt version
316
343
  description: Create a text or chat prompt. Reusing a prompt name creates another version.
317
- tags: [Prompts]
344
+ tags:
345
+ - Prompts
318
346
  requestBody:
319
347
  required: true
320
348
  content:
@@ -326,43 +354,50 @@ paths:
326
354
  description: Created prompt version.
327
355
  content:
328
356
  application/json:
329
- schema: { $ref: "#/components/schemas/GenericObject" }
357
+ schema:
358
+ $ref: "#/components/schemas/GenericObject"
330
359
  "400":
331
360
  $ref: "#/components/responses/ApiError"
332
361
  "401":
333
362
  $ref: "#/components/responses/ApiError"
334
363
  default:
335
364
  $ref: "#/components/responses/ApiError"
336
- x-openai-isConsequential: true
337
-
365
+ x-openai-isConsequential: false
338
366
  /api/public/v2/prompts/{promptName}:
339
367
  get:
340
368
  operationId: prompts_get
341
369
  summary: Get a managed prompt
342
- tags: [Prompts]
370
+ tags:
371
+ - Prompts
343
372
  parameters:
344
373
  - name: promptName
345
374
  in: path
346
375
  required: true
347
- schema: { type: string }
376
+ schema:
377
+ type: string
348
378
  description: Prompt name, including folder prefixes when present.
349
379
  - name: version
350
380
  in: query
351
- schema: { type: integer }
381
+ schema:
382
+ type: integer
352
383
  description: Exact version. Do not combine with label.
353
384
  - name: label
354
385
  in: query
355
- schema: { type: string }
386
+ schema:
387
+ type: string
356
388
  description: Label selector. Do not combine with version. Defaults to production.
357
389
  - name: resolve
358
390
  in: query
359
- schema: { type: boolean, default: true }
391
+ schema:
392
+ type: boolean
393
+ default: true
360
394
  responses:
361
395
  "200":
362
396
  description: Selected prompt.
363
397
  content:
364
398
  application/json:
365
- schema: { $ref: "#/components/schemas/GenericObject" }
399
+ schema:
400
+ $ref: "#/components/schemas/GenericObject"
366
401
  "400":
367
402
  $ref: "#/components/responses/ApiError"
368
403
  "401":
@@ -370,21 +405,23 @@ paths:
370
405
  default:
371
406
  $ref: "#/components/responses/ApiError"
372
407
  x-openai-isConsequential: false
373
-
374
408
  /api/public/v2/prompts/{name}/versions/{version}:
375
409
  patch:
376
410
  operationId: prompt_versions_setLabels
377
411
  summary: Replace labels on a prompt version
378
- tags: [Prompts]
412
+ tags:
413
+ - Prompts
379
414
  parameters:
380
415
  - name: name
381
416
  in: path
382
417
  required: true
383
- schema: { type: string }
418
+ schema:
419
+ type: string
384
420
  - name: version
385
421
  in: path
386
422
  required: true
387
- schema: { type: integer }
423
+ schema:
424
+ type: integer
388
425
  requestBody:
389
426
  required: true
390
427
  content:
@@ -395,37 +432,52 @@ paths:
395
432
  properties:
396
433
  newLabels:
397
434
  type: array
398
- items: { type: string }
435
+ items:
436
+ type: string
399
437
  description: Complete replacement label set. The latest label is reserved.
400
- required: [newLabels]
438
+ required:
439
+ - newLabels
401
440
  responses:
402
441
  "200":
403
442
  description: Updated prompt version.
404
443
  content:
405
444
  application/json:
406
- schema: { $ref: "#/components/schemas/GenericObject" }
445
+ schema:
446
+ $ref: "#/components/schemas/GenericObject"
407
447
  "400":
408
448
  $ref: "#/components/responses/ApiError"
409
449
  "401":
410
450
  $ref: "#/components/responses/ApiError"
411
451
  default:
412
452
  $ref: "#/components/responses/ApiError"
413
- x-openai-isConsequential: true
414
-
453
+ x-openai-isConsequential: false
415
454
  /api/public/v2/datasets:
416
455
  get:
417
456
  operationId: datasets_list
418
457
  summary: List datasets
419
- tags: [Datasets]
458
+ tags:
459
+ - Datasets
420
460
  parameters:
421
- - $ref: "#/components/parameters/Page"
422
- - $ref: "#/components/parameters/PageLimit"
461
+ - name: page
462
+ in: query
463
+ schema:
464
+ type: integer
465
+ minimum: 1
466
+ default: 1
467
+ - name: limit
468
+ in: query
469
+ schema:
470
+ type: integer
471
+ minimum: 1
472
+ maximum: 100
473
+ default: 50
423
474
  responses:
424
475
  "200":
425
476
  description: Paginated datasets.
426
477
  content:
427
478
  application/json:
428
- schema: { $ref: "#/components/schemas/PaginatedResponse" }
479
+ schema:
480
+ $ref: "#/components/schemas/PaginatedResponse"
429
481
  "400":
430
482
  $ref: "#/components/responses/ApiError"
431
483
  "401":
@@ -436,7 +488,8 @@ paths:
436
488
  post:
437
489
  operationId: datasets_create
438
490
  summary: Create a dataset
439
- tags: [Datasets]
491
+ tags:
492
+ - Datasets
440
493
  requestBody:
441
494
  required: true
442
495
  content:
@@ -448,31 +501,34 @@ paths:
448
501
  description: Created dataset.
449
502
  content:
450
503
  application/json:
451
- schema: { $ref: "#/components/schemas/GenericObject" }
504
+ schema:
505
+ $ref: "#/components/schemas/GenericObject"
452
506
  "400":
453
507
  $ref: "#/components/responses/ApiError"
454
508
  "401":
455
509
  $ref: "#/components/responses/ApiError"
456
510
  default:
457
511
  $ref: "#/components/responses/ApiError"
458
- x-openai-isConsequential: true
459
-
512
+ x-openai-isConsequential: false
460
513
  /api/public/v2/datasets/{datasetName}:
461
514
  get:
462
515
  operationId: datasets_get
463
516
  summary: Get a dataset
464
- tags: [Datasets]
517
+ tags:
518
+ - Datasets
465
519
  parameters:
466
520
  - name: datasetName
467
521
  in: path
468
522
  required: true
469
- schema: { type: string }
523
+ schema:
524
+ type: string
470
525
  responses:
471
526
  "200":
472
527
  description: Dataset details.
473
528
  content:
474
529
  application/json:
475
- schema: { $ref: "#/components/schemas/GenericObject" }
530
+ schema:
531
+ $ref: "#/components/schemas/GenericObject"
476
532
  "400":
477
533
  $ref: "#/components/responses/ApiError"
478
534
  "401":
@@ -480,30 +536,45 @@ paths:
480
536
  default:
481
537
  $ref: "#/components/responses/ApiError"
482
538
  x-openai-isConsequential: false
483
-
484
539
  /api/public/dataset-items:
485
540
  get:
486
541
  operationId: dataset_items_list
487
542
  summary: List dataset items
488
- tags: [Datasets]
543
+ tags:
544
+ - Datasets
489
545
  parameters:
490
546
  - name: datasetName
491
547
  in: query
492
- schema: { type: string }
548
+ schema:
549
+ type: string
493
550
  - name: sourceTraceId
494
551
  in: query
495
- schema: { type: string }
552
+ schema:
553
+ type: string
496
554
  - name: sourceObservationId
497
555
  in: query
498
- schema: { type: string }
499
- - $ref: "#/components/parameters/Page"
500
- - $ref: "#/components/parameters/PageLimit"
556
+ schema:
557
+ type: string
558
+ - name: page
559
+ in: query
560
+ schema:
561
+ type: integer
562
+ minimum: 1
563
+ default: 1
564
+ - name: limit
565
+ in: query
566
+ schema:
567
+ type: integer
568
+ minimum: 1
569
+ maximum: 100
570
+ default: 50
501
571
  responses:
502
572
  "200":
503
573
  description: Paginated dataset items.
504
574
  content:
505
575
  application/json:
506
- schema: { $ref: "#/components/schemas/PaginatedResponse" }
576
+ schema:
577
+ $ref: "#/components/schemas/PaginatedResponse"
507
578
  "400":
508
579
  $ref: "#/components/responses/ApiError"
509
580
  "401":
@@ -514,7 +585,8 @@ paths:
514
585
  post:
515
586
  operationId: dataset_items_upsert
516
587
  summary: Create or upsert a dataset item
517
- tags: [Datasets]
588
+ tags:
589
+ - Datasets
518
590
  requestBody:
519
591
  required: true
520
592
  content:
@@ -526,31 +598,34 @@ paths:
526
598
  description: Created or updated dataset item.
527
599
  content:
528
600
  application/json:
529
- schema: { $ref: "#/components/schemas/GenericObject" }
601
+ schema:
602
+ $ref: "#/components/schemas/GenericObject"
530
603
  "400":
531
604
  $ref: "#/components/responses/ApiError"
532
605
  "401":
533
606
  $ref: "#/components/responses/ApiError"
534
607
  default:
535
608
  $ref: "#/components/responses/ApiError"
536
- x-openai-isConsequential: true
537
-
609
+ x-openai-isConsequential: false
538
610
  /api/public/dataset-items/{id}:
539
611
  get:
540
612
  operationId: dataset_items_get
541
613
  summary: Get a dataset item
542
- tags: [Datasets]
614
+ tags:
615
+ - Datasets
543
616
  parameters:
544
617
  - name: id
545
618
  in: path
546
619
  required: true
547
- schema: { type: string }
620
+ schema:
621
+ type: string
548
622
  responses:
549
623
  "200":
550
624
  description: Dataset item.
551
625
  content:
552
626
  application/json:
553
- schema: { $ref: "#/components/schemas/GenericObject" }
627
+ schema:
628
+ $ref: "#/components/schemas/GenericObject"
554
629
  "400":
555
630
  $ref: "#/components/responses/ApiError"
556
631
  "401":
@@ -558,13 +633,15 @@ paths:
558
633
  default:
559
634
  $ref: "#/components/responses/ApiError"
560
635
  x-openai-isConsequential: false
561
-
562
636
  /api/public/scores:
563
637
  post:
564
638
  operationId: scores_create
565
639
  summary: Apply a score
566
- description: Apply a numeric, boolean, categorical, text, or correction score to a trace, observation, session, or dataset run.
567
- tags: [Scores]
640
+ description: >-
641
+ Apply a numeric, boolean, categorical, text, or correction score to a trace, observation, session, or dataset
642
+ run.
643
+ tags:
644
+ - Scores
568
645
  requestBody:
569
646
  required: true
570
647
  content:
@@ -576,69 +653,94 @@ paths:
576
653
  description: Created score.
577
654
  content:
578
655
  application/json:
579
- schema: { $ref: "#/components/schemas/GenericObject" }
656
+ schema:
657
+ $ref: "#/components/schemas/GenericObject"
580
658
  "400":
581
659
  $ref: "#/components/responses/ApiError"
582
660
  "401":
583
661
  $ref: "#/components/responses/ApiError"
584
662
  default:
585
663
  $ref: "#/components/responses/ApiError"
586
- x-openai-isConsequential: true
587
-
664
+ x-openai-isConsequential: false
588
665
  /api/public/v3/scores:
589
666
  get:
590
667
  operationId: scores_list
591
668
  summary: List scores using Scores API v3
592
- tags: [Scores]
669
+ tags:
670
+ - Scores
593
671
  parameters:
594
- - $ref: "#/components/parameters/Cursor"
672
+ - name: cursor
673
+ in: query
674
+ schema:
675
+ type: string
676
+ description: Cursor returned by the preceding response.
595
677
  - name: limit
596
678
  in: query
597
- schema: { type: integer, minimum: 1, maximum: 100, default: 50 }
679
+ schema:
680
+ type: integer
681
+ minimum: 1
682
+ maximum: 100
683
+ default: 50
598
684
  - name: fields
599
685
  in: query
600
- schema: { type: string, default: "details,subject" }
686
+ schema:
687
+ type: string
688
+ default: details,subject
601
689
  description: Comma-separated optional groups; use details,subject for ceremony work.
602
690
  - name: id
603
691
  in: query
604
- schema: { type: string }
692
+ schema:
693
+ type: string
605
694
  - name: name
606
695
  in: query
607
- schema: { type: string }
696
+ schema:
697
+ type: string
608
698
  - name: source
609
699
  in: query
610
- schema: { type: string }
700
+ schema:
701
+ type: string
611
702
  - name: dataType
612
703
  in: query
613
- schema: { type: string }
704
+ schema:
705
+ type: string
614
706
  - name: configId
615
707
  in: query
616
- schema: { type: string }
708
+ schema:
709
+ type: string
617
710
  - name: traceId
618
711
  in: query
619
- schema: { type: string }
712
+ schema:
713
+ type: string
620
714
  - name: observationId
621
715
  in: query
622
- schema: { type: string }
716
+ schema:
717
+ type: string
623
718
  description: Requires traceId.
624
719
  - name: sessionId
625
720
  in: query
626
- schema: { type: string }
721
+ schema:
722
+ type: string
627
723
  - name: experimentId
628
724
  in: query
629
- schema: { type: string }
725
+ schema:
726
+ type: string
630
727
  - name: fromTimestamp
631
728
  in: query
632
- schema: { type: string, format: date-time }
729
+ schema:
730
+ type: string
731
+ format: date-time
633
732
  - name: toTimestamp
634
733
  in: query
635
- schema: { type: string, format: date-time }
734
+ schema:
735
+ type: string
736
+ format: date-time
636
737
  responses:
637
738
  "200":
638
739
  description: Cursor-paginated polymorphic scores.
639
740
  content:
640
741
  application/json:
641
- schema: { $ref: "#/components/schemas/CursorPaginatedResponse" }
742
+ schema:
743
+ $ref: "#/components/schemas/CursorPaginatedResponse"
642
744
  "400":
643
745
  $ref: "#/components/responses/ApiError"
644
746
  "401":
@@ -646,21 +748,33 @@ paths:
646
748
  default:
647
749
  $ref: "#/components/responses/ApiError"
648
750
  x-openai-isConsequential: false
649
-
650
751
  /api/public/score-configs:
651
752
  get:
652
753
  operationId: score_configs_list
653
754
  summary: List score configurations
654
- tags: [Scores]
755
+ tags:
756
+ - Scores
655
757
  parameters:
656
- - $ref: "#/components/parameters/Page"
657
- - $ref: "#/components/parameters/PageLimit"
758
+ - name: page
759
+ in: query
760
+ schema:
761
+ type: integer
762
+ minimum: 1
763
+ default: 1
764
+ - name: limit
765
+ in: query
766
+ schema:
767
+ type: integer
768
+ minimum: 1
769
+ maximum: 100
770
+ default: 50
658
771
  responses:
659
772
  "200":
660
773
  description: Score configurations.
661
774
  content:
662
775
  application/json:
663
- schema: { $ref: "#/components/schemas/PaginatedResponse" }
776
+ schema:
777
+ $ref: "#/components/schemas/PaginatedResponse"
664
778
  "400":
665
779
  $ref: "#/components/responses/ApiError"
666
780
  "401":
@@ -671,42 +785,47 @@ paths:
671
785
  post:
672
786
  operationId: score_configs_create
673
787
  summary: Create a score configuration
674
- tags: [Scores]
788
+ tags:
789
+ - Scores
675
790
  requestBody:
676
791
  required: true
677
792
  content:
678
793
  application/json:
679
- schema: { $ref: "#/components/schemas/CreateScoreConfigRequest" }
794
+ schema:
795
+ $ref: "#/components/schemas/CreateScoreConfigRequest"
680
796
  responses:
681
797
  "200":
682
798
  description: Created score configuration.
683
799
  content:
684
800
  application/json:
685
- schema: { $ref: "#/components/schemas/GenericObject" }
801
+ schema:
802
+ $ref: "#/components/schemas/GenericObject"
686
803
  "400":
687
804
  $ref: "#/components/responses/ApiError"
688
805
  "401":
689
806
  $ref: "#/components/responses/ApiError"
690
807
  default:
691
808
  $ref: "#/components/responses/ApiError"
692
- x-openai-isConsequential: true
693
-
809
+ x-openai-isConsequential: false
694
810
  /api/public/score-configs/{configId}:
695
811
  get:
696
812
  operationId: score_configs_get
697
813
  summary: Get a score configuration
698
- tags: [Scores]
814
+ tags:
815
+ - Scores
699
816
  parameters:
700
817
  - name: configId
701
818
  in: path
702
819
  required: true
703
- schema: { type: string }
820
+ schema:
821
+ type: string
704
822
  responses:
705
823
  "200":
706
824
  description: Score configuration.
707
825
  content:
708
826
  application/json:
709
- schema: { $ref: "#/components/schemas/GenericObject" }
827
+ schema:
828
+ $ref: "#/components/schemas/GenericObject"
710
829
  "400":
711
830
  $ref: "#/components/responses/ApiError"
712
831
  "401":
@@ -714,33 +833,51 @@ paths:
714
833
  default:
715
834
  $ref: "#/components/responses/ApiError"
716
835
  x-openai-isConsequential: false
717
-
718
836
  /api/public/comments:
719
837
  get:
720
838
  operationId: comments_list
721
839
  summary: List comments
722
- tags: [Comments]
840
+ tags:
841
+ - Comments
723
842
  parameters:
724
- - $ref: "#/components/parameters/Page"
725
- - $ref: "#/components/parameters/PageLimit"
843
+ - name: page
844
+ in: query
845
+ schema:
846
+ type: integer
847
+ minimum: 1
848
+ default: 1
849
+ - name: limit
850
+ in: query
851
+ schema:
852
+ type: integer
853
+ minimum: 1
854
+ maximum: 100
855
+ default: 50
726
856
  - name: objectType
727
857
  in: query
728
858
  schema:
729
859
  type: string
730
- enum: [TRACE, OBSERVATION, SESSION, PROMPT]
860
+ enum:
861
+ - TRACE
862
+ - OBSERVATION
863
+ - SESSION
864
+ - PROMPT
731
865
  - name: objectId
732
866
  in: query
733
- schema: { type: string }
867
+ schema:
868
+ type: string
734
869
  description: objectType is required whenever objectId is used.
735
870
  - name: authorUserId
736
871
  in: query
737
- schema: { type: string }
872
+ schema:
873
+ type: string
738
874
  responses:
739
875
  "200":
740
876
  description: Comments.
741
877
  content:
742
878
  application/json:
743
- schema: { $ref: "#/components/schemas/PaginatedResponse" }
879
+ schema:
880
+ $ref: "#/components/schemas/PaginatedResponse"
744
881
  "400":
745
882
  $ref: "#/components/responses/ApiError"
746
883
  "401":
@@ -751,26 +888,115 @@ paths:
751
888
  post:
752
889
  operationId: comments_create
753
890
  summary: Create a comment
754
- tags: [Comments]
891
+ tags:
892
+ - Comments
755
893
  requestBody:
756
894
  required: true
757
895
  content:
758
896
  application/json:
759
- schema: { $ref: "#/components/schemas/CreateCommentRequest" }
897
+ schema:
898
+ $ref: "#/components/schemas/CreateCommentRequest"
760
899
  responses:
761
900
  "200":
762
901
  description: Created comment.
763
902
  content:
764
903
  application/json:
765
- schema: { $ref: "#/components/schemas/GenericObject" }
904
+ schema:
905
+ $ref: "#/components/schemas/GenericObject"
906
+ "400":
907
+ $ref: "#/components/responses/ApiError"
908
+ "401":
909
+ $ref: "#/components/responses/ApiError"
910
+ default:
911
+ $ref: "#/components/responses/ApiError"
912
+ x-openai-isConsequential: false
913
+ /api/public/media:
914
+ post:
915
+ operationId: media_getUploadUrl
916
+ summary: Create a media upload record
917
+ description: >-
918
+ Create a media record and presigned URL. Hash the exact upload bytes, Base64-encode the 32-byte SHA-256 digest
919
+ to 44 padded characters (not hex), and send exact length/MIME type. This does not upload bytes: PUT them to
920
+ uploadUrl, then call media_patch. Never use placeholder bytes.
921
+ tags:
922
+ - Media
923
+ requestBody:
924
+ required: true
925
+ content:
926
+ application/json:
927
+ schema:
928
+ $ref: "#/components/schemas/MediaUploadUrlRequest"
929
+ responses:
930
+ "200":
931
+ description: Media ID and presigned upload URL.
932
+ content:
933
+ application/json:
934
+ schema:
935
+ $ref: "#/components/schemas/MediaUploadUrlResponse"
936
+ "400":
937
+ $ref: "#/components/responses/ApiError"
938
+ "401":
939
+ $ref: "#/components/responses/ApiError"
940
+ default:
941
+ $ref: "#/components/responses/ApiError"
942
+ x-openai-isConsequential: false
943
+ /api/public/media/{mediaId}:
944
+ get:
945
+ operationId: media_get
946
+ summary: Get a media record
947
+ description: Get metadata and a temporary download URL for a Langfuse media record.
948
+ tags:
949
+ - Media
950
+ parameters:
951
+ - name: mediaId
952
+ in: path
953
+ required: true
954
+ description: Langfuse media record ID.
955
+ schema:
956
+ type: string
957
+ responses:
958
+ "200":
959
+ description: Media metadata and download URL.
960
+ content:
961
+ application/json:
962
+ schema:
963
+ $ref: "#/components/schemas/MediaRecord"
964
+ "400":
965
+ $ref: "#/components/responses/ApiError"
966
+ "401":
967
+ $ref: "#/components/responses/ApiError"
968
+ default:
969
+ $ref: "#/components/responses/ApiError"
970
+ x-openai-isConsequential: false
971
+ patch:
972
+ operationId: media_patch
973
+ summary: Finalize a media upload record
974
+ description: Report the result of uploading bytes to the presigned URL so Langfuse can finalize the media record.
975
+ tags:
976
+ - Media
977
+ parameters:
978
+ - name: mediaId
979
+ in: path
980
+ required: true
981
+ description: Langfuse media record ID.
982
+ schema:
983
+ type: string
984
+ requestBody:
985
+ required: true
986
+ content:
987
+ application/json:
988
+ schema:
989
+ $ref: "#/components/schemas/MediaPatchRequest"
990
+ responses:
991
+ "204":
992
+ description: Media record updated.
766
993
  "400":
767
994
  $ref: "#/components/responses/ApiError"
768
995
  "401":
769
996
  $ref: "#/components/responses/ApiError"
770
997
  default:
771
998
  $ref: "#/components/responses/ApiError"
772
- x-openai-isConsequential: true
773
-
999
+ x-openai-isConsequential: false
774
1000
  components:
775
1001
  securitySchemes:
776
1002
  LangfuseAuthorization:
@@ -778,35 +1004,9 @@ components:
778
1004
  in: header
779
1005
  name: Authorization
780
1006
  description: >-
781
- In the GPT Action authentication UI choose API Key with a custom
782
- Authorization header. Enter the complete value "Basic BASE64", where
783
- BASE64 is the base64 encoding of LANGFUSE_PUBLIC_KEY:LANGFUSE_SECRET_KEY.
784
- Do not expose either key in GPT instructions or conversation text.
785
- parameters:
786
- Page:
787
- name: page
788
- in: query
789
- schema: { type: integer, minimum: 1, default: 1 }
790
- PageLimit:
791
- name: limit
792
- in: query
793
- schema: { type: integer, minimum: 1, maximum: 100, default: 50 }
794
- Cursor:
795
- name: cursor
796
- in: query
797
- schema: { type: string }
798
- description: Cursor returned by the preceding response.
799
- ObservationLimit:
800
- name: limit
801
- in: query
802
- schema: { type: integer, minimum: 1, maximum: 1000, default: 50 }
803
- ObservationFields:
804
- name: fields
805
- in: query
806
- schema:
807
- type: string
808
- default: core,basic,time,io,metadata,model,usage,trace_context
809
- description: Comma-separated v2 observation field groups.
1007
+ In the GPT Action authentication UI choose API Key with a custom Authorization header. Enter the complete value
1008
+ "Basic BASE64", where BASE64 is the base64 encoding of LANGFUSE_PUBLIC_KEY:LANGFUSE_SECRET_KEY. Do not expose
1009
+ either key in GPT instructions or conversation text.
810
1010
  responses:
811
1011
  ApiError:
812
1012
  description: Langfuse rejected the request or authentication failed.
@@ -825,7 +1025,8 @@ components:
825
1025
  maxItems: 1
826
1026
  items:
827
1027
  $ref: "#/components/schemas/OtlpResourceSpans"
828
- required: [resourceSpans]
1028
+ required:
1029
+ - resourceSpans
829
1030
  OtlpResourceSpans:
830
1031
  type: object
831
1032
  additionalProperties: false
@@ -838,7 +1039,9 @@ components:
838
1039
  maxItems: 1
839
1040
  items:
840
1041
  $ref: "#/components/schemas/OtlpScopeSpans"
841
- required: [resource, scopeSpans]
1042
+ required:
1043
+ - resource
1044
+ - scopeSpans
842
1045
  OtlpResource:
843
1046
  type: object
844
1047
  additionalProperties: false
@@ -848,7 +1051,8 @@ components:
848
1051
  minItems: 1
849
1052
  items:
850
1053
  $ref: "#/components/schemas/OtlpAttribute"
851
- required: [attributes]
1054
+ required:
1055
+ - attributes
852
1056
  OtlpScopeSpans:
853
1057
  type: object
854
1058
  additionalProperties: false
@@ -861,7 +1065,9 @@ components:
861
1065
  maxItems: 25
862
1066
  items:
863
1067
  $ref: "#/components/schemas/OtlpSpan"
864
- required: [scope, spans]
1068
+ required:
1069
+ - scope
1070
+ - spans
865
1071
  OtlpScope:
866
1072
  type: object
867
1073
  additionalProperties: false
@@ -871,49 +1077,50 @@ components:
871
1077
  default: custom-gpt-ceremony
872
1078
  version:
873
1079
  type: string
874
- default: "0.4.0"
875
- required: [name]
1080
+ default: 0.4.2
1081
+ required:
1082
+ - name
876
1083
  OtlpSpan:
877
1084
  type: object
878
1085
  additionalProperties: false
879
1086
  description: >-
880
- One complete immutable observation. Omit parentSpanId only for the root.
881
- For every child, traceId must match the root and parentSpanId must be an
882
- existing observation/span ID in that trace.
1087
+ One complete immutable observation. Omit parentSpanId only for the root. For every child, traceId must match the
1088
+ root and parentSpanId must be an existing observation/span ID in that trace.
883
1089
  properties:
884
1090
  traceId:
885
1091
  type: string
886
1092
  minLength: 32
887
1093
  maxLength: 32
888
- pattern: "^[0-9a-fA-F]{32}$"
1094
+ pattern: ^[0-9a-fA-F]{32}$
889
1095
  description: Reuse for every observation in one trace.
890
1096
  spanId:
891
1097
  type: string
892
1098
  minLength: 16
893
1099
  maxLength: 16
894
- pattern: "^[0-9a-fA-F]{16}$"
1100
+ pattern: ^[0-9a-fA-F]{16}$
895
1101
  description: Generate a fresh non-zero random ID for every new observation.
896
1102
  parentSpanId:
897
1103
  type: string
898
1104
  minLength: 16
899
1105
  maxLength: 16
900
- pattern: "^[0-9a-fA-F]{16}$"
1106
+ pattern: ^[0-9a-fA-F]{16}$
901
1107
  description: Parent observation ID. Omit for a root span.
902
1108
  name:
903
1109
  type: string
904
1110
  minLength: 1
905
1111
  kind:
906
1112
  type: integer
907
- enum: [1]
1113
+ enum:
1114
+ - 1
908
1115
  default: 1
909
1116
  description: OTLP SPAN_KIND_INTERNAL.
910
1117
  startTimeUnixNano:
911
1118
  type: string
912
- pattern: "^[0-9]{16,20}$"
1119
+ pattern: ^[0-9]{16,20}$
913
1120
  description: Unix epoch nanoseconds represented as a decimal string.
914
1121
  endTimeUnixNano:
915
1122
  type: string
916
- pattern: "^[0-9]{16,20}$"
1123
+ pattern: ^[0-9]{16,20}$
917
1124
  description: Unix epoch nanoseconds represented as a decimal string; must not precede start time.
918
1125
  attributes:
919
1126
  type: array
@@ -921,12 +1128,18 @@ components:
921
1128
  items:
922
1129
  $ref: "#/components/schemas/OtlpAttribute"
923
1130
  description: >-
924
- Always include langfuse.observation.type. Include trace context on
925
- every span. Observation input/output and model parameter/usage
926
- objects must be JSON-serialized strings in stringValue.
1131
+ Always include langfuse.observation.type. Include trace context on every span. Observation input/output and
1132
+ model parameter/usage objects must be JSON-serialized strings in stringValue.
927
1133
  status:
928
1134
  $ref: "#/components/schemas/OtlpStatus"
929
- required: [traceId, spanId, name, kind, startTimeUnixNano, endTimeUnixNano, attributes]
1135
+ required:
1136
+ - traceId
1137
+ - spanId
1138
+ - name
1139
+ - kind
1140
+ - startTimeUnixNano
1141
+ - endTimeUnixNano
1142
+ - attributes
930
1143
  OtlpAttribute:
931
1144
  type: object
932
1145
  additionalProperties: false
@@ -934,15 +1147,13 @@ components:
934
1147
  key:
935
1148
  type: string
936
1149
  description: >-
937
- Common keys include langfuse.observation.type,
938
- langfuse.observation.input, langfuse.observation.output,
939
- langfuse.observation.model.name, langfuse.observation.usage_details,
940
- langfuse.observation.metadata.KEY, langfuse.trace.name,
941
- langfuse.user.id, langfuse.session.id, langfuse.trace.tags,
942
- langfuse.release, langfuse.version, and langfuse.environment.
1150
+ Use Langfuse observation keys for type, input, output, model, usage, and metadata; use trace keys for name,
1151
+ user, session, tags, release, version, and environment.
943
1152
  value:
944
1153
  $ref: "#/components/schemas/OtlpAnyValue"
945
- required: [key, value]
1154
+ required:
1155
+ - key
1156
+ - value
946
1157
  OtlpAnyValue:
947
1158
  type: object
948
1159
  additionalProperties: false
@@ -957,7 +1168,7 @@ components:
957
1168
  oneOf:
958
1169
  - type: integer
959
1170
  - type: string
960
- pattern: "^-?[0-9]+$"
1171
+ pattern: ^-?[0-9]+$
961
1172
  doubleValue:
962
1173
  type: number
963
1174
  arrayValue:
@@ -968,36 +1179,55 @@ components:
968
1179
  type: array
969
1180
  items:
970
1181
  $ref: "#/components/schemas/OtlpPrimitiveValue"
971
- required: [values]
1182
+ required:
1183
+ - values
972
1184
  OtlpPrimitiveValue:
973
1185
  type: object
974
1186
  additionalProperties: false
975
1187
  minProperties: 1
976
1188
  maxProperties: 1
977
1189
  properties:
978
- stringValue: { type: string }
979
- boolValue: { type: boolean }
1190
+ stringValue:
1191
+ type: string
1192
+ boolValue:
1193
+ type: boolean
980
1194
  intValue:
981
1195
  oneOf:
982
1196
  - type: integer
983
1197
  - type: string
984
- pattern: "^-?[0-9]+$"
985
- doubleValue: { type: number }
1198
+ pattern: ^-?[0-9]+$
1199
+ doubleValue:
1200
+ type: number
986
1201
  OtlpStatus:
987
1202
  type: object
988
1203
  additionalProperties: false
989
1204
  properties:
990
1205
  code:
991
1206
  type: integer
992
- enum: [0, 1, 2]
1207
+ enum:
1208
+ - 0
1209
+ - 1
1210
+ - 2
993
1211
  description: 0 unset, 1 OK, 2 error.
994
1212
  message:
995
1213
  type: string
996
- required: [code]
1214
+ required:
1215
+ - code
997
1216
  OtlpTraceExportResponse:
998
1217
  type: object
999
1218
  additionalProperties: true
1000
1219
  description: Empty on complete success; may contain partialSuccess for partial acceptance.
1220
+ properties:
1221
+ partialSuccess:
1222
+ type: object
1223
+ properties:
1224
+ rejectedSpans:
1225
+ type: integer
1226
+ description: Number of rejected spans.
1227
+ errorMessage:
1228
+ type: string
1229
+ description: Reason spans were rejected.
1230
+ additionalProperties: true
1001
1231
  ObservationListResponse:
1002
1232
  type: object
1003
1233
  properties:
@@ -1009,23 +1239,52 @@ components:
1009
1239
  type: object
1010
1240
  properties:
1011
1241
  cursor:
1012
- type: [string, "null"]
1013
- required: [data, meta]
1242
+ type:
1243
+ - string
1244
+ - "null"
1245
+ required:
1246
+ - data
1247
+ - meta
1014
1248
  Observation:
1015
1249
  type: object
1016
1250
  additionalProperties: true
1017
1251
  properties:
1018
- id: { type: string }
1019
- traceId: { type: string }
1020
- parentObservationId: { type: [string, "null"] }
1021
- isRootObservation: { type: boolean }
1022
- type: { type: string }
1023
- name: { type: [string, "null"] }
1024
- startTime: { type: string, format: date-time }
1025
- endTime: { type: [string, "null"], format: date-time }
1026
- traceName: { type: [string, "null"] }
1027
- userId: { type: [string, "null"] }
1028
- sessionId: { type: [string, "null"] }
1252
+ id:
1253
+ type: string
1254
+ traceId:
1255
+ type: string
1256
+ parentObservationId:
1257
+ type:
1258
+ - string
1259
+ - "null"
1260
+ isRootObservation:
1261
+ type: boolean
1262
+ type:
1263
+ type: string
1264
+ name:
1265
+ type:
1266
+ - string
1267
+ - "null"
1268
+ startTime:
1269
+ type: string
1270
+ format: date-time
1271
+ endTime:
1272
+ type:
1273
+ - string
1274
+ - "null"
1275
+ format: date-time
1276
+ traceName:
1277
+ type:
1278
+ - string
1279
+ - "null"
1280
+ userId:
1281
+ type:
1282
+ - string
1283
+ - "null"
1284
+ sessionId:
1285
+ type:
1286
+ - string
1287
+ - "null"
1029
1288
  input: {}
1030
1289
  output: {}
1031
1290
  metadata: {}
@@ -1060,12 +1319,15 @@ components:
1060
1319
  additionalProperties: true
1061
1320
  properties:
1062
1321
  cursor:
1063
- type: [string, "null"]
1322
+ type:
1323
+ - string
1324
+ - "null"
1064
1325
  CreatePromptRequest:
1065
1326
  type: object
1066
1327
  additionalProperties: false
1067
1328
  properties:
1068
- name: { type: string }
1329
+ name:
1330
+ type: string
1069
1331
  prompt:
1070
1332
  oneOf:
1071
1333
  - type: string
@@ -1074,30 +1336,43 @@ components:
1074
1336
  type: object
1075
1337
  additionalProperties: false
1076
1338
  properties:
1077
- role: { type: string }
1078
- content: { type: string }
1079
- required: [role, content]
1339
+ role:
1340
+ type: string
1341
+ content:
1342
+ type: string
1343
+ required:
1344
+ - role
1345
+ - content
1080
1346
  type:
1081
1347
  type: string
1082
- enum: [text, chat]
1348
+ enum:
1349
+ - text
1350
+ - chat
1083
1351
  description: Use chat when prompt is an array; text may be omitted for a string prompt.
1084
1352
  config:
1085
1353
  type: object
1086
1354
  additionalProperties: true
1087
1355
  labels:
1088
1356
  type: array
1089
- items: { type: string }
1357
+ items:
1358
+ type: string
1090
1359
  tags:
1091
1360
  type: array
1092
- items: { type: string }
1093
- commitMessage: { type: string }
1094
- required: [name, prompt]
1361
+ items:
1362
+ type: string
1363
+ commitMessage:
1364
+ type: string
1365
+ required:
1366
+ - name
1367
+ - prompt
1095
1368
  CreateDatasetRequest:
1096
1369
  type: object
1097
1370
  additionalProperties: false
1098
1371
  properties:
1099
- name: { type: string }
1100
- description: { type: string }
1372
+ name:
1373
+ type: string
1374
+ description:
1375
+ type: string
1101
1376
  metadata:
1102
1377
  type: object
1103
1378
  additionalProperties: true
@@ -1107,95 +1382,270 @@ components:
1107
1382
  expectedOutputSchema:
1108
1383
  type: object
1109
1384
  additionalProperties: true
1110
- required: [name]
1385
+ required:
1386
+ - name
1111
1387
  CreateDatasetItemRequest:
1112
1388
  type: object
1113
1389
  additionalProperties: false
1114
1390
  properties:
1115
- datasetName: { type: string }
1391
+ datasetName:
1392
+ type: string
1116
1393
  input: {}
1117
1394
  expectedOutput: {}
1118
1395
  metadata:
1119
1396
  type: object
1120
1397
  additionalProperties: true
1121
- sourceTraceId: { type: string }
1122
- sourceObservationId: { type: string }
1398
+ sourceTraceId:
1399
+ type: string
1400
+ sourceObservationId:
1401
+ type: string
1123
1402
  id:
1124
1403
  type: string
1125
1404
  maxLength: 255
1126
1405
  description: Stable project-unique ID. Providing it makes this an upsert.
1127
1406
  status:
1128
1407
  type: string
1129
- enum: [ACTIVE, ARCHIVED]
1130
- required: [datasetName]
1408
+ enum:
1409
+ - ACTIVE
1410
+ - ARCHIVED
1411
+ required:
1412
+ - datasetName
1131
1413
  CreateScoreRequest:
1132
1414
  type: object
1133
1415
  additionalProperties: false
1134
1416
  properties:
1135
- id: { type: string }
1136
- traceId: { type: string }
1417
+ id:
1418
+ type: string
1419
+ traceId:
1420
+ type: string
1137
1421
  observationId:
1138
1422
  type: string
1139
1423
  description: Observation ID; include its traceId as well.
1140
- sessionId: { type: string }
1141
- datasetRunId: { type: string }
1142
- name: { type: string }
1424
+ sessionId:
1425
+ type: string
1426
+ datasetRunId:
1427
+ type: string
1428
+ name:
1429
+ type: string
1143
1430
  value:
1144
1431
  oneOf:
1145
1432
  - type: number
1146
1433
  - type: string
1147
1434
  description: Number for numeric/boolean scores; string for categorical/text/correction scores.
1148
- comment: { type: string }
1435
+ comment:
1436
+ type: string
1149
1437
  metadata:
1150
1438
  type: object
1151
1439
  additionalProperties: true
1152
- environment: { type: string }
1440
+ environment:
1441
+ type: string
1153
1442
  dataType:
1154
1443
  type: string
1155
- enum: [NUMERIC, BOOLEAN, CATEGORICAL, TEXT, CORRECTION]
1156
- configId: { type: string }
1444
+ enum:
1445
+ - NUMERIC
1446
+ - BOOLEAN
1447
+ - CATEGORICAL
1448
+ - TEXT
1449
+ - CORRECTION
1450
+ configId:
1451
+ type: string
1157
1452
  source:
1158
1453
  type: string
1159
- enum: [API, ANNOTATION]
1160
- required: [name, value]
1454
+ enum:
1455
+ - API
1456
+ - ANNOTATION
1457
+ required:
1458
+ - name
1459
+ - value
1161
1460
  CreateScoreConfigRequest:
1162
1461
  type: object
1163
1462
  additionalProperties: false
1164
1463
  properties:
1165
- name: { type: string, maxLength: 35 }
1464
+ name:
1465
+ type: string
1466
+ maxLength: 35
1166
1467
  dataType:
1167
1468
  type: string
1168
- enum: [NUMERIC, BOOLEAN, CATEGORICAL, TEXT]
1469
+ enum:
1470
+ - NUMERIC
1471
+ - BOOLEAN
1472
+ - CATEGORICAL
1473
+ - TEXT
1169
1474
  categories:
1170
1475
  type: array
1171
1476
  items:
1172
1477
  type: object
1173
1478
  additionalProperties: false
1174
1479
  properties:
1175
- label: { type: string }
1176
- value: { type: number }
1177
- required: [label, value]
1178
- minValue: { type: number }
1179
- maxValue: { type: number }
1180
- description: { type: string }
1181
- required: [name, dataType]
1480
+ label:
1481
+ type: string
1482
+ value:
1483
+ type: number
1484
+ required:
1485
+ - label
1486
+ - value
1487
+ minValue:
1488
+ type: number
1489
+ maxValue:
1490
+ type: number
1491
+ description:
1492
+ type: string
1493
+ required:
1494
+ - name
1495
+ - dataType
1182
1496
  CreateCommentRequest:
1183
1497
  type: object
1184
1498
  additionalProperties: false
1185
1499
  properties:
1186
- projectId: { type: string }
1500
+ projectId:
1501
+ type: string
1187
1502
  objectType:
1188
1503
  type: string
1189
- enum: [TRACE, OBSERVATION, SESSION, PROMPT]
1190
- objectId: { type: string }
1191
- content: { type: string, maxLength: 5000 }
1192
- authorUserId: { type: string }
1193
- required: [projectId, objectType, objectId, content]
1504
+ enum:
1505
+ - TRACE
1506
+ - OBSERVATION
1507
+ - SESSION
1508
+ - PROMPT
1509
+ objectId:
1510
+ type: string
1511
+ content:
1512
+ type: string
1513
+ maxLength: 5000
1514
+ authorUserId:
1515
+ type: string
1516
+ required:
1517
+ - projectId
1518
+ - objectType
1519
+ - objectId
1520
+ - content
1194
1521
  GenericObject:
1195
1522
  type: object
1196
1523
  additionalProperties: true
1524
+ properties:
1525
+ id:
1526
+ type: string
1527
+ name:
1528
+ type: string
1529
+ type:
1530
+ type: string
1531
+ version:
1532
+ type: integer
1533
+ createdAt:
1534
+ type: string
1535
+ format: date-time
1536
+ updatedAt:
1537
+ type: string
1538
+ format: date-time
1197
1539
  ApiError:
1198
1540
  type: object
1199
1541
  additionalProperties: true
1200
1542
  properties:
1201
- message: { type: string }
1543
+ message:
1544
+ type: string
1545
+ MediaUploadUrlRequest:
1546
+ type: object
1547
+ additionalProperties: false
1548
+ description: >-
1549
+ Use the user's actual media bytes. Provide traceId (optionally observationId) or both datasetId and
1550
+ datasetItemId. Never substitute placeholder bytes unless the user explicitly requests a placeholder.
1551
+ properties:
1552
+ traceId:
1553
+ type: string
1554
+ description: Trace context for trace or observation media.
1555
+ observationId:
1556
+ type: string
1557
+ description: Optional observation context; requires traceId.
1558
+ datasetId:
1559
+ type: string
1560
+ description: Dataset context; use with datasetItemId.
1561
+ datasetItemId:
1562
+ type: string
1563
+ description: Dataset-item context; use with datasetId.
1564
+ contentType:
1565
+ type: string
1566
+ description: MIME type of the exact bytes, such as image/png, audio/mpeg, application/pdf, or text/plain.
1567
+ contentLength:
1568
+ type: integer
1569
+ minimum: 1
1570
+ description: Byte length of the exact bytes that will be uploaded.
1571
+ sha256Hash:
1572
+ type: string
1573
+ minLength: 44
1574
+ maxLength: 44
1575
+ pattern: ^[A-Za-z0-9+/]{43}=$
1576
+ description: >-
1577
+ Standard padded RFC 4648 Base64 encoding of the 32-byte SHA-256 digest of the exact upload bytes. This is
1578
+ not the 64-character hexadecimal representation.
1579
+ example: n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=
1580
+ field:
1581
+ type: string
1582
+ enum:
1583
+ - input
1584
+ - output
1585
+ - expectedOutput
1586
+ - metadata
1587
+ description: Field containing the media reference.
1588
+ required:
1589
+ - contentType
1590
+ - contentLength
1591
+ - sha256Hash
1592
+ - field
1593
+ MediaUploadUrlResponse:
1594
+ type: object
1595
+ additionalProperties: true
1596
+ properties:
1597
+ uploadUrl:
1598
+ type:
1599
+ - string
1600
+ - "null"
1601
+ description: Presigned URL, or null when the asset already exists.
1602
+ mediaId:
1603
+ type: string
1604
+ description: Langfuse media record ID.
1605
+ required:
1606
+ - mediaId
1607
+ MediaRecord:
1608
+ type: object
1609
+ additionalProperties: true
1610
+ properties:
1611
+ mediaId:
1612
+ type: string
1613
+ contentType:
1614
+ type: string
1615
+ contentLength:
1616
+ type: integer
1617
+ uploadedAt:
1618
+ type: string
1619
+ format: date-time
1620
+ url:
1621
+ type: string
1622
+ urlExpiry:
1623
+ type: string
1624
+ required:
1625
+ - mediaId
1626
+ - contentType
1627
+ - contentLength
1628
+ - uploadedAt
1629
+ - url
1630
+ - urlExpiry
1631
+ MediaPatchRequest:
1632
+ type: object
1633
+ additionalProperties: false
1634
+ properties:
1635
+ uploadedAt:
1636
+ type: string
1637
+ format: date-time
1638
+ description: Time the upload attempt completed.
1639
+ uploadHttpStatus:
1640
+ type: integer
1641
+ description: HTTP status returned by the presigned upload.
1642
+ uploadHttpError:
1643
+ type: string
1644
+ description: Upload error message, when present.
1645
+ uploadTimeMs:
1646
+ type: integer
1647
+ minimum: 0
1648
+ description: Upload duration in milliseconds.
1649
+ required:
1650
+ - uploadedAt
1651
+ - uploadHttpStatus