diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index dfc564e5..61052343 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: 178b6484b9116efe8e2d2fb1e571d038
+ docChecksum: 91e908690b8f8aed56fe8958819828bb
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 0.11.44
- configChecksum: ca6d256e81bc9b0bcbf4a9852a8ee6fd
+ releaseVersion: 0.11.45
+ configChecksum: 21753c0493fa0511e9821d6eef189ca9
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: cb7fe95e-b30b-4e7c-9a6e-197bf5b852a5
- pristine_commit_hash: a1d9ea833931b9fbaf638eb9e2773585163d23ee
- pristine_tree_hash: 2c2952dd80f418431c91969ceb539c0b24e05d6f
+ generation_id: 05e56519-782e-497e-ab09-0c2e70be5aab
+ pristine_commit_hash: 14147e4a39d56955286061b42c96c33d92551836
+ pristine_tree_hash: 92cbfb37e47ab6ac36020384ed1f7fe9c621408a
features:
python:
acceptHeaders: 3.0.0
@@ -5094,8 +5094,8 @@ trackedFiles:
pristine_git_object: 7dedd74d072b742dc84e8afafa3e2ae47dbded10
docs/components/videogenerationrequest.mdx:
id: b92ddbd15ee4
- last_write_checksum: sha1:743e7c0116c988679d5d332d30e61835350b7cda
- pristine_git_object: c624ac69002c061575e6bae9f4a1616a9be4058a
+ last_write_checksum: sha1:96b4db38777e38ef7b193ad301df2381030a4716
+ pristine_git_object: e055725b9d9d9288b11e3acea73a59cc4d6555e4
docs/components/videogenerationrequestaspectratio.mdx:
id: c14859c0d8c3
last_write_checksum: sha1:4ad4aae702af1cd2ddee7b443c35c9b3df6824e8
@@ -6682,8 +6682,8 @@ trackedFiles:
pristine_git_object: f02ae88383dec340e4cd0f20d82363155bc08852
docs/sdks/videogeneration/README.mdx:
id: 9a8fa04c3872
- last_write_checksum: sha1:7d3c54cf2daa98e25df18bc27cc4ca30b2b1f03f
- pristine_git_object: 429ca7dad6a66516aec6bb1e674af1e09dc42dd5
+ last_write_checksum: sha1:9309c04448f4c1b19add066a36d53ddb0223b49e
+ pristine_git_object: f277730478c66312d0e4bbb21fae715a9fcf14b9
docs/sdks/workspaces/README.mdx:
id: 0c75d023ef6b
last_write_checksum: sha1:8b975e8f6d2bcf234b67c5a40dddffdb0cb2181a
@@ -6694,8 +6694,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:8f308c768d57d16801bfe842805796a35082e090
- pristine_git_object: 4dd89d3a936829f278fe3d6964a579b0621000b9
+ last_write_checksum: sha1:c5e07710df15c129db4d179c1841232169734dcc
+ pristine_git_object: 9d5196aeab4b550008f890e898aa4f50303737fe
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6722,8 +6722,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:1ff83aa8ae9205e5fef8b0e380cf79a35801f075
- pristine_git_object: 60ed9d8d7e57659294cf9952dab9f6a1d40a8c93
+ last_write_checksum: sha1:fe7b0460afe05dbf4ab558bfbfd33690d6ebfadc
+ pristine_git_object: eb99087b0cf66773613cda4298e3b5061540ab60
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
@@ -8902,8 +8902,8 @@ trackedFiles:
pristine_git_object: a0491cc8fd3bd9986146cb1176e27d5b9c9beb60
src/openrouter/components/videogenerationrequest.py:
id: 70e3c9ff288c
- last_write_checksum: sha1:8979fd8715a39f322e076cc44b627a47b34c154e
- pristine_git_object: eb6c9c01f5648311009df517d3c63c577177dad6
+ last_write_checksum: sha1:afaf286cb4619b632491d9a967dfd689fa4e2246
+ pristine_git_object: d591be43909b47a2fca66ec75457bd162c80173b
src/openrouter/components/videogenerationresponse.py:
id: 541f1321b072
last_write_checksum: sha1:18c3aa7845f63a9614286b1a27b6098eae1c4951
@@ -9638,8 +9638,8 @@ trackedFiles:
pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3
src/openrouter/video_generation.py:
id: d0a90c1b8efe
- last_write_checksum: sha1:5d725868d1a14ca3d64562f0da54e9b130ff7560
- pristine_git_object: 4a82cde858211c0f5a01b08980cee0e9e3d0f52c
+ last_write_checksum: sha1:d8635ef1411aa33a49e643171e11c2fe85dc700b
+ pristine_git_object: 6460765cd23146b66e8b3b85bafd83ccf18d21c6
src/openrouter/workspaces.py:
id: cd6c533b1802
last_write_checksum: sha1:215f0214a25a10fc1cccec280ea439bbc89496da
@@ -10270,7 +10270,7 @@ examples:
createVideos:
speakeasy-default-create-videos:
requestBody:
- application/json: {"model": "google/veo-3.1", "prompt": "A serene mountain landscape at sunset"}
+ application/json: {"model": "google/veo-3.1"}
responses:
"202":
application/json: {"id": "job-abc123", "polling_url": "/api/v1/videos/job-abc123", "status": "pending"}
@@ -11189,4 +11189,6 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
-releaseNotes: "## Python SDK Changes:\n* `open_router.guardrails.list()`: `response.data[].content_filters[].action.enum(flag)` **Added**\n* `open_router.guardrails.create()`: \n * `request.content_filters[].action.enum(flag)` **Added**\n * `response.data.content_filters[].action.enum(flag)` **Added**\n* `open_router.guardrails.get()`: `response.data.content_filters[].action.enum(flag)` **Added**\n* `open_router.guardrails.update()`: \n * `request.content_filters[].action.enum(flag)` **Added**\n * `response.data.content_filters[].action.enum(flag)` **Added**\n"
+releaseNotes: |
+ ## Python SDK Changes:
+ * `open_router.video_generation.generate()`: `request.prompt` **Changed**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 61cd1a1d..efb4c906 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 0.11.44
+ version: 0.11.45
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index cb20d1fc..05a6dfe4 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -23273,6 +23273,8 @@ components:
model:
type: 'string'
prompt:
+ description: 'Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models.'
+ example: 'A serene mountain landscape at sunset'
type: 'string'
provider:
description: 'Provider-specific passthrough configuration'
@@ -23305,7 +23307,6 @@ components:
example: '1280x720'
type: 'string'
required:
- - 'prompt'
- 'model'
type: 'object'
VideoGenerationResponse:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 4f4bb389..f4ca7e6c 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:d2dfc095c4f3dfd7b0004a11dde8372d5f137cffa8ebd3fe019f14c08b2a6880
- sourceBlobDigest: sha256:43e46fc77ef28504e55ffb04ac6a711f13931339b4c208ae9bb82080fe176c3b
+ sourceRevisionDigest: sha256:509a730279d515fc063a000a0a6f438108f33b68aeca59e85a812339eda41ae0
+ sourceBlobDigest: sha256:37562566bf8a0ff2f3a5672ec329f5b5ef9fed3bdbffaac4277d94970b654c45
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:d2dfc095c4f3dfd7b0004a11dde8372d5f137cffa8ebd3fe019f14c08b2a6880
- sourceBlobDigest: sha256:43e46fc77ef28504e55ffb04ac6a711f13931339b4c208ae9bb82080fe176c3b
+ sourceRevisionDigest: sha256:509a730279d515fc063a000a0a6f438108f33b68aeca59e85a812339eda41ae0
+ sourceBlobDigest: sha256:37562566bf8a0ff2f3a5672ec329f5b5ef9fed3bdbffaac4277d94970b654c45
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:9f3dffc725d7495d12b4e88e3876780fe261ca17c9903d8e3e441010fb2d7fce
+ codeSamplesRevisionDigest: sha256:1f3411b1f15168d672929b4ed91d5a30118268d5b334cf84e52c304a9bfe5f12
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 1d8d3c84..513b03da 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -548,4 +548,14 @@ Based on:
### Generated
- [python v0.11.44] .
### Releases
-- [PyPI v0.11.44] https://pypi.org/project/openrouter/0.11.44 - .
\ No newline at end of file
+- [PyPI v0.11.44] https://pypi.org/project/openrouter/0.11.44 - .
+
+## 2026-07-19 16:51:42
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.11.45] .
+### Releases
+- [PyPI v0.11.45] https://pypi.org/project/openrouter/0.11.45 - .
\ No newline at end of file
diff --git a/docs/components/videogenerationrequest.mdx b/docs/components/videogenerationrequest.mdx
index c624ac69..e055725b 100644
--- a/docs/components/videogenerationrequest.mdx
+++ b/docs/components/videogenerationrequest.mdx
@@ -13,7 +13,7 @@ title: "VideoGenerationRequest"
| `generate_audio` | *Optional[bool]* | :heavy_minus_sign: | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. | true |
| `input_references` | List[[components.InputReference](../components/inputreference.mdx)] | :heavy_minus_sign: | Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest. | |
| `model` | *str* | :heavy_check_mark: | N/A | |
-| `prompt` | *str* | :heavy_check_mark: | N/A | |
+| `prompt` | *Optional[str]* | :heavy_minus_sign: | 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 |
| `provider` | [Optional[components.VideoGenerationRequestProvider]](../components/videogenerationrequestprovider.mdx) | :heavy_minus_sign: | Provider-specific passthrough configuration | |
| `resolution` | [Optional[components.VideoGenerationRequestResolution]](../components/videogenerationrequestresolution.mdx) | :heavy_minus_sign: | Resolution of the generated video | 720p |
| `seed` | *Optional[int]* | :heavy_minus_sign: | If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. | |
diff --git a/docs/sdks/videogeneration/README.mdx b/docs/sdks/videogeneration/README.mdx
index 429ca7da..f2777304 100644
--- a/docs/sdks/videogeneration/README.mdx
+++ b/docs/sdks/videogeneration/README.mdx
@@ -32,7 +32,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.video_generation.generate(model="google/veo-3.1", prompt="A serene mountain landscape at sunset", aspect_ratio="16:9", duration=8, resolution="720p")
+ res = open_router.video_generation.generate(model="google/veo-3.1", aspect_ratio="16:9", duration=8, prompt="A serene mountain landscape at sunset", resolution="720p")
# Handle response
print(res)
@@ -44,7 +44,6 @@ with OpenRouter(
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model` | *str* | :heavy_check_mark: | N/A | |
-| `prompt` | *str* | :heavy_check_mark: | N/A | |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
@@ -54,6 +53,7 @@ with OpenRouter(
| `frame_images` | List[[components.FrameImage](../../components/frameimage.mdx)] | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. | true |
| `input_references` | List[[components.InputReference](../../components/inputreference.mdx)] | :heavy_minus_sign: | Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest. | |
+| `prompt` | *Optional[str]* | :heavy_minus_sign: | 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 |
| `provider` | [Optional[components.VideoGenerationRequestProvider]](../../components/videogenerationrequestprovider.mdx) | :heavy_minus_sign: | Provider-specific passthrough configuration | |
| `resolution` | [Optional[components.VideoGenerationRequestResolution]](../../components/videogenerationrequestresolution.mdx) | :heavy_minus_sign: | Resolution of the generated video | 720p |
| `seed` | *Optional[int]* | :heavy_minus_sign: | If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. | |
diff --git a/pyproject.toml b/pyproject.toml
index 4dd89d3a..9d5196ae 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "0.11.44"
+version = "0.11.45"
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 60ed9d8d..eb99087b 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "0.11.44"
+__version__: str = "0.11.45"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 0.11.44 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 0.11.45 2.914.0 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 eb6c9c01..d591be43 100644
--- a/src/openrouter/components/videogenerationrequest.py
+++ b/src/openrouter/components/videogenerationrequest.py
@@ -639,7 +639,6 @@ def serialize_model(self, handler):
class VideoGenerationRequestTypedDict(TypedDict):
model: str
- prompt: str
aspect_ratio: NotRequired[VideoGenerationRequestAspectRatio]
r"""Aspect ratio of the generated video"""
callback_url: NotRequired[str]
@@ -652,6 +651,8 @@ class VideoGenerationRequestTypedDict(TypedDict):
r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
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 (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest."""
+ prompt: NotRequired[str]
+ r"""Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models."""
provider: NotRequired[VideoGenerationRequestProviderTypedDict]
r"""Provider-specific passthrough configuration"""
resolution: NotRequired[VideoGenerationRequestResolution]
@@ -665,8 +666,6 @@ class VideoGenerationRequestTypedDict(TypedDict):
class VideoGenerationRequest(BaseModel):
model: str
- prompt: str
-
aspect_ratio: Optional[VideoGenerationRequestAspectRatio] = None
r"""Aspect ratio of the generated video"""
@@ -685,6 +684,9 @@ class VideoGenerationRequest(BaseModel):
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 (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest."""
+ prompt: Optional[str] = None
+ r"""Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models."""
+
provider: Optional[VideoGenerationRequestProvider] = None
r"""Provider-specific passthrough configuration"""
@@ -707,6 +709,7 @@ def serialize_model(self, handler):
"frame_images",
"generate_audio",
"input_references",
+ "prompt",
"provider",
"resolution",
"seed",
diff --git a/src/openrouter/video_generation.py b/src/openrouter/video_generation.py
index 4a82cde8..6460765c 100644
--- a/src/openrouter/video_generation.py
+++ b/src/openrouter/video_generation.py
@@ -17,7 +17,6 @@ def generate(
self,
*,
model: str,
- prompt: str,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
@@ -37,6 +36,7 @@ def generate(
Iterable[components.InputReferenceTypedDict],
]
] = None,
+ prompt: Optional[str] = None,
provider: Optional[
Union[
components.VideoGenerationRequestProvider,
@@ -56,7 +56,6 @@ def generate(
Submits a video generation request and returns a polling URL to check status
:param model:
- :param prompt:
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
@@ -70,6 +69,7 @@ def generate(
: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 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 (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
+ :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.
:param provider: Provider-specific passthrough configuration
:param resolution: Resolution of the generated video
:param seed: If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
@@ -223,7 +223,6 @@ async def generate_async(
self,
*,
model: str,
- prompt: str,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
@@ -243,6 +242,7 @@ async def generate_async(
Iterable[components.InputReferenceTypedDict],
]
] = None,
+ prompt: Optional[str] = None,
provider: Optional[
Union[
components.VideoGenerationRequestProvider,
@@ -262,7 +262,6 @@ async def generate_async(
Submits a video generation request and returns a polling URL to check status
:param model:
- :param prompt:
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
@@ -276,6 +275,7 @@ async def generate_async(
: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 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 (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
+ :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.
:param provider: Provider-specific passthrough configuration
:param resolution: Resolution of the generated video
:param seed: If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
diff --git a/uv.lock b/uv.lock
index 1ca52a3a..12cdd8e5 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "0.11.44"
+version = "0.11.45"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },