Overview
The completions capability provides access to chat and text completion APIs through LiteLLM, supporting multiple providers.Python Usage
Chat Completion
Text Completion (Legacy)
Async Usage
Parameters
Result Object
TheCompletionResult object contains:
id: Response IDcontent: Generated textrole: Message role (“assistant”)model: Model usedfinish_reason: Why generation stoppedusage: Token usage statisticstool_calls: Any tool calls made

