Skip to main content

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.

Documented because it's popular

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​

Add ZDev to Cursor​

  1. Open Cursor Settings → Models.
  2. Turn on OpenAI API Key and paste your Zeldoc.ai API key.
  3. Turn on Override OpenAI Base URL and enter https://api.zeldoc.ai/cursor.
  4. Choose Add Custom Model, enter zdev, and turn it on.
Use the /cursor base URL

Enter 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.

The override applies to every OpenAI model

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.