diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 52e529f4..18cdce06 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: 71c8ad142a8771298fc33c554a34f8fc
+ docChecksum: f789c2aa1b196ab1119a66a58241adce
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
- releaseVersion: 1.3.243
- configChecksum: 8e8fac1cf7a5b30acc4669d7eb63eddb
+ releaseVersion: 1.3.244
+ configChecksum: bde88a04cadc45c76bfe5f1bf7458769
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 6bdd2415-f232-4697-92d4-abf14814fb8d
- pristine_commit_hash: 4961056dbe17230f727025c9a4c87497bc6df72a
- pristine_tree_hash: 27e7d504b0d273ab1c7ac6e88279046b7512a2f8
+ generation_id: d289e1ab-5ac2-44e1-bb10-7a98d1e5b80f
+ pristine_commit_hash: 59b1470526c9265a021a593caa8eeddaeae5009a
+ pristine_tree_hash: 6f1723c16973202f988d209bb87c6e98c060c241
features:
python:
acceptHeaders: 3.0.0
@@ -4448,8 +4448,8 @@ trackedFiles:
pristine_git_object: a470ef90ddcfdf10de7f040ffc8aee37d634306d
docs/components/imageendpoint.mdx:
id: d7d1514fbcd6
- last_write_checksum: sha1:aa430d0cbe9e25d98c05942834aa0c77d1833821
- pristine_git_object: 564ab03c845baf0833fd352cb5dc193f16269239
+ last_write_checksum: sha1:d71b13c3a4b40aba314505f878132eedb4b5a786
+ pristine_git_object: 318cd3065ceb9027d393c9ba01058e5a3a25a180
docs/components/imagegencallcompletedevent.mdx:
id: 16f72f044ccc
last_write_checksum: sha1:910bef169bc44743800d6586e780a714020a08c2
@@ -4770,6 +4770,10 @@ trackedFiles:
id: 033b801659d0
last_write_checksum: sha1:0e263e16a02ab441862930d01db2b1a5871ac2da
pristine_git_object: 2092337ea3b892e78fab5607d098d772376f655e
+ docs/components/inputimagerole.mdx:
+ id: a8a87a6a0c2a
+ last_write_checksum: sha1:6eedfe4f31ef76ca7bd48c794bddb9be031a7510
+ pristine_git_object: ad02aafa1dacae37a8aedd76165fb694e9c0b801
docs/components/inputimagetype.mdx:
id: 74ad50005674
last_write_checksum: sha1:f2fe452162811ec4f2a5325418a75c68d7bf4218
@@ -12656,8 +12660,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:b52626a9ac31d5773337db1c72e3bfb65d2c9fc3
- pristine_git_object: 65b206f7393fad89ebbc4cb8414484eb4c6f828f
+ last_write_checksum: sha1:1f4dd3fa30629cff40ba23b19e04013a21e7a151
+ pristine_git_object: c0ed6597f551cd42d92e4cfcebd1ad317597b0ea
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -12684,8 +12688,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:ae87b6fb98e6501b6b99bc67b23105d8bff835cf
- pristine_git_object: 5e770fce330c79c8ba36abfc7ea8d5962fd412b8
+ last_write_checksum: sha1:ac6d620946c7c675528e08cb6c822162d2f91a3f
+ pristine_git_object: be6ef088b6f383894681e8bd40ca3d39dbb8f203
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
@@ -12732,8 +12736,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:d0e4ce3143411726d62385d5d2234a9246de7c50
- pristine_git_object: bbdce2c6c9e16f85cd1f886970294a54fcf54e2a
+ last_write_checksum: sha1:981d6840b9827a149a88da7d6c23c9c664484e0e
+ pristine_git_object: 45c3d7f6ca27f7e13d3b7393c5ddf30c221555df
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:08125e1d60df82793e11e8aed6e3c9fdb7512ebb
@@ -14620,8 +14624,8 @@ trackedFiles:
pristine_git_object: 62c61b3a14000361f8a47e6f7aafb53cbdedc081
src/openrouter/components/imageendpoint.py:
id: 6466b0bedef0
- last_write_checksum: sha1:d23af03705511e411f7dbe92876b4862e8ec6895
- pristine_git_object: 20e9907afdff75fd947bba59e2b2ecbdd4798d61
+ last_write_checksum: sha1:4c49171c710ca2cfdffa272d4b766666ce4f44c2
+ pristine_git_object: bf0c18af337561ef024458811a8663c701e2cf87
src/openrouter/components/imagegencallcompletedevent.py:
id: cbf654faeb3e
last_write_checksum: sha1:8fb3e34408dd8b167afc6aad641de9cc2483c9f1
@@ -23395,3 +23399,6 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: |
+ ## Python SDK Changes:
+ * `open_router.images.list_model_endpoints()`: `response.endpoints[].input_image_role` **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 4c9aff91..967ab2d2 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.3.243
+ version: 1.3.244
additionalDependencies:
dev:
pytest: '>=8.3'
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index c4865f3a..df430eab 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -17617,6 +17617,14 @@ components:
items:
type: 'string'
type: 'array'
+ input_image_role:
+ description: 'How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.'
+ enum:
+ - 'edit'
+ - 'reference'
+ example: 'edit'
+ type: 'string'
+ x-speakeasy-unknown-values: allow
input_modalities:
description: 'Typed inputs the model accepts, following the Models API V2 document.'
items:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 0eef5ab8..23fc356a 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:10c3504a51db3373ac0499ee5053645406656196f2c57775bcb2ad46dfdcb1c9
- sourceBlobDigest: sha256:42ba74d1683c77b46105c7531ef35a678bfb618574202f4e365a063a9a898659
+ sourceRevisionDigest: sha256:104e05c9ccb0764c3976195e839b42127ef778f73bf7e11dba495a2bb02703f4
+ sourceBlobDigest: sha256:780e4e87c2f64322ecf1a2ed2914460d923c452a80b7fc06f9feaf590b8369b1
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:10c3504a51db3373ac0499ee5053645406656196f2c57775bcb2ad46dfdcb1c9
- sourceBlobDigest: sha256:42ba74d1683c77b46105c7531ef35a678bfb618574202f4e365a063a9a898659
+ sourceRevisionDigest: sha256:104e05c9ccb0764c3976195e839b42127ef778f73bf7e11dba495a2bb02703f4
+ sourceBlobDigest: sha256:780e4e87c2f64322ecf1a2ed2914460d923c452a80b7fc06f9feaf590b8369b1
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:ce53a5199d9041683635a2f8597fce589231288db7034d391e3bae057f338888
+ codeSamplesRevisionDigest: sha256:fbd2263cc835257060a4ef49c9a36198dfdfa2036cc7b3706431187c03cd5df4
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
diff --git a/RELEASES.md b/RELEASES.md
index 7c968d1c..8e2a8b48 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -5199,4 +5199,14 @@ Based on:
### Generated
- [python v1.3.243] .
### Releases
-- [PyPI v1.3.243] https://pypi.org/project/openrouter/1.3.243 - .
\ No newline at end of file
+- [PyPI v1.3.243] https://pypi.org/project/openrouter/1.3.243 - .
+
+## 2026-12-04 11:13:35
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.3.244] .
+### Releases
+- [PyPI v1.3.244] https://pypi.org/project/openrouter/1.3.244 - .
\ No newline at end of file
diff --git a/docs/components/imageendpoint.mdx b/docs/components/imageendpoint.mdx
index 564ab03c..318cd306 100644
--- a/docs/components/imageendpoint.mdx
+++ b/docs/components/imageendpoint.mdx
@@ -10,6 +10,7 @@ An endpoint that serves a given image model.
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowed_passthrough_parameters` | List[*str*] | ✔️ | Provider-specific options accepted under provider.options[provider_slug]. | [] |
+| `input_image_role` | [Optional[components.InputImageRole]](../components/inputimagerole.mdx) | ➖ | How this endpoint uses input_references: edit transforms the input image; reference guides a new generation. | edit |
| `input_modalities` | List[[components.ModelInputModalityV2](../components/modelinputmodalityv2.mdx)] | ➖ | Typed inputs the model accepts, following the Models API V2 document. | |
| `output_modalities` | List[[components.ModelOutputModalityV2](../components/modeloutputmodalityv2.mdx)] | ➖ | Typed outputs with the request fields each accepts, following the Models API V2 document. | |
| `pricing` | List[[components.ImagePricingEntry](../components/imagepricingentry.mdx)] | ✔️ | Billable pricing lines for this endpoint. | [
\{
"billable": "output_image",
"cost_usd": 0.05,
"unit": "image"
}
] |
diff --git a/docs/components/inputimagerole.mdx b/docs/components/inputimagerole.mdx
new file mode 100644
index 00000000..ad02aafa
--- /dev/null
+++ b/docs/components/inputimagerole.mdx
@@ -0,0 +1,22 @@
+---
+title: "InputImageRole"
+---
+
+How this endpoint uses input_references: edit transforms the input image; reference guides a new generation.
+
+## Example Usage
+
+```python
+from openrouter.components import InputImageRole
+
+# Open enum: unrecognized values are captured as UnrecognizedStr
+value: InputImageRole = "edit"
+```
+
+
+## Values
+
+This is an open enum. Unrecognized values will not fail type checks.
+
+- `"edit"`
+- `"reference"`
diff --git a/pyproject.toml b/pyproject.toml
index 65b206f7..c0ed6597 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.3.243"
+version = "1.3.244"
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 5e770fce..be6ef088 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.243"
+__version__: str = "1.3.244"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.950.13"
-__user_agent__: str = "speakeasy-sdk/python 1.3.243 2.950.13 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.3.244 2.950.13 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index bbdce2c6..45c3d7f6 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -2541,7 +2541,7 @@
GuardrailPolicyAssignmentStateTypedDict,
)
from .imageconfig import ImageConfig, ImageConfigTypedDict
- from .imageendpoint import ImageEndpoint, ImageEndpointTypedDict
+ from .imageendpoint import ImageEndpoint, ImageEndpointTypedDict, InputImageRole
from .imagegencallcompletedevent import (
ImageGenCallCompletedEvent,
ImageGenCallCompletedEventType,
@@ -7451,6 +7451,7 @@
"InputImageDetail",
"InputImageMask",
"InputImageMaskTypedDict",
+ "InputImageRole",
"InputImageType",
"InputImageTypedDict",
"InputMessageItem",
@@ -11445,6 +11446,7 @@
"ImageConfigTypedDict": ".imageconfig",
"ImageEndpoint": ".imageendpoint",
"ImageEndpointTypedDict": ".imageendpoint",
+ "InputImageRole": ".imageendpoint",
"ImageGenCallCompletedEvent": ".imagegencallcompletedevent",
"ImageGenCallCompletedEventType": ".imagegencallcompletedevent",
"ImageGenCallCompletedEventTypedDict": ".imagegencallcompletedevent",
diff --git a/src/openrouter/components/imageendpoint.py b/src/openrouter/components/imageendpoint.py
index 20e9907a..bf0c18af 100644
--- a/src/openrouter/components/imageendpoint.py
+++ b/src/openrouter/components/imageendpoint.py
@@ -5,12 +5,22 @@
from .imagepricingentry import ImagePricingEntry, ImagePricingEntryTypedDict
from .modelinputmodalityv2 import ModelInputModalityV2, ModelInputModalityV2TypedDict
from .modeloutputmodalityv2 import ModelOutputModalityV2, ModelOutputModalityV2TypedDict
-from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
from pydantic import model_serializer
-from typing import Dict, List, Optional
+from typing import Dict, List, Literal, Optional, Union
from typing_extensions import NotRequired, TypedDict
+InputImageRole = Union[
+ Literal[
+ "edit",
+ "reference",
+ ],
+ UnrecognizedStr,
+]
+r"""How this endpoint uses input_references: edit transforms the input image; reference guides a new generation."""
+
+
class ImageEndpointTypedDict(TypedDict):
r"""An endpoint that serves a given image model."""
@@ -27,6 +37,8 @@ class ImageEndpointTypedDict(TypedDict):
supported_parameters: Dict[str, CapabilityDescriptorTypedDict]
supports_streaming: bool
r"""Whether this endpoint supports native SSE streaming (`stream: true` in the request)."""
+ input_image_role: NotRequired[InputImageRole]
+ r"""How this endpoint uses input_references: edit transforms the input image; reference guides a new generation."""
input_modalities: NotRequired[List[ModelInputModalityV2TypedDict]]
r"""Typed inputs the model accepts, following the Models API V2 document."""
output_modalities: NotRequired[List[ModelOutputModalityV2TypedDict]]
@@ -56,6 +68,9 @@ class ImageEndpoint(BaseModel):
supports_streaming: bool
r"""Whether this endpoint supports native SSE streaming (`stream: true` in the request)."""
+ input_image_role: Optional[InputImageRole] = None
+ r"""How this endpoint uses input_references: edit transforms the input image; reference guides a new generation."""
+
input_modalities: Optional[List[ModelInputModalityV2]] = None
r"""Typed inputs the model accepts, following the Models API V2 document."""
@@ -64,7 +79,9 @@ class ImageEndpoint(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = set(["input_modalities", "output_modalities"])
+ optional_fields = set(
+ ["input_image_role", "input_modalities", "output_modalities"]
+ )
nullable_fields = set(["provider_tag"])
serialized = handler(self)
m = {}
diff --git a/uv.lock b/uv.lock
index e10df93a..70515ebd 100644
--- a/uv.lock
+++ b/uv.lock
@@ -231,7 +231,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.3.243"
+version = "1.3.244"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },