Skip to main content

Cursor

Use ShuYou as the model backend in Cursor for AI-assisted coding in the editor. ShuYou supports both OpenAI-compatible and Anthropic-compatible protocols. Cursor settings vary by version; use the path that matches your Cursor build.

Prerequisites

  1. Install Cursor.
  2. Create a ShuYou API key in the console.

Option A: OpenAI-compatible (Chat Completions / Responses)

Best for GPT and other models exposed via ShuYou’s OpenAI protocol.
  1. Open Cursor Settings → Models.
  2. Enable Override OpenAI Base URL (or equivalent custom endpoint option).
  3. Set:
    • Base URL: https://api.shuyou.ai/v1
    • API Key: your ShuYou API key
  4. Add or select a model slug from the ShuYou model catalog, for example openai/gpt-4o.
Reference: Create Chat Completion.

Option B: Anthropic-compatible (Claude models)

Best for Claude-family models on ShuYou.
  1. Open Cursor Settings → Models.
  2. Configure the Anthropic / Claude provider override if available:
    • Base URL: https://api.shuyou.ai
    • API Key: your ShuYou API key
  3. Choose a model slug that supports Anthropic API Compatible on ShuYou, for example anthropic/claude-sonnet-4.5.
Reference: Create Messages.

Verify

  1. Open a project in Cursor.
  2. Start an inline chat or Agent session with your configured model.
  3. Confirm responses return without 401 / 403 errors.

FAQ

Model not found: Use the exact slug from shuyou.ai/models, including provider prefix when required. 401 / 403: Verify the API key, billing balance, and that the model is available on your plan. Wrong protocol: OpenAI slugs need base URL https://api.shuyou.ai/v1; Anthropic slugs need https://api.shuyou.ai.
Cursor UI labels change between releases. If you cannot find override fields, check Cursor’s latest docs for “custom API” or “bring your own key” settings.