Friendli Model APIs and Friendli Dedicated Endpoints are OpenAI-compatible.
You can migrate existing applications with minimal effort, still using the official OpenAI SDKs.
Specify the Base URL and API Key
Initialize the OpenAI client using FriendliAI’s base URL and your Personal API key.
- Model APIs:
https://api.friendli.ai/serverless/v1.
- Dedicated Endpoints:
https://api.friendli.ai/dedicated/v1.
Get your Personal API key in Friendli Suite > Personal Settings > API Keys.
Usage
Choose any model available on Friendli Model APIs or Dedicated Endpoints.
Completions API
Generate text completions using a simple prompt-based approach.
Chat Completions API
Generate chat completions using a conversational message-based approach.
Streaming Mode
Receive responses in real-time, enabling a better user experience for long responses.
Last modified on September 23, 2026