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

# LiteLLM observability

> Trace LiteLLM calls to any model it routes to with one integration: prompts, token usage, cost, and latency in Laminar's transcript view.

## Overview

[LiteLLM](https://www.litellm.ai/) is a framework/library for building LLM applications that simplifies accessing many models across different providers.

## Default configuration

<Steps>
  <Step title="Ensure you have the latest version of Laminar">
    ```sh theme={null}
    pip install -U 'lmnr[all]'
    ```
  </Step>

  <Step title="Initialize Laminar">
    Laminar auto-instruments LiteLLM. No callback is required.

    ```python theme={null}
    import os
    import litellm
    from lmnr import Laminar

    Laminar.initialize(project_api_key=os.environ["LMNR_PROJECT_API_KEY"])
    ```

    <Note>
      `LaminarLiteLLMCallback` is deprecated and does nothing. Remove it if you already use it.
    </Note>
  </Step>

  <Step title="Run your code and see traces in Laminar">
    Example code:

    ```python theme={null}
    import os
    import litellm
    from lmnr import Laminar

    Laminar.initialize(project_api_key=os.environ["LMNR_PROJECT_API_KEY"])

    response = litellm.completion(
        model="gpt-5-nano",
        messages=[
          {"role": "user", "content": "What is the capital of France?"}
        ],
    )
    ```

    <div style={{ border: '1px solid #2B2B30', borderRadius: '8px', overflow: 'hidden' }}>
      <img src="https://mintcdn.com/laminarai/W6ojRY5YjRjfXRin/images/traces/litellm.png?fit=max&auto=format&n=W6ojRY5YjRjfXRin&q=85&s=4a82323756cd93c5ba0e7919cf30cf4e" alt="LiteLLM trace" style={{ margin: '0px' }} width="1854" height="580" data-path="images/traces/litellm.png" />
    </div>
  </Step>
</Steps>

## Related integrations

<CardGroup cols={2}>
  <Card title="OpenAI" href="/docs/integrations/openai">
    Trace the OpenAI SDK directly in TypeScript and Python.
  </Card>

  <Card title="Anthropic" href="/docs/integrations/anthropic">
    Trace the Anthropic SDK directly in TypeScript and Python.
  </Card>

  <Card title="OpenRouter" href="/docs/integrations/openrouter">
    Trace OpenRouter requests with model and cost attribution.
  </Card>

  <Card title="Cohere" href="/docs/integrations/cohere">
    Trace Cohere chat, embed, and rerank calls.
  </Card>

  <Card title="LangChain / LangGraph" href="/docs/integrations/langchain">
    Trace LangChain chains and LangGraph graphs.
  </Card>

  <Card title="All integrations" href="/docs/integrations">
    Browse every provider, framework, coding agent, and browser integration Laminar supports.
  </Card>
</CardGroup>
