Configure a Gemini Notebook account

September 29, 2026

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Connect a Google account to the API with the cookies of a signed-in Gemini Notebook session. The easiest way is the automated setup, which signs in for you and calls this endpoint. See Setup Gemini Notebook for the manual cookie copy.

The API checks the cookies with Google before saving the account. The account email is read from Google, together with its plan, its notebook and source limits, and its current usage. Posting cookies for an account that is already connected re-adds it: the cookies are replaced, and added and maxJobs are kept unless you send a new maxJobs. Re-adding is also how an account that Google signed out is brought back.

To update a connected account, post its email without cookies, with maxJobs, outputLanguage or both. maxJobs is stored by the API and nothing is sent to Google for it. outputLanguage is Google’s own account-wide setting for the language Studio artifacts are written in, the same setting as in the Gemini Notebook web app, so it is sent to Google. When both are sent, maxJobs is saved first.

Each useapi.net subscription lets you connect 3 Google accounts, up to 100 in total.

https://api.useapi.net/v1/gemini-notebook/accounts

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body

Add or re-add an account:

{
  "cookies": "SID\tg.a000…\t.google.com\t/\t2027-11-01T00:00:00.000Z\t…\nOSID\tg.a000…\tnotebook.google.com\t/\t…",
  "maxJobs": 3
}
  • cookies is required to add or re-add an account. Copy the cookie tables from DevTools as described in Setup Gemini Notebook and paste them exactly as copied.
    The paste must contain SID, HSID, SSID, APISID, SAPISID, LSID, OSID and __Secure-OSID. A missing cookie returns 400 naming it. The API then checks the cookies with Google, and cookies that are not signed in to Gemini Notebook return 400. Only these eight cookies are stored, and their values are never returned by the API.
  • maxJobs is optional, the number of jobs this account may run at the same time.
    Range: 1 to 10. Default: 3 for a new account, the current value on a re-add.

Update a connected account:

{
  "email": "[email protected]",
  "maxJobs": 5,
  "outputLanguage": "es"
}
  • email is required in this mode, the email of a connected account. Do not send it together with cookies.
  • maxJobs is optional, the new concurrency limit. Range: 1 to 10.
  • outputLanguage is optional, the language Google writes this account’s Studio artifacts in, as a language code such as en, es, pt_BR or zh_Hans. It applies to the whole Google account. GET /accounts/email shows the current value.

Send maxJobs, outputLanguage or both. If maxJobs was saved but Google refused the language, the call answers with Google’s error, and its message says that maxJobs was saved and outputLanguage was not changed.

