I am using Batch API which sends audio files for running some identification in that audio file. But I am getting
Request contains an invalid argument
My request looks like this,
request_item = {
"request": {
"contents": [
{
"role": "user",
"parts": [
{"text": TRANSCRIPTION_SYSTEM_PROMPT + "\n" + TRANSCRIPTION_USER_PROMPT},
{
"file_data": {
"file_uri": google_file.uri,
"mime_type": mime_type
}
}
]
}
],
"generation_config": {
"response_mime_type": "application/json",
"response_schema": TRANSCRIPT_SCHEMA,
"temperature": 0.0
}
}
}
The file is uploaded via File API. I have tried system prompt with role system and also tried after removing them. But still I am getting the error constantly. I have tried running Gemini-2.5-flash and also Gemini-3-flash-preview. What is the fix for this?