Configure Cursor with a Custom OpenAI Provider
Cursor can use your own API credentials for supported models, including through some OpenAI-compatible providers. The setup involves three pieces: an API key, a base URL, and a model identifier. This walkthrough uses Relay365 as the example provider, with checks to help you avoid common configuration mistakes.
#1 · Understand what you are connecting
An OpenAI-compatible provider accepts requests in a format that OpenAI clients understand. That does not mean every model or Cursor feature will work automatically. Cursor controls which features accept custom credentials, while the provider controls model availability and supported API behavior.
Relay365 is a pay-as-you-go relay service for multiple model families. It can be useful if you want one provider account for different models and tools. However, compatibility with an OpenAI SDK does not by itself guarantee compatibility with every Cursor workflow.
#2 · Prepare your provider credentials
In your Relay365 dashboard, obtain an API key and check that your account has sufficient balance or payment access. Review the available models and copy the exact API model identifier you intend to use.
- Provider API base: https://api.api365relay.com
- OpenAI-compatible base URL: https://api.api365relay.com/v1
- API key: Your private Relay365 credential.
- Model identifier: The exact value documented by the provider, not necessarily its display name.
For example, you might look for Claude Haiku 4.5 or Gemini 2.5 Flash in the provider catalog. Use the identifier shown there rather than guessing an API slug from either name.
#3 · Open Cursor's model settings
Open Cursor Settings and find the Models section. Look for API key settings and the OpenAI credential controls. Labels and placement can change between releases, so use settings search if you do not see them immediately.
Check whether your installed version exposes an option to override the OpenAI base URL. If it does not, consult the current Cursor documentation before proceeding. An ordinary API key field alone is not enough to direct requests to another provider.
#4 · Enter the key and override the base URL
In the OpenAI-compatible configuration, enter your Relay365 key in the OpenAI API key field. Set the base URL override to https://api.api365relay.com/v1, then enable the override if Cursor presents a separate toggle.
Use the base URL, not a complete request endpoint: do not append /chat/completions. Also avoid adding /v1 twice. Save the settings and run any available verification check. A successful check is useful, but it may not confirm that your chosen model supports every feature.
#5 · Add and select a supported model
If Cursor offers an Add Model control, enter the exact model identifier you copied from Relay365. Enable the model and select it explicitly in the chat model picker. Avoid automatic model selection during your first test so you can see which model you are asking Cursor to use.
A manually added model is not a promise of support. Cursor may restrict model names, request formats, or capabilities. If the model is rejected, check both services' current compatibility guidance rather than trying unrelated model identifiers.
#6 · Test with a small, non-sensitive request
Start a new chat and ask for a short explanation of a simple function. Confirm that you receive a response, then check your Relay365 usage records, if available, to verify that the request reached the intended provider.
Test editing and agent workflows separately. Basic chat can work even when tool calling or other capabilities do not. Custom credentials also do not necessarily replace Cursor subscriptions or cover specialized features such as Tab completion.
#7 · Troubleshoot and use the connection responsibly
- Authentication error: Recheck the key, account status, and provider-specific error message.
- Not found: Verify the base URL and exact model identifier.
- Unsupported request: Check whether the selected model supports the capabilities Cursor requested.
- Unexpected routing: Confirm the override is enabled and the intended model is selected.
Keep API keys out of repositories and screenshots. Review how Cursor and your provider handle code and prompts before sending confidential material, and monitor provider charges separately from Cursor billing.
If consolidated, pay-as-you-go access fits your workflow, create a Relay365 account and begin with a small test. Expand to larger tasks only after confirming model compatibility, routing, and costs.
Further desk bulletins
| Date | Bulletin title | Filed under | Language |
|---|---|---|---|
| 2026-10-24 | Estimate Your Coding Agent’s Monthly Cost | Agent shift notes | EN |
| 2026-10-24 | Let a Coding Agent Run Shell Commands Safely | Agent shift notes | EN |
| 2026-10-24 | Recover a Coding Agent Session After a Network Drop | Agent shift notes | EN |
| 2026-10-24 | OpenCode: Multiple Model Providers, One Key | Agent shift notes | EN |
| 2026-10-24 | Review Pull Requests with an Agent and a Checklist | Agent shift notes | EN |
| 2026-10-24 | VS Code Assistants: A Guide to Environment Variables | Agent shift notes | EN |
Curious how it runs on your own code? Sign up →