Skip to content

Commit e5dc4c7

Browse files
docs(gemini): image_url is not supported — it returns 422 (#40)
Signed-out Gemini accepts the upload and then refuses to answer about it (PERMISSION_DENIED from its own generate call), so scrapebadger now 422s image asks immediately instead of charging for a request that cannot succeed. The parameter stays on the signature — removing it would break callers — but the docstring no longer promises an answer. chatgpt.ask takes an image and answers about it. See scrape-badger/scrapebadger#1614. Co-authored-by: kasparasizi1 <132673909+kasparasizi1@users.noreply.github.com>
1 parent 72b55ec commit e5dc4c7

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "scrapebadger"
3-
version = "0.43.0"
3+
version = "0.43.1"
44
description = "Official Python SDK for ScrapeBadger - Async web scraping APIs for Twitter and more"
55
readme = "README.md"
66
license = { text = "MIT" }

src/scrapebadger/gemini/ask.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ async def ask(
5252
country: ISO-3166 alpha-2 egress country. Defaults to "US".
5353
web_search: Whether Gemini should ground the answer with a web
5454
search — "auto", "force", or "off". Defaults to "auto".
55-
image_url: Public http(s) URL of an image to attach. Gemini looks
56-
at the picture and answers about it (JPEG/PNG/GIF/WEBP/BMP, up
57-
to 5 MB). An image ask takes noticeably longer — allow 90-150s.
58-
It will NOT generate an image: anonymous gemini.google.com
59-
gates that behind a login.
55+
image_url: NOT SUPPORTED — returns 422 and is never billed.
56+
Signed-out Gemini accepts the upload and then refuses to answer
57+
about it (PERMISSION_DENIED from its own generate call), so the
58+
API fails fast rather than charging for a request that cannot
59+
succeed. Use ``chatgpt.ask`` for image input. Gemini will not
60+
generate an image either: anonymous gemini.google.com gates that
61+
behind a login.
6062
6163
Returns:
6264
The answer, its citations, and the full retrieved search set.

0 commit comments

Comments
 (0)