How to Fix the Gemini API Key Format Issue in AutoDNG (AQ. vs AIza)
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
- Google AI Studio is now issuing API keys with an
AQ.prefix, which AutoDNG currently rejects. - The fastest fix is to generate your API key directly through the Google Cloud Console, which still issues standard
AIzakeys. - Clearing your browser cache and deleting old keys in AI Studio can sometimes force the system to revert to the legacy format.
- Using a secondary, fresh Google account is a guaranteed fallback if your primary account is permanently flagged for the new format.
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.
- Go to the Google Cloud Console and log in.
- Select your existing project or create a new one at the top of the page.
- Navigate to APIs & Services > Credentials in the left-hand sidebar.
- Click the + Create Credentials button at the top, then select API key.
- A modal will pop up with your new key. It should look like this:
AIzaSyBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Click Restrict Key to secure it (highly recommended), ensuring the "Generative Language API" is enabled under API restrictions.
- Copy this
AIzakey 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.
- Go to the Google AI Studio API Key page.
- Delete all of your existing
AQ.API keys. Do not just leave them there; remove them entirely. - Open a completely new Incognito or Private browsing window (this ensures no legacy cookies interfere).
- Navigate back to the API key page and click Create API Key.
- Many users report that this "clean slate" approach forces the system to generate a standard
AIzakey 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:
- Billing is Enabled: Google requires a valid billing account to be linked to your project to use the Gemini API, even for free-tier usage. Check the "Billing" section in the Cloud Console.
- API is Enabled: Ensure the "Generative Language API" is explicitly enabled for your project. Go to "APIs & Services" > "Library" and search for it.
- No IP Restrictions: If you restricted the key in the Cloud Console, ensure that AutoDNG's server IP addresses are whitelisted, or set the restriction to "None" temporarily to test if that is the blocking factor.
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