From d941b4fd99d4e46d9b989cc9923d280185b25741 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 16 Nov 2026 15:33:40 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.video_generation.generate()`: `request.aspect_ratio` **Changed** * `open_router.video_generation.list_videos_models()`: `response.data[]` **Changed** --- .speakeasy/gen.lock | 56 ++++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 20 ++++++- .speakeasy/workflow.lock | 10 ++-- RELEASES.md | 12 +++- docs/components/supportedaspectratio.mdx | 2 + docs/components/supportedsize.mdx | 14 +++++ docs/components/videogenerationrequest.mdx | 2 +- .../videogenerationrequestaspectratio.mdx | 2 + docs/sdks/videogeneration/README.mdx | 2 +- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- .../components/videogenerationrequest.py | 6 +- src/openrouter/components/videomodel.py | 16 ++++++ src/openrouter/video_generation.py | 4 +- uv.lock | 2 +- 16 files changed, 112 insertions(+), 44 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 296f0107a..ffda4276e 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: ae2908ff910a2684ada59e9c07ed8284 + docChecksum: 2bbc83374f2d66f64b1d96b5d61876df docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.180 - configChecksum: 73e9959ad4ed5bc6df16805c7600c19e + releaseVersion: 1.3.181 + configChecksum: 80a933d10a8dba8067fcef3845483e09 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: c7e7d4d0-d5d6-4248-b50b-b1f91e5fbaa5 - pristine_commit_hash: fbb05217a15ac4a32108caceb7383bd028793476 - pristine_tree_hash: 228104fb0ba6a4aa493bf2489006ed438872c217 + generation_id: c7a792f5-261f-4da3-a5b1-f7c99b780d8a + pristine_commit_hash: 2eec7461373428cc4d40dfd2b59e5e9d1398cded + pristine_tree_hash: 1af1a4dd6d09e89882a19bb8d33becb3625c728a features: python: acceptHeaders: 3.0.0 @@ -8396,8 +8396,8 @@ trackedFiles: pristine_git_object: 490f1a6e0c1fd695f19cf52bd9bb72904851b305 docs/components/supportedaspectratio.mdx: id: 236a2016da06 - last_write_checksum: sha1:638d1fbeb7e634fd924c4c1c92a0cc69f5291635 - pristine_git_object: ae925e49dfa250f27a1376567ed705c123aef3a0 + last_write_checksum: sha1:71971366e72a5c20399a2af9b42dd0ddf13f4e47 + pristine_git_object: ae9e28e5fa6706b339ae0367d5af62df2a00bdfc docs/components/supportedframeimage.mdx: id: f34dfb27d78f last_write_checksum: sha1:a979de72a67038af692d17cdb379b1d58e7ad0c8 @@ -8408,8 +8408,8 @@ trackedFiles: pristine_git_object: 041306c0760698f92cee3ecd9ccca780fa15db5a docs/components/supportedsize.mdx: id: c38f709222bb - last_write_checksum: sha1:3bccbb66ed2ee78aadf62b52742b778d1992bb47 - pristine_git_object: 67eedf482f85d64c7567d8838c43c4175bdec7f8 + last_write_checksum: sha1:7b06fcac3bfb185e50f13a038ed10a058d4d20e8 + pristine_git_object: 86454a05ccaca2796eab68eb841d01d2369f5f0a docs/components/switchyardrouterplugin.mdx: id: 86509511f517 last_write_checksum: sha1:f6dcc06763b81db15d84a687eb905cc27dff5754 @@ -9184,12 +9184,12 @@ trackedFiles: pristine_git_object: 47158d146ef4e92c5f47cb737170922102bfec11 docs/components/videogenerationrequest.mdx: id: b92ddbd15ee4 - last_write_checksum: sha1:528aed7ffeb57aff61f6c63151402e32e58dbdeb - pristine_git_object: 993827a2d201db03b116b3e68acaa6b207fa0a0d + last_write_checksum: sha1:85a09840fa642226a353ca8a164208ab3ca55972 + pristine_git_object: bbe542e9341a34a88378f1fdb541e47da0ce4c9a docs/components/videogenerationrequestaspectratio.mdx: id: c14859c0d8c3 - last_write_checksum: sha1:6bbcc801080774c36e090c4746e5fd957409357f - pristine_git_object: 0d230cee6404c6b7fc4044e308db451f07140a6b + last_write_checksum: sha1:27537e5df9281880ba0ac6cc84d75166ea0f6915 + pristine_git_object: 0a5068eae12f3001eb53ba42d98bcb72e09ff0a7 docs/components/videogenerationrequestdatacollection.mdx: id: 88138d33e5b8 last_write_checksum: sha1:2fbb361d129b7b9a567ca0f9c4066e8faf0ca303 @@ -11668,8 +11668,8 @@ trackedFiles: pristine_git_object: 63da02745c8b365676c3a049a527dc6964b1480b docs/sdks/videogeneration/README.mdx: id: 9a8fa04c3872 - last_write_checksum: sha1:fe112e73ee5579131f191801b2e3be900a534f70 - pristine_git_object: 4667dbd130618ccdfacb1e18be1aeff71d1eb53a + last_write_checksum: sha1:67bff94475ef74a38641026a9961c043ce0f37cd + pristine_git_object: 94f9c0c08b2942b9a2e809a82bb435995e94e74e docs/sdks/workspaces/README.mdx: id: 0c75d023ef6b last_write_checksum: sha1:9d42934e7e99f371d3f0bbff2d2af8c4b9061b50 @@ -11680,8 +11680,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:d4f75b1116bc2a3e45c92f58f5fa2483d2d7973a - pristine_git_object: c3f61726b2b72747f0600e8c647492c14eabd9c8 + last_write_checksum: sha1:7427ffc8ffe039541ef5a0bf0cb15bf315e072dc + pristine_git_object: 6ce71bfafad02f38221db45b606085923b010389 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11708,8 +11708,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:39f2dc370de09b988b03fc872465f74d215a1cd5 - pristine_git_object: 452307d486e045fab5552dd4032121a09e9eaa90 + last_write_checksum: sha1:2918aa21adc139d698e22f34f573bb9fcad7e56d + pristine_git_object: 4b8ffa897c22aeb12e97c3c3073e3a63bb9462f9 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -15476,8 +15476,8 @@ trackedFiles: pristine_git_object: c2f15eb53f14024dfd1e620c52a564bf4682854f src/openrouter/components/videogenerationrequest.py: id: 70e3c9ff288c - last_write_checksum: sha1:8984d93bf203c5664835f8f5fff6482274d322a9 - pristine_git_object: 51a2ed1a52f1665341ad249cebd82750117d3068 + last_write_checksum: sha1:0d3ddbffff889ab16e939475a411d6c87f6a067d + pristine_git_object: f66f14a193c93748930655556df27b70f05eabbd src/openrouter/components/videogenerationresponse.py: id: 541f1321b072 last_write_checksum: sha1:6ba68c4551af144f37be940f0222f434d156e275 @@ -15488,8 +15488,8 @@ trackedFiles: pristine_git_object: c6f80ef4af6effc740beb6e0f1abfee653340717 src/openrouter/components/videomodel.py: id: a544a49f7891 - last_write_checksum: sha1:f813253b5c9869c766907455ff1957b986c93912 - pristine_git_object: b754781cf95b395e2d1da5759c1b9dfcec61b104 + last_write_checksum: sha1:7872674874263f52d5c7da6e1580285090dadbf6 + pristine_git_object: e5a05fbd250d7a377a6c773ff8a563e2ad94320d src/openrouter/components/videomodelslistresponse.py: id: 2e9d1ce2cf19 last_write_checksum: sha1:b94977aa6941f7cf15c889f1b7cc69b50cd35856 @@ -16620,8 +16620,8 @@ trackedFiles: pristine_git_object: 301f5a486f27e1dcfcb4c9029b47d6df7b683d95 src/openrouter/video_generation.py: id: d0a90c1b8efe - last_write_checksum: sha1:8380e17b197d8113b30ca61dcc3eeb29ccc31437 - pristine_git_object: 7c7a30072878bd64beba45df6e5ac35ed19fada0 + last_write_checksum: sha1:fefdd8724bd8804d41c999364418e98e6b97282a + pristine_git_object: ad510dfd4cbcb4544239161053d0c5fe4a824b71 src/openrouter/workspaces.py: id: cd6c533b1802 last_write_checksum: sha1:8f0231785c533c9076eb9520bb7574620d18136c @@ -21719,3 +21719,7 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: | + ## Python SDK Changes: + * `open_router.video_generation.generate()`: `request.aspect_ratio` **Changed** + * `open_router.video_generation.list_videos_models()`: `response.data[]` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f2ad8cf01..bfadb0f2a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.180 + version: 1.3.181 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 3f884a26d..1b680eb78 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -38523,6 +38523,8 @@ components: - '2:3' - '21:9' - '9:21' + - '2:1' + - '5:2' example: '16:9' type: 'string' x-speakeasy-unknown-values: allow @@ -38546,7 +38548,7 @@ components: $ref: '#/components/schemas/FrameImage' type: 'array' generate_audio: - description: 'Whether to generate audio alongside the video. Defaults to the endpoint''s generate_audio capability flag, false if not set.' + description: 'Whether to generate audio alongside the video. Defaults to the endpoint''s generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false.' example: true type: 'boolean' input_references: @@ -38828,6 +38830,8 @@ components: - '2:3' - '21:9' - '9:21' + - '2:1' + - '5:2' type: 'string' x-speakeasy-unknown-values: allow type: @@ -38889,6 +38893,7 @@ components: - '640x360' - '640x480' - '640x640' + - '720x360' - '720x480' - '720x720' - '720x960' @@ -38905,6 +38910,8 @@ components: - '840x360' - '854x480' - '864x496' + - '960x480' + - '900x360' - '960x720' - '960x960' - '992x432' @@ -38918,8 +38925,10 @@ components: - '1112x834' - '1120x480' - '1152x768' + - '1200x480' - '1280x720' - '1366x768' + - '1440x720' - '1440x1080' - '1440x1440' - '1440x1920' @@ -38927,11 +38936,15 @@ components: - '1440x2560' - '1440x3360' - '1470x630' + - '1536x768' - '1620x1080' - '1680x720' - '1792x768' + - '1800x720' + - '1920x768' - '1920x1080' - '1920x1440' + - '2160x1080' - '2160x1440' - '2160x2160' - '2160x2880' @@ -38940,11 +38953,16 @@ components: - '2160x5040' - '2520x1080' - '2560x1440' + - '2880x1440' + - '2700x1080' - '2880x2160' - '3240x2160' - '3360x1440' + - '3600x1440' - '3840x2160' + - '4320x2160' - '5040x2160' + - '5400x2160' type: 'string' x-speakeasy-unknown-values: allow type: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8806c719d..766c7e3a5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:7552552148ef3bf6ed96b15b6dceae7cee753926acf81a3d773b61905bf4820e - sourceBlobDigest: sha256:7117c7df2d3ed8039afee18312cc151fdbdea80e09cdc5f0a31bbb5f4e704862 + sourceRevisionDigest: sha256:cbe0a9ae33d874147e00ab18c10196c6ca7d882f31c81e8293def439d55f3463 + sourceBlobDigest: sha256:f834219afd1e212f20e4dcfe3cbb4fdef5a8369f7fe54d99e5fdad4b813778d3 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:7552552148ef3bf6ed96b15b6dceae7cee753926acf81a3d773b61905bf4820e - sourceBlobDigest: sha256:7117c7df2d3ed8039afee18312cc151fdbdea80e09cdc5f0a31bbb5f4e704862 + sourceRevisionDigest: sha256:cbe0a9ae33d874147e00ab18c10196c6ca7d882f31c81e8293def439d55f3463 + sourceBlobDigest: sha256:f834219afd1e212f20e4dcfe3cbb4fdef5a8369f7fe54d99e5fdad4b813778d3 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:2ff369285173d3f7787e380de21bafa32ce90387a78b43b3c32257ae1f190890 + codeSamplesRevisionDigest: sha256:1ec08135c25b73c0bf50778ec1037d48ed81d855c6679564151e11d0f19d1a7e workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 8fa70d8af..2becc55fa 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4569,4 +4569,14 @@ Based on: ### Generated - [python v1.3.180] . ### Releases -- [PyPI v1.3.180] https://pypi.org/project/openrouter/1.3.180 - . \ No newline at end of file +- [PyPI v1.3.180] https://pypi.org/project/openrouter/1.3.180 - . + +## 2026-11-16 15:30:22 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.181] . +### Releases +- [PyPI v1.3.181] https://pypi.org/project/openrouter/1.3.181 - . \ No newline at end of file diff --git a/docs/components/supportedaspectratio.mdx b/docs/components/supportedaspectratio.mdx index ae925e49d..ae9e28e5f 100644 --- a/docs/components/supportedaspectratio.mdx +++ b/docs/components/supportedaspectratio.mdx @@ -25,3 +25,5 @@ This is an open enum. Unrecognized values will not fail type checks. - `"2:3"` - `"21:9"` - `"9:21"` +- `"2:1"` +- `"5:2"` diff --git a/docs/components/supportedsize.mdx b/docs/components/supportedsize.mdx index 67eedf482..86454a05c 100644 --- a/docs/components/supportedsize.mdx +++ b/docs/components/supportedsize.mdx @@ -33,6 +33,7 @@ This is an open enum. Unrecognized values will not fail type checks. - `"640x360"` - `"640x480"` - `"640x640"` +- `"720x360"` - `"720x480"` - `"720x720"` - `"720x960"` @@ -49,6 +50,8 @@ This is an open enum. Unrecognized values will not fail type checks. - `"840x360"` - `"854x480"` - `"864x496"` +- `"960x480"` +- `"900x360"` - `"960x720"` - `"960x960"` - `"992x432"` @@ -62,8 +65,10 @@ This is an open enum. Unrecognized values will not fail type checks. - `"1112x834"` - `"1120x480"` - `"1152x768"` +- `"1200x480"` - `"1280x720"` - `"1366x768"` +- `"1440x720"` - `"1440x1080"` - `"1440x1440"` - `"1440x1920"` @@ -71,11 +76,15 @@ This is an open enum. Unrecognized values will not fail type checks. - `"1440x2560"` - `"1440x3360"` - `"1470x630"` +- `"1536x768"` - `"1620x1080"` - `"1680x720"` - `"1792x768"` +- `"1800x720"` +- `"1920x768"` - `"1920x1080"` - `"1920x1440"` +- `"2160x1080"` - `"2160x1440"` - `"2160x2160"` - `"2160x2880"` @@ -84,8 +93,13 @@ This is an open enum. Unrecognized values will not fail type checks. - `"2160x5040"` - `"2520x1080"` - `"2560x1440"` +- `"2880x1440"` +- `"2700x1080"` - `"2880x2160"` - `"3240x2160"` - `"3360x1440"` +- `"3600x1440"` - `"3840x2160"` +- `"4320x2160"` - `"5040x2160"` +- `"5400x2160"` diff --git a/docs/components/videogenerationrequest.mdx b/docs/components/videogenerationrequest.mdx index 993827a2d..bbe542e93 100644 --- a/docs/components/videogenerationrequest.mdx +++ b/docs/components/videogenerationrequest.mdx @@ -11,7 +11,7 @@ title: "VideoGenerationRequest" | `creativity` | *Optional[int]* | ➖ | Creativity level for video upscaling models only. This parameter is not supported by video generation models. | 1 | | `duration` | *Optional[int]* | ➖ | Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations. | 8 | | `frame_images` | List[[components.FrameImage](../components/frameimage.mdx)] | ➖ | Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. | | -| `generate_audio` | *Optional[bool]* | ➖ | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. | true | +| `generate_audio` | *Optional[bool]* | ➖ | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false. | true | | `input_references` | List[[components.InputReference](../components/inputreference.mdx)] | ➖ | Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. | | | `model` | *str* | ✔️ | N/A | | | `previous_job_id` | *Optional[str]* | ➖ | ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. | gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 | diff --git a/docs/components/videogenerationrequestaspectratio.mdx b/docs/components/videogenerationrequestaspectratio.mdx index 0d230cee6..0a5068eae 100644 --- a/docs/components/videogenerationrequestaspectratio.mdx +++ b/docs/components/videogenerationrequestaspectratio.mdx @@ -27,3 +27,5 @@ This is an open enum. Unrecognized values will not fail type checks. - `"2:3"` - `"21:9"` - `"9:21"` +- `"2:1"` +- `"5:2"` diff --git a/docs/sdks/videogeneration/README.mdx b/docs/sdks/videogeneration/README.mdx index 4667dbd13..94f9c0c08 100644 --- a/docs/sdks/videogeneration/README.mdx +++ b/docs/sdks/videogeneration/README.mdx @@ -52,7 +52,7 @@ with OpenRouter( | `creativity` | *Optional[int]* | ➖ | Creativity level for video upscaling models only. This parameter is not supported by video generation models. | 1 | | `duration` | *Optional[int]* | ➖ | Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations. | 8 | | `frame_images` | List[[components.FrameImage](../../components/frameimage.mdx)] | ➖ | Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. | | -| `generate_audio` | *Optional[bool]* | ➖ | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. | true | +| `generate_audio` | *Optional[bool]* | ➖ | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false. | true | | `input_references` | List[[components.InputReference](../../components/inputreference.mdx)] | ➖ | Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. | | | `previous_job_id` | *Optional[str]* | ➖ | ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. | gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 | | `prompt` | *Optional[str]* | ➖ | Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. | A serene mountain landscape at sunset | diff --git a/pyproject.toml b/pyproject.toml index c3f61726b..6ce71bfaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.180" +version = "1.3.181" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 452307d48..4b8ffa897 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.180" +__version__: str = "1.3.181" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.180 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.181 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/videogenerationrequest.py b/src/openrouter/components/videogenerationrequest.py index 51a2ed1a5..f66f14a19 100644 --- a/src/openrouter/components/videogenerationrequest.py +++ b/src/openrouter/components/videogenerationrequest.py @@ -30,6 +30,8 @@ "2:3", "21:9", "9:21", + "2:1", + "5:2", ], UnrecognizedStr, ] @@ -893,7 +895,7 @@ class VideoGenerationRequestTypedDict(TypedDict): frame_images: NotRequired[List[FrameImageTypedDict]] r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.""" generate_audio: NotRequired[bool] - r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.""" + r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false.""" input_references: NotRequired[List[InputReferenceTypedDict]] r"""Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest.""" previous_job_id: NotRequired[str] @@ -937,7 +939,7 @@ class VideoGenerationRequest(BaseModel): r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.""" generate_audio: Optional[bool] = None - r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.""" + r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false.""" input_references: Optional[List[InputReference]] = None r"""Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest.""" diff --git a/src/openrouter/components/videomodel.py b/src/openrouter/components/videomodel.py index b754781cf..e5a05fbd2 100644 --- a/src/openrouter/components/videomodel.py +++ b/src/openrouter/components/videomodel.py @@ -25,6 +25,8 @@ "2:3", "21:9", "9:21", + "2:1", + "5:2", ], UnrecognizedStr, ] @@ -73,6 +75,7 @@ "640x360", "640x480", "640x640", + "720x360", "720x480", "720x720", "720x960", @@ -89,6 +92,8 @@ "840x360", "854x480", "864x496", + "960x480", + "900x360", "960x720", "960x960", "992x432", @@ -102,8 +107,10 @@ "1112x834", "1120x480", "1152x768", + "1200x480", "1280x720", "1366x768", + "1440x720", "1440x1080", "1440x1440", "1440x1920", @@ -111,11 +118,15 @@ "1440x2560", "1440x3360", "1470x630", + "1536x768", "1620x1080", "1680x720", "1792x768", + "1800x720", + "1920x768", "1920x1080", "1920x1440", + "2160x1080", "2160x1440", "2160x2160", "2160x2880", @@ -124,11 +135,16 @@ "2160x5040", "2520x1080", "2560x1440", + "2880x1440", + "2700x1080", "2880x2160", "3240x2160", "3360x1440", + "3600x1440", "3840x2160", + "4320x2160", "5040x2160", + "5400x2160", ], UnrecognizedStr, ] diff --git a/src/openrouter/video_generation.py b/src/openrouter/video_generation.py index 7c7a30072..ad510dfd4 100644 --- a/src/openrouter/video_generation.py +++ b/src/openrouter/video_generation.py @@ -76,7 +76,7 @@ def generate( :param creativity: Creativity level for video upscaling models only. This parameter is not supported by video generation models. :param duration: Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations. :param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. - :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false. :param input_references: Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. :param previous_job_id: ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. :param prompt: Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. @@ -322,7 +322,7 @@ async def generate_async( :param creativity: Creativity level for video upscaling models only. This parameter is not supported by video generation models. :param duration: Duration of the generated video in seconds, or -1 to let the provider choose the length (e.g. following an input video). -1 is only accepted by models that list it in supported_durations. :param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. - :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. When neither is set, some providers (such as xAI) apply their own default and generate audio, so send false to request a silent video. Some models always include audio and ignore false. :param input_references: Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. :param previous_job_id: ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. :param prompt: Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. diff --git a/uv.lock b/uv.lock index 45d25ca52..478e362d1 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.180" +version = "1.3.181" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 1fbf7c0c35f1d021c383d4cd12148077c691b88b Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 15:33:49 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow