Configure chat
September 29, 2026
Table of contents
Set how a notebook’s chat answers, the “Configure chat” dialog of the Gemini Notebook web app. The setting belongs to the notebook, so it applies to every later POST /chat question on it, and to chats in the web app.
goalis the conversational style:default,learning_guide, orcustomwith your ownpersonaprompt. Sendingpersonaalone sets the goal tocustom.lengthis the answer length:default,longerorshorter.
Google saves the goal and the length together, so whichever you leave out is set back to default. The response shows both values as saved.
https://api.useapi.net/v1/gemini-notebook/chat/settings
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
"persona": "You are a NASA flight controller. Answer in two sentences."
}
notebookis required, the notebook id. The id names its account, so noemailis needed.goalis optional, the conversational goal.
Supported values:default,learning_guide,custom. Default:customwhenpersonais sent, otherwisedefault.personais optional, the custom goal’s prompt: the role, tone or rules the chat should follow. Required withgoal: "custom"and rejected with any other goal.
Length:1to10,000characters.lengthis optional, the answer length.
Supported values:default,longer,shorter. Default:default.
Provide goal, persona, length or any combination.
Responses
-
The settings as saved.
{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "goal": "custom", "persona": "You are a NASA flight controller. Answer in two sentences.", "length": "default" }{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "goal": "learning_guide", "length": "shorter" } -
A missing or invalid parameter, nothing to change, or
personathat does not match the goal.{ "error": "persona is required with goal custom, and only then", "code": 400 }{ "error": "Provide goal, persona and/or length", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The 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 s0tc2d grpc 5)", "code": 404 } -
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 is temporarily unavailable (s0tc2d grpc 14), please retry", "code": 503 }
Model
{ // TypeScript, all fields are optional
notebook: string
goal: 'default' | 'learning_guide' | 'custom'
persona?: string // goal custom only
length: 'default' | 'longer' | 'shorter'
error: string // error responses only
code: number // error responses only, the HTTP status
}
Examples
-
curl -X POST "https://api.useapi.net/v1/gemini-notebook/chat/settings" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "goal": "learning_guide", "length": "shorter" }' -
const token = "API token"; const apiUrl = "https://api.useapi.net/v1/gemini-notebook/chat/settings"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ notebook: "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", persona: "You are a NASA flight controller. Answer in two sentences." }) }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" apiUrl = "https://api.useapi.net/v1/gemini-notebook/chat/settings" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "goal": "default", "length": "default" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json())