delimiter
SDK / CONFIGURATION

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. | | 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 })

Debug mode#

When debug: true, the SDK logs to the console:

  • Provider detection events (which domains were matched)
  • Header parsing results (rate limits and credits extracted)
  • Report send status (success or failure for each POST)

Useful for verifying that Delimiter is intercepting your API calls correctly.

Provider hints#

On init, the SDK scans process.env for common AI provider API key environment variables (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY). If found, the SDK sends "provider hints" to the dashboard so your providers appear immediately — before any API calls are made.