/api/orgs/{org_id}/observation-exportConnect Langfuse and turn live export on or off
Send langfuse keys to connect or rotate the project in the same call. Turning export on also turns broadcast off on that connection so no call arrives twice. 409 when there is no Langfuse connection yet, the stored keys need rotating, or the stored host is not a hosted Langfuse region. Needs an org admin or the organization's own API key.
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメータ
org_idstring必須Your organization id (uuid).
GET /api/whoamireturns it.
リクエストボディ
enabledboolean必須include_contentbooleanExport prompt and response content with each span.
langfuseobject | nullKeys to connect or rotate the Langfuse project; omit to use the stored connection.
いずれか
object
public_keystring必須Langfuse project public key (
pk-lf-...).secret_keystring必須Langfuse project secret key (
sk-lf-...) from the same project.hoststring | nullHosted Langfuse region:
https://cloud.langfuse.com,https://us.cloud.langfuse.com,https://jp.cloud.langfuse.comorhttps://hipaa.cloud.langfuse.com. Omit to keep the stored host.
レスポンス
200The export state after the write.
レスポンス
connectedboolean必須A Langfuse connection exists.
hoststring | null必須The Langfuse host.
credential_last4string | null必須Last four characters of the stored secret key.
enabledboolean必須Gateway calls are being exported.
include_contentboolean必須Exported spans carry prompt and response content.
400The key pair is malformed.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
401Missing, unknown or revoked API key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
409No Langfuse connection to export to, its stored keys need rotating, or its host is not a hosted region.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422The body failed validation, or
langfuse.hostis not a hosted Langfuse region.
リクエスト
curl -X PUT https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/observation-export \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"include_content": true,
"langfuse": {
"public_key": "pk-lf-2b8e4c1a-7f3d-4e9a-b6c0-1d5f8a2e9c4b",
"secret_key": "sk-lf-9a1c3e5f-2b4d-4f6a-8c0e-7d9b1a3c5e7c",
"host": "https://cloud.langfuse.com"
}
}'レスポンス
{
"connected": true,
"host": "https://cloud.langfuse.com",
"credential_last4": "5e7c",
"enabled": true,
"include_content": true
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/observation-export