Movatterモバイル変換


[0]ホーム

URL:


Langfuse Town Hall →Langfuse Town Hall – New Features and Q4 Roadmap →

Public API

Langfuse is open and meant to be extended via custom workflows and integrations. All Langfuse data and features are available via the API.

/api/public

References:

There are 3 different groups of APIs:

  • This page -> Project-level APIs: CRUD traces/evals/prompts/configuration within a project
  • Organization-level APIs: provision projects, users (SCIM), and permissions
  • Management API: administer organizations on self-hosted installations

Authentication

Authenticate with the API usingBasic Auth.The API keys are available in the Langfuse project settings.

  • Username: Langfuse Public Key
  • Password: Langfuse Secret Key

Example:

curl -u public-key:secret-key https://cloud.langfuse.com/api/public/projects

Access via SDKs

Both the LangfusePython SDK and theJS/TS SDK provide a strongly-typed wrapper around our public REST API for your convenience. The API methods are accessible via theapi property on the Langfuse client instance in both SDKs.

You can use your editor’s Intellisense to explore the API methods and their parameters.

When fetchingprompts, please use theget_prompt (Python) /getPrompt (JS/TS) methods on the Langfuse client to benefit from client-side caching, automatic retries, and fallbacks.

When using thePython SDK:

from langfuseimport get_clientlangfuse= get_client()...# fetch a tracelangfuse.api.trace.get(trace_id)# async client via asyncioawait langfuse.async_api.trace(trace_id)# explore more endpoints via Intellisenselangfuse.api.*await langfuse.async_api.*

Ingest Traces via the API

It is recommended to use the OpenTelemetry Endpoint to ingest traces. Please refer to theOpenTelemetry docs for more information.

Alternatives

You can also export data via:

  • UI - Manual batch-exports from the Langfuse UI
  • Blob Storage - Scheduled automated exports to cloud storage

FAQ

GitHub Discussions

Was this page helpful?

[8]ページ先頭

©2009-2025 Movatter.jp