mirror of
https://github.com/HanaokaYuzu/Gemini-API.git
synced 2026-04-12 12:23:03 -06:00
Image upload fails with error code [13] - text-only works fine #126
Labels
No labels
advanced
advanced
bug
dependencies
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
model
pull-request
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mirrors/Gemini-API#126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @holzhaker1 on GitHub (Dec 17, 2025).
Test Code
from gemini_webapi import GeminiClient
from pathlib import Path
async def test():
client = GeminiClient(secure_1psid, secure_1psidts)
await client.init()
Test Results
I created a test script to isolate the issue:
Error Logs
2025-12-18 00:32:16.053 | DEBUG | gemini_webapi.utils.parsing:get_nested_value:32 - Safe navigation: path [0, 5, 2, 0, 1, 0] ended at index 2 (key '2'), returning default. Context: [13]
2025-12-18 00:32:16.053 | DEBUG | gemini_webapi.client:generate_content:406 - Invalid response: )]}'
"wrb.fr",null,null,null,null,[13,["di",382],["af.httprm",381,"-5881216359610352895",17]]
Additional Context
File upload to Google's servers appears to succeed (no error from
upload_file
)
The error occurs when the API processes the request with the uploaded file
Cookies are valid (text-only requests work)
Tried multiple models - all fail with images
@luuquangvu commented on GitHub (Dec 18, 2025):
This could be related to error #198. You could try checking out that PR to see if it works for you.
@holzhaker1 commented on GitHub (Dec 18, 2025):
This did not fix it for me. I tried nearly everything, rotating models etc, switching file types, it simply wont work when adding a file