Closed haseeb-heaven closed 7 months ago
First you need to be white listed for Google Gemini-1.5-pro If you are then you should know that Google Gemini-1.5-pro doesn't work though the Gemini api which is what this library is for.
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.
First you need to be white listed for Google Gemini-1.5-pro If you are then you should know that Google Gemini-1.5-pro doesnt work though the gemini api which is what this library is for.
If you do have access and really want to try Google Gemini-1.5-pro try going though vertex and use the vertex library i hear it works there.
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.
@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.
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 models/text-bison-001 models/embedding-gecko-001 models/gemini-1.0-pro models/gemini-1.0-pro-001 models/gemini-1.0-pro-latest models/gemini-1.0-pro-vision-latest models/gemini-pro models/gemini-pro-vision models/embedding-001 models/aqa
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.
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
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 gemini-1.5-pro-latest
isn't even listed.
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.
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.
Any idea if the pricing for Gemini Pro 1.5 will be the same as 1.0?
Gemini 1.5 pro api is avaliable now.
Gemini 1.5 pro api is avaliable now.
sry friend, how do you get it? I checked my google dev studio, its "code" button still unavailable. and it's not listed in model list api either.
Gemini 1.5 pro api is avaliable now.
sry friend, how do you get it? I checked my google dev studio, its "code" button still unavailable. and it's not listed in model list api either.
i got an email....
[Preview] Gemini API Access External
Hello,
We're thrilled to announce that we’ve started rolling out access to the Gemini 1.5 Pro API! This lets you bring the power of Gemini 1.5 Pro beyond Google AI Studio.
so i got it.
Gemini 1.5 pro api is avaliable now.
sry friend, how do you get it? I checked my google dev studio, its "code" button still unavailable. and it's not listed in model list api either.
i got an email....
[Preview] Gemini API Access External Hello, We're thrilled to announce that we’ve started rolling out access to the Gemini 1.5 Pro API! This lets you bring the power of Gemini 1.5 Pro beyond Google AI Studio.
so i got it.
ok. thx. maybe what I can do is just waiting.
so i got it.
Did you need to ask for it? Or are they just handing it out to everyone on the gemini 1.5 early access list? Thanks!
I am also curious how to ask or apply to get access to Gemini 1.5 Pro API. I have already sent the application to get early access to it weeks ago, but they never responded. Anyone who knows please help!
i got access through mail but getting error in trying to access
did u tried with created a new key?
i got access through mail but getting error in trying to access
So how did you get access to begin with ? Is it because you already had access to Gemini 1.5 Pro waitlist before they removed the waitlist ? Is it because you have a Google Workspace account ?
Searching through internet I only saw some pages or some people saying Google rolled out Gemini 1.5 Pro API to "some developers", but regarding how is this process decided, like how do they decide who to give access to - no one said anything to clarify. Wtf.
Most of these questions are out of scope for this library I recommend you join discord channel gemini-api You can get help there from other developers
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 Hello, We're thrilled to announce that we've started rolling out access to the Gemini 1.5 Pro API! This lets you bring the power of Gemini 1.5 Pro beyond Google AI Studio. How to request access: Submit one Google Cloud Project Number (digits only) using this form. We'll email you if access is enabled for your project. Gemini 1.5 Pro:
Fill form
Reply from Google: Hello, We're excited to share that you now have access to the Gemini 1.5 Pro API and the File API! Your feedback on this highly-requested preview feature is incredibly valuable. Please share your thoughts and any projects you build! Instructions:
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 \ -H 'Content-Type: application/json' \ -d '{"contents":[{"parts":[{"text":"Write a story about Wikipedia"}]}]}' \ -X POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:generateContent?key=yourkey
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. https://developers.googleblog.com/2024/04/gemini-15-pro-in-public-preview-with-new-features.html?m=1
The API for Google Gen AI 1.5 is now available. https://developers.googleblog.com/2024/04/gemini-15-pro-in-public-preview-with-new-features.html?m=1
Still not working for me... unless I am doing something wrong?
GoogleGenerativeAIError: [404 Not Found] models/gemini-1.5-pro-latest is not found for API version v1, or is not supported for GenerateContent. Call ListModels to see the list of available models and their supported methods.
The code that generated the above error works perfectly fine with the model code gemini-pro
, but not with gemini-1.5-pro-latest
¯\_(ツ)_/¯
@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 v1beta
, as that is the only version that supports the gemini-1.5-pro-latest
model at this time. Although the above code is for the javascript client library, it can be modified for various languages of google's client for generative AI (python, etc.)
I wish to code for golang. any chance to modifiy that code: model := client.GenerativeModel("Gemini 1.5 Pro") there are no curly bracets in golang version
@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 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
v1beta
, as that is the only version that supports thegemini-1.5-pro-latest
model at this time. Although the above code is for the javascript client library, it can be modified for various languages of google's client for generative AI (python, etc.)
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}
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: