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
- Install Cursor.
- 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.
- Open Cursor Settings → Models.
- Enable Override OpenAI Base URL (or equivalent custom endpoint option).
- Set:
- Base URL:
https://api.shuyou.ai/v1
- API Key: your ShuYou API key
- 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.
- Open Cursor Settings → Models.
- Configure the Anthropic / Claude provider override if available:
- Base URL:
https://api.shuyou.ai
- API Key: your ShuYou API key
- Choose a model slug that supports Anthropic API Compatible on ShuYou, for example
anthropic/claude-sonnet-4.5.
Reference: Create Messages.
Verify
- Open a project in Cursor.
- Start an inline chat or Agent session with your configured model.
- 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.