Applies to:
Summary
Issue: Streaming logs fails with initialization errors or Forbidden errors when bothapiUrl and appUrl are set with conflicting values (e.g., staging URL in global env and production URL in app config).
Cause: apiUrl takes precedence over appUrl, causing SDK requests to go to the wrong data plane endpoint.
Resolution: Remove conflicting URL configurations and set only BRAINTRUST_API_URL or apiUrl to point to your data plane endpoint.
Resolution Steps
If using standard Braintrust hosted deployment
Step 1: Remove appUrl configuration
Only setappUrl if your frontend is hosted somewhere other than https://www.braintrust.dev.
Step 2: Verify API URL is not set in global environment
Check thatBRAINTRUST_API_URL or apiUrl is not set in global environment variables with incorrect values.
If using self-hosted or hybrid deployment
Step 1: Set only apiUrl to data plane endpoint
ConfigureBRAINTRUST_API_URL or apiUrl to point to your data plane, not the web app URL.
Step 2: Verify data plane URL in settings
Navigate to Settings > Data Plane in the Braintrust UI to confirm the correct endpoint.Step 3: Remove conflicting appUrl configurations
Check both global environment variables and application-level configs for conflictingappUrl settings.
Additional Information
URL configuration differences
BRAINTRUST_API_URL/apiUrl: Data plane endpoint where SDK makes logging requests (required for self-hosted)appUrl: Web app URL for authentication and link generation (only needed if frontend is not at braintrust.dev)- When both are set,
apiUrltakes precedence
Common configuration mistakes
- Setting
API_URLin global environment with staging URL while passing productionappUrlfrom application - Using
appUrlinstead ofapiUrlfor data plane configuration - Not checking Settings > Data Plane for correct endpoint in self-hosted deployments