#observation #trace #client #model #json #key

langfuse-client

Authentication Authenticate with the API using Basic Auth, get API keys in the project settings: - username: Langfuse Public Key - password: Langfuse Secret Key ## Exports - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Postman collection: https://cloud.langfuse.com/generated/postman/collection.json

1 unstable release

Uses new Rust 2024

new 0.1.0 Apr 19, 2025

#817 in Web programming

Download history 71/week @ 2025-04-14

71 downloads per month

MIT license

575KB
9K SLoC

Rust API client for langfuse-rs

Authentication

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

  • username: Langfuse Public Key
  • password: Langfuse Secret Key

Exports

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version:
  • Package version: 0.1.0
  • Generator version: 7.13.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named langfuse-rs and add the following to Cargo.toml under [dependencies]:

langfuse-rs = { path = "./langfuse-rs" }

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AnnotationQueuesApi annotation_queues_create_queue_item POST /api/public/annotation-queues/{queueId}/items
AnnotationQueuesApi annotation_queues_delete_queue_item DELETE /api/public/annotation-queues/{queueId}/items/{itemId}
AnnotationQueuesApi annotation_queues_get_queue GET /api/public/annotation-queues/{queueId}
AnnotationQueuesApi annotation_queues_get_queue_item GET /api/public/annotation-queues/{queueId}/items/{itemId}
AnnotationQueuesApi annotation_queues_list_queue_items GET /api/public/annotation-queues/{queueId}/items
AnnotationQueuesApi annotation_queues_list_queues GET /api/public/annotation-queues
AnnotationQueuesApi annotation_queues_update_queue_item PATCH /api/public/annotation-queues/{queueId}/items/{itemId}
CommentsApi comments_create POST /api/public/comments
CommentsApi comments_get GET /api/public/comments
CommentsApi comments_get_by_id GET /api/public/comments/{commentId}
DatasetItemsApi dataset_items_create POST /api/public/dataset-items
DatasetItemsApi dataset_items_delete DELETE /api/public/dataset-items/{id}
DatasetItemsApi dataset_items_get GET /api/public/dataset-items/{id}
DatasetItemsApi dataset_items_list GET /api/public/dataset-items
DatasetRunItemsApi dataset_run_items_create POST /api/public/dataset-run-items
DatasetsApi datasets_create POST /api/public/v2/datasets
DatasetsApi datasets_delete_run DELETE /api/public/datasets/{datasetName}/runs/{runName}
DatasetsApi datasets_get GET /api/public/v2/datasets/{datasetName}
DatasetsApi datasets_get_run GET /api/public/datasets/{datasetName}/runs/{runName}
DatasetsApi datasets_get_runs GET /api/public/datasets/{datasetName}/runs
DatasetsApi datasets_list GET /api/public/v2/datasets
HealthApi health_health GET /api/public/health
IngestionApi ingestion_batch POST /api/public/ingestion
MediaApi media_get GET /api/public/media/{mediaId}
MediaApi media_get_upload_url POST /api/public/media
MediaApi media_patch PATCH /api/public/media/{mediaId}
MembershipsApi memberships_get_organization_memberships GET /api/public/organizations/memberships
MembershipsApi memberships_get_project_memberships GET /api/public/projects/{projectId}/memberships
MembershipsApi memberships_update_organization_membership PUT /api/public/organizations/memberships
MembershipsApi memberships_update_project_membership PUT /api/public/projects/{projectId}/memberships
MetricsApi metrics_daily GET /api/public/metrics/daily
ModelsApi models_create POST /api/public/models
ModelsApi models_delete DELETE /api/public/models/{id}
ModelsApi models_get GET /api/public/models/{id}
ModelsApi models_list GET /api/public/models
ObservationsApi observations_get GET /api/public/observations/{observationId}
ObservationsApi observations_get_many GET /api/public/observations
ProjectsApi projects_create POST /api/public/projects
ProjectsApi projects_create_api_key POST /api/public/projects/{projectId}/apiKeys
ProjectsApi projects_delete DELETE /api/public/projects/{projectId}
ProjectsApi projects_delete_api_key DELETE /api/public/projects/{projectId}/apiKeys/{apiKeyId}
ProjectsApi projects_get GET /api/public/projects
ProjectsApi projects_get_api_keys GET /api/public/projects/{projectId}/apiKeys
ProjectsApi projects_update PUT /api/public/projects/{projectId}
PromptVersionApi prompt_version_update PATCH /api/public/v2/prompts/{name}/versions/{version}
PromptsApi prompts_create POST /api/public/v2/prompts
PromptsApi prompts_get GET /api/public/v2/prompts/{promptName}
PromptsApi prompts_list GET /api/public/v2/prompts
ScimApi scim_create_user POST /api/public/scim/Users
ScimApi scim_delete_user DELETE /api/public/scim/Users/{userId}
ScimApi scim_get_resource_types GET /api/public/scim/ResourceTypes
ScimApi scim_get_schemas GET /api/public/scim/Schemas
ScimApi scim_get_service_provider_config GET /api/public/scim/ServiceProviderConfig
ScimApi scim_get_user GET /api/public/scim/Users/{userId}
ScimApi scim_list_users GET /api/public/scim/Users
ScoreApi score_create POST /api/public/scores
ScoreApi score_delete DELETE /api/public/scores/{scoreId}
ScoreApi score_get GET /api/public/scores
ScoreApi score_get_by_id GET /api/public/scores/{scoreId}
ScoreConfigsApi score_configs_create POST /api/public/score-configs
ScoreConfigsApi score_configs_get GET /api/public/score-configs
ScoreConfigsApi score_configs_get_by_id GET /api/public/score-configs/{configId}
SessionsApi sessions_get GET /api/public/sessions/{sessionId}
SessionsApi sessions_list GET /api/public/sessions
TraceApi trace_delete DELETE /api/public/traces/{traceId}
TraceApi trace_delete_multiple DELETE /api/public/traces
TraceApi trace_get GET /api/public/traces/{traceId}
TraceApi trace_list GET /api/public/traces

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Dependencies

~8–24MB
~272K SLoC