aimldocs
Integrations

Cursor

Use ai.ml models in Cursor's chat through its OpenAI base URL override.

Cursor can send its chat requests to an OpenAI-compatible API in place of OpenAI's. In Cursor Settings → Models:

  1. Paste your ai.ml key into OpenAI API Key and turn on Use OpenAI API key. Pasting the key alone does nothing.
  2. Turn on Override OpenAI Base URL and enter https://api.ai.ml/v1.
  3. Under Custom Models, add each ai.ml model id you want, such as anthropic/claude-sonnet-4.6.

What to know:

  • Only chat uses this key. Tab completion stays on Cursor's own models.
  • Cursor sends these requests from its own servers, so the base URL must be reachable from the internet.
  • With the override on, every OpenAI-family model in Cursor goes to ai.ml, including Cursor's built-in GPT models. Turn the override off to use those again.
  • Cursor's agent can offer GPT models a freeform apply_patch tool. ai.ml does not support freeform tools yet and answers unsupported_feature.custom_tools. Use the agent with a non-GPT model, or use chat.
  • Cursor's zero-data-retention promise covers its own models. For requests on your key, your ai.ml data policy applies.

Checked against Cursor's documentation and staff answers on its forum on 2026-10-02; not run here.