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:
Install OpenCode
If you haven't already, install OpenCode.
Get a FriendliAI API Key
If you need a new API key, create one.
Set Up OpenCode
-
In your terminal, run the following command:
OpenCode opens.
-
Run the following OpenCode slash command:
- Search for and select Friendli.
- In API Key, paste your FriendliAI API key.
- Select a model. For example, select GLM-5.3.
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.