How to use
Before you start, ensure you’ve already obtained theAPI_KEY from the Friendli Suite > Personal Settings > API Keys.
Add friendliai prefix to your endpoint name for the model parameter.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Build Smarter Agents with Nemotron 3 Nano Omni on FriendliAI — Explore models
Use LiteLLM with FriendliAI to call Model APIs, Dedicated Endpoints, and fine-tuned endpoints. Includes setup, model selection, and streaming examples.
API_KEY from the Friendli Suite > Personal Settings > API Keys.
Add friendliai prefix to your endpoint name for the model parameter.
import os
from litellm import completion
os.environ['API_KEY'] = "YOUR_API_KEY"
response = completion(
model="friendliai/meta-llama-3.3-70b-instruct",
messages=[
{"role": "user", "content": "hello from litellm"}
],
)
print(response)
import os
from litellm import completion
os.environ['API_KEY'] = "YOUR_API_KEY"
response = completion(
model="friendliai/meta-llama-3.3-70b-instruct",
messages=[
{"role": "user", "content": "hello from litellm"}
],
stream=True
)
for chunk in response:
print(chunk)