I’m seeing a reproducible failure with Agentic Video Understanding through the Gemini Developer API’s Interactions API. This is not Vertex AI or Batch API. It blocks evaluation of a video-timeline analysis workflow.
Observed behavior
- Upload the MP4 through Files API and wait until it is
ACTIVE. - Call
client.interactions.create(..., stream=True)through the official Python SDK. - The generation POST returns HTTP 200 and streaming begins.
- The stream emits 23
processing_callsteps and 22 completedprocessing_resultsteps, then:
{
"code": "api_error",
"message": "Internal error encountered."
}
No final response JSON or usage metadata arrives. This is an error inside an already-open HTTP 200 stream, not an HTTP 500 response to the initial POST. Each attempt makes one generation POST, with no automatic generation retries.
Environment and request shape
- Model:
gemini-3.8-flash(availability checked before submission) - SDK:
google-genai==2.22.0 - Python 3.12.13 on Fedora
- Endpoint:
https://generativelanguage.googleapis.com/v1beta/interactions - Standard streaming requests, agentic video processing, low media resolution
Sanitized request outline below; prompt and schema represent the actual task instructions and JSON schema, not literal placeholders sent to the API:
stream = client.interactions.create(
model="gemini-3.8-flash",
input=[
{
"type": "video",
"uri": uploaded_file.uri,
"mime_type": "video/mp4",
"processing": "agentic",
"resolution": "low",
},
{"type": "text", "text": prompt},
],
response_format={
"type": "text",
"mime_type": "application/json",
"schema": schema,
},
stream=True,
)
The task asks for WATCH/SKIP state transitions and natural scene breaks in a complete video. The schema is an object with two required arrays, transitions and scene_breaks. Entries contain non-negative integer timestamp_ms, a low|medium|high confidence enum, and (for transitions) a WATCH|SKIP state enum. It uses $defs/$ref; scene_breaks has maxItems: 6.
Reproduction and controls
- 7/7 different full-length files failed with the same 23-call/22-result signature. They span approximately 88–147 minutes and different resolutions. Generation time was approximately 156–304 seconds.
- These exact local media files previously produced successful answers using an earlier prompt/schema and request configuration. That historical comparison is not prompt-only: several envelope settings also differed.
- On one file, I retained the current prompt/schema/media and minimal SDK path, then added only the following generation configuration from an earlier successful run:
{
"max_output_tokens": 8192,
"seed": 20260904,
"thinking_level": "low",
"thinking_summaries": "none"
}
That controlled attempt also failed at 23/22 after approximately 963 seconds of generation.
- A separately timestamp-corrected, decoded-frame-equivalent media derivative also reproduced the failure. This rules out the observed local timestamp defect as necessary for that failure; it does not identify the provider-side cause.
- Earlier successful runs exceeded 23 processing calls, so I am not claiming a universal 23-call ceiling.
- The error did not contain an explicit safety, copyright, or recitation-block diagnosis. Missing usage means cost is unknown, not zero.
Questions for the Gemini team
- Is this repeated unfinished processing-step pattern a known Agentic Video issue? Could it reflect an internal navigation/tool failure, timeout, or structured-output interaction?
- Is the request shape above correct for long-form agentic video with structured JSON? Are there relevant restrictions on
$defs/$ref,maxItems, or generation settings in this combination? - Which diagnostic identifiers/events should I retain, and is there a private channel where staff can inspect interaction IDs and sanitized receipts? I have intentionally excluded identifiers and media from this public post.
- Can failed interactions be billed when no usage metadata is returned, and how can those charges be reconciled?
I can provide further sanitized prompt/schema details. I am looking for a way to diagnose the underlying failure rather than repeatedly resubmitting paid requests.