← Back to Studio
Quick Setup · ~3 Minutes

How to Get Started with MechaGens

Follow these 5 simple steps to connect your Google Gemini API key (and optional xAI Grok key) and start generating social media posts, images, and videos for your clients.

Before You Begin: Open a Private Note or Password Manager

Open a blank text document on your computer (like Notepad, Apple Notes, or a password manager like 1Password / Bitwarden) before creating your keys. AI providers like xAI Grok only show your full API key once when you create it—if you close that window without saving it somewhere safe, you will not be able to view it again and will have to generate a new key.

01

Create or Sign In to a Google Account

MechaGens uses Google's Gemini AI directly through Google AI Studio—you do not need to set up Google Cloud Console or Vertex AI.

  • If you already have a Gmail or Google account, you're ready for Step 2.
  • If not, create a free Google account in about 60 seconds using the link below.
02

Get Your Google Gemini API Key & Set Up Billing (Optional)

An API key is a private password that lets MechaGens connect to Google's Gemini models. You can start on the Free Tier right away, or link a billing card in Google Cloud if you want higher limits and full image/video generation.

  • Open Google AI Studio using the button below and sign in with your Google account.
  • In the left menu (or top-right corner), click "Get API key" → "Create API key".
  • Select "Create API key in new project" (Google automatically creates a project for you).
  • Click Copy and immediately paste the key into your private note/document on your computer (label it "Google Gemini API Key") so you never lose it.
Important — Save & Protect Your Key: Paste your Gemini key into a local document or password manager right away. Never email it in plain text, post it in screenshots, or upload it to a public GitHub repo—anyone with your key can spend your API quota. If you ever suspect it was exposed, go back to Google AI Studio, click the trash icon to delete it, and generate a fresh key.
How to Enable Pay-As-You-Go Billing (Recommended for Image & Higher-Volume Generation):
  1. On the Google AI Studio → API keys page, look at the Plan column next to your project and click "Set up Billing".
  2. This takes you directly to the Google Cloud Console Billing page for that exact project (no need to hunt through Cloud Console menus).
  3. Click "Link a billing account" → "Create billing account", choose your country, and enter a credit/debit card.
  4. (Smart safety step) In the left sidebar of Google Cloud Console, go to Billing → Budgets & alerts and set a monthly budget alert (e.g. $10 or $25) so you always know what you're spending.
  5. Return to Google AI Studio—your project will now show Pay-as-you-go and your existing API key upgrades automatically (you don't need to generate a new key).
03

Optional: Get Your xAI Grok API Key & Add Credits

Want to generate posts or compare results side-by-side with Grok? Setting up an xAI API key takes about 2 minutes:

  • Open the xAI Console using the button below and sign in with your X (Twitter), Google, or email account.
  • Add API Credits (Billing): In the left sidebar, click Billing → Credits (or Payment methods). Add a payment card and purchase a small starter balance (e.g., $5–$10 in prepaid credits). Tip: Turn off auto-recharge if you prefer a hard spending cap.
  • Create Your Key: In the left sidebar, click API Keys → "Create API key".
  • Give your key a name (e.g., MechaGens), leave the default permissions enabled for chat and image generation, and click Save.
  • Copy & Save Immediately: Your key (starting with xai-...) is shown only ONE time. Before closing the popup, click Copy and paste it into your private document on your computer (label it "xAI Grok API Key").
You Cannot Retrieve a Grok Key Later: Once you close the xAI key creation popup, xAI hides the full key permanently for security. Always paste it into a saved document on your computer first, and then paste it into MechaGens. (If you ever lose it, simply delete the old key in xAI Console and create a new one—your credit balance stays intact.)
Note: You only need either Gemini or Grok to use MechaGens—or connect both to unlock the Both (A/B Compare) button and let Generate an Agent automatically choose whichever AI engine performs best for your brand.
04

Paste Your Key(s) into MechaGens Settings

Connect your key(s) once and MechaGens saves them locally for all your clients and agents.

  • Return to the MechaGens Studio and click the Settings gear icon (⚙) in the top-left sidebar (or the Gemini / Grok status pill at the bottom-left).
  • Paste your Google key into Gemini API Key and/or your xai-... key into xAI Grok API Key.
  • Leave the default models as-is (gemini-3.8-flash & gemini-3.1-flash-image for Gemini; grok-2-latest & grok-2-image for Grok).
  • Click Save. The bottom-left status badge will turn green and read Gemini · Live / Grok · Live.
05

Create Your First Client & Train Your AI

Everything in MechaGens is organized around four simple tabs so your AI gets smarter every time you rate content:

1. Add a Client & System Prompt Click + New in the left sidebar. On the Create tab, click Generate Prompt and describe your brand—Gemini will write a complete Master System Prompt for you.
2. Upload Media & Generate Upload brand photos into Uploaded Media once, then reuse them anytime for Img→Text, Img→Img, or Img→Vid across X, TikTok, and Instagram.
3. Rate Outputs (0–10) In the Library tab, drag the 0–10 slider on each result. Scores 7–10 teach the AI what to repeat; scores 0–3 teach it what to avoid.
4. Build & Spawn Agents In the Agents tab, build custom agents with specialized skills & multi-image pools—or use Spawn Agent with live tone dials (Spiciness, Creativity, Humor, Wildcard) to auto-create fresh campaigns.

Where are my API keys stored?

Your keys are saved locally on your own computer inside MechaGens's private data/state.json file—they are never sent to any third party other than Google or xAI when you click Generate.

What if I accidentally lost my key?

No problem! You won't lose your billing setup or prepaid credits. Just return to Google AI Studio or xAI Console, delete the lost key, create a new one, save it to your local document, and paste the new key into MechaGens Settings.

Why did generation fail with a quota or billing error?

Image generation and heavy usage require billing to be enabled in Google Cloud (Step 02) or prepaid credits in xAI Console (Step 03). Also double-check that no extra spaces were pasted before or after your key.