#How can I view a file uploaded to AI
1 messages · Page 1 of 1 (latest)
I tried passing the API key as a Bearer token but get:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
hi! if you upload a file to the File API you can reference it by name in Gemini API calls, but not get the actual contents. It's not meant to be a file server.
I'm trying to debug responses since it seems to refer to another entirely different image. E.g. I'll upload an image of a man on a motorcycle, but the response will reference woman using a laptop.
I get the correct response when passing in a PIL image directly though.
So it's an issue with the file API.
How are you uploading via the File API and how are you referencing/passing that to generateContent?