Stream generated content (Gemini streamGenerateContent format)
The streamed form of generateContent. Send ?alt=sse, as the Google GenAI
SDKs and gemini-cli do. Meadow refuses the stream without it. The response is
text/event-stream with one data: line per GenerateContentResponse chunk,
as the vendor sent it. Token counts in usageMetadata add up over the stream,
so the last chunk holds the final ones. Auth, model ids, limits and errors are
as on generateContent. /v1/models/{model}:streamGenerateContent is served
too.
Scope: models.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Path parameters
A Meadow model id, for example gemini-3.8-flash.
Query parameters
Must be sse.
Request
A Google GenerateContentRequest, passed to the vendor unchanged. At most 16 MiB.
Response headers
The provider that answered, for example anthropic. Present on a 200 and on a vendor error that was passed through.
Why this vendor answered, in stable codes only. direct: <vendor> when the
first vendor in the route served the call. fallback: <vendor> <reason> -> <vendor> when an earlier vendor failed, with the same reason codes as
attempts[].reason in an error body. failed: ... on a vendor error passed
through. It never carries vendor error text.
Meadow’s id for this request, req_ and 24 hex characters. Every response
carries it, including errors, streams and unknown routes. Every error in the
Error schema repeats it as request_id. Quote it when you report a problem.
The request id of the vendor that answered, taken from its x-request-id,
request-id, x-amzn-requestid, apim-request-id or x-generation-id header,
the first one present in that order. Use it with that vendor’s support.
Vendors tried before a fallback are not listed. Absent when the vendor sent
none.