Cursor IDE
Connect Cursor to Model Gate through the OpenAI-compatible API and short model aliases.
Cursor IDE through Model Gate
Cursor uses the OpenAI-compatible endpoint:
https://api.model-gate.com/v1
1. Create an API key
Open https://panel.model-gate.com/en/api-keys, create a key, and copy it immediately.
2. Configure Cursor
- Open Cursor Settings.
- Open Models or API Keys, depending on the installed Cursor version.
- Enter the Model Gate key in the OpenAI API key field.
- Enable the OpenAI Base URL override.
- Set the Base URL to:
https://api.model-gate.com/v1
- Add a custom model using a short Model Gate alias. Cursor may reject or rewrite full canonical model IDs, so use an alias such as
ch-47instead ofclaude-opus-4.7. - Verify the configuration and start a new chat.
Custom API keys in Cursor apply to standard chat-model features. Cursor-hosted specialized features may continue to use Cursor infrastructure.
Model aliases
In Cursor, specify the model alias, for example ch-47, rather than the original model ID such as claude-opus-4.7. Cursor can reject or rewrite full model names because of its internal model-name restrictions. Model Gate therefore supports administrator-managed aliases.
The currently enabled aliases are listed below:
| Alias | Model |
|---|---|
ch-46 | claude-opus-4-6 |
ch-46s | claude-sonnet-4-6 |
ch-47 | claude-opus-4-7 |
ch-48 | claude-opus-4-8 |
ch-g54 | gpt-5.4 |
Example:
Cursor model: ch-47
Resolved model: claude-opus-4.7
Model Gate resolves the alias before:
- model availability checks;
- user and official pricing;
- usage-cost calculation;
- async queuing;
- upstream delivery;
- request-history storage.
The upstream response can contain the canonical model ID.
Verify outside Cursor
curl https://api.model-gate.com/v1/chat/completions \
-H "Authorization: Bearer mg_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "ch-47",
"messages": [{"role": "user", "content": "Reply with OK"}]
}'
Troubleshooting
| Problem | Resolution |
|---|---|
| Cursor rejects a long model ID | Use an enabled short alias shown by /v1/models. |
| Authentication fails | Re-enter the Model Gate key and verify it with curl. |
| Requests do not reach Model Gate | Confirm the Base URL includes /v1. |
| Model is not found | The alias may be disabled or mapped to a disabled model. |
| A Cursor feature ignores the custom API | Test a standard chat model; not every Cursor-hosted feature supports custom API keys. |
Current Cursor API-key documentation: https://docs.cursor.com/settings/api-keys.