> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracelm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get your first reliability signal in under 5 minutes

## Prerequisites

* A TraceLM account
* A TraceLM project API key (`lt_...`)
* At least one provider key: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GOOGLE_API_KEY`
* Python 3.8+ or Node.js 18+

## 1. Install SDK

<Tabs>
  <Tab title="Python">
    ```bash theme={null}
    pip install tracelm
    ```
  </Tab>

  <Tab title="TypeScript">
    ```bash theme={null}
    npm install tracelm
    ```
  </Tab>
</Tabs>

## 2. Initialize Client

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tracelm import TraceLM

    tracelm = TraceLM(
        api_key="lt_your_tracelm_key",
        openai_api_key="sk-your-openai-key",
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { TraceLM } from 'tracelm';

    const tracelm = new TraceLM({
      apiKey: 'lt_your_tracelm_key',
      openaiApiKey: 'sk-your-openai-key',
    });
    ```
  </Tab>
</Tabs>

## 3. Send One Traced Call

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    response = tracelm.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": "Hello"}],
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    const response = await tracelm.chat.completions.create({
      model: 'gpt-4o-mini',
      messages: [{ role: 'user', content: 'Hello' }],
    });
    ```
  </Tab>
</Tabs>

## 4. Generate Reliability Signals

Wrap calls in a task and complete it to trigger detection.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    with tracelm.task(name="starter_task", user_id="user_123") as task:
        tracelm.chat.completions.create(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": "Use tools to plan a trip"}],
        )
        result = task.complete()

    print(result.loops.detected)
    print(result.tool_failure_count)
    print(result.context_failure_count)
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    const task = tracelm.startTask({ name: 'starter_task', userId: 'user_123' });

    try {
      await tracelm.chat.completions.create({
        model: 'gpt-4o-mini',
        messages: [{ role: 'user', content: 'Use tools to plan a trip' }],
      });

      const result = await task.complete();
      console.log(result?.loops.detected);
      console.log(result?.toolFailureCount);
      console.log(result?.contextFailureCount);
    } finally {
      tracelm.endTask();
    }
    ```
  </Tab>
</Tabs>

## 5. Open Reliability Summary

Open `Dashboard -> First-Run Reliability Summary` (`/dashboard/first-run`) and confirm the core cards:

* Loop card
* Context-loss card
* Tool-failure card
* Unnecessary-tool card

## Next Steps

* Explore SDK guides: `/sdks/python`, `/sdks/typescript`
* Review endpoint contracts: `/api-reference/overview`
* Learn the dashboard flow: `/introduction/dashboard-guide`
