Songlines Control — Documentation

Quick Start

Get Songlines Control connected to your first AI workload in under 5 minutes. You will need an API key from the dashboard.

1. Generate an API Key

Navigate to API Keys in the sidebar and click New Key. Give it a descriptive name (e.g. "production-app") and copy the key — it is only shown once.

2. Install the SDK

bash
npm install @songlines/sdk
# or
yarn add @songlines/sdk

3. Initialise the client

typescript
import { SonglinesTelemetry } from "@songlines/sdk";

const telemetry = new SonglinesTelemetry({
  apiKey: process.env.SONGLINES_API_KEY,
  endpoint: "https://www.songlinesai.com/api/ingest",
});

4. Wrap your first LLM call

typescript
const result = await telemetry.trace({
  workflow: "contract-analysis",
  model: "gpt-4o",
  fn: async () => {
    // Your existing OpenAI / Anthropic call here
    return await openai.chat.completions.create({ ... });
  },
});

5. Verify in the dashboard

Within 30 seconds your first trace will appear in Observability → Recent Traces. Token counts, latency, and cost will be calculated automatically.