Installation & Quick Start

Install either SDK, set your project API key, and start logging metadata-only telemetry.

Install

Python
pip install aurex-sdk
Node.js
npm install aurex-sdk

Zero-code auto-hook

The install-hook command patches provider modules before your app imports them. See auto-hook reference for provider coverage. Environment variables are documented on /docs/installation/env-vars.

Python
# Install the hook into your site-packages
aurex install-hook

export AUREX_ENABLED=1
export AUREX_API_KEY=aux_dev_yourkey
python your_app.py
Node.js
npx aurex install-hook
source .env.aurex
export AUREX_API_KEY=aux_dev_yourkey
node your_app.js

Manual initialization

Python
from aurex_sdk import AurexAuditor, AurexConfig

auditor = AurexAuditor(AurexConfig(
    api_key="aux_dev_yourkey",
    project="my-project",
    ledger_path=".aurex/ledger.jsonl",
    per_process_ledger=False,
    cloud_sync=True,
))
auditor.log_event(model="gpt-4o-mini", input_tokens=120, output_tokens=40)
auditor.flush()
Node.js
import { AurexAuditor } from "aurex-sdk";

const auditor = AurexAuditor.getInstance({
  apiKey: "aux_dev_yourkey",
  project: "my-project",
  ledgerPath: ".aurex/ledger.jsonl",
  perProcessLedger: false,
  cloudSync: true,
});
auditor.logEvent({ model: "gpt-4o-mini", inputTokens: 120, outputTokens: 40 });
auditor.flush();

Environment variables

Full AUREX_* reference: /docs/installation/env-vars