We have launched a new place for developers to get examples, quickstarts and guides for the Gemini API
Very helpful as I work on adding more models to my SaaS. Thanks!
Nice addon, as the former tutorials were a bit lacking in some aspects.
Nice! This is going to be very handy.
Super useful, thanks for that.
Hi community! That is big turn!
Is the a Gemini 1.5 CURL REST API code example that I can use with no code Bubble.io? My Gemini 1 code is not working, and the cookbook nor the chat interface generated CURL anymore. Thank you.
Hi there,
A complete set of REST examples can be found here: Tutorial: Get started with the Gemini API | Google for Developers
You’d need an API key to get started though. The specification of the model is part of the URL path and can be swapped as needed.
Thanks so much! I was totally blocked. I will take a look. How do I get notified of changes and docs in the future? I only got an email that version 1.0 would no longer work. There was no link to this documentation.
Thanks!!! I keep getting the version 1.5 error “Expected , or } after key value pair.”. I chatted Gemini but there is no longer a CURL version of the “Share Code” link. Any troubleshooting tips would be greatly appreciated?
The service endpoint https://httpbin.org/post can be used to better see what your API request is sending. It will reflect what you post to it. Then, you can copy and paste what it reflected back into a json editor and the editor will point out where the json you posted is malformed. Or you simply look at it, it’s usually easy to spot.
To make this easier overall, define a prefix called, say, target_url
. Then either set it to the real API endpoint or to the httpbin endpoint.
Hope this helps.
Hi, according to the error message, it seems that there’s an issue with the JSON formatting or structure you’re sending to the API. See whether your JSON is valid or if there are missing brackets, maybe caused by content in the value?
Hello,
Can multiple tasks be run in parallel when use Gemini API with audio files?
If yes, what is the maximum number of parallel tasks?
Thanks.
Thanks again! Have you gotten the documented version 1.5 REST CURL to work? The below worked in version 1 but not 1.5. I replaced the text with a data paramater:
- Replace “text”: “In the quaint town of Willow Creek.”
- With a data paramater “text”: “.”
See screenshot. Seems simple enough to not have to run through a JSON editor, but I am new to this. Thank you again.
There is no limit to concurrent processing (other than the maximum requests per unit time quota applicable to your project). Each processing is stateless, it is atomic. It doesn’t interfere with anything happening at the same time, and does not get affected by anything that happened before.
Hope that helps!
thank you for the contribution!