Skip to main content
Use XMAI in Cursor by enabling the OpenAI API key path, pasting your XMAI token, and setting the override base URL to https://xmapi.site/v1.

Direct answer

In Cursor, open Settings → Models → API Keys:

Step 1: Create an XMAI key

Open the API Keys dashboard, create a key named something like cursor-local, and copy it.

Step 2: Configure Cursor

In Cursor’s model settings:
  1. Enable the OpenAI API key option.
  2. Paste your XMAI key.
  3. Enable Override Base URL.
  4. Set the base URL to https://xmapi.site/v1.

Step 3: Add model ids

Use exact model ids from Models. Cursor can reach supported Claude, GPT, Gemini, and Grok models through the OpenAI-compatible endpoint. Examples:
  • claude-opus-4-8
  • gpt-5.5
  • gemini-3.1-pro-preview
  • grok-4.5

FAQ

What base URL should Cursor use?

Use https://xmapi.site/v1.

Can Cursor use Claude through an OpenAI-compatible endpoint?

Yes. XMAI maps supported Claude ids through the OpenAI-compatible Chat Completions endpoint, so Cursor can call Claude by model id.

Should I use one key for every Cursor workspace?

You can, but separate keys per workspace are easier to revoke, cap, and audit.