Google AI Mode Study Tools API Guide (2026)
On August 19, 2026, Google announced five new AI-powered learning tools in Search: generated interactive visuals, custom practice quizzes, Lens-based step-by-step help, notebooks inside AI Mode, and custom study file creation. The announcement is aimed at students, but the developer lesson is bigger: the next useful AI product won’t be a blank chat box. It’ll be a workflow that turns messy source material into focused practice, explanations, and reusable artifacts.
This guide shows how to build that kind of study assistant with today’s APIs. We’ll use the Google announcement as the product pattern, then map it to model choice, cost control, routing, and a few practical code examples. I’ll be blunt: if you only wrap a model with “explain this topic,” you’re shipping a toy. The useful version needs retrieval, structured output, guardrails, and token accounting from day one.
TL;DR / Key Takeaways
- Google announced AI Mode learning tools in Search on August 19, 2026, including generated visuals, custom quizzes, Lens step-by-step help, notebooks, and custom study file creation.
- Gemini 3.7 Flash has a 1,048,576-token input limit and a 65,536-token output limit according to Google AI for Developers documentation fetched on August 24, 2026.
- Gemini 3.7 Flash paid API pricing is $0.75 per million input tokens and $3.75 per million output tokens through December 31, 2026, then $1.50 and $7.50 starting January 1, 2027.
- Claude Sonnet 5 costs $2 per million input tokens and $10 per million output tokens, and Anthropic says that price is now the standard price rather than temporary introductory pricing.
- GPT-5.6 Luna standard short-context pricing is $0.20 per million input tokens and $1.20 per million output tokens, making it a strong low-cost route for quiz drafts and lightweight explanations.
The Product Pattern Behind Google’s Announcement
The interesting part of Google’s update isn’t “AI for students.” That’s obvious. The interesting part is the bundle of behaviors:
- Generate a tool, not just an answer. A pH scale simulation teaches better than a paragraph about acidity.
- Turn content into practice. Quizzes force recall, which beats passive reading.
- Use images as input. Lens can start from a worksheet photo or handwritten notes.
- Preserve context over time. Notebooks keep sources, instructions, and threads together.
- Create files. A one-page study guide or slide deck is easier to reuse than a chat transcript.
If you’re building an education app, internal training tool, customer enablement portal, or documentation assistant, copy that pattern. Don’t copy the UI. Copy the workflow.
Pricing Table: API Models for a Study Assistant
The table below uses public pricing and model documentation fetched during this run. Prices are in USD per 1 million tokens. For Gemini, the table uses the promotional paid tier through December 31, 2026 because that is the active price at publication time.
| Model | Input price / 1M tokens | Output price / 1M tokens | Context window |
|---|---|---|---|
| Gemini 3.7 Flash | $0.75 through Dec. 31, 2026; $1.50 starting Jan. 1, 2027 | $3.75 through Dec. 31, 2026; $7.50 starting Jan. 1, 2027 | 1,048,576 input tokens; 65,536 output tokens |
| GPT-5.6 Luna | $0.20 standard short-context input | $1.20 standard short-context output | 1,050,000 tokens in OpenAI GPT-5.6 family docs |
| Claude Sonnet 5 | $2.00 base input | $10.00 output | 1,000,000 tokens in current Claude model documentation |
Model / Option Comparison
| Option | Context window | Pricing | Best for | Key limitation |
|---|---|---|---|---|
| Gemini 3.7 Flash | 1,048,576 input tokens; 65,536 output tokens | $0.75 input and $3.75 output per 1M tokens through Dec. 31, 2026 | Large source packets, multimodal study workflows, generated quizzes, and agentic learning flows | Price doubles on Jan. 1, 2027 unless Google extends the promotional period |
| GPT-5.6 Luna | 1,050,000-token class context in OpenAI GPT-5.6 family docs | $0.20 input and $1.20 output per 1M tokens for standard short context | Low-cost quiz generation, flashcard drafts, answer checking, and high-volume practice loops | Use a stronger model for subtle reasoning, rubric design, or sensitive feedback |
| Claude Sonnet 5 | 1,000,000-token class context in Anthropic docs | $2.00 input and $10.00 output per 1M tokens | Long explanations, careful tutoring tone, rubric-based feedback, and complex writing feedback | More expensive than lightweight models for repetitive quiz generation |
Architecture: Build the Notebook First
The notebook is the center of the product. Everything else hangs off it. A good study assistant needs a stable object that stores sources, course goals, student level, generated artifacts, and usage limits. Here’s the simple version:
notebook
id
owner_id
title
learning_level
source_documents[]
extracted_chunks[]
preferred_quiz_style
model_budget_usd
created_at
updated_at
When a user uploads notes, don’t send the whole file to the model on every request. Extract text, chunk it, store embeddings if you need semantic search, and only pass the relevant pieces. For small notebooks, long-context models can swallow a lot. That doesn’t mean they should. Long context is a safety net, not a budget plan.
Example 1: Generate a Quiz With an OpenAI-Compatible Endpoint
This example uses an OpenAI-compatible chat completions endpoint. That means the same shape can work with a direct provider or a router such as KissAPI when you want fallback models behind one API format.
curl https://api.kissapi.ai/v1/chat/completions \
-H "Authorization: Bearer $KISSAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-luna",
"messages": [
{
"role": "system",
"content": "Create accurate study quizzes. Return strict JSON only."
},
{
"role": "user",
"content": "Create 5 multiple-choice questions from these notes: Photosynthesis converts light energy into chemical energy. Chlorophyll absorbs light. The Calvin cycle fixes carbon dioxide."
}
],
"response_format": { "type": "json_object" }
}'
The cheap route is fine here because quiz drafting is repetitive. Save the expensive model for explanation quality checks or teacher-facing review.
Example 2: Add Retrieval Before the Model Call
Here’s a minimal Python pattern. In production, replace the fake search function with a vector database or a keyword-plus-embedding hybrid. Hybrid retrieval is better for education because exact terms matter: “Calvin cycle” and “carbon fixation” shouldn’t get washed out by vibes.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.kissapi.ai/v1"
)
def retrieve_chunks(question: str, notebook_id: str) -> list[str]:
# Replace this with vector search plus keyword filters.
return [
"Chlorophyll absorbs light energy in chloroplasts.",
"The Calvin cycle fixes carbon dioxide into sugars.",
"Photosynthesis has light-dependent reactions and light-independent reactions."
]
def explain_from_notebook(question: str, notebook_id: str):
chunks = retrieve_chunks(question, notebook_id)
response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[
{"role": "system", "content": "Explain using only the supplied notebook context. Say when context is missing."},
{"role": "user", "content": f"Notebook context:\n{chr(10).join(chunks)}\n\nQuestion: {question}"}
]
)
return response.choices[0].message.content
print(explain_from_notebook("Why does photosynthesis need chlorophyll?", "bio-101"))
Example 3: Route by Task, Not by Brand
Most teams overpay because they pick one model and use it everywhere. A learning workflow has at least four task classes:
- Extraction: OCR, PDF parsing, transcript cleanup.
- Drafting: quizzes, flashcards, summaries, file outlines.
- Reasoning: multi-step explanations, grading, misconception diagnosis.
- Review: accuracy checks, safety checks, citation checks.
Use a cheaper model for drafting. Use a stronger model for reasoning and review. If the first answer has low confidence, escalate. If the user asks for a short quiz from clean notes, don’t burn premium tokens.
function chooseModel(task, estimatedInputTokens) {
if (task === "quiz_draft") return "gpt-5.6-luna";
if (task === "large_notebook_synthesis" && estimatedInputTokens > 200000) return "gemini-3.7-flash";
if (task === "rubric_feedback" || task === "misconception_diagnosis") return "claude-sonnet-5";
return "gpt-5.6-luna";
}
Guardrails That Matter for Learning Products
Education apps have a trust problem. A wrong answer can teach the wrong thing with confidence. Add these checks early:
- Source grounding: Tell the model to cite notebook chunks or admit missing context.
- Answer separation: For quizzes, store the correct answer separately so the UI can reveal it later.
- Difficulty labels: Ask for beginner, exam, and challenge levels. Don’t mix them randomly.
- Cost ceilings: Track tokens per notebook and per user. Study apps can generate a lot of small calls.
- Human override: Teachers and tutors should be able to edit generated content without fighting the system.
KissAPI is useful when you want this routing layer without rewriting client code every time you change providers. Keep your app pointed at one OpenAI-compatible endpoint, then move tasks between Gemini, GPT, and Claude-class models as quality and pricing change.
Cost Control Checklist
- Summarize old notebook threads into compact memory instead of replaying every chat turn.
- Cache stable system instructions and rubrics where the provider supports prompt caching.
- Use batch jobs for nightly quiz generation or course-wide study packet creation.
- Measure output tokens separately. Explanations can cost more than prompts.
- Put file creation behind an explicit button. Don’t generate slides or documents automatically after every answer.
Practical rule: route the first draft to the cheapest acceptable model, then spend premium tokens only when the user asks for deep explanation, grading, or final polished material.
CTA: Build the Router Before the Feature Sprawl
Start Building With One API Endpoint
Use KissAPI to test GPT, Claude, and other models behind an OpenAI-compatible endpoint, then route each learning task by cost and quality instead of provider habit.
Start FreeFAQ
What did Google announce on August 19, 2026?
Google announced new AI learning tools in Search, including generated interactive visuals, custom practice quizzes, Lens step-by-step learning help, notebooks inside AI Mode, and custom study file creation.
Which model should I use for a study assistant?
Use cheaper models such as GPT-5.6 Luna for quiz drafts and repetitive practice. Use long-context or stronger reasoning models such as Gemini 3.7 Flash or Claude Sonnet 5 for large notebook synthesis, nuanced explanations, and rubric-based feedback.
How do I estimate the cost of a learning workflow?
Count input tokens from retrieved notebook chunks, system prompts, and user questions, then count output tokens from explanations, quizzes, and generated files. Use a token counter and API cost calculator before you let users generate long study documents freely.