How to use vertex ai with cursor? Can I use openai models?

I wish to use GCP credits for model usage in cursor.

How do we do that?

Hi @anujk,

Vertex AI isn’t one of the providers you can plug your own key into, so there’s no way to bill Cursor usage to GCP credits through Vertex today. Under Cursor Settings → Models you can add an OpenAI, Anthropic, Google, Azure OpenAI or AWS Bedrock key.

The closest option for GCP is the Google key, which takes a Google AI Studio (Gemini API) key. Those keys belong to a Google Cloud project, so Gemini usage is billed to that project’s billing account. Whether your credits cover it depends on Google’s terms for them.

Vertex AI isn’t one of the bring-your-own-key options right now. The supported providers are OpenAI, Anthropic, Google (Gemini via the Google AI API), Azure OpenAI, and AWS Bedrock.

  1. Open Cursor Settings > Models
  2. Find the provider you want and paste your key
  3. For OpenAI, it’s standard non-reasoning chat models. The model picker shows which ones work

Things to know:

  • custom keys only work for chat. Tab still uses Cursor’s own models
  • on individual plans your provider bills you directly. On Teams/Enterprise the Cursor Token Rate still applies
  • Zero Data Retention doesn’t apply to your own keys

I honestly don’t know if GCP credits cover a Google AI API (Gemini) key, so check that on the GCP billing side. If you have AWS credits, Bedrock is the route that’s documented for using cloud credits.

more deets: Bring your own API key | Cursor Docs
bedrock setup: AWS Bedrock | Cursor Docs