Open Router API key failing

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m trying to add Open Router API key to Cursor, and use some/all possibilities from there.

I save it to settings, and I can’t go pass “unauthorized: unauthorized” message.

I’ve put that - as per many topics and instructions into “OpenAI” section, and changed the base URl there.

I am on Mac if it matters. Is there any way to get it running of API key?

Steps to Reproduce

Use latest cursor, and in openAI put Open Router Key and custom base URL

Expected Behavior

Open Router to pick up, or at least Curl attempt towards open router, rather than Open AI, better error logging - maybe showing exact URL used?

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0

For AI issues: which model did you use?

DeepSeek R1

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Cursor doesn’t officially support the OpenRouter provider.

This is a known issue. When you use the “Override OpenAI Base URL” option with OpenRouter, Cursor sends malformed requests that are missing required fields.

Current workarounds:

  1. Direct OpenAI (easiest): disable the “Override OpenAI Base URL” toggle and use OpenAI directly instead of OpenRouter.
  2. LiteLLM proxy (advanced): set up an intermediary proxy server as described here: Workaround to get Openrouter models working in Cursor

The team understands this is blocking users and is working on proper support for custom OpenAI-compatible endpoints. I’ll add your report to the existing ticket.

Let me know if any of these workarounds help in the meantime!

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.