Since 2026-09-14 ~18:14 (UTC+8), every batchGenerateContent job in our project completes with
state: BATCH_STATE_SUCCEEDED but the inlined response contains
error: { code: 7, message: “The caller does not have permission” }.
The same API key, same model and the SAME uploaded file work correctly through synchronous calls.
Nothing changed on our side. Status page shows All Systems Operational.
ENVIRONMENT
- Model: models/gemini-3.7-flash (version 3.7-flash-08-2026)
- Endpoint: generativelanguage.googleapis.com/v1beta
- Billing: paid tier, active, no spend cap
- Key: authorization key, bound to a service account, restricted to “Gemini API”
- Input: audio/mpeg, 30-70 MB, uploaded via resumable File API upload
- Client: Google Apps Script (UrlFetchApp), x-goog-api-key header
WHAT WE SEND (one inlined request per batch)
{
“batch”: {
“display_name”: “tx_REDACTED_1.mp3_1789470464367”,
“input_config”: { “requests”: { “requests”: [{
“request”: { “contents”: [{ “parts”: [
{ “file_data”: { “file_uri”: “…/v1beta/files/759tqz2aernv”, “mime_type”: “audio/mpeg” } },
{ “text”: “” } ] }] },
“metadata”: { “key”: “transcript” } }] } }
}
}
ACTUAL RESULT (GET /v1beta/batches/y2a8z10m37opym1din090edczvjbtd8xm6j7)
{
“metadata”: {
“model”: “models/gemini-3.7-flash”,
“output”: { “inlinedResponses”: { “inlinedResponses”: [
{ “error”: { “code”: 7, “message”: “The caller does not have permission” },
“metadata”: { “key”: “transcript” } } ] } },
“createTime”: “2026-09-15T12:02:41Z”,
“endTime”: “2026-09-15T12:22:32Z”,
“batchStats”: { “requestCount”: “1”, “failedRequestCount”: “1” },
“state”: “BATCH_STATE_SUCCEEDED”
},
“done”: true,
“response”: { “inlinedResponses”: { “inlinedResponses”: [
{ “error”: { “code”: 7, “message”: “The caller does not have permission” },
“metadata”: { “key”: “transcript” } } ] } }
}
The JOB succeeds; only the inner request is denied. There is no top-level “error”,
no blockReason, no finishReason and no token counts anywhere in the payload.
THE SAME KEY AND THE SAME FILE WORK SYNCHRONOUSLY
All three made with the same key, minutes after the batch above failed:
-
GET /v1beta/files/759tqz2aernv → 200
{ “mimeType”: “audio/mpeg”, “sizeBytes”: “44972534”, “state”: “ACTIVE”, “source”: “UPLOADED” } -
POST /v1beta/models/gemini-3.7-flash:countTokens with the same file_uri → 200
{ “totalTokens”: 59960, “promptTokensDetails”: [{ “modality”: “AUDIO”, “tokenCount”: 59960 }] } -
POST /v1beta/models/gemini-3.7-flash:generateContent (text only) → 200, serviceTier: standard
So the file exists, is ACTIVE, is readable by this key, and the model can ingest it –
but batch execution reports that “the caller” has no permission to it.
A SECOND, NEWLY CREATED KEY REPRODUCES IT IDENTICALLY
We created a new authorization key in the same project (bound to a DIFFERENT service account,
same “Gemini API” restriction) and swapped it in. Same row, same audio, three separate uploads:
submitted 14:06 (+8) | key A | files/aq0mtg77ziaf | code 7
submitted 19:07 (+8) | key A | files/3tctp2anqopf | code 7 after 4m44s
submitted 20:02 (+8) | key B | files/759tqz2aernv | code 7 after 19m51s
Time-to-failure varies 4-46 min across our jobs, which we read as queue latency, not signal.
TIMELINE
- Worked normally 2026-09-02 through 2026-09-14 18:14 (+8): 473 successful transcriptions.
- From the first job on 2026-09-15: 100% of batches fail this way. 0 successes.
- No deployment, code, key or configuration change in that window (verified by SHA of our
Apps Script projects: unchanged since 2026-09-08 and 2026-09-12).
RULED OUT
Application state; stale vs fresh file URIs; file deletion; File API storage quota (6 files,
far below 20 GiB); key type; key identity (second new auth key, different service account);
key restrictions; project IAM; billing tier and spend cap; model availability; our code.
QUESTIONS
- Under what identity does a batch job read a File API resource referenced by
file_data.file_uri? - Did that authorization path change on or around 2026-09-14?
- Is there a project- or key-level setting required for batch jobs to access File API
resources that is NOT required for synchronous calls? - Is referencing File API files from inlined batch requests still supported? The Batch API
guide states that with multimodal input you “can reference other uploaded files”.
Happy to provide project ID and full unredacted payloads privately.