> ## Documentation Index
> Fetch the complete documentation index at: https://friendli.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# QuickStart: Friendli Model APIs

> Get started with Friendli Model APIs in minutes. Explore popular AI models, experiment in a chat-style playground, and make your first API call with no setup required.

export const RoundedBorderBox = ({children, caption}) => <div className="rounded-border-box">
    {children}
    {caption && <p className="text-sm text-gray-700 dark:text-gray-400">{caption}</p>}
  </div>;

Get started with [Friendli Model APIs](/guides/model-apis/introduction) 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](https://friendli.ai/suite).

### 2. Navigate to the Model APIs Page

Go to the [Model APIs page](https://friendli.ai/suite/~/model-apis) to see all available models.

<RoundedBorderBox>
  <img alt="model-apis" src="https://mintcdn.com/friendliai/SRK7vx0X1v_2rjkU/static/images/guides/model-apis/model-apis.png?fit=max&auto=format&n=SRK7vx0X1v_2rjkU&q=85&s=3a23eda872956238898a1a96acb863e7" width="3420" height="1440" data-path="static/images/guides/model-apis/model-apis.png" />
</RoundedBorderBox>

### 3. Choose a Model

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

<RoundedBorderBox>
  <img alt="model-apis-overview" src="https://mintcdn.com/friendliai/SRK7vx0X1v_2rjkU/static/images/guides/model-apis/model-apis-overview.png?fit=max&auto=format&n=SRK7vx0X1v_2rjkU&q=85&s=d6b12d9fcf643a891efd736327eea553" width="3420" height="1968" data-path="static/images/guides/model-apis/model-apis-overview.png" />
</RoundedBorderBox>

### 4. Send a Prompt

The playground offers a chat-style interface with built-in tools such as a calculator and [Linkup web search](https://friendli.ai/blog/linkup-partnership). You can also adjust inference parameters like temperature and top-p to fine-tune the model’s behavior.

<RoundedBorderBox>
  <img alt="playground" src="https://mintcdn.com/friendliai/SRK7vx0X1v_2rjkU/static/images/guides/model-apis/playground.png?fit=max&auto=format&n=SRK7vx0X1v_2rjkU&q=85&s=6076170df6e3a9e4296c462d1ae43f97" width="3420" height="1968" data-path="static/images/guides/model-apis/playground.png" />
</RoundedBorderBox>

<br />

<RoundedBorderBox>
  <img alt="chat" src="https://mintcdn.com/friendliai/SRK7vx0X1v_2rjkU/static/images/guides/model-apis/chat.png?fit=max&auto=format&n=SRK7vx0X1v_2rjkU&q=85&s=3efe611b52ae7301d707a4a816a9a7ec" width="3420" height="1968" data-path="static/images/guides/model-apis/chat.png" />
</RoundedBorderBox>

## 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](https://friendli.ai/suite).

### 2. Create a Personal API Key

You can create and manage API keys in: [Personal Settings > API Keys](https://friendli.ai/suite/~/setting/keys).

<RoundedBorderBox>
  <img alt="api-keys" src="https://mintcdn.com/friendliai/B1cVJnzBiALUE2iL/static/images/guides/tutorials/getting-started-with-exaone-4.0/api-keys.png?fit=max&auto=format&n=B1cVJnzBiALUE2iL&q=85&s=96ba490814cbd56a4c0e6077146a6f90" width="3016" height="1506" data-path="static/images/guides/tutorials/getting-started-with-exaone-4.0/api-keys.png" />
</RoundedBorderBox>

Set your key as an environment variable:

```shell theme={null}
export API_KEY="YOUR API KEY HERE"
```

### 3. Install an SDK

Use the [Friendli Python SDK](/sdk/python-sdk) or any OpenAI-compatible SDK.

```shell theme={null}
# uv
uv add friendli

# pip
pip install friendli
```

### 4. Send an API Request

You can now start sending API requests right away.

<CodeGroup>
  ```python OpenAI Python SDK theme={null}
  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)
  ```

  ```python Friendli Python SDK theme={null}
  import os

  from friendli import SyncFriendli

  with SyncFriendli(
      token=os.environ["API_KEY"],
  ) as friendli:
      res = friendli.serverless.chat.stream(
          model="zai-org/GLM-5.2",
          messages=[
              {"role": "system", "content": "You are a helpful assistant."},
              {"role": "user", "content": "Hello!"},
          ],
          chat_template_kwargs={
              "enable_thinking": True,
          },
          temperature=1.0,
          top_p=1.0,
          parse_reasoning=True,
      )
      for chunk in res:
          if content := chunk.data.choices[0].delta.content:
              print(content, end="")
  ```

  ```sh curl theme={null}
  curl -X POST https://api.friendli.ai/serverless/v1/chat/completions \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $API_KEY" \
    -d '{
    "model": "zai-org/GLM-5.2",
      "messages": [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
      ],
      "stream": true
  }'
  ```
</CodeGroup>
