Configuration
Configuration
Keys are read from the environment when not passed explicitly, matching the Anthropic and OpenAI SDK conventions.
Environment variables
| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY | Anthropic provider key |
OPENAI_API_KEY | OpenAI provider key |
FLUXCOMPUTE_KEY | FluxCompute key: enables telemetry |
FLUX_TELEMETRY_URL | Override the telemetry endpoint |
FLUX_GRAPH_EVENTS_URL | Override the graph-events endpoint |
Client options
All FluxClient arguments are keyword-only:
| Option | Default | Purpose |
|---|---|---|
anthropic_key | None | Anthropic API key. Required for Anthropic models |
openai_key | None | OpenAI API key. Required for OpenAI models |
fluxcompute_key | None | Enables telemetry and the dashboard |
baseline_model | most expensive | The model savings are compared against |
telemetry | True | Set False to disable both channels entirely |
content_capture | False | Also ship response content. Requires telemetry and a key |
provider | auto-detected | Force "anthropic" or "openai" |
The provider is auto-detected when only one key is given; if both are set, Anthropic is used
unless you pass provider explicitly.
client = FluxClient(
fluxcompute_key="flx_...", # or FLUXCOMPUTE_KEY
baseline_model="claude-opus-4-8", # what savings are measured against
provider="anthropic",
)
Close the client when you're done so buffered telemetry is flushed:
await client.close()
Wire contract
The format the SDK sends is documented and versioned in docs/telemetry-contract.md. See Telemetry & privacy for what is and isn't included.