Skip to navigationSkip to main contentSkip to footerScaleway DocsAsk our AI
Ask our AI

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

  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 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.

    Tip

    If you are using a Project other than your default Project, modify the base URL accordingly: https://api.scaleway.ai/{project_id}/v1

  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.

    Note

    Features requiring specialized models, such as Tab Completion, may still use Cursor's built-in models. See the Cursor documentation for more details.

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.
Still need help?

Create a support ticket
No Results