Skip to main content
Get started with Friendli Model APIs in two ways: interact with models in the playground, or call the API directly from your application. This quickstart walks you through both.

Explore Models in the Playground

Try models directly in Friendli Suite. The playground provides an interactive experience where you can test prompts, inspect responses, and fine-tune inference settings.

1. Sign Up or Log In

Create an account or log in at Friendli Suite.

2. Navigate to the Model APIs Page

Go to the Model APIs page to see all available models.

3. Choose a Model

Select a model from the list. Each model page includes a brief overview and usage details.

4. Send a Prompt

The playground offers a chat-style interface with built-in tools such as a calculator and Linkup web search. You can also adjust inference parameters like temperature and top-p to fine-tune the model’s behavior.

Use the API in Your Application

To use a model in your application, call it directly through the API. Each model page includes ready-to-use example code you can paste into your application.

1. Sign Up or Log In

Create an account or log in at Friendli Suite.

2. Create a Personal API Key

You can create and manage API Keys in: Personal Settings > API Keys. Set your key as an environment variable:
export API_KEY="YOUR API KEY HERE"

3. Install an SDK

Use the Friendli Python SDK or any OpenAI-compatible SDK.
# uv
uv add friendli

# pip
pip install friendli

4. Send an API Request

You can now start sending API requests right away.
import os

from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("API_KEY"),
    base_url="https://api.friendli.ai/serverless/v1",
)

completion = client.chat.completions.create(
    model="zai-org/GLM-5.2",
    extra_body={
        "parse_reasoning": True,
        "chat_template_kwargs": {"enable_thinking": True},
    },
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
)

print("Reasoning: ", completion.choices[0].message.reasoning_content)
print(completion.choices[0].message.content)
Last modified on June 22, 2026