TokenLab

Frameworks & Platforms

OpenLIT

Monitor TokenLab OpenAI-compatible requests with OpenLIT

Overview

OpenLIT can record OpenAI SDK calls after the SDK Base URL is changed to TokenLab /v1.

Installation

pip install openlit openai

Environment

export TOKENLAB_API_KEY="sk-your-tokenlab-key"

Example

import os

import openlit
from openai import OpenAI

openlit.init()

client = OpenAI(
    api_key=os.environ["TOKENLAB_API_KEY"],
    base_url="https://api.tokenlab.sh/v1",
)

response = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Hello from OpenLIT"}],
)

Endpoint Notes

OpenLIT follows the SDK instrumentation path. Chat Completions is the safest integration surface; other TokenLab-native calls depend on whether your OpenLIT/OpenTelemetry setup captures that SDK method or HTTP client.

On this page