diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 1d43f1ce..56ea3feb 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: d5a3ec2a2f3231fed2f45677f259857e
+ docChecksum: 4cecdf8377ee5221bad7f3dfb91e519e
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.1.51
- configChecksum: 45e455745a5b0cefe3f5991508bf8882
+ releaseVersion: 1.1.52
+ configChecksum: e5d3dce79fcb6f1aed5d0eec382c7eef
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 1427a618-ca26-4349-acd2-5c0ff34460b8
- pristine_commit_hash: c2193a959333ae529be400229bb91b7fb05ad557
- pristine_tree_hash: 0bfba425e328ca24b06be740ac16737e957a7079
+ generation_id: 49d4da65-daee-4c27-a619-226dde71b391
+ pristine_commit_hash: 6d3a8ff7de2e8bc45cd35d511eed03dca36d1686
+ pristine_tree_hash: c8d9ec3c0e50c912b19004832cd5c9ffffcfdea7
features:
python:
acceptHeaders: 3.0.0
@@ -2322,8 +2322,8 @@ trackedFiles:
pristine_git_object: bccd158982dba4b4ed810b98b5f7d4a6c04afaa7
docs/components/imagegenerationrequest.mdx:
id: b093cb0f5e81
- last_write_checksum: sha1:1bccab895149605ba994e84b202c1f7b50c6ccb2
- pristine_git_object: 36805ca3350396bfded85776a3fe88e268ca0a35
+ last_write_checksum: sha1:3bc4fcfbd60811c1b4f67b2b4a8dfd66631bbdbf
+ pristine_git_object: 96a06ccb53d71cbd38ba7b8aa2f4cf77773baffc
docs/components/imagegenerationrequestaspectratio.mdx:
id: bda89377f32d
last_write_checksum: sha1:9cc231ee222c01ce471ecff3804a9e5acb8a054f
@@ -7174,8 +7174,8 @@ trackedFiles:
pristine_git_object: 99ea282ff9a0a1fd1436d984b08b5bc387f9fce0
docs/sdks/images/README.mdx:
id: 534a6c102c4f
- last_write_checksum: sha1:1c0a9c704bdd9090f5a0a74f4d9ae0c4360707bb
- pristine_git_object: 4b3508543942b711f2d74df5436748e1815619e2
+ last_write_checksum: sha1:bb22509015ad414847d101ba719689163a7cd42a
+ pristine_git_object: f2b9be80c1eeca1c982f9a982803d011491f5a6a
docs/sdks/models/README.mdx:
id: 58f1ca464e0b
last_write_checksum: sha1:34535ca4139b5892da3c9beaa5636cd9d362399b
@@ -7234,8 +7234,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:cd8e3bf5db94ee7916d3c65088617f8d5875c70a
- pristine_git_object: 8201024e66de4070299ad8e0125305aaa9a9abf2
+ last_write_checksum: sha1:03398aba9b1908fec1d3681272d41752aceb15ec
+ pristine_git_object: 4ed2364928298757a211c6ea8bc63282cd6ee397
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7262,8 +7262,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:3cc95a2481cc6202a4261c4037643069c341fc30
- pristine_git_object: 4cd0a90d851502fb69253958653f48b8375ab4d5
+ last_write_checksum: sha1:c624e0975aa5787a8fd6553cb764523dbfb6b446
+ pristine_git_object: f3170bf2f8cfcbf5562941c9a3e5ebf7609546b5
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a
@@ -8354,8 +8354,8 @@ trackedFiles:
pristine_git_object: 940934fbdc3f2eb2bbb1823b02b986b32b889ee4
src/openrouter/components/imagegenerationrequest.py:
id: f8291a7be9a0
- last_write_checksum: sha1:48a9640c0b9f48833d5514c7671bfa4b76aac776
- pristine_git_object: 9f5f9caf2d762e3db6affdd2aa20612978821dee
+ last_write_checksum: sha1:f7225ba0f6ca57f86fb4c07e6ceeaf9a44a0f7df
+ pristine_git_object: 5c79bb3b4818e09784e44a8ea811492900763877
src/openrouter/components/imagegenerationresponse.py:
id: 53354cd0cbfc
last_write_checksum: sha1:53f1cde7b8bfe4f9e786a76f6e57b0a1f76aced2
@@ -9866,8 +9866,8 @@ trackedFiles:
pristine_git_object: 89560b566073785535643e694c112bedbd3db13d
src/openrouter/images.py:
id: c4d7adf63ae0
- last_write_checksum: sha1:277721bb6c89aabdc3fd5b8bbb73b9dc6e98d2f9
- pristine_git_object: 8a3080f7b51f197bb357e5e264b173d230b1f293
+ last_write_checksum: sha1:c794ec7ad6e3dcc1c57239b3b869aa628eb8a424
+ pristine_git_object: 29a8a6a34d931ba33dcbae8f1c3575f6f860be87
src/openrouter/models/__init__.py:
id: ed73b93abb3f
last_write_checksum: sha1:932a790ae66ccd7d7022b39c659bcf72a664ebea
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index eb3d699a..e344e07c 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.1.51
+ version: 1.1.52
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index da7f6d1c..00773588 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -1594,6 +1594,60 @@ components:
type:
- 'object'
- 'null'
+ AnthropicMessagesErrorResponse:
+ description: 'Error response from the Anthropic Messages API'
+ example:
+ error:
+ error_type: 'invalid_request'
+ message: 'Invalid request: messages field is required'
+ type: 'invalid_request_error'
+ request_id: null
+ type: 'error'
+ properties:
+ error:
+ properties:
+ error_type:
+ $ref: '#/components/schemas/ApiErrorType'
+ message:
+ type: 'string'
+ type:
+ enum:
+ - 'invalid_request_error'
+ - 'authentication_error'
+ - 'permission_error'
+ - 'not_found_error'
+ - 'rate_limit_error'
+ - 'api_error'
+ - 'overloaded_error'
+ - 'billing_error'
+ - 'timeout_error'
+ type: 'string'
+ x-speakeasy-unknown-values: allow
+ required:
+ - 'type'
+ - 'message'
+ type: 'object'
+ metadata:
+ additionalProperties: {}
+ type: 'object'
+ openrouter_metadata:
+ additionalProperties: {}
+ type:
+ - 'object'
+ - 'null'
+ request_id:
+ type:
+ - 'string'
+ - 'null'
+ type:
+ enum:
+ - 'error'
+ type: 'string'
+ required:
+ - 'type'
+ - 'error'
+ - 'request_id'
+ type: 'object'
AnthropicMessageUsageIteration:
allOf:
- $ref: '#/components/schemas/AnthropicBaseUsageIteration'
@@ -10421,7 +10475,7 @@ components:
example: 'bytedance-seed/seedream-4.5'
type: 'string'
'n':
- description: 'Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.'
+ description: '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.'
example: 1
type: 'integer'
output_compression:
@@ -12756,22 +12810,6 @@ components:
- 'delta'
- 'usage'
type: 'object'
- MessagesErrorDetail:
- example:
- error_type: 'invalid_request'
- message: 'Invalid request parameters'
- type: 'invalid_request_error'
- properties:
- error_type:
- $ref: '#/components/schemas/ApiErrorType'
- message:
- type: 'string'
- type:
- type: 'string'
- required:
- - 'type'
- - 'message'
- type: 'object'
MessagesErrorEvent:
description: 'Error event in the stream'
example:
@@ -12803,23 +12841,6 @@ components:
- 'type'
- 'error'
type: 'object'
- MessagesErrorResponse:
- example:
- error:
- message: 'Invalid request parameters'
- type: 'invalid_request_error'
- type: 'error'
- properties:
- error:
- $ref: '#/components/schemas/MessagesErrorDetail'
- type:
- enum:
- - 'error'
- type: 'string'
- required:
- - 'type'
- - 'error'
- type: 'object'
MessagesFallbackParam:
additionalProperties: {}
description: 'Fallback model to try when the primary model fails or refuses. Only the `model` field is supported; per-attempt overrides are rejected.'
@@ -33968,9 +33989,10 @@ paths:
error:
message: 'Invalid request: messages is required'
type: 'invalid_request_error'
+ request_id: null
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'Invalid request error'
'401':
content:
@@ -33979,9 +34001,10 @@ paths:
error:
message: 'Invalid API key'
type: 'authentication_error'
+ request_id: null
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'Authentication error'
'403':
content:
@@ -33991,46 +34014,26 @@ paths:
summary: 'Guardrail blocked the request'
value:
error:
- code: 403
message: 'Request blocked: prompt injection patterns detected'
- metadata:
- patterns:
- - 'ignore all previous instructions'
+ type: 'permission_error'
openrouter_metadata:
- attempt: 1
- endpoints:
- available:
- - model: 'openai/gpt-4o'
- provider: 'OpenAI'
- selected: false
- total: 1
- is_byok: false
pipeline:
- - data:
- action: 'blocked'
- detected: true
- engines:
- - 'regex'
- patterns:
- - 'ignore all previous instructions'
- guardrail_id: 'grd_abc123'
- guardrail_scope: 'api-key'
- name: 'regex_pi_detection'
+ - name: 'regex_pi_detection'
summary: 'Blocked: prompt injection detected (1 pattern matched)'
type: 'guardrail'
- region: 'iad'
- requested: 'openai/gpt-4o'
- strategy: 'direct'
- summary: 'available=1'
+ request_id: null
+ type: 'error'
insufficient-permissions:
summary: 'Insufficient permissions'
value:
error:
- code: 403
message: 'Only management keys can perform this operation'
+ type: 'permission_error'
+ request_id: null
+ type: 'error'
schema:
- $ref: '#/components/schemas/ForbiddenResponse'
- description: 'Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
+ description: 'Forbidden error'
'404':
content:
application/json:
@@ -34038,9 +34041,10 @@ paths:
error:
message: 'Model not found'
type: 'not_found_error'
+ request_id: 'gen-xxxxxxxxxxxxxxxxxxxxxxxx'
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'Not found error'
'429':
content:
@@ -34049,9 +34053,10 @@ paths:
error:
message: 'Rate limit exceeded'
type: 'rate_limit_error'
+ request_id: 'gen-xxxxxxxxxxxxxxxxxxxxxxxx'
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'Rate limit error'
'500':
content:
@@ -34060,9 +34065,10 @@ paths:
error:
message: 'Internal server error'
type: 'api_error'
+ request_id: 'gen-xxxxxxxxxxxxxxxxxxxxxxxx'
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'API error'
'503':
content:
@@ -34071,9 +34077,10 @@ paths:
error:
message: 'Service temporarily overloaded'
type: 'overloaded_error'
+ request_id: 'gen-xxxxxxxxxxxxxxxxxxxxxxxx'
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'Overloaded error'
'529':
content:
@@ -34082,9 +34089,10 @@ paths:
error:
message: 'Provider is temporarily overloaded'
type: 'overloaded_error'
+ request_id: 'gen-xxxxxxxxxxxxxxxxxxxxxxxx'
type: 'error'
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
+ $ref: '#/components/schemas/AnthropicMessagesErrorResponse'
description: 'Overloaded error'
summary: 'Create a message'
tags:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 5d320131..e054dbf1 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:a4ff9cdac037856134e26ec39004a5716b17f41b046ff520c477a361ed44ac12
- sourceBlobDigest: sha256:a117cf6bf6a8d9e31fc877ee6041dab1d6e493cf3d87d55f210267ea02faf406
+ sourceRevisionDigest: sha256:62c8d150a5709bef346fbd26459a107b1594eda0e28f9618e097a5629bc48e34
+ sourceBlobDigest: sha256:54207711992241a24d86e50a7bf0642b69f2f79a7a257f97c6ae23959c224257
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:a4ff9cdac037856134e26ec39004a5716b17f41b046ff520c477a361ed44ac12
- sourceBlobDigest: sha256:a117cf6bf6a8d9e31fc877ee6041dab1d6e493cf3d87d55f210267ea02faf406
+ sourceRevisionDigest: sha256:62c8d150a5709bef346fbd26459a107b1594eda0e28f9618e097a5629bc48e34
+ sourceBlobDigest: sha256:54207711992241a24d86e50a7bf0642b69f2f79a7a257f97c6ae23959c224257
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:d174b4f2fbf062af4e0c3cd180799bd33a007a5d772951dc5bc6a63ab341eb42
+ codeSamplesRevisionDigest: sha256:87944548e989b15861ef01f4ad683c4e9479cff0aca9416237c654c7c722cfa2
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 1bf4e781..eba63c29 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1299,4 +1299,14 @@ Based on:
### Generated
- [python v1.1.51] .
### Releases
-- [PyPI v1.1.51] https://pypi.org/project/openrouter/1.1.51 - .
\ No newline at end of file
+- [PyPI v1.1.51] https://pypi.org/project/openrouter/1.1.51 - .
+
+## 2026-08-13 03:21:27
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.1.52] .
+### Releases
+- [PyPI v1.1.52] https://pypi.org/project/openrouter/1.1.52 - .
\ No newline at end of file
diff --git a/docs/components/imagegenerationrequest.mdx b/docs/components/imagegenerationrequest.mdx
index 36805ca3..96a06ccb 100644
--- a/docs/components/imagegenerationrequest.mdx
+++ b/docs/components/imagegenerationrequest.mdx
@@ -13,7 +13,7 @@ Image generation request input
| `background` | [Optional[components.ImageGenerationRequestBackground]](../components/imagegenerationrequestbackground.mdx) | :heavy_minus_sign: | Background treatment. `transparent` requires an output_format that supports alpha (png or webp). | auto |
| `input_references` | List[[components.ContentPartImage](../components/contentpartimage.mdx)] | :heavy_minus_sign: | Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs. | |
| `model` | *str* | :heavy_check_mark: | The image generation model to use | bytedance-seed/seedream-4.5 |
-| `n` | *Optional[int]* | :heavy_minus_sign: | Number of images to generate (1-10). Providers that only support single-image generation reject n > 1. | 1 |
+| `n` | *Optional[int]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob. | 100 |
| `output_format` | [Optional[components.ImageGenerationRequestOutputFormat]](../components/imagegenerationrequestoutputformat.mdx) | :heavy_minus_sign: | 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`. | png |
| `prompt` | *str* | :heavy_check_mark: | Text description of the desired image | a red panda astronaut floating in space, studio lighting |
diff --git a/docs/sdks/images/README.mdx b/docs/sdks/images/README.mdx
index 4b350854..f2b9be80 100644
--- a/docs/sdks/images/README.mdx
+++ b/docs/sdks/images/README.mdx
@@ -52,7 +52,7 @@ with OpenRouter(
| `aspect_ratio` | [Optional[components.ImageGenerationRequestAspectRatio]](../../components/imagegenerationrequestaspectratio.mdx) | :heavy_minus_sign: | Normalized aspect ratio of the generated image. Providers clamp to their supported subset. | 16:9 |
| `background` | [Optional[components.ImageGenerationRequestBackground]](../../components/imagegenerationrequestbackground.mdx) | :heavy_minus_sign: | Background treatment. `transparent` requires an output_format that supports alpha (png or webp). | auto |
| `input_references` | List[[components.ContentPartImage](../../components/contentpartimage.mdx)] | :heavy_minus_sign: | Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs. | |
-| `n` | *Optional[int]* | :heavy_minus_sign: | Number of images to generate (1-10). Providers that only support single-image generation reject n > 1. | 1 |
+| `n` | *Optional[int]* | :heavy_minus_sign: | 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]* | :heavy_minus_sign: | Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob. | 100 |
| `output_format` | [Optional[components.ImageGenerationRequestOutputFormat]](../../components/imagegenerationrequestoutputformat.mdx) | :heavy_minus_sign: | 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`. | png |
| `provider` | [Optional[components.ImageGenerationProviderPreferences]](../../components/imagegenerationproviderpreferences.mdx) | :heavy_minus_sign: | Provider routing preferences and provider-specific passthrough configuration. | \{
"allow_fallbacks": false,
"only": [
"google-ai-studio"
]
} |
diff --git a/pyproject.toml b/pyproject.toml
index 8201024e..4ed23649 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.1.51"
+version = "1.1.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 4cd0a90d..f3170bf2 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "1.1.51"
+__version__: str = "1.1.52"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.1.51 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.1.52 2.914.0 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 9f5f9caf..5c79bb3b 100644
--- a/src/openrouter/components/imagegenerationrequest.py
+++ b/src/openrouter/components/imagegenerationrequest.py
@@ -103,7 +103,7 @@ class ImageGenerationRequestTypedDict(TypedDict):
input_references: NotRequired[List[ContentPartImageTypedDict]]
r"""Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs."""
n: NotRequired[int]
- r"""Number of images to generate (1-10). Providers that only support single-image generation reject n > 1."""
+ r"""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."""
output_compression: NotRequired[int]
r"""Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob."""
output_format: NotRequired[ImageGenerationRequestOutputFormat]
@@ -141,7 +141,7 @@ class ImageGenerationRequest(BaseModel):
r"""Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs."""
n: Optional[int] = None
- r"""Number of images to generate (1-10). Providers that only support single-image generation reject n > 1."""
+ r"""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."""
output_compression: Optional[int] = None
r"""Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob."""
diff --git a/src/openrouter/images.py b/src/openrouter/images.py
index 8a3080f7..29a8a6a3 100644
--- a/src/openrouter/images.py
+++ b/src/openrouter/images.py
@@ -64,7 +64,7 @@ def generate(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -131,7 +131,7 @@ def generate(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -201,7 +201,7 @@ def generate(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -270,7 +270,7 @@ def generate(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -544,7 +544,7 @@ async def generate_async(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -611,7 +611,7 @@ async def generate_async(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -681,7 +681,7 @@ async def generate_async(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
@@ -750,7 +750,7 @@ async def generate_async(
:param aspect_ratio: Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
:param background: Background treatment. `transparent` requires an output_format that supports alpha (png or webp).
:param input_references: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs.
- :param n: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1.
+ :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 webp/jpeg output. Ignored for png and by providers without a compression knob.
: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`.
:param provider: Provider routing preferences and provider-specific passthrough configuration.
diff --git a/uv.lock b/uv.lock
index 9c0ff0a1..f441e9a3 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.1.51"
+version = "1.1.52"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },