mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66512fa808 | ||
|
|
7efd03fb3b | ||
|
|
e1b89f5aaf | ||
|
|
32dd522d5a | ||
|
|
eeb0373033 | ||
|
|
facade7d00 |
+48
-44
@@ -1,19 +1,19 @@
|
||||
lockVersion: 2.0.0
|
||||
id: c48cf606-fb42-4a45-9c23-8f0555307828
|
||||
management:
|
||||
docChecksum: e1b90a6bfd6ac5ba387e90d8bde5c5da
|
||||
docChecksum: d45d201513d6e7be3558284cea1bc4db
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
generationVersion: 2.788.4
|
||||
releaseVersion: 0.10.2
|
||||
configChecksum: 673c177f4ade5ed7081f80e54b377efb
|
||||
releaseVersion: 0.10.5
|
||||
configChecksum: 21118cf49c03e168be22fb31e37e9c40
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
persistentEdits:
|
||||
generation_id: 0dfeefb4-3077-4ada-9493-b1c27db7302b
|
||||
pristine_commit_hash: eaff66d4cff11e0b7fad3b3a37a4b91124c2443e
|
||||
pristine_tree_hash: a917f83ab81dc35cd911b68dd0004e00797a509f
|
||||
generation_id: 1a4bb86c-94f9-4871-b6c4-94e28c77b6ac
|
||||
pristine_commit_hash: d221637a5ee0bf88f374906a064c1952d9b1b13c
|
||||
pristine_tree_hash: 86f3c7d275c6f0286e87bfc5e670ffb811e6d3e8
|
||||
features:
|
||||
python:
|
||||
acceptHeaders: 3.0.0
|
||||
@@ -2046,8 +2046,8 @@ trackedFiles:
|
||||
pristine_git_object: 841d9210013aa9eac24702237c16d0aca12a985f
|
||||
docs/components/imagegencompletedevent.md:
|
||||
id: 43f5718fe2c2
|
||||
last_write_checksum: sha1:650b4752a08040461390f10b30ceda0b5df1f0bb
|
||||
pristine_git_object: 33b0307acdb1bf725cd89c5adb39eb3e110ff876
|
||||
last_write_checksum: sha1:c69ebcd923faf4b7831c70ca19a62992006804c4
|
||||
pristine_git_object: 683545f58a32d3174edc2548652516d446f31cfb
|
||||
docs/components/imagegencompletedeventtype.md:
|
||||
id: 84e07b20590e
|
||||
last_write_checksum: sha1:2c301f011ef720a3d8c561c8823bcfb982934d16
|
||||
@@ -2090,8 +2090,8 @@ trackedFiles:
|
||||
pristine_git_object: a921a4c4cd5f75c926ba03263469315a14537160
|
||||
docs/components/imagegenerationresponsedata.md:
|
||||
id: 6a33b08924d8
|
||||
last_write_checksum: sha1:ddb47b0ec0e5854effe56ca1989b8206e0d7b56a
|
||||
pristine_git_object: c80a572552036e143d3b8827a84011d5f62083e9
|
||||
last_write_checksum: sha1:e6df003afd8f77d5e98b6720c825818c229d4cee
|
||||
pristine_git_object: bd99f56bb2c6f10a7f26e49dc81bf00a6436fe99
|
||||
docs/components/imagegenerationservertool.md:
|
||||
id: 0ddff7f46134
|
||||
last_write_checksum: sha1:02ee9876107578bd27eb9ba811439416b9e76a63
|
||||
@@ -3750,8 +3750,8 @@ trackedFiles:
|
||||
pristine_git_object: 685705c19f968d6408d3bfc3d398eddb2ef5e52a
|
||||
docs/components/pricing.md:
|
||||
id: 15dca753d9eb
|
||||
last_write_checksum: sha1:92a5a42a7f29a05c1921015aa66655376e70bc2b
|
||||
pristine_git_object: f17583ae89f52fb3d7dadad5c0bc45c7a3f9c024
|
||||
last_write_checksum: sha1:80bb9085218cbe75ef0623b86bc9f52a354b0722
|
||||
pristine_git_object: 69ac72cf96ac924243230189563bbe6a6dcdfc6c
|
||||
docs/components/promptinjectionscanscope.md:
|
||||
id: 285ea7802dcd
|
||||
last_write_checksum: sha1:0fff83f064f6699f5a86c5068423c646a9fca69e
|
||||
@@ -3798,8 +3798,8 @@ trackedFiles:
|
||||
pristine_git_object: 7d0edd22dafe693920f18e0c0c99b852c6b3bb57
|
||||
docs/components/publicpricing.md:
|
||||
id: 9d43651da8ad
|
||||
last_write_checksum: sha1:13014946ed9c08e7c36a2681efb896bedf068982
|
||||
pristine_git_object: 9a1cecc7d832d812bef93c49a9340c29cf4e816b
|
||||
last_write_checksum: sha1:a0307105d112c890670088159350ed59040629a8
|
||||
pristine_git_object: 0746b9999a7aa39ce957aef7cf72235cba2f16a8
|
||||
docs/components/quantization.md:
|
||||
id: 0d17b4a78828
|
||||
last_write_checksum: sha1:992ee3fdd0f4e09c9f6e6426c413841fe34a86a5
|
||||
@@ -6230,8 +6230,8 @@ trackedFiles:
|
||||
pristine_git_object: 44f78122819ded7e472e28ebcf37dd8812707097
|
||||
docs/sdks/apikeys/README.md:
|
||||
id: e2bd25998427
|
||||
last_write_checksum: sha1:82bec11fedf21eed760739e1adb08fec06239279
|
||||
pristine_git_object: 6e72f51df9e9811cee424032f7dba0887e15afec
|
||||
last_write_checksum: sha1:626c856e422b77914d461ed5fa86c94053dafdaa
|
||||
pristine_git_object: d3fbe9dfcd49510ee05f82b2ad115359d46eed37
|
||||
docs/sdks/benchmarks/README.md:
|
||||
id: 61c16262af9b
|
||||
last_write_checksum: sha1:e3030fe550fa8bb1d3379692f9633b5f8e98be99
|
||||
@@ -6242,8 +6242,8 @@ trackedFiles:
|
||||
pristine_git_object: 7f19e372b77803949f2afb8dd86b4794556e9c7e
|
||||
docs/sdks/byok/README.md:
|
||||
id: 511ba2ae7a1b
|
||||
last_write_checksum: sha1:ef72e4c9cae06d60f4c2f2ad0578747d39e1d5ef
|
||||
pristine_git_object: a6f5335576f02b6108482dcd54e066b34a7c586f
|
||||
last_write_checksum: sha1:451e316d1a15cea3c43033a9eb0b3989be9fd43d
|
||||
pristine_git_object: acb77887ae8d7612f039ae319b5654d2e03c9e26
|
||||
docs/sdks/chat/README.md:
|
||||
id: 393193527c2c
|
||||
last_write_checksum: sha1:0b40d973610ed193d6faafc7f4f0bfad06c78225
|
||||
@@ -6278,8 +6278,8 @@ trackedFiles:
|
||||
pristine_git_object: 7fd647d02bfd29a3c7a5da0487761e89f308f224
|
||||
docs/sdks/guardrails/README.md:
|
||||
id: f72b38a5a2a7
|
||||
last_write_checksum: sha1:e90c6c713afcfa087edfcb6367397b9109ac3af9
|
||||
pristine_git_object: 427dac57b47fbb136a16eb1ab7732c1ff61d7c2e
|
||||
last_write_checksum: sha1:359f450bfeb9b1a3436b85a446a7529b76118c25
|
||||
pristine_git_object: 4b79890caa9a8296cdbabf550c66b4952f59d0c2
|
||||
docs/sdks/images/README.md:
|
||||
id: cc752c3524d0
|
||||
last_write_checksum: sha1:5a7a17ae16ed1070ff54f29bf479699454c91f00
|
||||
@@ -6330,16 +6330,16 @@ trackedFiles:
|
||||
pristine_git_object: 393bdc66fbf85057da5811936439c48ad03a2322
|
||||
docs/sdks/workspaces/README.md:
|
||||
id: 1f5b051a6380
|
||||
last_write_checksum: sha1:e315405c5619ae4b47119d01951118cb658cba46
|
||||
pristine_git_object: b3df8f8977c859410224e187e091860dfdc59ea0
|
||||
last_write_checksum: sha1:c5ed18ad453c4cdc032fa5f2a81d7b93b36bdbab
|
||||
pristine_git_object: 6a5d5e09c3fb9006efddd9ca32a72e0353a390f5
|
||||
py.typed:
|
||||
id: 258c3ed47ae4
|
||||
last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60
|
||||
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
|
||||
pyproject.toml:
|
||||
id: 5d07e7d72637
|
||||
last_write_checksum: sha1:4733c52f40b0a81f99ce289daf116a14cf25a2d6
|
||||
pristine_git_object: 80031d573d26edca6e5993a5df7e5c451257f494
|
||||
last_write_checksum: sha1:15d2c67200391a4843a4b6e15a9ab02a3e7ff408
|
||||
pristine_git_object: 1fdf87db995d690d48ca5a0d6735114c108b9f2b
|
||||
scripts/prepare_readme.py:
|
||||
id: e0c5957a6035
|
||||
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
|
||||
@@ -6366,16 +6366,16 @@ trackedFiles:
|
||||
pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d
|
||||
src/openrouter/_version.py:
|
||||
id: d8d15ad6c586
|
||||
last_write_checksum: sha1:f4418a5cd8b01a66275a34ce883bde034a374b6f
|
||||
pristine_git_object: e430f99bd620087545d621221f2edb100d471289
|
||||
last_write_checksum: sha1:c62dfff14e1d1a62db3bd988b15003c3434bc3fe
|
||||
pristine_git_object: 8c6d36d8bdf952c6a00316530aca7971040ea0e3
|
||||
src/openrouter/analytics.py:
|
||||
id: cb406b5aaabb
|
||||
last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35
|
||||
pristine_git_object: ea004eaf47a1a48622d4a4276fba1e329d5559ab
|
||||
src/openrouter/api_keys.py:
|
||||
id: 876fac88fff6
|
||||
last_write_checksum: sha1:4c037d1c4fc922061ca968b9cd961b2db69429f6
|
||||
pristine_git_object: e4a30e1b293a197994317a1e2169619fcbd0a0c6
|
||||
last_write_checksum: sha1:9dc40b10044a433ab5718c6db5122648c9b1d44a
|
||||
pristine_git_object: 6c2cdf75cb4578b25bfd7cd17bd99b982a4a2e36
|
||||
src/openrouter/basesdk.py:
|
||||
id: c5733c5a1e12
|
||||
last_write_checksum: sha1:71f242fd9955e5a17a8d055e2210cc2708bb94fc
|
||||
@@ -6394,8 +6394,8 @@ trackedFiles:
|
||||
pristine_git_object: 9db10e868aa38e1c38036d55416f7bb39c71bc0d
|
||||
src/openrouter/byok.py:
|
||||
id: bec352462ae1
|
||||
last_write_checksum: sha1:2508c32fac403ebb6dbd65eab53601d88039fbc0
|
||||
pristine_git_object: 9c2b675374900474076991a713a40ad119ee8b17
|
||||
last_write_checksum: sha1:1368b36fa52094caafdd2d9a50f6b4b762c8983a
|
||||
pristine_git_object: e915cbb90c56bf622de74204ebc8e62cd4af92ef
|
||||
src/openrouter/chat.py:
|
||||
id: 723fdce15c1d
|
||||
last_write_checksum: sha1:045ca733908a82e099a0c2a76c6c498025827391
|
||||
@@ -7326,16 +7326,16 @@ trackedFiles:
|
||||
pristine_git_object: 5f17d77c25a82ad2bf7b1211d05ee665b6fee35a
|
||||
src/openrouter/components/imagegencompletedevent.py:
|
||||
id: 7a791a02cb5b
|
||||
last_write_checksum: sha1:2e5822401bac22b5936ed4787b3d648eed60e725
|
||||
pristine_git_object: e5907de80032821f54ab0829729f137497b6f289
|
||||
last_write_checksum: sha1:df249afb22b4d56c3493cf8ec506e7ecf06402a6
|
||||
pristine_git_object: e767efe399701e27924a1fa2e98d44d78e3715a1
|
||||
src/openrouter/components/imagegenerationrequest.py:
|
||||
id: f8291a7be9a0
|
||||
last_write_checksum: sha1:bd9bc81281c9d034120f86b0eee96ed00ff38cce
|
||||
pristine_git_object: cd035aaead03f8181da12b8635f23fa7688d727f
|
||||
src/openrouter/components/imagegenerationresponse.py:
|
||||
id: 53354cd0cbfc
|
||||
last_write_checksum: sha1:e1c531b4a761668151800f450b82dfab0da00f77
|
||||
pristine_git_object: deb67493a8ace61abf039d5d6d46b33e37a7c66c
|
||||
last_write_checksum: sha1:073a770f1574629ec4e8ae59f6a365fbca9ace3f
|
||||
pristine_git_object: 64b059a152dab4754cdece4fb2021249f76444a7
|
||||
src/openrouter/components/imagegenerationservertool.py:
|
||||
id: 9c95bc975f2e
|
||||
last_write_checksum: sha1:b7e0d9db78b0b7662cd34a31e593842cea5ef990
|
||||
@@ -7994,12 +7994,12 @@ trackedFiles:
|
||||
pristine_git_object: 4e1073b4e3c10943c7035376f9984cd6559653a2
|
||||
src/openrouter/components/publicendpoint.py:
|
||||
id: 848aa2ef9129
|
||||
last_write_checksum: sha1:f47947e66b99be6c16bc081af2070cd7d6c7c0f3
|
||||
pristine_git_object: 7291ca05ec0df5d1d50be060b6c0298a1a2ec45e
|
||||
last_write_checksum: sha1:2e389b5e4301174b4c8aaa5e0c679d6872ddd67e
|
||||
pristine_git_object: a7d3e523472feb11203aa79bd081fa87c0ed6503
|
||||
src/openrouter/components/publicpricing.py:
|
||||
id: 96d115d83cc5
|
||||
last_write_checksum: sha1:0b8d39c8f1fda9cbc932a390d89e93b87105f35e
|
||||
pristine_git_object: 8ee0045ca6378f37b87715e3bf39148a7a8f0ed4
|
||||
last_write_checksum: sha1:1980193d2339dc13b08d1caabb235b0b8bcb8ce3
|
||||
pristine_git_object: 09a1bdd6ec5d204533288516de6d01ae20be218f
|
||||
src/openrouter/components/quantization.py:
|
||||
id: bde317b3d703
|
||||
last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d
|
||||
@@ -8630,8 +8630,8 @@ trackedFiles:
|
||||
pristine_git_object: 409e169fc5f43a0eea65b7568588c25c82abb46a
|
||||
src/openrouter/guardrails.py:
|
||||
id: 705839f34e66
|
||||
last_write_checksum: sha1:212ed4757bf87d2acd6d179e25cf03d9ba3d64b4
|
||||
pristine_git_object: beb82bf31bd9bca3baa7f61eb28105dfd3d22be3
|
||||
last_write_checksum: sha1:137f03185776ee3f734609612e37aef1d3e2f178
|
||||
pristine_git_object: 50249a344d342b955acdcaf9796466b9e8c3a1d1
|
||||
src/openrouter/httpclient.py:
|
||||
id: e9311185443d
|
||||
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
|
||||
@@ -9126,12 +9126,12 @@ trackedFiles:
|
||||
pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3
|
||||
src/openrouter/video_generation.py:
|
||||
id: d0a90c1b8efe
|
||||
last_write_checksum: sha1:d752e915a80df1f48a7ca35e901b50175fe3682b
|
||||
pristine_git_object: cdd7182ff939a02a0bbcd135c06a3b34d50e7076
|
||||
last_write_checksum: sha1:a857083fe9fe2766e7c083dce8778a30dd0a0b03
|
||||
pristine_git_object: 14d0c5e4e7757eeb383e460784073b8f05accd82
|
||||
src/openrouter/workspaces.py:
|
||||
id: cd6c533b1802
|
||||
last_write_checksum: sha1:2d9fc04510d5e28f57f23eacd7a5814495b127e7
|
||||
pristine_git_object: 54a25f1f83e29f7f005e58d0f2fedb1599be3b60
|
||||
last_write_checksum: sha1:7b1a29a2c1faa68ef30ccd0c8e61dfe535b90314
|
||||
pristine_git_object: 1b82a9360ac6b08cee12e674770f7681e2a5e6f4
|
||||
examples:
|
||||
createResponses:
|
||||
speakeasy-default-create-responses:
|
||||
@@ -9764,6 +9764,7 @@ examples:
|
||||
responses:
|
||||
"200":
|
||||
application/octet-stream: "x-file: example.file"
|
||||
video/mp4: "x-file: example.file"
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
@@ -10559,3 +10560,6 @@ examples:
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
examplesVersion: 1.0.2
|
||||
releaseNotes: |
|
||||
## Python SDK Changes:
|
||||
* `open_router.video_generation.get_video_content()`: `response.status[200]` **Changed** **Breaking** :warning:
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ generation:
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.10.2
|
||||
version: 0.10.5
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
+42
-10
@@ -9315,6 +9315,12 @@ components:
|
||||
created:
|
||||
description: Unix timestamp (seconds) when the image was generated
|
||||
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:
|
||||
description: The event type
|
||||
enum:
|
||||
@@ -9474,6 +9480,12 @@ components:
|
||||
b64_json:
|
||||
description: Base64-encoded image bytes
|
||||
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:
|
||||
- b64_json
|
||||
type: object
|
||||
@@ -18888,7 +18900,14 @@ components:
|
||||
description: Price in USD per cached input token (read)
|
||||
type: string
|
||||
input_cache_write:
|
||||
description: Price in USD per cached input token (write)
|
||||
description: >-
|
||||
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.
|
||||
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:
|
||||
description: Price in USD per internal reasoning token
|
||||
@@ -19005,7 +19024,14 @@ components:
|
||||
description: Price in USD per cached input token (read)
|
||||
type: string
|
||||
input_cache_write:
|
||||
description: Price in USD per cached input token (write)
|
||||
description: >-
|
||||
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.
|
||||
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:
|
||||
description: Price in USD per internal reasoning token
|
||||
@@ -24482,7 +24508,8 @@ paths:
|
||||
description: >-
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned
|
||||
in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to
|
||||
scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
scope to a different workspace. Treat the raw key as write-only; it is never returned after creation.
|
||||
[Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: createBYOKKey
|
||||
requestBody:
|
||||
content:
|
||||
@@ -27162,7 +27189,9 @@ paths:
|
||||
- Guardrails
|
||||
x-speakeasy-name-override: get
|
||||
patch:
|
||||
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
description: >-
|
||||
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every
|
||||
update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: updateGuardrail
|
||||
parameters:
|
||||
- description: The unique identifier of the guardrail to update
|
||||
@@ -27356,8 +27385,8 @@ paths:
|
||||
type: offsetLimit
|
||||
post:
|
||||
description: >-
|
||||
Assign multiple API keys to a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any
|
||||
existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: bulkAssignKeysToGuardrail
|
||||
parameters:
|
||||
- description: The unique identifier of the guardrail
|
||||
@@ -28709,7 +28738,8 @@ paths:
|
||||
x-speakeasy-name-override: list
|
||||
post:
|
||||
description: >-
|
||||
Create a new API key for the authenticated user. [Management
|
||||
Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it
|
||||
as a write-only, sensitive value; it cannot be retrieved later. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: createKeys
|
||||
requestBody:
|
||||
@@ -33125,12 +33155,14 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/octet-stream:
|
||||
video/mp4:
|
||||
example: <binary video data>
|
||||
schema:
|
||||
format: binary
|
||||
type: string
|
||||
description: Video content stream
|
||||
description: >-
|
||||
Video content stream. The body is the raw video bytes proxied from the upstream provider, and the
|
||||
Content-Type reflects the provider media type (video/mp4).
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
@@ -33419,7 +33451,7 @@ paths:
|
||||
delete:
|
||||
description: >-
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be
|
||||
deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: deleteWorkspace
|
||||
parameters:
|
||||
- description: The workspace ID (UUID) or slug
|
||||
|
||||
@@ -9262,6 +9262,11 @@ components:
|
||||
created:
|
||||
description: Unix timestamp (seconds) when the image was generated
|
||||
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:
|
||||
description: The event type
|
||||
enum:
|
||||
@@ -9420,6 +9425,11 @@ components:
|
||||
b64_json:
|
||||
description: Base64-encoded image bytes
|
||||
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:
|
||||
- b64_json
|
||||
type: object
|
||||
@@ -18790,7 +18800,12 @@ components:
|
||||
description: Price in USD per cached input token (read)
|
||||
type: string
|
||||
input_cache_write:
|
||||
description: Price in USD per cached input token (write)
|
||||
description: >-
|
||||
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.
|
||||
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:
|
||||
description: Price in USD per internal reasoning token
|
||||
@@ -18902,7 +18917,12 @@ components:
|
||||
description: Price in USD per cached input token (read)
|
||||
type: string
|
||||
input_cache_write:
|
||||
description: Price in USD per cached input token (write)
|
||||
description: >-
|
||||
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.
|
||||
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:
|
||||
description: Price in USD per internal reasoning token
|
||||
@@ -24320,7 +24340,7 @@ paths:
|
||||
type: offsetLimit
|
||||
post:
|
||||
description: >-
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. Treat the raw key as write-only; it is never returned after creation. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: createBYOKKey
|
||||
requestBody:
|
||||
content:
|
||||
@@ -27028,7 +27048,8 @@ paths:
|
||||
- Guardrails
|
||||
x-speakeasy-name-override: get
|
||||
patch:
|
||||
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
description: >-
|
||||
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: updateGuardrail
|
||||
parameters:
|
||||
- description: The unique identifier of the guardrail to update
|
||||
@@ -27225,7 +27246,7 @@ paths:
|
||||
type: offsetLimit
|
||||
post:
|
||||
description: >-
|
||||
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: bulkAssignKeysToGuardrail
|
||||
parameters:
|
||||
- description: The unique identifier of the guardrail
|
||||
@@ -28606,7 +28627,7 @@ paths:
|
||||
x-speakeasy-name-override: list
|
||||
post:
|
||||
description: >-
|
||||
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it as a write-only, sensitive value; it cannot be retrieved later. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: createKeys
|
||||
requestBody:
|
||||
content:
|
||||
@@ -33048,12 +33069,13 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/octet-stream:
|
||||
video/mp4:
|
||||
example: <binary video data>
|
||||
schema:
|
||||
format: binary
|
||||
type: string
|
||||
description: Video content stream
|
||||
description: >-
|
||||
Video content stream. The body is the raw video bytes proxied from the upstream provider, and the Content-Type reflects the provider media type (video/mp4).
|
||||
'400':
|
||||
content:
|
||||
application/json:
|
||||
@@ -33351,7 +33373,7 @@ paths:
|
||||
/workspaces/{id}:
|
||||
delete:
|
||||
description: >-
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
operationId: deleteWorkspace
|
||||
parameters:
|
||||
- description: The workspace ID (UUID) or slug
|
||||
|
||||
@@ -2,20 +2,20 @@ speakeasyVersion: 1.680.0
|
||||
sources:
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:200f4947503f8ac09ca9b8cfad127f20bd1f7afe489a3d08d562aaedea63b740
|
||||
sourceBlobDigest: sha256:6fd3f95fe103e9cbf7ed293aadaa0d7351e89bc1d6456536f09b0a645cbe3278
|
||||
sourceRevisionDigest: sha256:8e0c6bba19f6520c31262ec38c7bbc2b4306f5c3b6756f72c1a1ff6788b0d461
|
||||
sourceBlobDigest: sha256:30fef4ab492a2a13d07f2097e3f367a809af921fada21987851ef94a0aadd8a8
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1782426538
|
||||
- speakeasy-sdk-regen-1782484638
|
||||
- 1.0.0
|
||||
targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:200f4947503f8ac09ca9b8cfad127f20bd1f7afe489a3d08d562aaedea63b740
|
||||
sourceBlobDigest: sha256:6fd3f95fe103e9cbf7ed293aadaa0d7351e89bc1d6456536f09b0a645cbe3278
|
||||
sourceRevisionDigest: sha256:8e0c6bba19f6520c31262ec38c7bbc2b4306f5c3b6756f72c1a1ff6788b0d461
|
||||
sourceBlobDigest: sha256:30fef4ab492a2a13d07f2097e3f367a809af921fada21987851ef94a0aadd8a8
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:b0d6c032910cacfbba687cc29e3a3d038cc68abb8de505bd25f44c5064263205
|
||||
codeSamplesRevisionDigest: sha256:a1cd95b23206ce8853cb86f1fc5973931fa1610283db935130345a03c7b8bd51
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
|
||||
+31
-1
@@ -48,4 +48,34 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.10.2] .
|
||||
### Releases
|
||||
- [PyPI v0.10.2] https://pypi.org/project/openrouter/0.10.2 - .
|
||||
- [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 - .
|
||||
|
||||
## 2026-06-26 14:36:56
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.10.5] .
|
||||
### Releases
|
||||
- [PyPI v0.10.5] https://pypi.org/project/openrouter/0.10.5 - .
|
||||
+17
-16
@@ -3,19 +3,20 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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) |
|
||||
| `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_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_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) |
|
||||
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (write) |
|
||||
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token |
|
||||
| `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 |
|
||||
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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) |
|
||||
| `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_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_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_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 |
|
||||
| `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 |
|
||||
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
|
||||
@@ -5,19 +5,20 @@ Pricing information for the model
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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) |
|
||||
| `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_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_cache_read` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (read) |
|
||||
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | Price in USD per cached input token (write) |
|
||||
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | Price in USD per internal reasoning token |
|
||||
| `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 |
|
||||
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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) |
|
||||
| `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_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_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_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 |
|
||||
| `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 |
|
||||
| `web_search` | *Optional[str]* | :heavy_minus_sign: | Price in USD per web search |
|
||||
@@ -113,7 +113,7 @@ with OpenRouter(
|
||||
|
||||
## create
|
||||
|
||||
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it as a write-only, sensitive value; it cannot be retrieved later. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ with OpenRouter(
|
||||
|
||||
## update
|
||||
|
||||
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -359,7 +359,7 @@ with OpenRouter(
|
||||
|
||||
## bulk_assign_keys
|
||||
|
||||
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "openrouter"
|
||||
version = "0.10.2"
|
||||
version = "0.10.5"
|
||||
description = "Official Python Client SDK for OpenRouter."
|
||||
authors = [{ name = "OpenRouter" },]
|
||||
readme = "README-PYPI.md"
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.10.2"
|
||||
__version__: str = "0.10.5"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.788.4"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.10.2 2.788.4 1.0.0 openrouter"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.10.5 2.788.4 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -533,7 +533,7 @@ class APIKeys(BaseSDK):
|
||||
) -> operations.CreateKeysResponse:
|
||||
r"""Create a new API key
|
||||
|
||||
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it as a write-only, sensitive value; it cannot be retrieved later. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param name: Name for the new API key
|
||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
@@ -696,7 +696,7 @@ class APIKeys(BaseSDK):
|
||||
) -> operations.CreateKeysResponse:
|
||||
r"""Create a new API key
|
||||
|
||||
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it as a write-only, sensitive value; it cannot be retrieved later. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param name: Name for the new API key
|
||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
|
||||
@@ -359,7 +359,7 @@ class Byok(BaseSDK):
|
||||
) -> components.CreateBYOKKeyResponse:
|
||||
r"""Create a BYOK provider credential
|
||||
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. Treat the raw key as write-only; it is never returned after creation. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param key: The raw provider API key or credential. This value is encrypted at rest and never returned in API responses.
|
||||
:param provider: The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).
|
||||
@@ -520,7 +520,7 @@ class Byok(BaseSDK):
|
||||
) -> components.CreateBYOKKeyResponse:
|
||||
r"""Create a BYOK provider credential
|
||||
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. Treat the raw key as write-only; it is never returned after creation. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param key: The raw provider API key or credential. This value is encrypted at rest and never returned in API responses.
|
||||
:param provider: The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).
|
||||
|
||||
@@ -20,6 +20,8 @@ class ImageGenCompletedEventTypedDict(TypedDict):
|
||||
r"""Unix timestamp (seconds) when the image was generated"""
|
||||
type: ImageGenCompletedEventType
|
||||
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]
|
||||
r"""Token and cost usage for the image generation request, when available"""
|
||||
|
||||
@@ -36,5 +38,8 @@ class ImageGenCompletedEvent(BaseModel):
|
||||
type: ImageGenCompletedEventType
|
||||
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
|
||||
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):
|
||||
b64_json: str
|
||||
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):
|
||||
b64_json: str
|
||||
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):
|
||||
r"""Image generation response"""
|
||||
|
||||
@@ -35,7 +35,9 @@ class PricingTypedDict(TypedDict):
|
||||
input_cache_read: NotRequired[str]
|
||||
r"""Price in USD per cached input token (read)"""
|
||||
input_cache_write: NotRequired[str]
|
||||
r"""Price in USD per cached input token (write)"""
|
||||
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]
|
||||
r"""Price in USD per internal reasoning token"""
|
||||
request: NotRequired[str]
|
||||
@@ -76,7 +78,10 @@ class Pricing(BaseModel):
|
||||
r"""Price in USD per cached input token (read)"""
|
||||
|
||||
input_cache_write: Optional[str] = None
|
||||
r"""Price in USD per cached input token (write)"""
|
||||
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
|
||||
r"""Price in USD per internal reasoning token"""
|
||||
|
||||
@@ -30,7 +30,9 @@ class PublicPricingTypedDict(TypedDict):
|
||||
input_cache_read: NotRequired[str]
|
||||
r"""Price in USD per cached input token (read)"""
|
||||
input_cache_write: NotRequired[str]
|
||||
r"""Price in USD per cached input token (write)"""
|
||||
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]
|
||||
r"""Price in USD per internal reasoning token"""
|
||||
request: NotRequired[str]
|
||||
@@ -73,7 +75,10 @@ class PublicPricing(BaseModel):
|
||||
r"""Price in USD per cached input token (read)"""
|
||||
|
||||
input_cache_write: Optional[str] = None
|
||||
r"""Price in USD per cached input token (write)"""
|
||||
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
|
||||
r"""Price in USD per internal reasoning token"""
|
||||
|
||||
@@ -1275,7 +1275,7 @@ class Guardrails(BaseSDK):
|
||||
) -> components.UpdateGuardrailResponse:
|
||||
r"""Update a guardrail
|
||||
|
||||
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param id: The unique identifier of the guardrail to update
|
||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
@@ -1476,7 +1476,7 @@ class Guardrails(BaseSDK):
|
||||
) -> components.UpdateGuardrailResponse:
|
||||
r"""Update a guardrail
|
||||
|
||||
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param id: The unique identifier of the guardrail to update
|
||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
@@ -1982,7 +1982,7 @@ class Guardrails(BaseSDK):
|
||||
) -> components.BulkAssignKeysResponse:
|
||||
r"""Bulk assign keys to a guardrail
|
||||
|
||||
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param id: The unique identifier of the guardrail
|
||||
:param key_hashes: Array of API key hashes to assign to the guardrail
|
||||
@@ -2125,7 +2125,7 @@ class Guardrails(BaseSDK):
|
||||
) -> components.BulkAssignKeysResponse:
|
||||
r"""Bulk assign keys to a guardrail
|
||||
|
||||
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param id: The unique identifier of the guardrail
|
||||
:param key_hashes: Array of API key hashes to assign to the guardrail
|
||||
|
||||
@@ -726,7 +726,7 @@ class VideoGeneration(BaseSDK):
|
||||
request_has_path_params=True,
|
||||
request_has_query_params=True,
|
||||
user_agent_header="user-agent",
|
||||
accept_header_value="application/octet-stream",
|
||||
accept_header_value="video/mp4",
|
||||
http_headers=http_headers,
|
||||
_globals=operations.ListVideosContentGlobals(
|
||||
http_referer=self.sdk_configuration.globals.http_referer,
|
||||
@@ -767,7 +767,7 @@ class VideoGeneration(BaseSDK):
|
||||
)
|
||||
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/octet-stream"):
|
||||
if utils.match_response(http_res, "200", "video/mp4"):
|
||||
return http_res
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
http_res_text = utils.stream_to_text(http_res)
|
||||
@@ -878,7 +878,7 @@ class VideoGeneration(BaseSDK):
|
||||
request_has_path_params=True,
|
||||
request_has_query_params=True,
|
||||
user_agent_header="user-agent",
|
||||
accept_header_value="application/octet-stream",
|
||||
accept_header_value="video/mp4",
|
||||
http_headers=http_headers,
|
||||
_globals=operations.ListVideosContentGlobals(
|
||||
http_referer=self.sdk_configuration.globals.http_referer,
|
||||
@@ -919,7 +919,7 @@ class VideoGeneration(BaseSDK):
|
||||
)
|
||||
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/octet-stream"):
|
||||
if utils.match_response(http_res, "200", "video/mp4"):
|
||||
return http_res
|
||||
if utils.match_response(http_res, "400", "application/json"):
|
||||
http_res_text = await utils.stream_to_text_async(http_res)
|
||||
|
||||
@@ -676,7 +676,7 @@ class Workspaces(BaseSDK):
|
||||
) -> components.DeleteWorkspaceResponse:
|
||||
r"""Delete a workspace
|
||||
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param id: The workspace ID (UUID) or slug
|
||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
@@ -812,7 +812,7 @@ class Workspaces(BaseSDK):
|
||||
) -> components.DeleteWorkspaceResponse:
|
||||
r"""Delete a workspace
|
||||
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
:param id: The workspace ID (UUID) or slug
|
||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
|
||||
Reference in New Issue
Block a user