You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prompting with videos return the following error, while it works with classic Gemini API:
HTTP error downloading media 'https://generativelanguage.googleapis.com/v1beta/files/uu320af6jeh8': {
"error": {
"code": 403,
"message": "Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.",
"status": "PERMISSION_DENIED"
}
}
I suspect this is because Genkit attempts to download https URLs and inline them as base64-encoded data for Gemini APIs since Gemini hasn't traditionally supports https URLs directly.
We may need to special case the File API URLs.
Can you show me the code that you are running that gave you uploadResponse?
Prompting with videos return the following error, while it works with classic Gemini API:
HTTP error downloading media 'https://generativelanguage.googleapis.com/v1beta/files/uu320af6jeh8': {
"error": {
"code": 403,
"message": "Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.",
"status": "PERMISSION_DENIED"
}
}
With Genkit (not working):
const response = await generate({
model: gemini15Pro,
prompt: [
{ text: prompt },
{
media: {
url: uploadResponse.file.uri,
contentType: uploadResponse.file.mimeType,
},
},
]
});
With classic Gemini API (works):
const result = await model.generateContent([
{
fileData: {
mimeType: uploadResponse.file.mimeType,
fileUri: uploadResponse.file.uri
}
},
{ text: "Summarize this video." },
]);
The text was updated successfully, but these errors were encountered: