TutorialPractitioner8 min read

Gemini API, AI Studio and Agent Platform for marketers

What marketers need to know about the Gemini API: AI Studio keys, models, November 2026 prices, Search grounding, batch, and the renamed Vertex AI.

Dipuck Jones
Written by Founder of MentionX · 13+ years in B2B SaaS growth and SEO
Reviewed
Short answer

The Gemini API gives you programmatic access to the same model family as the Gemini app, billed per token. Marketers usually meet it in three ways. Google AI Studio is the free web tool where you test prompts and create an API key. The Gemini API is what n8n, scripts and tools call. Gemini Enterprise Agent Platform (renamed from Vertex AI) is Google Cloud's enterprise route with IAM, data residency and agent tooling. You don't need to code to benefit, but you do need to understand models, prices, grounding and data terms so you can brief a developer or build an n8n workflow.

Key takeaways
  • Start in Google AI Studio: test the prompt, then click Get code or create an API key.
  • Gemini 4 Argon (gemini-4-argon) has no free tier and costs $2/$10 per million input/output tokens through 30 November 2026, then $4/$20.
  • Gemini 3.8 Flash (gemini-3.8-flash) has a free tier and costs $0.75/$3.75 through 31 December 2026, then $1.50/$7.50.
  • Grounding with Google Search on Gemini 3+ models: 5,000 free queries a month, then $14 per 1,000. The response includes the sources used.
  • The free tier's data may be used to improve Google products. The paid tier's isn't. Use paid for anything confidential.

Checked 5 November 2026 (CET) against Gemini Apps Help, the Gemini release notes, Google Workspace Help, Google Search Central, Search Console Help, the Gemini API docs and the Google blog posts cited in Sources. Google renames and moves Gemini features often, so confirm labels and limits in your own account. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.

01AI Studio, the Gemini API or Agent Platform?

Google AI StudioGemini API (Developer API)Gemini Enterprise Agent Platform
What it isWeb playground and key managementThe API AI Studio keys callGoogle Cloud's AI platform, formerly Vertex AI
Who uses itMarketers, prototypersDevelopers, n8n, scriptsIT and data teams
BillingFree to use; API usage billed to the linked projectFree tier plus paid tier, per tokenGoogle Cloud billing
GovernanceBasicProject-levelIAM, VPC controls, data residency, audit logs
Good forTesting prompts, quick prototypesAutomations and toolsEnterprise apps and agents

Google's rename note says Vertex AI Studio is now Agent Studio, Vertex AI Search is Agent Search, Agent Engine is Agent Runtime, and Media Studio is Agent Media Studio. The endpoint aiplatform.googleapis.com is unchanged, so existing integrations keep working.

02What does it cost?

From the Gemini API pricing page (Standard tier, USD per 1 million tokens, 5 November 2026):

ModelIDFree tierInputOutputNotes
Gemini 4 Argongemini-4-argonNo$2.00, rising to $4.00 on 1 Dec 2026$10.00, rising to $20.00Flagship; implicit caching only
Gemini 3.8 Flashgemini-3.8-flashYes$0.75 through 31 Dec 2026, then $1.50$3.75, then $7.50Google's "most intelligent Flash model"
Gemini 3.5 Flash-Litegemini-3.5-flash-liteYes$0.30$2.50High-volume classification

Two ways to pay less:

  • Batch API. Submit jobs that complete asynchronously. Google advertises a 50% cost reduction, and Argon batch is listed at $1/$5 through 30 November 2026.
  • Caching. Repeated context, such as a long brand guide sent with every request, is billed at a much lower cached rate.

Output prices include thinking tokens, and Google notes that for Argon every token processed is billed, including tool instructions when grounding is used. Estimate costs with a pilot run, not from word counts.

03What's Grounding with Google Search, and why does it matter to marketers?

Grounding lets the model run Google searches and answer with current sources. In the API, the response includes grounding metadata: the search queries the model ran and the web sources (URI and title) it used. That has two uses for marketers:

  1. Research workflows that need current facts, such as "summarise this week's news about our category".
  2. Visibility tracking. Run your buyer prompts through the API with grounding on, and log which domains appear as sources. It's not the same as the Gemini app or AI Mode, but it's a repeatable, logged signal (lesson 20).

Pricing on Gemini 3 and newer models: 5,000 search queries a month free (shared across those models), then $14 per 1,000, with a default cap of 1,500 requests per day. One prompt can trigger several queries. Older Gemini 2.5 models bill per grounded prompt instead, at $35 per 1,000 after a free daily allowance.

04What does a call look like?

A minimal REST call with Search grounding, which you can hand to a developer or paste into n8n's HTTP Request node:

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Api-Revision: 2026-05-20" \
  -d '{
    "model": "gemini-3.8-flash",
    "input": "As a neutral B2B software analyst, what are the best accounts payable automation tools for mid-sized companies? Cite sources.",
    "tools": [{"type": "google_search"}]
  }'

This is the Interactions format the grounding docs use as of November 2026. In the response, the google_search_call step lists the search queries the model ran, and the model_output step holds the answer text with url_citation annotations (url, title, start_index, end_index) for each cited source. Older guides show the generateContent endpoint and a groundingMetadata object. Check the current docs before you build on either.

