Troubleshooting

Cursor OpenAI API Key Not Working with Custom Providers

Create a MetisRouter API key, paste it into Cursor's OpenAI-compatible provider settings, keep the base URL on /v1, and test with a published chat model ID.

Last verified: 2026-06-05

Configuration summary

Base URLhttps://api.metisrouter.com/v1
API keyMETISROUTER_API_KEY
Model IDsCopy exact IDs from /models or /docs/models

Steps

  1. Confirm the request uses https://api.metisrouter.com/v1 or the documented direct provider endpoint.
  2. Copy the exact model ID from /models or /docs/models.
  3. Set a bounded max_tokens, max_completion_tokens, or max_output_tokens value when the task can grow.
  4. Send a short test request and check Usage Logs for the request id, latency, usage, and charged amount.

Symptoms

Cursor accepts the custom provider but rejects the API key, does not send Bearer auth, or cannot complete the first request.

  • The tool may show an authentication, model, streaming, timeout, or provider error.
  • Usage Logs help separate requests blocked by MetisRouter from requests that reached an upstream provider.

Why it happens

Most setup failures come from mismatched base URLs, display names used as model IDs, missing output limits, unsupported endpoint types, or insufficient balance.

  • Use API model IDs, not prettified display names.
  • Match text, image, video, audio, and embedding requests to their documented endpoints.
  • Keep request IDs for support and retries.

How to verify

After applying the fix, run one short request and confirm the platform recorded the model, endpoint, token or asset usage, latency, and cost.

FAQ

Should I retry immediately?

Retry only after checking whether Usage Logs already show a successful upstream request or a billable result.

Which model ID should I use?

Use the exact API model ID from /models or /docs/models. Display titles are not guaranteed to work as request model IDs.