Skip to content

Authentication

The Phoenix SDK uses Bearer token authentication. Authentication is optional for local/self-hosted instances but required for hosted Phoenix deployments.

Basic Usage

1
2
3
using Phoenix;

var client = new PhoenixClient(apiKey: Environment.GetEnvironmentVariable("PHOENIX_API_KEY")!);

Self-Hosted Instances

For self-hosted Phoenix instances, you may also need to configure the base URL:

1
2
3
var client = new PhoenixClient(
    apiKey: Environment.GetEnvironmentVariable("PHOENIX_API_KEY")!,
    baseUri: new Uri("http://localhost:6006"));

Environment Variable

Variable Description
PHOENIX_API_KEY Your Phoenix API key (optional for local instances)