mirror of
https://github.com/HanaokaYuzu/Gemini-API.git
synced 2026-04-12 04:19:46 -06:00
Is there anyway to dowload full size image #72
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#72
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 @nvcc1701 on GitHub (Jul 4, 2025).
Is there anyway to save image like download full size in the gemini ui. I see that image.save() has lower resolution than download full size.
@HanaokaYuzu commented on GitHub (Jul 4, 2025):
Fixed in v1.14.2.
Now calling
GeneratedImage.savewill automatically download image in full size. You can optionally passfull_size=Falseto save 512*512 preview version instead.@nvcc1701 commented on GitHub (Jul 5, 2025):
It seem like download full size not work. When i test download, the url of gemini_api is
url from gemini-api
but when i save in gemini ui it is like
url from gemini.google.com
and the size is not same, gemini-api(1408x768), gemini.google.com(2816×1536)
@HanaokaYuzu commented on GitHub (Jul 6, 2025):
Probably due to your generated image has max width greater than 2048px. Could you please try modifying the following line locally to
self.url += "=s4096"and check if it works?github.com/HanaokaYuzu/Gemini-API@4aba81ffa2/src/gemini_webapi/types/image.py (L161)@nvcc1701 commented on GitHub (Jul 6, 2025):
I have tested add
=s4096it not work, it have same result likes2048. The dowload full size in gemini.google.com have higher resolution.@HanaokaYuzu commented on GitHub (Jul 6, 2025):
Can you send me the prompt you used to generate the image?
@nvcc1701 commented on GitHub (Jul 6, 2025):
Yes.
@HanaokaYuzu commented on GitHub (Jul 6, 2025):
So what's behind the scenes is that Google uses a "2-step" generation for every image generation request. When you send prompts in chat, the first step is triggered and a 1080p image will be generated and returned; then when the user clicks "download", another RPC will be called to trigger the second step which generates the 2k version.
This works pretty well to provide a more smooth experience on the user side as well as save cost by splitting the expensive and time-consuming generation process into 2 parts, but from the perspective of
gemini_webapi, those messy RPC calls could be challenging to implement into the API and I'm still hesitating whether to integrate them into the package. That's also the reason why deep research (#80) and video generation (#84, #109) is not implemented yet: these functions all rely on extra RFCs besides a single generation request (that's howGeminiClient.generate_contentworks currently).In short, I'll leave this issue open for now, while as the user base grows up probably I'll find a time to implement these features one day.
@nvcc1701 commented on GitHub (Jul 8, 2025):
It's Great feature, hope to use it soon