GoogleGenerativeAI Error, 403 Forbidden "You do not have permission to access tuned mode"

I successfully fine-tuned a model using aistudio.google.com and I'm impressed with its accuracy. I created an API key to integrate it into my app, but I'm encountering a 403 error message that says "You do not have permission to access tuned model." Can you help me troubleshoot this error?

 

0 1 176
1 REPLY 1

Hello,

Based from the Model tuning guide here in the documentation



Tuning using the API and client library requires user authentication. An API key alone is not sufficient. If you see a 'PermissionDenied: 403 Request had insufficient authentication scopes' error, you need to set up user authentication.

In order to resolve this issue, you need to configure OAuth credentials. See documentation for the instruction on how to set up OAuth.

Hope this helps.