Cursor

Use Case:

Suitable for users who already use Cursor and want to route Chat, Composer, or Agent model requests to MaiToken.
Cursor's Tab completion, Auto mode, and some built-in features may continue to use Cursor's own services. This section covers how to configure an OpenAI API Key and Base URL.

Configuration Steps

  1. Open Cursor Settings: Launch Cursor and press Cmd/Ctrl + ,, or open Cursor Settings directly.

  2. Go to the Models Page: Locate Models, Models & API Keys, or API Keys.

  3. Enter OpenAI API Key: Paste your own MaiToken Key into the OpenAI API Key field.

  4. Override Base URL: Enable Override OpenAI Base URL (when using key) and enter https://api.maitoken.net/v1 .

  5. Verify Configuration: Click Verify. If verification fails even though the API self-check succeeded, check whether Cursor automatically used a default model that is outside your current API Key's permissions.

  6. Add a Model: If Add Custom Model is available on the page, enter <Model ID> as the Model ID. If that entry is not available, you can only select models that Cursor currently allows binding to a custom OpenAI Key.

  7. Select Model: Return to Chat or Composer, turn off Auto, and select the configured model from the model selector.

Field Value
OpenAI API Key <Your MaiToken Key>
Override Base URL https://api.maitoken.net/v1
Model <Model ID>, subject to the models currently allowed to be added or selected in your Cursor UI

How to Test After Setup

  1. Test Basic Chat: Enter "Reply OK only" in the chat box. Receiving a normal reply confirms that your API Key, API address, and Model ID are basically correct.

  2. Test Project Reading: Open a test project and enter "Please read the current project directory and list only the top-level file names without modifying any files."

  3. Test Agent: Ask the model to create a new file named test-maitoken.txt containing hello, then verify the file was created. Do not run initial tests on a real production project.

Troubleshooting

Issue Suggested Fix
Verify fails Make sure the Base URL ends at /v1, and verify that the model Cursor uses during verification is in your API Key's model restriction list.
Chat works but Agent does not The model may not support tool_calls, or Cursor may restrict Agent capabilities for that custom model.
Charges still go through Cursor Check whether Auto or a Cursor built-in model is still selected. A custom API Key does not replace all Cursor features.