diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 688e5d4d..16dfa5d8 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: 2eccfa7a729ff2b0018b0a12fae4c6bc + docChecksum: e6fdcb3ac45fe92953a95a11e51d498d docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.51 - configChecksum: 42c786fcb3f642846ab5debebe68fb64 + releaseVersion: 1.3.52 + configChecksum: 74884b8c46d1c1bccc664502f76b7feb repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 06c77232-c97c-468e-a4a2-e78aaedbd796 - pristine_commit_hash: 74630426eda728d6ce5df2f27cfec65172ae1ceb - pristine_tree_hash: fbd0ccb9ecf77c3064549a1d835a0fcfe6dbe645 + generation_id: 9be81444-93da-47e2-975d-a50451e4ec19 + pristine_commit_hash: 203afc8e6d9084ed5debbc2ab28e9a68e22872b8 + pristine_tree_hash: 28e3e2f76f6ce62d7e2061b562575e4869558002 features: python: acceptHeaders: 3.0.0 @@ -7984,8 +7984,8 @@ trackedFiles: pristine_git_object: 050aab049bb847e511ea272a5d238d7e64e6f137 docs/components/videogenerationresponse.mdx: id: 3a932213188e - last_write_checksum: sha1:75a686f8206a46d3d9cee6cffff806e711e54bff - pristine_git_object: ac588d7de823b2b4aa9cd237e706016eb2d6b163 + last_write_checksum: sha1:b4b67c4bf037f28816e7cb0411ba1bd82b023f40 + pristine_git_object: 2651b65e02d7b0c3343ec5fa46decf5b66b0bd8a docs/components/videogenerationresponsestatus.mdx: id: 637442fde0ff last_write_checksum: sha1:9368ca45d569e511e5faf18118efd7e3341473a7 @@ -10288,8 +10288,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:6a1ae75d8efe03a70119b451c44288c8bf678175 - pristine_git_object: 874397dbfeb9f018fc6af88bb4f0f87ae67bc263 + last_write_checksum: sha1:ce61bf6deb895c0f82edbeba5f0dc2015a59a003 + pristine_git_object: ab3871be8dea74478699a90f5ded5fdaa69554c6 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -10316,8 +10316,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:cf60e78489d5b26972a3e812d16a23c0ba95821c - pristine_git_object: 77be04ec9f7f57f2e31297c26b772632914806d2 + last_write_checksum: sha1:d376193f244b0e24a62bf670ba4c5630bd971633 + pristine_git_object: 5a3f314c5d3d9341836be35996a9515593380437 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a @@ -13704,8 +13704,8 @@ trackedFiles: pristine_git_object: f2e96fc6eeca4714ec87fab130170cd110662cda src/openrouter/components/videogenerationresponse.py: id: 541f1321b072 - last_write_checksum: sha1:fe3f29d50ce52d23438464c7da3a3559d0cbacf7 - pristine_git_object: 72be512797d163955607d48d34a8d8285d3535c1 + last_write_checksum: sha1:6ba68c4551af144f37be940f0222f434d156e275 + pristine_git_object: 867a1aa29de8df4c3dd67498b390a53985efcd5f src/openrouter/components/videogenerationusage.py: id: dded36eba597 last_write_checksum: sha1:a19d286bfda3ca9a373128c5118f3e6715060470 @@ -18738,4 +18738,7 @@ examples: "500": application/json: {"error": {"code": 404, "message": "Intern not found"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.batch.create_batches()`: `response.results[].response.body` **Changed**\n* `open_router.batch.get_batches()`: `response.results[].response.body` **Changed**\n* `open_router.chat.send()`: \n * `request.plugins[].union(armor)` **Added**\n * `response` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.plugins[].union(armor)` **Added**\n* `open_router.presets.create_presets_messages()`: \n * `request.plugins[].union(armor)` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.plugins[].union(armor)` **Added**\n* `open_router.responses.send()`: \n * `request.plugins[].union(armor)` **Added**\n * `response` **Changed**\n* `open_router.beta.responses.send()`: \n * `request.plugins[].union(armor)` **Added**\n * `response` **Changed**\n" +releaseNotes: | + ## Python SDK Changes: + * `open_router.video_generation.generate()`: `response.urls` **Added** + * `open_router.video_generation.get_generation()`: `response.urls` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d12f5712..403a049a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.51 + version: 1.3.52 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 0b16a9c7..6769fe8f 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -33412,6 +33412,12 @@ components: type: 'string' x-speakeasy-unknown-values: allow unsigned_urls: + description: 'OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.' + items: + type: 'string' + type: 'array' + urls: + description: 'Signed download URLs for OpenRouter''s stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists.' items: type: 'string' type: 'array' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7a583955..16bbd7f6 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:e2169a770b941899e588257c4a70ea18f0b4c48a6de2f1032609d7b5b8bf6267 - sourceBlobDigest: sha256:199b89e56ea9f453448a916e5c38422d9d4196dfb5955aab34bbc0a55d01507b + sourceRevisionDigest: sha256:1e5ad35d5785378ba2954e41c444355d672f34429cc3bd4e6c7bf896a773698b + sourceBlobDigest: sha256:91614f6582d0a4778d67663bbd034d48458c309e74478ef17ff120c76647889e tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:e2169a770b941899e588257c4a70ea18f0b4c48a6de2f1032609d7b5b8bf6267 - sourceBlobDigest: sha256:199b89e56ea9f453448a916e5c38422d9d4196dfb5955aab34bbc0a55d01507b + sourceRevisionDigest: sha256:1e5ad35d5785378ba2954e41c444355d672f34429cc3bd4e6c7bf896a773698b + sourceBlobDigest: sha256:91614f6582d0a4778d67663bbd034d48458c309e74478ef17ff120c76647889e codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:0040c3bdfdf4a39c108fe13d2fc1a9ed73c4f2e41595d7602577c75ed22728f9 + codeSamplesRevisionDigest: sha256:faf1ae53c03e4ede9bf81d89022fec60b81a0ec9cb15f201ceaa20f4d2be6932 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index a101449d..f27aebd7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3279,4 +3279,14 @@ Based on: ### Generated - [python v1.3.51] . ### Releases -- [PyPI v1.3.51] https://pypi.org/project/openrouter/1.3.51 - . \ No newline at end of file +- [PyPI v1.3.51] https://pypi.org/project/openrouter/1.3.51 - . + +## 2026-10-14 15:29:54 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.52] . +### Releases +- [PyPI v1.3.52] https://pypi.org/project/openrouter/1.3.52 - . \ No newline at end of file diff --git a/docs/components/videogenerationresponse.mdx b/docs/components/videogenerationresponse.mdx index c73f8bd2..dda66a30 100644 --- a/docs/components/videogenerationresponse.mdx +++ b/docs/components/videogenerationresponse.mdx @@ -4,13 +4,14 @@ title: "VideoGenerationResponse" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `error` | *Optional[str]* | ➖ | N/A | | -| `expires_at` | *Optional[int]* | ➖ | Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. | | -| `generation_id` | *Optional[str]* | ➖ | The generation ID associated with this video generation job. Available once the job has been processed. | | -| `id` | *str* | ✅ | The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. | | -| `polling_url` | *str* | ✅ | N/A | | -| `status` | [components.VideoGenerationResponseStatus](../components/videogenerationresponsestatus.mdx) | ✅ | N/A | | -| `unsigned_urls` | List[*str*] | ➖ | N/A | | -| `usage` | [Optional[components.VideoGenerationUsage]](../components/videogenerationusage.mdx) | ➖ | Usage and cost information for the video generation. Available once the job has completed. | \{
"cost": 0.5,
"is_byok": false
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `error` | *Optional[str]* | ➖ | N/A | | +| `expires_at` | *Optional[int]* | ➖ | Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. | | +| `generation_id` | *Optional[str]* | ➖ | The generation ID associated with this video generation job. Available once the job has been processed. | | +| `id` | *str* | ✅ | The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. | | +| `polling_url` | *str* | ✅ | N/A | | +| `status` | [components.VideoGenerationResponseStatus](../components/videogenerationresponsestatus.mdx) | ✅ | N/A | | +| `unsigned_urls` | List[*str*] | ➖ | OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. | | +| `urls` | List[*str*] | ➖ | Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. | | +| `usage` | [Optional[components.VideoGenerationUsage]](../components/videogenerationusage.mdx) | ➖ | Usage and cost information for the video generation. Available once the job has completed. | \{
"cost": 0.5,
"is_byok": false
} | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 874397db..ab3871be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.51" +version = "1.3.52" 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 77be04ec..5a3f314c 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.51" +__version__: str = "1.3.52" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.3.51 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.52 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/videogenerationresponse.py b/src/openrouter/components/videogenerationresponse.py index 72be5127..867a1aa2 100644 --- a/src/openrouter/components/videogenerationresponse.py +++ b/src/openrouter/components/videogenerationresponse.py @@ -32,6 +32,9 @@ class VideoGenerationResponseTypedDict(TypedDict): generation_id: NotRequired[str] r"""The generation ID associated with this video generation job. Available once the job has been processed.""" unsigned_urls: NotRequired[List[str]] + r"""OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.""" + urls: NotRequired[List[str]] + r"""Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists.""" usage: NotRequired[VideoGenerationUsageTypedDict] r"""Usage and cost information for the video generation. Available once the job has completed.""" @@ -53,6 +56,10 @@ class VideoGenerationResponse(BaseModel): r"""The generation ID associated with this video generation job. Available once the job has been processed.""" unsigned_urls: Optional[List[str]] = None + r"""OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.""" + + urls: Optional[List[str]] = None + r"""Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists.""" usage: Optional[VideoGenerationUsage] = None r"""Usage and cost information for the video generation. Available once the job has completed.""" @@ -60,7 +67,7 @@ class VideoGenerationResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["error", "expires_at", "generation_id", "unsigned_urls", "usage"] + ["error", "expires_at", "generation_id", "unsigned_urls", "urls", "usage"] ) serialized = handler(self) m = {} diff --git a/uv.lock b/uv.lock index 25b60b0d..96c7c29d 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.51" +version = "1.3.52" source = { editable = "." } dependencies = [ { name = "httpcore" },