Skip to main content
Langtrace integrates directly with LiteLLM, offering detailed, real-time insights into performance metrics such as cost, token usage, accuracy, and latency.
You’ll need API key from Langtrace. Sign up for Langtrace if you haven’t done so already.*

LiteLLM SDK

  1. Setup environment variables:
Shell
  1. Add callback to your LiteLLM client
main.py
  1. Use LiteLLM completion
main.py

LiteLLM Proxy

  1. Create config.yaml:
config.yaml
  1. Run LiteLLM Proxy
Shell
  1. Test your setup
You can now view your traces on the Langtrace dashboard traces Want to see more supported methods? Checkout the sample code in the Langtrace Langchain Python Example