From d6a4686ee300e7efd0ad27bf23959dbb4cc67329 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 4 Dec 2026 03:04:14 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.803.2 --- .speakeasy/gen.lock | 38 +++++++++---------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 3 +- .speakeasy/workflow.lock | 10 ++--- RELEASES.md | 12 +++++- docs/components/imagegenerationrequest.mdx | 2 +- docs/sdks/images/README.mdx | 2 +- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- .../components/imagegenerationrequest.py | 11 +++--- src/openrouter/images.py | 32 ++++++++-------- uv.lock | 2 +- 12 files changed, 65 insertions(+), 55 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 035cf037..694b01d2 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: 64e7b923ccc491202799aba529f33eca + docChecksum: 564504dc148e4a96d8e4b7a96ec05de4 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.241 - configChecksum: 733df664ae737d2162cb634fbc9338c0 + releaseVersion: 1.3.242 + configChecksum: f1ff7a2e429e073c3eff0e0a11c6fa82 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 20d27faa-55db-4f93-9708-fb179c4a5942 - pristine_commit_hash: 2381b4072d2e03c024a6a9753b6a41d6da36e0b9 - pristine_tree_hash: 071fd4b08db4cc8a3dde2ed11d87e386dea75762 + generation_id: 3c15b8df-70f6-44b9-87ac-a60e2dd44e26 + pristine_commit_hash: e992b6ac99481811165bb393291db57b92dba96e + pristine_tree_hash: 2c80519385d1bda4fecae021ccd18045c0ab97b7 features: python: acceptHeaders: 3.0.0 @@ -4540,8 +4540,8 @@ trackedFiles: pristine_git_object: bccd158982dba4b4ed810b98b5f7d4a6c04afaa7 docs/components/imagegenerationrequest.mdx: id: b093cb0f5e81 - last_write_checksum: sha1:6f1b494ecaaff1c30a2be246ca4959b93c9f3b3a - pristine_git_object: d03ddede6b3362ef24106176c5556851a537fab0 + last_write_checksum: sha1:62a2aa144b97d1da63b350c336bcbdf648180310 + pristine_git_object: 59515f18d5c24909d47d52936101d41db31efaca docs/components/imagegenerationrequestaspectratio.mdx: id: bda89377f32d last_write_checksum: sha1:291771c6756771aabfadcee9b78e2aca504e7697 @@ -12576,8 +12576,8 @@ trackedFiles: pristine_git_object: d20f08df58953fa2580431fcfb9daa50ada0bb10 docs/sdks/images/README.mdx: id: 534a6c102c4f - last_write_checksum: sha1:7d425634484b9e3150e3cdc11b2c9e8b8bd52d76 - pristine_git_object: a330c3f121d866703e37cd7274051b1caa6023eb + last_write_checksum: sha1:9033cc73b2fab3fe0838325f0c0ffea7dfb20935 + pristine_git_object: 3ddc3b9ea090138d09220e4b1915edff418b0a87 docs/sdks/models/README.mdx: id: 58f1ca464e0b last_write_checksum: sha1:f9c8722391e2a7aa6a7234f57e3ee57bd862dccb @@ -12656,8 +12656,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:a6edd047dbf95c88285116f5b1cb44088c9105b3 - pristine_git_object: ab4270953f477a9df0259b496171ace44dc03324 + last_write_checksum: sha1:4d01bae473472bd886468c34d07280273b672caa + pristine_git_object: 16a010e28a81ba732b4ccf61526f146a603dd397 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -12684,8 +12684,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:36793cac21bd57fa89d3bead4576c38cf4a2d309 - pristine_git_object: 5e3770576718d990d4f714713ad2c40241a2e9aa + last_write_checksum: sha1:d13eca9afa6b4129c0043c39c68023b5962e44c5 + pristine_git_object: 5540ddaefaf29c0aacd70b7d52630aa897322500 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -14668,8 +14668,8 @@ trackedFiles: pristine_git_object: b99140b4e7e8a7cddfad8ea4c22dcf83f90fec36 src/openrouter/components/imagegenerationrequest.py: id: f8291a7be9a0 - last_write_checksum: sha1:9ef9e86cbbaa8a54a2fa1c99696b0279a0b6200c - pristine_git_object: 11844c4b8ed656b0042d62b1a6ebbc22550896b7 + last_write_checksum: sha1:e7a94a8800548e00ec5c3007d8c3d770ccfdd98f + pristine_git_object: 24d20db963eb6b7b6da9fd581e3de39823db238c src/openrouter/components/imagegenerationresponse.py: id: 53354cd0cbfc last_write_checksum: sha1:3fa255f2a2c362b63d45a017a2909b4d3b6c4b7f @@ -17004,8 +17004,8 @@ trackedFiles: pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/openrouter/images.py: id: c4d7adf63ae0 - last_write_checksum: sha1:edcdb20be2cc46c3134eb31e6c4056d8bb4a054f - pristine_git_object: a5056565f1d5f054fc29b08864ad0975e4d3e4c4 + last_write_checksum: sha1:d5e6197af83ae8efc13c2e3cfca9b770fd9024d9 + pristine_git_object: 48c93cd6a1d927df67f06c5f1c7e8b7ec5b4e280 src/openrouter/models/__init__.py: id: ed73b93abb3f last_write_checksum: sha1:932a790ae66ccd7d7022b39c659bcf72a664ebea @@ -19680,7 +19680,7 @@ examples: createImages: speakeasy-default-create-images: requestBody: - application/json: {"model": "bytedance-seed/seedream-4.5", "prompt": "a red panda astronaut floating in space, studio lighting"} + application/json: {"model": "bytedance-seed/seedream-4.5"} responses: "200": application/json: {"created": 1748372400, "data": [{}]} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 238e4ae9..9bd78786 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.241 + version: 1.3.242 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 16a52aac..b225889a 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -18082,7 +18082,7 @@ components: type: 'string' x-speakeasy-unknown-values: allow prompt: - description: 'Text description of the desired image' + description: 'Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead.' example: 'a red panda astronaut floating in space, studio lighting' minLength: 1 type: 'string' @@ -18147,7 +18147,6 @@ components: type: 'string' required: - 'model' - - 'prompt' type: 'object' ImageGenerationResponse: description: 'Image generation response' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8817746f..5102b55f 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:7f7594a96488070a331c79d089e447dec670c4b6c5d2131817a36c308cc6c839 - sourceBlobDigest: sha256:f5ad4581090d525c83cb0c48330156ea7a27956b7f6a98a2f41fa4a276d27bbc + sourceRevisionDigest: sha256:2b21bb87c330c1780b2a1f5e309f979389f502e6d87e365e66b90e3268e5eefb + sourceBlobDigest: sha256:357d639760437485808b53da41d4f635ebf74c25e93742b5af6ccfa0ecaa9fbc tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:7f7594a96488070a331c79d089e447dec670c4b6c5d2131817a36c308cc6c839 - sourceBlobDigest: sha256:f5ad4581090d525c83cb0c48330156ea7a27956b7f6a98a2f41fa4a276d27bbc + sourceRevisionDigest: sha256:2b21bb87c330c1780b2a1f5e309f979389f502e6d87e365e66b90e3268e5eefb + sourceBlobDigest: sha256:357d639760437485808b53da41d4f635ebf74c25e93742b5af6ccfa0ecaa9fbc codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:05a8368709d998b1baac96acfa5925e174e4e95049684059ccecb5f1d41ab315 + codeSamplesRevisionDigest: sha256:6f3bd53f4aa77372325d2b45d1e87a5ca0e48c953f5e00c22475bf013e1fb77d workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 87b59e93..1776437d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5179,4 +5179,14 @@ Based on: ### Generated - [python v1.3.241] . ### Releases -- [PyPI v1.3.241] https://pypi.org/project/openrouter/1.3.241 - . \ No newline at end of file +- [PyPI v1.3.241] https://pypi.org/project/openrouter/1.3.241 - . + +## 2026-12-04 03:01:22 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.242] . +### Releases +- [PyPI v1.3.242] https://pypi.org/project/openrouter/1.3.242 - . \ No newline at end of file diff --git a/docs/components/imagegenerationrequest.mdx b/docs/components/imagegenerationrequest.mdx index d03ddede..59515f18 100644 --- a/docs/components/imagegenerationrequest.mdx +++ b/docs/components/imagegenerationrequest.mdx @@ -19,7 +19,7 @@ Image generation request input | `n` | *Optional[int]* | ➖ | Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. | 1 | | `output_compression` | *Optional[int]* | ➖ | Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format "jpeg" or "webp"). | 100 | | `output_format` | [Optional[components.ImageGenerationRequestOutputFormat]](../components/imagegenerationrequestoutputformat.mdx) | ➖ | Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). | png | -| `prompt` | *str* | ✔️ | Text description of the desired image | a red panda astronaut floating in space, studio lighting | +| `prompt` | *Optional[str]* | ➖ | Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. | a red panda astronaut floating in space, studio lighting | | `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 | diff --git a/docs/sdks/images/README.mdx b/docs/sdks/images/README.mdx index a330c3f1..3ddc3b9e 100644 --- a/docs/sdks/images/README.mdx +++ b/docs/sdks/images/README.mdx @@ -45,7 +45,6 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `model` | *str* | ✔️ | The image generation model to use | bytedance-seed/seedream-4.5 | -| `prompt` | *str* | ✔️ | Text description of the desired image | a red panda astronaut floating in space, studio lighting | | `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.
| | @@ -58,6 +57,7 @@ with OpenRouter( | `n` | *Optional[int]* | ➖ | Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. | 1 | | `output_compression` | *Optional[int]* | ➖ | Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format "jpeg" or "webp"). | 100 | | `output_format` | [Optional[components.ImageGenerationRequestOutputFormat]](../../components/imagegenerationrequestoutputformat.mdx) | ➖ | Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). | png | +| `prompt` | *Optional[str]* | ➖ | Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. | a red panda astronaut floating in space, studio lighting | | `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 | diff --git a/pyproject.toml b/pyproject.toml index ab427095..16a010e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.241" +version = "1.3.242" 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 5e377057..5540ddae 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.241" +__version__: str = "1.3.242" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.241 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.242 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/imagegenerationrequest.py b/src/openrouter/components/imagegenerationrequest.py index 11844c4b..24d20db9 100644 --- a/src/openrouter/components/imagegenerationrequest.py +++ b/src/openrouter/components/imagegenerationrequest.py @@ -145,8 +145,6 @@ class ImageGenerationRequestTypedDict(TypedDict): model: str r"""The image generation model to use""" - prompt: str - r"""Text description of the desired image""" aspect_ratio: NotRequired[ImageGenerationRequestAspectRatio] r"""Normalized aspect ratio of the generated image. Providers clamp to their supported subset.""" background: NotRequired[ImageGenerationRequestBackground] @@ -165,6 +163,8 @@ class ImageGenerationRequestTypedDict(TypedDict): r"""Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\").""" output_format: NotRequired[ImageGenerationRequestOutputFormat] r"""Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`).""" + prompt: NotRequired[str] + r"""Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead.""" provider: NotRequired[ImageGenerationProviderPreferencesTypedDict] r"""Provider routing preferences and provider-specific passthrough configuration.""" quality: NotRequired[ImageGenerationRequestQuality] @@ -193,9 +193,6 @@ class ImageGenerationRequest(BaseModel): model: str r"""The image generation model to use""" - prompt: str - r"""Text description of the desired image""" - aspect_ratio: Optional[ImageGenerationRequestAspectRatio] = None r"""Normalized aspect ratio of the generated image. Providers clamp to their supported subset.""" @@ -223,6 +220,9 @@ class ImageGenerationRequest(BaseModel): output_format: Optional[ImageGenerationRequestOutputFormat] = None r"""Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`).""" + prompt: Optional[str] = None + r"""Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead.""" + provider: Optional[ImageGenerationProviderPreferences] = None r"""Provider routing preferences and provider-specific passthrough configuration.""" @@ -266,6 +266,7 @@ def serialize_model(self, handler): "n", "output_compression", "output_format", + "prompt", "provider", "quality", "resolution", diff --git a/src/openrouter/images.py b/src/openrouter/images.py index a5056565..48c93cd6 100644 --- a/src/openrouter/images.py +++ b/src/openrouter/images.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, @@ -35,6 +34,7 @@ def generate( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -64,7 +64,6 @@ def generate( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -81,6 +80,7 @@ def generate( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -102,7 +102,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, @@ -120,6 +119,7 @@ def generate( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -149,7 +149,6 @@ def generate( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -166,6 +165,7 @@ def generate( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -187,7 +187,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, @@ -205,6 +204,7 @@ def generate( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -237,7 +237,6 @@ def generate( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -254,6 +253,7 @@ def generate( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -274,7 +274,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, @@ -292,6 +291,7 @@ def generate( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -324,7 +324,6 @@ def generate( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -341,6 +340,7 @@ def generate( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -576,7 +576,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, @@ -594,6 +593,7 @@ async def generate_async( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -623,7 +623,6 @@ async def generate_async( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -640,6 +639,7 @@ async def generate_async( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -661,7 +661,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, @@ -679,6 +678,7 @@ async def generate_async( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -708,7 +708,6 @@ async def generate_async( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -725,6 +724,7 @@ async def generate_async( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -746,7 +746,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, @@ -764,6 +763,7 @@ async def generate_async( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -796,7 +796,6 @@ async def generate_async( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -813,6 +812,7 @@ async def generate_async( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. @@ -833,7 +833,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, @@ -851,6 +850,7 @@ async def generate_async( n: Optional[int] = None, output_compression: Optional[int] = None, output_format: Optional[components.ImageGenerationRequestOutputFormat] = None, + prompt: Optional[str] = None, provider: Optional[ Union[ components.ImageGenerationProviderPreferences, @@ -883,7 +883,6 @@ async def generate_async( Generates an image from a text prompt via the image generation router :param model: The image generation model to use - :param prompt: Text description of the desired image :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. @@ -900,6 +899,7 @@ async def generate_async( :param n: Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. :param output_compression: Compression level (0-100) for jpeg/webp output. Ignored by providers without a compression knob; providers that honor it may reject it with other output formats (e.g. OpenAI requires output_format \"jpeg\" or \"webp\"). :param output_format: Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. GIF produces an animation on models that support it (OpenAI gpt-image-2.6; see `frame_count`). + :param prompt: Text description of the desired image. Required by every model except image-only tools such as background removal, which reject requests without an input image instead. :param provider: Provider routing preferences and provider-specific passthrough configuration. :param quality: Rendering quality. Providers without a quality knob ignore this. :param resolution: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. diff --git a/uv.lock b/uv.lock index 687d7fcb..3bdfc1bb 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.241" +version = "1.3.242" source = { editable = "." } dependencies = [ { name = "httpcore" },