RelayRouterRelayRouter
HomeModelsPricingDocsGuides
Get API Key →

Docs / Integrations / Cursor

Cursor with RelayRouter

Cursor lets you replace its OpenAI endpoint with your own OpenAI-compatible base URL. Point it at RelayRouter and the chat panel can use any model in your key's group, including Claude and Gemini models, billed per token from your RelayRouter balance.

#Setup

StepWhereValue
1Cursor Settings → Models → OpenAI API KeyPaste a RelayRouter key created for an OpenAI-protocol group
2Override OpenAI Base URLhttps://relayrouter.io/v1
3Add modelType the exact model id, for example gpt-6-astra or claude-opus-5-5, then enable it
4VerifyClick Verify next to the key; then pick the model in the chat model selector
Use a key whose group speaks the OpenAI protocol (the GPT and Codex groups, or any group marked OpenAI on the models page). Cursor sends OpenAI-style requests, so a key bound to an Anthropic-protocol group will return 404 for the model.

#What works and what does not

Chat, inline edits and agent conversations that use your selected model go through RelayRouter. Features that Cursor runs on its own servers, such as Tab completions and some indexing, are not routed through a custom base URL. Streaming works; keep long tasks under the timeout you set in Cursor.

#Verify the key outside Cursor

terminalbash
curl https://relayrouter.io/v1/chat/completions \
  -H "Authorization: Bearer sk-your-relayrouter-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-6-astra","messages":[{"role":"user","content":"ping"}]}'

#Troubleshooting

SymptomFix
Verify fails with 401Key typo, disabled key or empty balance; check the console
Model shows but replies 404The id is not in the key's group; use the id exactly as listed and the right group
Responses stop mid-wayRaise Cursor's request timeout or pick a faster group