B2BB2B LLM

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

1. Open Cursor Settings. 2. Open Models or API Keys, depending on the installed Cursor version. 3. Enter the Model Gate key in the OpenAI API key field. 4. Enable the OpenAI Base URL override. 5. Set the Base URL to:

https://api.model-gate.com/v1

6. 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-47 instead of claude-opus-4.7. 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:

AliasModel
ch-46claude-opus-4-6
ch-46sclaude-sonnet-4-6
ch-47claude-opus-4-7
ch-48claude-opus-4-8
ch-g54gpt-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

ProblemResolution
Cursor rejects a long model IDUse an enabled short alias shown by /v1/models.
Authentication failsRe-enter the Model Gate key and verify it with curl.
Requests do not reach Model GateConfirm the Base URL includes /v1.
Model is not foundThe alias may be disabled or mapped to a disabled model.
A Cursor feature ignores the custom APITest 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.