Skip to main content
You can use LiteLLM to interact with FriendliAI. If you already use LiteLLM, you can migrate your existing applications with minimal changes.

How to Use

Before you start, get your FRIENDLIAI_API_KEY from Friendli Suite > Personal Settings > API Keys. Then add the friendliai prefix to your endpoint name in the model parameter.

Chat Completion

Choose the example for your endpoint type. For Model APIs, you can specify one of the available models.

Chat Completion - Streaming

Last modified on July 7, 2026