Integrating OpenCode with Scaleway's Generative APIs
OpenCode is a coding agent for terminal and IDE. You can integrate Scaleway's Generative APIs models to OpenCode.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A valid API key for API authentication
- Installed OpenCode on your local machine
Configure OpenCode
-
Start OpenCode:
opencode -
Press
Ctrl + Pto display commands. -
Type
providerto search for commands. SelectConnect provider, then pressEnter. -
Type
scalewayto search for providers. SelectScaleway, then pressEnter. -
Enter your
SCW_SECRET_KEYas API key. PressEnter. -
Select a model in the list, for instance
Devstral 2 123B Instruct (2512). -
Type any prompt asking opencode to create or update code files. For example:
"Write a fibonnaci function in python that compute the first 10 fibonnaci numbers"
Going further
- You can explore OpenCode additional features and configure OpenCode using a JSON configuration file.
- By default, requests are performed to
https://api.scaleway.ai/v1on your Scaleway default project. If you want to perform requests on a specific project (for instance, to track specific billing), edit OpenCode JSON configuration with URL:https://api.scaleway.ai/###PROJECT_ID###/v1
Still need help?Create a support ticket