LiteLLM
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
What is LiteLLM?
LiteLLM provides a unified Python interface for calling 100+ LLM providers using the OpenAI format. With Respan, you can either:
- Gateway — route requests through Respan for observability, fallbacks, and load balancing
- Logging — keep calling providers directly and export logs to Respan via a callback
Quickstart
Install packages
Gateway mode
Route LiteLLM requests through the Respan gateway. This gives you full access to Respan features like fallbacks, load balancing, and prompt management.
Logging mode
Register the Respan callback to log all completions automatically. Requests go directly to providers — only the logs are sent to Respan.
Supported parameters
Gateway mode (extra_body)
Pass Respan parameters using extra_body when routing through the gateway.
Logging mode (metadata)
Pass Respan parameters inside metadata.respan_params.
Configuration
See the LiteLLM Exporter SDK reference for the full API.
Async usage
The callback supports async completions automatically:
Multiple providers
LiteLLM’s unified interface means all providers are logged with the same callback: