Integrating Generative APIs with Cursor
Cursor is an AI-powered code editor that helps developers write and edit code more efficiently. It can read your existing codebase, help you navigate it, and generate code based on your natural language descriptions. Built on top of Visual Studio Code, it allows you to integrate language models directly into your coding workflows.
This guide will help you integrate Scaleway Generative APIs into Cursor. This lets you use models such as qwen3-coder-30b-a3b-instruct for code assistance and generation.
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 Cursor on your local machine, and logged in
Configuring Cursor to use Scaleway Generative APIs
-
Open Cursor in your browser.
-
Click on the gear icon in the top right corner. The Cursor Settings screen displays.
-
In the left sidebar, click Models.
-
Uncollapse the API Keys section, and toggle on the OpenAI API Key setting.
-
Paste the secret part of your Scaleway API key into the OpenAI API Key field.
-
Toggle on the Override OpenAI Base URL option.
-
Enter
https://api.scaleway.ai/v1as your base URL in the field that displays. -
In the Models search bar at the top of the page, paste the name of the model you want to use, for example,
qwen3-coder-30b-a3b-instruct. -
Click Add Custom Model, then Add next to the name of the matching model.
The model is added. Close the Cursor Settings tab.
Verifying the integration
To verify that Generative APIs are working correctly in Cursor:
- Open a new file or existing code file in Cursor.
- Use
Ctrl+L(orCmd+Lon Mac) to open the AI chat pane. - Ask the AI to help with a coding task, such as "Write a function to calculate the factorial of a number".
- Check that the AI responds with code suggestions.
If the integration is working correctly, you should see AI-generated code suggestions that are relevant to your request.
If you encounter any issues, verify that your API key is correct and that the base URL is properly configured.
Choosing a model
We recommended using the following models with Cursor:
qwen3-coder-30b-a3b-instructas the default choice for most tasks, especially autocompletion.qwen3-235b-a22b-instruct-2507for agentic tasks.bge-multilingual-gemma2for embeddings.
You can add multiple custom models to Cursor. By default, it will use Auto model selection to determine which of your added models to use for a given task. To override this:
- Click Auto in the inline AI chat interface or at the bottom of the AI chat pane.
- Toggle off the Auto selection.
- Select the model you want Cursor to use from the list.