Configuration
delimiter.init()#
Call once at app startup — typically in your entry point (index.ts, server.ts, app.ts).
import { delimiter } from '@delimiter/sdk'
delimiter.init('dlm_your_project_key')That's it. All AI API calls your app makes are now automatically monitored.
Options#
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| projectKey | string | Yes | — | Your project API key from delimiter.app. Starts with dlm_. |
| options.app | string | No | "default" | App name tag for multi-app support. |
| options.endpoint | string | No | "https://delimiter.app/api/report" | Custom reporting endpoint for self-hosted instances. |
| options.enabled | boolean | No | true | Enable/disable reporting. Set to false in tests. |
| options.debug | boolean | No | false | Log reports to console for debugging. |
Environment examples#
Production (default):
delimiter.init('dlm_key')Testing (disabled):
delimiter.init('dlm_key', { enabled: false })Development (debug logging):
delimiter.init('dlm_key', { debug: true })Self-hosted:
delimiter.init('dlm_key', { endpoint: 'https://my-instance.com/api/report' })