chore: 🐝 Update SDK - Generate (spec change merged) 0.11.29 (#446)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-07-14 14:53:50 +00:00
committed by GitHub
co-authored by speakeasybot speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent 44313b0aa3
commit 2a65de50d3
14 changed files with 128 additions and 90 deletions
+28 -23
View File
@@ -1,19 +1,19 @@
lockVersion: 2.0.0 lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828 id: c48cf606-fb42-4a45-9c23-8f0555307828
management: management:
docChecksum: 913314e7b77524966693bb56c9a3dd24 docChecksum: ff4478e1428e58273d7375ea639734d6
docVersion: 1.0.0 docVersion: 1.0.0
speakeasyVersion: 1.787.0 speakeasyVersion: 1.787.0
generationVersion: 2.914.0 generationVersion: 2.914.0
releaseVersion: 0.11.28 releaseVersion: 0.11.29
configChecksum: ce48138720beb4eb8841b187c03d254f configChecksum: e092e139147af5b5a502f15607d75192
repoURL: https://github.com/OpenRouterTeam/python-sdk.git repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true published: true
persistentEdits: persistentEdits:
generation_id: e656f374-a717-4315-90c0-6ee70ed0cf9c generation_id: d53fc2a4-a065-484e-b315-dc8906615c95
pristine_commit_hash: 3d5b10a16d484690e232f230a59576340aa52303 pristine_commit_hash: a593a152775480385c6cd2612c40dfb00014f443
pristine_tree_hash: f9fc6333f4a8952a56a6ca33eb92a50cc9b98d90 pristine_tree_hash: 4c87fa8a5b2aa4e90475f48c263b2f8da0222530
features: features:
python: python:
acceptHeaders: 3.0.0 acceptHeaders: 3.0.0
@@ -3890,12 +3890,12 @@ trackedFiles:
pristine_git_object: 3d340325d192b54a5d039336cce2bd35d12445ac pristine_git_object: 3d340325d192b54a5d039336cce2bd35d12445ac
docs/components/pricing.mdx: docs/components/pricing.mdx:
id: 6816d700f8b1 id: 6816d700f8b1
last_write_checksum: sha1:c9f49a270c1ddcaf2b354b2c0f7ceb277ca5eff4 last_write_checksum: sha1:4b1943b79c3f1b054236d4e35f843b91108decd0
pristine_git_object: 0ca9bdf9bf2b1909a4a78e99b58fde78b311becd pristine_git_object: e60ec6cfd7c0882a02067bfbe246e5cf6d5208c0
docs/components/pricingoverride.mdx: docs/components/pricingoverride.mdx:
id: 74675f38c1c6 id: 74675f38c1c6
last_write_checksum: sha1:5e64e9edbb013f04ee3741fe7c5dbd2fa54b544b last_write_checksum: sha1:ca4bf606df26dd9e2b636d7d9e9f0fd183b21145
pristine_git_object: f8291256ac4a4aeed8bf79f1bad1e3b45cbaa354 pristine_git_object: 5fb1b765b2b0e46d40042f341bbcc91aa0d92762
docs/components/promptcachebreakpoint.mdx: docs/components/promptcachebreakpoint.mdx:
id: c135956dc623 id: c135956dc623
last_write_checksum: sha1:1b0c9884eb9b6fe1d4fdf822c75cb566ead67e07 last_write_checksum: sha1:1b0c9884eb9b6fe1d4fdf822c75cb566ead67e07
@@ -3974,8 +3974,8 @@ trackedFiles:
pristine_git_object: 4498d08fd82f26a210eeed2b9659e6a0b321f9ef pristine_git_object: 4498d08fd82f26a210eeed2b9659e6a0b321f9ef
docs/components/publicpricing.mdx: docs/components/publicpricing.mdx:
id: 61fb18b7ff94 id: 61fb18b7ff94
last_write_checksum: sha1:53550f414931189b91a148ca9039aefb5899a7ee last_write_checksum: sha1:e241420249fcbd1bf515b0f5e84934de0b207948
pristine_git_object: 4a17b2b3dd05ea85ea9847689c13692540007f07 pristine_git_object: 894ca95c033795d50895fec5b8a6a18cd4a459c3
docs/components/quantization.mdx: docs/components/quantization.mdx:
id: 9d062e4ee362 id: 9d062e4ee362
last_write_checksum: sha1:4cb3588933fe1ca8592669f8ec1bef1cf0986e28 last_write_checksum: sha1:4cb3588933fe1ca8592669f8ec1bef1cf0986e28
@@ -6666,8 +6666,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml: pyproject.toml:
id: 5d07e7d72637 id: 5d07e7d72637
last_write_checksum: sha1:04c19e27f55c549187e8134f7ff3696cd428f3df last_write_checksum: sha1:1117ced9033fbecc539bceaa0497773110a561fa
pristine_git_object: 38e011e2029916eabc14394ca864b6516da19017 pristine_git_object: 390707512d3febdc96fb763f9d077eee7567d046
scripts/prepare_readme.py: scripts/prepare_readme.py:
id: e0c5957a6035 id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6694,8 +6694,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py: src/openrouter/_version.py:
id: d8d15ad6c586 id: d8d15ad6c586
last_write_checksum: sha1:fd94190abbfad4aff1ecc18a06a3b466ddd7c2b8 last_write_checksum: sha1:fda5045f9e84313bfc3c002291fef7a1dba3ee40
pristine_git_object: fb15497c9ae07185c9379f5151156e976ce297f5 pristine_git_object: 86673258f99094629fb4fd3a5c17d5f944bf63fd
src/openrouter/analytics.py: src/openrouter/analytics.py:
id: cb406b5aaabb id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841 last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
@@ -8358,8 +8358,8 @@ trackedFiles:
pristine_git_object: 90bdb267893360608210843a5da0d5d68e80d41e pristine_git_object: 90bdb267893360608210843a5da0d5d68e80d41e
src/openrouter/components/pricingoverride.py: src/openrouter/components/pricingoverride.py:
id: 8984e4cc7422 id: 8984e4cc7422
last_write_checksum: sha1:0e2c06a0d510bb2fcf64b03f74c693f26c9825ad last_write_checksum: sha1:0f72b9806164907aacce785f2d0c79a3e9374ac9
pristine_git_object: 21c25933126937fe7c1d10898a42bbe711cf7b9f pristine_git_object: a7c4599ac6ab794f54968f12cd6b15c3137a5159
src/openrouter/components/promptcachebreakpoint.py: src/openrouter/components/promptcachebreakpoint.py:
id: f1e589a13300 id: f1e589a13300
last_write_checksum: sha1:458ef5170c7c9ea1367dcfb090b1b28333aff73d last_write_checksum: sha1:458ef5170c7c9ea1367dcfb090b1b28333aff73d
@@ -8402,12 +8402,12 @@ trackedFiles:
pristine_git_object: 1798ae9dd8c2e4b629bb99cc5c643827895e8231 pristine_git_object: 1798ae9dd8c2e4b629bb99cc5c643827895e8231
src/openrouter/components/publicendpoint.py: src/openrouter/components/publicendpoint.py:
id: 848aa2ef9129 id: 848aa2ef9129
last_write_checksum: sha1:a94a8a30e3656955780285fa004a2b7e5d162c57 last_write_checksum: sha1:cfd3d1e8d5c62bbd494bd35e92d4d574103a189a
pristine_git_object: b647b5f88242565b228e6d0bf11d151e6650f6f8 pristine_git_object: f91d6ae5aa526c51cf218eaaed2cb77514737ae8
src/openrouter/components/publicpricing.py: src/openrouter/components/publicpricing.py:
id: 96d115d83cc5 id: 96d115d83cc5
last_write_checksum: sha1:a3733ee6d92eda73562ea1fa2bc834e3a14ac6db last_write_checksum: sha1:fd8c320ac83b282eaf2405045329b55076d4311a
pristine_git_object: 037f4b4e9aa72510a4021e695fe39516eb88d1f3 pristine_git_object: 34b9d18bf50bcce3c150fffff684f41e8e79a2bd
src/openrouter/components/quantization.py: src/openrouter/components/quantization.py:
id: bde317b3d703 id: bde317b3d703
last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d
@@ -11147,4 +11147,9 @@ examples:
examplesVersion: 1.0.2 examplesVersion: 1.0.2
releaseNotes: | releaseNotes: |
## Python SDK Changes: ## Python SDK Changes:
* `open_router.images.generate()`: `response` **Changed** * `open_router.embeddings.list_models()`: `response.data[].pricing.overrides[]` **Changed**
* `open_router.endpoints.list_zdr_endpoints()`: `response.data[].pricing.overrides[]` **Changed**
* `open_router.endpoints.list()`: `response.data.endpoints[].pricing.overrides[]` **Changed**
* `open_router.models.get()`: `response.data.pricing.overrides[]` **Changed**
* `open_router.models.list()`: `response.data[].pricing.overrides[]` **Changed**
* `open_router.models.list_for_user()`: `response.data[].pricing.overrides[]` **Changed**
+1 -1
View File
@@ -36,7 +36,7 @@ generation:
documentation: mintlify documentation: mintlify
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.11.28 version: 0.11.29
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
+12 -3
View File
@@ -18295,7 +18295,7 @@ components:
type: object type: object
PricingOverride: PricingOverride:
description: >- description: >-
A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price. A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.
example: example:
completion: '0.00002' completion: '0.00002'
min_prompt_tokens: 200000 min_prompt_tokens: 200000
@@ -18327,6 +18327,15 @@ components:
prompt: prompt:
description: Overridden price in USD per token for prompt (input) processing description: Overridden price in USD per token for prompt (input) processing
type: string type: string
utc_end:
description: 'Condition: exclusive end of a daily UTC time window as an HHMM clock number (e.g. 400 = 04:00)'
format: double
type: number
utc_start:
description: >-
Condition: inclusive start of a daily UTC time window as an HHMM clock number (e.g. 100 = 01:00, 1030 = 10:30). The entry applies while the current UTC time is inside the half-open window [utc_start, utc_end), which may wrap past midnight (utc_start > utc_end).
format: double
type: number
type: object type: object
PromptCacheBreakpoint: PromptCacheBreakpoint:
description: >- description: >-
@@ -19438,7 +19447,7 @@ components:
type: string type: string
overrides: overrides:
description: >- description: >-
Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.
items: items:
$ref: '#/components/schemas/PricingOverride' $ref: '#/components/schemas/PricingOverride'
type: array type: array
@@ -19561,7 +19570,7 @@ components:
type: string type: string
overrides: overrides:
description: >- description: >-
Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.
items: items:
$ref: '#/components/schemas/PricingOverride' $ref: '#/components/schemas/PricingOverride'
type: array type: array
+5 -5
View File
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources: sources:
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:edca79a14bbe673bb4bb252f55acbe2d94ac37355ff7dace80c025796f462cec sourceRevisionDigest: sha256:bd088c96e6b4db61858c4c25ba4a2276bd36fec50b25bc32d1121c7ab534afa4
sourceBlobDigest: sha256:0d80dbc0f8174d90dd172c8c20c8c2aa51e915a33a0bdef18806f2bc5f215ba4 sourceBlobDigest: sha256:bf34b1b3df01fa14f7be4166938bbbd81645bc8f1045b09e547c9f9fae84f890
tags: tags:
- latest - latest
- 1.0.0 - 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router: open-router:
source: OpenRouter API source: OpenRouter API
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:edca79a14bbe673bb4bb252f55acbe2d94ac37355ff7dace80c025796f462cec sourceRevisionDigest: sha256:bd088c96e6b4db61858c4c25ba4a2276bd36fec50b25bc32d1121c7ab534afa4
sourceBlobDigest: sha256:0d80dbc0f8174d90dd172c8c20c8c2aa51e915a33a0bdef18806f2bc5f215ba4 sourceBlobDigest: sha256:bf34b1b3df01fa14f7be4166938bbbd81645bc8f1045b09e547c9f9fae84f890
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:2f083adce0aad1ea67dd838546080b632140c054b28495cc56c4f449cfc35f2e codeSamplesRevisionDigest: sha256:7273c5d01f944ef1d07660238a38770b6cf0bcf8fe421b90c142f70bd9182305
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.787.0 speakeasyVersion: 1.787.0
+11 -1
View File
@@ -388,4 +388,14 @@ Based on:
### Generated ### Generated
- [python v0.11.28] . - [python v0.11.28] .
### Releases ### Releases
- [PyPI v0.11.28] https://pypi.org/project/openrouter/0.11.28 - . - [PyPI v0.11.28] https://pypi.org/project/openrouter/0.11.28 - .
## 2026-07-14 14:49:30
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.29] .
### Releases
- [PyPI v0.11.29] https://pypi.org/project/openrouter/0.11.29 - .
+18 -18
View File
@@ -4,21 +4,21 @@ title: "Pricing"
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token | | `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token | | `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token |
| `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation | | `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation |
| `discount` | *Optional[float]* | :heavy_minus_sign: | Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) | | `discount` | *Optional[float]* | :heavy_minus_sign: | Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) |
| `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image | | `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image | | `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token | | `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. | | `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. |
| `input_cache_write_1h` | *Optional[str]* | :heavy_minus_sign: | Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. | | `input_cache_write_1h` | *Optional[str]* | :heavy_minus_sign: | Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token | | `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token |
| `overrides` | List[[components.PricingOverride](../components/pricingoverride.mdx)] | :heavy_minus_sign: | Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. | | `overrides` | List[[components.PricingOverride](../components/pricingoverride.mdx)] | :heavy_minus_sign: | Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. |
| `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing | | `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing |
| `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request | | `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search | | `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
+13 -11
View File
@@ -2,18 +2,20 @@
title: "PricingOverride" title: "PricingOverride"
--- ---
A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price. A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per audio input token | | `audio` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per audio input token |
| `completion` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per token for completion (output) generation | | `completion` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per token for completion (output) generation |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per cached audio input token | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per cached audio input token |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per cached input token (read) | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per cached input token (read) |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per cache-write token | | `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per cache-write token |
| `input_cache_write_1h` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per 1-hour cache-write token | | `input_cache_write_1h` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per 1-hour cache-write token |
| `min_prompt_tokens` | *Optional[float]* | :heavy_minus_sign: | Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold | | `min_prompt_tokens` | *Optional[float]* | :heavy_minus_sign: | Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold |
| `prompt` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per token for prompt (input) processing | | `prompt` | *Optional[str]* | :heavy_minus_sign: | Overridden price in USD per token for prompt (input) processing |
| `utc_end` | *Optional[float]* | :heavy_minus_sign: | Condition: exclusive end of a daily UTC time window as an HHMM clock number (e.g. 400 = 04:00) |
| `utc_start` | *Optional[float]* | :heavy_minus_sign: | Condition: inclusive start of a daily UTC time window as an HHMM clock number (e.g. 100 = 01:00, 1030 = 10:30). The entry applies while the current UTC time is inside the half-open window [utc_start, utc_end), which may wrap past midnight (utc_start > utc_end). |
+18 -18
View File
@@ -7,21 +7,21 @@ Pricing information for the model
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token | | `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token | | `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token |
| `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation | | `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation |
| `discount` | *Optional[float]* | :heavy_minus_sign: | Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) | | `discount` | *Optional[float]* | :heavy_minus_sign: | Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) |
| `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image | | `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image | | `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token | | `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. | | `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. |
| `input_cache_write_1h` | *Optional[str]* | :heavy_minus_sign: | Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. | | `input_cache_write_1h` | *Optional[str]* | :heavy_minus_sign: | Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token | | `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token |
| `overrides` | List[[components.PricingOverride](../components/pricingoverride.mdx)] | :heavy_minus_sign: | Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. | | `overrides` | List[[components.PricingOverride](../components/pricingoverride.mdx)] | :heavy_minus_sign: | Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. |
| `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing | | `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing |
| `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request | | `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search | | `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "openrouter" name = "openrouter"
version = "0.11.28" version = "0.11.29"
description = "Official Python Client SDK for OpenRouter." description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },] authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md" readme = "README-PYPI.md"
+2 -2
View File
@@ -3,10 +3,10 @@
import importlib.metadata import importlib.metadata
__title__: str = "openrouter" __title__: str = "openrouter"
__version__: str = "0.11.28" __version__: str = "0.11.29"
__openapi_doc_version__: str = "1.0.0" __openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0" __gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 0.11.28 2.914.0 1.0.0 openrouter" __user_agent__: str = "speakeasy-sdk/python 0.11.29 2.914.0 1.0.0 openrouter"
try: try:
if __package__ is not None: if __package__ is not None:
+14 -2
View File
@@ -8,7 +8,7 @@ from typing_extensions import NotRequired, TypedDict
class PricingOverrideTypedDict(TypedDict): class PricingOverrideTypedDict(TypedDict):
r"""A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.""" r"""A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price."""
audio: NotRequired[str] audio: NotRequired[str]
r"""Overridden price in USD per audio input token""" r"""Overridden price in USD per audio input token"""
@@ -26,10 +26,14 @@ class PricingOverrideTypedDict(TypedDict):
r"""Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold""" r"""Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold"""
prompt: NotRequired[str] prompt: NotRequired[str]
r"""Overridden price in USD per token for prompt (input) processing""" r"""Overridden price in USD per token for prompt (input) processing"""
utc_end: NotRequired[float]
r"""Condition: exclusive end of a daily UTC time window as an HHMM clock number (e.g. 400 = 04:00)"""
utc_start: NotRequired[float]
r"""Condition: inclusive start of a daily UTC time window as an HHMM clock number (e.g. 100 = 01:00, 1030 = 10:30). The entry applies while the current UTC time is inside the half-open window [utc_start, utc_end), which may wrap past midnight (utc_start > utc_end)."""
class PricingOverride(BaseModel): class PricingOverride(BaseModel):
r"""A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.""" r"""A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price."""
audio: Optional[str] = None audio: Optional[str] = None
r"""Overridden price in USD per audio input token""" r"""Overridden price in USD per audio input token"""
@@ -55,6 +59,12 @@ class PricingOverride(BaseModel):
prompt: Optional[str] = None prompt: Optional[str] = None
r"""Overridden price in USD per token for prompt (input) processing""" r"""Overridden price in USD per token for prompt (input) processing"""
utc_end: Optional[float] = None
r"""Condition: exclusive end of a daily UTC time window as an HHMM clock number (e.g. 400 = 04:00)"""
utc_start: Optional[float] = None
r"""Condition: inclusive start of a daily UTC time window as an HHMM clock number (e.g. 100 = 01:00, 1030 = 10:30). The entry applies while the current UTC time is inside the half-open window [utc_start, utc_end), which may wrap past midnight (utc_start > utc_end)."""
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
optional_fields = set( optional_fields = set(
@@ -67,6 +77,8 @@ class PricingOverride(BaseModel):
"input_cache_write_1h", "input_cache_write_1h",
"min_prompt_tokens", "min_prompt_tokens",
"prompt", "prompt",
"utc_end",
"utc_start",
] ]
) )
serialized = handler(self) serialized = handler(self)
+2 -2
View File
@@ -40,7 +40,7 @@ class PricingTypedDict(TypedDict):
internal_reasoning: NotRequired[str] internal_reasoning: NotRequired[str]
r"""Price in USD per internal reasoning token""" r"""Price in USD per internal reasoning token"""
overrides: NotRequired[List[PricingOverrideTypedDict]] overrides: NotRequired[List[PricingOverrideTypedDict]]
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: NotRequired[str] request: NotRequired[str]
r"""Price in USD per request""" r"""Price in USD per request"""
web_search: NotRequired[str] web_search: NotRequired[str]
@@ -88,7 +88,7 @@ class Pricing(BaseModel):
r"""Price in USD per internal reasoning token""" r"""Price in USD per internal reasoning token"""
overrides: Optional[List[PricingOverride]] = None overrides: Optional[List[PricingOverride]] = None
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: Optional[str] = None request: Optional[str] = None
r"""Price in USD per request""" r"""Price in USD per request"""
+2 -2
View File
@@ -38,7 +38,7 @@ class PublicPricingTypedDict(TypedDict):
internal_reasoning: NotRequired[str] internal_reasoning: NotRequired[str]
r"""Price in USD per internal reasoning token""" r"""Price in USD per internal reasoning token"""
overrides: NotRequired[List[PricingOverrideTypedDict]] overrides: NotRequired[List[PricingOverrideTypedDict]]
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: NotRequired[str] request: NotRequired[str]
r"""Price in USD per request""" r"""Price in USD per request"""
web_search: NotRequired[str] web_search: NotRequired[str]
@@ -88,7 +88,7 @@ class PublicPricing(BaseModel):
r"""Price in USD per internal reasoning token""" r"""Price in USD per internal reasoning token"""
overrides: Optional[List[PricingOverride]] = None overrides: Optional[List[PricingOverride]] = None
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.""" r"""Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: Optional[str] = None request: Optional[str] = None
r"""Price in USD per request""" r"""Price in USD per request"""
Generated
+1 -1
View File
@@ -213,7 +213,7 @@ wheels = [
[[package]] [[package]]
name = "openrouter" name = "openrouter"
version = "0.11.28" version = "0.11.29"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "httpcore" }, { name = "httpcore" },