Skip to main content
Create a FriendliAI API key, send your first request, and learn to control a model’s capabilities. Once you complete these steps, you’re ready to choose a popular model and use your favorite agent or SDK with FriendliAI. With Friendli Model APIs, you get access to a curated set of popular, open-weight models that are ready for you today. If you want to run any model — including your own — on dedicated GPUs, try Friendli Dedicated Endpoints. To get started, complete the following steps.

Create an API Key

1

Create a Friendli Suite Account

If you haven’t already, sign up for an account.
2

Sign In

Then, sign in. Friendli Suite opens your dashboard.
3

Create a FriendliAI API Key

  1. In the left sidebar, click Settings. Then, click API Keys.
  2. In the upper-right corner, click Create API Key.
  3. (Optional) Name your API key and set an expiration date.
  4. Click Create Key.
  5. Click Copy.

Send a Request

1

Set Up Your API Key

In your terminal, run the following command:
Replace <FRIENDLIAI_API_KEY> with your API key.
2

Install the OpenAI SDK

In your terminal, run the following command:
3

Send Your Request to FriendliAI

Run the following code:
FriendliAI returns a response, similar to the following:

Control a Capability

You can control most capabilities — such as streaming or reasoning — with parameters, which you pass as either request body parameters or chat template keyword arguments. How you pass each depends on the parameter:

Turn Streaming On

Some request body parameters are processed by the Friendli Engine and natively by an SDK.For example, to turn streaming on, run the following code:

Set the Reasoning Budget

Other request body parameters are processed exclusively by the Friendli Engine and are used to further shape the response.For example, to set the reasoning budget to 10,000 tokens, run the following code:

Preserve Reasoning

Chat template keyword arguments are always forwarded to the model’s chat template and used to construct the prompt to the model’s specifications.For example, to preserve reasoning, run the following code:
Congratulations. You learned to control a model’s capabilities and are ready to build your next project. You’re ready to start building with your favorite coding agent or SDK to connect to fast, cost-efficient, and reliable open-weight models.

Models

Use popular FriendliAI models.

Agents

Use your favorite agent with FriendliAI.

SDKs

Use your favorite SDK with FriendliAI.
Last modified on August 10, 2026