TraceWorks Web Trial

Getting your Gemini API key

This is the "Setting Up Your Gemini API Key" chapter from the TraceWorks user guide, trimmed to the steps. It takes about two minutes. Prefer to watch? The video covers the same steps.

You don't need this to start. Your trial includes a few free generations that work with no Google account or key. Come back here when you've used them and want to keep going, or when you want the Best model and larger sizes.
Watch the video: getting your key

What the key is

Think of an API key like a library card. The library (Google) is happy to serve you, but it needs to know who's asking. Your key simply tells Google "this request is coming from my account." TraceWorks sends only your photo and your drawing instructions to Google, over an encrypted connection, and Google sends the finished image straight back to your device. Your key stays on your device and is never sent to us.

Treat your API key like a password. Don't share it or post it online. If you think it has been compromised, delete it at aistudio.google.com and create a new one; TraceWorks works exactly the same with the new key.

Step by step

  1. Open a new browser tab and go to aistudio.google.com.
  2. Sign in with your Google account. If you have a Gmail address, that's your Google account. Click Sign In in the top-right corner. If you're already logged into Gmail you may be signed in automatically.
  3. If this is your first time, you may be asked to accept the Terms of Service. Read through and click Accept.
  4. You may see an information box with two check boxes. It asks if you are a developer. Go ahead and check that box (that's the right choice for TraceWorks users). The second box isn't needed.
  5. Look for Dashboard in the left-hand sidebar and click it. (No sidebar? Look for a menu icon ☰ in the top-left corner.)
  6. Click the API Keys menu item at the top left. You'll see you already have a default API key with a free tier. You can use this key by setting up billing, or create a new one.
  7. To make a new key, click Create API Key in the top-right corner. Give it a name; TraceWorks is a good choice. Keep the project it offers, and remember which one it is: Google billing belongs to a project, so the key you use in TraceWorks and the billing in step 10 must be on the same project.
  8. Your key appears as a long string of letters and numbers. Click the Copy button next to it.
  9. Switch back to the TraceWorks Web Trial tab. The Gemini API key field is at the top of the sidebar, above Open Photo. Paste your key there. Leave Remember key on this device checked so you won't have to paste it again.
  10. Go back to the dashboard and, on your API key's line, choose Set up Billing on the right. This is a standard screen for your billing details. Do it from the row of the key you pasted into TraceWorks, so the billing lands on that key's project. When it's done, that row should show Plan: Paid. Images will not generate until billing is set up.
Google asks new users to pre-purchase credits. Since March 2026, new API accounts are on a Prepay plan: instead of billing your card monthly, Google asks you to buy credits up front, from US $5 (the purchase screen shows the minimum for your country; some regions are set higher). That isn't an extra fee; the credit is your image budget, and each generation draws from it. Credits last 12 months. (Accounts that set up API billing before March 2026 may still be on monthly billing, which is fine too.)

That's it. You're ready to generate.

What it costs

Google charges your key per generated image. The price depends on the model and the size you pick, and the trial shows it on the Cost line above every Generate button, so there are no surprises. Changing colours, mirroring and switching crafts are free.

Model1K2K4K
Nano Banana 2 (fast)$0.067$0.101$0.151
Nano Banana Pro (best)$0.134$0.134$0.24

Per image, US dollars, as published by Google (June 2026). Most generations land between $0.07 and $0.13. Watch your spending on the aistudio.google.com dashboard.

Two common snags

"API key invalid" — go back to aistudio.google.com, copy the key again, and paste it fresh.

"Quota" or "resource exhausted" — image generation needs billing on your key. Google's free tier doesn't include the image models. Finish step 10 (for new accounts that's the prepaid credit, from US $5) and try again.

Billing is set up and you bought credits, but you still get the quota error? The key in TraceWorks is almost certainly from a different Google project than the one you paid for. On the API Keys page each key shows its Project and Plan; the key you use must say Paid. If it says Free, click Create API Key, choose the project that has billing, and paste that new key into TraceWorks in place of the old one.

Still stuck? Contact support and tell us what you see on screen. We'll help you get going.

← Back to the trial