PUT/api/orgs/{org_id}/observation-export

Connect 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/whoami returns it.

リクエストボディ

  • enabledboolean必須
  • include_contentboolean

    Export prompt and response content with each span.

    デフォルト: true
  • langfuseobject | null

    Keys 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 | null

      Hosted Langfuse region: https://cloud.langfuse.com, https://us.cloud.langfuse.com, https://jp.cloud.langfuse.com or https://hipaa.cloud.langfuse.com. Omit to keep the stored host.

レスポンス

  • 200

    The 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.

  • 400

    The key pair is malformed.

    レスポンス
    • errorstring必須

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 401

    Missing, unknown or revoked API key.

    レスポンス
    • errorstring必須

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The 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.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    The resource does not exist or belongs to another organization.

    レスポンス
    • errorstring必須

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 409

    No Langfuse connection to export to, its stored keys need rotating, or its host is not a hosted region.

    レスポンス
    • errorstring必須

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    The body failed validation, or langfuse.host is 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