# API usage error

**URL:** <https://forum.cursor.com/t/api-usage-error/148061>\
**Category:** Bug Reports\
**Created:** [January 6, 2026, 12:39am UTC](https://forum.cursor.com/t/api-usage-error/148061 "2026-01-06T00:39:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![halileren](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@halileren](https://forum.cursor.com/u/halileren)\
**Post date:** [January 6, 2026, 12:39am UTC](https://forum.cursor.com/t/api-usage-error/148061/1 "2026-01-06T00:39:21Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

I want to continue using the cursor with the API I got from Google, but it keeps cutting off during long processes. I don’t know why I’m experiencing this issue.

### Steps to Reproduce

Editor mode

### Expected Behavior

When I add the Gemini API and continue using the cursor, it flows smoothly as it does in normal use.

### Screenshots / Screen Recordings

 ![Screenshot 2026-01-06 at 03.34.14.png](https://us1.discourse-cdn.com/cursor1/original/3X/3/6/3636f5b0c7e011ea83ffd7f200c0dafeda5c0ca8.png)

### Operating System

MacOS

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.44  
VSCode Version: 1.105.1  
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0  
Date: 2025-12-24T21:41:47.598Z (1 wk ago)  
Electron: 37.7.0  
Chromium: 138.0.7204.251  
Node.js: 22.20.0  
V8: 13.8.258.32-electron.0  
OS: Darwin arm64 24.6.0

### For AI issues: which model did you use?

Google Gemini

### For AI issues: add Request ID with privacy disabled

Request ID: 4b6ac8b3-73c1-48fe-90bc-711eadee2eca  
{“error”:“ERROR\_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n`\n{\"error\":{\"type\":\"provider\",\"reason\":\"provider_error\",\"message\":\"Provider returned 429\",\"retryable\":true,\"provider\":{\"status\":429,\"body\":\"[{\\n \\\"error\\\": {\\n \\\"code\\\": 429,\\n \\\"message\\\": \\\"Resource has been exhausted (e.g. check quota).\\\",\\n \\\"status\\\": \\\"RESOURCE_EXHAUSTED\\\"\\n }\\n}\\n]\"}}}\n`”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 6, 2026, 5:22am UTC](https://forum.cursor.com/t/api-usage-error/148061/2 "2026-01-06T05:22:20Z")

</div>

Hey, thanks for the report.

This is a known issue, and the team is working on a fix. Many users using their own Gemini API keys are getting 429 “Resource exhausted” errors, even when their quota isn’t used up.

It’s related to how Cursor routes requests to the Gemini API. It uses a regional endpoint instead of the global one, which can trigger rate limiting on Google’s side.

You can follow the discussion here: [Gemini API key doesn't work with the latest Cursor version](https://forum.cursor.com/t/gemini-api-key-doesnt-work-with-the-latest-cursor-version/146784)

Sadly, there isn’t a reliable workaround yet. The team is working on a code-level fix.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [January 28, 2026, 5:22am UTC](https://forum.cursor.com/t/api-usage-error/148061/3 "2026-01-28T05:22:54Z")

</div>

Closed on January 28, 2026, 5:22am UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
