1 Like
Welcome to the forum. The Authentication requirements for tuned models go beyond using the API key. The QuickStart at https://ai.google.dev/gemini-api/docs/model-tuning/python says right at the start under Setup heading that you need to set up OAuth.
The screen shot attached with your post unfortunately includes your API key. You should consider your API key compromised and retire it, and get a new one.
Hope that helps.