05How do you get a key safely?

  1. Go to Google AI Studio and open Get API key.
  2. Create the key in a Google Cloud project your company owns, not a personal one.
  3. Turn on billing for that project if you need the paid tier (and paid-tier data terms).
  4. Store the key in your tool's credential store, such as n8n credentials. Never put it in a Google Sheet or a doc.
  5. Set a budget alert in Google Cloud billing.
  6. Restrict the key to the Gemini API where possible, and rotate it if it's ever shared.

06What else is in the API that marketers care about?

CapabilityMarketing use
Structured output (JSON schema)Reliable tags and fields for Sheets and CRMs
Long contextAnalyse a whole site export or a long report in one call
File and URL inputSummarise PDFs and landing pages
Image and video modelsGenerate creative at scale (lesson 9)
Embeddings (Gemini Embedding 2)Cluster keywords or content by topic
Deep Research agentScheduled research reports
Batch APIOvernight jobs, such as tagging 50,000 reviews

Our view: for most marketing automations, 3.8 Flash with structured output is the right default. Use Argon only for steps that need deep reasoning, and use Flash-Lite or batch for bulk tagging.

07Worked example: Ledgerline

Ledgerline is a fictional accounts-payable software company. Details are illustrative.

Ledgerline wanted a weekly check of 30 buyer prompts, with grounding, logging which domains Gemini cited.

ItemChoiceEstimate (illustrative)
Modelgemini-3.8-flashFast, with a free tier for testing
GroundingGoogle Search30 prompts x ~3 queries x 4 weeks = ~360 queries a month, inside the 5,000 free
Tokens~1,500 in and ~800 out per promptWell under $1 a month at current prices
TierPaid projectPaid-tier data terms
OutputJSON: brands named, sources citedInto Sheets via n8n (lesson 11)

Walkthrough

  1. The marketing ops lead tested one prompt in AI Studio with grounding on and compared it with the Gemini app answer.
  2. She used Get code to export the request.
  3. IT created a company-owned Cloud project, turned on billing, and set a $50 budget alert.
  4. She added structured output, a JSON schema with brands_mentioned and cited_domains.
  5. She ran all 30 prompts once and checked the real query counts in the billing report before scheduling.

08Common mistakes

  • Using personal keys and projects.
  • Assuming the free tier is private. Google may use free-tier data to improve products.
  • Forgetting the price changes. Argon doubles on 1 December 2026, and 3.8 Flash on 1 January 2027.
  • Counting grounded prompts instead of queries. One prompt can run several searches.
  • Treating API answers as identical to the Gemini app or AI Mode.

09Try it yourself

In AI Studio, run one of your buyer questions on 3.8 Flash with Google Search grounding on. Look at which sources it uses. Then use Get code to view the request. Write down the model ID, whether grounding was on, and the sources, and keep it as your first API test log.

10Quick quiz

1. What's Vertex AI called now?

Answer: Gemini Enterprise Agent Platform.

2. Does Gemini 4 Argon have a free API tier?

Answer: No.

3. How many free grounded search queries do Gemini 3+ models share each month?

Answer: 5,000. After that it's $14 per 1,000.

11What should you check before the next lesson?

  • You have an API key in a company-owned, billed project with a budget alert.
  • You've tested a grounded prompt in AI Studio.
  • You know which model each planned workflow will use.

Previous: Nano Banana, Gemini Omni and Flow for campaign creative. Next: Automate Gemini marketing workflows with n8n. Or return to the Gemini for Marketers track. Related: Perplexity Agent and Search APIs, n8n costs and executions, Grounding.

12Common questions

What is Google AI Studio? Google AI Studio is the free web tool where you test Gemini models, write prompts and create a Gemini API key. It is the easiest place to start before moving work into code or n8n.

What happened to Vertex AI? Google renamed Vertex AI to Gemini Enterprise Agent Platform. Vertex AI Studio is now Agent Studio, and the API endpoint aiplatform.googleapis.com is unchanged.

How much does Grounding with Google Search cost in the API? On Gemini 3 and newer models, the first 5,000 search queries a month are free, shared across models, then $14 per 1,000 queries, with a default cap of 1,500 requests per day.

Questions people ask

3 answers

What is Google AI Studio?

Google AI Studio is the free web tool where you test Gemini models, write prompts and create a Gemini API key. It is the easiest place to start before moving work into code or n8n.

What happened to Vertex AI?

Google renamed Vertex AI to Gemini Enterprise Agent Platform. Vertex AI Studio is now Agent Studio, and the API endpoint aiplatform.googleapis.com is unchanged.

How much does Grounding with Google Search cost in the API?

On Gemini 3 and newer models, the first 5,000 search queries a month are free, shared across models, then $14 per 1,000 queries, with a default cap of 1,500 requests per day.

Sources

  1. Gemini API docs, Pricingai.google.dev
  2. Gemini API docs, Grounding with Google Searchai.google.dev
  3. Gemini API docs, Batch APIai.google.dev
  4. Google Cloud docs, Vertex AI name changesdocs.cloud.google.com
  5. Google AI Studio, Get an API keyaistudio.google.com
  6. All accessed 5 Nov 2026.
Written and reviewed by Dipuck JonesHow we research and testReport an error