How to Fix the Gemini API Key Format Issue in AutoDNG (AQ. vs AIza)

By AutoDNG Team June 9, 2026 6 min read

If you’ve recently tried to connect your Google Gemini API key to AutoDNG and received an authentication or validation error, you aren't alone. This is currently the most common support ticket we receive, and the root cause lies in a recent, silent change made by Google.

In mid-2026, Google began changing the format of new API keys generated via the Google AI Studio interface. Instead of the traditional AIza prefix that developers have relied on for years, new keys are now being issued with an AQ. prefix. Because AutoDNG’s backend validation system (like many third-party integrations and older SDKs) explicitly expects the standard AIza format, it automatically rejects the new AQ. tokens as invalid.

Fortunately, there are several proven workarounds to bypass this restriction and get a compatible key up and running in minutes. Here is the exact step-by-step guide to fixing the Gemini API key format issue in AutoDNG.

🔑 Key Takeaways

Workaround 1: Generate the Key via Google Cloud Console (Recommended)

The AQ. restriction currently appears to be isolated to the simplified Google AI Studio interface. You can completely bypass this by generating the key through the robust Google Cloud Console, which continues to issue the legacy AIza format.

  1. Go to the Google Cloud Console and log in.
  2. Select your existing project or create a new one at the top of the page.
  3. Navigate to APIs & Services > Credentials in the left-hand sidebar.
  4. Click the + Create Credentials button at the top, then select API key.
  5. A modal will pop up with your new key. It should look like this:
    AIzaSyBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  6. Click Restrict Key to secure it (highly recommended), ensuring the "Generative Language API" is enabled under API restrictions.
  7. Copy this AIza key and paste it directly into your AutoDNG settings.

Workaround 2: Purge and Regenerate in AI Studio

Google developers have noted on community forums that the system sometimes defaults to the AQ. format based on browser caching, cookies, or account history. You can sometimes "reset" this behavior.

  1. Go to the Google AI Studio API Key page.
  2. Delete all of your existing AQ. API keys. Do not just leave them there; remove them entirely.
  3. Open a completely new Incognito or Private browsing window (this ensures no legacy cookies interfere).
  4. Navigate back to the API key page and click Create API Key.
  5. Many users report that this "clean slate" approach forces the system to generate a standard AIza key that works perfectly with AutoDNG.

Workaround 3: Use a Fresh Google Account

If your primary Google Workspace or Gmail account has been permanently flagged by Google's system to only generate AQ. tokens, the path of least resistance is to use a secondary account.

Simply create a new, unused Gmail address. Log into Google AI Studio with this fresh account and generate your key. Because the account has no history, it is currently still receiving standard AIza tokens. You can then use this key in AutoDNG without any validation errors. This is a highly reliable, permanent fix while we wait for broader platform updates.

Troubleshooting: "I have an AIza key, but AutoDNG still says 'Invalid'"

If you successfully generated an AIza key but AutoDNG is still throwing an error, the issue is likely not the format, but the key's permissions or billing status. Check the following:

When Will AutoDNG Support the "AQ." Format Natively?

Our engineering team is actively aware of this upstream change from Google. We are currently updating AutoDNG’s backend authentication handlers to natively accept and process the new AQ. prefix without throwing validation errors.

We expect to roll out this compatibility patch in our next scheduled platform update. However, until that update is live, using an AIza key generated via the Google Cloud Console remains the most stable, secure, and immediate way to keep your AutoDNG workflows running smoothly.

Still Experiencing API Issues?

Our support team is standing by to help you get connected. Check out our full API documentation or open a direct support ticket.

Contact AutoDNG Support