Cursor sends a hybrid OpenAI-style payload for some agent flows. ModRouter has a dedicated /cursor integration that converts those requests correctly.
Endpoint
Cursor usually needs a URL that is reachable from the Cursor app, so local-only addresses may not work in every setup.
Setup
- Open Cursor Settings.
- Go to Models.
- Enter a ModRouter virtual key in the OpenAI API Key field.
- Enable Override OpenAI Base URL.
- Set the base URL to your ModRouter
/cursor endpoint.
- Add custom models using ModRouter model IDs.
Examples:
MCP
Cursor can also connect to ModRouter’s MCP gateway:
Use the same virtual key header strategy you use for inference: Authorization: Bearer <key>, x-bf-vk, or X-Api-Key.
Use /cursor for Cursor’s OpenAI-compatible override. Do not document Cursor as a plain /openai client unless you intentionally want to bypass ModRouter’s Cursor-specific request conversion.