New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Gemini 1.5 pro via API access #227
Comments
First you need to be white listed for Google Gemini-1.5-pro I have heard that the api works via Google Gemini-1.5-pro going though vertex but you have to be whitelisted for that as well. I have only heard it exits I don't know anyone who managed to got into that whitelist. I haven't even heard of way of applying. |
But still in vertex-ai Gemini 1.5 pro is not available via API? |
@haseeb-heaven That's a completely different white list. I have only heard that it exits i don't know anyone that got access to that yet. Its not the same as the white list to access it in Google Ai Studio. Im not even sure how to get on the Vertex ai whitelist for gemini pro 1.5 You need to test via ai studio. |
I can see version 1.5 in ai studio, I can selected this version. And when I examine the network panel after the prompt sending and receive response, requests are sent to google services with the 1.5 version parameter. However, when I try to access the 1.5 version via the API, I get 404, which is the error our friend received. I think even though we are whitelisted, this does not mean that we can access the API. |
Okay i will test via Vertex AI API but i prefer Google AI Studio API because it need only single API key for authorization. |
@SeanTolstoyevski I think you need to reread what you are white Listed for There is NO api currently for Gemini pro 1.5 the white list only gives you access to test in Google ai studio they haven't implemented an API for it they just gave us ai studio testing |
I've got whitelisted on AI Studio too. Shame it's blocked in Denmark (or whole EU in that regard). If someone reverse-engineers, it feels like GPT-5 for some tasks and I am excited to integrate. @LindaLawton do you have any idea where to find application/form for use in VertexAI? |
I have been using it from Denmark since it first came out via AI Studio start your favorite VPN and your all set. VeePN if you don't want to pay for it has a chrome extension that works. I used that before I grabbed PureVPN. No i don't know of any one with access or I suspect its only company's directly associated with Google already. I am a GDE and they wont give me access either. |
I have access to 1.5 in AIStudio, but there is no API access in version 0.4.1. Does anyone know when they plan to add it? The following packages are currently available: models/chat-bison-001 |
I got access today it's comming. |
Same here |
@LindaLawton @Arkm20 , please how did you get access. i need it |
Im a google developer expert for ai/ml some on at google sent me a hangout message and asked for the project i wanted white listed. If GDE's are getting access its only a matter of time before the others white listed for 1.5 on ai studio get access hang in there. Heads up the model name is gemini-1.5-pro-latest when you get access. Any code you are using for gemini-pro will work for 1.5 as well. from what i can see |
Thank you @LindaLawton |
@LindaLawton are you leveraging pro-1.5 in the python SDK? or in the console? |
Im using this library to work with Gemini pro 1.5 the code is the same its just a different model. You use gemini-1.5-pro-latest instead of gemini-pro and your good to go. you need to be whitelisted. |
But how to get whitelisted please explain that in details thanks |
If you are white Listed for ai studio you will get in eventually If you're not you need to apply to be white Listed In both cases you just wait |
I tried to list all the models available and i got this list. def list_all_models():
try:
models = genai.list_models()
for model in models:
print(f"Name: {model.name}, Display Name: {model.display_name}")
except Exception as exception:
print("Error listing models:", exception) Output: Name: models/chat-bison-001, Display Name: PaLM 2 Chat (Legacy)
Name: models/text-bison-001, Display Name: PaLM 2 (Legacy)
Name: models/embedding-gecko-001, Display Name: Embedding Gecko
Name: models/gemini-1.0-pro, Display Name: Gemini 1.0 Pro
Name: models/gemini-1.0-pro-001, Display Name: Gemini 1.0 Pro 001 (Tuning)
Name: models/gemini-1.0-pro-latest, Display Name: Gemini 1.0 Pro Latest
Name: models/gemini-1.0-pro-vision-latest, Display Name: Gemini 1.0 Pro Vision
Name: models/gemini-pro, Display Name: Gemini 1.0 Pro
Name: models/gemini-pro-vision, Display Name: Gemini 1.0 Pro Vision
Name: models/embedding-001, Display Name: Embedding 001
Name: models/aqa, Display Name: Model that performs Attributed Question Answering.
Name: models/chat-bison-001, Display Name: PaLM 2 Chat (Legacy)
Name: models/text-bison-001, Display Name: PaLM 2 (Legacy)
Name: models/embedding-gecko-001, Display Name: Embedding Gecko
Name: models/gemini-1.0-pro, Display Name: Gemini 1.0 Pro
Name: models/gemini-1.0-pro-001, Display Name: Gemini 1.0 Pro 001 (Tuning)
Name: models/gemini-1.0-pro-latest, Display Name: Gemini 1.0 Pro Latest
Name: models/gemini-1.0-pro-vision-latest, Display Name: Gemini 1.0 Pro Vision
Name: models/gemini-pro, Display Name: Gemini 1.0 Pro
Name: models/gemini-pro-vision, Display Name: Gemini 1.0 Pro Vision
Name: models/embedding-001, Display Name: Embedding 001
Name: models/aqa, Display Name: Model that performs Attributed Question Answering. My Google generativeai version: pip show google-generativeai
Name: google-generativeai
Version: 0.4.1 See the |
It will be when they give you access I had to have my project whitelist |
I too get the same result (404) and the same (non-1.5) list of models as everyone else except @LindaLawton, using google-generativeai v 0.4.1. I have AI Studio 1.5 access via both a personal account and a Google Workspace account. I generated API keys from both those accounts but neither of them yields gemini-1.5-pro-latest. Google, please show us the love 🙏 |
I can not you must wait to be white Listed to the API it's comming they are releasing it slowly |
It looks like they've removed the whitelist and opened up access to 1.5 in AI Studio. Hopefully that means it will be accessible in the API soon. |
Yes i saw Twitter post about this hopefully we will get the API access soon. |
Hope this helps Firstly Google would send you an invite to join. Then fill that form and you have to specify your project id. Make sure you remember the project id! First email from Google Fill form Reply from Google: Go to https://aistudio.google.com and create a new key with the "Project ID" that you filled in the form (I had to create a new key. If you already have a key with that project ID, I assume it would work). Then run the following command: curl The mistake I made was using a key from a different project. |
Thanks all for confirming i am yet to receive my API key from Google once i receive i will update this issue. |
I already filled out the form, but it's been some days now... I still haven't got the email regarding the Api access confirmation |
@goodanthony @Arkm20 @haseeb-heaven Would you mind sharing the link to the form? Thanks. |
So it looks like the Gemini 1.5 rates isn't the same... Sad... Rate limit 2 queries per minute, 1000 queries per day according to Official Gemini Docs |
@goodanthony I still haven't recieved that reply... |
The API for Google Gen AI 1.5 is now available. |
Still not working for me... unless I am doing something wrong?
The code that generated the above error works perfectly fine with the model code ¯\_(ツ)_/¯ |
@johnomeara1, try creating a new key at https://aistudio.google.com/ with the "Project ID" that you are calling the API. |
Thanks for the tip! Here's what ended up working for me: const model = genAI.getGenerativeModel({ model: "gemini-1.5-pro-latest" }, {
apiVersion: 'v1beta',
}); The key is using API version |
I wish to code for golang. any chance to modifiy that code: |
@zakcali your in the wrong forum this is for the python client library you should head over to generative-ai-go for help with golang |
Thanks, spent ages debugging this before I found your post. Was this communicated anywhere or were we just supposed to figure it out on our own? |
It works fine for me just without the {apiversion} |
Create new API again and select the project which has access of Gemini 1.5 pro, it’s working for me i created new API key. |
All projects have access now to Gemini 1.5 pro.... It's now on Public access. But I do find the rates to be very annoying. Only 2 requests per minute... |
Wait 2 requests per minute is way too less is there any documentation on API of this Gemini 1.5 pro rate limitations? I know Gemini had 60 RPM |
hello,do you know how to use this api to get answers for video input |
I use the code and here is the error information: |
you need to see the documentation on how to send video objects with your request. |
I have read in this stack-overflow post that you need to change to api version to beta. And it seems to be supported by this page on the gemini docs. The problem is that I have no idea how to implement this in code (dart). If any has any idea I would appreciate the help. |
I'm not a dart guy but looks like you need to use requestOptions: |
Thanks man that seems to have done it |
The original question seems to be well & truly answered. I'm going to lock this thread now - for any other Python SDK issues you can file a new issue, for other languages find the relevant SDK in https://github.com/google-gemini and ask there. For general chat, head on over to discord: https://goo.gle/gemini-discord |
Description of the feature request:
I want to use latest version of Google Gemini-1.5-pro via API or SDK that can be integrated to our projects.
What problem are you trying to solve with this feature?
Solving the whole codebase upload media and more with 1 Million tokens limit to achieve maximum efficiency from this model.
Any other information you'd like to share?
Here is error i got
Here is the code:
The text was updated successfully, but these errors were encountered: