Compare commits

..
6 Commits
Author SHA1 Message Date
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
e1b89f5aaf chore: 🐝 Update SDK - Generate (spec change merged) 0.10.4 (#372)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 12:10:48 +00:00
32dd522d5a chore: update OpenAPI spec from monorepo (#371)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 12:04:34 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
eeb0373033 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.3 (#370)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 00:20:39 +00:00
facade7d00 chore: update OpenAPI spec from monorepo (#369)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 00:14:27 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
08e796401a chore: 🐝 Update SDK - Generate (spec change merged) 0.10.2 (#368)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-25 22:33:28 +00:00
f8e8ab669d chore: update OpenAPI spec from monorepo (#367)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-25 22:27:08 +00:00
16 changed files with 375 additions and 267 deletions
+33 -31
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: 277b2709d437113b43fcdc406e3c4442 docChecksum: 4fd4fe0bf7a8196c9e7a6eee1fe4a414
docVersion: 1.0.0 docVersion: 1.0.0
speakeasyVersion: 1.680.0 speakeasyVersion: 1.680.0
generationVersion: 2.788.4 generationVersion: 2.788.4
releaseVersion: 0.10.1 releaseVersion: 0.10.4
configChecksum: b1687c127d87a1ac114b35dd9b492f3c configChecksum: d9fd2d1bfcce20e4901d52e81a6f5ca7
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: 7445f129-ecfe-4ff4-b54d-4f9e27c9bb12 generation_id: 1ddaf948-46a3-4ca5-ade1-ab900963fba9
pristine_commit_hash: 24e0fd81404ca9b9cd9afc377950218983fd639b pristine_commit_hash: 3b78ff10c1872eac23efd487850624634d4f25b5
pristine_tree_hash: ab5a87f29d3595a758a09c58a6074bd453723e21 pristine_tree_hash: 1f1b736777953b5a4861091f9b22733093fc9946
features: features:
python: python:
acceptHeaders: 3.0.0 acceptHeaders: 3.0.0
@@ -2046,8 +2046,8 @@ trackedFiles:
pristine_git_object: 841d9210013aa9eac24702237c16d0aca12a985f pristine_git_object: 841d9210013aa9eac24702237c16d0aca12a985f
docs/components/imagegencompletedevent.md: docs/components/imagegencompletedevent.md:
id: 43f5718fe2c2 id: 43f5718fe2c2
last_write_checksum: sha1:650b4752a08040461390f10b30ceda0b5df1f0bb last_write_checksum: sha1:c69ebcd923faf4b7831c70ca19a62992006804c4
pristine_git_object: 33b0307acdb1bf725cd89c5adb39eb3e110ff876 pristine_git_object: 683545f58a32d3174edc2548652516d446f31cfb
docs/components/imagegencompletedeventtype.md: docs/components/imagegencompletedeventtype.md:
id: 84e07b20590e id: 84e07b20590e
last_write_checksum: sha1:2c301f011ef720a3d8c561c8823bcfb982934d16 last_write_checksum: sha1:2c301f011ef720a3d8c561c8823bcfb982934d16
@@ -2090,8 +2090,8 @@ trackedFiles:
pristine_git_object: a921a4c4cd5f75c926ba03263469315a14537160 pristine_git_object: a921a4c4cd5f75c926ba03263469315a14537160
docs/components/imagegenerationresponsedata.md: docs/components/imagegenerationresponsedata.md:
id: 6a33b08924d8 id: 6a33b08924d8
last_write_checksum: sha1:ddb47b0ec0e5854effe56ca1989b8206e0d7b56a last_write_checksum: sha1:e6df003afd8f77d5e98b6720c825818c229d4cee
pristine_git_object: c80a572552036e143d3b8827a84011d5f62083e9 pristine_git_object: bd99f56bb2c6f10a7f26e49dc81bf00a6436fe99
docs/components/imagegenerationservertool.md: docs/components/imagegenerationservertool.md:
id: 0ddff7f46134 id: 0ddff7f46134
last_write_checksum: sha1:02ee9876107578bd27eb9ba811439416b9e76a63 last_write_checksum: sha1:02ee9876107578bd27eb9ba811439416b9e76a63
@@ -2526,8 +2526,8 @@ trackedFiles:
pristine_git_object: cc928f671dcbde0ebe7ef10cef976333fa35cd68 pristine_git_object: cc928f671dcbde0ebe7ef10cef976333fa35cd68
docs/components/maxprice.md: docs/components/maxprice.md:
id: 15ed956070c8 id: 15ed956070c8
last_write_checksum: sha1:a6b154896d64cb9feac8742b812bf40951867375 last_write_checksum: sha1:dcd7d78e509fde879074c55d18f52f244cd6bb35
pristine_git_object: b932c8f3988960414d7cd0f2ac795f1cc3b58884 pristine_git_object: fdbe77b802746a777199ba4780a1f2981cc3f7c8
docs/components/mcpapprovalrequestitem.md: docs/components/mcpapprovalrequestitem.md:
id: 0d3537b2e5c8 id: 0d3537b2e5c8
last_write_checksum: sha1:d2c00357d59374eee2845918d50ab5125d9583be last_write_checksum: sha1:d2c00357d59374eee2845918d50ab5125d9583be
@@ -3750,8 +3750,8 @@ trackedFiles:
pristine_git_object: 685705c19f968d6408d3bfc3d398eddb2ef5e52a pristine_git_object: 685705c19f968d6408d3bfc3d398eddb2ef5e52a
docs/components/pricing.md: docs/components/pricing.md:
id: 15dca753d9eb id: 15dca753d9eb
last_write_checksum: sha1:11793d86b7506e8bfee21225071f1841bbb368ab last_write_checksum: sha1:80bb9085218cbe75ef0623b86bc9f52a354b0722
pristine_git_object: 084b83a2e83521084ef17c63e88007953e5d3170 pristine_git_object: 69ac72cf96ac924243230189563bbe6a6dcdfc6c
docs/components/promptinjectionscanscope.md: docs/components/promptinjectionscanscope.md:
id: 285ea7802dcd id: 285ea7802dcd
last_write_checksum: sha1:0fff83f064f6699f5a86c5068423c646a9fca69e last_write_checksum: sha1:0fff83f064f6699f5a86c5068423c646a9fca69e
@@ -3798,8 +3798,8 @@ trackedFiles:
pristine_git_object: 7d0edd22dafe693920f18e0c0c99b852c6b3bb57 pristine_git_object: 7d0edd22dafe693920f18e0c0c99b852c6b3bb57
docs/components/publicpricing.md: docs/components/publicpricing.md:
id: 9d43651da8ad id: 9d43651da8ad
last_write_checksum: sha1:c066038e95bcbaec6cb1eeb3b5657102c37ee5a7 last_write_checksum: sha1:a0307105d112c890670088159350ed59040629a8
pristine_git_object: b96d4af729e9e69d041122e88b11e82cd2db8878 pristine_git_object: 0746b9999a7aa39ce957aef7cf72235cba2f16a8
docs/components/quantization.md: docs/components/quantization.md:
id: 0d17b4a78828 id: 0d17b4a78828
last_write_checksum: sha1:992ee3fdd0f4e09c9f6e6426c413841fe34a86a5 last_write_checksum: sha1:992ee3fdd0f4e09c9f6e6426c413841fe34a86a5
@@ -6338,8 +6338,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml: pyproject.toml:
id: 5d07e7d72637 id: 5d07e7d72637
last_write_checksum: sha1:8223abd8e7463dfa2b2c1097670bb28b2ec73e68 last_write_checksum: sha1:dbca7fc02146c1734921186c4d38c7b79d45ee20
pristine_git_object: b98c0280ffbb42638747b1064375fa36f467223c pristine_git_object: 3810cc8259ef5c9b898e032d02eab740e919cebc
scripts/prepare_readme.py: scripts/prepare_readme.py:
id: e0c5957a6035 id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6366,8 +6366,8 @@ trackedFiles:
pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d
src/openrouter/_version.py: src/openrouter/_version.py:
id: d8d15ad6c586 id: d8d15ad6c586
last_write_checksum: sha1:856bdf17b7de36f6e1abd0b56f55bbc6093e4c68 last_write_checksum: sha1:d0f7c11c8db041c0c822a9857f4f223ba128b10a
pristine_git_object: ade61995259031f3789ff71f0cfd1d6ae4b39395 pristine_git_object: 3e75c5a73c2aa5f3313e1e19e11dfcb685f958e3
src/openrouter/analytics.py: src/openrouter/analytics.py:
id: cb406b5aaabb id: cb406b5aaabb
last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35 last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35
@@ -7326,16 +7326,16 @@ trackedFiles:
pristine_git_object: 5f17d77c25a82ad2bf7b1211d05ee665b6fee35a pristine_git_object: 5f17d77c25a82ad2bf7b1211d05ee665b6fee35a
src/openrouter/components/imagegencompletedevent.py: src/openrouter/components/imagegencompletedevent.py:
id: 7a791a02cb5b id: 7a791a02cb5b
last_write_checksum: sha1:2e5822401bac22b5936ed4787b3d648eed60e725 last_write_checksum: sha1:df249afb22b4d56c3493cf8ec506e7ecf06402a6
pristine_git_object: e5907de80032821f54ab0829729f137497b6f289 pristine_git_object: e767efe399701e27924a1fa2e98d44d78e3715a1
src/openrouter/components/imagegenerationrequest.py: src/openrouter/components/imagegenerationrequest.py:
id: f8291a7be9a0 id: f8291a7be9a0
last_write_checksum: sha1:bd9bc81281c9d034120f86b0eee96ed00ff38cce last_write_checksum: sha1:bd9bc81281c9d034120f86b0eee96ed00ff38cce
pristine_git_object: cd035aaead03f8181da12b8635f23fa7688d727f pristine_git_object: cd035aaead03f8181da12b8635f23fa7688d727f
src/openrouter/components/imagegenerationresponse.py: src/openrouter/components/imagegenerationresponse.py:
id: 53354cd0cbfc id: 53354cd0cbfc
last_write_checksum: sha1:e1c531b4a761668151800f450b82dfab0da00f77 last_write_checksum: sha1:073a770f1574629ec4e8ae59f6a365fbca9ace3f
pristine_git_object: deb67493a8ace61abf039d5d6d46b33e37a7c66c pristine_git_object: 64b059a152dab4754cdece4fb2021249f76444a7
src/openrouter/components/imagegenerationservertool.py: src/openrouter/components/imagegenerationservertool.py:
id: 9c95bc975f2e id: 9c95bc975f2e
last_write_checksum: sha1:b7e0d9db78b0b7662cd34a31e593842cea5ef990 last_write_checksum: sha1:b7e0d9db78b0b7662cd34a31e593842cea5ef990
@@ -7978,8 +7978,8 @@ trackedFiles:
pristine_git_object: f3d7756851495a1f1cdbf62fd62d20ff0ea07bf8 pristine_git_object: f3d7756851495a1f1cdbf62fd62d20ff0ea07bf8
src/openrouter/components/providerpreferences.py: src/openrouter/components/providerpreferences.py:
id: cdd58c8d664d id: cdd58c8d664d
last_write_checksum: sha1:6b45aaae052bcf64980242ec344fe385de94ebd3 last_write_checksum: sha1:f3d54af0f02fd2ae3f2fd0aba05c77419f79562a
pristine_git_object: 5145815e6196470f3f5f24893afdc4415d27c53e pristine_git_object: ce5d942a25ef1bda1af7d40e5c98418550fb34a3
src/openrouter/components/providerresponse.py: src/openrouter/components/providerresponse.py:
id: ad3887be54c5 id: ad3887be54c5
last_write_checksum: sha1:17b2491e58fea36851d21b85298a3480d98b9c37 last_write_checksum: sha1:17b2491e58fea36851d21b85298a3480d98b9c37
@@ -7994,12 +7994,12 @@ trackedFiles:
pristine_git_object: 4e1073b4e3c10943c7035376f9984cd6559653a2 pristine_git_object: 4e1073b4e3c10943c7035376f9984cd6559653a2
src/openrouter/components/publicendpoint.py: src/openrouter/components/publicendpoint.py:
id: 848aa2ef9129 id: 848aa2ef9129
last_write_checksum: sha1:a268ea8595c25267ae05b3a2ab9bc452b064c33f last_write_checksum: sha1:2e389b5e4301174b4c8aaa5e0c679d6872ddd67e
pristine_git_object: 6761c9129979d95e6f44c955e77a2d412bf0eb1b pristine_git_object: a7d3e523472feb11203aa79bd081fa87c0ed6503
src/openrouter/components/publicpricing.py: src/openrouter/components/publicpricing.py:
id: 96d115d83cc5 id: 96d115d83cc5
last_write_checksum: sha1:ccec3f6d6b07186a612c23561f2bbe6ecfd6839f last_write_checksum: sha1:1980193d2339dc13b08d1caabb235b0b8bcb8ce3
pristine_git_object: 42a29282d09996796b9e981b96a2772d08eea28c pristine_git_object: 09a1bdd6ec5d204533288516de6d01ae20be218f
src/openrouter/components/quantization.py: src/openrouter/components/quantization.py:
id: bde317b3d703 id: bde317b3d703
last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d
@@ -10559,4 +10559,6 @@ examples:
"500": "500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}} application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2 examplesVersion: 1.0.2
releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n* `open_router.tts.create_speech()`: \n * `request.provider.options` **Changed**\n* `open_router.chat.send()`: `response` **Changed**\n* `open_router.images.list_models()`: **Added**\n* `open_router.images.list_model_endpoints()`: **Added**\n* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Deleted** **Breaking** :warning:\n* `open_router.datasets.get_benchmarks_design_arena()`: **Deleted** **Breaking** :warning:\n* `open_router.classifications.get_task_classifications()`: **Added**\n* `open_router.benchmarks.get_benchmarks()`: **Added**\n* `open_router.images.generate()`: **Added**\n* `open_router.stt.create_transcription()`: \n * `request.provider.options` **Changed**\n* `open_router.byok.list()`: `request.provider` **Changed**\n* `open_router.embeddings.generate()`: `response.usage` **Changed**\n* `open_router.embeddings.list_models()`: `response.data.[].reasoning` **Added**\n* `open_router.models.get()`: `response.data.reasoning` **Added**\n* `open_router.models.list()`: \n * `request.sort` **Changed**\n * `response.data.[].reasoning` **Added**\n* `open_router.models.list_for_user()`: `response.data.[].reasoning` **Added**\n* `open_router.presets.create_presets_responses()`: `request` **Changed**\n* `open_router.video_generation.generate()`: \n * `request.provider.options` **Changed**\n" releaseNotes: |
## Python SDK Changes:
* `open_router.images.generate()`: `response` **Changed**
+1 -1
View File
@@ -32,7 +32,7 @@ generation:
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.10.1 version: 0.10.4
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
+94 -95
View File
@@ -3677,10 +3677,6 @@ components:
oneOf: oneOf:
- $ref: '#/components/schemas/ContainerAutoEnvironment' - $ref: '#/components/schemas/ContainerAutoEnvironment'
- $ref: '#/components/schemas/ContainerReferenceEnvironment' - $ref: '#/components/schemas/ContainerReferenceEnvironment'
BigNumberUnion:
description: Price per million prompt tokens
example: 1000
type: string
BooleanCapability: BooleanCapability:
description: A supported-or-not flag. Present means the parameter is accepted. description: A supported-or-not flag. Present means the parameter is accepted.
example: example:
@@ -9319,6 +9315,12 @@ components:
created: created:
description: Unix timestamp (seconds) when the image was generated description: Unix timestamp (seconds) when the image was generated
type: integer type: integer
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for
non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
type: type:
description: The event type description: The event type
enum: enum:
@@ -9478,6 +9480,12 @@ components:
b64_json: b64_json:
description: Base64-encoded image bytes description: Base64-encoded image bytes
type: string type: string
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG).
Present for non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
required: required:
- b64_json - b64_json
type: object type: object
@@ -18527,23 +18535,20 @@ components:
prompt and completion. prompt and completion.
properties: properties:
audio: audio:
allOf: description: Maximum price in USD per audio unit
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per audio unit
completion: completion:
allOf: description: Maximum price in USD per million completion tokens
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per million completion tokens
image: image:
allOf: description: Maximum price in USD per image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per image
prompt: prompt:
$ref: '#/components/schemas/BigNumberUnion' description: Maximum price in USD per million prompt tokens
type: string
request: request:
allOf: description: Maximum price in USD per request
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per request
type: object type: object
only: only:
description: >- description: >-
@@ -18865,60 +18870,57 @@ components:
pricing: pricing:
properties: properties:
audio: audio:
allOf: description: Price in USD per audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
audio_output: audio_output:
allOf: description: Price in USD per audio output token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
completion: completion:
allOf: description: Price in USD per token for completion (output) generation
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
discount: discount:
description: >-
Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 =
no discount, 1 = free)
format: double format: double
type: number type: number
image: image:
allOf: description: Price in USD per input image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_output: image_output:
allOf: description: Price in USD per output image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_token: image_token:
allOf: description: Price in USD per image token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_audio_cache: input_audio_cache:
allOf: description: Price in USD per cached audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_read: input_cache_read:
allOf: description: Price in USD per cached input token (read)
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_write: input_cache_write:
allOf: description: >-
- $ref: '#/components/schemas/BigNumberUnion' Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic),
- description: A number or string value representing a large number this is the default (5-minute) cache-write rate.
type: string
input_cache_write_1h:
description: >-
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.
type: string
internal_reasoning: internal_reasoning:
allOf: description: Price in USD per internal reasoning token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
prompt: prompt:
allOf: description: Price in USD per token for prompt (input) processing
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
request: request:
allOf: description: Price in USD per request
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
web_search: web_search:
allOf: description: Price in USD per web search
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
required: required:
- prompt - prompt
- completion - completion
@@ -18992,60 +18994,57 @@ components:
request: '0' request: '0'
properties: properties:
audio: audio:
allOf: description: Price in USD per audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
audio_output: audio_output:
allOf: description: Price in USD per audio output token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
completion: completion:
allOf: description: Price in USD per token for completion (output) generation
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
discount: discount:
description: >-
Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no
discount, 1 = free)
format: double format: double
type: number type: number
image: image:
allOf: description: Price in USD per input image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_output: image_output:
allOf: description: Price in USD per output image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_token: image_token:
allOf: description: Price in USD per image token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_audio_cache: input_audio_cache:
allOf: description: Price in USD per cached audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_read: input_cache_read:
allOf: description: Price in USD per cached input token (read)
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_write: input_cache_write:
allOf: description: >-
- $ref: '#/components/schemas/BigNumberUnion' Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this
- description: A number or string value representing a large number is the default (5-minute) cache-write rate.
type: string
input_cache_write_1h:
description: >-
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.
type: string
internal_reasoning: internal_reasoning:
allOf: description: Price in USD per internal reasoning token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
prompt: prompt:
allOf: description: Price in USD per token for prompt (input) processing
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
request: request:
allOf: description: Price in USD per request
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
web_search: web_search:
allOf: description: Price in USD per web search
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
required: required:
- prompt - prompt
- completion - completion
+86 -95
View File
@@ -3676,10 +3676,6 @@ components:
oneOf: oneOf:
- $ref: '#/components/schemas/ContainerAutoEnvironment' - $ref: '#/components/schemas/ContainerAutoEnvironment'
- $ref: '#/components/schemas/ContainerReferenceEnvironment' - $ref: '#/components/schemas/ContainerReferenceEnvironment'
BigNumberUnion:
description: Price per million prompt tokens
example: 1000
type: string
BooleanCapability: BooleanCapability:
description: A supported-or-not flag. Present means the parameter is accepted. description: A supported-or-not flag. Present means the parameter is accepted.
example: example:
@@ -9266,6 +9262,11 @@ components:
created: created:
description: Unix timestamp (seconds) when the image was generated description: Unix timestamp (seconds) when the image was generated
type: integer type: integer
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
type: type:
description: The event type description: The event type
enum: enum:
@@ -9424,6 +9425,11 @@ components:
b64_json: b64_json:
description: Base64-encoded image bytes description: Base64-encoded image bytes
type: string type: string
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
required: required:
- b64_json - b64_json
type: object type: object
@@ -18433,23 +18439,20 @@ components:
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
properties: properties:
audio: audio:
allOf: description: Maximum price in USD per audio unit
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per audio unit
completion: completion:
allOf: description: Maximum price in USD per million completion tokens
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per million completion tokens
image: image:
allOf: description: Maximum price in USD per image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per image
prompt: prompt:
$ref: '#/components/schemas/BigNumberUnion' description: Maximum price in USD per million prompt tokens
type: string
request: request:
allOf: description: Maximum price in USD per request
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: Price per request
type: object type: object
only: only:
description: >- description: >-
@@ -18768,60 +18771,54 @@ components:
pricing: pricing:
properties: properties:
audio: audio:
allOf: description: Price in USD per audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
audio_output: audio_output:
allOf: description: Price in USD per audio output token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
completion: completion:
allOf: description: Price in USD per token for completion (output) generation
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
discount: discount:
description: >-
Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)
format: double format: double
type: number type: number
image: image:
allOf: description: Price in USD per input image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_output: image_output:
allOf: description: Price in USD per output image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_token: image_token:
allOf: description: Price in USD per image token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_audio_cache: input_audio_cache:
allOf: description: Price in USD per cached audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_read: input_cache_read:
allOf: description: Price in USD per cached input token (read)
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_write: input_cache_write:
allOf: description: >-
- $ref: '#/components/schemas/BigNumberUnion' 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.
- description: A number or string value representing a large number type: string
input_cache_write_1h:
description: >-
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.
type: string
internal_reasoning: internal_reasoning:
allOf: description: Price in USD per internal reasoning token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
prompt: prompt:
allOf: description: Price in USD per token for prompt (input) processing
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
request: request:
allOf: description: Price in USD per request
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
web_search: web_search:
allOf: description: Price in USD per web search
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
required: required:
- prompt - prompt
- completion - completion
@@ -18891,60 +18888,54 @@ components:
request: '0' request: '0'
properties: properties:
audio: audio:
allOf: description: Price in USD per audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
audio_output: audio_output:
allOf: description: Price in USD per audio output token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
completion: completion:
allOf: description: Price in USD per token for completion (output) generation
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
discount: discount:
description: >-
Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)
format: double format: double
type: number type: number
image: image:
allOf: description: Price in USD per input image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_output: image_output:
allOf: description: Price in USD per output image
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
image_token: image_token:
allOf: description: Price in USD per image token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_audio_cache: input_audio_cache:
allOf: description: Price in USD per cached audio input token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_read: input_cache_read:
allOf: description: Price in USD per cached input token (read)
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
input_cache_write: input_cache_write:
allOf: description: >-
- $ref: '#/components/schemas/BigNumberUnion' 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.
- description: A number or string value representing a large number type: string
input_cache_write_1h:
description: >-
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.
type: string
internal_reasoning: internal_reasoning:
allOf: description: Price in USD per internal reasoning token
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
prompt: prompt:
allOf: description: Price in USD per token for prompt (input) processing
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
request: request:
allOf: description: Price in USD per request
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
web_search: web_search:
allOf: description: Price in USD per web search
- $ref: '#/components/schemas/BigNumberUnion' type: string
- description: A number or string value representing a large number
required: required:
- prompt - prompt
- completion - completion
+6 -6
View File
@@ -2,20 +2,20 @@ speakeasyVersion: 1.680.0
sources: sources:
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:8a4df86f3d3822da1bc0bd41158b6e2674f517dde9d9747c7fd6aeae92531d65 sourceRevisionDigest: sha256:04b1417598cd30a7ea0db043f95705d05abee22a86750cb49d1f872ff0aac1a0
sourceBlobDigest: sha256:6ced93728e355c985d439c194e9d8ee1593b92f6f809f1315be8847686c46174 sourceBlobDigest: sha256:8af92c8bafad9bb39a0d61b02a3ac2a6002ba1f37a620db676a62529f844cf7c
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1782424634 - speakeasy-sdk-regen-1782475583
- 1.0.0 - 1.0.0
targets: 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:8a4df86f3d3822da1bc0bd41158b6e2674f517dde9d9747c7fd6aeae92531d65 sourceRevisionDigest: sha256:04b1417598cd30a7ea0db043f95705d05abee22a86750cb49d1f872ff0aac1a0
sourceBlobDigest: sha256:6ced93728e355c985d439c194e9d8ee1593b92f6f809f1315be8847686c46174 sourceBlobDigest: sha256:8af92c8bafad9bb39a0d61b02a3ac2a6002ba1f37a620db676a62529f844cf7c
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:50757f7fdc830970d172346b5b1a7308c4861a13f531f093a629e1ac180687ee codeSamplesRevisionDigest: sha256:9eb822c39464f6b8ff4cbbe3e2f0bacc6abed49eea905c340948a45c826f7dc0
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.680.0 speakeasyVersion: 1.680.0
+31 -1
View File
@@ -38,4 +38,34 @@ Based on:
### Generated ### Generated
- [python v0.10.1] . - [python v0.10.1] .
### Releases ### Releases
- [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - . - [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - .
## 2026-06-25 22:28:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.2] .
### Releases
- [PyPI v0.10.2] https://pypi.org/project/openrouter/0.10.2 - .
## 2026-06-26 00:15:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.3] .
### Releases
- [PyPI v0.10.3] https://pypi.org/project/openrouter/0.10.3 - .
## 2026-06-26 12:06:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.4] .
### Releases
- [PyPI v0.10.4] https://pypi.org/project/openrouter/0.10.4 - .
+17 -16
View File
@@ -3,19 +3,20 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 | | `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `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: | N/A | 1000 | | `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `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. |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `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. |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 | | `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
+17 -16
View File
@@ -5,19 +5,20 @@ Pricing information for the model
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio input token |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per audio output token |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 | | `completion` | *str* | :heavy_check_mark: | Price in USD per token for completion (output) generation |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `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: | N/A | 1000 | | `image` | *Optional[str]* | :heavy_minus_sign: | Price in USD per input image |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `image_output` | *Optional[str]* | :heavy_minus_sign: | Price in USD per output image |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `image_token` | *Optional[str]* | :heavy_minus_sign: | Price in USD per image token |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached audio input token |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `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. |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `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. |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 | | `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `prompt` | *str* | :heavy_check_mark: | Price in USD per token for prompt (input) processing |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `request` | *Optional[str]* | :heavy_minus_sign: | Price in USD per request |
| `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.10.1" version = "0.10.4"
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.10.1" __version__: str = "0.10.4"
__openapi_doc_version__: str = "1.0.0" __openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.788.4" __gen_version__: str = "2.788.4"
__user_agent__: str = "speakeasy-sdk/python 0.10.1 2.788.4 1.0.0 openrouter" __user_agent__: str = "speakeasy-sdk/python 0.10.4 2.788.4 1.0.0 openrouter"
try: try:
if __package__ is not None: if __package__ is not None:
@@ -20,6 +20,8 @@ class ImageGenCompletedEventTypedDict(TypedDict):
r"""Unix timestamp (seconds) when the image was generated""" r"""Unix timestamp (seconds) when the image was generated"""
type: ImageGenCompletedEventType type: ImageGenCompletedEventType
r"""The event type""" r"""The event type"""
media_type: NotRequired[str]
r"""Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`)."""
usage: NotRequired[ImageGenerationUsageTypedDict] usage: NotRequired[ImageGenerationUsageTypedDict]
r"""Token and cost usage for the image generation request, when available""" r"""Token and cost usage for the image generation request, when available"""
@@ -36,5 +38,8 @@ class ImageGenCompletedEvent(BaseModel):
type: ImageGenCompletedEventType type: ImageGenCompletedEventType
r"""The event type""" r"""The event type"""
media_type: Optional[str] = None
r"""Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`)."""
usage: Optional[ImageGenerationUsage] = None usage: Optional[ImageGenerationUsage] = None
r"""Token and cost usage for the image generation request, when available""" r"""Token and cost usage for the image generation request, when available"""
@@ -10,12 +10,17 @@ from typing_extensions import NotRequired, TypedDict
class ImageGenerationResponseDataTypedDict(TypedDict): class ImageGenerationResponseDataTypedDict(TypedDict):
b64_json: str b64_json: str
r"""Base64-encoded image bytes""" r"""Base64-encoded image bytes"""
media_type: NotRequired[str]
r"""Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`)."""
class ImageGenerationResponseData(BaseModel): class ImageGenerationResponseData(BaseModel):
b64_json: str b64_json: str
r"""Base64-encoded image bytes""" r"""Base64-encoded image bytes"""
media_type: Optional[str] = None
r"""Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`)."""
class ImageGenerationResponseTypedDict(TypedDict): class ImageGenerationResponseTypedDict(TypedDict):
r"""Image generation response""" r"""Image generation response"""
@@ -52,26 +52,34 @@ class MaxPriceTypedDict(TypedDict):
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
audio: NotRequired[str] audio: NotRequired[str]
r"""Maximum price in USD per audio unit"""
completion: NotRequired[str] completion: NotRequired[str]
r"""Maximum price in USD per million completion tokens"""
image: NotRequired[str] image: NotRequired[str]
r"""Maximum price in USD per image"""
prompt: NotRequired[str] prompt: NotRequired[str]
r"""Price per million prompt tokens""" r"""Maximum price in USD per million prompt tokens"""
request: NotRequired[str] request: NotRequired[str]
r"""Maximum price in USD per request"""
class MaxPrice(BaseModel): class MaxPrice(BaseModel):
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
audio: Optional[str] = None audio: Optional[str] = None
r"""Maximum price in USD per audio unit"""
completion: Optional[str] = None completion: Optional[str] = None
r"""Maximum price in USD per million completion tokens"""
image: Optional[str] = None image: Optional[str] = None
r"""Maximum price in USD per image"""
prompt: Optional[str] = None prompt: Optional[str] = None
r"""Price per million prompt tokens""" r"""Maximum price in USD per million prompt tokens"""
request: Optional[str] = None request: Optional[str] = None
r"""Maximum price in USD per request"""
OnlyTypedDict = TypeAliasType("OnlyTypedDict", Union[ProviderName, str]) OnlyTypedDict = TypeAliasType("OnlyTypedDict", Union[ProviderName, str])
@@ -15,49 +15,82 @@ from typing_extensions import Annotated, NotRequired, TypedDict
class PricingTypedDict(TypedDict): class PricingTypedDict(TypedDict):
completion: str completion: str
r"""Price in USD per token for completion (output) generation"""
prompt: str prompt: str
r"""Price in USD per token for prompt (input) processing"""
audio: NotRequired[str] audio: NotRequired[str]
r"""Price in USD per audio input token"""
audio_output: NotRequired[str] audio_output: NotRequired[str]
r"""Price in USD per audio output token"""
discount: NotRequired[float] discount: NotRequired[float]
r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)"""
image: NotRequired[str] image: NotRequired[str]
r"""Price in USD per input image"""
image_output: NotRequired[str] image_output: NotRequired[str]
r"""Price in USD per output image"""
image_token: NotRequired[str] image_token: NotRequired[str]
r"""Price in USD per image token"""
input_audio_cache: NotRequired[str] input_audio_cache: NotRequired[str]
r"""Price in USD per cached audio input token"""
input_cache_read: NotRequired[str] input_cache_read: NotRequired[str]
r"""Price in USD per cached input token (read)"""
input_cache_write: NotRequired[str] input_cache_write: NotRequired[str]
r"""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: NotRequired[str]
r"""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: NotRequired[str] internal_reasoning: NotRequired[str]
r"""Price in USD per internal reasoning token"""
request: NotRequired[str] request: NotRequired[str]
r"""Price in USD per request"""
web_search: NotRequired[str] web_search: NotRequired[str]
r"""Price in USD per web search"""
class Pricing(BaseModel): class Pricing(BaseModel):
completion: str completion: str
r"""Price in USD per token for completion (output) generation"""
prompt: str prompt: str
r"""Price in USD per token for prompt (input) processing"""
audio: Optional[str] = None audio: Optional[str] = None
r"""Price in USD per audio input token"""
audio_output: Optional[str] = None audio_output: Optional[str] = None
r"""Price in USD per audio output token"""
discount: Optional[float] = None discount: Optional[float] = None
r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)"""
image: Optional[str] = None image: Optional[str] = None
r"""Price in USD per input image"""
image_output: Optional[str] = None image_output: Optional[str] = None
r"""Price in USD per output image"""
image_token: Optional[str] = None image_token: Optional[str] = None
r"""Price in USD per image token"""
input_audio_cache: Optional[str] = None input_audio_cache: Optional[str] = None
r"""Price in USD per cached audio input token"""
input_cache_read: Optional[str] = None input_cache_read: Optional[str] = None
r"""Price in USD per cached input token (read)"""
input_cache_write: Optional[str] = None input_cache_write: Optional[str] = None
r"""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] = None
r"""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] = None internal_reasoning: Optional[str] = None
r"""Price in USD per internal reasoning token"""
request: Optional[str] = None request: Optional[str] = None
r"""Price in USD per request"""
web_search: Optional[str] = None web_search: Optional[str] = None
r"""Price in USD per web search"""
PublicEndpointQuantization = Union[ PublicEndpointQuantization = Union[
@@ -10,48 +10,81 @@ class PublicPricingTypedDict(TypedDict):
r"""Pricing information for the model""" r"""Pricing information for the model"""
completion: str completion: str
r"""Price in USD per token for completion (output) generation"""
prompt: str prompt: str
r"""Price in USD per token for prompt (input) processing"""
audio: NotRequired[str] audio: NotRequired[str]
r"""Price in USD per audio input token"""
audio_output: NotRequired[str] audio_output: NotRequired[str]
r"""Price in USD per audio output token"""
discount: NotRequired[float] discount: NotRequired[float]
r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)"""
image: NotRequired[str] image: NotRequired[str]
r"""Price in USD per input image"""
image_output: NotRequired[str] image_output: NotRequired[str]
r"""Price in USD per output image"""
image_token: NotRequired[str] image_token: NotRequired[str]
r"""Price in USD per image token"""
input_audio_cache: NotRequired[str] input_audio_cache: NotRequired[str]
r"""Price in USD per cached audio input token"""
input_cache_read: NotRequired[str] input_cache_read: NotRequired[str]
r"""Price in USD per cached input token (read)"""
input_cache_write: NotRequired[str] input_cache_write: NotRequired[str]
r"""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: NotRequired[str]
r"""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: NotRequired[str] internal_reasoning: NotRequired[str]
r"""Price in USD per internal reasoning token"""
request: NotRequired[str] request: NotRequired[str]
r"""Price in USD per request"""
web_search: NotRequired[str] web_search: NotRequired[str]
r"""Price in USD per web search"""
class PublicPricing(BaseModel): class PublicPricing(BaseModel):
r"""Pricing information for the model""" r"""Pricing information for the model"""
completion: str completion: str
r"""Price in USD per token for completion (output) generation"""
prompt: str prompt: str
r"""Price in USD per token for prompt (input) processing"""
audio: Optional[str] = None audio: Optional[str] = None
r"""Price in USD per audio input token"""
audio_output: Optional[str] = None audio_output: Optional[str] = None
r"""Price in USD per audio output token"""
discount: Optional[float] = None discount: Optional[float] = None
r"""Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free)"""
image: Optional[str] = None image: Optional[str] = None
r"""Price in USD per input image"""
image_output: Optional[str] = None image_output: Optional[str] = None
r"""Price in USD per output image"""
image_token: Optional[str] = None image_token: Optional[str] = None
r"""Price in USD per image token"""
input_audio_cache: Optional[str] = None input_audio_cache: Optional[str] = None
r"""Price in USD per cached audio input token"""
input_cache_read: Optional[str] = None input_cache_read: Optional[str] = None
r"""Price in USD per cached input token (read)"""
input_cache_write: Optional[str] = None input_cache_write: Optional[str] = None
r"""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] = None
r"""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] = None internal_reasoning: Optional[str] = None
r"""Price in USD per internal reasoning token"""
request: Optional[str] = None request: Optional[str] = None
r"""Price in USD per request"""
web_search: Optional[str] = None web_search: Optional[str] = None
r"""Price in USD per web search"""
Generated
+1 -1
View File
@@ -220,7 +220,7 @@ wheels = [
[[package]] [[package]]
name = "openrouter" name = "openrouter"
version = "0.10.1" version = "0.10.4"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "httpcore" }, { name = "httpcore" },