Inspect allowed passthrough parameters and send provider-specific video controls safely
Use this guide when you need to add video model controls that aren’t part of OpenRouter’s normalized video schema.By the end, your implementation should inspect a model’s allowed passthrough parameters and send one through provider.options.
An OpenRouter API key available as OPENROUTER_API_KEY only when you submit the video job
A target video model for the provider-specific options you want to send
If you aren’t already targeting a specific provider model, read Choose a Video Generation Model first. It helps you pick one based on clip duration, output shape, input type, audio, provider controls, and cost.
Use the API reference pages as the source of truth for exact fields:
Start by reading allowed_passthrough_parameters from the selected model. This keeps provider-specific controls behind a model metadata check instead of hard-coding unsupported request keys.Example metadata check:
const response = await fetch("https://openrouter.ai/api/v1/videos/models");if (!response.ok) { throw new Error(await response.text());}const { data } = await response.json();const models = data;const veo = models.find( (model) => model.id === "google/veo-3.1-lite",);if (!veo) { throw new Error("google/veo-3.1-lite was not found in the video model list.");}console.log(veo.allowed_passthrough_parameters);
For example, google/veo-3.1-lite may expose passthrough controls such as negativePrompt, enhancePrompt, personGeneration, or conditioningScale. OpenRouter lists supported parameter names; check the provider docs for valid values when a parameter has an enum.Before submitting a paid job, assert that every passthrough key you plan to send is allowed for the selected model:
Provider options are keyed by provider slug. Only the options for the matched provider are forwarded. For the Google Vertex video endpoint, use the google-vertex provider slug.Google Veo models are the only video models that nest options in a parameters object. Other video models, including other Google video models, take their allowed passthrough keys directly under the slug of the provider the request is routed to. A parameters object sent to them is not forwarded, and Runway video upscale rejects any provider options. For example, Seedance 2.0 is served by the Seed provider, so it takes watermark directly under the seed slug:
The metadata assertion should pass before you submit a job. If you submit the request, it should return a video job. If the provider option is invalid for the selected model, remove it or re-check the current allowed_passthrough_parameters list. To verify the final output, poll the returned polling_url until completed, then download the MP4.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.