One model, multiple client APIs
Section titled “One model, multiple client APIs”When an administrator enables protocol bridging for a Gemini model, its public ID, permissions, prices and quota remain the same across Gemini native, Chat Completions and Responses. The gateway selects a compatible upstream and returns the format used by your client. Models without this setting retain their existing protocol behavior.
Check the authenticated /v1/models and /v1beta/models catalogs. Use your platform origin and platform key; do not send that key to OpenRouter. Bridging does not imply support for every provider-specific parameter.
Video request shapes
Section titled “Video request shapes”Replace the model and file URL with values available to your account. The URL must return an actual video file, including when it is a signed URL.
Gemini: POST /v1beta/models/gemini-4-argon:generateContent, with x-goog-api-key: API_KEY:
{"contents":[{"role":"user","parts":[ {"text":"Describe the entire video, its scene changes and its audio, with timestamps."}, {"fileData":{"mimeType":"video/mp4","fileUri":"https://files.example.com/clip.mp4"}}]}],"generationConfig":{"maxOutputTokens":4096,"thinkingConfig":{"thinkingLevel":"LOW","includeThoughts":true}}}Chat: POST /v1/chat/completions, with Authorization: Bearer API_KEY:
{"model":"gemini-4-argon","messages":[{"role":"user","content":[ {"type":"text","text":"Describe the entire video, its scene changes and its audio, with timestamps."}, {"type":"video_url","video_url":{"url":"https://files.example.com/clip.mp4"}}]}],"max_tokens":4096,"reasoning_effort":"low"}Responses: POST /v1/responses, with Authorization: Bearer API_KEY:
{"model":"gemini-4-argon","input":[{"role":"user","content":[ {"type":"input_text","text":"Describe the entire video, its scene changes and its audio, with timestamps."}, {"type":"input_video","video_url":"https://files.example.com/clip.mp4"}]}],"max_output_tokens":4096,"reasoning":{"effort":"low"},"store":false}Chat and Responses video fields are compatible API extensions; your SDK must preserve them. For local bytes, use Gemini inlineData with mimeType and raw base64 data, or a data:video/mp4;base64,... URL in Chat/Responses.
Video URLs are limited to 15 MB (15,000,000 source bytes); oversized downloads return 413 before forwarding. Inline base64 may exceed 15 MB and is checked against the complete encoded JSON request budget, which defaults to 100 MiB. Deployment settings or upstream providers may impose lower limits. Base64 adds roughly one third to the source size, so the request budget is not a source-file allowance.
An OpenRouter connection restricted to Google Vertex downloads direct URLs safely and sends base64 upstream. The gateway preserves the original file, including its audio and duration. It does not recompress, trim or substitute extracted frames. Two-minute 1080p clips are covered by transfer-integrity tests; the selected input method and actual upstream limits still apply. Signed URLs must remain valid during download and must not be logged.
For supported thought summaries, set generationConfig.thinkingConfig.includeThoughts: true in a Gemini request and read text parts marked thought: true. These are provider-supplied summaries. Some requests return no summary even when reasoning tokens were consumed.
Streaming and follow-up turns
Section titled “Streaming and follow-up turns”For Gemini use :streamGenerateContent?alt=sse. For Chat/Responses set stream: true. Parse the selected protocol’s stream events and terminal state.
For a follow-up, append the full Gemini candidates[0].content, the full Chat choices[0].message, or all Responses output items to the previous conversation, followed by the next user turn. Preserve thoughtSignature, reasoning_details and reasoning.encrypted_content; copying only visible text loses required context. Tool outputs must keep their original call IDs. Bridged Responses uses full history rather than previous_response_id.
Long outputs may carry continuation state. Gemini returns a candidate continuationToken, which goes at the top level of the original request when resuming. Chat/Responses retain the stopped assistant turn or output items. Preserve the original input and parameters, changing only the output token limit when needed. Each continuation is a separate billed request; the gateway never runs an additional hop automatically. Bridged streams return complete opaque context at normal completion, so interrupted streams must not be assumed resumable.
Unsupported fields and incompatible upstream state return explicit errors. Provider restrictions are not relaxed during recovery. After a timeout or interrupted stream, inspect the original request and usage using x-gateway-request-id before submitting another generation.