Chat with a notebook
September 29, 2026
Table of contents
Ask Gemini Notebook a question about a notebook’s sources and get an answer grounded in them. The answer is Markdown with inline citation markers such as [1], [1, 2] or [9-12]. Each marker number matches an entry in citations, which carries the quoted passage and the id of the source it came from.
The call waits for the full answer and returns it in one response, which typically takes 15 to 30 seconds. It does not create a job.
By default the question is answered from every source of the notebook whose status is ready. Sources still being processed are left out, so after adding sources with POST /sources or POST /sources/upload, check GET /notebooks/notebook until they are ready. Pass sources to limit the answer to specific sources.
To ask a follow-up, send the conversation id from the previous answer. The earlier turns of that conversation are read from Google and sent along with the new question, so the answer can refer back to them. GET /chat reads a conversation back, DELETE /chat clears it, and POST /chat/settings sets the notebook’s answer style and length.
Google counts each question against the account’s usage limits as its qna action. Its cost is small, and GET /accounts/email shows the current estimate.
https://api.useapi.net/v1/gemini-notebook/chat
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API tokenis required, see Setup useapi.net for details.
Request Body
{
"notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
"question": "What went wrong during Eagle's descent, and how did the crew handle it?"
}
notebookis required, the notebook id returned by POST /notebooks or GET /notebooks. The question runs on the account the notebook belongs to.questionis required, the question to ask. From 1 to 10,000 characters.conversationis optional, theconversationid returned by an earlier answer in this notebook. Pass it to ask a follow-up in the same conversation. Omit it to start a new one.sourcesis optional, an array of 1 to 300 source ids from this notebook (see GET /notebooks/notebook). Only these sources are used for the answer. When omitted, everyreadysource is used.
Responses
-
{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "answer": "During *Eagle*'s lunar descent, several critical issues arose in rapid succession:\n\n1. **Overshooting the Target Site**:\n *Eagle* passed surface landmarks two to three seconds early, indicating it was traveling too fast [1, 2]. ...\n\n2. **1201 and 1202 Guidance Computer Alarms**:\n About five minutes into the descent burn, the computer issued unexpected **1201 and 1202 program alarms** [3, 4]. ...", "conversation": "30569582-8aa8-4c2d-a442-4e5d2b4185f0", "citations": [ { "number": 1, "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5a5455b1-0557-4fa4-a8a8-52f60dffa113", "text": "At 12:52:00 UTC on July 20, Aldrin and Armstrong entered Eagle, and began the final preparations for lunar descent.[8] At 17:44:00 Eagle separated from Columbia.[13] ...", "relevance": 0.9786729857819905 }, { "number": 2, "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:c1182943-b7f0-4e89-82bc-8b3614cfb78f", "text": "Lunar descentColumbia in lunar orbit, photographed from EagleAt 12:52:00 UTC on July 20, Aldrin and Armstrong entered Eagle, and began the final preparations for lunar descent. [8] ...", "relevance": 0.9549763033175356 } ], "ms": 26755 } -
A parameter is missing or invalid, or a
sourcesid belongs to a different notebook.{ "error": "Parameter question is required", "code": 400 }{ "error": "source user:[email protected]:93e89cc9-db25-46d0-bc14-216736e6b4c2:5a5455b1-0557-4fa4-a8a8-52f60dffa113 is not in notebook user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The notebook id was issued to a different API token.
{ "error": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55 does not belong to this API token", "code": 403 } -
The notebook was deleted, or its account is no longer configured.
{ "error": "Not found on account [email protected] (Google rLM1Ne grpc 5)", "code": 404 } -
sourceswas omitted and no source of the notebook isreadyyet. Add sources, or wait until they finish processing.{ "error": "The notebook has no ready sources to answer from", "code": 409 } -
Google refused the question with a quota error. The API answers every Google quota refusal with this
429and the same generic message, which was written for Studio jobs. Do not read it as the account being out of chat usage. In our tests chat kept working with the 5-hour window fully used. When Google’s refusal names the window,retryAt(when it resets) andwindow(5horweekly) are added. Check GET /accounts/emailfor the account’s live usage.{ "error": "Not enough of Google's 5h window is left on account [email protected] for this job; it resets at 2026-09-28T03:40:48.000Z. GET /accounts/[email protected] shows what each job needs", "code": 429, "retryAt": "2026-09-28T03:40:48.000Z", "window": "5h" } -
596 Account Error
Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Gemini Notebook.
{ "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.", "code": 596 }{ "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-gemini-notebook", "code": 596 } -
Google is temporarily unavailable or is challenging our network. Retry in a few minutes. A
502means Google answered with an unexpected error.{ "error": "GOOGLE_BOT_CHECK: Google is challenging our network right now, please retry in a few minutes", "code": 503 }Google also sometimes answers with no answer text. The API asks once more, and answers
503when the second try is empty too. Retry.{ "error": "chat failed: Google returned no answer, please retry", "code": 503 } -
Google did not answer within 120 seconds, or the connection to Google dropped. Asking the question again is safe.
{ "error": "chat failed: no answer within 120 s. Google may still complete it: check before retrying anything that creates", "code": 504 }
Model
{ // TypeScript, all fields are optional
notebook: string
answer: string // Markdown, with inline citation markers like [1], [1, 2] or [9-12]
conversation: string | null // pass it back as `conversation` to ask a follow-up
citations: {
number: number // 1-based, matches the markers in answer
source: string | null // the cited source id: user:<userId>-<email>-source:<notebookUuid>:<sourceUuid>
text: string // the cited passage from the source
relevance: number | null // Google's relevance score, 0 to 1
}[]
ms: number // how long Google took to answer, in milliseconds
error: string // error responses only
code: number // error responses only, the HTTP status
retryAt: string // 429 only, when Google names the window: ISO 8601 time it resets
window: string // 429 only, when Google names the window: '5h' or 'weekly'
}
Examples
-
curl -X POST "https://api.useapi.net/v1/gemini-notebook/chat" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "question": "How much fuel was left when they landed?", "conversation": "30569582-8aa8-4c2d-a442-4e5d2b4185f0" }' -
const token = "API token"; const notebook = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55"; const apiUrl = "https://api.useapi.net/v1/gemini-notebook/chat"; const ask = async (question, conversation) => { const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ notebook, question, conversation }) }); return response.json(); }; const first = await ask("What went wrong during Eagle's descent, and how did the crew handle it?"); console.log(first.answer, first.citations); const followUp = await ask("How much fuel was left when they landed?", first.conversation); console.log(followUp.answer); -
import requests token = "API token" notebook = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55" apiUrl = "https://api.useapi.net/v1/gemini-notebook/chat" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } first = requests.post(apiUrl, headers=headers, json={ "notebook": notebook, "question": "What went wrong during Eagle's descent, and how did the crew handle it?" }).json() print(first["answer"]) follow_up = requests.post(apiUrl, headers=headers, json={ "notebook": notebook, "question": "How much fuel was left when they landed?", "conversation": first["conversation"] }).json() print(follow_up["answer"])