Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pages/generative-apis/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ export const generativeApisMenu = {
label: 'Integrating Generative APIs with n8n',
slug: 'integrate-with-n8n'
},
{
label: 'Integrating Generative APIs with Cursor',
slug: 'integrate-with-cursor'
},
{
label: 'Integrating Generative APIs with popular AI tools',
slug: 'integrating-generative-apis-with-popular-tools',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Integrating Generative APIs with Cursor
description: Learn how to integrate Scaleway Generative APIs with Cursor AI code editor for enhanced coding assistance using models like qwen3-coder-30b-a3b-instruct. Includes visual configuration guide.
tags: generative-apis ai machine-learning language-models cursor
dates:
validation: 2025-10-22
posted: 2025-10-22
---
import Requirements from '@macros/iam/requirements.mdx'

import cursorSettingsImage from './assets/scw-cursor-settings.webp'

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.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- A valid [API key](/iam/how-to/create-api-keys/) for API authentication
- Installed [Cursor](https://cursor.com/) on your local machine, and logged in

## Configuring Cursor to use Scaleway Generative APIs

<Lightbox src={cursorSettingsImage} alt="Screenshot of Cursor settings interface showing the configuration for Scaleway Generative APIs, with fields for OpenAI API key and base URL override" />

1. Open Cursor in your browser.
2. Click on the gear icon in the top right corner. The **Cursor Settings** screen displays.
3. In the left sidebar, click **Models**.
4. Uncollapse the **API Keys** section, and toggle on the **OpenAI API Key** setting.
5. Paste the secret part of your [Scaleway API key](/iam/how-to/create-api-keys/) into the **OpenAI API Key** field.
6. Toggle on the **Override OpenAI Base URL** option.
7. Enter `https://api.scaleway.ai/v1` as your base URL in the field that displays.
<Message type="tip">
If you are using a Project other than your [default Project](/organizations-and-projects/concepts/#default-project), modify the base URL accordingly: `https://api.scaleway.ai/{project_id}/v1`
</Message>
8. 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`.
9. Click **Add Custom Model**, then **Add** next to the name of the matching model.

The model is added. Close the **Cursor Settings** tab.

<Message type="note">
Features requiring specialized models, such as Tab Completion, may still use Cursor's built-in models. [See the Cursor documentation](https://cursor.com/docs/settings/api-keys) for more details.
</Message>

## Verifying the integration

To verify that Generative APIs are working correctly in Cursor:

1. Open a new file or existing code file in Cursor.
2. Use `Ctrl+L` (or `Cmd+L` on Mac) to open the AI chat pane.
3. Ask the AI to help with a coding task, such as "Write a function to calculate the factorial of a number".
4. 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-instruct` as the default choice for most tasks, especially autocompletion.
- `qwen3-235b-a22b-instruct-2507` for agentic tasks.
- `bge-multilingual-gemma2` for 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:

1. Click **Auto** in the inline AI chat interface or at the bottom of the AI chat pane.
2. Toggle off the **Auto** selection.
3. Select the model you want Cursor to use from the list.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following table compares AI tools and libraries supported by Scaleway's Gene
| [LlamaIndex](#llamaindex-advanced-rag-applications) | Library for building advanced AI RAG applications | Knowledge graph building, document retrieval, data indexing | Medium |
| [Continue Dev](#continue-dev-ai-coding-assistance) | IDE extension for AI-powered coding assistance | Code completion, code review | Low |
| [Zed AI](#zed-ai-coding-assistance) | IDE including AI-powered coding assistance | Code completion, code review | Low |
| [Cursor](#cursor) | IDE for AI-powered coding assistance | Code completion, code generation, code review | Low |
| [Bolt.diy](#boltdiy-code-generation) | Software to create applications | Code generation, code edition | Low |
| [Chatbox AI](#chatbox-ai) | Desktop client for generative APIs, available on Windows, Mac, Linux | AI copilot for documents, images, or code| Low |
| [n8n](#n8n) | Workflow automation tool | Connecting AI agents, apps, and services. | Low |
Expand Down Expand Up @@ -247,6 +248,14 @@ Zed is an IDE (Integrated Development Environment) including AI coding assistanc
Refer to our dedicated documentation for [connecting Zed to Generative APIs](/generative-apis/reference-content/adding-ai-to-zed-ide/)
</Message>

## Cursor (AI coding assistance)

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.

<Message type="tip">
Refer to our dedicated documentation for [integrating Generative APIs into Cursor](/generative-apis/reference-content/integrate-with-cursor/)
</Message>

## Bolt.diy (code generation)

Bolt.diy is a software enabling users to create web applications from the prompt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Below are common issues that you may encounter when using Generative APIs, their

### Solution
- Verify the JSON body you send is valid:
- You can store your content in a file with the `.json` extension (eg. named `file.json`), and open it with an IDE such as VSCode or Zed. Syntax errors should display if there are any.
- You can store your content in a file with the `.json` extension (eg. named `file.json`), and open it with an IDE such as [VSCode](/generative-apis/reference-content/adding-ai-to-vscode-using-continue/), [Zed](/generative-apis/reference-content/adding-ai-to-zed-ide/) or [Cursor](/generative-apis/reference-content/integrate-with-cursor/). Syntax errors should display if there are any.
- You can copy your content in a JSON formatter tool or linter available online, that will identify errors.
- Usually, most common errors include:
- Missing or unnecessary quotes `"`, `'` or commas `,` on property names and string values.
Expand Down