https://github.com/Mag1cFall/AIStudio2API/issues/59 又出現了
補充透過 Chrome DevTools 抓取的完整底層 API 請求格式、Payload 結構與 Console 報錯細節供排查參考:
1. 頁面狀態與觸發行為
在 AI Studio Playground 選擇 時:
- 當輸入框為空時, 按鈕屬性為 且帶有 (同時上方顯示 )。
- 但只要在輸入框填入任何文字(如 Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p] [-4] [-6] target_name
Options: -t Ping the specified host until stopped. To see statistics and continue - type Control-Break; To stop - type Control-C. -a Resolve addresses to hostnames. -n count Number of echo requests to send. -l size Send buffer size. -f Set Don't Fragment flag in packet (IPv4-only). -i TTL Time To Live. -v TOS Type Of Service (IPv4-only. This setting has been deprecated and has no effect on the type of service field in the IP Header). -r count Record route for count hops (IPv4-only). -s count Timestamp for count hops (IPv4-only). -j host-list Loose source route along host-list (IPv4-only). -k host-list Strict source route along host-list (IPv4-only). -w timeout Timeout in milliseconds to wait for each reply. -R Use routing header to test reverse route also (IPv6-only). Per RFC 5095 the use of this routing header has been deprecated. Some systems may drop echo requests if this header is used. -S srcaddr Source address to use. -c compartment Routing compartment identifier. -p Ping a Hyper-V Network Virtualization provider address. -4 Force using IPv4. -6 Force using IPv6.), 按鈕的 屬性即解除,點擊後可直接透過內部 First-Party RPC 端點發送請求並取得 正常回應(無須綁定付費 API Key)。
2. 請求端點與關鍵 Headers
- URL:
- Method:
- Content-Type:
3. Request Payload 結構
- :
- : 對話歷史陣列
- : Safety Settings
- : Generation Config,其中 為 (對應 UI 的 Thinking Level: Low=1 / Medium=2 / High=3,而非舊版整數型 )
- : (由 動態簽發的完整 BotGuard Token,若截斷、缺失或過期會返回 )
- : Tools (Google Search Grounding)
- :
4. Response 結構與前端 Console 異常
回應狀態為 ,最後一個 Chunk 的 Part 帶有加密 ()。同時前端 Console 在處理流資料時會拋出一筆非阻塞異常: