All IDE and SDK guides

Cursor

Use the Vani API in Cursor

Point Cursor's OpenAI key and base-URL override at Vani and add Vani model ids.

Base URL
https://api.vani.ai/v1
Auth
Authorization: Bearer vani_…
API
Chat Completions
Example model
openai/gpt-6-sol

Checked against the vendor's documentation on 2 October 2026. Need a key? Create one in the API console.

On this pageBefore you start

Before you start

  • A paid Cursor plan (Pro or higher): Cursor requires one for your own API keys.
  • Your key only powers chat models. Tab completion and Cursor's built-in models keep using Cursor's own service.
  • Cursor sends every request through its servers for prompt building, so the endpoint must be public (it is). Cursor's zero data retention does not apply to requests made with your own key.
  • The override is global: while it is on, every model that is not a Claude or Gemini model goes to Vani.

Connect Vani

  1. Open Cursor Settings › Models and scroll to API Keys.
  2. Turn on OpenAI API Key and paste your Vani key.
  3. Turn on Override OpenAI Base URL and enter https://api.vani.ai/v1: with /v1, without /chat/completions. Check the value again after toggling the override; it can reset to OpenAI's address.
  4. In the model list choose Add Custom Model (the label varies slightly by version), type openai/gpt-6-sol and turn it on. Add openai/gpt-6-sol-fast or meta/muse-spark-1.3 the same way. Refresh Model List only refreshes Cursor's own catalogue.
  5. Open chat, pick the Vani model and send a short text prompt in Ask mode first. Then try Plan and Agent.
  6. To use Cursor's own non-Claude/Gemini models again, turn the OpenAI API Key and Override OpenAI Base URL switches off.
Text

Field values

OpenAI API Key ............ on   vani_YOUR_API_KEY
Override OpenAI Base URL .. on   https://api.vani.ai/v1
Custom models ............. openai/gpt-6-sol
                            openai/gpt-6-sol-fast
                            meta/muse-spark-1.3

Note

Model ids are vendor-prefixed, exactly as GET /v1/models lists them: openai/gpt-6-sol, its priority-tier twin openai/gpt-6-sol-fast (same model, faster, billed at the fast rate), meta/muse-spark-1.3 or anthropic/claude-sonnet-5.5. Bare names such as gpt-6-sol are not model ids.

Note

Cursor's documentation covers keys and their limits; the base-URL override itself is described by Cursor staff on the Cursor forum rather than in the docs. Agent mode with custom models depends on the Cursor version: if Agent fails, use Ask or Plan mode.

Troubleshooting

"Agent and edit rely on custom models that require a paid subscription"
Your own key needs a paid Cursor plan.
Agent mode fails with errors about messages or tools[…].custom
A known Cursor issue with the override for some GPT-named models: Cursor can send a Responses-shaped body or a custom tool schema. Use Ask or Plan mode, or a Vani model whose id is not a GPT name, such as meta/muse-spark-1.3.
404 Not Found
The base URL must be exactly https://api.vani.ai/v1: not the bare host, not …/chat/completions and not …/v1/v1.
401 Invalid API key, and requests go to api.openai.com
The override can reset after toggling. Enter https://api.vani.ai/v1 again.
Connection or TLS errors although curl works
Cursor Settings › Network › HTTP Compatibility Mode › HTTP/1.1, then restart Cursor.
404 model_not_available, or "model not found"
Use the exact vendor-prefixed id, for example openai/gpt-6-sol. List the ids your key can use with curl https://api.vani.ai/v1/models -H "Authorization: Bearer $VANI_API_KEY".

Still stuck? Check service status or the API error reference.

Sources

We use cookies for analytics and to measure how well our campaigns are working. None of it is needed to run the site, and your conversations are never included. See our Privacy Policy.