From caea42fecc4d4f4de31c7a30c5153796f429f601 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 23 Nov 2026 14:23:30 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.803.2 --- .speakeasy/gen.lock | 33 +++++++++++----------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 12 ++++++-- .speakeasy/workflow.lock | 10 +++---- RELEASES.md | 12 +++++++- docs/components/imagegenerationrequest.mdx | 2 +- docs/operations/createimagesrequest.mdx | 2 +- docs/sdks/images/README.mdx | 4 +-- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +-- uv.lock | 2 +- 11 files changed, 50 insertions(+), 35 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4fe9b645a..fdf4a4105 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: 5417e0c9fa504ddf03567a094059518c + docChecksum: 06cda0195f12e737138188f3b42e0ff7 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.204 - configChecksum: 4ea69dd04c35cd72e1e1389f01b96fe9 + releaseVersion: 1.3.205 + configChecksum: 2d6c5ab323a773be11a7559c23ffdaa2 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 92468160-f3b4-4368-aaff-7fe7c00c41d6 - pristine_commit_hash: aa50f5f55736ffe684f2a07a2d2d262c7315767b - pristine_tree_hash: ff0a767f398f8f74357d7c7ed26ef034715b5514 + generation_id: 629b1878-7aeb-41db-95d7-257c5e1425c0 + pristine_commit_hash: 2578644676fca8403ddfb784690e0daa9b31630e + pristine_tree_hash: c19471271158e60ffd5a867c13a581ea47c51f45 features: python: acceptHeaders: 3.0.0 @@ -4396,8 +4396,8 @@ trackedFiles: pristine_git_object: bccd158982dba4b4ed810b98b5f7d4a6c04afaa7 docs/components/imagegenerationrequest.mdx: id: b093cb0f5e81 - last_write_checksum: sha1:30fbee66a3e0fd9946beee7177dfcf80132586f0 - pristine_git_object: db92a380f3efccb3a1749fa8c76b6e5dabc2af40 + last_write_checksum: sha1:6f1b494ecaaff1c30a2be246ca4959b93c9f3b3a + pristine_git_object: d03ddede6b3362ef24106176c5556851a537fab0 docs/components/imagegenerationrequestaspectratio.mdx: id: bda89377f32d last_write_checksum: sha1:291771c6756771aabfadcee9b78e2aca504e7697 @@ -9976,8 +9976,8 @@ trackedFiles: pristine_git_object: a6c4419863fafcae74571865bdcabade605767c9 docs/operations/createimagesrequest.mdx: id: "245236481860" - last_write_checksum: sha1:1e263c82c8f1772cab95e90756ede8efbd94025d - pristine_git_object: c9b49336afdb1ec74358aa0e3c21e981a952bce0 + last_write_checksum: sha1:e7fdcb922a2cf8794cedacf4f2327ee0edf78174 + pristine_git_object: c0f7189f23f7be89280141a032b7d9a796910852 docs/operations/createimagesresponse.mdx: id: 852027a00620 last_write_checksum: sha1:f65739779d5b4cd6cbacf59817765623554abef6 @@ -11788,8 +11788,8 @@ trackedFiles: pristine_git_object: 3f96698736d6078dfb33689dd2fdca320bac0a03 docs/sdks/images/README.mdx: id: 534a6c102c4f - last_write_checksum: sha1:2e5532a4a851671d06693d38d67884e64ca112df - pristine_git_object: 931e40f773c106a8ae654c501164ce4c5674385d + last_write_checksum: sha1:7d425634484b9e3150e3cdc11b2c9e8b8bd52d76 + pristine_git_object: a330c3f121d866703e37cd7274051b1caa6023eb docs/sdks/models/README.mdx: id: 58f1ca464e0b last_write_checksum: sha1:2e89247b7ad63c2bdcf9da989ac4f2e758eee729 @@ -11868,8 +11868,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:eb8a6dcd6a25c7fba19e2a378c0e0e1ec1f5f9c5 - pristine_git_object: 50c8f5046c4629d52f5ea09bc967fee4759b2681 + last_write_checksum: sha1:d8cc281cb93fcaab2fe16540214aa7eee3f4fd1a + pristine_git_object: b77d6a8e21319f6653e1c3940c5c66946f5a2394 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11896,8 +11896,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:8da6be4d2bc71b8ad5feffd06f2d585a47f863b6 - pristine_git_object: b3fca5005dc0db552abab5b2e0f20881310a260d + last_write_checksum: sha1:8ee72a1123cd74afcc2fb9435e29233bc80a58eb + pristine_git_object: 8fe5bc785851f067a45abd68577f00341c893d80 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -22023,4 +22023,3 @@ examples: "503": application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.presets.create_presets_messages()`: \n * `request.messages[].content.union(Array<>)[].union(tool_search_tool_result)` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 64e8d87c6..30907672f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.204 + version: 1.3.205 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index a8f79ee62..b0221888a 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -17152,6 +17152,7 @@ components: example: model: 'bytedance-seed/seedream-4.5' prompt: 'a red panda astronaut floating in space, studio lighting' + response_format: 'url' properties: aspect_ratio: description: 'Normalized aspect ratio of the generated image. Providers clamp to their supported subset.' @@ -17280,7 +17281,7 @@ components: enum: - 'b64_json' - 'url' - example: 'b64_json' + example: 'url' type: 'string' x-speakeasy-unknown-values: allow seed: @@ -17314,7 +17315,9 @@ components: example: created: 1748372400 data: - - b64_json: '' + - media_type: 'image/png' + url: 'https://storage.googleapis.com/openrouter-generated-media-us/v1/...' + expires_at: 1748458800 usage: completion_tokens: 4175 cost: 0.04 @@ -51221,6 +51224,7 @@ paths: example: model: 'bytedance-seed/seedream-4.5' prompt: 'a red panda astronaut floating in space, studio lighting' + response_format: 'url' schema: $ref: '#/components/schemas/ImageGenerationRequest' required: true @@ -51231,7 +51235,9 @@ paths: example: created: 1748372400 data: - - b64_json: '' + - media_type: 'image/png' + url: 'https://storage.googleapis.com/openrouter-generated-media-us/v1/...' + expires_at: 1748458800 usage: completion_tokens: 4175 cost: 0.04 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7a7cb2697..d86d1b797 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:806071943b3da91dd1e57b6753f17cb55a765a703ec5ce0a97c96b325c4ea4cc - sourceBlobDigest: sha256:e8420100a032b7ceb5b8bf47e914ab3752b63fe7dafc84497e2a4867a5b5e3be + sourceRevisionDigest: sha256:45548ddd239196861464291ab128e28e4b83550cac1896f9c7f0b083858ae8cb + sourceBlobDigest: sha256:260d0a7205c70fbef1ea6540f18122a2eaabbeae927048d98ba9f2d2ed6db8c4 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:806071943b3da91dd1e57b6753f17cb55a765a703ec5ce0a97c96b325c4ea4cc - sourceBlobDigest: sha256:e8420100a032b7ceb5b8bf47e914ab3752b63fe7dafc84497e2a4867a5b5e3be + sourceRevisionDigest: sha256:45548ddd239196861464291ab128e28e4b83550cac1896f9c7f0b083858ae8cb + sourceBlobDigest: sha256:260d0a7205c70fbef1ea6540f18122a2eaabbeae927048d98ba9f2d2ed6db8c4 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:503f5e9361ef7e32813b208fe455b695cef08f7db098b34eba8b64757be5e7b7 + codeSamplesRevisionDigest: sha256:b53436d05eb098a3719dd4ac0cb14b540b8c44eb7fbda7fefbeaefb010f60783 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 724e37ef5..4064a327f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4809,4 +4809,14 @@ Based on: ### Generated - [python v1.3.204] . ### Releases -- [PyPI v1.3.204] https://pypi.org/project/openrouter/1.3.204 - . \ No newline at end of file +- [PyPI v1.3.204] https://pypi.org/project/openrouter/1.3.204 - . + +## 2026-11-23 14:20:21 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.205] . +### Releases +- [PyPI v1.3.205] https://pypi.org/project/openrouter/1.3.205 - . \ No newline at end of file diff --git a/docs/components/imagegenerationrequest.mdx b/docs/components/imagegenerationrequest.mdx index db92a380f..d03ddede6 100644 --- a/docs/components/imagegenerationrequest.mdx +++ b/docs/components/imagegenerationrequest.mdx @@ -23,7 +23,7 @@ Image generation request input | `provider` | [Optional[components.ImageGenerationProviderPreferences]](../components/imagegenerationproviderpreferences.mdx) | ➖ | Provider routing preferences and provider-specific passthrough configuration. | \{
"allow_fallbacks": false,
"only": [
"google-ai-studio"
]
} | | `quality` | [Optional[components.ImageGenerationRequestQuality]](../components/imagegenerationrequestquality.mdx) | ➖ | Rendering quality. Providers without a quality knob ignore this. | high | | `resolution` | [Optional[components.ImageGenerationRequestResolution]](../components/imagegenerationrequestresolution.mdx) | ➖ | Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. | 2K | -| `response_format` | [Optional[components.ImageGenerationRequestResponseFormat]](../components/imagegenerationrequestresponseformat.mdx) | ➖ | `b64_json` (default) returns the image bytes inline. `url` stores each output in OpenRouter storage and returns a signed download URL in place of the bytes. The URL is a bearer link: anyone holding it can download the image until it expires, up to 24 hours after the image was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. The response falls back to `b64_json` when a URL cannot be issued: streaming responses, zero-data-retention requests (account settings, guardrails or `provider.zdr`) or endpoints, or storage being unavailable. | b64_json | +| `response_format` | [Optional[components.ImageGenerationRequestResponseFormat]](../components/imagegenerationrequestresponseformat.mdx) | ➖ | `b64_json` (default) returns the image bytes inline. `url` stores each output in OpenRouter storage and returns a signed download URL in place of the bytes. The URL is a bearer link: anyone holding it can download the image until it expires, up to 24 hours after the image was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. The response falls back to `b64_json` when a URL cannot be issued: streaming responses, zero-data-retention requests (account settings, guardrails or `provider.zdr`) or endpoints, or storage being unavailable. | url | | `seed` | *Optional[int]* | ➖ | 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. | | | `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | session-1234 | | `size` | *Optional[str]* | ➖ | Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048"). A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. Explicit pixel sizes are provider-dependent: providers that accept them treat the value as authoritative and reject a mismatched `resolution` or `aspect_ratio` alongside it with a 400. xAI and Sourceful V2/V2.5 reject explicit pixel sizes (use `resolution` and `aspect_ratio` there); Sourceful V2.6 supports them within its dimension limits and does not allow combining them with `resolution` or `aspect_ratio`. | 2K | diff --git a/docs/operations/createimagesrequest.mdx b/docs/operations/createimagesrequest.mdx index c9b49336a..c0f7189f2 100644 --- a/docs/operations/createimagesrequest.mdx +++ b/docs/operations/createimagesrequest.mdx @@ -9,4 +9,4 @@ title: "CreateImagesRequest" | `http_referer` | *Optional[str]* | ➖ | 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]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `image_generation_request` | [components.ImageGenerationRequest](../components/imagegenerationrequest.mdx) | ✔️ | N/A | \{
"model": "bytedance-seed/seedream-4.5",
"prompt": "a red panda astronaut floating in space, studio lighting"
} | \ No newline at end of file +| `image_generation_request` | [components.ImageGenerationRequest](../components/imagegenerationrequest.mdx) | ✔️ | N/A | \{
"model": "bytedance-seed/seedream-4.5",
"prompt": "a red panda astronaut floating in space, studio lighting",
"response_format": "url"
} | \ No newline at end of file diff --git a/docs/sdks/images/README.mdx b/docs/sdks/images/README.mdx index 931e40f77..a330c3f12 100644 --- a/docs/sdks/images/README.mdx +++ b/docs/sdks/images/README.mdx @@ -31,7 +31,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.images.generate(model="bytedance-seed/seedream-4.5", prompt="a red panda astronaut floating in space, studio lighting") + res = open_router.images.generate(model="bytedance-seed/seedream-4.5", prompt="a red panda astronaut floating in space, studio lighting", response_format="url") with res as event_stream: for event in event_stream: @@ -61,7 +61,7 @@ with OpenRouter( | `provider` | [Optional[components.ImageGenerationProviderPreferences]](../../components/imagegenerationproviderpreferences.mdx) | ➖ | Provider routing preferences and provider-specific passthrough configuration. | \{
"allow_fallbacks": false,
"only": [
"google-ai-studio"
]
} | | `quality` | [Optional[components.ImageGenerationRequestQuality]](../../components/imagegenerationrequestquality.mdx) | ➖ | Rendering quality. Providers without a quality knob ignore this. | high | | `resolution` | [Optional[components.ImageGenerationRequestResolution]](../../components/imagegenerationrequestresolution.mdx) | ➖ | Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. | 2K | -| `response_format` | [Optional[components.ImageGenerationRequestResponseFormat]](../../components/imagegenerationrequestresponseformat.mdx) | ➖ | `b64_json` (default) returns the image bytes inline. `url` stores each output in OpenRouter storage and returns a signed download URL in place of the bytes. The URL is a bearer link: anyone holding it can download the image until it expires, up to 24 hours after the image was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. The response falls back to `b64_json` when a URL cannot be issued: streaming responses, zero-data-retention requests (account settings, guardrails or `provider.zdr`) or endpoints, or storage being unavailable. | b64_json | +| `response_format` | [Optional[components.ImageGenerationRequestResponseFormat]](../../components/imagegenerationrequestresponseformat.mdx) | ➖ | `b64_json` (default) returns the image bytes inline. `url` stores each output in OpenRouter storage and returns a signed download URL in place of the bytes. The URL is a bearer link: anyone holding it can download the image until it expires, up to 24 hours after the image was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. The response falls back to `b64_json` when a URL cannot be issued: streaming responses, zero-data-retention requests (account settings, guardrails or `provider.zdr`) or endpoints, or storage being unavailable. | url | | `seed` | *Optional[int]* | ➖ | 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. | | | `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | session-1234 | | `size` | *Optional[str]* | ➖ | Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048"). A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. Explicit pixel sizes are provider-dependent: providers that accept them treat the value as authoritative and reject a mismatched `resolution` or `aspect_ratio` alongside it with a 400. xAI and Sourceful V2/V2.5 reject explicit pixel sizes (use `resolution` and `aspect_ratio` there); Sourceful V2.6 supports them within its dimension limits and does not allow combining them with `resolution` or `aspect_ratio`. | 2K | diff --git a/pyproject.toml b/pyproject.toml index 50c8f5046..b77d6a8e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.204" +version = "1.3.205" 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 b3fca5005..8fe5bc785 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.204" +__version__: str = "1.3.205" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.204 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.205 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/uv.lock b/uv.lock index b037bba64..4a0fc9d0c 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.204" +version = "1.3.205" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 5c8256bd50f77b3838e962643080cbe79590df9e Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 14:23:38 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow