AI Studio Auth Extractor

一键提取 Google AI Studio 认证信息(最小化),保存为 {email}.json

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

المؤلف
xjetry
التثبيت اليومي
0
إجمالي التثبيت
2
التقييمات
1 0 0
الإصدار
2.1.0
تم إنشاؤه
11-04-2026
تم تحديثه
11-04-2026
الحجم
5.6 KB
الترخيص
MIT
ينطبق على

一键提取 Google AI Studio 的登录认证信息,导出为 JSON 文件,供 AIStudioToAPI 项目使用。

功能

  • 在 AI Studio 页面右下角添加「Extract Auth」按钮
  • 点击后自动提取当前登录账号的核心认证 Cookie(仅 9 个,最小化提取)
  • 自动识别登录邮箱,导出为 {邮箱}.json 文件
  • 导出格式与 AIStudioToAPI 的 configs/auth/auth-N.json 完全兼容

前置配置(仅需一次)

本脚本需要读取 httpOnly Cookie(如 __Secure-1PSID),请按以下步骤配置 Tampermonkey:

  1. 点击浏览器中的 Tampermonkey 图标管理面板设置
  2. 将「配置模式」切换为「高级
  3. 在「安全」区域,将「允许脚本访问 Cookie」设置为 All
  4. 保存设置,刷新 AI Studio 页面

注意:本脚本仅支持 Tampermonkey(需要 GM_cookie API)。Violentmonkey / Greasemonkey 不支持。

使用方法

  1. 在浏览器中打开 Google AI Studio 并登录
  2. 页面右下角出现蓝色「📦 Extract Auth」按钮
  3. 点击按钮 → 自动下载 你的邮箱@gmail.com.json
  4. 将文件重命名为 auth-0.json(多账号依次为 auth-1.jsonauth-2.json...)
  5. 放入 AIStudioToAPI 项目的 configs/auth/ 目录

提取的 Cookie 列表

仅提取 .google.com 域下的 9 个核心认证 Cookie,不包含任何跟踪或分析 Cookie:

Cookie 用途
SID 主会话 ID
HSID HTTP 会话绑定
SSID Secure 会话绑定
SAPISID API 认证签名计算
SIDCC 会话 consent
__Secure-1PSID HTTPS 主会话
__Secure-1PAPISID HTTPS API 认证
__Secure-1PSIDCC HTTPS consent
__Secure-1PSIDTS 会话时间戳