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

Internal error encountered on uploading audio file uri to gemini

Hello, im using google cloud to upload audio and then uploadind file to gemini 

 

request for uploading audio

"POST {} HTTP/1.1\r\nHost: generativelanguage.googleapis.com\r\n\
        Content-Length: {}\r\n\
        Content-Type: audio/mpeg\r\n\
        X-Goog-Upload-Offset: 0\r\n\
        X-Goog-Upload-Command: upload,finalize\r\n\r\n\
        {:?}"

 

POST /v1beta/models/gemini-1.5-pro:generateContent?key=key HTTP/1.1
Host: generativelanguage.googleapis.com
Content-Type: application/json
Content-Length: 262

{
      "contents": [{
        "parts":[
          {"text": "What is the current Google stock price?"},
          {"file_data":{"mime_type": "audio/mpeg", "file_uri": "https://generativelanguage.googleapis.com/v1beta/files/309oy4antidm" }}]
        }]
    }
output
6d

{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

0

 

 

   
0 1 212
1 REPLY 1