Responses
  • 200 OK — the account was already connected and has been updated.

    {
      "email": "[email protected]",
      "tier": "pro",
      "googleTier": "TIER_PRO",
      "googleTierCode": 2,
      "maxJobs": 3,
      "added": "2026-09-27T22:48:12.588Z",
      "updated": "2026-09-27T23:10:05.114Z",
      "cookies": [
        "SID",
        "HSID",
        "SSID",
        "APISID",
        "SAPISID",
        "LSID",
        "OSID",
        "__Secure-OSID"
      ],
      "cookiesExpireAt": "2027-11-01T22:48:08.442Z",
      "limits": {
        "notebooks": 500,
        "sourcesPerNotebook": 300
      },
      "health": "OK",
      "quota": {
        "windows": [
          {
            "window": "5h",
            "resetsAt": "2026-09-28T04:25:40.000Z",
            "usedPercent": 63.11,
            "remainingPercent": 36.89
          },
          {
            "window": "weekly",
            "resetsAt": "2026-10-04T23:25:40.000Z",
            "usedPercent": 3.01,
            "remainingPercent": 96.99
          }
        ],
        "blocked": [
          "cinematic"
        ],
        "actions": [
          {
            "action": "audio",
            "allowed": true,
            "costTier": 3,
            "estimatedCostPercent": 11.03
          },
          {
            "action": "cinematic",
            "allowed": false,
            "costTier": 4,
            "estimatedCostPercent": 77.02
          },
          {
            "action": "quiz",
            "allowed": true,
            "costTier": 1,
            "estimatedCostPercent": 0.57
          },
          ...
        ]
      }
    }
    
    • An update (email + maxJobs / outputLanguage) returns the same record without quota. It carries outputLanguage when you set it: the value Google echoed back, or null when Google accepted it but its answer could not be read.
    • quota is also left out when Google’s usage could not be read at that moment. GET /accounts/email reads it live at any time.
  • 201 Created — a new account was connected. Same body as 200, without updated.

  • 400 Bad Request — a required cookie is missing, the cookies are not signed in, email was sent with cookies, both maxJobs and outputLanguage are missing in update mode, or a parameter is invalid.

    {
      "error": "Missing cookies: OSID, __Secure-OSID. Copy them from notebook.google.com and accounts.google.com (DevTools → Application → Cookies).",
      "code": 400
    }
    
    {
      "error": "These cookies are not signed in to Gemini Notebook. Sign in at https://notebook.google.com and copy the cookies again.",
      "code": 400
    }
    
    {
      "error": "Parameter outputLanguage must be a language code such as en, es, pt_BR or zh_Hans",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required — the subscription has expired, or a new account needs another subscription.

    {
      "error": "useapi.net ⁝ You have 1 subscription, you need 1 additional subscription (2 total) to support 4 accounts for the gemini_notebook API. Upgrade at https://useapi.net/docs/subscription",
      "code": 402
    }
    
  • 404 Not Found — update mode: no account is connected for this email.

    {
      "error": "Account [email protected] not found",
      "code": 404
    }
    
  • 502 Bad Gateway — the cookies are signed in, but Gemini Notebook did not report the account’s email. Nothing was saved. Retry the same request.

    {
      "error": "Signed in, but Gemini Notebook did not report the account email — please retry",
      "code": 502
    }
    
  • 503 Service Unavailable — Gemini Notebook could not be reached to check the cookies. Retry in a few minutes.

    {
      "error": "Gemini Notebook is not reachable right now (shell-error HTTP 500), please retry",
      "code": 503
    }
    
Model

200 and 201 return the same account record.

{ // TypeScript, all fields are optional
  email: string
  tier: string                    // Google's plan, short form: 'free' | 'pro' | 'ultra' | 'plus' | … | 'unknown'
  googleTier?: string             // Google's own plan name: 'TIER_FREE' | 'TIER_PRO' | 'TIER_ULTRA' | 'TIER_PLUS' | …
  googleTierCode?: number         // Google's plan code: 1 = Free, 2 = Pro, 3 = Ultra, 4 = Plus, …
  maxJobs: number
  added: string                   // ISO 8601, when the account was first connected
  updated?: string                // ISO 8601, the last re-add or maxJobs change
  cookies: string[]               // names of the stored cookies, never their values
  cookiesExpireAt: string | null  // ISO 8601, the earliest expiry Google stated for the stored cookies
  addedVia?: 'setup-browser'      // present when the account was added by the automated setup
  limits?: {
    notebooks: number | null            // notebooks allowed on the plan
    sourcesPerNotebook: number | null   // sources allowed per notebook
  }
  health: string                  // 'OK', 'verifying', or the reason the account must be re-added
  outputLanguage?: string | null  // update with outputLanguage only: the language Google echoed back
  quota?: {
    windows: {
      window: '5h' | 'weekly'
      resetsAt: string | null     // ISO 8601
      usedPercent: number
      remainingPercent: number
    }[]
    blocked: string[]             // actions Google refuses right now
    actions: {
      action: string              // 'audio' | 'video' | 'cinematic' | 'video_short' | 'infographic' | 'slides' | 'report' | 'table' | 'flashcards' | 'quiz' | 'mindmap' | …
      allowed: boolean
      costTier: number | null
      estimatedCostPercent: number | null   // Google's estimate, as % of the 5h window
    }[]
  }
}
Examples
  • curl -X POST "https://api.useapi.net/v1/gemini-notebook/accounts" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "email": "[email protected]",
         "maxJobs": 5
       }'
    
  • const token = "API token";
    const cookies = "Cookie tables copied from DevTools";
    const apiUrl = "https://api.useapi.net/v1/gemini-notebook/accounts";
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({ cookies, maxJobs: 3 })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    cookies = "Cookie tables copied from DevTools"
    apiUrl = "https://api.useapi.net/v1/gemini-notebook/accounts"
    headers = {
        "Content-Type": "application/json",
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "cookies": cookies,
        "maxJobs": 3
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It