Skip to main content

Set up OpenCode to connect to FriendliAI. Once you complete these steps, your agent will send requests to FriendliAI.

To get started, complete the following steps:

1

Install OpenCode

If you haven't already, install OpenCode.

2

Get a FriendliAI API Key

If you need a new API key, create one.

3

Set Up OpenCode

Set Up FriendliLink and connect your agent to FriendliAI with one command.
  1. In your terminal, run the following command:
    OpenCode opens.
  2. Run the following OpenCode slash command:
  3. Search for and select Friendli.
  4. In API Key, paste your FriendliAI API key.
  5. Select a model. For example, select GLM-5.3.
To learn more, see OpenCode Docs > Providers.
4

Send a Prompt to OpenCode

Open your agent and send a prompt. For example, use the following prompt:

Explore your codebase.

To learn more, see OpenCode Docs > Usage.

Help

Find answers to common agent setup questions.
Last modified on September 23, 2026