Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

An error occurred: 403 You do not have permission to access tuned model tunedModels/xyzyzyzyzyz

Is there a way to request access or permissions for the tuned model I'm trying to access in Google if I receive a 403 error?

4 16 6,491
16 REPLIES 16

@Poala_Tenorio  Any Input

The error message "403 You do not have permission to access tuned model tunedModels/xyzyzyzyzyz" suggests that you are trying to access a specific tuned model, but you do not have the necessary permissions to do so. This error is often associated with web services, APIs, or cloud platforms.

To resolve this issue, you can consider the following steps:

1. Ensure that you have the appropriate permissions and access rights to view or use the "tunedModels/xyzyzyzyzyz" model. This may involve checking your user account settings, roles, or permissions in the platform you are using.

2. If you are accessing the model through an API, make sure you are using the correct API key or token and that it has the necessary permissions to access the model.

3. Ensure that the tuned model "xyzyzyzyzyz" is available and accessible in the system you are using. It's possible that the model is not published or accessible to your account.

Without more context about the specific service or platform you are using, it's challenging to provide a more detailed solution. You may need to refer to the documentation of the service or contact their support for specific guidance on resolving this issue.

I am trying to accessing tuned model via api 
i crossed checked everything but still not working

I am having the same issue. Everything is working fine but I can't access the tuned model. Can't find any guide to access it. Maybe it is still under development. 

Same! 

 

Did you ever figure this out? @Muskan778899  @risshi22 

I did. Turns out fine-tuned model are subject to additional security compared to base models hence to use them you need to fetch through OAuth credentials. This creates a significant challenge because you will need to keep refreshing the OAuth token every time it expires. 

I was not able to get any other method to work. Maybe its changed since I last tried this in Nov, 2023.

I did it 

What do you mean?

Try to Log in in Incognito mode might that will solve your problem.

Hey, following this guide will solve all the problems:
https://ai.google.dev/docs/oauth_quickstart

You need to login with the tuned model with authentication, since it is private user data.

Hello. The guide was very helpful, thanks! My tuned model works in Jupyter Notebook, but I get a 403 error when I deploy it to my Flask app. The base model works fine in both environments. Are the tuned models not deployable on local web apps?

Hi, I have a same problem as this. May I kindly ask if you found a way to implement it in your local web app?

Tuned models work on local web apps. You need to make sure a lot of things are in place to do that. You need the authentication guide from here: https://ai.google.dev/docs/oauth_quickstart
So you need to enable oauth in your application.

You also need to make sure in flask you are not getting any CORS errors as well as your application connects to the web. 


Do we need to add scopes as well for this? Or can just skip that

I’m encountering the same issue when trying to access a tuned model via API for my web app. Despite following the provided OAuth authentication steps and ensuring the correct permissions and scopes, I still receive the error:

“403 You do not have permission to access tuned model tunedModels/xyzyzyzyzyz.”

Here is what I’ve done so far:

1. OAuth Authentication: Followed the OAuth quickstart guide here and ensured the following scopes are included:

https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/generative-language.tuning,

2. API Key: Tried using the API key directly in my configuration.

3. Model Accessibility: Confirmed that the tuned model is available and should be accessible by my account.

Despite these efforts, the issue persists specifically in my web app setup, whereas the base models work perfectly fine. Has anyone found a definitive solution for deploying tuned models in local web apps?