At a glance
- Availability: Experimental (how to enable).
- Auth: Basic auth.
- Connection: HTTP Basic auth with
LANGFUSE_PUBLIC_KEYas the username andLANGFUSE_SECRET_KEYas the password. - Docs: https://langfuse.com/docs/api-and-data-platform/features/public-api
Credentials
Set these per environment. See Connect an integration.Setup
- Create a Langfuse account: Sign up at https://cloud.langfuse.com (EU) or https://us.cloud.langfuse.com (US) - the free Hobby plan is enough for testing. Self-hosting is also supported.
- Create project API keys: In your Langfuse project, open Settings → API Keys and create a key pair. You get a public key (pk-lf-…) and a secret key (sk-lf-…).
- Store the keys: Add LANGFUSE_PUBLIC_KEY=pk-lf-… and LANGFUSE_SECRET_KEY=sk-lf-… to your .env file. The API uses HTTP Basic auth with the public key as username and secret key as password.
- Verify access: Run the List Traces tool. If your project is in the US region, pass host us.cloud.langfuse.com; EU projects use the default cloud.langfuse.com.
- API keys are project-scoped - create separate keys per project/environment
- All tools take a ‘host’ parameter (default cloud.langfuse.com for EU); US cloud is us.cloud.langfuse.com and self-hosted deployments use their own domain
Tools
| Tool | Access | Description |
|---|---|---|
| List Traces | Read | List traces in the Langfuse project with optional filters |
| Get Trace | Read | Get a single trace with its full observation tree and scores |
| List Observations | Read | List observations (spans, generations, events) with optional filters |
| Create Score | Write | Attach a score (evaluation result) to a trace or observation |
Example prompts
- List my most recent Langfuse traces and summarize latency, errors, and usage patterns.
- Look up a Langfuse trace I specify and attach an accuracy score with a short comment.