Connect Cursor with Zeldoc.ai
Cursor is an AI code editor. It accepts your own OpenAI-compatible API key and base URL, so ZDev can answer in Cursor's chat and run its agent.
We document Cursor only because so many people use it. Cursor is closed source, and we recommend an open source harness instead — see Supported Agent Harnesses.
Prerequisites
- Cursor installed on your machine
- A Zeldoc.ai API key — see Generate an API key
Add ZDev to Cursor
- Open Cursor Settings → Models.
- Turn on OpenAI API Key and paste your Zeldoc.ai API key.
- Turn on Override OpenAI Base URL and enter
https://api.zeldoc.ai/cursor. - Choose Add Custom Model, enter
zdev, and turn it on.
/cursor base URLEnter https://api.zeldoc.ai/cursor, not https://api.zeldoc.ai/v1. Cursor's agent sends
requests in its own format, which only the /cursor endpoint understands. With /v1, chat
works but Agent mode fails.
While Override OpenAI Base URL is on, Cursor also sends requests for its built-in OpenAI models to Zeldoc.ai. Turn the override off when you want to use those.
Verify the connection
Open a chat in Agent mode, pick zdev in the model picker, and send:
Create a file named hello.txt that contains the word OK.
The agent creating the file confirms that ZDev is connected and can use Cursor's tools.
What doesn't go through Zeldoc.ai alone
- Tab completion always uses Cursor's own models, whatever you configure here.
- Every request passes through Cursor's servers, which build the final prompt before sending it to Zeldoc.ai. Cursor's Zero Data Retention policy does not apply when you use your own key, so your code passes through Cursor even when ZDev answers.
Use other Zeldoc.ai models
Add more custom models with Add Custom Model, using each model ID exactly as Zeldoc.ai reports it (see list your available models). Cursor rejects names that match its built-in models.