-
Notifications
You must be signed in to change notification settings - Fork 259
feat(genapis): add doc for cursor #5702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+14.9 KB
pages/generative-apis/reference-content/assets/scw-cursor-settings.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions
78
pages/generative-apis/reference-content/integrate-with-cursor.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| 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. | ||
|
|
||
|
|
||
RoRoJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
RoRoJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
RoRoJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
RoRoJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
RoRoJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.