GenerateImage fails with 401 Unauthorized — image generation unavailable in Agent

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi,

Image generation from the Agent (GenerateImage tool) consistently fails with:

Failed to generate image, error: Request failed with status code 401
What I’m doing

Asking the agent to generate PNG assets (e.g. course intro / YouTube thumbnails, 16:9, simple prompts).
The agent calls GenerateImage; every attempt returns 401 immediately (no image file is created).
Environment

Cursor IDE (macOS)
Agent mode with shell access
Same failure on multiple retries over different sessions (not a one-off network blip).
What I’ve checked

Other tools (terminal, file read/write, web) work normally.
I haven’t found a clear setting in Cursor for “image generation API” or a dedicated key for this feature.
Questions

Is GenerateImage tied to a specific Cursor subscription / model entitlement, or a separate API key?
Where should image generation be enabled or authenticated (Settings → …)?
Is 401 expected when billing/plan limits are hit, or only when auth is missing?
Expected: Agent can generate images from text prompts (as documented for the tool).

Actual: Hard 401 on every request.

If anyone from the team sees this: happy to share exact prompt, timestamp, and Cursor version if that helps reproduce.

Thanks!

Steps to Reproduce

Asking the agent to generate PNG assets (e.g. course intro / YouTube thumbnails, 16:9, simple prompts).
The agent calls GenerateImage; every attempt returns 401 immediately (no image file is created).

Operating System

MacOS

Version Information

Version: 3.6.31 (Universal)
VS Code Extension API: 1.105.1
Commit: 81fcf2931d7687b4ff3f3017858d0c6dee7e2a60
Date: 2026-05-31T17:46:29.630Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.220
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Not sure if it the same root couse but my Agents at the cursor.com/agens is also failing with 401 just now.

Edit: yes I logged out and in again

Hey there!

Thanks for the report. This should be working again now, and we’ll continue to monitor.

Not sure why, but after those errors my account vanished… Completely lost access to it (and I just got the annual plan).