TracePilot AI authenticates your SDK via an API key you pass to theDocumentation Index
Fetch the complete documentation index at: https://tracepilot.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
TracePilot constructor. This page explains how to get that key, how to use it safely, and what options are available if you’re running a self-hosted TracePilot instance.
Get your API key
Sign in at tracepilotai.com using GitHub or Google. After signing in, navigate to your account settings to find your API key. All TracePilot API keys follow this format:tp_live_ prefix identifies it as a live production key. Copy the full key including the prefix.
Pass the key to the SDK
Pass your API key as the first argument to theTracePilot constructor:
Custom endpoint (self-hosted)
If you’re running a self-hosted TracePilot ingest server, pass your server’s URL as the second argument to the constructor:If your key is invalid
If your API key is missing, malformed, or revoked, TracePilot will fail to authenticate when submitting traces. To diagnose:- Confirm the key starts with
tp_live_— keys with any other prefix or format won’t be accepted - Check that you’re reading the key from the correct environment variable
- Regenerate the key in your dashboard at tracepilotai.com/dashboard if it may have been compromised
- Ensure no extra whitespace was copied into the key value
Authentication errors surface as SDK exceptions at trace submission time, not at construction time. If
tp.startTrace() or tp.wrapOpenAI() throw an authentication error, the issue is with the key passed to the constructor.