API Reference
Using the SDKs is the recommended way to integrate with Langfuse. However, the API can also be used directly.
There are two ways to access the API:
- Server-side: Full access with secret key
- Client-side: Restricted access with public key
Full access with secret key
The full API is available with a secret key. This key should not be exposed to users.
Authentication (Basic): pass the public key
as username and the secret key
as password
Restricted access with public key (client-side)
To allow for client-side usage of the API, a subset of the API routes are available with a public key. To integrate this API with your web application, you can also use the Typescript frontend SDK.
Authentication (Bearer): Bearer <public key>
(authorization header)