diff --git a/.devcontainer/README.md b/.devcontainer/README.md
index 396929a..c7d8d27 100644
--- a/.devcontainer/README.md
+++ b/.devcontainer/README.md
@@ -1,4 +1,9 @@
+
+

+
+
+
> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 2c7fa62..04f8f75 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,17 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
- docChecksum: 59bf622329ff2d6d2a28acceada10a6d
+ docChecksum: 5f7e8ca6bc0d259c803c0a9f1d076595
docVersion: 1.0.0
- speakeasyVersion: 1.763.2
+ speakeasyVersion: 1.680.0
generationVersion: 2.788.4
- releaseVersion: 0.9.1
- configChecksum: 9c8b936b4b1d37d964e844ee1a15cd4b
+ releaseVersion: 0.9.2
+ configChecksum: f906b25652bcc83a52d1c74e5018c02e
+ repoURL: https://github.com/OpenRouterTeam/python-sdk.git
+ installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: ce3858e4-7fbd-4f52-9d57-24016d5c1504
- pristine_commit_hash: c581f0a6ace9e1c793b0f4d759585b420c157610
- pristine_tree_hash: c5a3bf3d181c5c54d764cdf6372feb79505d5ed7
+ generation_id: 01e70c93-1c74-4268-a847-77bcb8354f3c
+ pristine_commit_hash: 27acb9e68a5dcb4165451c0c99cccb6828dc0f0f
+ pristine_tree_hash: b01e1f8716abc3b4a335b139a12550ef1c267853
features:
python:
acceptHeaders: 3.0.0
@@ -50,8 +52,8 @@ features:
trackedFiles:
.devcontainer/README.md:
id: b170c0f184ac
- last_write_checksum: sha1:3c63dfd4dcea8df0d4add09e975a6887e6da4aab
- pristine_git_object: 396929ab2e57cf09dd25ec83bd4496f733b95701
+ last_write_checksum: sha1:919a25ed5129d316f05a60131c164011763b7c54
+ pristine_git_object: c7d8d278438e7906fedb39d99151372b3324ea66
.devcontainer/devcontainer.json:
id: b34062a34eb1
last_write_checksum: sha1:94309e8c8eab5ab063986bf625f513a59825e947
@@ -74,8 +76,8 @@ trackedFiles:
pristine_git_object: 9c1506b8f539140db04b239d7a84d8b599747932
docs/components/action.md:
id: 6b3978ee918f
- last_write_checksum: sha1:7026f076ddcf89df8f64180c1f6c55b42e642083
- pristine_git_object: 7e76bbedc5fe8e969ccce0ce12a07dd89e2d740b
+ last_write_checksum: sha1:9d4cd420c5cd5ea25837e2c6db447d5ecb600b7a
+ pristine_git_object: 937ac471f7118c9064b2db116df9cf68f1b6b288
docs/components/actionenum.md:
id: 608bbbe865bb
last_write_checksum: sha1:b7b7984fc2930c3a7be17c2f731e9ced7f8432c5
@@ -88,10 +90,10 @@ trackedFiles:
id: 0956df8f10e4
last_write_checksum: sha1:88d726e5b59287d1ff171621cbf0d16ea9d5d9da
pristine_git_object: 0401058dca54568c8f2e686e4e82e0f40e0445cf
- docs/components/actionsearch.md:
- id: 8cee1325fe56
- last_write_checksum: sha1:69b2b7b0c8f67d42c1db23642fd622af2d9f7c2b
- pristine_git_object: 994ad66e550cb9478fe4419d05dba8024b752af7
+ docs/components/actiontypesearch.md:
+ id: b9d4385f8dbc
+ last_write_checksum: sha1:b47e07eb215799391aa85eb26fdd81b3ad21ba0f
+ pristine_git_object: 094a1e844d3476ba189a4a88987d4507efdda2a6
docs/components/activityitem.md:
id: 3a8beda39814
last_write_checksum: sha1:c91cff73639d4b52bea337fc8110c840684b247f
@@ -100,6 +102,30 @@ trackedFiles:
id: b97e402ef453
last_write_checksum: sha1:8e2b1926246a5204656dc0e027ced41e5ab8509b
pristine_git_object: 3e901718f78569d175db37fb6bdbc84733dd8d61
+ docs/components/advisornestedtool.md:
+ id: afec78271fac
+ last_write_checksum: sha1:b9df7445a86df92246cf1c01149fd2faa0103736
+ pristine_git_object: 1f7ab5357fffae77442b6cfd9ba2681cf1b03555
+ docs/components/advisorreasoning.md:
+ id: a6a4f2f081cf
+ last_write_checksum: sha1:44835b03d48275fbd0ee12badc399462037a2f12
+ pristine_git_object: 123091224cbc4d87e2e01748e013618f2d142632
+ docs/components/advisorreasoningeffort.md:
+ id: 8b65bf21bf5d
+ last_write_checksum: sha1:ffd01ce6c48ad3d25fb92083622f94c855ed2dea
+ pristine_git_object: 70c97a14813005cfafcc7e2d132921d3e95fb7bc
+ docs/components/advisorservertoolconfig.md:
+ id: 9a630ec9486f
+ last_write_checksum: sha1:2282846da6517a7d1091d89a04450a4c7176479f
+ pristine_git_object: ce16435a04c1b3121c65334056d1576769aa1a3d
+ docs/components/advisorservertoolopenrouter.md:
+ id: e66ed24a0e81
+ last_write_checksum: sha1:20e9d09f8361ef7b1ffced630df13d9deebb2f98
+ pristine_git_object: 2ce9d23560ba11d80bf42cc7eca4abe081bdb669
+ docs/components/advisorservertoolopenroutertype.md:
+ id: 9bc4e9782bad
+ last_write_checksum: sha1:ae6778a1388bee3203a3f740a01dd8eace116b2e
+ pristine_git_object: 0a78aa653885b941e7c1f9be4e21ccc50db2ee51
docs/components/allowedtools.md:
id: b6010d1cddfb
last_write_checksum: sha1:db3b637b995692cfa85a489b704a63156138c8cd
@@ -120,10 +146,34 @@ trackedFiles:
id: 11b3c6c877d0
last_write_checksum: sha1:4d8fae9c0de452c9ee796eeab63d242e4feb8497
pristine_git_object: 4840df7f7005389811fae7c8868ad8d6c1efcd18
+ docs/components/anthropicallowedcallers.md:
+ id: 11ad7b23165a
+ last_write_checksum: sha1:25cf3f22c4aec1a2dad1c12dd83d5ac9681386c5
+ pristine_git_object: ecfedca4e0825576bdd7ade82c36d416f7f0283c
+ docs/components/anthropicbase64imagesource.md:
+ id: 1aa7be30aebe
+ last_write_checksum: sha1:0b5b8ed525a2efc9ce8760fd79282e0175cd1c61
+ pristine_git_object: 85d0122f3a306415f68e26dbe052aaf5f153d250
+ docs/components/anthropicbase64imagesourcetype.md:
+ id: e35e0048c55b
+ last_write_checksum: sha1:82843d316fcdcabb7fbe6e9781dde48f2baec3f1
+ pristine_git_object: e99893ec8fc73701b7fdc60c27c659be2947b024
+ docs/components/anthropicbase64pdfsource.md:
+ id: f2ead8ca2f15
+ last_write_checksum: sha1:0e3075d067fe20ac0a554c202025556804227a23
+ pristine_git_object: 449a1ae4fd04b9641e7ad4d912b6ca5421dcbabf
+ docs/components/anthropicbase64pdfsourcemediatype.md:
+ id: a92d0e282b96
+ last_write_checksum: sha1:5920e0ae269db4de27b028d04d17358fcc8ab6b6
+ pristine_git_object: d35634238584b5e9cba674d0b27d851030b5596c
+ docs/components/anthropicbase64pdfsourcetype.md:
+ id: fc9f8018ae71
+ last_write_checksum: sha1:168c5078830470f8526ad3c685fb9f53627f1874
+ pristine_git_object: 956f981204ca21136c0b80cf77f4704a2213c446
docs/components/anthropiccachecontroldirective.md:
id: 3bdd9daf51d9
- last_write_checksum: sha1:5fb9adeb019b713045bd59caa06950067644b0c5
- pristine_git_object: 9dbc2830cb4cd675922e2070c34af86530597666
+ last_write_checksum: sha1:c69886ea262e4d88ee0d17e0be62a7fba60a8b4b
+ pristine_git_object: d71a660204cd918ac8ab609da5f70d9f51a5b6f0
docs/components/anthropiccachecontroldirectivetype.md:
id: a20a54545fe3
last_write_checksum: sha1:467772e8b5b227b4e80b0600d3ed275aeb2ea210
@@ -132,26 +182,310 @@ trackedFiles:
id: 980004cae93f
last_write_checksum: sha1:6f66927f536c351dcfbb940672511bd8a6fdd1a0
pristine_git_object: 32e8fd42002d9379fa207d0867b428c443a63a42
+ docs/components/anthropiccitationcharlocationparam.md:
+ id: e6f0e4e63d86
+ last_write_checksum: sha1:4e103661aefac7bd891ed1267ae3d2a4b2067c45
+ pristine_git_object: 8f0ca485c09e0ef01003409e30c4931fbf83663e
+ docs/components/anthropiccitationcharlocationparamtype.md:
+ id: d9f370ac77a9
+ last_write_checksum: sha1:e9b7f7396709855c9179aef1c819fdd638f67471
+ pristine_git_object: f74ca0a4f0e9bca084a782888a50123e04ab2c2e
+ docs/components/anthropiccitationcontentblocklocationparam.md:
+ id: 7783fc4a6eaa
+ last_write_checksum: sha1:f36e22562bb4023e73088b9dfa705570279817c0
+ pristine_git_object: 09b26e1e3a62c09594521ae196f897eb497e9164
+ docs/components/anthropiccitationcontentblocklocationparamtype.md:
+ id: c3817aa89a42
+ last_write_checksum: sha1:c7894f9e4c722f29fde2eb60f9db8853ebfe8de7
+ pristine_git_object: fedc00b8854ae3314a0e9c4eea84e74a5c13feb3
+ docs/components/anthropiccitationpagelocationparam.md:
+ id: cd261e1abdb6
+ last_write_checksum: sha1:81d6d355c0b31fdf6c65695ebb00d4371455478a
+ pristine_git_object: 71b26a211f327ab00717c3d3a02d24c379cae51b
+ docs/components/anthropiccitationpagelocationparamtype.md:
+ id: 0bb92f6478bc
+ last_write_checksum: sha1:d9db36db8211a392d288b220ddcff29037f1c84c
+ pristine_git_object: 33d9a680811877051f6e366e318b9e6a63fa48cf
+ docs/components/anthropiccitationsearchresultlocation.md:
+ id: 9b412016e8d2
+ last_write_checksum: sha1:715d3733c885b37e50258f7bdbad0a9dd8efc9f6
+ pristine_git_object: 67126480c4965f56ddb273b164b479bd963155bc
+ docs/components/anthropiccitationsearchresultlocationtype.md:
+ id: 2f4d80537d5e
+ last_write_checksum: sha1:e7638187480edacbe9bedfad7e4bff252544b97d
+ pristine_git_object: a6fd8db4f698fa09bfb1e7edd8256e336db3b6e3
+ docs/components/anthropiccitationwebsearchresultlocation.md:
+ id: 02c13281dbef
+ last_write_checksum: sha1:85742ad3ff04613e6d4fa8d24e41d09012e387da
+ pristine_git_object: 0c80eb2994207d1b01eba6ba706b21b0fbc59b7d
+ docs/components/anthropiccitationwebsearchresultlocationtype.md:
+ id: 9a62f0c12dea
+ last_write_checksum: sha1:d6f2b7a37400b47dc5fe09582e4a1c386efd5f64
+ pristine_git_object: 1d4dc34466805c06bef9a5ea0d4b3e2658d8fbca
+ docs/components/anthropicdocumentblockparam.md:
+ id: 0c8300a9f979
+ last_write_checksum: sha1:96771cf30db36eb18111c9600fda87cb6e446ec2
+ pristine_git_object: 69175cafdd4cc3b1ae3399af114af0fe597d9272
+ docs/components/anthropicdocumentblockparamcitations.md:
+ id: 4f8b596d5f87
+ last_write_checksum: sha1:4de5b2108ca20987efb24eea43fd094267ed7778
+ pristine_git_object: 11eef596d001cefd55d4259b88588584d417b7e3
+ docs/components/anthropicdocumentblockparamcontent1.md:
+ id: f03af31809d7
+ last_write_checksum: sha1:022157f8549ece930f6fcade0b5b1aa005026ed2
+ pristine_git_object: af922ffbec0764739c11f30f142a39888f97e4a9
+ docs/components/anthropicdocumentblockparamcontent2.md:
+ id: f8f62b828928
+ last_write_checksum: sha1:ff03664b45c3d4b1a7648d1b13f14a6c3c7ab2ee
+ pristine_git_object: 04e088ebbad5b5f732f4a3c6b8c217e9820e6853
+ docs/components/anthropicdocumentblockparamsourceunion.md:
+ id: 5c379a9fad3f
+ last_write_checksum: sha1:a1e410e387c65447488e893d3d5335fcbdef8050
+ pristine_git_object: 1859dbcfd18deebd59a9f19a8c16a69785d21c25
+ docs/components/anthropicimageblockparam.md:
+ id: e76a99fa0c70
+ last_write_checksum: sha1:d135899831112faaca1da7b2ca7b0f1b623dffcd
+ pristine_git_object: 34937846b769de97535e499d17a4889a9cf92dec
+ docs/components/anthropicimageblockparamsource.md:
+ id: 05e225739d47
+ last_write_checksum: sha1:b93f27120a3451f97098f6319540ee224b424d44
+ pristine_git_object: 54510ebaf02ff39dc219c6a1e57cecad30fda517
+ docs/components/anthropicimageblockparamtype.md:
+ id: 7fe673bf1e0f
+ last_write_checksum: sha1:2ea54ee8d7c469893dcc847af983787b757b34f3
+ pristine_git_object: ccaa7efa4ff1414d656a398a06d90208fc87c866
+ docs/components/anthropicimagemimetype.md:
+ id: 40911ee4de83
+ last_write_checksum: sha1:99fd6c56ced25fb3ffc7aef739db6801c2cfdfb2
+ pristine_git_object: 4e1c68d63548a7f98e134278109d89e5576964e8
+ docs/components/anthropicinputtokensclearatleast.md:
+ id: 5c23b6fac443
+ last_write_checksum: sha1:aedbf281d2f6af56fbca2137a7890f797feded16
+ pristine_git_object: d47f90c38cadee0fef9aa16a94ee5bf6b8fe5ea7
+ docs/components/anthropicinputtokensclearatleasttype.md:
+ id: 78c870e2bd06
+ last_write_checksum: sha1:ffd632983f9e6ec1d67f7fa50ebb3eadc75c3726
+ pristine_git_object: c59676ab120e5564d220b25b88f00747d629239c
+ docs/components/anthropicinputtokenstrigger.md:
+ id: 082aaa1c24ef
+ last_write_checksum: sha1:b08b557ecebf3db71a4ee119f59ca35f70719d79
+ pristine_git_object: e0539b55e212a918b770d6047bbf9489067a187c
+ docs/components/anthropicinputtokenstriggertype.md:
+ id: c1ed4899ff43
+ last_write_checksum: sha1:c30ae212332ee1793cfdf928f5529f02f57fba08
+ pristine_git_object: 07b76dbfef3ae2fa73a2c8a347aaec4a2c2db250
+ docs/components/anthropicplaintextsource.md:
+ id: 889fb950c676
+ last_write_checksum: sha1:d8887a9e5aed15b708e69d8073fa6a5563afca5b
+ pristine_git_object: 91a973132165591134f99356fec017d76958868f
+ docs/components/anthropicplaintextsourcemediatype.md:
+ id: 199cf01caaa8
+ last_write_checksum: sha1:ed698e5b4b7ef9272ebe94ec4a44d91a1be84e03
+ pristine_git_object: f190256a5e75ee4213a8ef59031a8f7fbaaaacbf
+ docs/components/anthropicplaintextsourcetype.md:
+ id: f1fea7c1e4fc
+ last_write_checksum: sha1:a75442b716b22fd61eb4ae5ad622d5e203a80d11
+ pristine_git_object: a60119897087817d12c9de7d2cd2b588b8bed031
+ docs/components/anthropicsearchresultblockparam.md:
+ id: ad63a45ac881
+ last_write_checksum: sha1:6788bc9ab1df588426a9fdec928f3a4220bc9847
+ pristine_git_object: e1de3630f6b3f8c1c24dc7ac74bea2190f0091f2
+ docs/components/anthropicsearchresultblockparamcitations.md:
+ id: da531f9a0e74
+ last_write_checksum: sha1:cd7ea4104da6e477e8d58334747f0bbf67724eeb
+ pristine_git_object: f6d6cab0bafe8ed896497dbfd33abc45cac5ea54
+ docs/components/anthropicsearchresultblockparamtype.md:
+ id: 727f596d14b6
+ last_write_checksum: sha1:8aac220d2c56349083d624947756e5d459df3b50
+ pristine_git_object: 89be471a605fb0c9061d62cd853fa70cea52d88f
+ docs/components/anthropictextblockparam.md:
+ id: 5dc491a109ed
+ last_write_checksum: sha1:53c890398ec305cb94ef47dc91ede516284903c0
+ pristine_git_object: 7324375b8e283a1edf97985d2e71aaa1a2412aa2
+ docs/components/anthropictextblockparamtype.md:
+ id: f9227c63989c
+ last_write_checksum: sha1:af1cdb8600c227ecdc48bfb520d51f38ba523694
+ pristine_git_object: 36b869568067045bfd1fa66fb45cbd965b8c1e23
+ docs/components/anthropicthinkingdisplay.md:
+ id: b272b36eff65
+ last_write_checksum: sha1:2b8212e5dfbd0f121109ed012672f9428b6ac843
+ pristine_git_object: 0898b8c4b0f49475fa1499b2c74cc3a834c92890
+ docs/components/anthropicthinkingturns.md:
+ id: 09d0931e9ea8
+ last_write_checksum: sha1:2ff92a75d19d513a164ee38de112bd899d5cfbc6
+ pristine_git_object: f859cfcc0a4b6c371aa208c8adde675c6ac18ba1
+ docs/components/anthropicthinkingturnstype.md:
+ id: 534b0531d1f7
+ last_write_checksum: sha1:f610815ab5817acb5b889e5ce1b998f1ad3fe0a4
+ pristine_git_object: 4dbe66c64d7ac07a435d31df28575db92ced1af3
+ docs/components/anthropictooluseskeep.md:
+ id: 940cf391e4a5
+ last_write_checksum: sha1:639a5695d2f842fcf63f8e441f0f471179a8efa9
+ pristine_git_object: 9cfdf90d5fc6af4eba6de5ab47e3795ad92be48b
+ docs/components/anthropictooluseskeeptype.md:
+ id: eb234b2636cf
+ last_write_checksum: sha1:84a9338dcd3827d9cbcf17766e64983370e8e869
+ pristine_git_object: c34dd00b62cc9a2b74d236527255bef573f15757
+ docs/components/anthropictoolusestrigger.md:
+ id: ab2d3ea6c316
+ last_write_checksum: sha1:7866497896bca2a295eace8397a3899d8cb85325
+ pristine_git_object: f4397121d0f229341668e1cd81d8cf0ce55ef097
+ docs/components/anthropictoolusestriggertype.md:
+ id: 45a733d909af
+ last_write_checksum: sha1:474ee631bb8dcae59c70180e496431be478cae5f
+ pristine_git_object: 675f7fd5e9133893bf44dc86bcd92d1f6dfaad61
+ docs/components/anthropicurlimagesource.md:
+ id: 8ff15dedbdfe
+ last_write_checksum: sha1:bab99b78bdc564a6d16910aec71cfc8a15fe5a91
+ pristine_git_object: 139e448ddb9237ffcca950e40d750dce6367600b
+ docs/components/anthropicurlimagesourcetype.md:
+ id: b1d4d917a454
+ last_write_checksum: sha1:31607f39efc2073e73c78f328a5b4db255d88d1b
+ pristine_git_object: d1130c155fb98d564ce9ca8df112ce9d538c2990
+ docs/components/anthropicurlpdfsource.md:
+ id: 9e25fcc944c4
+ last_write_checksum: sha1:e22910f7eebbe515947593dd6bea1f9705a58389
+ pristine_git_object: 30b6984257ffadc3792856e44840173ddbdc440d
+ docs/components/anthropicurlpdfsourcetype.md:
+ id: 2fbeab80f950
+ last_write_checksum: sha1:8db23a874bd09d9757276589bd1b4d2ab77180e4
+ pristine_git_object: 3757423de0c85933d0aadd6bb331862c69b6fbde
+ docs/components/anthropicwebsearchresultblockparam.md:
+ id: 719c1c8395a3
+ last_write_checksum: sha1:21e1935215988acd172e194ff764e3b4c7680733
+ pristine_git_object: 15a52b0301ae18a16f8190f2a6af5d51ec70f885
+ docs/components/anthropicwebsearchresultblockparamtype.md:
+ id: f46b2c29a660
+ last_write_checksum: sha1:3dd6995ff527a0b47e416024d6d1ef8b512dd5cc
+ pristine_git_object: 3f1d82e5332699814368a1dc232c2ce3b975c6d8
+ docs/components/anthropicwebsearchtooluserlocation.md:
+ id: a1a27b73b162
+ last_write_checksum: sha1:13cd42950dc5cfd9eb59b038eda215d4bc70511b
+ pristine_git_object: 4dab8dcb5e68dd2a213e0801a746c0f6814a08fd
+ docs/components/anthropicwebsearchtooluserlocationtype.md:
+ id: 9f4ae9375a85
+ last_write_checksum: sha1:383159e247a79336120befe7f34d876dc2e93b24
+ pristine_git_object: 21c0a2b3ee378c2301f8f82385193e3f6bfc0f01
+ docs/components/apitype.md:
+ id: "0e0508573603"
+ last_write_checksum: sha1:36f315a2ffdb3a935abab8832ca98d89e2945a14
+ pristine_git_object: 5b0cd61ddd2b151fddc82d0073d760c88432e4cf
+ docs/components/applypatchcallitem.md:
+ id: 3b65f71849fb
+ last_write_checksum: sha1:9b9efa229a6801da2ecd6fe16526adce76039dab
+ pristine_git_object: 1a5242abe7b4b84a334e40104f1f8e37d102ac76
+ docs/components/applypatchcallitemtype.md:
+ id: af492b652e95
+ last_write_checksum: sha1:ce150433d6fc023d92c4c92bfa151748dfe79976
+ pristine_git_object: 46cff3bed1ac629620c343236e022c9dcbcd3262
+ docs/components/applypatchcalloperation.md:
+ id: 8f8084ad5328
+ last_write_checksum: sha1:29f32405863a6a0e2f32a01cbbe7e2e0af88dd62
+ pristine_git_object: 8898fd5e301a696c6874b4c1793559eaa7dcdc61
+ docs/components/applypatchcalloperationdiffdeltaevent.md:
+ id: d3415d4a1b9b
+ last_write_checksum: sha1:11bd720248016d0471a3f0a77472d4ab0e5bd1e7
+ pristine_git_object: 8909a6bf68ccef93331486c47e2dbc6f2fff5e2e
+ docs/components/applypatchcalloperationdiffdeltaeventtype.md:
+ id: 54634e44c46c
+ last_write_checksum: sha1:9a44a4cc508e7168e88735a3364842f11fc7d16a
+ pristine_git_object: e6617985996f698f0aab9cc8a02b1afd96f34486
+ docs/components/applypatchcalloperationdiffdoneevent.md:
+ id: 97b9df6f879c
+ last_write_checksum: sha1:74b5dc299f320882312db1990eb8906c2ee4ced5
+ pristine_git_object: 341163b35457a4d5a7e55dbc4f3a8ca3a7ade543
+ docs/components/applypatchcalloperationdiffdoneeventtype.md:
+ id: 102f8c5ccfcc
+ last_write_checksum: sha1:0e1dd7f57e56d0ec76b803608fc89adb542bc40c
+ pristine_git_object: d4dbd0e072f04d2c0044d1cc06a34d4edf7b77e0
+ docs/components/applypatchcalloutputitem.md:
+ id: 5c1f50f02008
+ last_write_checksum: sha1:c0f25cda15d3a3bc4e7503e78a6f397d738fc160
+ pristine_git_object: 76eca926b0d9ba9ce9c6cc35e90f563e01553c4c
+ docs/components/applypatchcalloutputitemstatus.md:
+ id: 23ec4ce36067
+ last_write_checksum: sha1:8ae4e87b085331254ff882190f1cddebb64b6928
+ pristine_git_object: 7a4608be7dabb77f98399f19ddaa5ea53432934b
+ docs/components/applypatchcalloutputitemtype.md:
+ id: ab607dca3dbe
+ last_write_checksum: sha1:ee760d4d4960bfc69f60962903a7158289f055ee
+ pristine_git_object: 3e5acbd34e8eca78b6b1c32acdc60ad2c3f22a94
+ docs/components/applypatchcallstatus.md:
+ id: 0815abe9f197
+ last_write_checksum: sha1:d0154ff9c6255e336a968f3eb8c9fb676f2ecd24
+ pristine_git_object: c9a787f93df86fbdd02f560b747515ec8192658d
+ docs/components/applypatchcreatefileoperation.md:
+ id: 1bf665d7cdbc
+ last_write_checksum: sha1:d068e946561d4d7775ec8f2b0207d7fffeabf814
+ pristine_git_object: 89ed40ddcaa58553b10dd2767f2631bb8c9cc28a
+ docs/components/applypatchcreatefileoperationtype.md:
+ id: 41871f7376bc
+ last_write_checksum: sha1:55185b7ce0ff3eae63d3989fdb595a86f23ee3f2
+ pristine_git_object: d646e0e54e4f47462493e58e3ee1ff6d619b7639
+ docs/components/applypatchdeletefileoperation.md:
+ id: 40d6fde26cbf
+ last_write_checksum: sha1:d829b902122dc74ad25ada3917856a201070b0cb
+ pristine_git_object: 83c9024dc8f3b428d24aa3fced87798a5ea2a391
+ docs/components/applypatchdeletefileoperationtype.md:
+ id: cb682dc15349
+ last_write_checksum: sha1:d4c6cb96275e1819ac0703cc44b8dba8712906f7
+ pristine_git_object: a0bfcdc7a06806ff8775e750ac01a7ab4dfbe59c
+ docs/components/applypatchengineenum.md:
+ id: 88d286d64cf9
+ last_write_checksum: sha1:b710dae26b4346f93329c939e328235b8677943d
+ pristine_git_object: 3e03035f0b1030d9cdfdd0cf05e01448a0bfea8f
docs/components/applypatchservertool.md:
id: 924a4805520a
last_write_checksum: sha1:f87ee16357b393e199bf0a4ba74e02130f1f243b
pristine_git_object: 704ebe93904414764ac0d52dcfa8bc76c1eaebe2
+ docs/components/applypatchservertoolconfig.md:
+ id: 39d0b010aed8
+ last_write_checksum: sha1:176cb9dd525944dccab1963fd0517e5ea7930668
+ pristine_git_object: 1714a7e3f21ab477a69713d0d9b94fff88c3a774
+ docs/components/applypatchservertoolopenrouter.md:
+ id: 8a6bdee0a3c2
+ last_write_checksum: sha1:c7dea8ecdb297517e90269bc561eac02bbacd3f7
+ pristine_git_object: 573443f89fdc94aa39f5e49168c1edeae66b7338
+ docs/components/applypatchservertoolopenroutertype.md:
+ id: 5ce7a9b8308e
+ last_write_checksum: sha1:eba1ac2d9ac43d1eeda60227b6a3bc6498dc1e79
+ pristine_git_object: 44cfe93954107c960d527a15270e8a8107263363
docs/components/applypatchservertooltype.md:
id: 3638a8a53d67
last_write_checksum: sha1:c3139367515e9c0b3dd3109065594824e704c35f
pristine_git_object: 60aec019e3cecb47bfd388f0e049af9956b6acc8
+ docs/components/applypatchupdatefileoperation.md:
+ id: 05b222344186
+ last_write_checksum: sha1:9cf38c7b0ed8b008b65ee81b4fb86f2e11c0ff06
+ pristine_git_object: 232996de25b6fc032afbd39b7af2c04f5dd4e6c5
+ docs/components/applypatchupdatefileoperationtype.md:
+ id: 1c510d2ad88d
+ last_write_checksum: sha1:8fa2595e6a0f4990fc23af82c2c6778e2f23e706
+ pristine_git_object: 3580dc449d51835a55f1cd1b9ec2f84faf394972
+ docs/components/apprankingsitem.md:
+ id: dd9228e6412b
+ last_write_checksum: sha1:a25193e5feb4c1ab3010ce853805edfc7ce7b1e2
+ pristine_git_object: 8f517a9e02edd21641d769df7eee2423428a0c60
+ docs/components/apprankingsresponse.md:
+ id: daffc9eb5d56
+ last_write_checksum: sha1:a41fa7227e40925975146770e943096a3bf85fe2
+ pristine_git_object: 937e19bc9d50abaabfe5afea7e86762b675bc4b2
docs/components/architecture.md:
id: 40a5f2f0b4f3
last_write_checksum: sha1:1edafecb76992fb1ef8201d9686a011a805431f2
pristine_git_object: 335e0104f7f12774a22886876bde455234e7ea9b
docs/components/aspectratio.md:
id: fc8c3ccdb468
- last_write_checksum: sha1:e03bcf5c3643e7e49e4d02657727162d4c116b1f
- pristine_git_object: bef16665425b5a80ba08db0f55a0aa90d33c5e43
+ last_write_checksum: sha1:573dc4ea5cdec788353f87f49ab48434367d7a56
+ pristine_git_object: 10febe4b549ef241d21e8ec471c5867c4c670f9e
+ docs/components/audiourl.md:
+ id: 1ad9b13da86b
+ last_write_checksum: sha1:9614979c76c9624def8aeecc503aa736c99240a0
+ pristine_git_object: 1b3a9c8f1dae9f5706c0a288413b318d16b889f2
docs/components/autorouterplugin.md:
id: ebc3c78144c1
- last_write_checksum: sha1:dd7c45de7c791dfd33d9fd1a89adc12cd26f6608
- pristine_git_object: b268d650c1272ab43b00f44d4703650bb6bb13a3
+ last_write_checksum: sha1:273b6a12737f4b69a14e7bea5ec4f629e6fd6206
+ pristine_git_object: ff583fa52683b456bdf7b395d2c88168beaa89cc
docs/components/autorouterpluginid.md:
id: a871b7b2af66
last_write_checksum: sha1:f9df41065f2d4eaf35a8d24a54a3824d17e12284
@@ -222,12 +556,40 @@ trackedFiles:
pristine_git_object: 2d7597f6a1250fa1b35dc5853f25a0ce1cdfb286
docs/components/baseinputsunion1.md:
id: 3b291815d087
- last_write_checksum: sha1:395f8da0635022842bf2152f149506b56ed3a357
- pristine_git_object: 4664a9aa60de0b185ed5bccab4ccf20dfd371fcf
+ last_write_checksum: sha1:9802e7fee7ddae373d1e3f0e0e9679218b2dab3b
+ pristine_git_object: 5d49ac1145e668327a3426952a99d7a4edde0d80
docs/components/basereasoningconfig.md:
id: c161e7a17271
last_write_checksum: sha1:4f3c5e5dda570bb87ec7e2deff31e2372f36b833
pristine_git_object: 031166f6d79ea3ef1781e95468197271da98738f
+ docs/components/bashservertool.md:
+ id: ca16c4ffaf49
+ last_write_checksum: sha1:c58ad9237fb0b45cf8f3212f165a60fcfa24ca65
+ pristine_git_object: d24e01fccba6a930d8313c098a73a61dbd2d2ad1
+ docs/components/bashservertoolconfig.md:
+ id: a51aee28eb24
+ last_write_checksum: sha1:c7c8a07f0a845419436066869a7401be4a825b1a
+ pristine_git_object: e6fda611bda8baf16dd2883a69ac44b3e0f0d745
+ docs/components/bashservertoolengine.md:
+ id: 8199d8ef5ded
+ last_write_checksum: sha1:1a4c1975344f3f83bc9b5434f5390986c256ab25
+ pristine_git_object: e566f077eec6e66b359e126de105488c6fa338bb
+ docs/components/bashservertoolenvironment.md:
+ id: 3894aa22282b
+ last_write_checksum: sha1:e0903f06288b97c5df4fbb615ad75e32482d4b70
+ pristine_git_object: 9e1772e06f6eb18b4646d301a3da18e2fa372638
+ docs/components/bashservertooltype.md:
+ id: e6ed8eddbb24
+ last_write_checksum: sha1:4b8db8f915f099b89698c93a9dd86fdde32f0d29
+ pristine_git_object: 39e37fdadaf320fbd499c345f02b0f248331fa98
+ docs/components/bulkaddworkspacemembersrequest.md:
+ id: 12cbe93243c4
+ last_write_checksum: sha1:5bc0f5067f2fdd1a05409b18ec723b8b2acb4026
+ pristine_git_object: 021221840a6dee060a6d38db651561e5cedf5fc5
+ docs/components/bulkaddworkspacemembersresponse.md:
+ id: d3aab5e7eed9
+ last_write_checksum: sha1:37171ea7c4582693d05a06f6ebeb19a129cf6a51
+ pristine_git_object: 41c1638401d9354a1024e72a47d50110d24b71f5
docs/components/bulkassignkeysrequest.md:
id: 66e9231f0c3c
last_write_checksum: sha1:7c4564346bbe9f2692053bb1d518972a9db5ad0e
@@ -244,6 +606,14 @@ trackedFiles:
id: 04b004029650
last_write_checksum: sha1:64d50ed55132163d6d6337f53e7a97f7fbbdacbd
pristine_git_object: 2d6897c459041c7d09ec0260ec7fe56efaa4584e
+ docs/components/bulkremoveworkspacemembersrequest.md:
+ id: e265be6b6db8
+ last_write_checksum: sha1:a72176adae768afd731c2ccbad121c82ea3c163d
+ pristine_git_object: 370a7447730e57693615aa1dd96d48cef546117a
+ docs/components/bulkremoveworkspacemembersresponse.md:
+ id: 36a1e8be9e5c
+ last_write_checksum: sha1:994efa56174f14f87605bb3e19eefcdad0aea8b7
+ pristine_git_object: 3769f7b5f970db9324d32ec681a30dcee2b0a6ad
docs/components/bulkunassignkeysrequest.md:
id: 6d254be079fd
last_write_checksum: sha1:c61da3563e04a493e6b1b72e0f8e5f3f6f6075e8
@@ -264,6 +634,18 @@ trackedFiles:
id: 1bcedb5155b3
last_write_checksum: sha1:e71a7e5b233d761921f330ae499a73024aa4a0a5
pristine_git_object: 557c891217e953757e8385a4b54a50d4528ea91a
+ docs/components/byokkey.md:
+ id: 9834cbadc071
+ last_write_checksum: sha1:a5d63ecfc3e6048e9b4ca699a0c2383bc0106b84
+ pristine_git_object: b4b8d797251e82804d823c25a93aa5116e292d5f
+ docs/components/byokproviderslug.md:
+ id: 73e588243967
+ last_write_checksum: sha1:3ea3bc70d14aaab8fbcc9b3377ff978932cbb2ab
+ pristine_git_object: d7c097216061b05072bb004982b66df48f6b4e28
+ docs/components/caching.md:
+ id: 87fa8b1ac535
+ last_write_checksum: sha1:cd5e0704dcc4beb29c8e173b7d73365c27b1cb8e
+ pristine_git_object: 4108245a8918a4015e5bd610fd87e8e5f4741ce8
docs/components/chatassistantimages.md:
id: f1f776b0c4ae
last_write_checksum: sha1:05697e4bc0690cabd72965d01519102c149f6363
@@ -414,8 +796,8 @@ trackedFiles:
pristine_git_object: f3a972b60a63cdb55670cc56cc92eae40578aa87
docs/components/chatfunctiontool.md:
id: 3c79deefdcc0
- last_write_checksum: sha1:b782161259f089ecf304dce269d16c6d4aa3d95d
- pristine_git_object: 6a4416a3c9d119186661a8c3987b1bfa63b91882
+ last_write_checksum: sha1:5c94be4dffc20808f0ccdee5d4f4390bb5a2101f
+ pristine_git_object: d7c9834426f64fce76b207715465fddb97d7e4e8
docs/components/chatfunctiontoolfunction.md:
id: 0de29ccfd817
last_write_checksum: sha1:0a25d1c9b64f1da2513e9153682848cf41f324b2
@@ -454,20 +836,28 @@ trackedFiles:
pristine_git_object: ca73483767de32b3d83b7f9e2741011e26ac8e59
docs/components/chatrequest.md:
id: 5e0fa9a2cb13
- last_write_checksum: sha1:87b3d27fcc66ed8236442681392750b87ee15209
- pristine_git_object: 617ce2091e37323ba91ec47c7e1a6ccff420a710
+ last_write_checksum: sha1:58ccd62998278ca595b2d308bff8d974ac32a317
+ pristine_git_object: 8c5a706618a5c35ebf4ea32fd6de9893adc3ac3d
+ docs/components/chatrequesteffort.md:
+ id: 244b6cbbd2e1
+ last_write_checksum: sha1:232d283adecdffb3fd73e052f4913320c9d0b997
+ pristine_git_object: ed30f437a84f7ae8508545aefa44198935377768
docs/components/chatrequestplugin.md:
id: 24a908f99472
- last_write_checksum: sha1:872a0f5dec13b33dac3aba3616a1b45ce5352feb
- pristine_git_object: 3fcb3f49302af9c7394c00f4946576c5e3ebdabd
+ last_write_checksum: sha1:0d96c14c2f1675e1bc3cdea7b70a82385a5bc117
+ pristine_git_object: 5f3019fbd856a6aed5fb45e2762764e1b4d878ab
+ docs/components/chatrequestreasoning.md:
+ id: dbec0ff3ecbc
+ last_write_checksum: sha1:f749dd845cea3d45a0fd3f4a39e3f1edb5f8f54e
+ pristine_git_object: baa1fb1a1f855f0ea648d44b8cb4c52185efe77d
docs/components/chatrequestservicetier.md:
id: deaf591bec38
last_write_checksum: sha1:8fa53b0f868c99934b83719b7c0b6b44b1f960eb
pristine_git_object: 13ae40be5e3c883f88789c3b5b74a3b2da4c85c2
docs/components/chatresult.md:
id: 212b0f66efd0
- last_write_checksum: sha1:00d612b46dc057645e9f5b56e6ab94e50ffe9728
- pristine_git_object: b4354698466089e4acfad8dad9d2d61dfb06662e
+ last_write_checksum: sha1:0a94cfb0c88a0dbf0f0abc5d83ac6fc6c48051b4
+ pristine_git_object: cc04eadd2f48efd93533a3ddae52ad39e91f5dee
docs/components/chatresultobject.md:
id: 668504931d18
last_write_checksum: sha1:6d550246aa007a5be94a9788ae4cfdfb75006980
@@ -480,14 +870,18 @@ trackedFiles:
id: 028b0f0740f1
last_write_checksum: sha1:8067bf2a2a0d89edebb08ffb5ac35ba1294ffba2
pristine_git_object: ea4df9be592b40d566202d1d044275e526c7ab8f
+ docs/components/chatservertoolchoice.md:
+ id: 794df1f53445
+ last_write_checksum: sha1:357170063031a93ddafb3e65f0de406499099af5
+ pristine_git_object: 908413b3196f8d331aebba8b86e327ae43d314bc
docs/components/chatstreamchoice.md:
id: 4267d8be7145
last_write_checksum: sha1:0c16659042a36e7c30fa688275537718582a41b8
pristine_git_object: 690d74b67239bf7f423039652aea3741c831137e
docs/components/chatstreamchunk.md:
id: 404d264ea22c
- last_write_checksum: sha1:db550d704231305879464bb7ea5d3a00ffbac185
- pristine_git_object: ead7b7ab994da4a328713d1a42a554bfaaeabfa1
+ last_write_checksum: sha1:1353c09378850a9810c39cf3198f0fd5e049f610
+ pristine_git_object: 3c64aec72fb2eb9f0cf6eae975dd9c8bb183c6e6
docs/components/chatstreamchunkobject.md:
id: 5393918d9606
last_write_checksum: sha1:0765d94b3d01c811155dce29c20c2ae4bd4abd0e
@@ -500,6 +894,10 @@ trackedFiles:
id: bd41a2e6e1ba
last_write_checksum: sha1:4382019bbc25043a562225a2d54f07d282c65968
pristine_git_object: 03d5ac5ab133efae7ae05733395324c136247357
+ docs/components/chatstreamingresponse.md:
+ id: 2b5d703d7b01
+ last_write_checksum: sha1:a897660437d6d71c4fe70d71cccccbe3e0be042d
+ pristine_git_object: 26e54c468befcb6070a54bd3560bb8128fa36024
docs/components/chatstreamoptions.md:
id: b01e4aa7d192
last_write_checksum: sha1:0f21f4cb7a3f28135b4117e20dcf829ea08ded52
@@ -554,8 +952,8 @@ trackedFiles:
pristine_git_object: a24314cfbba98628733e2f38affb7005f96dee0e
docs/components/chattoolchoice.md:
id: aa08787a976b
- last_write_checksum: sha1:3c2d953ca41929825158130bbcd8d1beca11a914
- pristine_git_object: 7a5f160f5932dad05821cfeee1a62d4fa7daf6e3
+ last_write_checksum: sha1:d2c8ce107197a1c4642c9df6bb307ae3fd3924ff
+ pristine_git_object: 0ffd588e856e8877a6300baa94e25b73ea5af735
docs/components/chattoolchoiceauto.md:
id: af8f56546bde
last_write_checksum: sha1:14e1710cab46ac216073ae11ee4e4d9e9c089500
@@ -582,8 +980,8 @@ trackedFiles:
pristine_git_object: 7eb1791a9153498d5ffffc6b67d3668df59000c2
docs/components/chatusage.md:
id: 72cd0c41ec64
- last_write_checksum: sha1:ceb141009eac851f231ff66b767ba40627148f3b
- pristine_git_object: e7312f04590a4a5b31a97597ab4f723f9ff356ef
+ last_write_checksum: sha1:9a6a709e2ea8f36c1f55afc3ae364917ab787e5e
+ pristine_git_object: 536fc52c1d3dec20dc3dd38e65714da08779e4d3
docs/components/chatusermessage.md:
id: 4ab205b0030b
last_write_checksum: sha1:4c87fbc12f54bb5b58526949e3f8ea9c161f8cdf
@@ -598,12 +996,20 @@ trackedFiles:
pristine_git_object: 95203396fad26d48c76b23f3481b6167291500e5
docs/components/chatwebsearchshorthand.md:
id: 97a5522cf188
- last_write_checksum: sha1:3058010c14073b6e201adb7400622a012abfea4e
- pristine_git_object: 638c8a94151ac17091347e705f6eb35399b70d98
+ last_write_checksum: sha1:86d054fd7038215a3585b7661af9953b2edcba07
+ pristine_git_object: 731bb0306c6017eece6c930f96876bc2c6ff4448
docs/components/chatwebsearchshorthandtype.md:
id: ec8d82e4169d
last_write_checksum: sha1:11a35b858e9630405ffdde10c89e60ed33fbed45
pristine_git_object: de2f86e7af6cc072ccd2af6d71e3babc9b554c4e
+ docs/components/citation.md:
+ id: 127c4a332a7e
+ last_write_checksum: sha1:e0964662c49bb4a2d589a04f1b3f73fefce5c127
+ pristine_git_object: e6b0a3add5711b51b8a8927aeb61183d6b4d4732
+ docs/components/cleartoolinputs.md:
+ id: 6073ea42150b
+ last_write_checksum: sha1:d157848b2ac2abe2c8ebdfb54edc270d7ad3c097
+ pristine_git_object: af8f2b61c9e4ea4e96d7d0f1b1d7e9e2d6ae9842
docs/components/code.md:
id: a224ebbe4cc9
last_write_checksum: sha1:f505e84ac9a4367e1ffda1f6e03c72c24c15ecbc
@@ -624,6 +1030,14 @@ trackedFiles:
id: 53e85119ed43
last_write_checksum: sha1:eae4f9ff22f1fb6c5139b9e44a35d0238388a2ea
pristine_git_object: 3c45dd0765fa97b40928a609a6bbc0e6092be0fa
+ docs/components/compactionitem.md:
+ id: 5c6d406968ec
+ last_write_checksum: sha1:0314cc2f54c07b7d07da0a815dac19ffef673d33
+ pristine_git_object: 76160f0750ffc10ef9d07a2f8d6652f05670cf18
+ docs/components/compactionitemtype.md:
+ id: 1033dd974aab
+ last_write_checksum: sha1:ba3f1ccb85f1193a2523c96199a7e15a4923e5ef
+ pristine_git_object: 3616c45038b37d4adc7f0d643f7159853915586d
docs/components/completiontokensdetails.md:
id: 6b7b08e269a0
last_write_checksum: sha1:1731f180f3ed8e9fb0a52137853b0d587f8f703c
@@ -660,10 +1074,54 @@ trackedFiles:
id: 89a8dc079e5d
last_write_checksum: sha1:1504c81161683ff417806ddb74839797e7a08b91
pristine_git_object: df63209599b11bcc887019d5cfc0997071fe8137
+ docs/components/containerautoenvironment.md:
+ id: 52c0ed2293d7
+ last_write_checksum: sha1:7a0b71d5f90e067604db29ef21a35bea0d6be805
+ pristine_git_object: 8e2b41b11c55627a8adc4def9bbe017dd52da0cf
+ docs/components/containerautoenvironmenttype.md:
+ id: 305bc5e52c06
+ last_write_checksum: sha1:69cec3929d9355f96b85ea3c92de48506ac77778
+ pristine_git_object: e1db56e5c72e2203821d6d58dedf8b29870def8b
+ docs/components/containerreferenceenvironment.md:
+ id: f7cc9a458e0f
+ last_write_checksum: sha1:09a4b2ccb2514619ac6732d1dcbf0b69cba7d874
+ pristine_git_object: 9870ca09ffcabe1dc8f8fc04658459bc39a078e0
+ docs/components/containerreferenceenvironmenttype.md:
+ id: e82f2f03aa56
+ last_write_checksum: sha1:608da106f742bd3f5cbbbca53b28f4e44d59d097
+ pristine_git_object: 11dd67a5802cde4b49bca63d9f7dc25c94bef20c
docs/components/containertype.md:
id: beda1b89c7a4
last_write_checksum: sha1:f513446b0c8b1cb3a34ed6721bd716536ffbae47
pristine_git_object: 9be5b3ce474de60fa8116325313e5a8d9ebe188d
+ docs/components/contentcompaction.md:
+ id: 3af2bc3b0e06
+ last_write_checksum: sha1:4cfd8c00866128aae53872143819cf939110cc4d
+ pristine_git_object: 2f7fa669eda8b3b01348cfdb99db9bb410759f24
+ docs/components/contentfilteraction.md:
+ id: c9b7c26b9524
+ last_write_checksum: sha1:363f70d11cc87b49cf7d5ba82f4c4d7063a2a5dd
+ pristine_git_object: 43ee22f394d068eed9cdda45a655a1f64fdab84e
+ docs/components/contentfilterbuiltinaction.md:
+ id: 55a04916d7d4
+ last_write_checksum: sha1:1e6e0ebc1b88dbef7029f951368198e20e1cedd3
+ pristine_git_object: 4f71cc021888a043f920cd5ae1abad2e34a99056
+ docs/components/contentfilterbuiltinentry.md:
+ id: 82426635e713
+ last_write_checksum: sha1:ab50d8f260f82c675c617d873c3ef08aafdbe548
+ pristine_git_object: a9c6ddb1aca79dbf1feffa26235c888c60c9d67c
+ docs/components/contentfilterbuiltinentryinput.md:
+ id: d165305608b4
+ last_write_checksum: sha1:cea1961d568d8087828b4467affb87f66a99014b
+ pristine_git_object: ce557a77f7b40573881741aa169d33eddddd7ca4
+ docs/components/contentfilterbuiltinslug.md:
+ id: 0ce8d26d9c87
+ last_write_checksum: sha1:320e33dee158ab882b3728194d266fa1369a83a8
+ pristine_git_object: 823e41ff1b867856201745c4d059f6965ebd013f
+ docs/components/contentfilterentry.md:
+ id: 856c24c8dad0
+ last_write_checksum: sha1:4c604fed1ea84146d5430b5cd449237664655c24
+ pristine_git_object: 9b7b6c8c4a83d7c39f6640cdc1b366736c49f38e
docs/components/contentpartaddedevent.md:
id: 46c34edca7cc
last_write_checksum: sha1:d92174df5be607cd3c387504774864c6c80e7899
@@ -676,6 +1134,14 @@ trackedFiles:
id: 72bab8b5ffda
last_write_checksum: sha1:d1effe2f7a73919d65a99f7ac4f3f8d0b80b645b
pristine_git_object: fa5229a68a69489db870b32e5cb58e5e9e707ec0
+ docs/components/contentpartaudio.md:
+ id: 8a560472a48d
+ last_write_checksum: sha1:61e491954ac68750f578f0a4a697bcc7b6a961f5
+ pristine_git_object: e79df2f7ba710d059051b6ec8a098dde12b1269c
+ docs/components/contentpartaudiotype.md:
+ id: b2efae4d5bc1
+ last_write_checksum: sha1:33d0fed2a66734d0ba9a707933bef225171d3d73
+ pristine_git_object: 368673e2a7e2ecbfc4de294485eee16641e25b45
docs/components/contentpartdoneevent.md:
id: 4c409e055805
last_write_checksum: sha1:5d6a3d850c8a4571937b891efd7ff368c8f11f7d
@@ -700,6 +1166,70 @@ trackedFiles:
id: 7b799c2f4203
last_write_checksum: sha1:77ad88cf178e7ba6ec27eb2ab17bad7473668a6b
pristine_git_object: a63a040363df5d6da9d336daeb354a87a73e531f
+ docs/components/contentpartinputaudio.md:
+ id: 649dc80c9a9e
+ last_write_checksum: sha1:04c4a3da8b685d3d0119b54c8416c667354b5796
+ pristine_git_object: edd07bf97cbb02004082f9c976601fa5cfc0d116
+ docs/components/contentpartinputaudiotype.md:
+ id: 93b19b8d50a5
+ last_write_checksum: sha1:7bd25fa498c5d21320ab03ee7a5d932d136fa4dd
+ pristine_git_object: 9feb3fcb787c42aa9f06ff2b48463d167771ed66
+ docs/components/contentpartinputfile.md:
+ id: dfb6b2c0e96f
+ last_write_checksum: sha1:76b6c74e1f390f5bdc54b8060ac110fcc67eefe1
+ pristine_git_object: f7f021677830ff6da9ef89f61de7e3a9811e9a64
+ docs/components/contentpartinputfiletype.md:
+ id: fb7732ac8299
+ last_write_checksum: sha1:685e7d57fd27c0e12f82471e3d5853d83f2ff7f9
+ pristine_git_object: 60a5682a9cac3cbc856150074dfcd30d70a8e185
+ docs/components/contentpartinputvideo.md:
+ id: 4632198b7a38
+ last_write_checksum: sha1:43f358673ca2a9e4d4fbf7b0bef946419abdda06
+ pristine_git_object: 27bb8b259a2a81cb33ebc0c9a2a62b7ac94422cf
+ docs/components/contentpartinputvideotype.md:
+ id: eac3808e492d
+ last_write_checksum: sha1:4f9b77cb1c6a8a9d437e44062956bcf0888f3814
+ pristine_git_object: 8be0a0534737efc557c6f76a868ce6cf5df50481
+ docs/components/contentpartvideo.md:
+ id: 3aaf4fab5336
+ last_write_checksum: sha1:f6daab262230e2e3e5c2f5318b6892ad4b6e7a3a
+ pristine_git_object: fd7a521e982988dcacd65a6453a06971da877df7
+ docs/components/contentpartvideotype.md:
+ id: e866f7da5684
+ last_write_checksum: sha1:824caf53883b556d4e9f99d5f496b706e4d48f00
+ pristine_git_object: 662faaacea82d1fb30c586c41ffdc6a762e83a1f
+ docs/components/contentredactedthinking.md:
+ id: 2fa87a82460f
+ last_write_checksum: sha1:8229af2ad4a4f3603a2d56f0b347bdac60dd7c2d
+ pristine_git_object: 3a10ef6b60553edc02a7659b2d28ecde3c57a3ae
+ docs/components/contentservertooluse.md:
+ id: 55cbcc554f4c
+ last_write_checksum: sha1:246897cb594e8ec400e6c992d983c4b91a53cef0
+ pristine_git_object: 719c5c83b9f740852f975fe24b47d3bb5092cf0a
+ docs/components/contentthinking.md:
+ id: 002f8107eb0f
+ last_write_checksum: sha1:ced629b961cf70a6dbdce17f3de6e10896e3e995
+ pristine_git_object: 9dd65faba7e52845e146cc3ca2a91c740811d564
+ docs/components/contenttoolreference.md:
+ id: f915e52eb876
+ last_write_checksum: sha1:241547b6d5dbdc93b1282c8b30cadb323519caf0
+ pristine_git_object: 96317dd62fa0acb84665487aaec2c311ee5a3e9b
+ docs/components/contenttoolresult.md:
+ id: 6caf8d6dc5ca
+ last_write_checksum: sha1:3341ac4cfae9cfa81f93eaeeb94065ec6ac0d3f2
+ pristine_git_object: 66c04d5affa308882a67aa4266ca40e085a47e53
+ docs/components/contenttooluse.md:
+ id: 91e0b67ed688
+ last_write_checksum: sha1:a3f367058973195fe24b2d2ec81ce4d61f695354
+ pristine_git_object: 6d667fee3e78addcc6c5ffe6b127ec9c5bbd3a96
+ docs/components/contentwebsearchtoolresult.md:
+ id: 21b6cbd88f3f
+ last_write_checksum: sha1:cc5e51f4ab8d2ef457e2d232eacdca41c951e9c8
+ pristine_git_object: c459891fa9663572de7c9c9d13981b0324ce6353
+ docs/components/contentwebsearchtoolresulterror.md:
+ id: b503fcb137c2
+ last_write_checksum: sha1:a6b0053559c6950de9b437c5dfb246b0e18d71d4
+ pristine_git_object: e45ae52bbe07a24d3ccbe2ca9e8d7e427fbbe946
docs/components/contextcompressionengine.md:
id: de089ca4a588
last_write_checksum: sha1:4dee80dba0a801d9d6aec487235a39d548744372
@@ -712,30 +1242,126 @@ trackedFiles:
id: 1946fe4536f3
last_write_checksum: sha1:918d605b019529584735b29b008e465a4f798af5
pristine_git_object: 4922c8b3bb952f712fcc0cf414dd5b505ed2c4a4
+ docs/components/contextmanagement.md:
+ id: 3c24bff89193
+ last_write_checksum: sha1:c192b583fdb25964c6def320c39284410a010bfe
+ pristine_git_object: b021b5ed7cfb487dce08a1c9637c0fb95d16ba94
+ docs/components/contradiction.md:
+ id: 395878b36283
+ last_write_checksum: sha1:2ea135646f838c852beef96adc47ab28a0f903a9
+ pristine_git_object: 1a94d757e5ad641098da32fda8e9818fe36c134b
docs/components/costdetails.md:
id: 2e3d81b7a646
- last_write_checksum: sha1:298cb44901e7c50563597aae9e0606cf83edbc2b
- pristine_git_object: ada009ced29fcaf5d19e81bc67276fe9718ccfaa
+ last_write_checksum: sha1:b2748fc0cf305791446f5f217947d82bd74a8350
+ pristine_git_object: 58a1aa8485130f8b49c633dfef0439b83a5f239c
+ docs/components/createbyokkeyrequest.md:
+ id: 0c8feda5c201
+ last_write_checksum: sha1:327a07d0a93672ad5375f65847ab9f8f0f6c44f5
+ pristine_git_object: 1471fe23196b46168cda4247bc2983be9d8d67bc
+ docs/components/createbyokkeyresponse.md:
+ id: 7c06d88245c4
+ last_write_checksum: sha1:6940b0c65045f9895d77a7c055711d0f79bda2f9
+ pristine_git_object: 7a94cf8a73af0ae307a5072042c1f7f4af73052f
docs/components/createguardrailrequest.md:
id: 5144188aed43
- last_write_checksum: sha1:78119c6dd8cc0b40009afb1da489638ac35f16b6
- pristine_git_object: 77b840640f4d30cf4513745df984d3a950b76c12
+ last_write_checksum: sha1:8a11b2066f551934b763946fca65db412e89dd47
+ pristine_git_object: 62ac84a3acae321227bc87beb6a58b052265f53f
docs/components/createguardrailresponse.md:
id: 94a5ed00d7b9
- last_write_checksum: sha1:bad318ece1219797a8db60631961006554b38cda
- pristine_git_object: bf3c2f7a4c16ba60ecac1fef7a733cfe6c9efb3b
+ last_write_checksum: sha1:19f8c9b602dcb84d30e58efed998366600e3d9aa
+ pristine_git_object: 7206ed2c684bac18cbcf7f9f88e81d8e4116511b
+ docs/components/createobservabilitydestinationrequest.md:
+ id: 9ce757a7dbff
+ last_write_checksum: sha1:edc26309fb23380bd6041cb69daa38088775a66d
+ pristine_git_object: 46466a54ac5b141cfb957e1e803c111bde4ca63c
+ docs/components/createobservabilitydestinationrequesttype.md:
+ id: 348f2067aba4
+ last_write_checksum: sha1:b7251d408da77edcbd2bf88540cfd269b3cdfc11
+ pristine_git_object: cd6531c3fc9ec74e2fd07347cbb22a5196e1be4c
+ docs/components/createobservabilitydestinationresponse.md:
+ id: "732380376136"
+ last_write_checksum: sha1:418b458c99152d2bf294f3039cbc3650249c0d2c
+ pristine_git_object: 52ef8aec72bb9cb3b53f99f40f6f24d786306f4f
+ docs/components/createpresetfrominferenceresponse.md:
+ id: 3e5b6070cb8b
+ last_write_checksum: sha1:1881eb7fbe758eff1b9ead38aaee739a23b27482
+ pristine_git_object: 05ff3c8bdee72a89821947233ad2b07e344ccf63
+ docs/components/createworkspacerequest.md:
+ id: c81e27cca23b
+ last_write_checksum: sha1:02a8d08050dfad4c7aa30c136376492597a280b2
+ pristine_git_object: 6a27face512625b803b3019961e92fb93507c07c
+ docs/components/createworkspaceresponse.md:
+ id: 32307c6ed876
+ last_write_checksum: sha1:06da8a383b790b50e9112e715bc27193b773e412
+ pristine_git_object: f8016bd9b1a1836738e1f4811999a96dabf244ec
docs/components/customtool.md:
id: ff0ec1b8ea8b
- last_write_checksum: sha1:1da938f1452f026020f8f3c617e2ee3fd11b78e5
- pristine_git_object: 6cc1ff6a2b47a8fa754fa22f63506126b9b9d0a3
- docs/components/data.md:
- id: 097aebaf54b6
- last_write_checksum: sha1:b2407ba7d2f14428d780fc4196d96622d2d4dc07
- pristine_git_object: 386321b1fbeae16dfa3fc07c073b7f1dd8844c1d
+ last_write_checksum: sha1:16c97cc21733bf9ec827d3fd259f205f78ec88ed
+ pristine_git_object: 30dd86addf398fc81df2ef8e2caf4e1f0b013b4a
+ docs/components/customtoolcallinputdeltaevent.md:
+ id: aa74a9239e4a
+ last_write_checksum: sha1:4e4fc3e68dc1fc5b2d06480df23b7b300976efac
+ pristine_git_object: 4f602b0e61488f794f97b0d9bcceb46b7e93afb3
+ docs/components/customtoolcallinputdeltaeventtype.md:
+ id: 65bad1b92e5e
+ last_write_checksum: sha1:028f27c1b938af3e8ccc9234cf28b296eda87778
+ pristine_git_object: 1029c1bf974c37ad107d5eb589eede4fc1066f29
+ docs/components/customtoolcallinputdoneevent.md:
+ id: 97d597082345
+ last_write_checksum: sha1:221fc723d1c277e5210b8a4c9b050ababaadd58f
+ pristine_git_object: 691db8e9a97f4ea4ddf07f51464ad7a20900ed9a
+ docs/components/customtoolcallinputdoneeventtype.md:
+ id: 1909dec217d4
+ last_write_checksum: sha1:67020dd1f2231c0fd73324d8d01ca9272fdbe2cb
+ pristine_git_object: 088afd273160b71d1eff1495bd50bdee784dc706
+ docs/components/customtoolcallitem.md:
+ id: ae7a6ef3060d
+ last_write_checksum: sha1:bb1d924cd9719ea627615ac328b110f3ed090b65
+ pristine_git_object: a4bf10f7c9de3955d685b74a84bd573fcb799cb5
+ docs/components/customtoolcallitemtype.md:
+ id: 43c75f922ac8
+ last_write_checksum: sha1:038cc5d06f5d69a4a2d1318eac6994d25b97d693
+ pristine_git_object: 45ae18528e90d2780fc584798ca68c59aa139914
+ docs/components/customtoolcalloutputitem.md:
+ id: 7fd804624ea4
+ last_write_checksum: sha1:59c60228c9cfdf9aaf7849308986561f3f6a3362
+ pristine_git_object: 9bddd1f51bfa27f3beceae0ec2c0bc961031abe5
+ docs/components/customtoolcalloutputitemdetail.md:
+ id: 9060d746d744
+ last_write_checksum: sha1:48b8d9387e689ac4d1011b18ee47b6b50e68f172
+ pristine_git_object: 269dcd5c4827764641f5480b124354a9d4c86220
+ docs/components/customtoolcalloutputitemoutputinputimage.md:
+ id: 644e4613d935
+ last_write_checksum: sha1:fa09dc89aa8e38719991328d9a3a3a728a6ad7d9
+ pristine_git_object: f535d0464a8cd17fc6141bbe314d84ed9fb54412
+ docs/components/customtoolcalloutputitemoutputunion1.md:
+ id: 72bb55707f72
+ last_write_checksum: sha1:05a9d4f91756451143d0dd75d551cae5dd572a5e
+ pristine_git_object: 9061394039ad4daeb84740e333554e6828ef8299
+ docs/components/customtoolcalloutputitemoutputunion2.md:
+ id: ca10033f3ed9
+ last_write_checksum: sha1:213c956b2fc511b952bd8f3416fdef20336c4081
+ pristine_git_object: 6750f9d41f77ec38d8554a2c880ae9e0daab8357
+ docs/components/customtoolcalloutputitemtypecustomtoolcalloutput.md:
+ id: e6ba19bbdb9a
+ last_write_checksum: sha1:435ef3f664fa25e832e09d4b7fd23bec43711962
+ pristine_git_object: 1f833f8904c45c28f378a297e912f2413b0ba6b8
+ docs/components/customtoolcalloutputitemtypeinputimage.md:
+ id: 1923f15f8775
+ last_write_checksum: sha1:39bad5280dd7abd36a784c4a27eb6d12c53fccdd
+ pristine_git_object: e4811f464b43800ab8274e2ef256140b79f2a265
+ docs/components/customtooltypecustom.md:
+ id: 5fabd69a4a9d
+ last_write_checksum: sha1:900733b615df411575d56ac31008d2059e75e1be
+ pristine_git_object: 173b9852b2b997cdbd6308ccfc7c8aa3659dea04
docs/components/datacollection.md:
id: cacd95d2ebf9
last_write_checksum: sha1:1d9eb4c12467860d5ef9edceb6456a4b9d6de643
pristine_git_object: a07c6e2e56cf9bca27530a9f9940b4d439680a0c
+ docs/components/dataregion.md:
+ id: 8c2ef2f3a21f
+ last_write_checksum: sha1:455503307853c4dee6a8c3d5b790f4e84c1fd5cc
+ pristine_git_object: 79b026c46fa27af5cc8c8e384498b11bee1bf5c2
docs/components/datetimeservertool.md:
id: 2b884f7c46b0
last_write_checksum: sha1:60984916e1dc1df81001d9ff7b1f394ef4895498
@@ -752,22 +1378,30 @@ trackedFiles:
id: a84477afcaec
last_write_checksum: sha1:a20e8b576e341dbcdb91884b8fc83cf4316ab106
pristine_git_object: 6941215fa82fae36a554f184e99595e51bf4b150
+ docs/components/deletebyokkeyresponse.md:
+ id: 9fab8fd95bbe
+ last_write_checksum: sha1:2c8376b694e91d8fe5f3c0e85575ad1c5defab8d
+ pristine_git_object: 706faaa13d94b66a414d772044077cb1444bce45
docs/components/deleteguardrailresponse.md:
id: 78770374c8ed
last_write_checksum: sha1:1ceae5a23d706b158b011b234d968a0fd495d2fc
pristine_git_object: 7e0a483e6690842ba12d2a9349a9e2f0c79df8c9
+ docs/components/deleteobservabilitydestinationresponse.md:
+ id: fa521d2a3c76
+ last_write_checksum: sha1:ce3c41c91454e83f9729bea4ad1c312e0ab7f5c1
+ pristine_git_object: 34f13a0d5e0bc6c7513533d2417896d605d54626
+ docs/components/deleteworkspaceresponse.md:
+ id: df0fb6410027
+ last_write_checksum: sha1:e5eebf42ba059f27a266fee18c032e193fa382e6
+ pristine_git_object: ba3c2bfda961110864cb08434398c94c698415f5
docs/components/easyinputmessage.md:
id: a4927c37a92c
last_write_checksum: sha1:9da1d4db9cd27f00a6b95f2bfd770e3e1f3755f0
pristine_git_object: 336ef7a7bb1df419370af586eec43e774bf4730b
docs/components/easyinputmessagecontentinputimage.md:
id: f7937c5f8c6e
- last_write_checksum: sha1:2d0c966529294cac8c9a2f1327bbb2f751df635a
- pristine_git_object: b4a0bb57d62eb7d91e0809c6334d2e08df6a2d61
- docs/components/easyinputmessagecontenttype.md:
- id: ff36a30eebf3
- last_write_checksum: sha1:aa6d05a3a1e20b90ce068b7e98690061c89c6172
- pristine_git_object: 4b35caee917c51e25d8eb9c3056d0300e083b60f
+ last_write_checksum: sha1:dfddbfbcce4b0309937f0369bb4768fd4382b043
+ pristine_git_object: 22ad82113e1744c08340678e760a4d3f7e0ffeaa
docs/components/easyinputmessagecontentunion1.md:
id: 50fcb3e4383f
last_write_checksum: sha1:f3b0bfbd846036a751a5fafe0027d24fff1e8562
@@ -778,8 +1412,8 @@ trackedFiles:
pristine_git_object: fece542858a307b4381b49dd8a48438f6e5412a1
docs/components/easyinputmessagedetail.md:
id: c61a76d3f5f7
- last_write_checksum: sha1:307cb8955a3d3e6dcf4d975203de59c86865d3a3
- pristine_git_object: 31995d86e0c84af6a6e05212a342d3e13615941b
+ last_write_checksum: sha1:6b39918f586956910ec295b1554f7d60344644e1
+ pristine_git_object: d16be2523383510ef5e70821cc9fcd80952b1520
docs/components/easyinputmessagephasecommentary.md:
id: 876e7cf3c1bd
last_write_checksum: sha1:a66361bbf2c77f4c9ead65c37687136d44fa5b25
@@ -812,6 +1446,10 @@ trackedFiles:
id: 6c844fdcf70c
last_write_checksum: sha1:21736cdf62fc202adf26bf1939e029f452dfcf83
pristine_git_object: 7b275a9261e22e64da7c7f53e5b998e13af51a1f
+ docs/components/easyinputmessagetypeinputimage.md:
+ id: 896085ad02a8
+ last_write_checksum: sha1:7aaf19dc8344080ebe7b67569b48a02f96a05b5a
+ pristine_git_object: a40bf8aac133d7fd1111fa688bdff6a419d9b7cc
docs/components/easyinputmessagetypemessage.md:
id: 09c9ddf2d237
last_write_checksum: sha1:4890beaae899a0be186dd053e4f83f5e9c7f2688
@@ -820,10 +1458,34 @@ trackedFiles:
id: 27d848813ab0
last_write_checksum: sha1:eff07929141781909a39ca2793f1afa963169f7d
pristine_git_object: f460fe48e034fa2d47ca347e7c4ab3a9846a0663
- docs/components/effort.md:
- id: 7038976c6de5
- last_write_checksum: sha1:fa890164de181096fd8c1c3b208c2c783c193b2f
- pristine_git_object: b23f0fb57a0dead83ce5f3bb69a809bc1e1fbf00
+ docs/components/edit.md:
+ id: 2f41d0745c51
+ last_write_checksum: sha1:21f4b7a31212dac0a40f81fdae3485ce5fbc4831
+ pristine_git_object: 3cddc0c341c102b23d127274a3c41b6719d7b9bf
+ docs/components/editclearthinking20251015.md:
+ id: 4d12fd9d95ec
+ last_write_checksum: sha1:908d355f57932e8aeae02bb9b21fb16711abe301
+ pristine_git_object: dd0296e4ee080bb6127b2af9d3b6f7b8850a4eb7
+ docs/components/editcleartooluses20250919.md:
+ id: 7c5b2e32875c
+ last_write_checksum: sha1:c6f8db148f629df94f9a2a73e8c98e7406ce7200
+ pristine_git_object: 1f8001583309f3486dad8456d6ef1e76ebea1208
+ docs/components/editcompact20260112.md:
+ id: 47c6b6fa38ec
+ last_write_checksum: sha1:59a918b462ee2cd67c496deefb681b3375ed2b50
+ pristine_git_object: 7b6f31523dbc6e02700d5d2aaccc39fae9644229
+ docs/components/edittypeinputtokens.md:
+ id: 099ed6a1de82
+ last_write_checksum: sha1:41580565bc483b2ca1cdb981e15d324f8060f504
+ pristine_git_object: 8463c0cdd55e1d75e23e3d7362f0dbfeca1985c0
+ docs/components/endpointinfo.md:
+ id: 98e0e75e1121
+ last_write_checksum: sha1:5563b32279aeafa2725d1547df1d0f517e53789d
+ pristine_git_object: aa455ebb10ec0c722ed3c38824d82c0689507663
+ docs/components/endpointsmetadata.md:
+ id: 9b403c20b7a4
+ last_write_checksum: sha1:805465cf28357e16abc156888f5bbf305612e0f6
+ pristine_git_object: 83eba1215ad932ffe98dccc5b1b5c24fd79a8ae3
docs/components/endpointstatus.md:
id: 8643237270dc
last_write_checksum: sha1:945606bc29cd884375a5c9404786df5e726e67a0
@@ -836,6 +1498,10 @@ trackedFiles:
id: 786c3bb44e8d
last_write_checksum: sha1:5ed43ad1b7a3ad8ed0d2198be4edb3a469c4910c
pristine_git_object: a64dcf8737b1b8fd7dd8d3be0d9ca92f3febb59d
+ docs/components/errorcode.md:
+ id: 8444c861d257
+ last_write_checksum: sha1:8afa60d8ed19ab173c806f80bbe6fee0f40daf5a
+ pristine_git_object: 5b63fd329f8a981b755b8ed175c70cccbe951608
docs/components/errorevent.md:
id: 85ad990558e2
last_write_checksum: sha1:b5a4361d18eceeeb7238df66b32e53ce42aa9888
@@ -844,6 +1510,14 @@ trackedFiles:
id: c66a1a2560ef
last_write_checksum: sha1:75e5cd528e6faeee349e685da1810190643ae17d
pristine_git_object: b3410e67c37edd66f60b0f2364e0d858abe3bd88
+ docs/components/failedmodel.md:
+ id: 352428b99ca5
+ last_write_checksum: sha1:92ead534bbde5d3029a41bcdae5d381d85ece301
+ pristine_git_object: 01f5aaa2523583fb5c7d1f575a62f28f8c716760
+ docs/components/fieldt.md:
+ id: 80d3b62a3bde
+ last_write_checksum: sha1:c9ed5fc7d8bb28083fa40f14788adeb694770c89
+ pristine_git_object: 2589ece524306e237bbd57cb749e469856e5c1e2
docs/components/file.md:
id: 6148b0bfb103
last_write_checksum: sha1:6ed22bc8b67721e109d726be38bcfac96f0fd327
@@ -876,10 +1550,18 @@ trackedFiles:
id: 4a63087d0118
last_write_checksum: sha1:3713c32b626ffd11e485e37d2d37b25e8feb12f8
pristine_git_object: 0315adc688c60198e04b04c516e0d8ac69009900
+ docs/components/filesearchservertoolvalue1.md:
+ id: bc1f3e9addd7
+ last_write_checksum: sha1:d37518968240e5e99c3a8539489eb364c64c0c44
+ pristine_git_object: 7f367fe902c643ad5a973deb76af02dc38647336
+ docs/components/filesearchservertoolvalue2.md:
+ id: 087cdb1e4407
+ last_write_checksum: sha1:bd9a21d7465dbfb696ec8c0d4d09ef7ee2d34143
+ pristine_git_object: 9ad11d360b2d30f737b0560c61b321b748f04e63
docs/components/filters.md:
id: bb43ec42351f
- last_write_checksum: sha1:88d9a30429c9e65db5641349520318d4782dfe48
- pristine_git_object: 28b2378e634ef0df5d0a030bb79d58ecca770db3
+ last_write_checksum: sha1:c982cec79f513d3c3836d401762a7b7131d307e2
+ pristine_git_object: 89463d7dbf25d5d3cc6e1a7467cdc5f6bffdd513
docs/components/filterstype.md:
id: 7a1c1e739033
last_write_checksum: sha1:355e43e7bfb04a8119a571ead3b12904526669ac
@@ -978,8 +1660,8 @@ trackedFiles:
pristine_git_object: 3f4c91d5bbe63c375f8ba938bfa6b620355c82c3
docs/components/functioncallitem.md:
id: 728446a82c6b
- last_write_checksum: sha1:b85a6cb3ac90cb0a7dfba0bb1d05a4362b892dc7
- pristine_git_object: f1c940dea0a871300f9b3e4a213e0fb90e0386d1
+ last_write_checksum: sha1:305e2150f29e5d112d0cb1393d992af191fe206f
+ pristine_git_object: 264caf51ad826572ceddc91ba4a3ed61a8a14a78
docs/components/functioncallitemtype.md:
id: c7b1c1ec212b
last_write_checksum: sha1:995a373197e8ee246d7127595dfdd1c77a913dfe
@@ -990,16 +1672,16 @@ trackedFiles:
pristine_git_object: 70980ff71ad1d40d3883760dd03e08e441cae5d0
docs/components/functioncalloutputitemdetail.md:
id: 2cb02374b48c
- last_write_checksum: sha1:c03306cc3461fa680c42fe147394c5b2a27d58cd
- pristine_git_object: 3308be744f3ae5d92e2e90e5f9d4b29bc30c4ebf
- docs/components/functioncalloutputitemoutputtype.md:
- id: de216282851f
- last_write_checksum: sha1:2a078e25376f85ab835fd8e685305b62091426b9
- pristine_git_object: 048a5f46975d5a2df14a7df7cb98e217382c09ee
+ last_write_checksum: sha1:f6dd8efe5930ce437012cc96a61f0b7db0483a91
+ pristine_git_object: 110493d3ee8ba69d0eaaa462e3b33151253f86c9
+ docs/components/functioncalloutputitemoutputinputimage.md:
+ id: 9570df9b26d2
+ last_write_checksum: sha1:67e5c38e6c836a97ad000cd964d11c506798dc55
+ pristine_git_object: bc92a71bab1c01f60ca7934ede4fb6b88c0e60a8
docs/components/functioncalloutputitemoutputunion1.md:
id: f029cb33f764
- last_write_checksum: sha1:ab07cf8dcc44a1d42fe622ef4ced5a0ecebde673
- pristine_git_object: 41e5f165f9b2af0af87df7743058db29d6e1a97e
+ last_write_checksum: sha1:46f8e24dfc769f4df47be4cc6b411879f68d51dc
+ pristine_git_object: 11055d5492955153e6be80801a6666d37f1f7c90
docs/components/functioncalloutputitemoutputunion2.md:
id: 1737d9834676
last_write_checksum: sha1:edde5e34d278f6fc8068d42e94e42d4fdad355e2
@@ -1012,14 +1694,174 @@ trackedFiles:
id: 88a512c5f9ce
last_write_checksum: sha1:611201e2dbd2c8fe1c501b5365bc06367bc5370c
pristine_git_object: 2f4629220306ced5674a9ef70dbcbce1f908b93a
+ docs/components/functioncalloutputitemtypeinputimage.md:
+ id: 543fcbf66e1d
+ last_write_checksum: sha1:9f50972404864a7c4686908509d318dde68651cd
+ pristine_git_object: 0bf236695ac6d09e19cb2ca87f83bb34a0113aef
+ docs/components/fusionanalysisresult.md:
+ id: 8c86ee99328a
+ last_write_checksum: sha1:2a166476b05f68c04e6fb4949f27a962943f1cdc
+ pristine_git_object: 53b057d410c3f7490e0da572a57b07db911391ed
+ docs/components/fusioncallanalysiscompletedevent.md:
+ id: 5b7a4d83d4e0
+ last_write_checksum: sha1:bd617220cf760bf81c01a18adb78d10372ddf4f2
+ pristine_git_object: 8eb755e30bf34cca76c6315ebd591347a0dd4331
+ docs/components/fusioncallanalysiscompletedeventtype.md:
+ id: 2b0435cf2967
+ last_write_checksum: sha1:0241b666501b6046cf3321c6e62bd2c2ad1d9969
+ pristine_git_object: 62106911a72fe5f9073664beefc122107092c047
+ docs/components/fusioncallanalysisinprogressevent.md:
+ id: 0550b58a7e71
+ last_write_checksum: sha1:78729ef0b7372c67a30d022d735d8632e1fba58f
+ pristine_git_object: aaeecf4137a284543e5c2adfed54c9d293e9c754
+ docs/components/fusioncallanalysisinprogresseventtype.md:
+ id: 55fc502d3f1b
+ last_write_checksum: sha1:e4416f12218da7f6e92d673debb751cd8ad77b80
+ pristine_git_object: f5c21afc5cb3677c5cd687488117aa7ba5cb65fa
+ docs/components/fusioncallcompletedevent.md:
+ id: cf22fb075b16
+ last_write_checksum: sha1:1e30eb4648e216a062f218fd3885fd5518921520
+ pristine_git_object: 6dbeb8bc626a7822828750991bba4bd10a2fb98d
+ docs/components/fusioncallcompletedeventtype.md:
+ id: 8a0e4946fdae
+ last_write_checksum: sha1:fb3ef6a1c064c753ab6ab6556c820602a6e2cf88
+ pristine_git_object: dbbe741801b75bca7de8d06343a1a634758b9203
+ docs/components/fusioncallinprogressevent.md:
+ id: 9baa590f99b2
+ last_write_checksum: sha1:ce4879cc7b5f64faded639ec0eb0bde916ec3c69
+ pristine_git_object: d6396b2dcdbee534f9515c27404addaea1012def
+ docs/components/fusioncallinprogresseventtype.md:
+ id: b4c5a955b632
+ last_write_checksum: sha1:dab95c6a1b23bfdcad72d7719f5b2bc537ffe695
+ pristine_git_object: 5df508e6604b9c2e73a07935d72c73b7e50bceea
+ docs/components/fusioncallpaneladdedevent.md:
+ id: 8239222fc899
+ last_write_checksum: sha1:99563629a6779204ffe74de0414028e91b44a496
+ pristine_git_object: dc1a92a698bd534179e7c57a2ebebe285e208703
+ docs/components/fusioncallpaneladdedeventtype.md:
+ id: 33dd6036fa92
+ last_write_checksum: sha1:ee2b9f1dce5c427af965aff39f427c56d75857a8
+ pristine_git_object: c0cdad85e349e97ba6539949d42ae1ebeba4baa3
+ docs/components/fusioncallpanelcompletedevent.md:
+ id: 200b419a678b
+ last_write_checksum: sha1:a03b9876673503bd862d682e5c8812de38c79736
+ pristine_git_object: a30e56268babe44c68bd08fafb999f79b876919a
+ docs/components/fusioncallpanelcompletedeventtype.md:
+ id: ddcf55c427d4
+ last_write_checksum: sha1:ee2875ea36681b9f87422a412a55640dfb2b7cfb
+ pristine_git_object: 9d8eb7d80104ac2a896ffd585933d2702ef7eeb4
+ docs/components/fusioncallpaneldeltaevent.md:
+ id: 73f8d7888706
+ last_write_checksum: sha1:13928ef29e3239f778988938918dd695b7f687fe
+ pristine_git_object: d890c8ff75166aeeaa7c294395219d70f61a7a54
+ docs/components/fusioncallpaneldeltaeventtype.md:
+ id: 5ee73664dfb6
+ last_write_checksum: sha1:7192854ec113f5b4da058bee896e1c00b14b7b7d
+ pristine_git_object: dc3e2d9f3238464086cdc4efb9d2468ac487465a
+ docs/components/fusioncallpanelfailedevent.md:
+ id: 96daaa50cfec
+ last_write_checksum: sha1:c3971988e20c318c9446e0fc666e8232d566c07e
+ pristine_git_object: 1c1a14da28ce6aef8e986136393858a1f80191f5
+ docs/components/fusioncallpanelfailedeventtype.md:
+ id: 4afbcf43cf7e
+ last_write_checksum: sha1:ad578b2955f5df25be2cc4997ccd099eda9c2ea9
+ pristine_git_object: 1ba418075f3c76be85aa03ba96d7768faaadd489
+ docs/components/fusioncallpanelreasoningdeltaevent.md:
+ id: d37f7d4f3e82
+ last_write_checksum: sha1:70d4179cdb0344c90d2029d56b5ce1b3125e5482
+ pristine_git_object: 09cfca812ff624c2b6dcd765cc1aa47e8db905c8
+ docs/components/fusioncallpanelreasoningdeltaeventtype.md:
+ id: e77150716d35
+ last_write_checksum: sha1:a20cc76c99f6085708c8b55531839073e1f1df85
+ pristine_git_object: a25e9ac103e67f0c8ec9f3026619be4e98c39e32
+ docs/components/fusionplugin.md:
+ id: a8f51a52a342
+ last_write_checksum: sha1:5fab1cb92c415c8f5fff931e01109050e416a627
+ pristine_git_object: f67e82f6057d384a53143fd2098fe773499d564d
+ docs/components/fusionpluginid.md:
+ id: 4e5b1c34b883
+ last_write_checksum: sha1:111b144dc73f68ccc99f40d23de78fd47126b323
+ pristine_git_object: b3de5efcf0d7dad28e612d41b523ce26bf0de245
+ docs/components/fusionplugintool.md:
+ id: f4728cca243c
+ last_write_checksum: sha1:5afcf82da033e264ea0c0f23be39dd329edc7397
+ pristine_git_object: 6e9d365f8f2f48bd6e425c4bc196d5572b5c9828
+ docs/components/fusionservertoolconfig.md:
+ id: bc9b9f7ae08b
+ last_write_checksum: sha1:49f4e5047fad8c20098c6500d17ee3d883f41c56
+ pristine_git_object: b243b885cd9572d61cb63f2364f924a0751b19fa
+ docs/components/fusionservertoolconfigeffort.md:
+ id: 897b52512b1c
+ last_write_checksum: sha1:3d2f3e019eee3c6bf4aedba909f7a92740d21225
+ pristine_git_object: c7578213d3c65bdf579321a08c84d8f4c1de59a6
+ docs/components/fusionservertoolconfigreasoning.md:
+ id: 349d14075b51
+ last_write_checksum: sha1:9c650a736d7b96f193e6d24da5e82b7aa24ba39e
+ pristine_git_object: ec0db8d390b9f00eec0c100ac61b73d1c101b289
+ docs/components/fusionservertoolconfigtool.md:
+ id: e36dcb42d4eb
+ last_write_checksum: sha1:68b2cbc4451e083ae2cd07587498bfc14598cf5a
+ pristine_git_object: 6e75f5b19f8c7a68d3eb50a2d0cf0c1f668be262
+ docs/components/fusionservertoolopenrouter.md:
+ id: 8862a760f37d
+ last_write_checksum: sha1:c419e86213da1be43c98705c826b344894f583cc
+ pristine_git_object: 7373389f8fd797c77ead1056462dfe1f75a4f56e
+ docs/components/fusionservertoolopenroutertype.md:
+ id: 58ee513b0cad
+ last_write_checksum: sha1:2ec57cd7447b8eecdbe6fec744c22edb3a817999
+ pristine_git_object: c7121728c6509e3d02a0b431431f133067ca057d
+ docs/components/generationcontentdata.md:
+ id: 1085c488fd3a
+ last_write_checksum: sha1:186d3e8118f6d393d524a91e2ac06772a7eaf818
+ pristine_git_object: 8bad571af50a9bc78e4ccc4b3f1d1911aac8c3b4
+ docs/components/generationcontentdataoutput.md:
+ id: e4651dfa179c
+ last_write_checksum: sha1:3cedede3c273cc7bdd2971e7cd252f487729770b
+ pristine_git_object: 6847cf3f3a47d2911badcc90a5723a96f22f106d
+ docs/components/generationcontentresponse.md:
+ id: b2bded35fce6
+ last_write_checksum: sha1:4f347840c969a60a734230601882eb01b4d64aaf
+ pristine_git_object: fb8acc9bc1fcee02384155f50ab24ac160d35af6
+ docs/components/generationresponse.md:
+ id: ba81b6e0c164
+ last_write_checksum: sha1:e7362ecc7f743d516fbb13fb0045739cb6e33eec
+ pristine_git_object: 20c523d806b2dae5c3c425f2020a5e5ab6079774
+ docs/components/generationresponsedata.md:
+ id: 1059d258bbf8
+ last_write_checksum: sha1:34b65674cc84376d4019c145dd268e0c07febe2b
+ pristine_git_object: adfce3816bd7be4cf1f5eea4c4542cb56a0a08b0
+ docs/components/getbyokkeyresponse.md:
+ id: c07fd08fb110
+ last_write_checksum: sha1:9b19d2ed29c6fd4784ae04f15f3db9f2ce9c0da6
+ pristine_git_object: 14fa3aed58f927ad4e2a3597543bdbedf68ced17
docs/components/getguardrailresponse.md:
id: eac79c96805c
- last_write_checksum: sha1:da1d99fad316a21e9db253b30bbf9d590062fc59
- pristine_git_object: d7de0f8ddb4847ec9c60c25f3d46ab408aac707d
+ last_write_checksum: sha1:a5792b6249490092c478f0199380daf6ef485367
+ pristine_git_object: 41f44a1990323a2dd358b674c4d7e7964925b06a
+ docs/components/getobservabilitydestinationresponse.md:
+ id: 3e7a05d3c27a
+ last_write_checksum: sha1:c53f2f769d9b31fdb8e21b57048d561ab7bd2fe1
+ pristine_git_object: 839f8079d681be608c2d2b46768ca55280541588
+ docs/components/getpresetresponse.md:
+ id: adb3d7caca1d
+ last_write_checksum: sha1:d2bf386f2ae89de89839d2368126e9cd0e196bea
+ pristine_git_object: 370f2ad11a292a3c49622677cacb48e759646742
+ docs/components/getpresetversionresponse.md:
+ id: 20be9010ec38
+ last_write_checksum: sha1:6c94d80df6e0364dba08997953820b1951742554
+ pristine_git_object: ec593457949b8fdca5b6ff511ed59c0913e9398f
+ docs/components/getworkspaceresponse.md:
+ id: b65ac2b42215
+ last_write_checksum: sha1:f4bd96439e0ae998bb2712b603f3a94638e398ff
+ pristine_git_object: 96104ecd0f4117d4004ba5b2f7c488988ca40f2a
+ docs/components/group.md:
+ id: fc829526a4e3
+ last_write_checksum: sha1:cf17cb7f4935d2c4190eff29c8e4df89297360a8
+ pristine_git_object: 77588dd2feeb0c67a8b63bc64bc4f3a441aa0d08
docs/components/guardrail.md:
id: ce84902d4cc2
- last_write_checksum: sha1:bf7a0be7e156abadc6adf0d426c40bf7c088bcd0
- pristine_git_object: 994b02604a9be6a0e9705b182621e9a2df085864
+ last_write_checksum: sha1:703d808359a8ee2aeb67ec7896072310213c8bf1
+ pristine_git_object: cd9c5b1ff0ced7e4d5a0514d215256a8a95d33d4
docs/components/guardrailinterval.md:
id: 79efeedcb880
last_write_checksum: sha1:3c071c14943c7b26474847eee46925ae884a8a6b
@@ -1070,16 +1912,16 @@ trackedFiles:
pristine_git_object: e38b5c19b6356f255783dfacea66b45418679e21
docs/components/imagegenerationservertoolconfig.md:
id: 4086d42eed1b
- last_write_checksum: sha1:9da8f5dbeb8e76419b5ca3041965105934b0ad9b
- pristine_git_object: b3fbb8ea61ef0f98681cc1507b2f192556822141
+ last_write_checksum: sha1:4be4af2bb484ca26d779f052da6a645dcb4d912c
+ pristine_git_object: d1bc3aceee221331b9f45bd00bbd8d0ea75a4a73
docs/components/imagegenerationservertoolconfigunion.md:
id: 7ba56d56f6bc
last_write_checksum: sha1:99eb92cf87c2e68e8db530d3ebdaaff6be117587
pristine_git_object: b9319d587cbf5118b4b12874b67a4a86ec4d1b16
docs/components/imagegenerationservertoolopenrouter.md:
id: c5bf0021441a
- last_write_checksum: sha1:25069e75ba4a6a6b98bc6c168ef09c2e2960f630
- pristine_git_object: edee38367aaf7511e2a5d3f386d493005ce3c544
+ last_write_checksum: sha1:01a0ffcf8d7d3c806c1135e73ed4926ca5d05dc9
+ pristine_git_object: dce650cbf584a1798754d1610898a9432b544d28
docs/components/imagegenerationservertoolopenroutertype.md:
id: 420c811d4561
last_write_checksum: sha1:6b8ce48b3e662ea3bfd8a9be737e43cd1b051e39
@@ -1096,6 +1938,14 @@ trackedFiles:
id: 4ce388faaac0
last_write_checksum: sha1:3aad9a98e1bb15a540b9f8307a1c9524432e7959
pristine_git_object: 1e12f5f39649bbc28907eb579d26b1dedcd634d9
+ docs/components/input1.md:
+ id: 8f1c3029546b
+ last_write_checksum: sha1:d663edec52736ced26235eef64a7cad9e2d9f321
+ pristine_git_object: a6a125b4880fdc36a4a48a71d81d1d85a81390f5
+ docs/components/input2.md:
+ id: 950f7afb714f
+ last_write_checksum: sha1:0f7308af83357715e138b0027cd723278d28b256
+ pristine_git_object: 18930bf394330c4853277ad0d38622adfcef1229
docs/components/inputaudio.md:
id: 3bad9d0f3bfb
last_write_checksum: sha1:911ae8d63fb5a0fd4b27d922aa2547cc6e973523
@@ -1126,8 +1976,8 @@ trackedFiles:
pristine_git_object: cfe6e3e41c8ac75a7f00d1a316153d6e7eec587b
docs/components/inputimagedetail.md:
id: 582114ff5e40
- last_write_checksum: sha1:8b26812936eea42fe754a8376c1bf909d8b85197
- pristine_git_object: 09106b0661c2e4b67a76f98513efec087153912a
+ last_write_checksum: sha1:ff65ae99531f467abea6eee220d81819a4cea473
+ pristine_git_object: 53e9e69e72a640f83938080aeb4a8a230731313c
docs/components/inputimagemask.md:
id: 014a4ddc9ad5
last_write_checksum: sha1:7ff0dcc8b47b7cccff30255b13d2f4b585e6919c
@@ -1142,20 +1992,16 @@ trackedFiles:
pristine_git_object: b46d160554cf4cbb18d57d2bad9f79c1f7c94e6d
docs/components/inputmessageitemcontentinputimage.md:
id: 70760d9b88c0
- last_write_checksum: sha1:1f92db0bdba7c423f9433e20936fb2870c8bbf9d
- pristine_git_object: c782ffec146e4ba2f820ccd21d216690dbcfb0c1
- docs/components/inputmessageitemcontenttype.md:
- id: bb291db04191
- last_write_checksum: sha1:d85c022662be3d3cab6c5bc349d30288a402afcc
- pristine_git_object: a1c49d50fdb71d9e0a8936a3a07b36a15f3993a8
+ last_write_checksum: sha1:daf5093e17f232d4de16fe5a408bfe83c552d00c
+ pristine_git_object: ddecd697f62414bfc9936cfb8d309f5a658bf9fa
docs/components/inputmessageitemcontentunion.md:
id: 4dd45b0284ef
last_write_checksum: sha1:64419cd96a6d964d9bfe20b93055b904e5413ded
pristine_git_object: 39a5d724f55933275a35c44457a7482c049d9e18
docs/components/inputmessageitemdetail.md:
id: 66296c9a1130
- last_write_checksum: sha1:9e3e3a4797556b1596efeb675adbd98f37ac3db1
- pristine_git_object: d6a0bdca75c1b561668cc1c222a7f54573bdfd19
+ last_write_checksum: sha1:15df515837fa341b102965c1b8d3dff2d0e154aa
+ pristine_git_object: d1a50afa15eb7ac7c9faf7171b34e2a011b5e173
docs/components/inputmessageitemroledeveloper.md:
id: b5ea7f626a52
last_write_checksum: sha1:42799b848928abc8f7bb0cc45b938455185b71e7
@@ -1172,6 +2018,10 @@ trackedFiles:
id: e4d0a822ece5
last_write_checksum: sha1:8ffea2a7d44e93388b0e1a3479172275ab563674
pristine_git_object: 19f763241ce5220068564d2fa911f92418c6e50a
+ docs/components/inputmessageitemtypeinputimage.md:
+ id: e797722ddb03
+ last_write_checksum: sha1:2bd6756f814a1b2f7d046262f4b57c7b8c9b422f
+ pristine_git_object: f0ed7e8d295765b452944dac88fcd1fad7c6dc17
docs/components/inputmessageitemtypemessage.md:
id: 0436b12c1362
last_write_checksum: sha1:4b69cbaafeba5995449e82c1251950aec92df46b
@@ -1180,6 +2030,14 @@ trackedFiles:
id: 375f3c4c080b
last_write_checksum: sha1:ad0e655fe0df9024e77ae3a38e661b9334df4038
pristine_git_object: 89bdc2a7f9ee3a48b82c74784f1e4f9e92ede8ae
+ docs/components/inputreference.md:
+ id: 4eb4f5d578b4
+ last_write_checksum: sha1:a943967aa59f83948c9bb16c9355ec8658a59087
+ pristine_git_object: 05a7762de9c81c85b752d59106ad27612b26a0b4
+ docs/components/inputschema.md:
+ id: c81747846fc7
+ last_write_checksum: sha1:32cd93061ec2ed84b683062279196534fc738777
+ pristine_git_object: 6f0a4143dbf2295985c2cde0ef898fbdae2764dd
docs/components/inputscontent1.md:
id: d52cc340ee2c
last_write_checksum: sha1:3e4174c983a5d960128277273803e49d756775d0
@@ -1258,8 +2116,8 @@ trackedFiles:
pristine_git_object: 404cc4a69bca7b64c9172078420c72359ed9c2d8
docs/components/inputsunion1.md:
id: d017aeaed00c
- last_write_checksum: sha1:37e5b6e526766168c9b5d4227c4f18d1a8a065d1
- pristine_git_object: 8289eb7af2e7ed5da6b65edc0dbef4b11fcdef26
+ last_write_checksum: sha1:e206464b452b3efce9d7230396001c75c7cd929a
+ pristine_git_object: 746a2c8045d7ad24b52b905e6763f65fd3ec4f7a
docs/components/inputtext.md:
id: cf4503b3219c
last_write_checksum: sha1:af646125dfffda8cb71e15c602fcd4823b85f3ab
@@ -1272,6 +2130,10 @@ trackedFiles:
id: 331af539199a
last_write_checksum: sha1:136d08c7846075581f141aa89c74743a4684585e
pristine_git_object: 7b6d8235fbeb431c27cec3d689c6d5aa558d8d40
+ docs/components/inputunion.md:
+ id: e92a20448613
+ last_write_checksum: sha1:6caa00eb5847278d7fa4033f863a9719fece403f
+ pristine_git_object: 3667170c054053b09d2a34627f2cc1b1ed9cc01f
docs/components/inputvideo.md:
id: 5775df94513a
last_write_checksum: sha1:9096278894b57ece97edefbfcfbbbae5f91fb259
@@ -1288,6 +2150,30 @@ trackedFiles:
id: c7d253bbe0f1
last_write_checksum: sha1:c95fa69b2e5ba1ad8801577e0833513b4045c733
pristine_git_object: b320ded97617f2a84341aaf23e73be3e0d46546e
+ docs/components/itemreferenceitem.md:
+ id: df82caccce8e
+ last_write_checksum: sha1:d5235ecfa37a370a769c27575da351873551fb98
+ pristine_git_object: d9a8c531ca098fc9827e1fd81c35b9a8e4f967fc
+ docs/components/itemreferenceitemtype.md:
+ id: 42b45a1ce59c
+ last_write_checksum: sha1:8c0c439657b24ff5ad081d95b89e0f088547304f
+ pristine_git_object: 95aa04d9e921d642faacec6df23bc1761b9265ca
+ docs/components/keep.md:
+ id: 5b42959d6f28
+ last_write_checksum: sha1:139916d09f3d0b5367b1916b6228c0b93d2a0676
+ pristine_git_object: 435fda97679d2c1a90a932bf112df1658e87ede4
+ docs/components/keepall.md:
+ id: a07be2f96b84
+ last_write_checksum: sha1:d9bb211f5375ab8e00c20299017920f77fac80f7
+ pristine_git_object: 189fa5530d194ca3f723a2dd2b56555706a6f7c3
+ docs/components/keepenum.md:
+ id: 8622d9684e1b
+ last_write_checksum: sha1:44f71e954bec1ef1dfa7c2196c781845ea26bc49
+ pristine_git_object: 87a4f284f533b45972c541c20d72382f75d68e95
+ docs/components/keeptype.md:
+ id: 7cdbc72b8dfe
+ last_write_checksum: sha1:6edb68f5bf84647bc6dea0c98803a9ae3953b74f
+ pristine_git_object: c75bf25e244e9a2769e774e2de3739fcbc486693
docs/components/keyassignment.md:
id: c2be60993728
last_write_checksum: sha1:4791e8ff5cc6777dd2e130a2b67f019a1f6639ad
@@ -1308,6 +2194,10 @@ trackedFiles:
id: c5def381d385
last_write_checksum: sha1:ea65b6214a79a7125bff8e6cca1f55863f5c1c08
pristine_git_object: cfa9fd582c4d290d8700f34f092b5fd45d5a1172
+ docs/components/listbyokkeysresponse.md:
+ id: 2bdc1d5f0f9f
+ last_write_checksum: sha1:c6deab84b3fee2d18ad7d91f151ba2a3b233e8a5
+ pristine_git_object: 9416c56392444105af3bb6a5fe07b9dd539b7e22
docs/components/listendpointsresponse.md:
id: b79a056a7034
last_write_checksum: sha1:046b22b032ea14ce42886c0b1d2945c2027ab1de
@@ -1324,6 +2214,46 @@ trackedFiles:
id: b34008c23794
last_write_checksum: sha1:a80fc686dfb13c7179c1a49808ca9d10fbca0cec
pristine_git_object: 16092238affd61950df82d45bc46ae0be98df7b3
+ docs/components/listobservabilitydestinationsresponse.md:
+ id: c5efedc66c10
+ last_write_checksum: sha1:1a3398a7358e41acb7bd39f2f9160c229c3054bf
+ pristine_git_object: 880f789f057a6ed4e1d2a95b631c00b156b999bc
+ docs/components/listpresetsresponse.md:
+ id: 0be27e53bbf2
+ last_write_checksum: sha1:a9889e2824f16b545cb08c32f8e6d09376886234
+ pristine_git_object: 6fb247a8a20861ac1e5baa96697e70a693f2c7dd
+ docs/components/listpresetversionsresponse.md:
+ id: 01d731017130
+ last_write_checksum: sha1:2806be95ad0240547ca73ea89a91c26942409b65
+ pristine_git_object: 36226d613ea47b77f7860395f0c7e61455fb74b6
+ docs/components/listworkspacesresponse.md:
+ id: 8cc6fbfc9dfb
+ last_write_checksum: sha1:ad9f94ea6eafd3cbd5d2c2dca61b3ac6f0403a1f
+ pristine_git_object: c4b9ff0e4cc402706ad28c35f75189aa2478470a
+ docs/components/localshellcallitem.md:
+ id: 9b7bd8fb3ebb
+ last_write_checksum: sha1:0b60897b2b25319e9d06d338322e7dc2a1635c06
+ pristine_git_object: 4a81afde0ff55830aec9f41ef22c0adacbfa866d
+ docs/components/localshellcallitemaction.md:
+ id: d87559af5023
+ last_write_checksum: sha1:ffc8b201705a9d30009267245a09a8e10ceb7b58
+ pristine_git_object: 0d18c7ca53d43a5d58d6d15c17ce342ba56a06c6
+ docs/components/localshellcalloutputitem.md:
+ id: 53951495a615
+ last_write_checksum: sha1:08612c721fdf42ec25d191963a4a1105b588d6f9
+ pristine_git_object: 34491a6ab13f2b5a5ef60acac308721d3e395981
+ docs/components/localshellcalloutputitemstatus.md:
+ id: 1878f165a6fe
+ last_write_checksum: sha1:985386c9a863fffe9d4107bf63d7316095749d32
+ pristine_git_object: 18938c8e8923df99b6f11d774c748f4f618ed16b
+ docs/components/localshellcalloutputitemtype.md:
+ id: 83a5e3ddca07
+ last_write_checksum: sha1:2777314d0b96a5f23fab16ef30b055da323e300a
+ pristine_git_object: 3419c8a1ae972f04b2ad4689e04bfe8fd592087f
+ docs/components/logic.md:
+ id: 57db8def283d
+ last_write_checksum: sha1:6c1e841dba4660d9498219d6cb534d2988eb0d43
+ pristine_git_object: effc42ec4dc4e34d90d0a51be532ec7c923b8384
docs/components/logprob.md:
id: 351b5c050527
last_write_checksum: sha1:fce93846d1c33a013a40764c5e00e6191982bdbf
@@ -1332,6 +2262,42 @@ trackedFiles:
id: 15ed956070c8
last_write_checksum: sha1:a6b154896d64cb9feac8742b812bf40951867375
pristine_git_object: b932c8f3988960414d7cd0f2ac795f1cc3b58884
+ docs/components/mcpapprovalrequestitem.md:
+ id: 0d3537b2e5c8
+ last_write_checksum: sha1:d2c00357d59374eee2845918d50ab5125d9583be
+ pristine_git_object: 100c830f3d7a41b5f68d22404a7469b051f5c0b9
+ docs/components/mcpapprovalrequestitemtype.md:
+ id: 5d9fc336efb0
+ last_write_checksum: sha1:6094bb015b51c4f3bcdd430abb7e369c746046ec
+ pristine_git_object: f7bab5327d14d16a40b9ec16770b77afae586226
+ docs/components/mcpapprovalresponseitem.md:
+ id: 5dff2e68eccf
+ last_write_checksum: sha1:8368ac4bdcd72052d24f1f298d18c31663855b3e
+ pristine_git_object: eeacdc0afbc5e4662106aa18ace2b17dbd96d4bc
+ docs/components/mcpapprovalresponseitemtype.md:
+ id: 75bf622adc93
+ last_write_checksum: sha1:88ce33f76415887fe812b880678392b1afcbe494
+ pristine_git_object: 94baaa0cabb60a9c9f32633369fbcba2aed03131
+ docs/components/mcpcallitem.md:
+ id: 96b8cb1e23c1
+ last_write_checksum: sha1:e4f227c176f78b32f05d6c2875f5c19e3f17be7c
+ pristine_git_object: df7c228d307f76df8b98c7d4b451a3dc314b4cc3
+ docs/components/mcpcallitemtype.md:
+ id: f764926c4d2f
+ last_write_checksum: sha1:675fe43eb73267b7a4944792104051ca1181d2e7
+ pristine_git_object: 2e94b45437d96ff1c0188c2b20ae3405dee07e99
+ docs/components/mcplisttoolsitem.md:
+ id: 0846373595f9
+ last_write_checksum: sha1:075e68d99a8ab50e4e6afa007cce282bac44003d
+ pristine_git_object: 96141e87f0e250e5c5d8f282ab80b4420db95520
+ docs/components/mcplisttoolsitemtool.md:
+ id: 96647e6a9ace
+ last_write_checksum: sha1:17d0ca88652cd39eabc780107b666fdaac6273e0
+ pristine_git_object: 3da39425fbbbd0fdf978e0debee37c55a87f45b4
+ docs/components/mcplisttoolsitemtype.md:
+ id: 32b1baa29df8
+ last_write_checksum: sha1:1117e3345e79f4c8fe1c207eea4a2d057f691e0f
+ pristine_git_object: 4a52a0fc4282e3062ce2a1e33a6d35d67a62538f
docs/components/mcpservertool.md:
id: fcc92d12bf9a
last_write_checksum: sha1:edc8bdacc891f72eb9685d076ac2aa2ac18d30f7
@@ -1348,6 +2314,90 @@ trackedFiles:
id: 6b23dc8e3b8d
last_write_checksum: sha1:af1899a519c3c3b50871014b17b50153050b59e8
pristine_git_object: 39f5ae21785874af1f2ef0000e9fcecc000ec8fd
+ docs/components/messagesadvisortoolresultblock.md:
+ id: 18d8fff56c24
+ last_write_checksum: sha1:0208d4d9109008df1000fce573c5dd136444e8a0
+ pristine_git_object: cd6353bac3c8b96a396e511817231fa420e95fdc
+ docs/components/messagesadvisortoolresultblocktype.md:
+ id: 02e41844a8ea
+ last_write_checksum: sha1:a6cf799a1fa3dcd873532c14cfa673658ceb32b5
+ pristine_git_object: b72f8916b4236118a46566bf81ed1d4c466ed882
+ docs/components/messagesmessageparam.md:
+ id: 4f67bcb5ba0d
+ last_write_checksum: sha1:cf46c4085fd571135f33f1f4eae994d49775d140
+ pristine_git_object: ecd70aaf881859bb4278daf64c4037c17e8bcb1b
+ docs/components/messagesmessageparamcontentunion1.md:
+ id: 2b5a91a8467e
+ last_write_checksum: sha1:20e546d85607fc8ad4e24b26e6da61999c262ff0
+ pristine_git_object: 0391164a0e8ef60babef6241107a0bf2d3028ba3
+ docs/components/messagesmessageparamcontentunion2.md:
+ id: b576d21da7e1
+ last_write_checksum: sha1:f0a6deb84a19db0e697b052a481f177ab112d074
+ pristine_git_object: 1720e24ca4c5af3ae35c83ef1445f81b46d106c3
+ docs/components/messagesmessageparamcontentunion3.md:
+ id: 42e48c3be6a8
+ last_write_checksum: sha1:75c771929d88eda869961468c9a2470f783fdf49
+ pristine_git_object: 6f970cbd11d02276f85366f1b01d4668b7084f46
+ docs/components/messagesmessageparamcontentunion4.md:
+ id: a8daef445a1d
+ last_write_checksum: sha1:6459183f4dc6199e6a6b2236003cfd1850bef4fe
+ pristine_git_object: 55fbe4432d61150f641ff17e95121ce94549a1c3
+ docs/components/messagesmessageparamcontentunion5.md:
+ id: a7dde2cbd69e
+ last_write_checksum: sha1:2b2f3e0b47a077cee771f036559d9c7e159a2bc2
+ pristine_git_object: eb775b558b2d126d0d475d97535850e5d531dfdf
+ docs/components/messagesmessageparamrole.md:
+ id: 245edebe2504
+ last_write_checksum: sha1:5650700d7c0c3863b43c547ae69388d926be1090
+ pristine_git_object: 9c1fa31bead2c968a3e198e79b60d4ee2e4e1dcf
+ docs/components/messagesmessageparamtypecompaction.md:
+ id: 54f1bf128510
+ last_write_checksum: sha1:3c10c956aa04f144f82cb2388ac8461aa478535e
+ pristine_git_object: d3ca428723c54f1577945e4d187f1803f26f3a7f
+ docs/components/messagesoutputconfig.md:
+ id: d45ef6ba5aee
+ last_write_checksum: sha1:d3e0bbd6267aa8a2630fe270721c1d532fd6f5ac
+ pristine_git_object: 5a0d1d11e4dbee6a19a418e7b9e40d0cffbf0a25
+ docs/components/messagesoutputconfigeffort.md:
+ id: 0ff117d47326
+ last_write_checksum: sha1:4241a3e5c5939dd363b1b18131e6b708ef14ddc5
+ pristine_git_object: e58b0a368563b3e7d969bb323a719387ab1c72f4
+ docs/components/messagesoutputconfigformat.md:
+ id: e1fd93b0095b
+ last_write_checksum: sha1:6d3007b44926a6e01f5b0e1d1506d6305c1de1e9
+ pristine_git_object: b214efce59f8b4cec69fc4acb40c5d0ab192f7ce
+ docs/components/messagesoutputconfigtypejsonschema.md:
+ id: cb4f82d2edde
+ last_write_checksum: sha1:090533fcd15c9c8ef7e25ebce5fb9877e62ac77a
+ pristine_git_object: 6a8883bfc55e71980d691e2b9bda395dc40397e0
+ docs/components/messagesrequest.md:
+ id: e479a7035a9d
+ last_write_checksum: sha1:3ca14c934dd303e0d3da2efac9160cca1448eedc
+ pristine_git_object: 86c616e20899fc4410a0902368d2304fd5067b30
+ docs/components/messagesrequestplugin.md:
+ id: 6c74af3351ff
+ last_write_checksum: sha1:ae5c77653f405c1074121821ac97ff6a78c2f76f
+ pristine_git_object: e5fcef93ae1b6a5edcc8b4263ad71e24340fbefa
+ docs/components/messagesrequesttool.md:
+ id: aeaf229efe39
+ last_write_checksum: sha1:262f202169804143ebf77ed03b365fe789f8894b
+ pristine_git_object: d3e4d451e6ffe2cb87b07157954be23c6754089e
+ docs/components/messagesrequesttoolunion.md:
+ id: e51d7bd17081
+ last_write_checksum: sha1:8e080cbf5102f73960172e0c1c63a3aa020d6259
+ pristine_git_object: 98cf674943ef36b59b9430c7a299666570390075
+ docs/components/metadata.md:
+ id: b3d2643730d7
+ last_write_checksum: sha1:299d28071b0bc538aca3b9d4e5ed94d82b6db010
+ pristine_git_object: 2e1c7ac6f37ad4ef941717ea77b3e750800b5007
+ docs/components/metadatalevel.md:
+ id: 9f671abd00b9
+ last_write_checksum: sha1:6238f82ab3af2fe7bf4a1e3945d5612e59afcde3
+ pristine_git_object: febc8ad20cad1050527f99760668d7e0770da391
+ docs/components/method.md:
+ id: b033f8729bbe
+ last_write_checksum: sha1:45a4264bd618111e097084519a5f4d017baf16cd
+ pristine_git_object: c1ac578717dab45d7e86236836634ea777e603e8
docs/components/modality.md:
id: c06a1698adc6
last_write_checksum: sha1:9bbac55e2cb009dfd90e129cf3abd35dcab6d2ac
@@ -1362,8 +2412,8 @@ trackedFiles:
pristine_git_object: d5bbdc95f658be46eebf13f0ba8b9ae3716f72e2
docs/components/model.md:
id: 673ad57400cd
- last_write_checksum: sha1:9af41fb1a8b66fcc4ff3830f3b12c736218bdf7d
- pristine_git_object: 106eb5cfac49cfa3106ee1d0142d9166fd6064d2
+ last_write_checksum: sha1:e628f3670edde9ecdd3b5c227c95b8f3f6c2620f
+ pristine_git_object: 55f6fe4664787c9dd50ae653851a2d42b70ba7e2
docs/components/modelarchitecture.md:
id: 79816051e6e8
last_write_checksum: sha1:158b04c79b7a32a2d95e3d3fda8fa6da0ab91cd9
@@ -1386,12 +2436,16 @@ trackedFiles:
pristine_git_object: 317190772f743d2aba63c4dad770827b46688f6a
docs/components/modelscountresponse.md:
id: abdad0c1a02a
- last_write_checksum: sha1:6c32f935021d24ff9eeae39f903f71b9ddaedf3d
- pristine_git_object: 84bbce80ebf7ce2a93ad853bfe2f2a80a8395077
+ last_write_checksum: sha1:50ae205604eddcbdced268b8cd3e1ac06f0dd7c0
+ pristine_git_object: 4ad6e6a692b19b29789b7a505fae3df72b3fc19d
+ docs/components/modelscountresponsedata.md:
+ id: 98e05b6bdddd
+ last_write_checksum: sha1:62caa9966f2730ed93eba332041916903d279228
+ pristine_git_object: d661997290e487a9d0920293830a81afb8b4a853
docs/components/modelslistresponse.md:
id: 37e791d4f265
- last_write_checksum: sha1:fb8fe5748b0c7a5e1e515233cad4d9524cd342bd
- pristine_git_object: fb5d458197af006a3706e4c133bbb3af45dd64bd
+ last_write_checksum: sha1:63605b3361627fdb35caac3651ca4ac63732cd07
+ pristine_git_object: 04b43f59dd2202f1a5fe8b3a890f68010194ec90
docs/components/moderation.md:
id: de90083e5402
last_write_checksum: sha1:d0cd3160a76e89d8749cb27687b1bba3dac5089d
@@ -1408,6 +2462,30 @@ trackedFiles:
id: 6e564fce1a7d
last_write_checksum: sha1:16f798521d1221c04b8c39d7e25383c8ffb7be7b
pristine_git_object: cfecb28d11204fe2cd3d69f1ba16a09212f5cf93
+ docs/components/multimodalmedia.md:
+ id: f90fdd384c93
+ last_write_checksum: sha1:fd51c136be8400ff6d5066913fcb9bb00e0a7c88
+ pristine_git_object: c794ca17ca96be1844ccddc71842421048ebcd42
+ docs/components/nameadvisor.md:
+ id: c6f8d17ae439
+ last_write_checksum: sha1:f863ebe74e51efba513aa1fb27864a04cfd3eb09
+ pristine_git_object: 4c91db747494811b3a0d17ed4d9cc73102294e42
+ docs/components/namebash.md:
+ id: 5f5d93c15070
+ last_write_checksum: sha1:0461609b759814886c4bad4967d056db8240d23d
+ pristine_git_object: ba827ad028bc1bdb1dffded72de5c1dcd939c1b1
+ docs/components/namestrreplaceeditor.md:
+ id: d78c4bf10ea1
+ last_write_checksum: sha1:aec9992e83de12492ff0235ca214a27ca6fb31cd
+ pristine_git_object: 6e011f08a45b75fc3777778593e818b9f7a2e9d3
+ docs/components/namewebsearch1.md:
+ id: be3e365d008c
+ last_write_checksum: sha1:97aa65b220803ca7b66f0b9a2b24a52ccaddef1e
+ pristine_git_object: c7282ac245b6c28e4bce6c90c94f886f84d6973d
+ docs/components/namewebsearch2.md:
+ id: ff4b14c13e02
+ last_write_checksum: sha1:7af3f01911982e2800072d6ce648a810974dc98e
+ pristine_git_object: c0fba3a6251edc39d3c25d4131075783af1db89f
docs/components/never.md:
id: 43f2ea5e9932
last_write_checksum: sha1:e6525fb53deebcdebcb5da707fd9f3250d8f2e9d
@@ -1416,14 +2494,254 @@ trackedFiles:
id: fa528f1f7879
last_write_checksum: sha1:8872a5d706d3a3392ae8c552f54ecc3c6df00f9b
pristine_git_object: 0ba248529a84feb2bf9d2f519895b3194349d2db
+ docs/components/observabilityarizedestination.md:
+ id: f513447ea793
+ last_write_checksum: sha1:ea4da6fb90cd7f1bd094aa927d5c01028970a4f9
+ pristine_git_object: 04544acc47732ace2cf93c40a24734e72ab7fbc8
+ docs/components/observabilityarizedestinationconfig.md:
+ id: dc1d535079ea
+ last_write_checksum: sha1:abb1dd20f7c854e5ef212d78da381740ae160a5d
+ pristine_git_object: a62521fecc1f3c34092879f92859f4020684936d
+ docs/components/observabilityarizedestinationtype.md:
+ id: 8e8a0fa37466
+ last_write_checksum: sha1:ac6b0d3b0f878616a9cfd4c82d3bf5f992176f65
+ pristine_git_object: dd7791378e18a915cb10a805e89e87017bb72ef4
+ docs/components/observabilitybraintrustdestination.md:
+ id: 145a536c10c1
+ last_write_checksum: sha1:c722bf7779eb6a1207a482c04220b220d1260357
+ pristine_git_object: 7658401bb30993018af48345a173c1a4d68e39f8
+ docs/components/observabilitybraintrustdestinationconfig.md:
+ id: 0013ee8af3c2
+ last_write_checksum: sha1:de7e22f79bd3aefd8ccd34f12249a91192c30571
+ pristine_git_object: 484cfcffb3e2bd3fcba725e5b59de99394604248
+ docs/components/observabilitybraintrustdestinationtype.md:
+ id: 5b2c2f854656
+ last_write_checksum: sha1:c3c4308d3d5821e88bb3781ae1f8663c53a2c65f
+ pristine_git_object: 07e7f6339ce6df1107447a33fa1c50509d35269f
+ docs/components/observabilityclickhousedestination.md:
+ id: e0ee8ee1c7fc
+ last_write_checksum: sha1:108164edbd7a433b2cf819453d7779d0e27253dc
+ pristine_git_object: 35bb6dc5f954d53e03c241c28f4ced53df8b74d7
+ docs/components/observabilityclickhousedestinationconfig.md:
+ id: dc0c611863b2
+ last_write_checksum: sha1:5742331f360f56b17bae994a327e21af364d97f8
+ pristine_git_object: 54f09ea3b737efb3030ef9fe066820f6ecb5ebfb
+ docs/components/observabilityclickhousedestinationtype.md:
+ id: a938251b2fa4
+ last_write_checksum: sha1:cd4f6fdb4561ec47d0e40f0a65ba9a28d91d1b7d
+ pristine_git_object: babefb65e0bbe0c948836d3451fbcff43a852385
+ docs/components/observabilitydatadogdestination.md:
+ id: 9f27ace42342
+ last_write_checksum: sha1:4d89342bb4f160cdb2cf145c778e73ae771de6a3
+ pristine_git_object: 73958b4a7c4b0a92a4cadc8c5fb101f88f37ea5b
+ docs/components/observabilitydatadogdestinationconfig.md:
+ id: 987756bd3477
+ last_write_checksum: sha1:f694e79f3bd3738b4f29e1456c8b4ca48a11d53d
+ pristine_git_object: 73edf7915e8800a1972a2d675c57ccf244a5f649
+ docs/components/observabilitydatadogdestinationtype.md:
+ id: ee1c2137ca39
+ last_write_checksum: sha1:69762b3bd3e41b114f27a0352f91fd121c0f99c3
+ pristine_git_object: adad4bcc6fd2473b01333d8d853d9bcd8a3ef397
+ docs/components/observabilitydestination.md:
+ id: b7be8a7cc49c
+ last_write_checksum: sha1:86950faedf8774004b61e3023eeceb9dfc85c5be
+ pristine_git_object: 266c69e959338f4835f9097a3d9b53537b9a93b7
+ docs/components/observabilityfilterrulesconfig.md:
+ id: c1b3582ea8bf
+ last_write_checksum: sha1:26a5aacdcc8cc84b77f2e0d2100b7dcbbe504510
+ pristine_git_object: ab02f08984737f29ab04fc15ffadb9b0b2212014
+ docs/components/observabilityfilterrulesconfigvalue.md:
+ id: 76c9622dd0a3
+ last_write_checksum: sha1:cb515a04863f9c9f42aaa3ae1c0a021c51e45616
+ pristine_git_object: b6756482d237df17828ac929ae6d1dfe01b55f17
+ docs/components/observabilitygrafanadestination.md:
+ id: 869cdaf1858d
+ last_write_checksum: sha1:da9f9dd9dd1fc1b4c3318de9bff2feb96ea7e5f6
+ pristine_git_object: d69dd20a8129c2235f9610d2570c654ef9dbd462
+ docs/components/observabilitygrafanadestinationconfig.md:
+ id: 341e8d7c29cc
+ last_write_checksum: sha1:3aa831e99f119076781bc7829018f67a208ad811
+ pristine_git_object: a66d915a86123b0689301eca4cd9bc9fd5c5ae8f
+ docs/components/observabilitygrafanadestinationtype.md:
+ id: 31be9564d467
+ last_write_checksum: sha1:fa4f96be1a58484ba1f520c1d45944a2f47fbdff
+ pristine_git_object: f5c7a1e0a29f54a0b9cbeef9a824515d6601d8ad
+ docs/components/observabilitylangfusedestination.md:
+ id: d3923d950e4c
+ last_write_checksum: sha1:a1aaed454c3a90697ad0192d49c915b195829b89
+ pristine_git_object: f36b84ce2ba406668dffa2fd2d882d14caf01ca6
+ docs/components/observabilitylangfusedestinationconfig.md:
+ id: dc419b3c2b64
+ last_write_checksum: sha1:c5b7d73cbe808972878e2def5434a97e3b60fbd6
+ pristine_git_object: ba02f48832ac62bb1342d0655ccb060ecb47670b
+ docs/components/observabilitylangfusedestinationtype.md:
+ id: b23de5f0f74f
+ last_write_checksum: sha1:f497c7e5b25c971037b56d868d41af9ad6b77ba4
+ pristine_git_object: 96f45ca0c628b3d1d0c74e3638d1f073ce2bb338
+ docs/components/observabilitylangsmithdestination.md:
+ id: cf543df3b6a2
+ last_write_checksum: sha1:98dc21b970bc222388aa9ffed95305a41cc9ad46
+ pristine_git_object: 5964867ccd33cfc4cba7ad1f60bc695144763a3d
+ docs/components/observabilitylangsmithdestinationconfig.md:
+ id: 4a80dd659c6a
+ last_write_checksum: sha1:7c11da5b5112b3da24d563a7e161e431baa0facf
+ pristine_git_object: 48a0daae8084bb6113c510a2d7ea3393fcea060d
+ docs/components/observabilitylangsmithdestinationtype.md:
+ id: c3e6e20fbe51
+ last_write_checksum: sha1:76181b8b31b0f3ef3bd1f22ce4c5ba8caeee0b47
+ pristine_git_object: 1412570ef5ae5d6c16da8d937c30ea7e65d37f87
+ docs/components/observabilitynewrelicdestination.md:
+ id: ae617fe0603c
+ last_write_checksum: sha1:4c94f55f88771ad3aa78dcccff2f4f988a09a747
+ pristine_git_object: 205209601c4bef5a65c863a471359505c18a9095
+ docs/components/observabilitynewrelicdestinationconfig.md:
+ id: 21ca56b40c65
+ last_write_checksum: sha1:2a6acb29cc5daa2d4e70591bfe837a95d67db0dc
+ pristine_git_object: 1cc3498cfe82f0814d36f606b036e8e43567f454
+ docs/components/observabilitynewrelicdestinationtype.md:
+ id: 9e1990a0b096
+ last_write_checksum: sha1:b97b608eea21250b92ac8048c10c72e3ed2b91a8
+ pristine_git_object: 24f27fab589d4b4c65a5e1159e98779e3261a744
+ docs/components/observabilityopikdestination.md:
+ id: db66b07ae65c
+ last_write_checksum: sha1:11106eb2f5a2a2500e063ce36f86c9f2ebc5e182
+ pristine_git_object: 049bc01e329dfd27523e7d4cfe1117bdd94dba07
+ docs/components/observabilityopikdestinationconfig.md:
+ id: b374ed3b47d5
+ last_write_checksum: sha1:b92ad6d3083465668ef5abdd0ffcf13adfa83a8e
+ pristine_git_object: d4c9ec5338a2366105ea8da32d427da64adb0d7f
+ docs/components/observabilityopikdestinationtype.md:
+ id: 87b673feb2bf
+ last_write_checksum: sha1:93aeb40e16484b72cf9913993a8b9ca334f8e2e9
+ pristine_git_object: 2812133c956134ab2d153aa2c89fc896adc58285
+ docs/components/observabilityotelcollectordestination.md:
+ id: d33bee74e26c
+ last_write_checksum: sha1:884a35422f51b33484137f0e28cbf768efef9001
+ pristine_git_object: 18e46e87ee9f33ab59f8e509440605dc87b79029
+ docs/components/observabilityotelcollectordestinationconfig.md:
+ id: 5e5e9562fb09
+ last_write_checksum: sha1:bff2120ae00fc563b0cd8eeafd700fd6e29bb014
+ pristine_git_object: 3d5f1ba56a0b83b1084363f185cc552ee800aa37
+ docs/components/observabilityotelcollectordestinationtype.md:
+ id: c78211a83000
+ last_write_checksum: sha1:1ad7c1e21ac263d0c7fef5efa4c1107da9772488
+ pristine_git_object: cced176b01380b0cbe7a36a91fdfdaebbf34b228
+ docs/components/observabilityposthogdestination.md:
+ id: ff245b7db549
+ last_write_checksum: sha1:4e7f4e1408b112d58221d7ad19aca11d1364413a
+ pristine_git_object: 5d4a5f3dea524192974b009b29b0c55a64433516
+ docs/components/observabilityposthogdestinationconfig.md:
+ id: 005b7ba53ef2
+ last_write_checksum: sha1:6f8e601b2e27c8292138258c9d92d26452d77d5f
+ pristine_git_object: 417abca41ac81fdc6b0f6b6d6dbe1a916a57f93c
+ docs/components/observabilityposthogdestinationtype.md:
+ id: a3ce062df326
+ last_write_checksum: sha1:63c802ea9b1b3b72ed8a579c47bba035920b8948
+ pristine_git_object: 0b292361d17c18c0ea9e2a438e78e73a0e2c4a7f
+ docs/components/observabilityrampdestination.md:
+ id: a46ae803969b
+ last_write_checksum: sha1:f182b20b2cb9495c4d2a081c4a15dd793e43106d
+ pristine_git_object: 87f80b72391fe6a8856c6f5aa0ebf121d94e5925
+ docs/components/observabilityrampdestinationconfig.md:
+ id: ed120fec93c8
+ last_write_checksum: sha1:bbe68c9cabede09198294ac44376c5803c86b1d5
+ pristine_git_object: 4221a78626b13ad1080354aafac31044d070cd30
+ docs/components/observabilityrampdestinationtype.md:
+ id: 98ded470a529
+ last_write_checksum: sha1:03a8dc497c1e7e75ae4c6fddcccfa608ed9da0ea
+ pristine_git_object: a385403b09e1020ece95e1d923b0c058ab228051
+ docs/components/observabilitys3destination.md:
+ id: 3cfb33f703ab
+ last_write_checksum: sha1:f0d785abc3774f44dde87080bba3301dfa2bea57
+ pristine_git_object: 1c35568532bc86e115c3f66409df098899aefba9
+ docs/components/observabilitys3destinationconfig.md:
+ id: 9857e1788ca9
+ last_write_checksum: sha1:215caf5c0bb6d845e154f9e4dced38882cf7f30b
+ pristine_git_object: 8a79a8c3c2a3a2d8ea03ae10d75ea650bdb9aa44
+ docs/components/observabilitys3destinationtype.md:
+ id: 99758c95d6ad
+ last_write_checksum: sha1:f13f7307321aa61b830d7a6fcbabe801225c0020
+ pristine_git_object: 167928ae975633a0f0521efaad58fe82ac9da402
+ docs/components/observabilitysentrydestination.md:
+ id: c0db66ec1664
+ last_write_checksum: sha1:a281546e21d0c77dd4515ce948726f1ce709d27a
+ pristine_git_object: ab70b791e92431012b043b32513eba03cc543139
+ docs/components/observabilitysentrydestinationconfig.md:
+ id: f61819b137bd
+ last_write_checksum: sha1:0364b3bebcb1636eb8f2feba923d8ab0ec5bfd30
+ pristine_git_object: c76ddf04cc6eaf366ba96d18d13aaf1db28ab6ae
+ docs/components/observabilitysentrydestinationtype.md:
+ id: e9fe16eaf329
+ last_write_checksum: sha1:9be17cdea703a48dfc3cb2e5c709f16a1a97fce7
+ pristine_git_object: c579db4a0009cf8bcdcc79c6cfeb563a9e20f6d7
+ docs/components/observabilitysnowflakedestination.md:
+ id: 01c80b662bd2
+ last_write_checksum: sha1:4d94529da2ef11c4b954ea2201a0395261758d74
+ pristine_git_object: c7871fbd72b01b20254a217f2f7e7da6ce22ccd1
+ docs/components/observabilitysnowflakedestinationconfig.md:
+ id: 5863c15e5c2e
+ last_write_checksum: sha1:38a96c2cb11b478fa3f8ff4c334a30bb82fc46b0
+ pristine_git_object: e42de6dbb36eb49faded0ccb3fb7d0922ec6df64
+ docs/components/observabilitysnowflakedestinationtype.md:
+ id: ce209a361916
+ last_write_checksum: sha1:244a36b33db8f6a3000b998d892f88ee3fc420ae
+ pristine_git_object: 4c02a083cdb7c917d8afffdaec5158dce23354eb
+ docs/components/observabilityweavedestination.md:
+ id: c34a90c15698
+ last_write_checksum: sha1:99267a7a9920a8c297b3a712a5081b19b47ab977
+ pristine_git_object: bb63ed9473b5c24f4e11dae28c1a874143cb33ba
+ docs/components/observabilityweavedestinationconfig.md:
+ id: 73228e35948e
+ last_write_checksum: sha1:40d75673453e308fea0126f1202efce502f7ed1a
+ pristine_git_object: 596b679f81c4ae44c63f3d0d17c73a89c2d74d8f
+ docs/components/observabilityweavedestinationtype.md:
+ id: 35b8114daf60
+ last_write_checksum: sha1:41ae9dddca44856b6ccc2c9d2426af22d4a42e76
+ pristine_git_object: f432ecd7ebd47db79545fbfa1643768e4367df74
+ docs/components/observabilitywebhookdestination.md:
+ id: 51348fbd75c7
+ last_write_checksum: sha1:6723112df9dfce824b26b7dfbcfbb32fa041583f
+ pristine_git_object: 5a9c0b86372ac36fe5c5be386db6f29bcbb2b6e0
+ docs/components/observabilitywebhookdestinationconfig.md:
+ id: bdcd4f7adfc0
+ last_write_checksum: sha1:42e280c9d149b1e7386c669f3c05bf8b9cd1c60e
+ pristine_git_object: 31b46e3b6fce0d020f5a8eabd73cc3f690056d1b
+ docs/components/observabilitywebhookdestinationtype.md:
+ id: eda8f89f5d4e
+ last_write_checksum: sha1:d59b7878f2985f9aa97eb510e8dbec76460a6f22
+ pristine_git_object: d0208f5eef93e4ecd0e9a38de258f39e0ed403cc
docs/components/only.md:
id: 91bc6779dc0a
last_write_checksum: sha1:9d9c9f1858695f9fe710f28aecb7c84856c494a7
pristine_git_object: a62341bd1e17c836ec7539bd7d8e494a1a5184dc
+ docs/components/openairesponsecustomtoolcall.md:
+ id: ac3aee21895d
+ last_write_checksum: sha1:16e629b4a9dacc4644d1efef349c68f02de5ea5f
+ pristine_git_object: 4615c033bbf754dd285702b736767aa9f018e24f
+ docs/components/openairesponsecustomtoolcalloutput.md:
+ id: 898c9ec80afb
+ last_write_checksum: sha1:4da2372651911ee10a63df94068e5ec6a91d1f93
+ pristine_git_object: 73cb55149d5963cda326d0cea2f2545ea42c1c09
+ docs/components/openairesponsecustomtoolcalloutputoutput1.md:
+ id: fc80a5761631
+ last_write_checksum: sha1:f5d0d55ea31b932e7fd5d8f9d9155aa5061fa86b
+ pristine_git_object: 0f2552eebdb34b9c8750204b5644b08d0733dd57
+ docs/components/openairesponsecustomtoolcalloutputoutput2.md:
+ id: 0722ac09f02b
+ last_write_checksum: sha1:562d190855df03f20f41ae0e70b1d981cd5fd56f
+ pristine_git_object: b374dc6cbbfea894098c524ab65ba08712228ceb
+ docs/components/openairesponsecustomtoolcalloutputtype.md:
+ id: 99674dd00609
+ last_write_checksum: sha1:b4ccac74cc49ede5eb63dfaa5317b08504c6b561
+ pristine_git_object: 8785852bc927f0a78a4012bfb58700a7e2d97a8a
+ docs/components/openairesponsecustomtoolcalltype.md:
+ id: a842d72e61fc
+ last_write_checksum: sha1:5dbe9b6def695cf8ee2f283160b1013094862c6e
+ pristine_git_object: 6d718cc235ce1e24ac715a5323871ce0bd766949
docs/components/openairesponsefunctiontoolcall.md:
id: 3a1364f8d3e1
- last_write_checksum: sha1:27c018aace3db99e6163b746c270bf5a1d0266aa
- pristine_git_object: 9e32253dfeeef51181e0789fada005b1edfcaa2b
+ last_write_checksum: sha1:fc16b457b389728471198954cf2a4322e238592e
+ pristine_git_object: 15a293510664ad28497a1fe708b58be8402fd287
docs/components/openairesponsefunctiontoolcalloutput.md:
id: b3939fe71de2
last_write_checksum: sha1:1705dc61ae8733d30d88947b6a950f92af935ffc
@@ -1496,6 +2814,10 @@ trackedFiles:
id: e0916138c088
last_write_checksum: sha1:10ae047eeb5951e67b6e16bfdc61898e79f92b8d
pristine_git_object: 72b8738f1a2b1e34b51ddd61d3911e585cbcfd14
+ docs/components/openairesponsestoolchoiceapplypatch.md:
+ id: 4b46229cb2dd
+ last_write_checksum: sha1:2efda634d7d7371df066d38f9979ae56da089039
+ pristine_git_object: 1f76d7b87d3203e47dbb67b28c992a137671c573
docs/components/openairesponsestoolchoiceauto.md:
id: "864322169068"
last_write_checksum: sha1:4df5b1713e54f2fbcbf4acd91243b19f07898d40
@@ -1512,10 +2834,22 @@ trackedFiles:
id: 1a18707d5f17
last_write_checksum: sha1:ed310a851eb6b16175ff1aee2f1d51dc1ca63120
pristine_git_object: 57aefba1d93597b1944cf8ce84a55e6578e1908f
+ docs/components/openairesponsestoolchoiceshell.md:
+ id: 946027d4a9cd
+ last_write_checksum: sha1:b43e5c87f09cf9279dd948c17df532c36426b4e9
+ pristine_git_object: 736d8f29a42debb1bdd4026725d9c55fc08467e1
+ docs/components/openairesponsestoolchoicetypeapplypatch.md:
+ id: a28326e5e717
+ last_write_checksum: sha1:a74e5e47b84038bd83004d371925f0aedd9fb0fd
+ pristine_git_object: 84d2045ff0a40a02dfc74286f133f0f7214a4f5f
docs/components/openairesponsestoolchoicetypefunction.md:
id: bf87379c3667
last_write_checksum: sha1:9275e8d69c3615686c52f0c7f2607f79bedaa39c
pristine_git_object: de3caa3f6351a1cefab397803760aabee509a32d
+ docs/components/openairesponsestoolchoicetypeshell.md:
+ id: e6f9a610204b
+ last_write_checksum: sha1:2dc29ea8cf64ac8b97b7db83bef402ab8bbfae53
+ pristine_git_object: 32b67ebb8be6202e4a85d3e2a3bffcfa0d227b64
docs/components/openairesponsestoolchoicetypewebsearchpreview.md:
id: a0dcc27980f9
last_write_checksum: sha1:c56012a4d3ef1dcfc993f31529c9f21cd2f2d45b
@@ -1526,8 +2860,8 @@ trackedFiles:
pristine_git_object: 3162d396225c6fa3f2597ed4aea08c8b1dc7db22
docs/components/openairesponsestoolchoiceunion.md:
id: 0deaf8366a16
- last_write_checksum: sha1:117368768009291418543d72c854fe5bdabc2e81
- pristine_git_object: 7e503bb70c5c5e4a853d65d39fac69f6c8c1f503
+ last_write_checksum: sha1:5605d2dafe5ae816fc30294c7e2a4ceebc79a694
+ pristine_git_object: 15e1482ab0963c950b350d46284d1d9f75102bcb
docs/components/openairesponsestruncation.md:
id: d4ad0cf0c093
last_write_checksum: sha1:0adf4105f41726d94f43e9b76a7df2bb4cd791f3
@@ -1550,8 +2884,8 @@ trackedFiles:
pristine_git_object: e88886f738fef9ad22e5efc74e3e0ea2cd8ceeb3
docs/components/openresponsesresult.md:
id: 9795b7de3f92
- last_write_checksum: sha1:5c1834da4b2297e6cdc0328c8d9c026303f6b9b3
- pristine_git_object: 7980a1a0edea51a2fa9cde48f5f9554029ef827b
+ last_write_checksum: sha1:e76ebc50bf983fda5b31b5c87b306c5abd5b43ae
+ pristine_git_object: c4ef91fa969c5ac26e6de263b88b7d816edab692
docs/components/openresponsesresultobject.md:
id: a8c7f7bc0b24
last_write_checksum: sha1:3df49df80dda49ea4cb53f913931fd4754769b66
@@ -1568,6 +2902,10 @@ trackedFiles:
id: 11e423f51c0a
last_write_checksum: sha1:aafa032ff25d8adeec0c0bd0d995fdcebecb59b0
pristine_git_object: 1fd0de22bc2eadd015eb6e04c46eafa3dc992af4
+ docs/components/openroutermetadata.md:
+ id: 7d5b19c796e5
+ last_write_checksum: sha1:dd7b644e0859928b6685ebe073946b2af58a3742
+ pristine_git_object: 60461ffa8bfa773b9d15c7698fcac23ece59fb62
docs/components/openrouterwebsearchservertool.md:
id: fb93a3700123
last_write_checksum: sha1:9bea49bbae5d084bf15a20caa095165fcf14a334
@@ -1576,18 +2914,50 @@ trackedFiles:
id: 16e1e8501319
last_write_checksum: sha1:6d83c960b1b1f5be7be0f0f6f6b71d86fb160cc7
pristine_git_object: 947a0b4decad7398ad4ddd0ff70a3a8cf95c5e87
+ docs/components/operator.md:
+ id: 63449f6362da
+ last_write_checksum: sha1:11b3d7ad51195be1e48a90e2861633551b9992d5
+ pristine_git_object: ffa82a743b58e9352a9dfad57f7a4a94c629944c
docs/components/options.md:
id: d57f3108a48d
- last_write_checksum: sha1:33aba904de1c5bbbb772a34eaf56daa859a81143
- pristine_git_object: e695cb694be73ef388c6039ef8803a6ce146e500
+ last_write_checksum: sha1:41661a07be79b3eb11387f8ffbabd03eb446563c
+ pristine_git_object: 8bc640c6d6ac04377d194e59137c0fa542063730
docs/components/order.md:
id: 16e6ae6962e7
last_write_checksum: sha1:a060705e562a2f3fc024c4fd8aa80604535b0bc1
pristine_git_object: b0e21fa3c30d5f4efb71936cd033937d0b0ad8a9
+ docs/components/outcome.md:
+ id: 86f24b0ddb43
+ last_write_checksum: sha1:3275ec6332678a9016e5a383214e19fd480c61ad
+ pristine_git_object: ca5a5774555782d3e9ed5e39b4ed539884a3453c
+ docs/components/outcomeexit.md:
+ id: d57f8d2a43dc
+ last_write_checksum: sha1:2d6e2c69f490095a52315878029b2c28d370db14
+ pristine_git_object: 8dc8c158446e999d54278fff1f2630afbc9937af
+ docs/components/outcometimeout.md:
+ id: d585ebd974ed
+ last_write_checksum: sha1:2fc4fd683d643841e11834df9987eb2da5b35849
+ pristine_git_object: ae2fd6dc6f3f0794e45f798f6b4c99fa2d20a56f
+ docs/components/outputadvisorservertoolitem.md:
+ id: 6bacdcfb50e4
+ last_write_checksum: sha1:c28cbd5979c0c93a8f2199a1b3518e0e4adf581c
+ pristine_git_object: e7e5688819022c709d79bbc7b38a2e44059aef8b
+ docs/components/outputadvisorservertoolitemtype.md:
+ id: 580d3da2d5dc
+ last_write_checksum: sha1:edc0472af5f126a9681a09ebd545322ea15411e5
+ pristine_git_object: e126a806c9668cfd6ba0400de8338130878b7f85
+ docs/components/outputapplypatchcallitem.md:
+ id: b300dd735bcc
+ last_write_checksum: sha1:a4351bd6de39f88c19f448fae0a1b307ae637656
+ pristine_git_object: 5a97bc9076a00ce89e3d78cba834fcdb0aa5ba69
+ docs/components/outputapplypatchcallitemtype.md:
+ id: 0d574fbb1219
+ last_write_checksum: sha1:7bec10beea9f5b12c88ab74e9884d02d0091a637
+ pristine_git_object: d63680f8325b6bd06b0b1bbf50256b714486af07
docs/components/outputapplypatchservertoolitem.md:
id: 31b40a05f9bf
- last_write_checksum: sha1:6060e1f8ffa79af2c60eb80637b5ad2130b79501
- pristine_git_object: ffa5f0e7eeb63de787e8b1830482ffa368976413
+ last_write_checksum: sha1:018a47d1a2e118ad529f1498488aa1cd7ca1dba5
+ pristine_git_object: 1d6f10ab527097cec8a9450b3b8ff2730d0f9454
docs/components/outputapplypatchservertoolitemtype.md:
id: 0fc0eefe1f94
last_write_checksum: sha1:4e7bd5264d2da2fb6fb31d4f17cff1c5f6159e41
@@ -1616,6 +2986,10 @@ trackedFiles:
id: 20b1004f0b3d
last_write_checksum: sha1:29fa7ad397141191b331383f8931d77b1bef4000
pristine_git_object: 458ad8c97d2d4f05dc5858b26b062a48520482f2
+ docs/components/outputcodeinterpretercallitemtypeimage.md:
+ id: cd44f1bc4365
+ last_write_checksum: sha1:1384b3deed86eb61ecbba6e6bfe4db87b95665d0
+ pristine_git_object: c2a090dc86cb16e865c1b70f0b93893a25096e1e
docs/components/outputcodeinterpreterservertoolitem.md:
id: eaafa674fcfc
last_write_checksum: sha1:28c0bb8b3f4e1925d63066e6e450945ac1708bfc
@@ -1636,6 +3010,14 @@ trackedFiles:
id: 93a8202e16fc
last_write_checksum: sha1:3d997f3397a92ffd8d05ff539073e06c38b0e2bc
pristine_git_object: 6433a41ff2a718dc451382f1d3a5e616e7c6d5d9
+ docs/components/outputcustomtoolcallitem.md:
+ id: 5da0a60e34f2
+ last_write_checksum: sha1:34f4aee85faefd77cdd9e6768cd6de3ed4e31a41
+ pristine_git_object: fdc80b16dc73c80d4d8d2685f128defd32eb1762
+ docs/components/outputcustomtoolcallitemtype.md:
+ id: 57eeb19002ba
+ last_write_checksum: sha1:42be29623e1f16ee8aa483966aa0e2a430b3ed73
+ pristine_git_object: 2d44dae494019cf25037f7c36311f1bd0f4903f6
docs/components/outputdatetimeitem.md:
id: eccb35ac217b
last_write_checksum: sha1:426d333d7fa20b3da448c40c5d1d6f0cd6667ebb
@@ -1666,8 +3048,8 @@ trackedFiles:
pristine_git_object: 7f5c5453ac49de51f495c9bc9ab491a02025e92b
docs/components/outputfunctioncallitem.md:
id: a0b3dcf93469
- last_write_checksum: sha1:c87ae53881823e5d660d25ee190d316e16026cbf
- pristine_git_object: a1bfc0dc317f6638d51dcb248757660829983925
+ last_write_checksum: sha1:30c6f678351da68f90cc92d45d6c477ab0aee6a4
+ pristine_git_object: 44d9e070c54b27288d5ff2f73fe97f920c4c5eac
docs/components/outputfunctioncallitemstatuscompleted.md:
id: fcce7d103880
last_write_checksum: sha1:a555c5ed9cfba8bb91a9f3bbfa561a4df06e1d6a
@@ -1688,10 +3070,18 @@ trackedFiles:
id: e4f072d4f1d1
last_write_checksum: sha1:042aa6381e2b6b199e9ec48f1554f011403525b6
pristine_git_object: 31066e50f45a2f32c35d0389886757885704ea4a
+ docs/components/outputfusionservertoolitem.md:
+ id: 886e6be27ec2
+ last_write_checksum: sha1:9c957daab1d214aa7f9b997c451876c759de0eec
+ pristine_git_object: f16afb99ac514a2fa4b63fed2feea6226872a038
+ docs/components/outputfusionservertoolitemtype.md:
+ id: 93233bb8c5d7
+ last_write_checksum: sha1:5e9a0f90c938eaa5fc231859f48f5b9673b6b00b
+ pristine_git_object: 60a41c468727f288331bd5b91a547edb2969661c
docs/components/outputimage.md:
id: 6f1d41cfe2f6
- last_write_checksum: sha1:ade263b8889aa203c5fa3444d2868c589424ff49
- pristine_git_object: 95bbdbd77be64f6a25658241601342c6dad545a2
+ last_write_checksum: sha1:5bb1fcc6bb8c49f3e3d1a0171f0cc7d2b661847a
+ pristine_git_object: 2f533e0c19456c28e6733a180b3be570c80ed8bc
docs/components/outputimagegenerationcallitem.md:
id: e91e03b12978
last_write_checksum: sha1:9128df964c87da7033866dc035b806b2012ec070
@@ -1702,16 +3092,12 @@ trackedFiles:
pristine_git_object: d7d592b96122136f2e4becd5edc72b95062d6237
docs/components/outputimagegenerationservertoolitem.md:
id: 0a39a1c10949
- last_write_checksum: sha1:b7ffc78b0acdbd0c9e5c9b6a777e8e2e39ff16ee
- pristine_git_object: 563b9e780a842074f1ea9da0a9b81133833609fc
+ last_write_checksum: sha1:794cbf0f99dc7ea2739d94d9ab96e2f3f07bb323
+ pristine_git_object: ec9409ff0690e6787b0f464c83aa9cf5753fb4f6
docs/components/outputimagegenerationservertoolitemtype.md:
id: e8483d8856aa
last_write_checksum: sha1:43f034d1b716ef2878be034bb01e836395c7b686
pristine_git_object: bd9e1fe6213d47f2eb203ae3765551cae69784cc
- docs/components/outputinputimage.md:
- id: 776d1d3ae41b
- last_write_checksum: sha1:c1fdf4043148b34fc92ea0363006731dddc8e3cc
- pristine_git_object: 6a3865d688cfa35328a6e6e4c409d2caf7541bd1
docs/components/outputitemimagegenerationcall.md:
id: 1338bdb69860
last_write_checksum: sha1:d08ae2d3ad68eadc96ec27786fbe23a32a0aa82e
@@ -1722,8 +3108,8 @@ trackedFiles:
pristine_git_object: d9e663fcae49dba7885223f4f0848aa9f9a23002
docs/components/outputitems.md:
id: 92565743132e
- last_write_checksum: sha1:0080f5650ea184795c28fc44983eec2989b58634
- pristine_git_object: aaa3a85a2a72fba77cc2a3e939d8df3a00e1073e
+ last_write_checksum: sha1:ec270d016224b2d593e20ee661dae22ed61d8851
+ pristine_git_object: 6e103ee1d6841359426b63204ff153c12eaad319
docs/components/outputlogs.md:
id: 0821eefe9546
last_write_checksum: sha1:1ff4592093bd2fe28038cc8db28bee6a35025c96
@@ -1834,8 +3220,8 @@ trackedFiles:
pristine_git_object: acbedfe1aca86bfe4d682abcd075b89d872e9e06
docs/components/outputmodality.md:
id: 8e1105f01041
- last_write_checksum: sha1:6fe20f70faa190a188e00961cb8f13edb2dc371c
- pristine_git_object: 7b8edcffcb042e3dd1115d6a2f976ac4d5967461
+ last_write_checksum: sha1:d3c1b4ce81cdf2858288683dacbe426698793a45
+ pristine_git_object: 2e0633eee8835d45f782af9a76b1d3d866f70bb6
docs/components/outputmodalityenum.md:
id: 9e9b5b751962
last_write_checksum: sha1:e445a894b182e6fd805d5b9310d13b8a8520349d
@@ -1864,6 +3250,38 @@ trackedFiles:
id: 2efd271441f7
last_write_checksum: sha1:36a63bf61d927a595f3e58dd0b607a8937db9ff3
pristine_git_object: 24800454b81c6b2f9a0180f283d793216bd90384
+ docs/components/outputsearchmodelsservertoolitem.md:
+ id: 17da96b2505f
+ last_write_checksum: sha1:da40a4743d0ae6385588944cac094ce9bd4d14c9
+ pristine_git_object: a5e1fb16896dc6841105b7f01e735539b8876a5b
+ docs/components/outputsearchmodelsservertoolitemtype.md:
+ id: 37be34b271c8
+ last_write_checksum: sha1:237762e35b5cf89509bc3bf8b261f174016d3903
+ pristine_git_object: dc9df5ca2122a044efa3d2ab1d13b2f957f67d34
+ docs/components/outputshellcallitem.md:
+ id: 2b7a6e806c6c
+ last_write_checksum: sha1:ad433b0adde679d54416e5548bac1aa5d013292e
+ pristine_git_object: 8e786ea50f693ede16622d7d87684ac1db7a64a1
+ docs/components/outputshellcallitemaction.md:
+ id: 19eaf8b17aba
+ last_write_checksum: sha1:47eb3c2d6965c15eae4c2ee99aaef31572fb78d2
+ pristine_git_object: 0a3260f9afe122b8eb98367040f466ca4a55f7fa
+ docs/components/outputshellcallitemtype.md:
+ id: af4a54ed40ac
+ last_write_checksum: sha1:2d3bde4a84a177b6a8c54ec744e530bc7ff6bace
+ pristine_git_object: 8097dfb3c462487cd5419aa2219f755d77f4ea9f
+ docs/components/outputshellcalloutputitem.md:
+ id: ce29af51f880
+ last_write_checksum: sha1:794b4fdb7885b5eb0f60973204d348855dacb370
+ pristine_git_object: 1543afc790d7497967d767037fb221c641a18596
+ docs/components/outputshellcalloutputitemoutput.md:
+ id: b9691ab35413
+ last_write_checksum: sha1:35a719a15f8a22866238cc4a725971beaabd575f
+ pristine_git_object: d5059f498ec2696b6b66473461365a053b88a007
+ docs/components/outputshellcalloutputitemtypeshellcalloutput.md:
+ id: 38aa50f0c8ad
+ last_write_checksum: sha1:497eff39dfcc79b381adf509b9ba70dd8dfd6832
+ pristine_git_object: 9e2ef674ca5e736dda8f47ab6749ebc1df31d475
docs/components/outputtexteditorservertoolitem.md:
id: 6c114519044a
last_write_checksum: sha1:7b90b5ce30ff6df03376e337e266dbdadfa751c0
@@ -1886,32 +3304,60 @@ trackedFiles:
pristine_git_object: 0083cab9d32c4c2364eaafd66c376220aa8ece54
docs/components/outputwebfetchservertoolitem.md:
id: 9f1abd1711b9
- last_write_checksum: sha1:22b9c861aefe5a3316875212f6db6401c24b6ec5
- pristine_git_object: 251e0495c03d2cb1edb1500df2bd5c32610e127c
+ last_write_checksum: sha1:3372f2b1174ea8b800fbfee5b643d15b2fd5d872
+ pristine_git_object: ece6f16e25f0fefd093bb9f0784d42ccdcd71c7b
docs/components/outputwebfetchservertoolitemtype.md:
id: 6e1e0de2a502
last_write_checksum: sha1:0c7af6f7dce5a92e6c906e8edfd6524b949f0857
pristine_git_object: a81ab5dff5c808fcaadefd99601f35fdeb765212
docs/components/outputwebsearchcallitem.md:
id: 7d5a537f4c7c
- last_write_checksum: sha1:7b1b7592236a4bfcba7eeae5d67d86579c86679d
- pristine_git_object: 8b512f47e3ea22da48a6ef9c9f2a664ca80b9751
+ last_write_checksum: sha1:ce3ad0c167fda0e6da21e0630112c740034e5d60
+ pristine_git_object: ddb717fe01a0884b0f8e10cf2887a83ab4419160
+ docs/components/outputwebsearchcallitemactionsearch.md:
+ id: 9f59c4212631
+ last_write_checksum: sha1:756994237267ad25b63927f598215f72d7aa88d2
+ pristine_git_object: db67ffae60eb48e19b47d5ecbabbe99306a19249
docs/components/outputwebsearchservertoolitem.md:
id: f5fdb9904c43
- last_write_checksum: sha1:91d82e9f05cf24c8ac1750bd1611c5e54cdf4819
- pristine_git_object: 613f59d643bb07deb3a08f2ac79619c00d86bbd0
- docs/components/outputwebsearchservertoolitemtype.md:
- id: 7115f48d3dee
- last_write_checksum: sha1:92519069adee4ad02b897ed5ec4fff2cd59ca025
- pristine_git_object: 157187a6304be8c0f3d04e8525c93442518bffcf
+ last_write_checksum: sha1:6b857eb4aec882ee3eea48b4e1a4bfe0e517664c
+ pristine_git_object: e82d86378b87dd74cc4e5d7a0f10f06f64aa5174
+ docs/components/outputwebsearchservertoolitemaction.md:
+ id: b6b0cbb67ab8
+ last_write_checksum: sha1:dd3fc92f2817d38d7e18cb0658ec425dbfc08e54
+ pristine_git_object: 69be5b430a249f46bee3ff980fb3a43c8562ff00
+ docs/components/outputwebsearchservertoolitemsource.md:
+ id: d43c7785b97d
+ last_write_checksum: sha1:5467399b41fa45234607c9e560ab0f0dada5fab3
+ pristine_git_object: c48443daf6a5451f47d77c1530db12b7a6b2cc99
+ docs/components/outputwebsearchservertoolitemtypeopenrouterwebsearch.md:
+ id: 7e76bc306963
+ last_write_checksum: sha1:e4c09750dcccdb30e32b8ed8974770d25d754647
+ pristine_git_object: 204598652178d2425622e6d73fe626b86ee0635e
+ docs/components/outputwebsearchservertoolitemtypesearch.md:
+ id: 00e6e8cd525e
+ last_write_checksum: sha1:65019a14aa26f42c0a0e754c17f50cd6ecfb1f2c
+ pristine_git_object: 5c652417ae82dd439989abefa6099f0a10f73909
+ docs/components/outputwebsearchservertoolitemtypeurl.md:
+ id: 505e96bae165
+ last_write_checksum: sha1:374b95b67ca2ca964059428006e4cfdfc7dffc60
+ pristine_git_object: 0f61afffaa0d269fbc07069264e57b57be5b3e1f
docs/components/parameter.md:
id: d1b8871be7f8
last_write_checksum: sha1:f25835d07a38e32f2ebf37b2e5df67c915bb0112
pristine_git_object: c00420ef1c6db8f5c63d1372eef3a3f7b2ae63ab
- docs/components/parameters.md:
- id: 74a7ffefc804
- last_write_checksum: sha1:a278eb563604b86204eccdf754760624f1dac8af
- pristine_git_object: 0fc28bfa15cad7eada2db5f199ebb13f32e68d4f
+ docs/components/paretorouterplugin.md:
+ id: e4afc1e2a656
+ last_write_checksum: sha1:8721ee5f64c6bb07fcbc1e3d40c04d9c3969e182
+ pristine_git_object: 10c1195d432607fab7047d13fc5019e9b70bc09f
+ docs/components/paretorouterpluginid.md:
+ id: 353199e41ef9
+ last_write_checksum: sha1:811dbbce35aa0fa7c3d55727e0061c1a6e6acc62
+ pristine_git_object: 08be131910dd1e6bd88a103b022080eafdc54571
+ docs/components/partialcoverage.md:
+ id: f09f55d1053c
+ last_write_checksum: sha1:0952353ecff862e0cd69170b03b50cb21b859a58
+ pristine_git_object: face39408dbf68c7cdada7998daf36d09248a01f
docs/components/partition.md:
id: cc74439b2251
last_write_checksum: sha1:de88a6dedcd65f73fca2bd1913f7cbfd0d62a4ba
@@ -1960,6 +3406,14 @@ trackedFiles:
id: b3e279b3aa17
last_write_checksum: sha1:4b5e8c0bb453b54a0c31faffca45d3ded875be48
pristine_git_object: f42074dab36af7d2b068c0b24652b7db672dc0cc
+ docs/components/pipelinestage.md:
+ id: 54d91561d6e3
+ last_write_checksum: sha1:eb2d1e6b1ab6aa6a375476cb90ad5b2802824615
+ pristine_git_object: 277bf3d9e447086cc9213f1bb473b18d779a2139
+ docs/components/pipelinestagetype.md:
+ id: 9097aa0e97fb
+ last_write_checksum: sha1:6ad16307547f51c9daefc056485a04a6efc17b36
+ pristine_git_object: e7cddd9c2a12ee48a3769d4447bd8583e137cf73
docs/components/preferredmaxlatency.md:
id: 0b82201b730d
last_write_checksum: sha1:5dc1be79949b581650dbecd75ab4afccbf320a8b
@@ -1968,6 +3422,22 @@ trackedFiles:
id: a13cf3a5c7fa
last_write_checksum: sha1:977b30074dde478796286a42649cc8202b712419
pristine_git_object: fd49bf88b75891b0f2a659a453ff3e3aa0d55ae8
+ docs/components/preset.md:
+ id: 0aefb22d403b
+ last_write_checksum: sha1:572a22442c3302e54968d33a9ffc57f86573f967
+ pristine_git_object: 52672af2ac4010cf36f76f492a82ade3d9794f05
+ docs/components/presetdesignatedversion.md:
+ id: 9771a2a5595c
+ last_write_checksum: sha1:a09ae16bdd34ec3b3807cf2a68ea5300923250b7
+ pristine_git_object: 2042f67413d167a11ab517dea9c9e6d23093df94
+ docs/components/presetstatus.md:
+ id: e26bd87a2ff6
+ last_write_checksum: sha1:e4f17dca20609affa7652ead9964a8ea030115bb
+ pristine_git_object: fb67b91f754a279463322dc05429d2fca4401798
+ docs/components/presetwithdesignatedversion.md:
+ id: 4b8a4543197a
+ last_write_checksum: sha1:fab82d4c537672885ce3e9d61da5dfc081aae6fe
+ pristine_git_object: 83cb70870a74ea33634483654fa1c03406e5fdb5
docs/components/preview20250311websearchservertool.md:
id: 0ba7bd853f96
last_write_checksum: sha1:f29b3b4d60d9144b753d57bb606825dd647a4146
@@ -1996,18 +3466,22 @@ trackedFiles:
id: 15dca753d9eb
last_write_checksum: sha1:11793d86b7506e8bfee21225071f1841bbb368ab
pristine_git_object: 084b83a2e83521084ef17c63e88007953e5d3170
+ docs/components/promptinjectionscanscope.md:
+ id: 285ea7802dcd
+ last_write_checksum: sha1:0fff83f064f6699f5a86c5068423c646a9fca69e
+ pristine_git_object: 02d5dcdfc5bec22a67a803487f4758df68ba098e
docs/components/prompttokensdetails.md:
id: 58d2af57c508
last_write_checksum: sha1:900904dec588ecd97ed17fc0d99896082494f729
pristine_git_object: ecc924e0faf698d142621fce07381ec15ce6d725
- docs/components/provider.md:
- id: ed488bb1dc3f
- last_write_checksum: sha1:06525d0f66030e9d8d4aac140d3ae780c044e7ac
- pristine_git_object: 56d2fd0642e93c72502597f761e75cf50ef6a597
docs/components/providername.md:
id: fe24a77d9911
- last_write_checksum: sha1:47af6679dbedcf8d8d0ac8995cfc9cd3020a6b7b
- pristine_git_object: 22effdd1f55bc9d60648a80e825e17d4b94b01c1
+ last_write_checksum: sha1:dbadb7842e1e2db16bae5e0fdf3090bf44f9f4f8
+ pristine_git_object: e27624b1a7745588aaea78a70b6b9cbb75aa6c18
+ docs/components/provideroptions.md:
+ id: 48594a6d2d81
+ last_write_checksum: sha1:4be00f05cb14f3ed97b3caa9245dcfffd09b7b29
+ pristine_git_object: d6d3524787b9d22cfba6a4156d8021d3d31dd381
docs/components/provideroverloadedresponseerrordata.md:
id: c2a8cc4ec6df
last_write_checksum: sha1:1d206d00dc0d91b5ceec470579c6ce345cc23d29
@@ -2018,12 +3492,12 @@ trackedFiles:
pristine_git_object: 2321236ed51accb2e65a5b54c9dd727d720f6bc8
docs/components/providerresponse.md:
id: 4574bcbd4144
- last_write_checksum: sha1:fa7655aac30b91780f44cd912b9923d9af3f6300
- pristine_git_object: 9dca4ee9d4a9ec0a46ce21fb3823f05e8e119334
+ last_write_checksum: sha1:de60f413818cc00ed5a4f6bb982c9dc5acc3899f
+ pristine_git_object: 09beea2aedab445e726f20fb9a9d3ed5ebb4df25
docs/components/providerresponseprovidername.md:
id: 800bab487911
- last_write_checksum: sha1:befe2d2077d8abc969729b09ce4aba6a2b14bb37
- pristine_git_object: 73838c84a7682a4b6903b0ab3383b6514ca6951e
+ last_write_checksum: sha1:facbea7a411cb7600fceae161d4270ac3597778d
+ pristine_git_object: e0443626dcb65a09857b084e2e93ad319d96cede
docs/components/providersort.md:
id: 290449b1880f
last_write_checksum: sha1:f15d65e5c226a222c3bfc0b9f55dd9ca0443d415
@@ -2060,14 +3534,22 @@ trackedFiles:
id: 9f0f4d6c014e
last_write_checksum: sha1:0588cedf315010f03ba831bbb382cb1252eb01a9
pristine_git_object: b1917b130163ab7252e49ce934d82cf8cc463a32
+ docs/components/rankingsdailyitem.md:
+ id: 284cf2da9639
+ last_write_checksum: sha1:f1a0f647bf514a800ee128f9689de2fe2e395011
+ pristine_git_object: 54e6cc87d517e482c1ac183ccf82c0140f081d24
+ docs/components/rankingsdailymeta.md:
+ id: 6e0da9cd4001
+ last_write_checksum: sha1:51cd8cda99b6dedd6d2a2c96d8c18e72b2371986
+ pristine_git_object: fea99fcf6d54cf6e8676eff7883b643f8deaab2c
+ docs/components/rankingsdailyresponse.md:
+ id: f8764b589bb4
+ last_write_checksum: sha1:4d31d93b0df4cf990f541cc7f08649f8cb438c43
+ pristine_git_object: 6af1ac55add5b53b6066157a854bf82d29d9df0f
docs/components/reason.md:
id: f3e06a9de94d
last_write_checksum: sha1:cf117327a941137c34db136304bf50e4801c996d
pristine_git_object: 1c21d0457d1c635b8eff2a46144cac5e24840183
- docs/components/reasoning.md:
- id: 57e5fc147254
- last_write_checksum: sha1:af35fe2b1c30924056ad0fb12921b2f8e9b52d78
- pristine_git_object: a56f26b8ea8e757ae06a70d89059656024ba7f90
docs/components/reasoningconfig.md:
id: a2d51e262631
last_write_checksum: sha1:28bd5e57b7c9fb68e3f9c6e78343dc6c1e4ea3e6
@@ -2216,6 +3698,10 @@ trackedFiles:
id: c4000667a2c8
last_write_checksum: sha1:2ff86281263010d78e755cdd7289f5daffe05cbf
pristine_git_object: 7035e9e9bc9752c39ce6152d4691e92a55f34aa4
+ docs/components/region.md:
+ id: 38a8f57aefad
+ last_write_checksum: sha1:a5bda39be649ced37c120ce277841c37985c5db7
+ pristine_git_object: 0206a524803bce4112b0a9a88254a0b81dcaeab6
docs/components/requesttimeoutresponseerrordata.md:
id: 25804cfd7f36
last_write_checksum: sha1:fc01cafdce0dc5ea0e3def122b7885ab7afff9ed
@@ -2240,10 +3726,18 @@ trackedFiles:
id: 84d737f84bee
last_write_checksum: sha1:606fd74ebc92be927228afd7adefa80e64c47a52
pristine_git_object: 596502b2f94707deb347c53015c764525c9ba3b9
+ docs/components/response.md:
+ id: 2b40822178c9
+ last_write_checksum: sha1:385337549929814b68441066e56ed7daa6183344
+ pristine_git_object: 068fed8b0a212f1bdaacafa80310d07fe7ee1935
docs/components/responseformat.md:
id: 21aa2dcdc770
last_write_checksum: sha1:2ea5efe6bbf68d068fdf992ae335cc4fc2fcf7d7
pristine_git_object: 86cd00504691f2fdc33549cb33e9b07d0c31dd3b
+ docs/components/responseformatenum.md:
+ id: fef1c313ab3d
+ last_write_checksum: sha1:935d113cac8fb79702adb5bc30c7540035ebb4a1
+ pristine_git_object: 89912bf57d12ca881110486c0ca69342d38accd4
docs/components/responsehealingplugin.md:
id: a9a3b6d3e0c1
last_write_checksum: sha1:ba75992bae3382339f5f1e654a91da4cdd1f7eda
@@ -2274,12 +3768,12 @@ trackedFiles:
pristine_git_object: e21193bbab68ee5dfdb0a113e26ba70f82bcab55
docs/components/responsesrequest.md:
id: cb5cd99790f3
- last_write_checksum: sha1:41f81240aba6c05767ee1de2bcdf2ed6c1851f22
- pristine_git_object: fa27d12757cb1759f2d445125705def9e13a57b9
+ last_write_checksum: sha1:80469fec7c75dcdf77ae2ad4f5bf40cdfedd4397
+ pristine_git_object: 22201e800d4d5cb9759f21c1cd10d72580a93ad2
docs/components/responsesrequestplugin.md:
id: 20da7be12bb9
- last_write_checksum: sha1:14dbd6cd32c51d333548f2c43772c43540dc97fd
- pristine_git_object: 39234e56fbc2e0bc654e55a7811fca1169ded5da
+ last_write_checksum: sha1:0bb97c99ec4b7fd13321427b9aff9a2d8bb6d288
+ pristine_git_object: d9cd71dbad8602ccffe96635c6e0950fccaabc1d
docs/components/responsesrequestservicetier.md:
id: 79d0f5c6bdbe
last_write_checksum: sha1:759cbf960f90a2680f905be11049e8f88cf6ecda
@@ -2290,12 +3784,32 @@ trackedFiles:
pristine_git_object: 98ae0961e2afdbf95cdc71e2eee23c9c06972889
docs/components/responsesrequesttoolunion.md:
id: d6a807777d03
- last_write_checksum: sha1:31403e31e2adebdf6ed12d7c2ddc24637826381e
- pristine_git_object: 944ee6cc07e0e55107e75679efeaf3fa65e0a1d7
+ last_write_checksum: sha1:7094ca8d783089f3430bc4865017d6eb462c8a98
+ pristine_git_object: e64a76c9221b039eff259a866cf47e8da4e0e6cb
docs/components/responsesrequesttype.md:
id: 5bd80a5ef99f
last_write_checksum: sha1:96aba92528f15b2e26760ec90539b8fd7a0e9cc3
pristine_git_object: a1b8e6cfcbd056ddb1daf6fcf7f217afde717698
+ docs/components/responsesstreamingresponse.md:
+ id: 5d93a59c671a
+ last_write_checksum: sha1:7fc7227e197939bef3c858dff903899922871187
+ pristine_git_object: 49042a626076feb210b0f9ea38404bd7a1fc2d2b
+ docs/components/routerattempt.md:
+ id: 5444722011a3
+ last_write_checksum: sha1:27a4f026961813e1714009c0248e10841ef23c01
+ pristine_git_object: fbcb54690c8f245dfd518ff8bf0b86e50c1c464a
+ docs/components/routerparams.md:
+ id: c76ec52146b5
+ last_write_checksum: sha1:1fa168fa76be11fd84bcdcb2beefe3323a2c0c40
+ pristine_git_object: a76b529f381742a56fc9b4720016023bb2d84156
+ docs/components/routingstrategy.md:
+ id: 43ec0d203f4c
+ last_write_checksum: sha1:7a52d9b52c61317a0b6c886adc920995550950c3
+ pristine_git_object: 42c33d595afcaf94acfb4b04e188af4b5e266ac5
+ docs/components/rule.md:
+ id: dbcaf58c98fc
+ last_write_checksum: sha1:8f3d1a647870ec092677bcff48ded8123b387c9f
+ pristine_git_object: 5fda8b8e205bf5bda431c5bad8f32c3e014ed1a0
docs/components/searchcontextsizeenum.md:
id: ba037b375d32
last_write_checksum: sha1:1802fbb5223f07b0db2e7503e12f59647b3608f9
@@ -2306,8 +3820,8 @@ trackedFiles:
pristine_git_object: a3dc6194e6abc9a0cc62bd9e20b7131fe106ab36
docs/components/searchqualitylevel.md:
id: a4e6b74956c7
- last_write_checksum: sha1:bd89df72f13cb501966c208333fa00f123eff131
- pristine_git_object: 05f28d4664e7c5101ed1629a347dcec7e3c6904a
+ last_write_checksum: sha1:4b218b033d279c041761d90bbec7c13f07358f5e
+ pristine_git_object: 76b14f2086dc9a5462827e25c9fffb476d207c65
docs/components/security.md:
id: beee40001fda
last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf
@@ -2316,10 +3830,66 @@ trackedFiles:
id: 6d65ecfd7ad3
last_write_checksum: sha1:c0e9357b45a58f3da2d3520b502cec7dae5f3446
pristine_git_object: 797c8310a34ec5ac85628fe7d60706221f14e573
+ docs/components/shellcallitem.md:
+ id: 7c90af9ed20b
+ last_write_checksum: sha1:cff1a19c10dae4fc68503ede7de302401bb676e3
+ pristine_git_object: 770148e5a9eb0f7d52ffa3f3ebbe0e6396f9d460
+ docs/components/shellcallitemaction.md:
+ id: 966c83480abc
+ last_write_checksum: sha1:c8aa1528fafe1a7130a4b43faf90b6daee3f4e11
+ pristine_git_object: 5e0455dc912e22c53d313ed5261530528d5efede
+ docs/components/shellcallitemstatus.md:
+ id: 3686c616a4ce
+ last_write_checksum: sha1:5a462123fffcd6f4b60efe48d529739e32e246f3
+ pristine_git_object: 62af9a8bf9f79ebddbec1ddab799b23156fb8315
+ docs/components/shellcallitemtype.md:
+ id: c193046e306d
+ last_write_checksum: sha1:6343b1cd900ef6726449a15a2f4967be36c324d5
+ pristine_git_object: 4bc6539fe90491885319b8bf597187c2f15ab8c4
+ docs/components/shellcalloutputitem.md:
+ id: 7c8d9a8d7145
+ last_write_checksum: sha1:7dd6d238883f7e70f5b08b077788bcfa1521aed7
+ pristine_git_object: f5c1081bbb1f26458d9ba51c78309185220d53fb
+ docs/components/shellcalloutputitemoutput.md:
+ id: 3d5419f14a4e
+ last_write_checksum: sha1:929da03678fe61046fa1ef3cdb462981d3f90048
+ pristine_git_object: 47c542cf09298d5bcd97b860d907f05a51fd17ec
+ docs/components/shellcalloutputitemstatus.md:
+ id: 4d98e96563c7
+ last_write_checksum: sha1:88a3edc33171508aa9d35d9b145c992e00394d33
+ pristine_git_object: 84c418c6101b4096a723aa749a226f7f78de644c
+ docs/components/shellcalloutputitemtype.md:
+ id: "070444798601"
+ last_write_checksum: sha1:f210535e0c6e9daf9b7759ac2e39ba968f18acb6
+ pristine_git_object: f6d8055010dd9a16f8782e543809c37efdddb93d
+ docs/components/shellcallstatus.md:
+ id: be740b54a4e1
+ last_write_checksum: sha1:2e1f280e6569a2f61d6f01da005a305fa028e783
+ pristine_git_object: dad7011f973dd74f1c8861646b144a34e499337e
docs/components/shellservertool.md:
id: 3e196aa5ad05
last_write_checksum: sha1:0019a7a2fb5879826ca7db5b779c3dd8a4fcad68
pristine_git_object: 3441e6b088fa6b063f308ae20f62fdbe3133c461
+ docs/components/shellservertoolconfig.md:
+ id: 5554d6e13211
+ last_write_checksum: sha1:8b3c2f61e69dd323ee68cbcac927fce1e74b5e5a
+ pristine_git_object: ae12ad791cd5fa7a58888f6321be6835d159a849
+ docs/components/shellservertoolengine.md:
+ id: 993a495122a7
+ last_write_checksum: sha1:c8ef15b36c43a587cfc0ceed11e7542bd6515351
+ pristine_git_object: 779361af63de499abb699349e9dc72d151c43f22
+ docs/components/shellservertoolenvironment.md:
+ id: 3f55c90141e0
+ last_write_checksum: sha1:504ab93dbacbd06423aa17f3aa53e729c47a2c32
+ pristine_git_object: fbeb69293a339d7bddc1e7f874b35cecafdcdbfa
+ docs/components/shellservertoolopenrouter.md:
+ id: f7717ab697b1
+ last_write_checksum: sha1:f73e65cb25fd10686349f4a2c15b58eea55ea82f
+ pristine_git_object: 82537f2b5dd34b6a04913a6a5337819cf5e18266
+ docs/components/shellservertoolopenroutertype.md:
+ id: c4d23c750571
+ last_write_checksum: sha1:e6107df8c352862d9ff0991768803cea090ce28d
+ pristine_git_object: 0a67ec31e1f41f5f4c47db26bb174a65cde14bd7
docs/components/shellservertooltype.md:
id: 2086eb6391e0
last_write_checksum: sha1:cd5bcb2096f1315814b3e1575d9b61c65a7a707c
@@ -2332,18 +3902,86 @@ trackedFiles:
id: 063e11fe2d35
last_write_checksum: sha1:c8046f6bc1c8c61e823f49c846fe7ee6af3d0cdc
pristine_git_object: 4b07bd1be51b737783b69c8b3d71725fd4484a25
+ docs/components/sourcecontent.md:
+ id: cd398c147ce2
+ last_write_checksum: sha1:fa4c5eb6413b1b3439019994e24aeb1555b6db0b
+ pristine_git_object: d1c78e0ac7ea698f51c656b0e273878f1e434de1
+ docs/components/sourcetype.md:
+ id: bd6802987652
+ last_write_checksum: sha1:4584a8d072c0977ab588a830991c8c0ebe0fc285
+ pristine_git_object: 7a5e671a65aae56cebe75e622bd37a6187bd74d6
+ docs/components/speechrequest.md:
+ id: c5cba48286f8
+ last_write_checksum: sha1:956140ea1f1ae63bf64fb9ca7e300c836c2c3eaf
+ pristine_git_object: cafc4863b5ddb822f56577f9261d8acc3b23803c
+ docs/components/speechrequestprovider.md:
+ id: ced2f821fced
+ last_write_checksum: sha1:f3f19326a6b4f7f16aca37f5f5ba55892d168156
+ pristine_git_object: faa49852aaf6f4306db44412ef8722a7527e4fb1
+ docs/components/speed.md:
+ id: 90e63e8b808f
+ last_write_checksum: sha1:92580f4a6da348806dba53839ecc2c37e28e887b
+ pristine_git_object: e6a8e43475b211bb297606475c64371eac0ea9ba
+ docs/components/stance.md:
+ id: de29c9dfaf9f
+ last_write_checksum: sha1:dea71169cc0952b4ccc4b6a9dac2b6ab105d55f5
+ pristine_git_object: 99b44b33449f95bc5d476036c9cbd00a29634deb
docs/components/stop.md:
id: 0d74a157c3ba
last_write_checksum: sha1:f1b797e3188274e4411a26f0934c1d455bd85bbb
pristine_git_object: c36d91088664634eb753f5029f6f5b444fa92b78
+ docs/components/stopservertoolswhencondition.md:
+ id: 769cf0cd25f3
+ last_write_checksum: sha1:58c37fc0bdfa1a3c7db9bcea2361caf5c2a5dbf3
+ pristine_git_object: de9322bfef6487670132b126f5fb7ac99729e51e
+ docs/components/stopservertoolswhenfinishreasonis.md:
+ id: 7e749e31ca25
+ last_write_checksum: sha1:be9bacefd9c297b7feb841c18343ce3b2b9fa2f4
+ pristine_git_object: 800d87e74e3ff6da39e6294e7f637cf7505aaaf0
+ docs/components/stopservertoolswhenfinishreasonistype.md:
+ id: dd74a3118de9
+ last_write_checksum: sha1:9c71e6b15c1772de990a026ff99339796a74d941
+ pristine_git_object: dc28f19962ad5ea449165df1164a6057cd44ee96
+ docs/components/stopservertoolswhenhastoolcall.md:
+ id: e41cddb64798
+ last_write_checksum: sha1:b65b8143157a46355cdcfc22e266e74d41cbc8be
+ pristine_git_object: 880c6797f884bea550f85aeae4cdae73eba27a2a
+ docs/components/stopservertoolswhenhastoolcalltype.md:
+ id: 51be701d2bdd
+ last_write_checksum: sha1:0c38bd9e75e755ce69f31b12d58ba27a1831749e
+ pristine_git_object: 2e4e6dd94feb03f060a6c5b90c5b9907ed92506d
+ docs/components/stopservertoolswhenmaxcost.md:
+ id: c15f4ac3297e
+ last_write_checksum: sha1:723b21e1a3216ec0c9a6c11eeda2c837d204dc9f
+ pristine_git_object: 5f1fcd59c181c18f8d210e6f98e40a77fb342dec
+ docs/components/stopservertoolswhenmaxcosttype.md:
+ id: 0e8bac1cf9f4
+ last_write_checksum: sha1:6dcc9c57204343ce2713796b6178aadd8c579375
+ pristine_git_object: ae3b084d1cc40ac1532ff38bb4e1ae3d708684eb
+ docs/components/stopservertoolswhenmaxtokensused.md:
+ id: 917b0e40081a
+ last_write_checksum: sha1:845570febc3bf81b79a9f95644b20f2104a86f14
+ pristine_git_object: 08592938585ef5b4d1c4649c7025675d686ff48c
+ docs/components/stopservertoolswhenmaxtokensusedtype.md:
+ id: d105a1a72d0b
+ last_write_checksum: sha1:5a7bfae491cb5701ba74a81d6f5718fdc7294989
+ pristine_git_object: d123cf300e4ef8618f532297422dd765c414a518
+ docs/components/stopservertoolswhenstepcountis.md:
+ id: f62d9180e95b
+ last_write_checksum: sha1:2108b3ba7ddf3651fa57f5832d3961d0fa71e8bc
+ pristine_git_object: 6a04d819646907264c86bce476e00be165a6936a
+ docs/components/stopservertoolswhenstepcountistype.md:
+ id: dc639252cd87
+ last_write_checksum: sha1:28b4861705aef19b8a99f766614bd9dbdfc9b308
+ pristine_git_object: f42ef66eb75dff242524963317e00ead891c5451
docs/components/storedprompttemplate.md:
id: 3d993ee9614f
last_write_checksum: sha1:71634e702b280adfe115e8bd6a2159c9eab2107a
pristine_git_object: 0b3d0bcfd7082915b45ef9a4a8e74422857dd665
docs/components/streamevents.md:
id: bdfd7bf6c2b0
- last_write_checksum: sha1:96cebd9096c23e86968d5091660332c579f5a865
- pristine_git_object: c41dc50aa360349bb92222a9f608e1438b3b91d4
+ last_write_checksum: sha1:8f15c1a958bc657678852f48a6504c8cc82445a3
+ pristine_git_object: ab79016604959e59d30008817272722fe9c3cec1
docs/components/streameventsresponsecompleted.md:
id: 072f9ee89867
last_write_checksum: sha1:9f33add33825fc28ad93f36c26638728fc66712b
@@ -2392,10 +4030,30 @@ trackedFiles:
id: b2f58ab0ba4b
last_write_checksum: sha1:38b5fc345aff1c89059d223f85b31a717aa29257
pristine_git_object: 4f2e093dd4ace184096b017431053be92051d471
+ docs/components/sttinputaudio.md:
+ id: a5385ca71d31
+ last_write_checksum: sha1:57761225a6dff5c64ce2665b2540217a79ef49fb
+ pristine_git_object: 30f9e955a9f6959e2d5ac10ab5217283d6dbb0f2
+ docs/components/sttrequest.md:
+ id: d8b35448e247
+ last_write_checksum: sha1:1fbc9b9122417ac52db79870ca3cab8f066b867b
+ pristine_git_object: 5cb4441df65c4a469e4189ff72a3c16e0e2b44eb
+ docs/components/sttrequestprovider.md:
+ id: 7d5372214ddc
+ last_write_checksum: sha1:f1b57dfe27aa522bc773139b21382a6a48f8cf59
+ pristine_git_object: 504b7cc5061d8afedfab25c5001611d7bd148619
+ docs/components/sttresponse.md:
+ id: b2b5aa72221b
+ last_write_checksum: sha1:50d1ac0fd4dd2455318ff68b8329d48c5436beb8
+ pristine_git_object: bd49b0c41d764c6854d760cd7a7738e94e6e9df1
+ docs/components/sttusage.md:
+ id: bda939de1537
+ last_write_checksum: sha1:e11351ee3e6d4a0470f28a611080c00e9eed11f0
+ pristine_git_object: 8d8525a4e7947322cbc5b35d82f87d76d7157b24
docs/components/supportedaspectratio.md:
id: 435dd9a15912
- last_write_checksum: sha1:9e8076a9123cf9c4e40e43d3dcbff14b112c64cc
- pristine_git_object: 08be4d09aa458c3a87df3d385179c81607c83d2c
+ last_write_checksum: sha1:25a608572d10d4c76eb9e4f45e16494bea931120
+ pristine_git_object: 3601360f723ac37ac09e4b5fcb22b1198089a0c3
docs/components/supportedframeimage.md:
id: ee9feca3fec2
last_write_checksum: sha1:4ae34fbda72b5e31ea60cbd20b1a970bfca30056
@@ -2406,20 +4064,20 @@ trackedFiles:
pristine_git_object: ffb37fabf1622a890eff20193ffc86677a299f2d
docs/components/supportedsize.md:
id: 8322ab1a4113
- last_write_checksum: sha1:b4c23982056253808e490aa3bccf6e6ae86c29b5
- pristine_git_object: 196402df2e8bf443573d9bd21c69cc8c49fd0316
+ last_write_checksum: sha1:b037d4ca8c8a904d32ce03c73082ef2e55332d0f
+ pristine_git_object: c0f8f57e0192934d7cd0473b66f921b4452c7e27
docs/components/syntax.md:
id: 0cf5ab254bc8
last_write_checksum: sha1:632fc2775ec4066a2b1ee403579ff59bdddb4a91
pristine_git_object: 4b82eb64344981f49f6a8fa220eb817427f4de78
- docs/components/textconfig.md:
- id: 11301a29023b
- last_write_checksum: sha1:62e407146de6b41467b9ec8c630ad8ad8a3f1743
- pristine_git_object: cb4ddd8f20f0302ac0550682d8e75f162c78c0b3
- docs/components/textconfigverbosity.md:
- id: d49483ecf413
- last_write_checksum: sha1:a51ce28b6733aa1b579c3f9dacee605e08086497
- pristine_git_object: 0bdb609ebbb664477effde646423a619b74738b9
+ docs/components/system.md:
+ id: f1ffffdfc6d7
+ last_write_checksum: sha1:1eaeac4ce1ea4ea1be7b7cf0a96273b045208e87
+ pristine_git_object: 2ce86be589fcdc3d210cd50c2373cd59a5e4c503
+ docs/components/taskbudget.md:
+ id: bedfcbf92d70
+ last_write_checksum: sha1:c7add9b6d8e40f8303dc9575c51f21c333ad8883
+ pristine_git_object: 097d7e4af92079998b9d9a1c0f0b0d55e63324e3
docs/components/textdeltaevent.md:
id: 339fe3591c0d
last_write_checksum: sha1:97aed7ba0e23221806738f4ed7819f8aec0db957
@@ -2438,20 +4096,44 @@ trackedFiles:
pristine_git_object: 5c73058b054429983632f0542af4fc0fb50300c5
docs/components/textextendedconfig.md:
id: 669e1815f825
- last_write_checksum: sha1:a64da07e11d1437c3c7453d7a6c8d3f2757a8af6
- pristine_git_object: cdda558b74a056f33dbc0f2cf63a02265087d7db
- docs/components/textextendedconfigverbosity.md:
- id: 355071ba1bcf
- last_write_checksum: sha1:9457b6011994833a86a2223b544d9d7d1b7189b6
- pristine_git_object: bbb9988342a55552bdd3c0985cd9f6aa9a302bdd
+ last_write_checksum: sha1:7751fbe499ffee299268428faa3a3c63a5541796
+ pristine_git_object: b876df7514e8427c7eb7bacd42461924d5b0796f
+ docs/components/thinking.md:
+ id: a93790b9404a
+ last_write_checksum: sha1:6a58a4baca88c3412b6ba1fafa59d32cd10ab9b6
+ pristine_git_object: 2bc38abbe21e1f575fe29747077211f91c9b0330
+ docs/components/thinkingadaptive.md:
+ id: 6576c38e3b02
+ last_write_checksum: sha1:4e5fdf88d78b04721fdc942c70b67b5f52b41f2c
+ pristine_git_object: d6b0d7552450c71e2d0f8a12c4beae592e730574
+ docs/components/thinkingdisabled.md:
+ id: ec30237cdbca
+ last_write_checksum: sha1:73296b3a0ab7efc43f175096d7dafb46eeb96557
+ pristine_git_object: 78f2ea53080eb2bf0cfc292e1539429f6e1451a5
+ docs/components/thinkingenabled.md:
+ id: 28a220a73365
+ last_write_checksum: sha1:784cb7e75b383ed2c288716830d701f2563feba8
+ pristine_git_object: f8c28844eae476d93d80f9bb89812df998fe7988
docs/components/tokenizer.md:
id: f1ad3417d8d1
last_write_checksum: sha1:4223f630f7d880b9288fb654f67817560fb2dbd8
pristine_git_object: 3811d6eda7bcd0aee90a46b9091b729852d23b10
+ docs/components/tooladvisor20260301.md:
+ id: c326f487709c
+ last_write_checksum: sha1:be03e557eee5ff2bbf363444af62e84848d28db8
+ pristine_git_object: 387df6bd3e0fa12bbd9103cb75dc8c4052d1fbac
+ docs/components/toolbash20250124.md:
+ id: 2d02b2cc59b0
+ last_write_checksum: sha1:b997a5d74adaf0799de43bb2e463f618f39a83d4
+ pristine_git_object: 368ae7eb1017d84e7d7c5614acedc43c05eae2a2
docs/components/toolcallstatus.md:
id: a3331842b25f
last_write_checksum: sha1:f1385923978aa4292c9db1baf735295706f4f3a2
pristine_git_object: e3aadb1a488df23daa3344fca333bf3fe7637e4f
+ docs/components/toolchoice.md:
+ id: 0f8673cd3359
+ last_write_checksum: sha1:c0b7546b9f2a2b4dde765c886acf6fa8bf087ed2
+ pristine_git_object: 81c1acf0b116c9fbd7160fcc0bec16e4ff4f0bc9
docs/components/toolchoiceallowed.md:
id: 515dfd66aa38
last_write_checksum: sha1:5729b49ee5f1736fc43e8046c57ebe65479b6cae
@@ -2460,6 +4142,50 @@ trackedFiles:
id: 1609bc274da4
last_write_checksum: sha1:10c591cedf1beea432a9ed7edf540a1fd62f9423
pristine_git_object: 31f2f939e02ed27bdec9cbae6e3b9fd54b0876f6
+ docs/components/toolchoiceany.md:
+ id: 329c45e7c745
+ last_write_checksum: sha1:0c5e06a797fde8289d1853427a97414cb77cfa6c
+ pristine_git_object: 1d97dd327e0378ae7afbd3f2a3f63a94373944f2
+ docs/components/toolchoiceauto.md:
+ id: b0195e996d2d
+ last_write_checksum: sha1:7f423eb8288f1d74b6d5c8529c5827f2d46276ab
+ pristine_git_object: c5329d208bd06ba16d83d6b211f5c77c6c4af1d5
+ docs/components/toolchoicenone.md:
+ id: "609093552207"
+ last_write_checksum: sha1:48f0085a77627460207f8334ac08ab44a9a2674a
+ pristine_git_object: 3d214f4174c3656770e45e6cb65509f75c1ed335
+ docs/components/toolchoicetool.md:
+ id: 4b4670f42f5c
+ last_write_checksum: sha1:a24cffff41c12ea968de471e69c3830d37c33b4b
+ pristine_git_object: add9cee29d2ddbdb99dd6ea55b23bd45fc2a7359
+ docs/components/toolchoicetypeauto.md:
+ id: 77428d02228f
+ last_write_checksum: sha1:afeed4369f26f8d5eac62dfc13766a1c8561d7cd
+ pristine_git_object: 90186a165b861b87eba3a4ff1e1a9815e8836336
+ docs/components/toolcustom.md:
+ id: 5c4157c3303f
+ last_write_checksum: sha1:4d555f784044439e3680bdcea3c95a4ca56f9f12
+ pristine_git_object: ad300a37c159de397c2411245075845155580b23
+ docs/components/tooltexteditor20250124.md:
+ id: 87d4527bdea3
+ last_write_checksum: sha1:711d221372eb8b269a00db38aa39b8eebe8a3b7b
+ pristine_git_object: d32af256dc582c7545bea980275fc7bcf5325e7a
+ docs/components/tooltypecustom.md:
+ id: abeed67b2d9c
+ last_write_checksum: sha1:b31b9b207ca5418d12159dd15f6044310a66f934
+ pristine_git_object: 28fae13674075451b3005cd4110d3962e5acf543
+ docs/components/tooltypeephemeral.md:
+ id: 23f21a98cb49
+ last_write_checksum: sha1:6537f1fa1044b6fc1db76fb295c033eaf93509ec
+ pristine_git_object: 29a7af8f74b5116ab601ec1a1d962fd0df4bb53c
+ docs/components/toolwebsearch20250305.md:
+ id: d17a76b3778f
+ last_write_checksum: sha1:aec669a083c731392638f96d2ec1e6fe713a4a2b
+ pristine_git_object: 7235ad0a64e64abed4a46b445b8fc439a4fe146e
+ docs/components/toolwebsearch20260209.md:
+ id: 8c37573043e7
+ last_write_checksum: sha1:d5a0312ccaaeae431e94f1e1dedad4ffbec938eb
+ pristine_git_object: 709358efecf567ac1ea63d19f5e04cdd0ff893e3
docs/components/toomanyrequestsresponseerrordata.md:
id: f23681a41b53
last_write_checksum: sha1:e5b3d8c0bced377d2da5cd4826d4fab9e45df3ec
@@ -2472,6 +4198,14 @@ trackedFiles:
id: 639fd1f6f967
last_write_checksum: sha1:560d3f57a9f103eee587ab1f260548161658675f
pristine_git_object: 95932dccc7672845937b71347c587b6910b3a68b
+ docs/components/trigger.md:
+ id: 026137ae5dbc
+ last_write_checksum: sha1:d5b5ea6e1cc4672c0c3f5ee7be0f496a465f3c6e
+ pristine_git_object: 01ff8134eea326b88d94714f12f1f53ac88281ad
+ docs/components/triggerinputtokens.md:
+ id: d923daf78fe4
+ last_write_checksum: sha1:482b299cf9750de13143bc0d53544ccdf9bf0920
+ pristine_git_object: d8c29f1015c9da62c444e68582fc8e0fd72e69a7
docs/components/truncation.md:
id: d7a54b499339
last_write_checksum: sha1:3e9994693b154d14afe2e6cf5382ea956dd92c2e
@@ -2480,6 +4214,30 @@ trackedFiles:
id: e97521853030
last_write_checksum: sha1:bbb845cc877102b35f5a5f8bd974a5fbda8358ee
pristine_git_object: 6eaadffee54251674359022b19b8e7ab020a8a3d
+ docs/components/typeadaptive.md:
+ id: 415c776df244
+ last_write_checksum: sha1:e4d1e4450c22724c3661a14d5b66774ee78e0382
+ pristine_git_object: 6103c75608da665a8d3c2408528847d21229f246
+ docs/components/typeadvisor20260301.md:
+ id: ffd939ffb0b6
+ last_write_checksum: sha1:698eec2380c468672bf776f6d606c3a52832b079
+ pristine_git_object: 32f33c6aa08f6be52970536b59bd225d5a4d8950
+ docs/components/typeany.md:
+ id: fd248b591992
+ last_write_checksum: sha1:e40950c40b38ba6f4f81b56cf3b98ac9466cf6ea
+ pristine_git_object: 459a918b93d9d44647f77836951f555ece286883
+ docs/components/typebash20250124.md:
+ id: 91dff659ac27
+ last_write_checksum: sha1:9bc2ecc5f2d5eb7a0088484ce80e2ce8806b6ab3
+ pristine_git_object: fa531097d7e1e2497c4eeb5c47d6811ac5ba1b00
+ docs/components/typeclearthinking20251015.md:
+ id: ef48de5e490c
+ last_write_checksum: sha1:7ab65dd273eb4b0ac10842b5a64fd8377c1a856a
+ pristine_git_object: f5c79c944359459d0942765f3621641a28aa00b6
+ docs/components/typecleartooluses20250919.md:
+ id: 182fff5b5397
+ last_write_checksum: sha1:542821bc2faa4046a792684ada71bc82226a93af
+ pristine_git_object: 875d6f2b1976376534d27e290ff01b536e958cca
docs/components/typecodeinterpreter.md:
id: a0ddc54bdcdc
last_write_checksum: sha1:0ce1975a7bfeeb5bd2499dfd265528be8481351d
@@ -2488,10 +4246,30 @@ trackedFiles:
id: 0753f817b4ec
last_write_checksum: sha1:1f256664635f1a8ea45367cdd40d5e4f92a46418
pristine_git_object: bc24fd4a7a4e7c6af170ee257707568d465a3833
- docs/components/typecustom.md:
- id: 7346206117ce
- last_write_checksum: sha1:85677cff1322ca22fde8effb6d9e1f24351b12b8
- pristine_git_object: 798b1c511c91925b3d92a5dce1cce33b236b0754
+ docs/components/typecompact20260112.md:
+ id: 92d18a8b1a30
+ last_write_checksum: sha1:da9568595613708e28728578ded7f90ff2c4a0aa
+ pristine_git_object: 94f469437cbc98cc3260a44c2c021052ad56910c
+ docs/components/typedisabled.md:
+ id: 89ec4d0fd6e6
+ last_write_checksum: sha1:3b077a12247487c47132ea576c581e7a495951bd
+ pristine_git_object: 769369775df8f0c985322e7c9c7ff322337c2262
+ docs/components/typedocument.md:
+ id: 945438b35b55
+ last_write_checksum: sha1:78e673159ab6d4f5699bc6a4591f70e2779686f6
+ pristine_git_object: c53b6cd016af5118f66afe5c2dd4a014f3afccb8
+ docs/components/typeenabled.md:
+ id: c2d08c3615d8
+ last_write_checksum: sha1:a2b02bbe0b013ba7f62963deffaa63ef0863807a
+ pristine_git_object: d3cda22bc8b31d5742d4d064d2ee898283d41d3c
+ docs/components/typeexec.md:
+ id: 9332f4c34355
+ last_write_checksum: sha1:81d4fc42cffcaec7c2e18fc66f0e1dd5a91e8c0b
+ pristine_git_object: 4ff9323d12cc4a955ea055d422197294cacb66c2
+ docs/components/typeexit.md:
+ id: e6da6ba8165a
+ last_write_checksum: sha1:597b0df8a353af666d26de06addbfb1ef77b40e1
+ pristine_git_object: e3d9e438353136453e5792dd7a71f54f86e06323
docs/components/typefilesearch.md:
id: 75b395ec49b7
last_write_checksum: sha1:80dc01b6e9862ce234d31d6b571ff6b61ab2db2a
@@ -2500,42 +4278,126 @@ trackedFiles:
id: 1ad664e7de56
last_write_checksum: sha1:10a3f3d7d83ea85fd1e8bb6cd4bb442ddc548e29
pristine_git_object: 14fa7857b732f987fce03ce6672ef11cec4f06da
- docs/components/typeimage.md:
- id: 37235a183141
- last_write_checksum: sha1:fbb633d58e1be270989c46bc5961f361772e1f8c
- pristine_git_object: 1aa3dd7e7f1964bef22d3851ac42f5b480544e2e
+ docs/components/typelocalshellcall.md:
+ id: c01a4da422b7
+ last_write_checksum: sha1:93cf3f4729dd2013bed102155df230927b46ea62
+ pristine_git_object: 248bd685cf8ee49668fd66f214dd790fa355af19
docs/components/typelogs.md:
id: 2db9d386c665
last_write_checksum: sha1:bef7fb6f13f0e7078fa25821b7d5787733569a52
pristine_git_object: fda0dd30852f4d091b1e8d62590ed83bc1839e27
+ docs/components/typenone.md:
+ id: f5c65d139cc1
+ last_write_checksum: sha1:e7e2f691060a401594c6b6827f5097e36226198a
+ pristine_git_object: 65af7247aa09fc9ef7deb0f3d88cb5cf0f27a93b
docs/components/typeopenpage.md:
id: 3e349476bb3c
last_write_checksum: sha1:795aceda2ea4559886aa768e536a738a42f49cc7
pristine_git_object: 37b24080fbf349299ebecd8f7ee42a62c5c84de6
- docs/components/typesearch.md:
- id: 61c60e55211d
- last_write_checksum: sha1:390cbcc7add489ce06a860d4116ed721a98b4121
- pristine_git_object: bfea226955f7aae698b7841853c0f57719b7a69b
+ docs/components/typeredactedthinking.md:
+ id: 66da1f8a99f0
+ last_write_checksum: sha1:acb0130a119170e4f4433de545b5b7f62edc9906
+ pristine_git_object: bcd0eccc17d3fc0720f95d041c1bbe1f9e97bba9
+ docs/components/typeservertooluse.md:
+ id: 39a145bfa9c0
+ last_write_checksum: sha1:a063583667dc896c09ad7a4a409a55ab30e06f39
+ pristine_git_object: e44e231f3d6a6e7ef575f446ce3128b55b309b50
+ docs/components/typetexteditor20250124.md:
+ id: 0c9ccc78eae8
+ last_write_checksum: sha1:6cb62ec0d396f6414fbc1d53be2a3d1b7297032d
+ pristine_git_object: 40faa5bd85ef933c9aabb75c0cf83fcc48487d01
+ docs/components/typethinking.md:
+ id: 7d284aad692f
+ last_write_checksum: sha1:16c9e397b9cb3d4fe3d7a76a8d6f0a68b3d69b66
+ pristine_git_object: 4e3ebaa8ba503a56182e514efda0544b99375522
+ docs/components/typetimeout.md:
+ id: 5db9cd9d485b
+ last_write_checksum: sha1:04a185b298997a51d771bbc2adc017e22876eacb
+ pristine_git_object: 2690019f056788b51a8ab206e70a11b4181113ff
+ docs/components/typetokens.md:
+ id: 6bf6e7a52300
+ last_write_checksum: sha1:e4e01d19bc76ff6c141be19dafb8fc8604cf1e04
+ pristine_git_object: c8349b0862f0547272bf328b316ad77390eccfc2
+ docs/components/typetool.md:
+ id: 552d9661651a
+ last_write_checksum: sha1:b70fc049771f74855f88ca30a01ac8324a5f516b
+ pristine_git_object: 0a511f95f8523ee79f13cd6a943a04099eb6b59c
+ docs/components/typetoolreference.md:
+ id: 1a0a545b1ed5
+ last_write_checksum: sha1:2209200b2a8aea60a1ffadea024ef7d5b9804ed1
+ pristine_git_object: 598202dc2075a5eea769929213e5995ccb663472
+ docs/components/typetoolresult.md:
+ id: 51cc4a5bc7e7
+ last_write_checksum: sha1:ce85158b3f5966cd01dc25a2e6fecd4cf49e3b5d
+ pristine_git_object: 111cb61d65b8bd4ce815f9b24b1d715d1ba31195
+ docs/components/typetooluse.md:
+ id: 92ea28c0ab2d
+ last_write_checksum: sha1:7b7355f56691372080eaf2fa90e39dbdbb1dbcc0
+ pristine_git_object: 6d60b12d2c31f3bed496904947bf2c392ce16314
+ docs/components/typewebsearch20250305.md:
+ id: cd28bbf34d94
+ last_write_checksum: sha1:caaccf4519225800895cf2ba54d76cf16d8f1201
+ pristine_git_object: 25066f5c8e75a1bb7b7b547e14821373e47d22e9
+ docs/components/typewebsearch20260209.md:
+ id: e41c600ae535
+ last_write_checksum: sha1:610fa0656c1b9536ec0b0078af995aa30b0efabc
+ pristine_git_object: a9713155317f6f816c98df3f8f38dcca62a3ddea
docs/components/typewebsearchcall.md:
id: d4647ca78da9
last_write_checksum: sha1:0abbaba9c6c9a3722f755516331a80d5a1e7aac6
pristine_git_object: f0a4b732e87cc1880ca26a5c8981552488ebaeeb
+ docs/components/typewebsearchtoolresult.md:
+ id: f75b0d386cfd
+ last_write_checksum: sha1:12aea02e87d46a2d8c58416efa6a8117c586e3b6
+ pristine_git_object: 1fac4a2b15c8e3fa13e1a8c7ab3adeb11b9cdebc
+ docs/components/typewebsearchtoolresulterror.md:
+ id: 1b0e21594b13
+ last_write_checksum: sha1:744a99475bea73bedefd3960f4afe9e85a72ff7c
+ pristine_git_object: 104a793b64aacf93fbe0cdd341be8642bc5979ef
docs/components/unauthorizedresponseerrordata.md:
id: 79b657be05c4
last_write_checksum: sha1:69e58ae8931fc723bbb4aa1212e50b97a83db709
pristine_git_object: 1db2a3a9378d0eeb5de39f1d6621e69bbb7e0953
+ docs/components/uniqueinsight.md:
+ id: 8f721a7538ef
+ last_write_checksum: sha1:d1955a3237b8047e074df6a6cf0e158beeac10c0
+ pristine_git_object: 3395cb6ae241647ad498206ba1672bc3e4a1f7fc
docs/components/unprocessableentityresponseerrordata.md:
id: 6a36f0c9d959
last_write_checksum: sha1:b7adc7ae81b79cb1436c8f85b45283fe52320d81
pristine_git_object: 9ccd3c05cd75915c70aa542bb16e2a8f77bb91cd
+ docs/components/updatebyokkeyrequest.md:
+ id: becd5448c41c
+ last_write_checksum: sha1:dad56bab9cafa3ab09b991405b99890dd8ed311e
+ pristine_git_object: 3ba251530ef4197679144f0450533cfae53896fb
+ docs/components/updatebyokkeyresponse.md:
+ id: 9c195fcdf7c8
+ last_write_checksum: sha1:c1400c74ef85a28d1518dfb7e4155b207f4ccafe
+ pristine_git_object: 72b248c783a837f608d0f26e3f5131ec8ef656cd
docs/components/updateguardrailrequest.md:
id: 5a0fb143eaab
- last_write_checksum: sha1:76435a23043cc77dfcfd7aab0be4cfbc6de6a7e5
- pristine_git_object: 36829dd7af525b1289daa3a84c583689dc5ae125
+ last_write_checksum: sha1:7e86cb67d68d86de79ed2a09e5bfa9bade67a524
+ pristine_git_object: 8a5ae8e2eee5af62d829b80dc312e799efea2e5a
docs/components/updateguardrailresponse.md:
id: 311d3e7a185a
- last_write_checksum: sha1:240e2fc38ee1954caf6afb473cd9d85030b28285
- pristine_git_object: d88f7735cfa90be90763bbcfc7cbf1b8e12d7cf4
+ last_write_checksum: sha1:03a1e96329ab0131421009b3998829ca0ff4d8da
+ pristine_git_object: 338512bc5662726c1f9ff37ce027766df603e4ef
+ docs/components/updateobservabilitydestinationrequest.md:
+ id: 09fc92bba8dc
+ last_write_checksum: sha1:bb43e703f91c5eef0a65bbc0c9db3355f0211097
+ pristine_git_object: 0112efe4cb80ff21b24f2dcdd2f9cecfdee15fa5
+ docs/components/updateobservabilitydestinationresponse.md:
+ id: 7551cf74a0b6
+ last_write_checksum: sha1:aa6b4016d0db43f9f7c8e1b8e984c3349338eb0b
+ pristine_git_object: 6b3b9ab84b3cc98d6648bfbaf48399311ae68a70
+ docs/components/updateworkspacerequest.md:
+ id: 0fa61bf22fc1
+ last_write_checksum: sha1:75b0020fcacd32f5d0a5c286f6aacf5e16629222
+ pristine_git_object: 1a32c6cc0ac510fa2bd47a81360731a10e8e46c5
+ docs/components/updateworkspaceresponse.md:
+ id: c8e4b8fbf004
+ last_write_checksum: sha1:4e63930baddcd5f65ac3d196921b1a45447a4fd4
+ pristine_git_object: 186cd5625964da06544c8e8c64f2b42d14e4c85b
docs/components/urlcitation.md:
id: 02c4f88e5f51
last_write_checksum: sha1:5d5a717a552b86279bfe20c6125cb0561d2052dd
@@ -2546,24 +4408,36 @@ trackedFiles:
pristine_git_object: 2b6e38f54f447f8fc794d3c35c1a0bc690cc4d2e
docs/components/usage.md:
id: 15e3eea02540
- last_write_checksum: sha1:f012bc7dd75b18e1aeea794c46f3ea666911d339
- pristine_git_object: a7798add67edd29c8712284fb383a59183932157
- docs/components/value1.md:
- id: a13f75759dc0
- last_write_checksum: sha1:0c7d94ae129961ad32dbc85fdc0958596316939b
- pristine_git_object: a969ac11475c494d073feee546068913aff31a6f
- docs/components/value2.md:
- id: cb39f5b8da43
- last_write_checksum: sha1:b0b00e40babaaed031459e229396c37300e60d92
- pristine_git_object: a281d051c89234ebb83ea44f01c2f6d3e36c2894
+ last_write_checksum: sha1:2f9b8740c46b8e1a69dc9ad0b891352ded5e70e2
+ pristine_git_object: 76a1d443818ff4471133dff00127bfed468f3eea
+ docs/components/usagecostdetails.md:
+ id: eca6fb6e3ba5
+ last_write_checksum: sha1:368d21231a591747d2340e023b6983c195da4aa8
+ pristine_git_object: df2c8ace4895ed1a54e919643d4cd3c9187b3d59
+ docs/components/userlocation.md:
+ id: 29641029acf6
+ last_write_checksum: sha1:e2295be925d9064a6125f5ba48a692a345ccd247
+ pristine_git_object: e06fd727345b790473b48236b9248418cbf3ca79
docs/components/variables.md:
id: ad5d1b284346
last_write_checksum: sha1:30ebb41e8bac9a8d817b2c0ab0a9e9fded4a73ee
pristine_git_object: 0698d06289a06a6cfcd35f7069f2ef64a0aa0e25
+ docs/components/verbosity.md:
+ id: 0a9da5ac382d
+ last_write_checksum: sha1:76ec453c1e767ce0f8c76afc0617cdc7ff29b60c
+ pristine_git_object: cf10c9e56352e1ef074e794b915639774a0de872
+ docs/components/version.md:
+ id: 7507f00a20fb
+ last_write_checksum: sha1:64a942b733da255793b182b90030ef9514db6e27
+ pristine_git_object: f76abbca9198ac1083a5983ac69dcfc9a87561b1
docs/components/videogenerationrequest.md:
id: cacead3ac9fe
- last_write_checksum: sha1:e9f69f5b244d468fbf3ecdd1872671fca4b4fc9b
- pristine_git_object: 437ac8fd1a297aebc6dd9369947b80d85530cb92
+ last_write_checksum: sha1:c87d8d7a7ce900738b6a536f863a34cf36854506
+ pristine_git_object: 3a2a2df8edd75d87dade8b35c075759ff91a5415
+ docs/components/videogenerationrequestprovider.md:
+ id: e2a64e74f555
+ last_write_checksum: sha1:e27ed0509f52bc14e831d19fe4205ed37f5f65a8
+ pristine_git_object: 28a704024a917c0aaff8c53f2a8c9e20c7ee52b4
docs/components/videogenerationresponse.md:
id: adbbd66af4bd
last_write_checksum: sha1:52c73fc2047792e3194f316e3182a96f8c7b85f2
@@ -2584,6 +4458,34 @@ trackedFiles:
id: 6a46f08aab47
last_write_checksum: sha1:63812cb97f0ba13e4e9e0e524fb82edccecca061
pristine_git_object: 45a68af199ccff5747b446511dd9fc1c550a4d34
+ docs/components/videourl.md:
+ id: 8e3963a8a140
+ last_write_checksum: sha1:0417712247858caa6c2f97a88af261c1df28e492
+ pristine_git_object: 5bd5dec60112a90b0446b741a0605c8f86810e4b
+ docs/components/webfetchengineenum.md:
+ id: 7e88b8695736
+ last_write_checksum: sha1:72e9ed36b036c9941a4c794792a0c178612b9e68
+ pristine_git_object: 3b14fb1be02252d483c5a5aabd9b3925c97acc49
+ docs/components/webfetchplugin.md:
+ id: 6db78951ca01
+ last_write_checksum: sha1:c87f9026861d2440d6fc26fa43683faf6589321b
+ pristine_git_object: d14046ff7191801dc0baf1644825501ea7b341cf
+ docs/components/webfetchpluginid.md:
+ id: 3471fca5a6e4
+ last_write_checksum: sha1:fbf3474fe1f77e30179bc491c2a6a232f450dad9
+ pristine_git_object: ca2c54ce2cc82f23b39fc813496fd8e227f32d07
+ docs/components/webfetchservertool.md:
+ id: 16f65007e382
+ last_write_checksum: sha1:377497147ada29f671b0713981227fb8e1dbf7db
+ pristine_git_object: 2152aba006b34b1d758e75cba8cf141d7af54223
+ docs/components/webfetchservertoolconfig.md:
+ id: 96f1a4842e80
+ last_write_checksum: sha1:f6af2cfd146b482617e9f1f2c2744cd51f3eee49
+ pristine_git_object: ef5c85c64b9e12c17694978820702418d272aa76
+ docs/components/webfetchservertooltype.md:
+ id: 23175d499624
+ last_write_checksum: sha1:7072da0ec7dac5426abd235fea4347695ab176ee
+ pristine_git_object: ea6c00679c7118ddcb43185fc5f34ee01c148be2
docs/components/websearchcallcompletedevent.md:
id: 8c338a61bc9d
last_write_checksum: sha1:b46bf9e0c87df24c83fba70f4a0ca91648680c22
@@ -2610,8 +4512,8 @@ trackedFiles:
pristine_git_object: f1771d0b194da9cadcbe7176c43059189745af44
docs/components/websearchconfig.md:
id: 3fcee95e24a6
- last_write_checksum: sha1:f5edbfa631a4a020b7e4d2c4e2abb5e7081681d7
- pristine_git_object: e619e700a585c8daefaba731cb926733cb917f91
+ last_write_checksum: sha1:a97ac8c61fbb719c987f84abbd4acc20180ccc75
+ pristine_git_object: 24d2e61af8e697249dd222ce823773024e577dd8
docs/components/websearchdomainfilter.md:
id: 47d067b8286d
last_write_checksum: sha1:bc0207fdf5478614ee90906ce70c42e57506378d
@@ -2622,24 +4524,32 @@ trackedFiles:
pristine_git_object: c0da50524ffa09ff15d26306df1bb1e9f7346998
docs/components/websearchengineenum.md:
id: c7543e4c8464
- last_write_checksum: sha1:2b93ee9ff56e1cb22740737354d2fff1b23b51c4
- pristine_git_object: 915b4ef64620b4cbf4ef4595cd1780a414bbfac1
+ last_write_checksum: sha1:c5fa6ad3f597c1696c68e19536922db63df4a819
+ pristine_git_object: df79f646589aca3ce23214862d78c3c105811bc0
docs/components/websearchplugin.md:
id: d6baf3aa0a96
- last_write_checksum: sha1:13cae4374787097735b6896cefeea505ef33824b
- pristine_git_object: 5a49814a65bddea31eafaa3bacfe5ed7d0444d2e
+ last_write_checksum: sha1:cc37dce50cf180ddb4d6ece96993600f0d73eff2
+ pristine_git_object: 9f5b99bc633585ffa43baea8a53d371b05261a1c
docs/components/websearchpluginid.md:
id: 0b025727cb2e
last_write_checksum: sha1:b8da5b1cb0bcc0e2e067e6d09f5e2b51a77d0592
pristine_git_object: b0913dcfee22f1204335350b9b9bca75db27c821
+ docs/components/websearchplugintype.md:
+ id: 027b51292738
+ last_write_checksum: sha1:4a13256166d1e2f00901f55e8500e66686730b07
+ pristine_git_object: a64310784046570184cdec6d848897351c112b30
docs/components/websearchservertool.md:
id: 92cff6162ede
last_write_checksum: sha1:860b4c1b13b6be3ffbd2ff99f20e7055a0ac2098
pristine_git_object: 8ad43c178a611051aabb65b30222a2e901004d9f
+ docs/components/websearchservertoolconfig.md:
+ id: 03a09e9ae532
+ last_write_checksum: sha1:447a828f922aaf71b6f28bdd341f6c6c8566a841
+ pristine_git_object: 8b0ac6c73051263887dae73ea83635466e4480a8
docs/components/websearchservertoolopenrouter.md:
id: 34b36452e3b3
- last_write_checksum: sha1:0600f96fa45dbc72b36e1cb67c35e30583650f97
- pristine_git_object: ed81b6598a5d13d51f235e7017bf1c563f9ebb43
+ last_write_checksum: sha1:c3676ba15e24d124c35c69ed20af393f10bc111e
+ pristine_git_object: 94a42fd05fbbd0453d936b9ac4b52f97c8ff0d95
docs/components/websearchservertoolopenroutertype.md:
id: 709a7a44c3c9
last_write_checksum: sha1:a2b894302d879e185fdad29ab6911c7a9b72f6ca
@@ -2666,8 +4576,8 @@ trackedFiles:
pristine_git_object: 678c7653c10d98a575a20208d824170418a1950f
docs/components/websearchuserlocationservertool.md:
id: 10b54200c690
- last_write_checksum: sha1:270139f080f581acc09cfc726f3144e3e457d9ab
- pristine_git_object: 9e77679591ae44e647b1fcc515d0905744b488f4
+ last_write_checksum: sha1:e2121866212d004cb58952bcfe2fc71c1d51245d
+ pristine_git_object: b5fe52e94455874fca43426e9802363658284874
docs/components/websearchuserlocationservertooltype.md:
id: 9418ba6655a0
last_write_checksum: sha1:195a53255f2c1f20a1dd978730b9b772c7f2d987
@@ -2676,66 +4586,78 @@ trackedFiles:
id: ac432a0db67a
last_write_checksum: sha1:6b322242229459f409a83243db53ff8069fe1a3f
pristine_git_object: 8213d86aa4dea092924605829dce95a1f31b0897
+ docs/components/workspace.md:
+ id: 0a15ff43e01c
+ last_write_checksum: sha1:a44aaefdf977be3defda943f7a0a6b78726a2e10
+ pristine_git_object: fc03d550582e7ac86ba51c17bcb5568961b7e631
+ docs/components/workspacemember.md:
+ id: 250baf73019f
+ last_write_checksum: sha1:d0079b9edc10857c5d2fd55b8122851e235dec21
+ pristine_git_object: 31e122462373cfbb603a4e35d88810743e9e585b
+ docs/components/workspacememberrole.md:
+ id: b6a965f120c4
+ last_write_checksum: sha1:3315f44ee8ccfccabfcf89f32cb7d585864593be
+ pristine_git_object: 00592d06a5c490ccce759f0b259f756f3f11c104
docs/errors/badgatewayresponseerror.md:
id: 32126b40d635
- last_write_checksum: sha1:86b3a24f2523bb4df0972bf2fca93dceb7a190a2
- pristine_git_object: 54c51b9dd9ed8dc98dd52c0e68ef5554677197f0
+ last_write_checksum: sha1:223852bbefa4599b01ff0e8e716cb7216231c99e
+ pristine_git_object: 5bd359e8668e33d05ec94cdde74c51206a047dc7
docs/errors/badrequestresponseerror.md:
id: 557cbbed2def
- last_write_checksum: sha1:91d337751953ebee60ebc85946706aad64aae951
- pristine_git_object: b7ca5ac0173bdb6d535d9aa86bf582f05ea7ca65
+ last_write_checksum: sha1:9ebfd0bd854fb3be7bbc9cbc6a49869f874caa75
+ pristine_git_object: 6bb5d84d7ebcf391108ed791db32bebf16e37d2e
docs/errors/conflictresponseerror.md:
id: a6291cc4fcfb
- last_write_checksum: sha1:3dd3b7bad49f0f6648791dbd3a9609820eed4a71
- pristine_git_object: b3da3b7a122ddeda00203e6f0245673bafc70e98
+ last_write_checksum: sha1:7f65dd130bb9a265070827fd2cbccd34faaef440
+ pristine_git_object: cebaddbb10025814671f5f33b8dcdcedc19b5acf
docs/errors/edgenetworktimeoutresponseerror.md:
id: 2e06bbd77e57
- last_write_checksum: sha1:21452cb7aababb75432da12ab9f73a4c446f6203
- pristine_git_object: b12eb0627b703ad6a81397d3d2fecd33c795613b
+ last_write_checksum: sha1:5dac0d2c35bc6f172cf34f89be8c8bb50311a722
+ pristine_git_object: 3720bcc7c6d7b8e30fb81336aee6e56efc202d55
docs/errors/forbiddenresponseerror.md:
id: 7decb227f487
- last_write_checksum: sha1:283f0f2a777f118448acd3bed2b98a879a8175a7
- pristine_git_object: 290d3a4196ed994d4c8637490aa1449fbe624724
+ last_write_checksum: sha1:1ed86d541b2413d207f720c6723cb12231ef9904
+ pristine_git_object: 8015439adc3dbb0fa36b2f2d470d518e10d538a3
docs/errors/internalserverresponseerror.md:
id: 7e8ff7f684b2
- last_write_checksum: sha1:7286bd98d0952f44d807965c284796fa8b271be4
- pristine_git_object: b625175afeab822bd2c84b7430bf711656813419
+ last_write_checksum: sha1:d2dba8365a2592a3c5b2053e6df9aba954f6ab5c
+ pristine_git_object: 5db18a9b30b04f9e85e989cf93af56f0c13205ce
docs/errors/notfoundresponseerror.md:
id: 24546e4ae2b1
- last_write_checksum: sha1:d7a17885213efd454b691f6ee5b899cd0ba692f2
- pristine_git_object: 80d0191686bee32f48f5df345b1bbf39b13e5fea
+ last_write_checksum: sha1:3489bbfc7d8524f7bc00416d368d08c88cb693b1
+ pristine_git_object: 3f377475b54b415589c2f495c6c46dd424d111c6
docs/errors/payloadtoolargeresponseerror.md:
id: 11b7364bb388
- last_write_checksum: sha1:fa2630842cf4627459da16d1aa3e1994a0f93cc0
- pristine_git_object: 322cefe3a38f280ea4b9b77ca68d17b7b063d277
+ last_write_checksum: sha1:49e52c253b21fafc9c7ed83b392b601a2db2e9d3
+ pristine_git_object: 5027338f1f76f8eec7e121e3f89a907c0fec1764
docs/errors/paymentrequiredresponseerror.md:
id: 1df8bf21f2ec
- last_write_checksum: sha1:25494fb9511e5c0771065e7227db40c1c532675d
- pristine_git_object: 1cf4c3f8a8ac361d2ba94b2abdde72ae9e73103e
+ last_write_checksum: sha1:438c021020ba04a6c6356a49b10101f4948290da
+ pristine_git_object: 974318969fccd04206b3dfe1e45d9300e11df85e
docs/errors/provideroverloadedresponseerror.md:
id: bae15be73247
- last_write_checksum: sha1:9384bc2db38813760ea96dcf8d741e734297ddc0
- pristine_git_object: 9eff488317ce9c348cef09d3398581fa58812171
+ last_write_checksum: sha1:c58d85a79ac15626d09d2f13ca2596f4d804fa9a
+ pristine_git_object: 7a2e57818215a8202cc331c9e4ea718996fc334c
docs/errors/requesttimeoutresponseerror.md:
id: 8d026980f8a1
- last_write_checksum: sha1:8ed616de74c14b661f415c8cc2ba06f193d04fff
- pristine_git_object: 4f5d8f7c964859bce730da7ea3a85a71447d42f1
+ last_write_checksum: sha1:3447ecfc92466e9de0e2265e0d084ba9b3edf662
+ pristine_git_object: 4029799436c103d71c9d121762666b0c36f8e77a
docs/errors/serviceunavailableresponseerror.md:
id: 4673e5ccf763
- last_write_checksum: sha1:71084f978900f2f69880d767af428f1de2e51af2
- pristine_git_object: ecd703aef5447801f014a4e9479120af82877292
+ last_write_checksum: sha1:5b4c28adfc9b5f12aad217a77536ce413c72ec0f
+ pristine_git_object: ac2fed91a62ad9e15c353bc71a90822ddfff2e65
docs/errors/toomanyrequestsresponseerror.md:
id: be0bd7d3b18d
- last_write_checksum: sha1:51af9ddc560868b3766719af9a5d8eaf24eb051a
- pristine_git_object: d03ed75e3fb9e8211a25051459708ce03dc69bde
+ last_write_checksum: sha1:d645a93709eee394d9e70ee740c4feeab9aaf450
+ pristine_git_object: 294f69579f46ea917d03236b5c6123c3681819cc
docs/errors/unauthorizedresponseerror.md:
id: 500194829c27
- last_write_checksum: sha1:2d29af324a37fceabd072b787efae825dfe83cf2
- pristine_git_object: 7dd77440386a5708344749797bb608c79623830b
+ last_write_checksum: sha1:17503cd8d5eeec97b9d674b9a2bdcace9902e5a3
+ pristine_git_object: 50d78da46455cb36f7dd14165dea80e77e542717
docs/errors/unprocessableentityresponseerror.md:
id: cc0e37e6516e
- last_write_checksum: sha1:3f387fa8558b528884f8d7f61cbc576bb32924b9
- pristine_git_object: 33f001c56da91058dbab85aac79a77c48ddc869b
+ last_write_checksum: sha1:dfef75a5f9094b0d9bfab11d7ccfb2bbf371bbb2
+ pristine_git_object: 77b55729e28c297a11737222fea74063314f5cee
docs/models/internal/globals.md:
id: 9c173b87f41f
last_write_checksum: sha1:eb08bb4e1e88b4fd1740cd6737a7f5752a101c85
@@ -2744,10 +4666,14 @@ trackedFiles:
id: 4343ac43161c
last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d
pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf
- docs/operations/apitype.md:
- id: e271bff20dc7
- last_write_checksum: sha1:589d9ed0a91014cf2b66f83a118259aafb78983f
- pristine_git_object: ffff0b9ea5cb410b51798b848ccf40a763edc216
+ docs/operations/bulkaddworkspacemembersglobals.md:
+ id: 6cff183f93a1
+ last_write_checksum: sha1:39941ebc9a51b0189aed03680e2168e25b7c9692
+ pristine_git_object: f4a5325dcf71a943b6b1d01679587f2b0b291fd3
+ docs/operations/bulkaddworkspacemembersrequest.md:
+ id: d8246fdf3e0b
+ last_write_checksum: sha1:156694bd17ba999b2ce0886da7153e7d349beea7
+ pristine_git_object: df933fdfe35d136462f083cd40afb3d997171024
docs/operations/bulkassignkeystoguardrailglobals.md:
id: 10cab63c9a95
last_write_checksum: sha1:5c7983931ef784a72f7dfec732eb7809d352c313
@@ -2764,6 +4690,14 @@ trackedFiles:
id: 6d6c7e9ae12f
last_write_checksum: sha1:8aa5702d46c01c87db1df7624b5125ee9bbc8edc
pristine_git_object: f15474f24f02a38716f8c83f74a501a3dadef26a
+ docs/operations/bulkremoveworkspacemembersglobals.md:
+ id: eca056a05e51
+ last_write_checksum: sha1:eb2295ca61d2b6f430119c3e42a3cda4958b2fea
+ pristine_git_object: e2a1edc52f0035b6d0f55403fc5ead2e351f2499
+ docs/operations/bulkremoveworkspacemembersrequest.md:
+ id: ac8eba8ae2ab
+ last_write_checksum: sha1:ca7f3d49baa41f7996bff82eb7a6cae01fb3275b
+ pristine_git_object: ee134f45349379dd00569354b8aaa2a6d1aed373
docs/operations/bulkunassignkeysfromguardrailglobals.md:
id: "491635767122"
last_write_checksum: sha1:06e7a6b0f052e73e5cacd480e3bff8ab7756d0b0
@@ -2780,14 +4714,10 @@ trackedFiles:
id: 682c7ea4ed8e
last_write_checksum: sha1:964acf8bb04f507c264602c68c77cc1d59c268d5
pristine_git_object: 31832c55a3f01279e7609124fe1b02e640f6af51
- docs/operations/category.md:
- id: 694f17d9e80d
- last_write_checksum: sha1:6437eb7bd8c0df1767aee6a6522c5a67fdfaddcd
- pristine_git_object: f0fa9d7be281df813c938123cf7a67213c98e9b7
docs/operations/content.md:
id: 33ab0eb04a0b
- last_write_checksum: sha1:5a1a468675c152ae46d98cc4d68f26163a36bfa3
- pristine_git_object: 727997fcf2c2d7ecd0576adcd3fafc945c90ad61
+ last_write_checksum: sha1:c4d2c8081f9275dae2e19c1d5ce3074325a4d5e4
+ pristine_git_object: 22aef15930d1f88538534310e6304c0aae726531
docs/operations/contentimageurl.md:
id: 8e6b0dcac568
last_write_checksum: sha1:0a8701c28d0de7adef8ac51053bc5f701a26aca5
@@ -2796,6 +4726,22 @@ trackedFiles:
id: 01cceb61d42f
last_write_checksum: sha1:7e1d73bd30584d55f4b116737c15d7c73cdf6a3a
pristine_git_object: 522f4978a3c4e1d1c0d197b541fc57e745b7d4e7
+ docs/operations/createaudiospeechglobals.md:
+ id: c67d64f11ad7
+ last_write_checksum: sha1:a0026b1caf2268dd4a79177fa2bb630eca1498b4
+ pristine_git_object: 0fbd4f1ad17604e5e31b457c0e3073d5389539c8
+ docs/operations/createaudiospeechrequest.md:
+ id: d3139a0713f5
+ last_write_checksum: sha1:dd894ff1ac1021c4202c1e8197f2a7b5d7d856d3
+ pristine_git_object: c1ca2b7336e47fe365a59cebb643e9a780d44e7e
+ docs/operations/createaudiotranscriptionsglobals.md:
+ id: b58641464e34
+ last_write_checksum: sha1:cfc998017937ba731fbc1584d199b9668d8e08e3
+ pristine_git_object: f505a7180aca4ca2240cbecfab2bf5d464c6be34
+ docs/operations/createaudiotranscriptionsrequest.md:
+ id: 9a2ff1044ad2
+ last_write_checksum: sha1:de442d138768324f36e046817b44719ba4ac6274
+ pristine_git_object: 8fc1edc9df06004768f5dfa12f1f2fbc5d02dfad
docs/operations/createauthkeyscodecodechallengemethod.md:
id: d598c7da9363
last_write_checksum: sha1:3b81340adcf218991f7829e692e64f484763de2b
@@ -2820,6 +4766,14 @@ trackedFiles:
id: 6c92952aa6b6
last_write_checksum: sha1:9f9f0dd11d268a8bb27e9f6f99ce41da757e23fc
pristine_git_object: 8951a7ad215a64f23e5510b216b921b5c66d002a
+ docs/operations/createbyokkeyglobals.md:
+ id: 0a27dcaca263
+ last_write_checksum: sha1:9f87d6f4c4d4d6ffb067f3b0ce0903eff44f6f9f
+ pristine_git_object: c21b83643818552bb4eb163702160821ece0ec8c
+ docs/operations/createbyokkeyrequest.md:
+ id: 90ead629163d
+ last_write_checksum: sha1:c335d0b21af453917aedfb235e86ed9a9b29329c
+ pristine_git_object: 75282c50c48b157cbc9dcd9c06692ad2b1ecba8b
docs/operations/createembeddingsdata.md:
id: b2123807ad9d
last_write_checksum: sha1:0d1867d420c85221d76dad11143ffb836c66cd6c
@@ -2846,20 +4800,20 @@ trackedFiles:
pristine_git_object: 1ff75cb8fa59d2b7b756ea07e9f5849995b62435
docs/operations/createembeddingsusage.md:
id: 2dc99973f6c7
- last_write_checksum: sha1:a51043a1dcc144a05c76c218c73ff3f413d313ec
- pristine_git_object: ef0429e0678238d40901c630b48ab20680eee1f5
+ last_write_checksum: sha1:b01ba733f5d1369b21a54b9f3bfb0e4059504b6f
+ pristine_git_object: 007fb235eef4ebb9b3dda14352e9a252004de4c2
docs/operations/createguardrailglobals.md:
id: 34f5b2a17330
last_write_checksum: sha1:a43fb357b9c08974befd14a79da7623e72bc3245
pristine_git_object: 862c3641250154a3e227d020738f893d316d391a
docs/operations/createguardrailrequest.md:
id: 2d8932b329b3
- last_write_checksum: sha1:4b958201a047311bd6b7c74e767fe25f7c949d45
- pristine_git_object: 5a414e26806520a98f50229a063f127f712054b0
+ last_write_checksum: sha1:e03ea14af1abe30c5dc38323a824a91fa817bc2d
+ pristine_git_object: 74958a262f7d16b3cd8166b0a80a832d44b3df03
docs/operations/createkeysdata.md:
id: 903a6d611ab2
- last_write_checksum: sha1:fd7089b7dff765f863b0c02542c9e480656526a8
- pristine_git_object: f51f201d1e8c5c7216a508a652b154ca9fa20543
+ last_write_checksum: sha1:78eb64a7cc6deeb3959adeb0ca705826f5f47005
+ pristine_git_object: e60eaf9f45abcfdba122a7b04d1c66be31af48fa
docs/operations/createkeysglobals.md:
id: 15dd52d4443e
last_write_checksum: sha1:032800ca0e8b56a1819431b9b27fa09a5b4b09c9
@@ -2874,12 +4828,44 @@ trackedFiles:
pristine_git_object: f587de752afc6f5f82d55ba4b80f6d59336db24a
docs/operations/createkeysrequestbody.md:
id: 9aee51637cee
- last_write_checksum: sha1:1d8572e91a7634a55014b51d6eff7be8e8e92690
- pristine_git_object: a384fabe3ae8b6d1fa3ead87957d9552591d7664
+ last_write_checksum: sha1:dbd509a932f74e85a237fa1f4a2fab4c78af6c89
+ pristine_git_object: e63e997bf3d6eba579db664fba80bd295c145f17
docs/operations/createkeysresponse.md:
id: 42bb3427e12b
- last_write_checksum: sha1:b3aab1702c99f425a12e00607278808682bcf666
- pristine_git_object: e74907571f4147d457e544df8bcf6e4bb5be38fa
+ last_write_checksum: sha1:e113e49e9b3aa54f0d8021d13be59fc533830a7e
+ pristine_git_object: 91744f3dce817f96d0f5bb44af9988f4c54feac2
+ docs/operations/createobservabilitydestinationglobals.md:
+ id: 5d04001d9dd4
+ last_write_checksum: sha1:08ec40545e26db7b90f2d29c087f485bf6cba9bd
+ pristine_git_object: f6dbf1e02de879b2f2f5e2873b7ac311a6cd7044
+ docs/operations/createobservabilitydestinationrequest.md:
+ id: b8af7ad57eab
+ last_write_checksum: sha1:ebf76d176db49f6dcd8b7cea933006d671ad04e8
+ pristine_git_object: 37828e9e81d70f7df4cef3e34bc3388bf15a2513
+ docs/operations/createpresetschatcompletionsglobals.md:
+ id: 24849c276ba0
+ last_write_checksum: sha1:d8083152fad53bcf5f27f753e07fa4f9d1ef6567
+ pristine_git_object: a7fd674b0d04a19c059452656b52579eff342197
+ docs/operations/createpresetschatcompletionsrequest.md:
+ id: 3793b30f5163
+ last_write_checksum: sha1:4733d12274632c718f8eef9e1956d843ffc15e02
+ pristine_git_object: 1c5163aaed00356c7c9843adfd6ea25227f2f1b8
+ docs/operations/createpresetsmessagesglobals.md:
+ id: 26efd69591bf
+ last_write_checksum: sha1:f08ae40a0e765f3e2fd372d9ddca086059af24da
+ pristine_git_object: 52fb2642e2de1e7583273f5fa8974027612572f8
+ docs/operations/createpresetsmessagesrequest.md:
+ id: 901c27e4fed4
+ last_write_checksum: sha1:1205565ac74a7b732dbea1a3e7a44c5a4e6d20f4
+ pristine_git_object: 5d38bb0442f5b580eece56e7a26df6ce5bfe8bf2
+ docs/operations/createpresetsresponsesglobals.md:
+ id: 4e82c55bd48a
+ last_write_checksum: sha1:5013dad752f28dbf0ce175fead64b947ea4501a1
+ pristine_git_object: 0a102fb9f72ade6b8c57d2da849dca1e5f890103
+ docs/operations/createpresetsresponsesrequest.md:
+ id: 44fdbe26701f
+ last_write_checksum: sha1:73da0511dc38879192337c75bd21a60bc74d311d
+ pristine_git_object: aacd56ad9f5c8e4bad0802a8c6eba00b97e36dbe
docs/operations/creatererankglobals.md:
id: 46c967a0d2ba
last_write_checksum: sha1:9dffe3342695ec66163cb83423f441d527d4e561
@@ -2890,8 +4876,8 @@ trackedFiles:
pristine_git_object: cd88d08f3a6d71c88f56912d5a739b59cff0804d
docs/operations/creatererankrequestbody.md:
id: 8456551b3ea1
- last_write_checksum: sha1:2a635729172e375907d8298a633847b0f720ec26
- pristine_git_object: 29fb1c6cde9073c1a3d792e7c95fffe365a3b658
+ last_write_checksum: sha1:80cb06901c4dec44c0a0f77880307235b2695645
+ pristine_git_object: 4fa5cb9b85bc3343a9a6b91a425d3dea606a1d15
docs/operations/creatererankresponse.md:
id: 1b5f55b55e69
last_write_checksum: sha1:426209e05c118111316d4486c9cba821bd88ab77
@@ -2910,16 +4896,12 @@ trackedFiles:
pristine_git_object: 265872cbb44f436ced32612e7d880ad31d3fa41d
docs/operations/createresponsesrequest.md:
id: 98a355410675
- last_write_checksum: sha1:42013ced1fe3f6f5f080cee401a67e01ed6fd9d7
- pristine_git_object: 479750cece19c843bc8cca71f32ead0f5e0dfb1d
+ last_write_checksum: sha1:944f01fa8b720b943632a555d728c9a76d873671
+ pristine_git_object: 87238b0b77a7ad408b560adbccc541afd8fcffaf
docs/operations/createresponsesresponse.md:
id: a3d80d6706a3
last_write_checksum: sha1:b02dd81018eb73c7761a32ead8011abff17d9962
pristine_git_object: 5c515b1d273af54ccbf5e3d32b1677cbe867a1f2
- docs/operations/createresponsesresponsebody.md:
- id: 5f7fc3c975e3
- last_write_checksum: sha1:79a9815ab0129b3254e878501ebe5b2cd85c51e1
- pristine_git_object: b6dddbc3a55f3297719a3648b699634e50ca2f98
docs/operations/createvideosglobals.md:
id: 356f4c73b7c4
last_write_checksum: sha1:c639cea73f4e6c596f5b1fe567fa9b0c584caa6d
@@ -2928,10 +4910,26 @@ trackedFiles:
id: b8190b2b48e4
last_write_checksum: sha1:ccf223bd7e2958b01032fffc328ba43f0e6bf260
pristine_git_object: c9ce4f85e23827bdd48ebb8bf00525343eac73ce
+ docs/operations/createworkspaceglobals.md:
+ id: bb43600a84d0
+ last_write_checksum: sha1:431ed0e1519765d8b94d50ac991a64f6e6241513
+ pristine_git_object: 1f46dbb7552fe39db8fdf7209d9d5287f808bfa4
+ docs/operations/createworkspacerequest.md:
+ id: 9aebad99652f
+ last_write_checksum: sha1:26e3648e75871274c27e60ed42715d7434223819
+ pristine_git_object: ac92a748a5524ccb683ffb32dce19de3714a0e37
docs/operations/datacenter.md:
id: b08a21cce65c
last_write_checksum: sha1:9f399d250c42bff63295881990961f871a36b8a9
pristine_git_object: 51549248259fddd4e7822f3ceda9f972adfdef86
+ docs/operations/deletebyokkeyglobals.md:
+ id: 1d1c3a465a49
+ last_write_checksum: sha1:f32106a0fc76aa4d3cb69534d5ce194b89307559
+ pristine_git_object: 4c6957088dc54ca56dee767ff12dbefee4699a40
+ docs/operations/deletebyokkeyrequest.md:
+ id: 0f7d1a3cad77
+ last_write_checksum: sha1:31a3faafb0bed58823054afcd7956cf9e3881266
+ pristine_git_object: 0ddbc912f8cb861cee8e1806d1324541e0e637de
docs/operations/deleteguardrailglobals.md:
id: fc24ed3e100f
last_write_checksum: sha1:303b76381d6ae26e8d39c5470d35bfbbbb5df0df
@@ -2952,10 +4950,46 @@ trackedFiles:
id: 843ae03c4c33
last_write_checksum: sha1:3e34ea65b5397e4d1203306e4a08f12023ebfba2
pristine_git_object: cc7cddbdde6e0f31ddbec25b8a01e7ece0b8e04c
+ docs/operations/deleteobservabilitydestinationglobals.md:
+ id: 320854972cd5
+ last_write_checksum: sha1:cd2b58536565b300ac1b8a1963809a5eabb1bdb2
+ pristine_git_object: c4a9578900390adc5977342a0f6872ad5703d5f2
+ docs/operations/deleteobservabilitydestinationrequest.md:
+ id: f6e046bcfc29
+ last_write_checksum: sha1:73e6898e9509d0cab70df26d3ffe4ab74fd01af5
+ pristine_git_object: 538528d0c188a3e3b295a61231d017a23c13e923
+ docs/operations/deleteworkspaceglobals.md:
+ id: c9f40cc89b0e
+ last_write_checksum: sha1:4131177651ca5ad33b7160b2f4b8ff74e2233152
+ pristine_git_object: ef29294eda583f20fa40d5a544537cb72f1e98d8
+ docs/operations/deleteworkspacerequest.md:
+ id: bd62f5b93ebd
+ last_write_checksum: sha1:8bd64edf9b0684036c34ab258b95914d46cf8520
+ pristine_git_object: 980bab8fc4db27e0e7ef13f8799e0abd3ce8054e
+ docs/operations/dimension.md:
+ id: e9f30dc36c7a
+ last_write_checksum: sha1:a8598023d4ff603ab6a4fc630eca4aff603b417e
+ pristine_git_object: f1211356413148df1ac44fa0e80cd42d2d6e9df2
+ docs/operations/direction.md:
+ id: 7ba091522c14
+ last_write_checksum: sha1:acbf6523b76ae4f9eb60cb9f61c525300135992b
+ pristine_git_object: 339195f5b5e267ad8dfe3d912169130ca7205fa6
+ docs/operations/displayformat.md:
+ id: ad242fff7e06
+ last_write_checksum: sha1:1b2aee0301442f0d1cd0cc187da805775033cba3
+ pristine_git_object: dd278a8c74326eb0b1636e8d1c74bd24b0cfed31
docs/operations/document.md:
id: 640b715eb2a4
- last_write_checksum: sha1:18b3bcf786efa0cf41dd10ba4c3a3a58c65cd134
- pristine_git_object: 58e1f342ab67ae2c59a20b52fec72712a80e5a45
+ last_write_checksum: sha1:e5354408ae5ad862afda9ee12e58ae51ee2b99b4
+ pristine_git_object: deaad6c3d45766316174ea050f127401f31b1c93
+ docs/operations/documentrequest.md:
+ id: 08ce1217bc41
+ last_write_checksum: sha1:4c57c2ba76821c5d40267660da2d061abe55c297
+ pristine_git_object: a55fbb16dc7f4404fd56275df881c72fdb57d723
+ docs/operations/documentresponse.md:
+ id: 1dbe219e966f
+ last_write_checksum: sha1:aae01d1323240685b2f38f0409b18530fbe8193d
+ pristine_git_object: bb8bfba10d72c9a749611ba87413df6f06e068af
docs/operations/embedding.md:
id: f269f99ee6d5
last_write_checksum: sha1:37c64f7daf2ddca055feafab8df92acd112976f3
@@ -2984,6 +5018,54 @@ trackedFiles:
id: 62e36bd89583
last_write_checksum: sha1:f1f06cc15b7bf183358c6de9aa6351b70ca5e8bf
pristine_git_object: 11975e02a266c09b4c6c77409c7e8a42fe7cb537
+ docs/operations/filter_.md:
+ id: 99a428faae78
+ last_write_checksum: sha1:bebef12ff586b33835e6093318d2a232ddb60fc8
+ pristine_git_object: 87ece870e0ea0cd8a7f018704301362fb3950a54
+ docs/operations/getanalyticsmetadata.md:
+ id: 33ceb2682f42
+ last_write_checksum: sha1:58248c8e08a19c77e1b7a1269928e7e1e9fc7a7a
+ pristine_git_object: b9e1c5a16c11d4d4d6697c15ee90ff17e6928e4e
+ docs/operations/getanalyticsmetaglobals.md:
+ id: 470b157773a5
+ last_write_checksum: sha1:85d2f05090d37ec85f5a9be647326a5dc2a03c22
+ pristine_git_object: 532cfc24f8768a637d5da91d8dd7fd9744fae665
+ docs/operations/getanalyticsmetarequest.md:
+ id: 6ceee9c0ed9e
+ last_write_checksum: sha1:8c17007bc351f887b4ca09a836c691b829bde461
+ pristine_git_object: 751b08b78b201239f5a98ab606e8222f1638b4c3
+ docs/operations/getanalyticsmetaresponse.md:
+ id: c18398ae7125
+ last_write_checksum: sha1:8e7f71dc5ca06ffe4033f47bbe33ca2ebdeb7e72
+ pristine_git_object: b21d5534d8ad35fd0a5bbdd3136b63ae0c75423d
+ docs/operations/getapprankingscategory.md:
+ id: 598b9ca46294
+ last_write_checksum: sha1:74d76e21a39a083a6ab179002648ac218724b902
+ pristine_git_object: 4d33545692c4cfd7c4bcac32bccb812a08fa7eee
+ docs/operations/getapprankingsglobals.md:
+ id: 6cc30d444669
+ last_write_checksum: sha1:b0e0a24c467a13814a96971210a82d462825b208
+ pristine_git_object: 7d92111badf45247134c84f13cfe5f823f000d7d
+ docs/operations/getapprankingsrequest.md:
+ id: 9578b7b3d5a9
+ last_write_checksum: sha1:c8160407c9423397deb77966250d630ff0ff4035
+ pristine_git_object: 0d36b5103163108872a278ec906169b238637dee
+ docs/operations/getapprankingsresponse.md:
+ id: 197177f42a08
+ last_write_checksum: sha1:083fff141eba4473501bf2c5f8e3b077399cc281
+ pristine_git_object: 69f3a432383f6823843958ae5cd6a4b300867b64
+ docs/operations/getapprankingssort.md:
+ id: f6276c91ff17
+ last_write_checksum: sha1:9c80418c5384e63542ea16aa336c3bfe54c23b64
+ pristine_git_object: f0d402fbc8b66cc075706e056fd152e41e141c3f
+ docs/operations/getbyokkeyglobals.md:
+ id: 82a8cd8db21c
+ last_write_checksum: sha1:4490949622267f537def903fa3efe64142925739
+ pristine_git_object: f2fe5e4320b22e90fda49f1476cd4a8a5a5a4f26
+ docs/operations/getbyokkeyrequest.md:
+ id: 0415f890e75a
+ last_write_checksum: sha1:0ee7c46f0cbdd349f1b17a1e2275bc7a6aeaaa54
+ pristine_git_object: 99b01898e72b7fcd892c7fae0707a295e36aea2c
docs/operations/getcreditsdata.md:
id: 57e01e9078b5
last_write_checksum: sha1:0f1d133fe4045e1b1d0e494e54bbb02b76d16607
@@ -3016,10 +5098,6 @@ trackedFiles:
id: 37af8951de4d
last_write_checksum: sha1:1e62836ec19a8aad8b0dcafd7799b71250a5c6f7
pristine_git_object: 2855d5b95d41a494bc7ffa9f85c74ff27a46ca96
- docs/operations/getgenerationdata.md:
- id: 89a3aab8da20
- last_write_checksum: sha1:a535e1604ef9524eb8fb752711abd36dbe7219c6
- pristine_git_object: 7be5766a6c6a5f065834bdbbec761795c255689f
docs/operations/getgenerationglobals.md:
id: 0d6e856c5861
last_write_checksum: sha1:b5236815132dedf2b595fd520f1753d5ec8bb6e0
@@ -3028,10 +5106,6 @@ trackedFiles:
id: c830d67c6a95
last_write_checksum: sha1:508adc1d9d3a03a5b6d12515ae9dd8f0b5b1c2e4
pristine_git_object: 8c54a7a47635c68bb980670de08a748d076a401a
- docs/operations/getgenerationresponse.md:
- id: ab03c2c610cc
- last_write_checksum: sha1:419e7fafd845db9c63545b55bf6ab1ecd6a04371
- pristine_git_object: 989c19a3997fe21716eea833ef30eef8a980b733
docs/operations/getguardrailglobals.md:
id: 6cf14d555b8f
last_write_checksum: sha1:025d0a3b53ce5603d5d262a5db3ac54b5ce981d0
@@ -3042,8 +5116,8 @@ trackedFiles:
pristine_git_object: ad49c823ffd11b46d8a8ce2a67eed5bd71d09db8
docs/operations/getkeydata.md:
id: 4fba05263947
- last_write_checksum: sha1:15596e6d829847c4916aa0c8cc2d53f47cf43295
- pristine_git_object: 5ba4a1f8bb80defa921093533a2c7e5f1a4c45a2
+ last_write_checksum: sha1:914831859afa885b63cf4d8a252ae16997007438
+ pristine_git_object: c5a3db6f9a847b1fafaca37b04e58e0f63cf77e0
docs/operations/getkeyglobals.md:
id: 7f990e0efc1e
last_write_checksum: sha1:12dcc44c433951cdd8c4136ae1a70702e2b3e47d
@@ -3054,16 +5128,56 @@ trackedFiles:
pristine_git_object: b7b0a302d24d5964ce5a4bd24672d766362564cf
docs/operations/getkeyresponse.md:
id: c145b1a0dd5f
- last_write_checksum: sha1:71d93bb73bc10bb55afe1d816f2c839b43528c96
- pristine_git_object: 7959a400503db3233fc13546d4b63995690d5984
+ last_write_checksum: sha1:c315584d278f8f91f4437479ef8e95ce48b3130c
+ pristine_git_object: 72e8055b7d9b0de224ea423fab24a5614d6e9da3
+ docs/operations/getmodelscategory.md:
+ id: 30e7c8fb695d
+ last_write_checksum: sha1:aab2e450286bc960f0aa5a856e29b6b2f2feaaa1
+ pristine_git_object: 79ab890961ecf7cc92cd970881feaa8ad3aeb594
docs/operations/getmodelsglobals.md:
id: 61588f3029c8
last_write_checksum: sha1:f1565d45f3d06f070a8bc5ebe53d6205656b4b3b
pristine_git_object: 9533d03cfb8ec3720fde4833d7260f4f645d6786
docs/operations/getmodelsrequest.md:
id: ffb89fce8262
- last_write_checksum: sha1:8a16948332630ebc3a9c1d6daeff63cf11e4b07b
- pristine_git_object: afb02bfe9dacbe10ef68aeda55e8c50ccd35ecfe
+ last_write_checksum: sha1:82a616e853d456b0435abb5cbbe9cfdb9f65af2a
+ pristine_git_object: 8fa79b3536676090c781f6c6e5cfb967bd52c136
+ docs/operations/getmodelssort.md:
+ id: 0e5bc10b2c1e
+ last_write_checksum: sha1:18273aafc3b1f4aee1e426355a8f53e609a3e196
+ pristine_git_object: 181438276240e597ee0df9d3601565670e2cf580
+ docs/operations/getobservabilitydestinationglobals.md:
+ id: 00303cf00619
+ last_write_checksum: sha1:ae437bab3d6cd3996eacfbb713f9b29385eee1c9
+ pristine_git_object: 66c60398544681aea2ef847648b6b1b6b7f83000
+ docs/operations/getobservabilitydestinationrequest.md:
+ id: a182ef732e42
+ last_write_checksum: sha1:5d0d08269002a80e0cb73523ad75571569c1b7be
+ pristine_git_object: f74d79fd1c0ff58fb95812dcb8821eaa601f8275
+ docs/operations/getpresetglobals.md:
+ id: 16601428a948
+ last_write_checksum: sha1:673254046620888b4af338fc40a08fc70a7f5935
+ pristine_git_object: 40f699f420beb6c7f0e27661e0c5380d404d703c
+ docs/operations/getpresetrequest.md:
+ id: 07d2d7c15e84
+ last_write_checksum: sha1:2fa6def5b8bd8e1d4472888c6efa64b4c0b829b6
+ pristine_git_object: 9259ee30ef6f0ac62c18bc7952c056d1b32a1d03
+ docs/operations/getpresetversionglobals.md:
+ id: bae9f8e30de3
+ last_write_checksum: sha1:b29bbd392a7f21787c3dcefd678a49ad98f675e9
+ pristine_git_object: b3666ad4ff09a4ba377795c0dd57e41324356b79
+ docs/operations/getpresetversionrequest.md:
+ id: 7f6e78a91e0c
+ last_write_checksum: sha1:373d2ee03e10912fbf4e495ad6ac2890fa0a4bbd
+ pristine_git_object: 4ceea402bf2a1acbaf26ec89d40bb57f27a8dac3
+ docs/operations/getrankingsdailyglobals.md:
+ id: 4c35125b5a55
+ last_write_checksum: sha1:95e16bf72ae618cd5089666e89b8c6b37a8ffdc3
+ pristine_git_object: a75e324e4f708bd186de38f2bd1ffb5df19df11c
+ docs/operations/getrankingsdailyrequest.md:
+ id: 4418b400973a
+ last_write_checksum: sha1:9941d12ab4bf460c95756d511f9339a17383e113
+ pristine_git_object: 59be90b2aebcf81f507dbea4cea1496beb9c5454
docs/operations/getuseractivityglobals.md:
id: 39aded6fc0f1
last_write_checksum: sha1:53ccc45e0783444aa97f4e051b6ac6edc3acc588
@@ -3080,6 +5194,22 @@ trackedFiles:
id: 2eeac3b6576d
last_write_checksum: sha1:9f6eec582ec3a568a6e14f57a687f0d360fc9748
pristine_git_object: db40577d2526f81edbcc38cef6517c598a98bc7b
+ docs/operations/getworkspaceglobals.md:
+ id: c0101897f893
+ last_write_checksum: sha1:5ac92be2d4cd79c39bad1ed47a4e689ed44f3769
+ pristine_git_object: 1bd5e0856557b36ea222bd2b685557bb0c75a7f3
+ docs/operations/getworkspacerequest.md:
+ id: 6443ed4f7ead
+ last_write_checksum: sha1:c2ada6583e276f2a6c553b24053453853207b302
+ pristine_git_object: 8b59d2daf235f8af09bf4664c8080ea7a0e5b3e2
+ docs/operations/granularity.md:
+ id: 1a397e2c8a0f
+ last_write_checksum: sha1:612977bfd1a843139f70131bb345e7ec4d45ca4d
+ pristine_git_object: 8ced62dd4e058a108a2e059bcfee3f801e5cb605
+ docs/operations/granularityname.md:
+ id: f5460a07f93a
+ last_write_checksum: sha1:efc55ee0c73eaa090d0bca648fa58bba39559537
+ pristine_git_object: dd9a9ba9845690442ef2158545ea9a3ac7a7b4b5
docs/operations/headquarters.md:
id: 3ccf7adf2542
last_write_checksum: sha1:24ca86fa6e2ebabf4cb034f6e368901e5041ccc7
@@ -3096,10 +5226,22 @@ trackedFiles:
id: 8bde108b50c7
last_write_checksum: sha1:e671ac1a028be0528b5273dd61b8deea5c3f9451
pristine_git_object: 655cca3c9dde2904f47187955063ed1def505e47
+ docs/operations/listbyokkeysglobals.md:
+ id: 97eb1fd15ac1
+ last_write_checksum: sha1:7c545f4b2bac2dc7c814cbeb0ce3ece4e8338f9a
+ pristine_git_object: 9bd9dcc5a67a8361541150beff1fd3f67873220b
+ docs/operations/listbyokkeysrequest.md:
+ id: 2616eb6c184d
+ last_write_checksum: sha1:5cf5f6e129d99ea30797d3523ba69915d1057bda
+ pristine_git_object: 4a8bb4188542896d96807b154ed1423c12fb0f52
+ docs/operations/listbyokkeysresponse.md:
+ id: 15eaf6a6fa23
+ last_write_checksum: sha1:8f688dc5041a88fa5417a4d58471c1c9399decd9
+ pristine_git_object: 0e6a3cf7bce0fb030a0bd8f2c3c9d0e076490504
docs/operations/listdata.md:
id: 3a3029670d40
- last_write_checksum: sha1:3849b8da164914dd9aedabf0982439c1e1bef02e
- pristine_git_object: d8fcbe3395bbf9581c75455e3c0c49dae72f73a2
+ last_write_checksum: sha1:1384605ff96cc0e7797d7dd2ff42752fe980d91e
+ pristine_git_object: d2a0b36ca2cbc9e297beba6471f7838b12b0b783
docs/operations/listembeddingsmodelsglobals.md:
id: 29c3a9629ff7
last_write_checksum: sha1:a8b2d679ac7a558761e4289233d31084f4f7663e
@@ -3132,6 +5274,14 @@ trackedFiles:
id: 37a957da8f54
last_write_checksum: sha1:6892fe1fc31da14493b937171caec5f0fabb8daf
pristine_git_object: 54cf662af701995f7c04272d932f9a2e2731beeb
+ docs/operations/listgenerationcontentglobals.md:
+ id: 86c60d8ee820
+ last_write_checksum: sha1:6bb5e89777b8f25572237af5065a15ff5abea244
+ pristine_git_object: eb76ee2d7e2516c9942be0fb3a1fe38177741f71
+ docs/operations/listgenerationcontentrequest.md:
+ id: 2fd43266dedb
+ last_write_checksum: sha1:e9831ae9536176f944df36910bcbcde652545a6d
+ pristine_git_object: a025996eecd9ddf89a1eb10a5931becdc58983bc
docs/operations/listglobals.md:
id: 32d30e56f680
last_write_checksum: sha1:6b2661b1a208354794ee9f591c7581526d4641be
@@ -3166,12 +5316,12 @@ trackedFiles:
pristine_git_object: 4a623f2b7664346b324037e5e099cc19a22e0f99
docs/operations/listguardrailsrequest.md:
id: c00416201071
- last_write_checksum: sha1:59f051110dcbb0bff3ef96bb5f098b561a810c43
- pristine_git_object: 65946b14204dcd39c2a43303d56e62439506a07b
+ last_write_checksum: sha1:e73c3a5dab8af65b85eafbacaa9c3e7bff99ce3d
+ pristine_git_object: e6f8126048b2344f42c86d1df9e472b9b0618bc7
docs/operations/listguardrailsresponse.md:
id: 0e85f301aa5c
- last_write_checksum: sha1:ef8d1dd575f41c8fdbefce870526326b9f213912
- pristine_git_object: 3046aeb171cb27a5ce37814a5723e3fae8ef2969
+ last_write_checksum: sha1:69b2d4440e668dc9e76ebad86d5f70227276a31c
+ pristine_git_object: c2e3510e7d805915eb9f493ac6cb092ec1a9d9dc
docs/operations/listkeyassignmentsglobals.md:
id: eb16fba53032
last_write_checksum: sha1:823375a0dc84574748befda39821c790b469a6b4
@@ -3216,6 +5366,18 @@ trackedFiles:
id: a5b7382e5fb8
last_write_checksum: sha1:c4de0a5a996b4ad48cf50e0f5f35db05c882c574
pristine_git_object: 3d42e13fcb006322664b3458e5399483ad0b73fb
+ docs/operations/listobservabilitydestinationsglobals.md:
+ id: f97e8b407351
+ last_write_checksum: sha1:18ce351edf724c073d1a7e48cec4a4d1fe3344c3
+ pristine_git_object: e743e9fcb59eed90783d6e02c525c9203000ba00
+ docs/operations/listobservabilitydestinationsrequest.md:
+ id: fe42600264e2
+ last_write_checksum: sha1:2c9fca29d3666dd8a0a6831ac171c3870bc8611f
+ pristine_git_object: 823bd375a911d42d6748a48a1475f737b9b2cbac
+ docs/operations/listobservabilitydestinationsresponse.md:
+ id: 27e52198d1cd
+ last_write_checksum: sha1:7bfd16e81835713d3c4da71b96e50dec3b2c44e4
+ pristine_git_object: 2ca4b2b0b7fddcc9539f0c76ad9dd3c116c58d15
docs/operations/listorganizationmembersdata.md:
id: e2cb8741f8f1
last_write_checksum: sha1:2ca75ea8dd657b6cf33236ec7e3949215b958a8f
@@ -3236,6 +5398,30 @@ trackedFiles:
id: 573a08dc9d96
last_write_checksum: sha1:89cd76c6935cda7cbdb00de704b1d527e4eb0a14
pristine_git_object: e5aab441b87284d7d88749950848db12655d48ef
+ docs/operations/listpresetsglobals.md:
+ id: 8b1acbd90059
+ last_write_checksum: sha1:3202f46cae6be4ddc4cf4793402758a0b91385bb
+ pristine_git_object: 49f3ea321bc305055cfacfe22bc7590162f84cc3
+ docs/operations/listpresetsrequest.md:
+ id: 4f1702eac3bb
+ last_write_checksum: sha1:78cc97678a40641d64c291ad016f78bcb247f9d8
+ pristine_git_object: 90feb2a1c95a3b2203a48c465ecb8b29977cd407
+ docs/operations/listpresetsresponse.md:
+ id: e827d8fa2c98
+ last_write_checksum: sha1:f9bd37493c87f1af317dfc6fad181ee9365b5116
+ pristine_git_object: ca86773926c8b90ab3073fbbf0db3344f74d5d51
+ docs/operations/listpresetversionsglobals.md:
+ id: 9516dc5fe50d
+ last_write_checksum: sha1:764278af18b61c431efd16395a46e092fd77f4bb
+ pristine_git_object: a0b5d7e47938af709b3a5c95367dd690971bc6da
+ docs/operations/listpresetversionsrequest.md:
+ id: dca09de93f73
+ last_write_checksum: sha1:b99790793d146acf534f8f9d5d9926373943ea03
+ pristine_git_object: 689a4865feabcd144c977564149501f8445656d0
+ docs/operations/listpresetversionsresponse.md:
+ id: 104b7871a717
+ last_write_checksum: sha1:5ae0a5da5820f663c25ca583e955e2036bf61df4
+ pristine_git_object: 10dc6e5f3ff5b5871062ac992a01ee3c3586819c
docs/operations/listprovidersdata.md:
id: 576de3a80e5e
last_write_checksum: sha1:2f5a3edd32a37e17be34bd07faf0b89b14f8a08b
@@ -3254,8 +5440,8 @@ trackedFiles:
pristine_git_object: 922cc65548995e12edbe83abf86732c4190c7a97
docs/operations/listrequest.md:
id: 40bb7fe37ce6
- last_write_checksum: sha1:36a84dbd57ce7422a28707449d645c467d77dcb4
- pristine_git_object: 5507b0aa07c0220cfdad1e7ec264f0d74cd2ac94
+ last_write_checksum: sha1:dd1cdb3c672fb456b05afa8c838bfca5e7a4f2db
+ pristine_git_object: a5646bdeb6412940b9f6f2320315d9f1f58788d6
docs/operations/listresponse.md:
id: 14450e1d6614
last_write_checksum: sha1:e432e29d3c7de8517cc16b59b958134ec561f09c
@@ -3276,6 +5462,26 @@ trackedFiles:
id: e0e776f67adb
last_write_checksum: sha1:0d590826439a800f340367b6721265535827aede
pristine_git_object: cbd65ef6238a8b9bb2c36bc37cbdb5a5e181d3ad
+ docs/operations/listworkspacesglobals.md:
+ id: 4ccdc202de01
+ last_write_checksum: sha1:3eade1075e3b0f917a9afee3da18cfebbc4ac886
+ pristine_git_object: c5967dd23490646d0a10ffa24df8aa0bab712c9f
+ docs/operations/listworkspacesrequest.md:
+ id: 93bf2ba40fbd
+ last_write_checksum: sha1:c0d073a290e63ae12c5099d38abc89f87d6ca525
+ pristine_git_object: f46ba571e6e7cefe535e9a429ed811978fe697a8
+ docs/operations/listworkspacesresponse.md:
+ id: 54505a70bba7
+ last_write_checksum: sha1:4f3cb764af31985161832976edf2fefb97c0cdc5
+ pristine_git_object: f817644945c1182df48c2166fbf931e91ab34b36
+ docs/operations/metadata.md:
+ id: d37b5c1d5589
+ last_write_checksum: sha1:14fbbcbc61e874a7c3805d7d751892c734598532
+ pristine_git_object: 62820591df404a67c63db6e3b3e942181f7dfa40
+ docs/operations/metric.md:
+ id: 28da9e6f159b
+ last_write_checksum: sha1:1ee79f025dc62cf1bf26ffaf2a957debc4941acc
+ pristine_git_object: 7d56bf29feb132b5ecdd648201df3c5d732469cc
docs/operations/object.md:
id: baee3544844d
last_write_checksum: sha1:2fba5ecf3f93c90460a972666d6acdfb597cafad
@@ -3284,14 +5490,58 @@ trackedFiles:
id: 7a144a9c7a29
last_write_checksum: sha1:5f009bd24fd951128cdc546a6a5c937ab0426387
pristine_git_object: 4f8c20dd33dceafda3362119a1cfb1e5133810d1
+ docs/operations/operator.md:
+ id: 2d98ce506f05
+ last_write_checksum: sha1:e33c1a9f2770b16f88bf4516c7865868f2c0f868
+ pristine_git_object: 2b1578ec5c2ba5be50fb3b5d6bfd850652d08b67
+ docs/operations/operatorname.md:
+ id: 0c45b73c6cca
+ last_write_checksum: sha1:6b23abc74ab1eaf13c230d445c642ad0a169e59b
+ pristine_git_object: 03a40abd4069d8b762c146d23f76d8dd7cc93130
+ docs/operations/orderby.md:
+ id: 1f56e147192a
+ last_write_checksum: sha1:9058eff01fac823cf53501fe8b3b5ae7246aef99
+ pristine_git_object: 1fea03103fc771a2b98ba707d5021345697a9ae5
+ docs/operations/prompttokensdetails.md:
+ id: 4e204e79631e
+ last_write_checksum: sha1:253a012fe630387ab4de4461bf797cc8cd7a09c7
+ pristine_git_object: 56c454715dfb32bf210dfe8031e7145fd4c2c83b
+ docs/operations/provider.md:
+ id: 9d89f101fabf
+ last_write_checksum: sha1:8b0c3c9d88e5fca583ecf2acfb331616ee4c546a
+ pristine_git_object: 12dc1b15d6b22dc26ace4c59f6114856f2e2361d
+ docs/operations/queryanalyticsdata1.md:
+ id: f5ead5b95530
+ last_write_checksum: sha1:a55813c57010d0613c1e70ee1a9232fdcf98775c
+ pristine_git_object: 055291f2e192b8c846b85f04ac19212389d227f0
+ docs/operations/queryanalyticsdata2.md:
+ id: 245e11bf5e6f
+ last_write_checksum: sha1:503798286374764fde6fd4eb75defba2f463da49
+ pristine_git_object: 109fa74f2b27c647cf7b3fd5103e327519831e19
+ docs/operations/queryanalyticsglobals.md:
+ id: 373ab736c5db
+ last_write_checksum: sha1:f3cc24044abacc9b184e6fb61b1c5cb86f8be0eb
+ pristine_git_object: 9f9d4a101658eb5a210c95578a1c1f504db3069f
+ docs/operations/queryanalyticsrequest.md:
+ id: 17bd5ac6f41a
+ last_write_checksum: sha1:8e60085008d0b24ced809aa589c73208cba08f60
+ pristine_git_object: d8c88120bf89df54fc08efc3de0ae50c291cad39
+ docs/operations/queryanalyticsrequestbody.md:
+ id: d462ba943863
+ last_write_checksum: sha1:1d2c5928d852134b8f46f890710d8ea3fa4afb47
+ pristine_git_object: 8b20d84e52c0e3bf788ac6edef549e39538669c8
+ docs/operations/queryanalyticsresponse.md:
+ id: 662c24789418
+ last_write_checksum: sha1:88a8ceb4ceaad18c15e6b22450205d1562b17064
+ pristine_git_object: c079f10e99e8ebed3047b7a128523d606a3b4589
docs/operations/ratelimit.md:
id: 55ccfab9dcb0
last_write_checksum: sha1:ba383320e312bc87bd156a5d338f3d973376ec02
pristine_git_object: eeed3720e0eef6a871483dabd4a345495b466339
docs/operations/result.md:
id: 432b3cd4c69c
- last_write_checksum: sha1:1eab024add8cac132cf311dcb6d569e059aa7329
- pristine_git_object: ece2bfd8dc0af3d882cf7d088c02893da7aad332
+ last_write_checksum: sha1:ec5cacde47270f2b163116b6b38820cfaa285dc0
+ pristine_git_object: f06fc0e434bc96c8f29c6eb97e5a165b3df0434e
docs/operations/role.md:
id: 361efe189fd3
last_write_checksum: sha1:b636196d23d598f27a7b39d5db1e9faa3a0cb072
@@ -3302,16 +5552,20 @@ trackedFiles:
pristine_git_object: 3256c024465d68f376df1e9498da94ce756bf320
docs/operations/sendchatcompletionrequestrequest.md:
id: "220604035185"
- last_write_checksum: sha1:55f1470ef51551503f7ad08489329bd1b81e4c4f
- pristine_git_object: f0a096f40d2d0e187d2cd3884aa957d863913ef5
+ last_write_checksum: sha1:a8cf41b291730959bba08061e98eafe3953cea1f
+ pristine_git_object: bcb4bc42fd02fc674979172477e52b509b0c4daf
docs/operations/sendchatcompletionrequestresponse.md:
id: 354b29241c52
last_write_checksum: sha1:baf6f1195eeabcb4742fec427127f2c33ffd9b3c
pristine_git_object: c4ba8c79c6ba3021472583b922c3ef01c4115bf4
- docs/operations/sendchatcompletionrequestresponsebody.md:
- id: f89a67417d77
- last_write_checksum: sha1:18f9b7a258b6cec3ea91def378505c01d63b8abb
- pristine_git_object: ff4ce98066d383548220f9dd7a3e127603a1b6b9
+ docs/operations/subcategory.md:
+ id: "169243175101"
+ last_write_checksum: sha1:ddf3195ab7768df3095efa4cc86ea7b5ca3504f3
+ pristine_git_object: 912cc5d754a041cfdddbad5c704505a3f7da1cec
+ docs/operations/timerange.md:
+ id: a5ee8c05a917
+ last_write_checksum: sha1:00b61805899422b836494a24088ec33674316714
+ pristine_git_object: 1e0e56f92f9705e14c9ab6ebc68e3d7eb603d128
docs/operations/typeimageurl.md:
id: 433d2dc21947
last_write_checksum: sha1:24b83d5212d95f5e5ee95d1b9e47059613126ea1
@@ -3320,6 +5574,14 @@ trackedFiles:
id: 58e69601e3dc
last_write_checksum: sha1:5abedb25856f0e45ef9b80e42cf6fe4aaeca0741
pristine_git_object: fb9c2cfc86821cc2713c143ada5094af0e775f08
+ docs/operations/updatebyokkeyglobals.md:
+ id: 59d64e39f999
+ last_write_checksum: sha1:3ad9ac30eb6ad60221451b2fbe10c4fb99780516
+ pristine_git_object: c832d953d1968bf3eab6e934cda62cdc4484943d
+ docs/operations/updatebyokkeyrequest.md:
+ id: 91d2def5a18e
+ last_write_checksum: sha1:3884824fc49b8f5eab9919adaa3a446ad6fa1aab
+ pristine_git_object: 17d7eb959595a02720a6abc31b33a67265139a32
docs/operations/updateguardrailglobals.md:
id: eb4357a0714c
last_write_checksum: sha1:3ebdcb875989055d04737285abb527a8ea30720b
@@ -3330,8 +5592,8 @@ trackedFiles:
pristine_git_object: 58ac81b1a12447b17d1da21f1b2275b32e2c2ca7
docs/operations/updatekeysdata.md:
id: 989d7ddeeb46
- last_write_checksum: sha1:bf9ed436df63ce56f2b3c570f96bed89ebe42400
- pristine_git_object: 499598c65d3218fac3da20e1f6a42e8f6d691c16
+ last_write_checksum: sha1:81679927eccfbb9957d4cc3454668f9cc60458dc
+ pristine_git_object: f1ef38208b77ffa7eabeb448a4d6b7894315dcb0
docs/operations/updatekeysglobals.md:
id: fe06e9820a16
last_write_checksum: sha1:bc44e1936abe8d3ce77e223aacb0326143a4a812
@@ -3350,28 +5612,68 @@ trackedFiles:
pristine_git_object: a6130fd788229ee52843ebbb537b1a9ef6601278
docs/operations/updatekeysresponse.md:
id: 594f08a35b03
- last_write_checksum: sha1:f4a1479f7df16e20dcc7f9259245163c0550d423
- pristine_git_object: c1dde7cca4a08be11d91f1f97bea5d2a08ab5d6e
+ last_write_checksum: sha1:4590d0a24f313d60e4e7e18688eac54e755151a1
+ pristine_git_object: 8b5ef1fca6768575bb49ed510fd83b27c77db805
+ docs/operations/updateobservabilitydestinationglobals.md:
+ id: 95291996394f
+ last_write_checksum: sha1:48edaafebdaa82f0fa05780afdce3c5480fb5be3
+ pristine_git_object: 4bd59f0388e042854c46523a6ad813564d3b0c6d
+ docs/operations/updateobservabilitydestinationrequest.md:
+ id: 2446c57b28ba
+ last_write_checksum: sha1:fb2caf3523357d21bc35946e1f48d0dd98edeb7f
+ pristine_git_object: 6ba312fd9fb477a10e57eef62c519130c17f5136
+ docs/operations/updateworkspaceglobals.md:
+ id: 1f2cac8a13a4
+ last_write_checksum: sha1:aeffb26e2ce0ddfe37f1ccee67035ebe9041c673
+ pristine_git_object: 5835a41ee1c7a0e557a7282271e8d31230b54e82
+ docs/operations/updateworkspacerequest.md:
+ id: 719c33978f4d
+ last_write_checksum: sha1:3ea95e60674f4d0380f532123c75579855ac00fe
+ pristine_git_object: d5bd345f6faefd5e2448b7e6c6c15ae58df7d0d2
docs/operations/usagelimittype.md:
id: f83f3fcb36f8
last_write_checksum: sha1:9c272d9908a57fdbd2b376e13c8fd226e7d4ce65
pristine_git_object: 0d9e7c83f5ae8bab7f5f5cfa6e48805c00f56f40
+ docs/operations/value1.md:
+ id: da0cfd1e3204
+ last_write_checksum: sha1:f8e99f8bc67caf093b9965d1b9be3b1efcd2207d
+ pristine_git_object: 923838817b9097776c3d54920f004ad1924e09b7
+ docs/operations/value2.md:
+ id: 3f4c8217513f
+ last_write_checksum: sha1:683e88a1e77074bf96c4ba1e83ff18661388b775
+ pristine_git_object: d72862bbc8003f609b439ac5a7c0904ecd1649a3
+ docs/operations/valuetype.md:
+ id: 20b3a19cf0bf
+ last_write_checksum: sha1:3ee651ec1a0b12ed21c222f856ed351e99ce36b5
+ pristine_git_object: 9b4d37e44d3b989fe6b9bc47c9e35a9e09cdc5cb
docs/sdks/analytics/README.md:
id: 4c84abb05030
last_write_checksum: sha1:2af2b879b1945ad9293b519ffa87579393608031
pristine_git_object: 44f78122819ded7e472e28ebcf37dd8812707097
docs/sdks/apikeys/README.md:
id: e2bd25998427
- last_write_checksum: sha1:59291dbba3de15ee545d124fb51232152b2c7e4a
- pristine_git_object: 0e6da8598106dcd4130e57ef747c365915ed0c79
+ last_write_checksum: sha1:82bec11fedf21eed760739e1adb08fec06239279
+ pristine_git_object: 6e72f51df9e9811cee424032f7dba0887e15afec
+ docs/sdks/betaanalytics/README.md:
+ id: e037af84b386
+ last_write_checksum: sha1:9375a62a38b542ab12a694dc8be8993d2982181f
+ pristine_git_object: 4c593aa7680dac5f237b405d7eaa21c3e1e7706b
+ docs/sdks/byok/README.md:
+ id: 511ba2ae7a1b
+ last_write_checksum: sha1:ef72e4c9cae06d60f4c2f2ad0578747d39e1d5ef
+ pristine_git_object: a6f5335576f02b6108482dcd54e066b34a7c586f
docs/sdks/chat/README.md:
id: 393193527c2c
- last_write_checksum: sha1:74076b3d74207ac98f47e323bd2badbeeb604e3f
- pristine_git_object: 03d623c9d94c1d1c85cfacaa292055df0fa04ca7
+ last_write_checksum: sha1:ee1db1ffd0e27ed3b8730031bd4359e0ada7dabd
+ pristine_git_object: 6ef196052d45156ac3427e72889d5fcd4b246e28
docs/sdks/credits/README.md:
id: 81608135c0ff
last_write_checksum: sha1:abca02bc25760be47f80100a7cce6bb711202aef
pristine_git_object: 1837ff59343eb87482e8750c1fb5d2b5f89aae6a
+ docs/sdks/datasets/README.md:
+ id: deb5d90f4faf
+ last_write_checksum: sha1:c09c0c118def84591a90132f77b67f40ae9e3d1e
+ pristine_git_object: afcf796dfd4d793bbfe7bcd3bdd81e5fe908de94
docs/sdks/embeddings/README.md:
id: 15b5b04486c1
last_write_checksum: sha1:c2ed15521af31873f56e7813292aa30c5adf94e4
@@ -3382,52 +5684,76 @@ trackedFiles:
pristine_git_object: 2ce96e9a6eedf3a64256cd848615e9c4fd76c0af
docs/sdks/generations/README.md:
id: a7d12ae95fb1
- last_write_checksum: sha1:5846217fd9616824edcf5f41d6c54bc727f07195
- pristine_git_object: 332b5683cfe8c07ce4cae93b3247cd56f545f535
+ last_write_checksum: sha1:70dbb18cfaff95cf5e398fed34ef969a683964d5
+ pristine_git_object: 7fd647d02bfd29a3c7a5da0487761e89f308f224
docs/sdks/guardrails/README.md:
id: f72b38a5a2a7
- last_write_checksum: sha1:e55d9d4938da4dd306775c589d48e99e7f169870
- pristine_git_object: 7bcdbb6e6baa29cc411a01eb20c3ee63064dc8ea
+ last_write_checksum: sha1:e90c6c713afcfa087edfcb6367397b9109ac3af9
+ pristine_git_object: 427dac57b47fbb136a16eb1ab7732c1ff61d7c2e
docs/sdks/models/README.md:
id: b35bdf4bc7ed
- last_write_checksum: sha1:ac628dd17b528a4772ef0797c4c47906faf8dc40
- pristine_git_object: 74618cb8c5b4d8781e54dc2ee6997fcf2b365c78
+ last_write_checksum: sha1:5e810aa08ca47adf984749b54820797f11905d98
+ pristine_git_object: 4875c608ca2e0c3d598daf9eeaeda610fc587b75
docs/sdks/oauth/README.md:
id: 80ad2c1a7b62
last_write_checksum: sha1:bec31275e907bdf1f888ad7e2a6af916b84d5103
pristine_git_object: 562e2e83f65a925b834b591ede742db3050d3cce
+ docs/sdks/observability/README.md:
+ id: bab967736831
+ last_write_checksum: sha1:88065c2ad18b9ab74228a89bac655b05dbc11991
+ pristine_git_object: e96d64dedb5332296e09bf5e34e83047f610ba17
docs/sdks/organization/README.md:
id: 69e4232b8432
last_write_checksum: sha1:3aca4d3971ef8e049ec6c66d4dd160cf110529b1
pristine_git_object: 867781001d3d7c6e755bcd3024268d831d154732
+ docs/sdks/presets/README.md:
+ id: ead9668ae1dd
+ last_write_checksum: sha1:94365626300b73b78ac9cdfcac1e85833a862fc9
+ pristine_git_object: 8ec4f55c51a6b59577b683323276d1ffdd824c63
docs/sdks/providers/README.md:
id: b02aa45c0093
last_write_checksum: sha1:576c938477d66de01f39db88b50caea41a6812d3
pristine_git_object: b414ebc8a9ea57045833409e5deaa8aa21d283d1
docs/sdks/rerank/README.md:
id: e2b361cec1dd
- last_write_checksum: sha1:78d6cc40496f406429d5ef3143f4b83e33002e01
- pristine_git_object: 3bda1a6f6fccc91a04e52d373727cac8861e1a26
+ last_write_checksum: sha1:f66a436b50733a6a5867d4be0412b1909f99fc33
+ pristine_git_object: a558abc06eb1e3251ae6a7993245f8e6e0ef3b2a
docs/sdks/responses/README.md:
id: e717bad14f63
- last_write_checksum: sha1:02f29159f69cbc264437745e1d7cd54ed7e30ced
- pristine_git_object: a38d2b1b819d977c739f6a7b6f55344514c5447c
+ last_write_checksum: sha1:5aacb6cdf4577af559b61207fba01dcc4dd9fdc8
+ pristine_git_object: b1c9d9fe27407f44f07c074db989fd4201dceaef
+ docs/sdks/stt/README.md:
+ id: 0806154492f9
+ last_write_checksum: sha1:a8b75526dac340b813f687081fab11165dec3d11
+ pristine_git_object: 99c5b7996c65d09da7a83c9de11b3e4a98442e71
+ docs/sdks/tts/README.md:
+ id: 0c425074d09f
+ last_write_checksum: sha1:dc5da92e8d50ff1e5b91bb4571bf900aaf7fc5f5
+ pristine_git_object: 1543931c82477df894cca5b2a2e32838bc66bf5d
docs/sdks/videogeneration/README.md:
id: b6dbf7b0729c
- last_write_checksum: sha1:594c4bbe8b2396d28e4a5fe664e21de4d2dc8444
- pristine_git_object: b2f26971f1f28f4614f021ffdb87fe958522d029
+ last_write_checksum: sha1:caee1abd23bfb62bc9cb2e280efa51c98cfe38ef
+ pristine_git_object: ec02618703a38431fb34c15919848501ace2c91f
+ docs/sdks/workspaces/README.md:
+ id: 1f5b051a6380
+ last_write_checksum: sha1:b83b2a0c83ea3472aff7ff3573b4cfec737c966e
+ pristine_git_object: 8b87895fc40d01d8792d98c833cbdfca2ce51ccd
py.typed:
id: 258c3ed47ae4
last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:fe68c7165977ede3cf438be1344f72e54cf67919
- pristine_git_object: c678027236e18070a0081d37fb78bfd44392a8c0
+ last_write_checksum: sha1:62d35f2ecbe840540100da937920ee63980a1e12
+ pristine_git_object: 9e4606d0c68e092819b9d86eb23859bd85c5ede7
+ scripts/prepare_readme.py:
+ id: e0c5957a6035
+ last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
+ pristine_git_object: 03e9f9b59063c73d6f24995a77cdb971f3318d30
scripts/publish.sh:
id: fe273b08f514
- last_write_checksum: sha1:adc9b741c12ad1591ab4870eabe20f0d0a86cd1a
- pristine_git_object: ef28dc10c60d7d6a4bac0c6a1e9caba36b471861
+ last_write_checksum: sha1:b290b25b36dca3d5eb1a2e66a2e1bcf2e7326cf3
+ pristine_git_object: c35748f360329c2bc370e9b189f49b1a360b2c48
src/openrouter/__init__.py:
id: 4514650f64eb
last_write_checksum: sha1:da077c0bdfcef64a4a5aea91a17292f72fa2b088
@@ -3446,32 +5772,40 @@ trackedFiles:
pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:8283c360656da42036d190270a7ad47551bc4317
- pristine_git_object: 4d43d337f71492564f02b651e5bfc78d27932ac5
+ last_write_checksum: sha1:dd226a1c87253767a3a41d735f600db8980faa45
+ pristine_git_object: fcebde34f88b9450f406b1563d00942dbd6d7b80
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:749055fb2e5719d1cdc72c4391d83cb498e37080
- pristine_git_object: 923a5f8c432f42427caa517e5fb1fab9b10f029e
+ last_write_checksum: sha1:4c037d1c4fc922061ca968b9cd961b2db69429f6
+ pristine_git_object: e4a30e1b293a197994317a1e2169619fcbd0a0c6
src/openrouter/basesdk.py:
id: c5733c5a1e12
last_write_checksum: sha1:71f242fd9955e5a17a8d055e2210cc2708bb94fc
pristine_git_object: fcffdcc6eaa61a4b79f7f1f76458eeb27e8f896d
src/openrouter/beta.py:
id: fffdf54fd8f5
- last_write_checksum: sha1:64e68d68415d70fc30bb8f55491935c1c4bf7214
- pristine_git_object: 5e7c70d1f15e0699b4b4099322ef2217f66b4696
+ last_write_checksum: sha1:7999d9294e23e166c6b27236262f1fb40139a4d1
+ pristine_git_object: 9c02cc64163adf027507af763e7b612d3b704adb
+ src/openrouter/beta_analytics.py:
+ id: 81988b170188
+ last_write_checksum: sha1:289c9aad2d6787aabc6fa84952748de6189f7180
+ pristine_git_object: 6c56ac11235d3ba9752ccc75299be655a9678ef5
+ src/openrouter/byok.py:
+ id: bec352462ae1
+ last_write_checksum: sha1:2508c32fac403ebb6dbd65eab53601d88039fbc0
+ pristine_git_object: 9c2b675374900474076991a713a40ad119ee8b17
src/openrouter/chat.py:
id: 723fdce15c1d
- last_write_checksum: sha1:5bce19b139e225e62bb28fd2143bd6fc28b4f9cd
- pristine_git_object: bfa078ebbbff63f2c80860abf718fc57abcac2bd
+ last_write_checksum: sha1:134121bd2f0c3e5e928ac783c705ce3ba7377ee6
+ pristine_git_object: 3b47457b9e9bb17942a99aa1ae297195ab62aa39
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:fba957e705a1e6222a64cdd71111390c6e14826e
- pristine_git_object: e41de295792aaaea529e94d6c70c3ee111266202
+ last_write_checksum: sha1:ed8fa9af5ffd2d90eb89d0acba5ebf9a774b89f8
+ pristine_git_object: ebf1361a13695019951e306d9dce69367a3a62f8
src/openrouter/components/activityitem.py:
id: 3bbe7d35f459
last_write_checksum: sha1:32b873ba5c0a9dbf5f0cf32c0217ce17395ae69e
@@ -3480,26 +5814,194 @@ trackedFiles:
id: 0bd8d79c3144
last_write_checksum: sha1:db8e3247cf9eb2c235d32949d36f7ae95870e8ed
pristine_git_object: 1138e6f6bc025546a86877749ce83aca4c46499a
+ src/openrouter/components/advisornestedtool.py:
+ id: 768fcc6bad2b
+ last_write_checksum: sha1:53c5ee4836751d76dced0302d5bc27c341b8e889
+ pristine_git_object: 02266270ccd1e567452d6bedfd858e08a99f507e
+ src/openrouter/components/advisorreasoning.py:
+ id: d5af5c19fc73
+ last_write_checksum: sha1:ee69d03c9da3a6b9b42c3e6525d21d9c1910cfa1
+ pristine_git_object: 7376346542022324ca4d8475237e78346ee607dc
+ src/openrouter/components/advisorservertool_openrouter.py:
+ id: 4442cd9ad387
+ last_write_checksum: sha1:c1825628e0bbba268e5addad89e7abe6e45b2926
+ pristine_git_object: 923d26368a221b79e489ab8bfa4356e05cbf2a5a
+ src/openrouter/components/advisorservertoolconfig.py:
+ id: 683887bb9db3
+ last_write_checksum: sha1:15fa9d64f76952001416c44aea307f5e1a631906
+ pristine_git_object: 7cfdf3a163cb42d995019d2dab522c97268efcd6
src/openrouter/components/annotationaddedevent.py:
id: dc032c9ad744
last_write_checksum: sha1:8e5d49d2b57114df7f4559b611d40769e65f9f78
pristine_git_object: 597a5e01e843b06758f9c49b32d5d18d473dd106
+ src/openrouter/components/anthropicallowedcallers.py:
+ id: b51c080db25a
+ last_write_checksum: sha1:250ea2824392b7c385c4375a029a256f3d10afb4
+ pristine_git_object: 500de1c23584b0c3d341a266cae5b820ea386dec
+ src/openrouter/components/anthropicbase64imagesource.py:
+ id: e6a1034d5833
+ last_write_checksum: sha1:4c1263288e19feb63ec62817f9ea77707958c746
+ pristine_git_object: b49ef8cacd77d250f3aaa013a02fbf693d1bef16
+ src/openrouter/components/anthropicbase64pdfsource.py:
+ id: a4fa00bbe8ed
+ last_write_checksum: sha1:a7ab626cc971478afac1d68b71c49b497e4b8662
+ pristine_git_object: 870c2e75705a43762b7aa2797e5b0cde4fe40d87
src/openrouter/components/anthropiccachecontroldirective.py:
id: ffa72802cd82
- last_write_checksum: sha1:526dea61f351102a3b51a90e9979460468f4bce5
- pristine_git_object: 67645f080ac04382b3f363455231d80771894dd3
+ last_write_checksum: sha1:d1bb4e32bf3463f8d5c05c2aea74b2acdbf5134f
+ pristine_git_object: 4b2567b583ce4e52e0607a0fbdb15a1d617df029
src/openrouter/components/anthropiccachecontrolttl.py:
id: 2ec3e3546afe
last_write_checksum: sha1:338e193bd6929eb6ed69da9bdb4e608e5db6121b
pristine_git_object: 05a105c6e4f6c9037f953e4620576a8494645865
+ src/openrouter/components/anthropiccitationcharlocationparam.py:
+ id: 6f6f0732b22f
+ last_write_checksum: sha1:a7d049bcc5d0a330259b3d9cf108bc9813f131bd
+ pristine_git_object: 08a89abd4ff0a298d2acb18ba2c5679ccaa9bbc1
+ src/openrouter/components/anthropiccitationcontentblocklocationparam.py:
+ id: 057124c0e6c3
+ last_write_checksum: sha1:fa10a8053e547b3aa5b6acfee29f78dd49c77112
+ pristine_git_object: 8763d42f5d83efc480dbb58dedeb54aeb4c12605
+ src/openrouter/components/anthropiccitationpagelocationparam.py:
+ id: "8776686778e3"
+ last_write_checksum: sha1:5d18922be6bdc1f6accf996602fc9927ec2c6bf7
+ pristine_git_object: 24af0c24590fdfb65a1ba4a6ac88bb1f4482e1a6
+ src/openrouter/components/anthropiccitationsearchresultlocation.py:
+ id: 3bed26599605
+ last_write_checksum: sha1:47a91f6d42c222e92ef50ed86dc086cabcbfe4d0
+ pristine_git_object: 2c3548be8462d3940c937a5dead7d55454766bd8
+ src/openrouter/components/anthropiccitationwebsearchresultlocation.py:
+ id: 1a120a6f2e0a
+ last_write_checksum: sha1:997517abf99c9f97c4c76936f92a95f40eb0cf7f
+ pristine_git_object: e64d16928a4efa5c07e431a317ec573963fe9310
+ src/openrouter/components/anthropicdocumentblockparam.py:
+ id: 2c3093530540
+ last_write_checksum: sha1:4f9df9f67a810e8f49fe0d2999d028ea488c843c
+ pristine_git_object: 2df45099e47db9a35b9dacae8d252b9835a78c78
+ src/openrouter/components/anthropicimageblockparam.py:
+ id: 71cab07562d1
+ last_write_checksum: sha1:66f59a1cce48420768957b63bb84ab02da6c144e
+ pristine_git_object: 05e677372c952726c9cfdfbcbc80b04ef62c7b82
+ src/openrouter/components/anthropicimagemimetype.py:
+ id: 2434bf06fc4f
+ last_write_checksum: sha1:2016e4ef5d678a2af645d50cb02e022c3918d494
+ pristine_git_object: fc80dce2c6b1ec91320eb1f712bff3fc89f720f6
+ src/openrouter/components/anthropicinputtokensclearatleast.py:
+ id: bdf1d86b77a8
+ last_write_checksum: sha1:d7eb401dc2a9c34ed99a50bbaab1c6ff360d87d7
+ pristine_git_object: ebabdc1ec60af852e6f3061a9ebc4de823a4592f
+ src/openrouter/components/anthropicinputtokenstrigger.py:
+ id: e48f71196f16
+ last_write_checksum: sha1:92fb29d4e239e0cb361dde42a1e61a8486233a34
+ pristine_git_object: 8ff4915a203908a5ae986f28357b7211590912d2
+ src/openrouter/components/anthropicplaintextsource.py:
+ id: ed38ef79c74b
+ last_write_checksum: sha1:b6584da4f7255412f12de31e02c522fb84d4cfd0
+ pristine_git_object: d16f6dc9a2449185ef45731cbcd0a78c266745ef
+ src/openrouter/components/anthropicsearchresultblockparam.py:
+ id: bccb7c6b3128
+ last_write_checksum: sha1:2917cf9fe9a10f160359e7f43ecdcaf7bf172ebe
+ pristine_git_object: f953ecdcfaf801ee1f89d23b3463642adbd85221
+ src/openrouter/components/anthropictextblockparam.py:
+ id: f387daeeb940
+ last_write_checksum: sha1:315ad4fb2c0cede75e5b8dfe3d8dcd4842a03322
+ pristine_git_object: 38b493a385198c09105ea265b7df96d068a8bd15
+ src/openrouter/components/anthropicthinkingdisplay.py:
+ id: 5d63f1a15f67
+ last_write_checksum: sha1:388d60bbe78d3b848744564f91b31142d7bfc7e3
+ pristine_git_object: 1cf485c1dfba4cfd5c04cb46006aa9ed641c7749
+ src/openrouter/components/anthropicthinkingturns.py:
+ id: 0bd09cb662d3
+ last_write_checksum: sha1:3b5fa1bc9cf844179b161cf44747727474ae86d7
+ pristine_git_object: 09137b74c4e5bc2c8c2a172118007121a502565f
+ src/openrouter/components/anthropictooluseskeep.py:
+ id: b4a5da2ccae6
+ last_write_checksum: sha1:b67e3c12aca15c6e969dd2907735c964c610bc2a
+ pristine_git_object: 75073a414ca1f8e879747e831b01acd25ddeb8a7
+ src/openrouter/components/anthropictoolusestrigger.py:
+ id: f38744b90fdc
+ last_write_checksum: sha1:6c367ebe08a45ad6f45ae9877e2852e917079c8e
+ pristine_git_object: 97aca7f4209ba9ad038b97e35b9b8b8cd0e6e168
+ src/openrouter/components/anthropicurlimagesource.py:
+ id: 291b4d476bb8
+ last_write_checksum: sha1:e6a8b32f053bfbe3debb8940b03135d1e8a00eb5
+ pristine_git_object: 9593a60c9228abbc8a9d3323b9dd5998e0134f9c
+ src/openrouter/components/anthropicurlpdfsource.py:
+ id: 1f1d455d7db3
+ last_write_checksum: sha1:37d89d625d5d7443993ac2c054b6cf37554eed15
+ pristine_git_object: c0a140bcee011f2f86eb22eadc03281f8f59b894
+ src/openrouter/components/anthropicwebsearchresultblockparam.py:
+ id: 7a85be31694c
+ last_write_checksum: sha1:a87c04e8e05b3424f44a8ed55225b1bcb05b40b2
+ pristine_git_object: b9df82ce0fe6474b55bdfb8bc79b6fa4492f3546
+ src/openrouter/components/anthropicwebsearchtooluserlocation.py:
+ id: 11ce6e19f6e8
+ last_write_checksum: sha1:43e5b88a03a2c16cb48e58bc33090ff8934e47c6
+ pristine_git_object: 888de6cb6bf49187c71e5b0fd2474cdc05f27e9f
+ src/openrouter/components/applypatchcallitem.py:
+ id: 532887f6dcc3
+ last_write_checksum: sha1:fd5ee933b7c7ab2160bc5dc95e967a67700201d4
+ pristine_git_object: 1a5f1e022b2cfbea90c13746a0bc3dfad1328fa5
+ src/openrouter/components/applypatchcalloperation.py:
+ id: d1e3d8983106
+ last_write_checksum: sha1:a5404122c3cb4d91cb0f3096abca8d953caf0e33
+ pristine_git_object: f0188f4465178b75362c6bcd0eb385d7804b1a57
+ src/openrouter/components/applypatchcalloperationdiffdeltaevent.py:
+ id: 59d7d1eb8040
+ last_write_checksum: sha1:6734b7c0e87b123d7b5c3967597967a41b42e54c
+ pristine_git_object: 830de6c18a699efe6444c95e335881a7b282992e
+ src/openrouter/components/applypatchcalloperationdiffdoneevent.py:
+ id: 592026769da7
+ last_write_checksum: sha1:708f23eeb58503cc389449b0dd97ac2bf0045435
+ pristine_git_object: d03decfa67050aa2d35106caa46d4aadd03728bd
+ src/openrouter/components/applypatchcalloutputitem.py:
+ id: b412ea6dde1f
+ last_write_checksum: sha1:9056677a3c330dfcf563b8689a5ff348fc7c450d
+ pristine_git_object: 1b768e6e402356ef39d9754a1031bded2d9d6959
+ src/openrouter/components/applypatchcallstatus.py:
+ id: e92aac2d606a
+ last_write_checksum: sha1:c5cd7c843e94088b14774838c28a96ad291d1de6
+ pristine_git_object: ae5ca583f5508384e83feac7e7061718e524403c
+ src/openrouter/components/applypatchcreatefileoperation.py:
+ id: 07913d18bcb7
+ last_write_checksum: sha1:2daef7a574b10e5d6b4c7c2bf779dfb27a5ae69d
+ pristine_git_object: 759113e2c64dd7683c38d490de2b0a721c4a3186
+ src/openrouter/components/applypatchdeletefileoperation.py:
+ id: 520bbea44725
+ last_write_checksum: sha1:1275ec4ef681ebca6ac40b8491307cd8f337b6cd
+ pristine_git_object: 2d84495652c5c3f8ae3264635b3eaaacc374ac12
+ src/openrouter/components/applypatchengineenum.py:
+ id: 4fb16dc2893c
+ last_write_checksum: sha1:2e051dee7789d9ae4810d953c2c2dc5a7396cf2f
+ pristine_git_object: 073a01a0cbaae2cfba2b71fc9562ff4a2df15cf7
src/openrouter/components/applypatchservertool.py:
id: fb93c63175d6
last_write_checksum: sha1:4e388dc3b303e77308413810a0c090f760debeb2
pristine_git_object: 0be07495eeb9ab2be9421d1a5deda27859865e57
+ src/openrouter/components/applypatchservertool_openrouter.py:
+ id: 60c161a64fd4
+ last_write_checksum: sha1:3c406ce2874327a95777f92b53996eba3403cc35
+ pristine_git_object: 158c52b8fb174faa5f41a646453d24fdc51f780a
+ src/openrouter/components/applypatchservertoolconfig.py:
+ id: 57e332dc2e56
+ last_write_checksum: sha1:d41203a12c96018db9821e6ec9431948e727cac1
+ pristine_git_object: 61d5a3b48c1532da0ad50272fb4940ea729502cc
+ src/openrouter/components/applypatchupdatefileoperation.py:
+ id: 73750662eb69
+ last_write_checksum: sha1:e3df65fa2392ca6b770c64009b7b79a6532a70f8
+ pristine_git_object: 8fdd6b92da195be2abf2104407f2e246be339f63
+ src/openrouter/components/apprankingsitem.py:
+ id: 96b71e49aaeb
+ last_write_checksum: sha1:32482fe732476ced6bf787f11418d9d41f1a7bdb
+ pristine_git_object: a0fdd970e608de2ce2ea6db7355763f3b6dbe7a6
+ src/openrouter/components/apprankingsresponse.py:
+ id: 9152f7bbc9bd
+ last_write_checksum: sha1:3995ff20e5a93c96f2160a143434e89feded1dd3
+ pristine_git_object: 2ccc3d9be586133e5d5138c77eacefa243987fb5
src/openrouter/components/autorouterplugin.py:
id: cf49add5d1ae
- last_write_checksum: sha1:efd7f350bb1712b793ecb53c64aad26938cf9be5
- pristine_git_object: 2cec0f748f21614b0d504ecc3b29006b95eeeb62
+ last_write_checksum: sha1:d507fa850102005c888956a1f6db60fabe61ffd7
+ pristine_git_object: 665aaa0a7c00f99dc717c95f8bb94bb21f925ecd
src/openrouter/components/badgatewayresponseerrordata.py:
id: f7a33d30d269
last_write_checksum: sha1:338789c4e0dc85ac1c949f3b7d35127f7309bb98
@@ -3510,12 +6012,36 @@ trackedFiles:
pristine_git_object: caaacbde392cefe0e8be9a0991b42fa653909bc2
src/openrouter/components/baseinputs_union.py:
id: d85e19ff642b
- last_write_checksum: sha1:96fc5c400f324fcc90cdefb7dbcadc3e120a80a7
- pristine_git_object: 7e501214d82701f45cc406ad676c4d690204854e
+ last_write_checksum: sha1:12249be51b825a297fdd94b2ffd19fcf0d221707
+ pristine_git_object: 25128bdb864052bcc6310b50d7dddccaa89a23dc
src/openrouter/components/basereasoningconfig.py:
id: 8bd09a7e873a
last_write_checksum: sha1:c7c812629a7fc46f8064bc874b77424b30df9226
pristine_git_object: 22bd982575db23648faceab9dbedf75fa1f1cb38
+ src/openrouter/components/bashservertool.py:
+ id: 1c5881bea648
+ last_write_checksum: sha1:d219a3a7a7b6437eca2cd0e4ed943e29225531a7
+ pristine_git_object: a3021f927334a614ae7df011d85a9d089110a3c3
+ src/openrouter/components/bashservertoolconfig.py:
+ id: c8c5bf3fd9a8
+ last_write_checksum: sha1:81677982839193e28247054976677c9a0b6b9420
+ pristine_git_object: 4ccf38dd2b387e4446d55f152c7998b78871995b
+ src/openrouter/components/bashservertoolengine.py:
+ id: 4648c91620a8
+ last_write_checksum: sha1:a4bc825f816c6207d69d3ca51098d05d14b0d69a
+ pristine_git_object: 7ea16739b5d329c1bdbf1b5bf21c74780bf39660
+ src/openrouter/components/bashservertoolenvironment.py:
+ id: 5533c01ab156
+ last_write_checksum: sha1:0d74bf725e24809c704e0c293d72ea96a897446b
+ pristine_git_object: 0e610680e018be53b3e62759ad61e9f7c416640b
+ src/openrouter/components/bulkaddworkspacemembersrequest.py:
+ id: c042d4bce938
+ last_write_checksum: sha1:dd5b69cce65985231a77351be04aadeecc85c46c
+ pristine_git_object: c7927258bba10e237972eb9ba2fdefc51c255c78
+ src/openrouter/components/bulkaddworkspacemembersresponse.py:
+ id: 2b00519587ec
+ last_write_checksum: sha1:0a06047ed1719ecae11bd563513eb1f4b7527c19
+ pristine_git_object: f46030f3a99672a57495047392e286d48cd1d4ad
src/openrouter/components/bulkassignkeysrequest.py:
id: f801d53f55d5
last_write_checksum: sha1:20f64607c61683eb2438b5b7411643e1340b2db6
@@ -3532,6 +6058,14 @@ trackedFiles:
id: 6c7ce2235489
last_write_checksum: sha1:c708637e9d6aaf9eef90747b3da1af97c1b73e92
pristine_git_object: 2435b0dc46cc7e26a961eafde84ca68ad52a0a95
+ src/openrouter/components/bulkremoveworkspacemembersrequest.py:
+ id: b420f0c56b0f
+ last_write_checksum: sha1:9564d3caa2da67db04624ffa5ada84fcdf31a610
+ pristine_git_object: a02c46cd5ea87dc00f6db01f1be72f36b90b05ad
+ src/openrouter/components/bulkremoveworkspacemembersresponse.py:
+ id: 5c4c7d603c5a
+ last_write_checksum: sha1:e64c15f3c75ca08aad6b32a7555ce3812c59a520
+ pristine_git_object: 69082ffbbb380c690ca659819bab53869b82f273
src/openrouter/components/bulkunassignkeysrequest.py:
id: f7ef88765f9b
last_write_checksum: sha1:a46b022e4264377b2d8c137f9d0df34824aa2100
@@ -3548,6 +6082,14 @@ trackedFiles:
id: e76005848b0d
last_write_checksum: sha1:48f2993ea9d7ff4fb9a0a44053ee1ca2e1b54d3f
pristine_git_object: 219148fc990faf0541310cf55cf11ffbcccc2e55
+ src/openrouter/components/byokkey.py:
+ id: 94a3339e7dfc
+ last_write_checksum: sha1:18628a1bfee383851a284845bd810df629974fc3
+ pristine_git_object: 033a6f367e4da3d56835bb0d593042f24bfa0930
+ src/openrouter/components/byokproviderslug.py:
+ id: 6738a8516caf
+ last_write_checksum: sha1:6ccf194550ae1f9844b3f2ef38523abeee676cf1
+ pristine_git_object: 1786f6d4d76b38ecfdbcc3281845b424119b8450
src/openrouter/components/chatassistantimages.py:
id: 993f9dcd8575
last_write_checksum: sha1:0b6be31bb9c8b3bc8f2098af5b2bd12b62a710bb
@@ -3626,8 +6168,8 @@ trackedFiles:
pristine_git_object: 7a6140f2b8afb0cde9b031322a4284c9cbce7e33
src/openrouter/components/chatfunctiontool.py:
id: 1fcf92f8a7da
- last_write_checksum: sha1:30bcc6404395f55b361c4e73a9f991f383a9b18b
- pristine_git_object: b0c0d436e5389ed1f997414145bb00d605489df0
+ last_write_checksum: sha1:e2bd26a5d3ed55cb33fc467d01e4acf6d63770db
+ pristine_git_object: ab87fc30e7ad511450887b29270689ae6ab0dd0b
src/openrouter/components/chatjsonschemaconfig.py:
id: d2278e414fab
last_write_checksum: sha1:69efa91d33e4767058c2d377814b820bb5104ab4
@@ -3646,28 +6188,36 @@ trackedFiles:
pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810
src/openrouter/components/chatrequest.py:
id: 5e39eaefa9cf
- last_write_checksum: sha1:33d4df3eb6abbe51b5f825ad878809ae5eb04686
- pristine_git_object: 7559c771fc127e9e112fbf6fbb80ee6a0e4370ee
+ last_write_checksum: sha1:b1b13e3f1cfe602fa882a746270ad3fd3cf0020c
+ pristine_git_object: 97f89d96cc2b0c370e64317c3cf1b7d102e81d69
src/openrouter/components/chatresult.py:
id: 9062fe2935fe
- last_write_checksum: sha1:b0a7c4966abc14496a4fbaf9d3cd596c845da797
- pristine_git_object: 35a7ea24902a10fb9daf16e7e56c42cf063c7453
+ last_write_checksum: sha1:b44dc25412b1206cc188d9516191a273d0f3e4dc
+ pristine_git_object: 85bb6c1a31b0f762b4a87928dc67114c954efaed
src/openrouter/components/chatsearchmodelsservertool.py:
id: e280d3720327
last_write_checksum: sha1:d16ee5aeba32baddf132119bcc46cf390020da63
pristine_git_object: 5c78164f31cfe7fe8d8e64f6b25e8bcf90084b77
+ src/openrouter/components/chatservertoolchoice.py:
+ id: eabe3865e853
+ last_write_checksum: sha1:67a9aec17ded5a161972cb77d09054c95eef4c5d
+ pristine_git_object: 51b7a93a2f8db581f9d80803428d3ea8a19a73ce
src/openrouter/components/chatstreamchoice.py:
id: 356768c2edcc
last_write_checksum: sha1:bb475a522fedfb04084c1b6b0e7cb5d8a0d4cdad
pristine_git_object: 9166d93e4c351c7465ba67e2e7f4708038d6ef2b
src/openrouter/components/chatstreamchunk.py:
id: 16cdd8d4a3d1
- last_write_checksum: sha1:4474a7f0b1e6bee8302231bd5cd6ed295d102a0c
- pristine_git_object: 24aa825cd2c2ca95464306d2c73e80378a049ebd
+ last_write_checksum: sha1:fe5022e99730741f13a46946596fe8221c9ae8e8
+ pristine_git_object: 52c37761f777435f6d75e03242f8b9069f08a84f
src/openrouter/components/chatstreamdelta.py:
id: 7484252729d4
last_write_checksum: sha1:2e1a6408c51e6519337e01c394f4ce7695edf573
pristine_git_object: 8d0c74c413e531eee7b7130e3cc3d9286a262229
+ src/openrouter/components/chatstreamingresponse.py:
+ id: 045cf83786aa
+ last_write_checksum: sha1:9e087f1821b264bf59828aae7bd7f9c35b838d74
+ pristine_git_object: cf5a90d9a20e7221f68d66a3338a9526a0cd06be
src/openrouter/components/chatstreamoptions.py:
id: 85e752c7d55e
last_write_checksum: sha1:9e989c9b9282d3a014d3933e6d2227ca242ae1f6
@@ -3694,24 +6244,24 @@ trackedFiles:
pristine_git_object: 17d6de61d58aaca1ae684b2e3ddaabfe225b2557
src/openrouter/components/chattoolchoice.py:
id: 3188396ab842
- last_write_checksum: sha1:c78f3f3f7cb1824fd00775f95e51b79c02b0633b
- pristine_git_object: 4bdebae06f62957cc2c962945714293aa239315d
+ last_write_checksum: sha1:92b8c533685a5e8f569d379f84fbae8617dab918
+ pristine_git_object: 7ade1162320e1ab6d4e93f10bdedd4dcf1125678
src/openrouter/components/chattoolmessage.py:
id: 7c42588b57f4
last_write_checksum: sha1:67bbf68b10bde230884fc78093a665e73916e913
pristine_git_object: 2ccba8386486b7a730816a9829b01754935a2e96
src/openrouter/components/chatusage.py:
id: f224a054bf45
- last_write_checksum: sha1:441960796299d49d6b7632d0b823250e08bbfccd
- pristine_git_object: 12b58ec62abb59b19530dc22f55065a5909aa08a
+ last_write_checksum: sha1:947079d2163225a49e423151de25dc6132df5bf6
+ pristine_git_object: 3a7357d8a6f725ba18b1f15215a197f11e917659
src/openrouter/components/chatusermessage.py:
id: 7777191e729a
last_write_checksum: sha1:1ecc9101c05178427d73e455de4d679ac8d78015
pristine_git_object: 9092aa329bdd58891c2c6f92a6d9c4228b37400c
src/openrouter/components/chatwebsearchshorthand.py:
id: 13091b97a3f6
- last_write_checksum: sha1:0b1c948199169dd81947509f41128c5df6d74e05
- pristine_git_object: 707f0cf6b3b874838ea24df2364ec8cc913df244
+ last_write_checksum: sha1:f119143175c06ae4c041faf2d56884039527c7dd
+ pristine_git_object: ee79798ccb0119bb798bcd1d553807eb9fd5e0fc
src/openrouter/components/codeinterpreterservertool.py:
id: a72c520afbf9
last_write_checksum: sha1:f6123d9808c530e0b042e0a30fbb1a11a82096e6
@@ -3720,6 +6270,10 @@ trackedFiles:
id: 74a77b6a8b21
last_write_checksum: sha1:135cdc82ad9f65401da11274c786e471888e27e7
pristine_git_object: ea86f79f7e10d7584621fb804ac56e7bb79578ba
+ src/openrouter/components/compactionitem.py:
+ id: f1535c3a68c3
+ last_write_checksum: sha1:b4922929d7588f19227f70092050063111a6cef9
+ pristine_git_object: eb9ac6983a6423622c1f8f027b6e9a898c0374ec
src/openrouter/components/compoundfilter.py:
id: 0cab72c7a3bc
last_write_checksum: sha1:8ff3005f188637f3a82bfb4c842ac1eed8fdb8e1
@@ -3732,10 +6286,46 @@ trackedFiles:
id: 212cdf3bcdda
last_write_checksum: sha1:ee91dc17cf80f2aa72eb976fdf60ad4c094ca45b
pristine_git_object: fdbfb1678062f33794f10f032a13f127c35a7db7
+ src/openrouter/components/containerautoenvironment.py:
+ id: 0c41c2609d28
+ last_write_checksum: sha1:d6b8b06b51d5f0ffc28b1644843a8fa8a576d31b
+ pristine_git_object: 78d8937bcdaf636d1df431e7fe868ae820b5f40c
+ src/openrouter/components/containerreferenceenvironment.py:
+ id: deb4c42c7020
+ last_write_checksum: sha1:4436d0c57e31a64e27e5fae97702c16b355ecfca
+ pristine_git_object: 30240faf4ac0c14701e9c0216960898351affa4f
+ src/openrouter/components/contentfilteraction.py:
+ id: 55792ae75016
+ last_write_checksum: sha1:450250c8a4cf3f24f3a6c2208a7d8be348b54b37
+ pristine_git_object: 55c559ec7a453e6aefa58dcb43738b7577ea79ae
+ src/openrouter/components/contentfilterbuiltinaction.py:
+ id: a7fbc29e9e94
+ last_write_checksum: sha1:da020541530a08c0e94babe42c024d53fac8e8c2
+ pristine_git_object: d5ba92a250e53b44240e5dedb4473cbabafd65ad
+ src/openrouter/components/contentfilterbuiltinentry.py:
+ id: 8506c7d8aca9
+ last_write_checksum: sha1:851b5909b1172792dca14b769907c01c0252499c
+ pristine_git_object: 294696be09b025418763830ade2f594898bf3b4d
+ src/openrouter/components/contentfilterbuiltinentryinput.py:
+ id: 98fd75740393
+ last_write_checksum: sha1:4dad4352ad3f4d527ec7e5a6643b36a75eaa6437
+ pristine_git_object: b51baca5c8e5517720f77eb928a1f5ad58ac0aa5
+ src/openrouter/components/contentfilterbuiltinslug.py:
+ id: f222de10f841
+ last_write_checksum: sha1:130e56231d8a3a4fd16516bf7734097471118b66
+ pristine_git_object: bbc07e6bf29faada2c71a0fd44fdaf3286b94f4b
+ src/openrouter/components/contentfilterentry.py:
+ id: 149ebe184f88
+ last_write_checksum: sha1:4e40edff6184741aeeb1f2c7416e9fbb451fc1c3
+ pristine_git_object: 856522d0916c23cb1d2f6573a417958f15e34bcd
src/openrouter/components/contentpartaddedevent.py:
id: a074d4f3e193
last_write_checksum: sha1:016196b914b861c920e8cea01b04207bddd5e286
pristine_git_object: 019b9064d04bf201e7599e79e605ca249bfab61b
+ src/openrouter/components/contentpartaudio.py:
+ id: 27c65df752ab
+ last_write_checksum: sha1:2cc9b156c69f4769f2277b8c8066791ab51794a7
+ pristine_git_object: 450ced1e1faed9dcc988279bae621546157aa0cd
src/openrouter/components/contentpartdoneevent.py:
id: ebc3878afbf6
last_write_checksum: sha1:8394f718a55af4ff9b1b0f8302e974d320f8cf7f
@@ -3744,6 +6334,22 @@ trackedFiles:
id: d6af351c330e
last_write_checksum: sha1:22c7d09037d2aca7022a4e1e507d44d2eb051a89
pristine_git_object: baee3cb60f9359158c57a53c75d1702cdeed6c2b
+ src/openrouter/components/contentpartinputaudio.py:
+ id: 7de203e77aaa
+ last_write_checksum: sha1:ad4a82c3884394a03affb2b22ef313cae31c5419
+ pristine_git_object: 99da9ad9b37d21f74f95d15dd360434de35f5bc0
+ src/openrouter/components/contentpartinputfile.py:
+ id: 1eecb9639c8f
+ last_write_checksum: sha1:7b327b1868bf8b215912cdfa55ff39c73cbae506
+ pristine_git_object: 1adf8a7bcb92f6760994c01268fc531fa5ae3986
+ src/openrouter/components/contentpartinputvideo.py:
+ id: 8f56736104b9
+ last_write_checksum: sha1:bf02984892ff6eb8baef8f63d317d4cb18c829a9
+ pristine_git_object: 6c6f819b7bd957c3cfcfcce5ee7cba97d05c42fb
+ src/openrouter/components/contentpartvideo.py:
+ id: 2dbef15bd5df
+ last_write_checksum: sha1:34ee6609ef4171a4d54b52e41b781970edcf8fa8
+ pristine_git_object: 50bdff02f1430696b08d5bb5dc38ba67704dad61
src/openrouter/components/contextcompressionengine.py:
id: a3965275d07f
last_write_checksum: sha1:8aeacab427a9277db44ef731fd7a38a58752a64f
@@ -3752,18 +6358,66 @@ trackedFiles:
id: 0262a4f96713
last_write_checksum: sha1:288a9cf2f3b3a0d90a71ac60f4c4a6f03f6f2444
pristine_git_object: 22758a015ceb978263246b58da19d382ae38938e
+ src/openrouter/components/costdetails.py:
+ id: 513b4309de6e
+ last_write_checksum: sha1:10436fdda1161f93c711bc0e758d9bb029a36ace
+ pristine_git_object: 7880cdc0b0ce6f4629616820c1e10997a7ce3468
+ src/openrouter/components/createbyokkeyrequest.py:
+ id: 238e868445b4
+ last_write_checksum: sha1:b2059c1109dc8176e07584010f957b4feb18a124
+ pristine_git_object: 1287f0a83fa8853b745bdf1b990cea4a8b1ecacd
+ src/openrouter/components/createbyokkeyresponse.py:
+ id: 2b6c5e13270a
+ last_write_checksum: sha1:a7a2a40b9ac16a975a4c5ecc8802fc0b7785691c
+ pristine_git_object: fcfd9d646f216fdbb715cbbaefa4382d75750b79
src/openrouter/components/createguardrailrequest.py:
id: 34d69149fb33
- last_write_checksum: sha1:8ee78165a84f16ed848fc6ce3ac7898df7d1a60c
- pristine_git_object: c6dd6d6088287c6f1cf8adc4841ba5756e59031e
+ last_write_checksum: sha1:4d55f63837eb18cfc0cddf215896c02082453dc8
+ pristine_git_object: 36bce65769a9cd0b1c0ff55ea7ebba19f3839c66
src/openrouter/components/createguardrailresponse.py:
id: b4e1bdf1de5b
last_write_checksum: sha1:ae20a5e7425510c240e5697d847b1cae65940bd6
pristine_git_object: d6c4a4dc73222668daddc2a1788d314ff30e8fe6
+ src/openrouter/components/createobservabilitydestinationrequest.py:
+ id: 58587fb98a32
+ last_write_checksum: sha1:40e34d00fd653d5281f195e2a00ec8bbc52812cf
+ pristine_git_object: 65aab4386d68d49d7691d381d177455721dc4687
+ src/openrouter/components/createobservabilitydestinationresponse.py:
+ id: 9a8561661e52
+ last_write_checksum: sha1:730054c12ad209d5f83b88825c946fd6f322e6e9
+ pristine_git_object: ecef8402236f2d5dba31f7cabf2dc79ea0ed67e2
+ src/openrouter/components/createpresetfrominferenceresponse.py:
+ id: 4b6609465770
+ last_write_checksum: sha1:169981e2df08762f8cc251f2dccc9c0848a16902
+ pristine_git_object: ffdb3753adda06f3d93b505ab17657337c66067c
+ src/openrouter/components/createworkspacerequest.py:
+ id: 3785d9b207c2
+ last_write_checksum: sha1:49ef014d2611e4c399c28d05763f5e1ad076b25b
+ pristine_git_object: e068f80885a98542edd9fef71c90ddc1647bf8e3
+ src/openrouter/components/createworkspaceresponse.py:
+ id: 986d9ff993c1
+ last_write_checksum: sha1:7e9028b437a9e33a7541ba222cf01e6629f5c74d
+ pristine_git_object: 54c7b43902b4c72a43cf4ea1fa965edbdecb5304
src/openrouter/components/customtool.py:
id: e83b0c530680
- last_write_checksum: sha1:4ac260beeb9cb5b2bd21156d23315263ebe7f891
- pristine_git_object: 128bede72e4efe343a109ae6f37dbd646a3fe20e
+ last_write_checksum: sha1:df7d648e8a112d0b6222eb43edc62fa227c1f195
+ pristine_git_object: d2437932aeb30a0ad8cf1a31192afa86dd89a8d4
+ src/openrouter/components/customtoolcallinputdeltaevent.py:
+ id: ee80a0e981a3
+ last_write_checksum: sha1:784ec213ebcf9a386aa3f0528602089181a5baa2
+ pristine_git_object: bb8eacdd973b461a678907f617388f07865963ce
+ src/openrouter/components/customtoolcallinputdoneevent.py:
+ id: d095aa6434df
+ last_write_checksum: sha1:77ec279805273d75c8ff3144e7fbbbfb10c5c095
+ pristine_git_object: 308a29665db6048780b3d9d3dad551110e002cfe
+ src/openrouter/components/customtoolcallitem.py:
+ id: 232ac63226eb
+ last_write_checksum: sha1:a1ec646d50681fa4106fb0ee63d2b4fc2f4084e8
+ pristine_git_object: 486f76dc6d1207486f815919e9bb18354f418297
+ src/openrouter/components/customtoolcalloutputitem.py:
+ id: 533940b12cd2
+ last_write_checksum: sha1:9702dd53b6f12e5fbc9b6d8d8b19fbaa4cb712a1
+ pristine_git_object: c8201422a35e2c12c9e4321c3622f95f76a3234a
src/openrouter/components/datetimeservertool.py:
id: 444350bd66f4
last_write_checksum: sha1:ce9c7aba930c6a8764ca762052912d6533ccf53a
@@ -3776,18 +6430,38 @@ trackedFiles:
id: 548f4f885c22
last_write_checksum: sha1:ed72fc048f61ec663361ab2206cd140c35971a0e
pristine_git_object: 26ed6c6d3d1615aa9b6130e1c751e0d72c138f3b
+ src/openrouter/components/deletebyokkeyresponse.py:
+ id: f9a1e677521f
+ last_write_checksum: sha1:7e0f7e27823afde2d4c336e6c04bd8c182400822
+ pristine_git_object: 19946d23691aa52b2c97b15bb262a1b9a0849585
src/openrouter/components/deleteguardrailresponse.py:
id: c3ac908331ef
last_write_checksum: sha1:8984f78ae6a2b3ee8b16d7f0018622ba725c1583
pristine_git_object: f31843cfe4e36f3f6371837221b6966fabaa563a
+ src/openrouter/components/deleteobservabilitydestinationresponse.py:
+ id: daf99e240820
+ last_write_checksum: sha1:a75abfba1a9f68da81c513c235873049d25e915b
+ pristine_git_object: 376515665c29fb3aba74b18df0c722d8e6b4e9e5
+ src/openrouter/components/deleteworkspaceresponse.py:
+ id: 5e45e8064f69
+ last_write_checksum: sha1:4e326914693c0d0caf901651cf214f73df624f64
+ pristine_git_object: bed459583970617979bb6aec394bfeb161274514
src/openrouter/components/easyinputmessage.py:
id: 72619a312585
- last_write_checksum: sha1:154ba5f3afee09526acdc5d6291584e01c54f6ed
- pristine_git_object: 75661670388ead48bc50e34948fbebdf8caa5f66
+ last_write_checksum: sha1:5d1d0bb1b9d9b1b219e59c38da859119e3e9419d
+ pristine_git_object: 60dabdac82555caed537bd848b2095d12ec19647
src/openrouter/components/edgenetworktimeoutresponseerrordata.py:
id: dc53aae5b171
last_write_checksum: sha1:5f40d76eafb399dfee5f6e5a8cc6eb94ecf3ff8b
pristine_git_object: b44fcaf3b15716035fc7bb13cac592f120e7afbf
+ src/openrouter/components/endpointinfo.py:
+ id: ce049670b5ae
+ last_write_checksum: sha1:914f173c73fe1035e56c9acf4ad9e23555bde95a
+ pristine_git_object: cac5d921655b370dfe940c0b5b893b5c07dc85ad
+ src/openrouter/components/endpointsmetadata.py:
+ id: a20b9ec1fb0a
+ last_write_checksum: sha1:15cd0294a8ee21a2dd415d556f3f1368fd1a9d6d
+ pristine_git_object: 52344436b1159f808478572a2ed6c90c24a1384f
src/openrouter/components/endpointstatus.py:
id: e935c578fce8
last_write_checksum: sha1:8a9c8184852faf1e3ca9a478e48df41ccac6fc33
@@ -3810,8 +6484,8 @@ trackedFiles:
pristine_git_object: fc29881e08f5804dd5ba0ab66572d6c74f83e0c4
src/openrouter/components/filesearchservertool.py:
id: 8ecc4d4a0ddd
- last_write_checksum: sha1:e8e50b2359f7c8e18f8a015720cb230cbffc9912
- pristine_git_object: 54e3cfb48db5ef4bc60aa64ba46837596c388316
+ last_write_checksum: sha1:59cdd1d8a27a94f52302d611952e2258957802d4
+ pristine_git_object: 974ee97d94c9bed742537fdaae159554e752202f
src/openrouter/components/forbiddenresponseerrordata.py:
id: 93ae47a0c337
last_write_checksum: sha1:dffd1d7517d9ad6ce139089de52a0308c2b234ec
@@ -3846,20 +6520,104 @@ trackedFiles:
pristine_git_object: 613c2bbaec296ed9b0da13f249ef96b9314ff9ed
src/openrouter/components/functioncallitem.py:
id: 5e69afffd660
- last_write_checksum: sha1:43301cbce07f88805e03ac0a1e1c236a382cd4d4
- pristine_git_object: 5f04a0596dc5e071e601336c6f710e6d47d1e296
+ last_write_checksum: sha1:0517e6c41fd95ca5252e59e0e618b96581ae3fcd
+ pristine_git_object: 82a1e6393654f4c9ff71ff2a9226f65898e365f4
src/openrouter/components/functioncalloutputitem.py:
id: bf659aa04e7d
- last_write_checksum: sha1:0beae7f5475531ffd58d6b8bcceb5e9ea987387f
- pristine_git_object: 239f67dc3d0b8bd82e81c1f510afb7df96397401
+ last_write_checksum: sha1:05314adb9f62ac4ace7eb3f265c5dce9350d2247
+ pristine_git_object: 842269afc3af0e15d7a720cb87aed32ae2c40e8a
+ src/openrouter/components/fusionanalysisresult.py:
+ id: 8c88c59e344e
+ last_write_checksum: sha1:d1ca69c25b7e3ad67b93d94853e2054ed5e0258c
+ pristine_git_object: 44526fc446b4e41290ea9198dc6cb764ad9bbf76
+ src/openrouter/components/fusioncallanalysiscompletedevent.py:
+ id: 2c5e1c627905
+ last_write_checksum: sha1:2dd1d0a1771e01acc7ff760d4df5c1a39a51369b
+ pristine_git_object: c6c88ac1cd387b7679d480ca5d9cf3590e4e6688
+ src/openrouter/components/fusioncallanalysisinprogressevent.py:
+ id: 88976d8d8503
+ last_write_checksum: sha1:7abc4dfb3dea17715135772104ce4ecb2aba5eae
+ pristine_git_object: 4031d8daac28fe0b52c53c1b640060180ed67aaf
+ src/openrouter/components/fusioncallcompletedevent.py:
+ id: 40c32bcd2f02
+ last_write_checksum: sha1:e0fdc079df2c1327a936ea5fa6b7efdd708c3b2f
+ pristine_git_object: 2297fcdd3102218b604ae043521e8f8c81ef46a1
+ src/openrouter/components/fusioncallinprogressevent.py:
+ id: aaf2111a3f0f
+ last_write_checksum: sha1:8bfc8f9c31e1262ba3e3839764585ef9c066ef5d
+ pristine_git_object: e1e93e92bd54a954caf726eac1530ad2af7f2f97
+ src/openrouter/components/fusioncallpaneladdedevent.py:
+ id: 575daaf9ac3c
+ last_write_checksum: sha1:9d1ab5e2b644cc83b465105f44c8f5328d2df9f1
+ pristine_git_object: 7ff73208f68196825faee20fe776e201c57ce4a2
+ src/openrouter/components/fusioncallpanelcompletedevent.py:
+ id: c3a8b03a6fec
+ last_write_checksum: sha1:9b428ccb90d6c43169c03fb9eb997eb04820635c
+ pristine_git_object: ef91f4cf59acb817c7ba6a425bba6299526a1b5d
+ src/openrouter/components/fusioncallpaneldeltaevent.py:
+ id: a93ad10888da
+ last_write_checksum: sha1:edb80456e74df679b775ad0e3360bdae83991cad
+ pristine_git_object: 223d8c97f88e2df5734d52f644ef633868d3a110
+ src/openrouter/components/fusioncallpanelfailedevent.py:
+ id: 59fae63a6e30
+ last_write_checksum: sha1:2dda55a36f728072bc5a6d9669b5bf03bdc51ea5
+ pristine_git_object: e1ac791907e1930190b5559681a1b7ffea94fff9
+ src/openrouter/components/fusioncallpanelreasoningdeltaevent.py:
+ id: bac5f1ccbeb6
+ last_write_checksum: sha1:5f358080a345ce85fb357b95f3e7487150f6a9dd
+ pristine_git_object: 2836ce37ac58b2b90568bbd6247fa52b982ef131
+ src/openrouter/components/fusionplugin.py:
+ id: c0b307f15bb0
+ last_write_checksum: sha1:98091133a190692fab9b2df01096ee24d34ca827
+ pristine_git_object: c998bf9198ca3d6ea348fd9b3b549767bc6804b0
+ src/openrouter/components/fusionservertool_openrouter.py:
+ id: a1d6d3aefe6f
+ last_write_checksum: sha1:db6085cf3a96f2ff93707bd0209f59cfe153f467
+ pristine_git_object: 5729ea0c31a0ce7283a77316282ea77c91f13ae3
+ src/openrouter/components/fusionservertoolconfig.py:
+ id: 0d1d229c531f
+ last_write_checksum: sha1:9f013aa6431316312a04ad960d3ef26d0a341356
+ pristine_git_object: 4eae6cf00e69b060b3a99ef75ccc7a3762de37d0
+ src/openrouter/components/generationcontentdata.py:
+ id: 0140215b5b46
+ last_write_checksum: sha1:09e15ae2acc4f44084e2206ea51e6a06f4c5ee11
+ pristine_git_object: 065679a3408bbfd07e86646a6b3aa135cd573973
+ src/openrouter/components/generationcontentresponse.py:
+ id: c3f3f745a193
+ last_write_checksum: sha1:0a87a329f4b565c773d730ddc74595c6a0d64ddc
+ pristine_git_object: b762f6507fe7c7456df88a9400f82587fd6d63c9
+ src/openrouter/components/generationresponse.py:
+ id: 84d4e3e7da8b
+ last_write_checksum: sha1:1a0ae994291dab8c32afe0b129ceb15c588807d7
+ pristine_git_object: 5c2e03b079308bea3194df1d176a04d63660018c
+ src/openrouter/components/getbyokkeyresponse.py:
+ id: ca3a8db80018
+ last_write_checksum: sha1:9b428028a01ffb73915a278096ca51bd1c660326
+ pristine_git_object: a9f599456987f4c9dc84c36c9f7ba11d20b5ec0d
src/openrouter/components/getguardrailresponse.py:
id: 6f9054fab3d9
last_write_checksum: sha1:f20a0be686991d8f7ed0eb884612586052efc5c1
pristine_git_object: 6cdeb99e76ab6ad2e22b13164efbdb68cf8f328d
+ src/openrouter/components/getobservabilitydestinationresponse.py:
+ id: 45d85dd019ab
+ last_write_checksum: sha1:8219d5c3d0794996e29a82b1320d1cd7a1ad7395
+ pristine_git_object: 8cab91d07480938a14c4e8fe3e47cb54b891243c
+ src/openrouter/components/getpresetresponse.py:
+ id: 5ebf17bce6e5
+ last_write_checksum: sha1:0d89c3cfe0b49a201fdcb241886dbf48a2dc88b7
+ pristine_git_object: 3c24129bdebdfb21f5d5b1f2e973b2efb3fbdf99
+ src/openrouter/components/getpresetversionresponse.py:
+ id: 2175d9fa777c
+ last_write_checksum: sha1:cb5b03c3882ca42a654c54fcfac51745f307848a
+ pristine_git_object: c7fbebcf19b04a07eab66bc22732b25de0d3ad27
+ src/openrouter/components/getworkspaceresponse.py:
+ id: d993d0c4c3da
+ last_write_checksum: sha1:918535730d1c352bcc8fd2342e1c4cea89bc357f
+ pristine_git_object: acda534cb0ced2a391479b720434cf0f57f46276
src/openrouter/components/guardrail.py:
id: 67ee78dd06e6
- last_write_checksum: sha1:51ab908cd40c1dad9c499c4dec4ebb29ecd94b87
- pristine_git_object: afc25c729b3d7583ea116b1fbdb0e0e3e06aac3a
+ last_write_checksum: sha1:0ee86031c907b1fda6e8f6fc2f80d76db2534289
+ pristine_git_object: ec0d13984df644fea39ef2e985116627aa2e7291
src/openrouter/components/guardrailinterval.py:
id: 01687fc135ab
last_write_checksum: sha1:430f886f371b85777346de663202d62708cd84cf
@@ -3894,8 +6652,8 @@ trackedFiles:
pristine_git_object: c9609dbda39bbc43666c9625cf58baf469a6160c
src/openrouter/components/imagegenerationservertoolconfig.py:
id: 76f45207c1be
- last_write_checksum: sha1:8d092f865ab995390b0370627657a8689c6a36aa
- pristine_git_object: 7b7010abb24612645e134c7052a9475ca327b2d5
+ last_write_checksum: sha1:065e1ab5d5e29f01bc86428ecb438ad9f7f9dc7b
+ pristine_git_object: 0fdc8f67a8af50e789e2ae73d647d9ba43b703b2
src/openrouter/components/imagegenerationservertoolconfig_union.py:
id: d1c630a1476a
last_write_checksum: sha1:50d45b5a787e8cc9024c05b31e4113993ffe4038
@@ -3918,20 +6676,24 @@ trackedFiles:
pristine_git_object: 7a6dacdccea14227eed247b8c2442a79578608e1
src/openrouter/components/inputimage.py:
id: 995d068f1073
- last_write_checksum: sha1:1922908de3eb591081acf99d2a34b1659ee54c69
- pristine_git_object: 279f76bb22e6b123d6ba49447c5a5098871fb9f3
+ last_write_checksum: sha1:4fa2c93999bf024faa82d33f8f36856158cccf93
+ pristine_git_object: c249efe66d797aac2bff3331387041b07f1edcac
src/openrouter/components/inputmessageitem.py:
id: 6c5260d62714
- last_write_checksum: sha1:79ef4e787e82e9839cb1523d5d8e34ff2afad5bd
- pristine_git_object: 9ee8aab8f11a526af00d93d20b69ffb7cd04f6a7
+ last_write_checksum: sha1:22efb4355a4409f396b6d239df77c9a95d71b05f
+ pristine_git_object: 0a812fcfc111c04d875fe3d6d9209f7ef975a6c6
src/openrouter/components/inputmodality.py:
id: ffa999fb401a
last_write_checksum: sha1:da607c1deed71fcc11d880b7cebe92471e2ec5d4
pristine_git_object: 3b0c560bc9298bd40e2cdf1933ed0d5b98bb919b
+ src/openrouter/components/inputreference.py:
+ id: 445c38e318f9
+ last_write_checksum: sha1:bed2447b9dffad61e1c2f900e91ec0abfb3c5355
+ pristine_git_object: a3d84a96f4553a320f5eee5d63f6bc5c244ab446
src/openrouter/components/inputs_union.py:
id: 17d6239cb6a7
- last_write_checksum: sha1:6b4ed04db14f3afdc0d62b9cc36da363101c4f8e
- pristine_git_object: 723f035840411ada143c5a48fa8372a9bb098d24
+ last_write_checksum: sha1:d10956498400233baa95936ae5f7756b1eda6e06
+ pristine_git_object: b4098988f58113db7ee9f9805a058d4e44b3abc3
src/openrouter/components/inputtext.py:
id: a995ae96be99
last_write_checksum: sha1:0e30dbfa1813d3e69e0ccd2511f50080cce0fb6e
@@ -3948,6 +6710,10 @@ trackedFiles:
id: 91397805fa13
last_write_checksum: sha1:cb5655008ac7209608b832f0d28de8c21a0831c5
pristine_git_object: 499f4923723d9e027cfc90e8481de44a123134b0
+ src/openrouter/components/itemreferenceitem.py:
+ id: d3c42b5f11fb
+ last_write_checksum: sha1:25fd74f1c34307a97931e1d2c138a1db347218ad
+ pristine_git_object: b5a0bc16faa52f26d293eea18183e4d0b0bbb901
src/openrouter/components/keyassignment.py:
id: 07a64362e7fd
last_write_checksum: sha1:769458eeb21e1b275a63ba7bdf70a60fe9506a8f
@@ -3960,6 +6726,10 @@ trackedFiles:
id: 8b28b05b8756
last_write_checksum: sha1:2a917ce617b652fa9bc490d8f74e661480ff4f81
pristine_git_object: 3b584a93c2329f2ff1c4b24a57abe0d238e35fcb
+ src/openrouter/components/listbyokkeysresponse.py:
+ id: d5f63cba5dd9
+ last_write_checksum: sha1:97cd54e94ba4996ebb43252ac31aa70511e0328c
+ pristine_git_object: 3cbde84c8d3cc12e69b9788bd365dc39f9fa27b8
src/openrouter/components/listendpointsresponse.py:
id: 7662d5774bdb
last_write_checksum: sha1:47bb7a70d674ab63a157333c6c11cd36f1f41a6c
@@ -3976,6 +6746,46 @@ trackedFiles:
id: 78ca80afcc6f
last_write_checksum: sha1:3edda0c8ff111abaf5332475d89a87e84f4f5d78
pristine_git_object: 1497ba3814f2f058c1332d8bcf92a2e2bbed0fe5
+ src/openrouter/components/listobservabilitydestinationsresponse.py:
+ id: 3752b99f5e22
+ last_write_checksum: sha1:34fd7efbbf22fb9004737ab0fea34881b4cce554
+ pristine_git_object: 181236d7dc0ba7e4fe8acc6aa722efafb8896262
+ src/openrouter/components/listpresetsresponse.py:
+ id: 5129f20282aa
+ last_write_checksum: sha1:7f6eb0cc006e238059384ec25321a7d03295294b
+ pristine_git_object: 0b639154349a89d9dd2260208ab5bc16036ea451
+ src/openrouter/components/listpresetversionsresponse.py:
+ id: c99fabaf956a
+ last_write_checksum: sha1:de6c8f9f4b6ef6ef16d62918a1dd16e0ec619c88
+ pristine_git_object: d75ab3b91f58885e0d43d10d399f3f67a87349e8
+ src/openrouter/components/listworkspacesresponse.py:
+ id: 0c5f98eddbf5
+ last_write_checksum: sha1:53b10630a44ccc43fa86a34e9a3f5a64f08488c4
+ pristine_git_object: b70d4bbc7e84bc0f9ae3beedb8784bbc46aae9c0
+ src/openrouter/components/localshellcallitem.py:
+ id: 0b6a39ef0319
+ last_write_checksum: sha1:1f597aa2fc434cfef556f8c5f07f9402c1c99c2b
+ pristine_git_object: 00560d64813819940abefe8bf2ef88fd2ff6f5d3
+ src/openrouter/components/localshellcalloutputitem.py:
+ id: 762eac87313a
+ last_write_checksum: sha1:e77e55b6ba383571090b89807c486a2442470cf2
+ pristine_git_object: c1fc1796eb8097b9a73a50f8927b7b5290e04f8b
+ src/openrouter/components/mcpapprovalrequestitem.py:
+ id: 30c0962de16a
+ last_write_checksum: sha1:d823d5a2d589949bc94d4f76dde21f8654695272
+ pristine_git_object: 3c56ace657bb934609744a7055f0ed0e3b3f5431
+ src/openrouter/components/mcpapprovalresponseitem.py:
+ id: b39dfe6b18a0
+ last_write_checksum: sha1:ffcbf766b3d7997fac0755aa4c0092d8622512ef
+ pristine_git_object: 3231df92cdf6fc65cda2ad77243e0332aa504916
+ src/openrouter/components/mcpcallitem.py:
+ id: e56a30943ca4
+ last_write_checksum: sha1:b3105515c3f44e0c6a8e503cc1004235bcf334d6
+ pristine_git_object: d593dd4020308ddd8b4191cf3afc2ae6163d0820
+ src/openrouter/components/mcplisttoolsitem.py:
+ id: f2dd3ab36ae6
+ last_write_checksum: sha1:c5e513e2923b074ddf393946b831e7037ac1cbb6
+ pristine_git_object: 305621bddb2ea4f663b694d17be70b6f99d38b50
src/openrouter/components/mcpservertool.py:
id: bb8aeb03a111
last_write_checksum: sha1:014b01dd6253437640d2b3fbd084cfddb2399073
@@ -3984,10 +6794,30 @@ trackedFiles:
id: c11eba01a3db
last_write_checksum: sha1:db9d3c5dcd61a231f7c93bc92a5adce4a4811ad6
pristine_git_object: bf257605d2a5dc41234cb9fcfdda939948b26388
+ src/openrouter/components/messagesadvisortoolresultblock.py:
+ id: e36ad7b5263e
+ last_write_checksum: sha1:4aeab70302022153c511d68625d64d91d699fd3d
+ pristine_git_object: d52ac13f673f5998b315547f515aac509ff7157a
+ src/openrouter/components/messagesmessageparam.py:
+ id: ed8bbab6720d
+ last_write_checksum: sha1:0f53182e86a40e39319eba4da2cbfc14cbd97a3e
+ pristine_git_object: 2eb70cadb07a2fefe8b43146a22744ca9d8c8271
+ src/openrouter/components/messagesoutputconfig.py:
+ id: 54d1e297f740
+ last_write_checksum: sha1:ced57d515995fb4a3fe9b8088dc212b5edf28a13
+ pristine_git_object: a5410bd961e2ce450b97e6a5702a336731b2e0ab
+ src/openrouter/components/messagesrequest.py:
+ id: 72b1f339024d
+ last_write_checksum: sha1:66dafe0b56379f70dd281f374e940f92dbfb225f
+ pristine_git_object: fc1f1dbb56c1de4cfd5d28058201ca5309a0e3cb
+ src/openrouter/components/metadatalevel.py:
+ id: 0eede47eef62
+ last_write_checksum: sha1:b4e7e6fc4e9016b65008e9ebbfcc6f018fe89ced
+ pristine_git_object: 1257b38d2001f34078cd1b052c20264e81a95e57
src/openrouter/components/model.py:
id: cef3adaa772b
- last_write_checksum: sha1:32480e573bb64c06f1cae9845ca6269b8d5ef926
- pristine_git_object: 14dc4b9b71d0dcfc4d55ab086f5a90bf8325c159
+ last_write_checksum: sha1:091b93cae931939e83e2fdcbf86f72ff36e9344a
+ pristine_git_object: 53fc43004c15681897f637536c1f8a023bee953c
src/openrouter/components/modelarchitecture.py:
id: b37ac27e512b
last_write_checksum: sha1:e1dd41aa140b2ca2c3bbf15abf74e034d42b0166
@@ -4002,8 +6832,8 @@ trackedFiles:
pristine_git_object: c197cb2c527296adff2c3cfd9e49bcbc48087ce7
src/openrouter/components/modelscountresponse.py:
id: c08f960ac611
- last_write_checksum: sha1:e53d3191d1edd6e289a90fe22c69ab1f02ec73ed
- pristine_git_object: 86bb27c9ce62c148a54ec7a61796154a2ca18c76
+ last_write_checksum: sha1:82669f5aa9379f6c90393ea0b78f2bafdce545df
+ pristine_git_object: 8d68ee4aa093ba2754a65f28e46a23a1848fd99b
src/openrouter/components/modelslistresponse.py:
id: c2d4bb2cac89
last_write_checksum: sha1:54bc618bea7ddcaa4e49082d601065c634fb2ea1
@@ -4012,14 +6842,102 @@ trackedFiles:
id: d99bd9d505d3
last_write_checksum: sha1:58ff3e6829b973b3db5ed7dda3fa11558ded04b2
pristine_git_object: c2db9e78ad403cc9c27269d0be222ec85706446d
+ src/openrouter/components/multimodalmedia.py:
+ id: 0a12ae380c2d
+ last_write_checksum: sha1:2e35b4bec2402b723fd8deef7e2029917d7f2e6c
+ pristine_git_object: 2cd306cd65f9caf6333e7b1cc3e49ee33d250d21
src/openrouter/components/notfoundresponseerrordata.py:
id: 6ebceef7a039
last_write_checksum: sha1:b57cbe36f5a56241d3736f59a6a10f974751feb4
pristine_git_object: 5b8ca0ce252ca2fc909770c5c338793b05877a91
+ src/openrouter/components/observabilityarizedestination.py:
+ id: 8926882c1d18
+ last_write_checksum: sha1:85184a10e7e8e135038392296e6e4bf6695a66e9
+ pristine_git_object: 142a548baf77b7e25fb0088cabb3a94fcc2bf34f
+ src/openrouter/components/observabilitybraintrustdestination.py:
+ id: 432de20d1c77
+ last_write_checksum: sha1:1ba768fc9387674e430704553c6f8e202f3396ac
+ pristine_git_object: 7980758411748f3fa6572b1d6cc4ce880f2cfb0f
+ src/openrouter/components/observabilityclickhousedestination.py:
+ id: 0bafb43cfee3
+ last_write_checksum: sha1:435fbc1308f18b3de2fc9b1ac59bfbadda3e8ff5
+ pristine_git_object: 7a65ddbf223dae22b08819f0f7d29d0fd719cfd9
+ src/openrouter/components/observabilitydatadogdestination.py:
+ id: 2b99c86aa089
+ last_write_checksum: sha1:efc7eeb2eef9722dc913b8becb8145339a74f669
+ pristine_git_object: 8043ffca2d6befe0d55f99f2680dc0eb006de93a
+ src/openrouter/components/observabilitydestination.py:
+ id: f02862444a3d
+ last_write_checksum: sha1:5dfc984fe4fe009ecf28a8cb83f9ddbbd9e71976
+ pristine_git_object: 340a94c501d3d3ad11f20cf4e8865af49a059668
+ src/openrouter/components/observabilityfilterrulesconfig.py:
+ id: 98476c1c326b
+ last_write_checksum: sha1:3e7a055391b5f2f279bd63fcc1fcb9c2758a620a
+ pristine_git_object: 25fc9cf1ba263cb0b3a2a6052053f1b36d0a8722
+ src/openrouter/components/observabilitygrafanadestination.py:
+ id: 36c8f26bcf6f
+ last_write_checksum: sha1:7da5854a2a876ee5de01748f335830d9b76a1bcb
+ pristine_git_object: 184ba8b4ca540d9d6e41d7602c98adb30f052d0c
+ src/openrouter/components/observabilitylangfusedestination.py:
+ id: 46cb7e3719a7
+ last_write_checksum: sha1:7a361db96534f6de202006e65d650f693f44b740
+ pristine_git_object: a2ceb50a62032b228c3c5d88e43cf9e04e2968cb
+ src/openrouter/components/observabilitylangsmithdestination.py:
+ id: 90dfe215aead
+ last_write_checksum: sha1:deecad5a2a928eb50256121b2dbd22d129ca5d19
+ pristine_git_object: cbde97094b8e38c7ba9dea8403370367053a2695
+ src/openrouter/components/observabilitynewrelicdestination.py:
+ id: 6294b06c08ec
+ last_write_checksum: sha1:3e86bd883c890ae8bb49615717cccb6e52a123b0
+ pristine_git_object: b0560ca9de4802cf7db780c8af9482bf03c31672
+ src/openrouter/components/observabilityopikdestination.py:
+ id: 404c6ff48b85
+ last_write_checksum: sha1:ac0bc9ce725b0d1655128b8a799dc1271224c740
+ pristine_git_object: eaf453b8df41874cb8cc700624d6573a39c030b9
+ src/openrouter/components/observabilityotelcollectordestination.py:
+ id: dc77f211456a
+ last_write_checksum: sha1:b7b74469814f54fd705e20f8ddc7a3698e338731
+ pristine_git_object: f58eeb0e280d818eb10f1487f1d0d73f877d44c9
+ src/openrouter/components/observabilityposthogdestination.py:
+ id: 3a9f4942fcf9
+ last_write_checksum: sha1:9392b36c72f3a5bdb65c08c58f0ffa6e9d70496b
+ pristine_git_object: abee5d8177121baa58015df90b2a644b73ed6a4a
+ src/openrouter/components/observabilityrampdestination.py:
+ id: 8559b9e7501b
+ last_write_checksum: sha1:2b808db5bda297b15e8bc63be5a7698ee08fcdd8
+ pristine_git_object: f8e119cc297a620040dd7d35edc99d7ca54b15b5
+ src/openrouter/components/observabilitys3destination.py:
+ id: 2022d25fe7d6
+ last_write_checksum: sha1:1e9c3b34e9cf23a8fcb751bf54ab35eb828d8a50
+ pristine_git_object: 96ea2a8e90e13bef34e0a42ef09e09f3284571f9
+ src/openrouter/components/observabilitysentrydestination.py:
+ id: d27b8b37d1f8
+ last_write_checksum: sha1:4a1ee1ed06b89d143a2cbb85e19818b3a591cc63
+ pristine_git_object: 77f86c72f1182db88568c4eafb8422f23bec9a91
+ src/openrouter/components/observabilitysnowflakedestination.py:
+ id: 4e4136c11a0f
+ last_write_checksum: sha1:136aebb1696d75080861153d3fe3608895885604
+ pristine_git_object: e6552f7abcfa18b702d31d6dc1a57a7ba31fa215
+ src/openrouter/components/observabilityweavedestination.py:
+ id: 6ee5e9677e6c
+ last_write_checksum: sha1:4f8991159946750cf3ff1ab9dd0364f9d204e241
+ pristine_git_object: 8474c7c74b1dd40e82080f24960692b7085a5080
+ src/openrouter/components/observabilitywebhookdestination.py:
+ id: 2f942be86581
+ last_write_checksum: sha1:a7c50d871c8d6ed60f6d999c60b2bf4d2ede5e9e
+ pristine_git_object: 3eced6d5cce8cda2d1798bea93e340c30b5a2c87
+ src/openrouter/components/openairesponsecustomtoolcall.py:
+ id: b1a8a20b6710
+ last_write_checksum: sha1:3f2a04c33ec98b85b78daf38019ad29e77556b6f
+ pristine_git_object: a7c4d28268ea6f20aba851547de1ba49bc525296
+ src/openrouter/components/openairesponsecustomtoolcalloutput.py:
+ id: 54a2863b76bd
+ last_write_checksum: sha1:eecd71438611310be3df2938cae7ad164a144b4f
+ pristine_git_object: 1fdfc5564527f668aaef926ea22784195be86660
src/openrouter/components/openairesponsefunctiontoolcall.py:
id: f201e89f8dcb
- last_write_checksum: sha1:502991b4294892f58dfbaf0f8dc4c8ffdcb08b6c
- pristine_git_object: f3a4cf75215d3ccad2be058f8423e8254d758551
+ last_write_checksum: sha1:288f5a70d1b7227946d18e12e106445dec191965
+ pristine_git_object: 2c0fa25be233851bcacb262a2a448320c95b595f
src/openrouter/components/openairesponsefunctiontoolcalloutput.py:
id: 1440f5810305
last_write_checksum: sha1:d24140b6566a04d5962fa967d28575c828502bf9
@@ -4042,8 +6960,8 @@ trackedFiles:
pristine_git_object: cd39badb7af07d0bb5390e687427aebd6230ea76
src/openrouter/components/openairesponsestoolchoice_union.py:
id: 1a0b229049a2
- last_write_checksum: sha1:1912fd554d0659742cdb7a30d381de1f97457ea5
- pristine_git_object: cca8c5f26eb9e616a5916a04f277f0d64a414ca7
+ last_write_checksum: sha1:d80c2658f7dc564795cabb57f3970c4a3af38689
+ pristine_git_object: edcd5ae548f85ba1be805bf6a6fb798baeb0dd29
src/openrouter/components/openairesponsestruncation.py:
id: 0c92464e7292
last_write_checksum: sha1:5df4098cf0472d2df40fdcc1350f81d6059a9ab7
@@ -4058,16 +6976,28 @@ trackedFiles:
pristine_git_object: 08d990d8cc07b7928158fc55784cd9d613f4c58b
src/openrouter/components/openresponsesresult.py:
id: 78f7e33b19e6
- last_write_checksum: sha1:8dd339b5021699b49dbfcff86e388947f61d5747
- pristine_git_object: fa04955d5675d8aef3ff3deaeb6560c7a0070f4f
+ last_write_checksum: sha1:20511d969d1679022d2bf3fd92584c613c2d5b63
+ pristine_git_object: 60eaf9f1e8860d8b064a58f9cb4dd2c27fcd061d
+ src/openrouter/components/openroutermetadata.py:
+ id: 87062f38be59
+ last_write_checksum: sha1:5f69423c82ec021b04be5d518f2b75acf671dba8
+ pristine_git_object: bc1d7f3bc726cfe0451e543ce7d8adde0d0cf305
src/openrouter/components/openrouterwebsearchservertool.py:
id: f5400a5de3cd
last_write_checksum: sha1:e1cd10158e15f88d5c2903b1508a42d4006f4f3f
pristine_git_object: 0f83d4405d1f2f7892dea255eac01aa34bd8ee2c
+ src/openrouter/components/outputadvisorservertoolitem.py:
+ id: aa64bddfa26c
+ last_write_checksum: sha1:020c7b0593a1b20ea9d20bc408f636b5134cde2d
+ pristine_git_object: 0387112161d086667df5f53bd6b50c3fcba65d0c
+ src/openrouter/components/outputapplypatchcallitem.py:
+ id: a755b7e7b924
+ last_write_checksum: sha1:85ee2ac5528e9a5799f76b77038b582266278845
+ pristine_git_object: 14c02013831202f1de640a03d98c0203efb7e62f
src/openrouter/components/outputapplypatchservertoolitem.py:
id: e38119e7e094
- last_write_checksum: sha1:7193cc63977b00836e70456e630e608563a2e233
- pristine_git_object: 5b2be1e4d805e992dd139ca6a37c0998dce05922
+ last_write_checksum: sha1:3f5d04634c8ea8f2877e8116c6b76a94be2dc695
+ pristine_git_object: 96d4daccc1132eab3f6157549b853766303e7dba
src/openrouter/components/outputbashservertoolitem.py:
id: 39d03767e214
last_write_checksum: sha1:1f60c9358728a826bba8a6226f11deba788120d8
@@ -4078,8 +7008,8 @@ trackedFiles:
pristine_git_object: 4e7aac5b5ff66ad429b406d62b8b6cec6824313f
src/openrouter/components/outputcodeinterpretercallitem.py:
id: f3d69267994b
- last_write_checksum: sha1:0972f4588d8f6c3364e51d69d2f1aaff763f16de
- pristine_git_object: a2363f953a090e92eb0052051734e4f2b821fde5
+ last_write_checksum: sha1:202fdff43e5e87df78451c84cde2966560932b89
+ pristine_git_object: e32218266e3fa7b434a9c6b2a075c5e15e11c238
src/openrouter/components/outputcodeinterpreterservertoolitem.py:
id: 628c3093647e
last_write_checksum: sha1:65f7bd8c941e9c16533c5cdbc309d46ebeb106ca
@@ -4088,6 +7018,10 @@ trackedFiles:
id: b6b688951964
last_write_checksum: sha1:6277e30250e00908ebdf47710d20b9d7bf54e684
pristine_git_object: 6d1009d4e2ce8adda879e3ba997ace6a25ece010
+ src/openrouter/components/outputcustomtoolcallitem.py:
+ id: a5deb8d3fe6a
+ last_write_checksum: sha1:1ecf1244f7a1b542b3af8be19abb8259a295e952
+ pristine_git_object: 5c3049d831dc561e2456a4b43269cdcee98fca1e
src/openrouter/components/outputdatetimeitem.py:
id: d7784d04fba3
last_write_checksum: sha1:95710e9c510d4b205ae5c52e512377a999c5c1ce
@@ -4102,24 +7036,28 @@ trackedFiles:
pristine_git_object: 1916f7da478607126180a8d7e25dcc56cd36c93f
src/openrouter/components/outputfunctioncallitem.py:
id: 516ed67b5406
- last_write_checksum: sha1:71708bac0660918fb3b71100435b232e0f9ad2e4
- pristine_git_object: 9df0afe02e5cd6b96e09933031df1d0a86906458
+ last_write_checksum: sha1:95288879078c977eb5cd2e63218ebffbc666ad22
+ pristine_git_object: dcfc7a806fbf5794ad168bca00344b005e0d16ee
+ src/openrouter/components/outputfusionservertoolitem.py:
+ id: 1d798a2bb7ae
+ last_write_checksum: sha1:3808bb5da64abfef93437fb05e494ea492eb9818
+ pristine_git_object: 0ad5d34088e18cd0727ce13c5b9a3b8d47a94297
src/openrouter/components/outputimagegenerationcallitem.py:
id: 48d20dc00e1c
last_write_checksum: sha1:6795b316ac97958ba4381cdd4d6cc6108d7bd1a5
pristine_git_object: abaaa53610171f25ed9d814f355f9a600101b254
src/openrouter/components/outputimagegenerationservertoolitem.py:
id: cb34639447d7
- last_write_checksum: sha1:2383f1a2904297a4289e0523778bb928f5614d1f
- pristine_git_object: e91756b3e8d3e46283706192f9e44d03770d0fb3
+ last_write_checksum: sha1:21f58c84bea8a3ace8b91bba914e54cf62dad70e
+ pristine_git_object: a94bd0964eb714782858820e0db39afc28a0dcc3
src/openrouter/components/outputitemimagegenerationcall.py:
id: 0b4cbdbd733f
last_write_checksum: sha1:f9ea61a170b8e516108d2d59b0e7df9d264d3aad
pristine_git_object: 897c4727eec2497fe15e5603187e24218c08ac87
src/openrouter/components/outputitems.py:
id: 90f107de3116
- last_write_checksum: sha1:3e25cbb638d9f753193e6c7882077468032a30f8
- pristine_git_object: 4457f805c46470e36ff5cfd30eebab43e0039a96
+ last_write_checksum: sha1:e899a996bb5d48ce8088035141a74414ab54b83a
+ pristine_git_object: 8eff2c70ff7f2801d490e6e37298ddf3d402f205
src/openrouter/components/outputmcpservertoolitem.py:
id: bb8c2536a58e
last_write_checksum: sha1:6cbe556b2268af0142d982007b273cc43b7605c7
@@ -4138,8 +7076,8 @@ trackedFiles:
pristine_git_object: ec59a9d5b4c96843033bd73783a7b923fb741928
src/openrouter/components/outputmodality.py:
id: 74c79e4cad45
- last_write_checksum: sha1:76cc17e2a535074d823d7250c3e856d165ceeb70
- pristine_git_object: c926bb65891bd067cfbf45ae48f960a63820aa70
+ last_write_checksum: sha1:a7e7205a3469166de2bd6649d94b8da6475cc3bd
+ pristine_git_object: 08bfb228f9e602675b1ec68de800e5f0602212dc
src/openrouter/components/outputmodalityenum.py:
id: 82bebf193d55
last_write_checksum: sha1:2983ef9a3c82244eff5f8b1184637a1fef13573c
@@ -4148,6 +7086,18 @@ trackedFiles:
id: 0bc0568f44f9
last_write_checksum: sha1:3c460a262ff94910ea443fa6ac7d3f6608c3209f
pristine_git_object: 50eff94f87fe82aba4fe330ee61e79ab885847fc
+ src/openrouter/components/outputsearchmodelsservertoolitem.py:
+ id: ba87dc220c62
+ last_write_checksum: sha1:f9682aae6fc8cafa19217af10d745180cacde1e2
+ pristine_git_object: f94949d2e5aedf4873295efcdf87f0f5367c1d32
+ src/openrouter/components/outputshellcallitem.py:
+ id: 9c6a586d3cac
+ last_write_checksum: sha1:b63e3c90c37f8a6b6d49d386f6417754a8ebad8a
+ pristine_git_object: d2ecd9f116e9c752bdef5b972f6a69ab9ee7e8a0
+ src/openrouter/components/outputshellcalloutputitem.py:
+ id: 9962f4d291a9
+ last_write_checksum: sha1:58a7a14968db8a009756f93f8b37071ee2b169a7
+ pristine_git_object: fca6bbd43fe7716ba4ab12bd9ee9d016c3c62800
src/openrouter/components/outputtexteditorservertoolitem.py:
id: 2a5dc9318fe6
last_write_checksum: sha1:75ce53e78b352b0427acfb5310b2500ee76351dd
@@ -4158,20 +7108,24 @@ trackedFiles:
pristine_git_object: 45dfd93dab49766840806b9263ab64da9f6fe0e5
src/openrouter/components/outputwebfetchservertoolitem.py:
id: 2b12eb287cdf
- last_write_checksum: sha1:9cbfbd687515a31c41c198f9fa0dcb82a1046932
- pristine_git_object: f443472d28fae0a33cf50463bd76525d0ba296dd
+ last_write_checksum: sha1:1faafdadd295f064d2d39c12330f256abb2dcf46
+ pristine_git_object: 71c97ae1ae222c114c3d0480b265031c47aa54a1
src/openrouter/components/outputwebsearchcallitem.py:
id: 8c94cd441023
- last_write_checksum: sha1:8eb97fbc2b8dd6a21377ca892ee6fbfd36924610
- pristine_git_object: 706303d7461ee7df2823f973f5ba517f076ed27e
+ last_write_checksum: sha1:6a078038a7059883f05accf9b0d59b7c065ce66f
+ pristine_git_object: 63fe1138ee646ae9cb5fd8056157207ab2885149
src/openrouter/components/outputwebsearchservertoolitem.py:
id: b1fcca0b3fd3
- last_write_checksum: sha1:c82e5ab1c16b409708c4997fcaf45d8abaa1e1b9
- pristine_git_object: 304cab51826d39b91964917148f886f8bb681149
+ last_write_checksum: sha1:a26e4a615a06a4e3e5841a6b69682694c5b2d9f9
+ pristine_git_object: 7d63fc52581d5f5eaaef5509467ea7f37eec7c5b
src/openrouter/components/parameter.py:
id: d76aede00388
last_write_checksum: sha1:bfd3c5f0f386b8c743f724c52ba51d97e49a1757
pristine_git_object: 9aaebc4cb7eefdce97f37e89d6d719e524d148e5
+ src/openrouter/components/paretorouterplugin.py:
+ id: b239c8e11899
+ last_write_checksum: sha1:9d070d49f1983cee493ba27cba80c41e6133aaf4
+ pristine_git_object: 6b12a70411a04b73112da5192baf0131b7f0ff36
src/openrouter/components/payloadtoolargeresponseerrordata.py:
id: 5209b3a61cc9
last_write_checksum: sha1:ba13b793314af45716d3ed5572abaad213d01850
@@ -4204,6 +7158,14 @@ trackedFiles:
id: 5a170d7d1f2e
last_write_checksum: sha1:9b269bd87a1f704a0f0fa731da57cb35bc960674
pristine_git_object: d572e3bfa6c8a55afa7d4f057fa17186652a98a1
+ src/openrouter/components/pipelinestage.py:
+ id: b87ef92fdac2
+ last_write_checksum: sha1:f3f59e51956dabc99e4006fba125ca1c334c5cbd
+ pristine_git_object: a5a763d022ed39dab6e7ab05ce28582d408d42de
+ src/openrouter/components/pipelinestagetype.py:
+ id: e84fda1bf034
+ last_write_checksum: sha1:ada3c3cbb5726f94c566c172bb3b682f0efbe9fb
+ pristine_git_object: 1cc72acc2047fb461b91f69083d37b5d5188acde
src/openrouter/components/preferredmaxlatency.py:
id: 20675ae045ba
last_write_checksum: sha1:279e300348daf2d15744ee9e0e6520639e95dfd2
@@ -4212,6 +7174,22 @@ trackedFiles:
id: 3b95bff6e301
last_write_checksum: sha1:74d3094c6b5ae6f1dd36d5714415d0cc416acb3e
pristine_git_object: ceb4be7e491c27a88e8c5987268e9cea098317e8
+ src/openrouter/components/preset.py:
+ id: 13d4da7b6a00
+ last_write_checksum: sha1:3e041a12828e5381280fe04b4a865658c5025796
+ pristine_git_object: f1a974c26cef7c16c23f4812f8f43818f5ce1157
+ src/openrouter/components/presetdesignatedversion.py:
+ id: de6fbdac35a5
+ last_write_checksum: sha1:a581657de9f8ea01864d545cf33aa30fca30fb33
+ pristine_git_object: 620f08f9b5c6a90fb633f9a7c7eac1579b961c4d
+ src/openrouter/components/presetstatus.py:
+ id: e35ad4382937
+ last_write_checksum: sha1:e780890fa7c4d038ef24695e40748875ac58022b
+ pristine_git_object: ded8bd39849de0f3dabccdce497157d5dec83058
+ src/openrouter/components/presetwithdesignatedversion.py:
+ id: c79d75630cd0
+ last_write_checksum: sha1:b2d4d09c7afbba3511e283c31d6b3b66ef90cdfb
+ pristine_git_object: cb5c91085cd5934b4f855a06a7c6e66c891cc32b
src/openrouter/components/preview_20250311_websearchservertool.py:
id: ecfe1a37c34f
last_write_checksum: sha1:0f1409a07771fe8ae5c7be7130a75424ecd7de5f
@@ -4224,10 +7202,18 @@ trackedFiles:
id: 40414eada27a
last_write_checksum: sha1:52707a8a06e2c03a4c671f909e42c6d1da6dabed
pristine_git_object: 72dd15242d7d35b2b493f90d0cdebf6f8a51d684
+ src/openrouter/components/promptinjectionscanscope.py:
+ id: e78ab231a530
+ last_write_checksum: sha1:f257e3ae2b6385cf758e891ba02601c435e92098
+ pristine_git_object: 170ae25c582bb8decd74e1c69bfa8353bd44e86d
src/openrouter/components/providername.py:
id: fcc722fa2fce
- last_write_checksum: sha1:5f1b8a8471ab3d11bd0d18927a9cd9c747bababe
- pristine_git_object: 7764a12512827640f3c32a22b199b09cd890b57f
+ last_write_checksum: sha1:8348b476c4ca50dc94c4c8cc1e7a4f94a2efd1d0
+ pristine_git_object: bcf5ebc091a731af5570f084e29fe69370bba382
+ src/openrouter/components/provideroptions.py:
+ id: 73dde6c8f359
+ last_write_checksum: sha1:56e3cb9a11a321b912717261e4c9c77629fa0d2e
+ pristine_git_object: bed74b035bbee71aa67125d8f4d957de09582099
src/openrouter/components/provideroverloadedresponseerrordata.py:
id: 5b693682570e
last_write_checksum: sha1:41a977452d58b52cb9d4b3a85f4b7970529352d5
@@ -4238,8 +7224,8 @@ trackedFiles:
pristine_git_object: 5145815e6196470f3f5f24893afdc4415d27c53e
src/openrouter/components/providerresponse.py:
id: ad3887be54c5
- last_write_checksum: sha1:d5988a5d8c6174971287275305c6b638b6325940
- pristine_git_object: 4856eee2be0d7aeaadc4cbacd0ba1b08e5886999
+ last_write_checksum: sha1:12dcb549ec2efb3c44296c77f16a4ce511197cac
+ pristine_git_object: be63eef02944fffd54074f2e9cef6b43070f7a36
src/openrouter/components/providersort.py:
id: 348e382bf494
last_write_checksum: sha1:57551507f95cd2e16ef995e1c13f859fd0726152
@@ -4260,6 +7246,18 @@ trackedFiles:
id: bde317b3d703
last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d
pristine_git_object: dfcecafdc6d2a3a3dbc7beec2f07e1258415b2b4
+ src/openrouter/components/rankingsdailyitem.py:
+ id: 9aab72b1d643
+ last_write_checksum: sha1:c753fd7363f424f144710ceb18456f882d7b6e6e
+ pristine_git_object: 7325fa4619692b4c395e6b6d068519bd37d4b063
+ src/openrouter/components/rankingsdailymeta.py:
+ id: 067dec7d316a
+ last_write_checksum: sha1:56d4331dc516624c2c7084c26b5043b0a0458a57
+ pristine_git_object: df1ae5d889c2b8d5608964f9da92be651be6cb67
+ src/openrouter/components/rankingsdailyresponse.py:
+ id: dcdb3308ad5d
+ last_write_checksum: sha1:e7c0e4a022ad6aedd4ed21bbc0eb0160b1dae70a
+ pristine_git_object: 9adc8e68c6993b0490e8d14e1d2c0f15694dde97
src/openrouter/components/reasoningconfig.py:
id: 754fc31a7b69
last_write_checksum: sha1:ac6669cbfddc54d2305d8389881406dd7c79f046
@@ -4358,8 +7356,24 @@ trackedFiles:
pristine_git_object: d3c77624292ba0985104a6125e462c305a633d84
src/openrouter/components/responsesrequest.py:
id: 8c850080ec5d
- last_write_checksum: sha1:d3736138872e8a2af2681707dac0d4b08c9f198f
- pristine_git_object: 357c19a3c8198fe785cee157960b438f96d84cb0
+ last_write_checksum: sha1:99fbe103f2e3de8ecfc1fb2ed767082605896237
+ pristine_git_object: 6f285c26c1a9857044e1dc57e1dceb004108a4d5
+ src/openrouter/components/responsesstreamingresponse.py:
+ id: 142379f3bd90
+ last_write_checksum: sha1:a48d6f3610f5d15248ef4d25a0d88a0a4a1a9db7
+ pristine_git_object: f42e7330886d2b9f721ed6fbd8eb9c286d03794f
+ src/openrouter/components/routerattempt.py:
+ id: 16832108a087
+ last_write_checksum: sha1:d68e885e38f3b531cf47e2663af17913a1dcb743
+ pristine_git_object: d47bd379ad5b3e0e548581340f4afaaf54d1d8ce
+ src/openrouter/components/routerparams.py:
+ id: 4563ca5dc421
+ last_write_checksum: sha1:c1d9388e903d23bdb4ab21334c9fe57c4d4db095
+ pristine_git_object: ae952a332acd3de14461078bce81279c90dcd54b
+ src/openrouter/components/routingstrategy.py:
+ id: 553fefb9814c
+ last_write_checksum: sha1:5db57f3fb6368777e8c2713eba613830d4f647fb
+ pristine_git_object: 2f0e24f4e60f92151982237f1b2e871fbbf03278
src/openrouter/components/searchcontextsizeenum.py:
id: c246413c0bd7
last_write_checksum: sha1:863a664a9f17def86180b0407c8233c263acfae7
@@ -4370,8 +7384,8 @@ trackedFiles:
pristine_git_object: 559ecad60dc51d3a30a5b40421fd0e1e5db2aaed
src/openrouter/components/searchqualitylevel.py:
id: 8fdb148edfb2
- last_write_checksum: sha1:ef6932e03bc19a234c36b511313826048241b56f
- pristine_git_object: 36eba036095d6981523ed162e3a9b30188731651
+ last_write_checksum: sha1:c48540ecaa98b3e1bff1d2ba8f8425f10990f476
+ pristine_git_object: 27deefd8a7092a2a0a0c31e77147d40750aafe4b
src/openrouter/components/security.py:
id: ae2ca334218a
last_write_checksum: sha1:e6bfa94172df4c823ed9dd83b9b2614e6890d462
@@ -4380,18 +7394,74 @@ trackedFiles:
id: 606d51d201e8
last_write_checksum: sha1:8b76218af34c1287190b8d4ac5d7fc3545bbbac1
pristine_git_object: 0b28bb2db7b7c195366e992bb71c03ac30cf9280
+ src/openrouter/components/shellcallitem.py:
+ id: 0b3b4f503413
+ last_write_checksum: sha1:917b39b2347de74ab3040a1b4f1d0ed6efee4a9e
+ pristine_git_object: 892539bfbacf3ee6cbc4a2e834215f0d84db2ebc
+ src/openrouter/components/shellcalloutputitem.py:
+ id: 54409ebc9cdd
+ last_write_checksum: sha1:5f26e4cef8b9e91e32f7d475d3b5e68ac87e9b03
+ pristine_git_object: fb4b3007a890802b57b3433c56451b92a0e29761
+ src/openrouter/components/shellcallstatus.py:
+ id: 3627230aad33
+ last_write_checksum: sha1:c026c8544f66c0ae9bdfa83b9d63502ee8f2907d
+ pristine_git_object: d73f76d594847fe672b31a6fd039514ff13222c6
src/openrouter/components/shellservertool.py:
id: ac0e4bd3caa3
last_write_checksum: sha1:06f390a37d82c115be033bcfceb3e99b30e1fc92
pristine_git_object: 7e26325a31eb3ed1dbd4323a0e61afc1f6bd885f
+ src/openrouter/components/shellservertool_openrouter.py:
+ id: 6ec5747cf94e
+ last_write_checksum: sha1:0ebabd7cc8b56974b1a2ab5d8c7a979b189626ed
+ pristine_git_object: 304313b820cff232b5f15758293fc16e480415fe
+ src/openrouter/components/shellservertoolconfig.py:
+ id: eab9ca1aa376
+ last_write_checksum: sha1:784a1ef685b02abcbad5bb37be33fa3c86c9c579
+ pristine_git_object: 35683098c15603e62032623494c36ab1d340e8f6
+ src/openrouter/components/shellservertoolengine.py:
+ id: 8a1dda027cc3
+ last_write_checksum: sha1:d8dd2e5aa21fd779a52853a0c496ed7a16d99bc4
+ pristine_git_object: 9f6e0f79211c943d6ed5d14d36406f6773bbca81
+ src/openrouter/components/shellservertoolenvironment.py:
+ id: 6d6e8d7d80ad
+ last_write_checksum: sha1:d065afdd505a8303f6ba8e268cef42a3e9ea39fb
+ pristine_git_object: 418953ba7366a6015934bf8795178d79adb03b89
+ src/openrouter/components/speechrequest.py:
+ id: 2a9400167112
+ last_write_checksum: sha1:62da67e554f2325d459f2a353472823058d3ff69
+ pristine_git_object: aebab1a4f975b5a3e3434fc3865cc99e090b9114
+ src/openrouter/components/stopservertoolswhencondition.py:
+ id: 2deeda4209ac
+ last_write_checksum: sha1:581e0ee62776d42bf598b9f68b998faabfecd3ce
+ pristine_git_object: f849efe7b7db68a7943d3081e41a28a4d3245aa3
+ src/openrouter/components/stopservertoolswhenfinishreasonis.py:
+ id: cb889529a04f
+ last_write_checksum: sha1:c5c3870b48330093fb2a90f5d26e87631fe26b72
+ pristine_git_object: 0a8dce7dc7a682df6f66157bea7e5d5a8db9fe54
+ src/openrouter/components/stopservertoolswhenhastoolcall.py:
+ id: 8e9c04ac7337
+ last_write_checksum: sha1:ccd2b2dcc74bad32dbd689ca9d262ca6fdfb7089
+ pristine_git_object: 881bbcd8dc12d0bb00ba515dce9b1fc14ed4a9dd
+ src/openrouter/components/stopservertoolswhenmaxcost.py:
+ id: 85203d97f949
+ last_write_checksum: sha1:cc73e094aeacaf1f2d7bffb900770e74804343e7
+ pristine_git_object: 58b2014e914a57c515a16c4a75fd4ecb264f63d5
+ src/openrouter/components/stopservertoolswhenmaxtokensused.py:
+ id: 9a6730f681a5
+ last_write_checksum: sha1:454d36fabc836d998e6134bbcdbe1240e706415e
+ pristine_git_object: 09cc67e69f314a43678568e5a667d3bb3a5af75c
+ src/openrouter/components/stopservertoolswhenstepcountis.py:
+ id: 17ecf648b839
+ last_write_checksum: sha1:a62152eff571a402bb6c830b40e541d6e06b2f16
+ pristine_git_object: 85c82e9d2446cae784225165851af3bdcb468b03
src/openrouter/components/storedprompttemplate.py:
id: 6be99e870ecd
last_write_checksum: sha1:6b7d17641d9e2b52010962cb586e32f99254db79
pristine_git_object: ffb7a43e64bfef2809683fe60a5d17744ea345c3
src/openrouter/components/streamevents.py:
id: 331636234c76
- last_write_checksum: sha1:9940f9b8ae8a4198a4ead72a1906bc31e979839b
- pristine_git_object: c663877267863a9a85e45c56c03004f642feca50
+ last_write_checksum: sha1:482d71c2b91da416ea0754f4cfc613465160208c
+ pristine_git_object: b1e1e147f0333345f7a25fecebb41b31e51127f6
src/openrouter/components/streameventsresponsecompleted.py:
id: fd244f61371c
last_write_checksum: sha1:011e0930c7994f64dbee78c0a4c2fa5d7167d8ab
@@ -4420,10 +7490,22 @@ trackedFiles:
id: e39bb8998edb
last_write_checksum: sha1:cd5570f2a08ea1c0315dfcbc0e4d704610adca41
pristine_git_object: 49f4ae2d09fa5d311465a0a77f7cede0f97f779a
- src/openrouter/components/textconfig.py:
- id: cbd40c12b745
- last_write_checksum: sha1:737f5adabb641d1d30152cee2f9a8db1e43d697b
- pristine_git_object: cf8fa534d38146d0734b6161264406d5d53b7955
+ src/openrouter/components/sttinputaudio.py:
+ id: d59edf301037
+ last_write_checksum: sha1:ee9580093ccb22ec4d5e2cdc6f9ddddd33d84d56
+ pristine_git_object: d1b15b44f530c920110bc808980fc89a00e3c879
+ src/openrouter/components/sttrequest.py:
+ id: 5fb1d469e16e
+ last_write_checksum: sha1:b810f4e689869b66855b9ee0cbaf1022b0e98f92
+ pristine_git_object: 5ea932b47f9c3885f004d615d761faa04524dc2a
+ src/openrouter/components/sttresponse.py:
+ id: 2dc8eb8daaca
+ last_write_checksum: sha1:7af7b04e09abeccee24863ae133cf811e9453b8d
+ pristine_git_object: d50a8c428ddd5293b059d3d15bdf1e46b2306a27
+ src/openrouter/components/sttusage.py:
+ id: abe8329af787
+ last_write_checksum: sha1:213749fb8f5389bc607b75300b6fcff714c83b6d
+ pristine_git_object: c7661d13e6970fcb82970968a85d5e8507bc0c0e
src/openrouter/components/textdeltaevent.py:
id: 6d1d416a373d
last_write_checksum: sha1:9a024e07b3f2d65d5f88e01f0e2035efd956f3fc
@@ -4434,8 +7516,8 @@ trackedFiles:
pristine_git_object: 9bc3b1fd09ca7d4be981ceb7b10e14fb157dbb5f
src/openrouter/components/textextendedconfig.py:
id: 150a449e46de
- last_write_checksum: sha1:8e6dd8672fcc687c8a930c533d94daac4bb4ce5d
- pristine_git_object: ee561b18699c16f952bc036a2d0903e0ea3a8d9b
+ last_write_checksum: sha1:81f539fffffee92247de216b1ddc9269b02fcd54
+ pristine_git_object: 89224c7a342575e694ac269e1773c4c2a0ad5c07
src/openrouter/components/toolcallstatus.py:
id: 32339139c3f3
last_write_checksum: sha1:a75631cdb460f190aa10d5557519519d1ef5fbe3
@@ -4468,26 +7550,50 @@ trackedFiles:
id: e8ca4a51f994
last_write_checksum: sha1:d9ff0dea491e12d5ccb28607eb65f00fe8d694aa
pristine_git_object: 1c70ab3d8b23363543675abe5d3b3566aea113e7
+ src/openrouter/components/updatebyokkeyrequest.py:
+ id: 5edad69c278d
+ last_write_checksum: sha1:3eecf8d3d312f2b4182149cefada105817ebce75
+ pristine_git_object: 9fa7cf678582d4bba8abca16fb8c85b455a13ebf
+ src/openrouter/components/updatebyokkeyresponse.py:
+ id: 31338080f7cc
+ last_write_checksum: sha1:794d77355ae37451076a6b5754c6c8cc77063047
+ pristine_git_object: a3664695c9722c531f7694851da76e51c2efe4fb
src/openrouter/components/updateguardrailrequest.py:
id: 6a557cd822a0
- last_write_checksum: sha1:c9a41a90ad1eee466855137101ae02def9c7e553
- pristine_git_object: c4000777114116a421b2e2f51675497ea89263ce
+ last_write_checksum: sha1:db8b40859e2bfd1621859c11221fa5f36c46e53c
+ pristine_git_object: ec5240af3f22a0f0594eabb321e8a2fe070dfcf8
src/openrouter/components/updateguardrailresponse.py:
id: 7b068d26ce31
last_write_checksum: sha1:2b63cbb90747f07f775d9a22e80f74c67221fea8
pristine_git_object: df833960211cc7ed2a2a42fddbeafda0092e1c0c
+ src/openrouter/components/updateobservabilitydestinationrequest.py:
+ id: d7a39fe04386
+ last_write_checksum: sha1:263118409610b46eec310464be179a5a70f7cc42
+ pristine_git_object: 1709ecff0d5fee2a11eadbdef457cf4c017bcf84
+ src/openrouter/components/updateobservabilitydestinationresponse.py:
+ id: 187c51d2b3a4
+ last_write_checksum: sha1:cadc62b37feddb4281e471d15627a9a1bef32cb1
+ pristine_git_object: 95abc42170d9ebeadee791d15c2bbc643720f1dc
+ src/openrouter/components/updateworkspacerequest.py:
+ id: 78d86b3b0a63
+ last_write_checksum: sha1:0dc21aeddda84729d3fce7ef38e1cd5798eacf99
+ pristine_git_object: 8271be1596210a1c6efcf3d5bd0f132ec1e7d115
+ src/openrouter/components/updateworkspaceresponse.py:
+ id: 46253fa9690a
+ last_write_checksum: sha1:4708e7e4cbfddc34ffc9ed4808a88bb5b4a61ebf
+ pristine_git_object: 35d7ad3f80af77356a5478b386be29773f31db69
src/openrouter/components/urlcitation.py:
id: fe4578e64ea3
last_write_checksum: sha1:c63b25e9b3162a543d7e4a8bb88f8a10b2d8d8d9
pristine_git_object: 5fbad2e52909780be771ec9e3aa3410cf0ed7561
src/openrouter/components/usage.py:
id: 965ca6748bf6
- last_write_checksum: sha1:0ad13adb2797e0e9f080bd695e9e349aa4364eb6
- pristine_git_object: 3ff415b693496c00c41261d09e7c0c12d83730fd
+ last_write_checksum: sha1:5f86e0218099e33187e8238eebd3bf1aef5d6c74
+ pristine_git_object: b140a02148be319bb2aeb0287bdd6e031ad6a3a4
src/openrouter/components/videogenerationrequest.py:
id: 70e3c9ff288c
- last_write_checksum: sha1:f892d1c5506561312151604aa837b90546603d7f
- pristine_git_object: db54f129779d55863e0ea63affc0600700d2fcaf
+ last_write_checksum: sha1:d837bc9dd6d8c5f181b999b7fc1a74de3287b7d4
+ pristine_git_object: 76da465992202149e8817e3cac145a239806c9c8
src/openrouter/components/videogenerationresponse.py:
id: 541f1321b072
last_write_checksum: sha1:051ace67776106616ec4c8e55cf2df9a99855d0f
@@ -4498,12 +7604,28 @@ trackedFiles:
pristine_git_object: 2b555be30b2462ae3065ed6a78918ba764289dae
src/openrouter/components/videomodel.py:
id: a544a49f7891
- last_write_checksum: sha1:5a49a75ead25b02765b589d207e3bb5e98bb190e
- pristine_git_object: f313821b8f9b35d48978c2040c1953b7a0d50f3a
+ last_write_checksum: sha1:4d900058a40b08ca5ff6b1060c995befc79e9413
+ pristine_git_object: 04170e1a7153868b8eef47234859263800b9c61d
src/openrouter/components/videomodelslistresponse.py:
id: 2e9d1ce2cf19
last_write_checksum: sha1:b94977aa6941f7cf15c889f1b7cc69b50cd35856
pristine_git_object: 796e741c43389a96f2ed44d3b5d862475a8af2cc
+ src/openrouter/components/webfetchengineenum.py:
+ id: 47c172c99604
+ last_write_checksum: sha1:e91d3b9e1954f7544de42d301eb79776085188ca
+ pristine_git_object: e4f9ca16aa1370113efe57ce1b4a3a1345a11b64
+ src/openrouter/components/webfetchplugin.py:
+ id: 805ebc159f19
+ last_write_checksum: sha1:b163f5009c5051b3af1e70ed5c5c5318b58d61f6
+ pristine_git_object: 51bb7ff75edca06c3c72094b954da6a2eb587e24
+ src/openrouter/components/webfetchservertool.py:
+ id: f861247ea1e0
+ last_write_checksum: sha1:76761dfd639356b765783eb5205226ec317a69c9
+ pristine_git_object: cbd34b30aaef5cf4262526df86edc35287b10787
+ src/openrouter/components/webfetchservertoolconfig.py:
+ id: 05cda975d2bd
+ last_write_checksum: sha1:49b23bf7e8d930bee11d9f4cc38765ddcc152b4c
+ pristine_git_object: 9b8cc5ce32dbde9b365e404efa3cecc12a981d53
src/openrouter/components/websearchcallcompletedevent.py:
id: a5818af2b521
last_write_checksum: sha1:538a39bf773415567086a28ff2cde66fd37ea763
@@ -4518,8 +7640,8 @@ trackedFiles:
pristine_git_object: adceee794cf8135f5db3b2d741dc6e4de9c4e968
src/openrouter/components/websearchconfig.py:
id: 3884d9509e8c
- last_write_checksum: sha1:203af5719bc5fb7c66956e4554eba9d3b1a30542
- pristine_git_object: dfe91153bcab48d544ee9a7f4a4d409640e6599a
+ last_write_checksum: sha1:cbfdd9cc0abfbe8438c0602dd8a29d1a04d206b2
+ pristine_git_object: 6db24abe2002d7628210d1417dd74ea393d1f091
src/openrouter/components/websearchdomainfilter.py:
id: 4a7307ed2ba6
last_write_checksum: sha1:043839dada28f82b33f70534895e98e7ee6ce7f5
@@ -4530,20 +7652,24 @@ trackedFiles:
pristine_git_object: 992db72e3236a262e2d93d2ed58f0ae44cc194bc
src/openrouter/components/websearchengineenum.py:
id: 97803317b825
- last_write_checksum: sha1:d9619246b43934e903790a5fc8a4802745d79f54
- pristine_git_object: e98eed23d754ed438624c041a7f433522e0e001d
+ last_write_checksum: sha1:4159789e76774df1a714b995d644011c49168d79
+ pristine_git_object: 90a22b964f3d318b9f5080f316d7fd171058c7e9
src/openrouter/components/websearchplugin.py:
id: 1d872d1792a7
- last_write_checksum: sha1:e6d621eeea6b000cb7cc4e75f2b0695a9426ac9a
- pristine_git_object: 93c8f70b055d065e08480b5a75ca23d74dbb57e5
+ last_write_checksum: sha1:824232ea50b6befbbfae9537d44c42fa2b84b26e
+ pristine_git_object: 3c8e46d68d02d7b60ccfbfc9ebcbcc92a443bd54
src/openrouter/components/websearchservertool.py:
id: 32c7333e3c21
last_write_checksum: sha1:57f9a9d65715b12f0ad7ddf88690b9eb656b074b
pristine_git_object: 363a4ea93e4eff5ac708bd2eb69aa6aada986075
src/openrouter/components/websearchservertool_openrouter.py:
id: 3fcedc999f5b
- last_write_checksum: sha1:f7419ca78cf720ba7968d0091740d3abdd8fb621
- pristine_git_object: 29b8262239fccee9b159ec93f0b6fe307d3e636d
+ last_write_checksum: sha1:81c68c3a06f55fee5b6cf18730f3bb0141d168a4
+ pristine_git_object: c5717ed5a3d7adf2ef2777ed76233365c1d5b443
+ src/openrouter/components/websearchservertoolconfig.py:
+ id: ebdaa99d47da
+ last_write_checksum: sha1:b9f17b263990249cfdbc238c902dde7c52241c43
+ pristine_git_object: e5aeae2ff37595892059bbd06a23043f8e83f781
src/openrouter/components/websearchsource.py:
id: a1fe81b68a7b
last_write_checksum: sha1:fa30e5813682231d742fb6861f0fe92f655c8e81
@@ -4558,12 +7684,24 @@ trackedFiles:
pristine_git_object: bdb5b03c5e524404f4aeb7123b0410b645ac8a74
src/openrouter/components/websearchuserlocationservertool.py:
id: 34efd6600d16
- last_write_checksum: sha1:cb3ea048d0ba10bb8fe943c8e1330e677f598a2f
- pristine_git_object: a716b872c7c00c57fc27733362d5e78120c89c3e
+ last_write_checksum: sha1:d283241abfbab4b0d36dbba7b6ca227c0403e375
+ pristine_git_object: bf4bb709e49cc25a82b441246ed709308a1360c2
+ src/openrouter/components/workspace.py:
+ id: 682282304bd8
+ last_write_checksum: sha1:ad9199698aa5679829b846839c25235b3039f457
+ pristine_git_object: 583db0c55612de3aff4fcbad1983d489eed9bbf0
+ src/openrouter/components/workspacemember.py:
+ id: b510f727fe9c
+ last_write_checksum: sha1:63595d8ce7e9df050f1bc97f7cf70b4215da09d0
+ pristine_git_object: 9ece87803cfa8b3ab38c0dffdfbd8de176eaaed5
src/openrouter/credits.py:
id: cdc961937101
last_write_checksum: sha1:2d49b088f5895c7d1b3167d6d99d304221812fb6
pristine_git_object: 0a376fb8ee2df0be8546458e0008a2fbc0fd492a
+ src/openrouter/datasets.py:
+ id: 2378f80d1d6a
+ last_write_checksum: sha1:057b0dde4e051f2cf5cd9fd5b82bbe45eb8fafc5
+ pristine_git_object: c483912549b3243f73b300bcea343914e66ef211
src/openrouter/embeddings.py:
id: 0374ace39067
last_write_checksum: sha1:8622e7717ef639f2ee452d295c4b2c957a2fe13f
@@ -4578,36 +7716,36 @@ trackedFiles:
pristine_git_object: dc5ef68c20dea9461abf913779f5f0e21defc829
src/openrouter/errors/badgatewayresponse_error.py:
id: 818c3605ce23
- last_write_checksum: sha1:d9d2599c2be63be36d3891bc94e34535edb3f05a
- pristine_git_object: b2138fd9fffc06d1715ecca8bf6dab150b3096fa
+ last_write_checksum: sha1:abf8470143de24b708943ca1fa0b7bcb2b4e84b1
+ pristine_git_object: 28ce1d4e5620021bcad39fbc58c45459013de4b1
src/openrouter/errors/badrequestresponse_error.py:
id: 562928a0bbcb
- last_write_checksum: sha1:dd8028bd3e353b2a279d0287393266f61337dac0
- pristine_git_object: eb34f266301fc7ba48b8d1403c5f4cf7e3291295
+ last_write_checksum: sha1:5cca64da1d9f3536b2ae9e0e13c75438c04be433
+ pristine_git_object: 514a2727d42471d1e2cba0002d1d2f67ce297dfc
src/openrouter/errors/conflictresponse_error.py:
id: 2411f691a552
- last_write_checksum: sha1:5dde74d955027d3d1ba8cbd5b19fc0a26538a55d
- pristine_git_object: 4c23784060e905d4dbd1416f0060b2ba3a302c43
+ last_write_checksum: sha1:17347336a5c3126c199c7f94da6ec9302111255c
+ pristine_git_object: 434f65c0e5b9165ed6ef608f4105ae200e66fc07
src/openrouter/errors/edgenetworktimeoutresponse_error.py:
id: 2a740d29452a
- last_write_checksum: sha1:11e8880778c0f2be20cb4c10e73daf5c8eb7bcb2
- pristine_git_object: c2881a581d72c7b444003ecd974dc0e38218afad
+ last_write_checksum: sha1:e8db1c9eb416ec255115337f0dee669644831cde
+ pristine_git_object: 4ba05c459f7c0885698b54fe7e500d41d65fd94c
src/openrouter/errors/forbiddenresponse_error.py:
id: 4c1d3e6c95a4
- last_write_checksum: sha1:930eb57082f282587d05c77b243990d4bc32fdec
- pristine_git_object: f9fd3e58e09630c176f4868c6a962c96c630eb8b
+ last_write_checksum: sha1:ddc14da480a282ee0550b73aa73fde7fa9d4a7cb
+ pristine_git_object: f6bd1810c53a35663add19d4066d8b59d6dcd2e4
src/openrouter/errors/internalserverresponse_error.py:
id: a5ab5c4a53a9
- last_write_checksum: sha1:f91e21d4022b0ede924736ab9664e63d73e64b55
- pristine_git_object: 2d8be8210d37497052c01738f86f8520b1ab737c
+ last_write_checksum: sha1:ce08c9c400461eb0e24aba17c443614e9ae18a36
+ pristine_git_object: 207c80c8e384e818a670a58fa451ae10ddd49cf6
src/openrouter/errors/no_response_error.py:
id: b8b987b5e306
last_write_checksum: sha1:7f326424a7d5ae1bcd5c89a0d6b3dbda9138942f
pristine_git_object: 1deab64bc43e1e65bf3c412d326a4032ce342366
src/openrouter/errors/notfoundresponse_error.py:
id: 283f4657fb1c
- last_write_checksum: sha1:d678c505934d319d79c75e73a5d28e2f7eddda64
- pristine_git_object: 99c3f9feba614b608c0a5fe33fdfef773fd20e2b
+ last_write_checksum: sha1:ed800dce3d8fe690376d7b3afaede1c80fb42b86
+ pristine_git_object: a79ff3ce9dcb8f7d18ca8b8a32c8cd89ff4a797d
src/openrouter/errors/openrouterdefaulterror.py:
id: ec1269b0a602
last_write_checksum: sha1:c7e323985411ebc622a365df7d1560db134e5fb8
@@ -4618,48 +7756,48 @@ trackedFiles:
pristine_git_object: a3218e9a6bc8dfa4093c179225507d55e0dec027
src/openrouter/errors/payloadtoolargeresponse_error.py:
id: 94bb184d04ae
- last_write_checksum: sha1:c2880729e81e6f5085bb4007b111242202237bb9
- pristine_git_object: 8b9daa272db8aee6adfbd4105124c1f4adabfb12
+ last_write_checksum: sha1:cd6a53126dfaf2e1ef6380d3ed19678df493e173
+ pristine_git_object: 2f118141eb32430c4b0350ef2fd624e69d0cb206
src/openrouter/errors/paymentrequiredresponse_error.py:
id: 323b9c0a7cdd
- last_write_checksum: sha1:7829364046b6dba0f27ed58acae3506ae516253f
- pristine_git_object: fe3b3c202d614b1cf15fff5629a0245f0deaaa38
+ last_write_checksum: sha1:e6969e50de086e6df048b998751be3dd748e1f5a
+ pristine_git_object: 1bd7e6bf443f5986b04c8cc03528d5fd73f71dab
src/openrouter/errors/provideroverloadedresponse_error.py:
id: 78dc52b11d59
- last_write_checksum: sha1:d73ada51520ca201ebd0ebc828513e333c3a4a43
- pristine_git_object: bdb7061a773907ab29bd9da4e38b492af8886b22
+ last_write_checksum: sha1:4c1dee619eb80b257f669ea830a07e73ad38b4c1
+ pristine_git_object: 4594e433f5247e9984203ab8be56119c58b0d342
src/openrouter/errors/requesttimeoutresponse_error.py:
id: 74f87b9d42d2
- last_write_checksum: sha1:82642353a23643f25d2541f6b3801a80f5003c6a
- pristine_git_object: 4937892a72d007b48f6852eedebc00db84c425b4
+ last_write_checksum: sha1:981c6f7eac598df76bee80aed26ca5a4b0f5f6b1
+ pristine_git_object: eb403d9a83e5ce274137de63e78142abaaadf29c
src/openrouter/errors/responsevalidationerror.py:
id: 861959e3671e
last_write_checksum: sha1:96842d22bdaacde74bc581692af0230b4aa2684c
pristine_git_object: 8d0d6fd5911c93c00c6a272d3c91ff16573f468b
src/openrouter/errors/serviceunavailableresponse_error.py:
id: 18cc83a0fd00
- last_write_checksum: sha1:b9eb34e98c775abff6c18e756039aad1751249a4
- pristine_git_object: b94cfc22f031873c995c5e8fb9b334387c886c6a
+ last_write_checksum: sha1:d654d25d43e19aa3214ba870259066c49bb8ff32
+ pristine_git_object: 0c9c74b3a67ce7131f6401e337ea3dc9a75d2f60
src/openrouter/errors/toomanyrequestsresponse_error.py:
id: a3f4058d56a1
- last_write_checksum: sha1:b83e40a5ee6a542d13ed6e5abc65002c87d3c33d
- pristine_git_object: bdf7914607cccd54fec4be42edd20b4aee00e069
+ last_write_checksum: sha1:807f834fadb128356eb5009d0348e4298a1a958b
+ pristine_git_object: fbbad1643a27eaed2626282e225320cbfc9828bd
src/openrouter/errors/unauthorizedresponse_error.py:
id: b26af31a1ee9
- last_write_checksum: sha1:3bf21eac6390dad775f1c75e537cd324cec99650
- pristine_git_object: 7f9c5a66ea59adc6989a7e0e5fd731d542c4b45a
+ last_write_checksum: sha1:05cda7a87e5024058aa8d3de83a8decfd03c154c
+ pristine_git_object: f70ea1cc64c798c46029381951fc7f1f89fe3996
src/openrouter/errors/unprocessableentityresponse_error.py:
id: fac4aa89599e
- last_write_checksum: sha1:5a76379b95c1c938e125641a1cb30568c1eae271
- pristine_git_object: 7304f75b9e8f3bef2d1c918f875420b26a15f8d7
+ last_write_checksum: sha1:5505f65c29d570dee9ccbc7188b50b3d833c68fa
+ pristine_git_object: d858f3b578b189d20b89d0dfc1a6b829ff5897ff
src/openrouter/generations.py:
id: 70e1c21042bc
- last_write_checksum: sha1:a8dcb94d3809b0b837398caca08dabd3c0481d21
- pristine_git_object: fddcce7468125b281b22f520928ee5d31f027fc5
+ last_write_checksum: sha1:f7df8719bf188b05a29b8694e6c2db7adb262bd3
+ pristine_git_object: 409e169fc5f43a0eea65b7568588c25c82abb46a
src/openrouter/guardrails.py:
id: 705839f34e66
- last_write_checksum: sha1:b8b1ea14cd57a7f4100f63efbe76d3baf5e62254
- pristine_git_object: 7d1038da0c7b1e6989aaeb070b1a2081157b53e1
+ last_write_checksum: sha1:212ed4757bf87d2acd6d179e25cf03d9ba3d64b4
+ pristine_git_object: beb82bf31bd9bca3baa7f61eb28105dfd3d22be3
src/openrouter/httpclient.py:
id: e9311185443d
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
@@ -4678,16 +7816,24 @@ trackedFiles:
pristine_git_object: 701741bbf61e70c9dd84199249f2aa1192c30a18
src/openrouter/models_.py:
id: 4e1ae1fe5b98
- last_write_checksum: sha1:f1edac568824553a64db6fe277dc1bb86ae35cbb
- pristine_git_object: a0963ae30def1be10c8819632f0a9d5b6728aa38
+ last_write_checksum: sha1:ef0acdf22acb146b77781d968cc2cd366a507831
+ pristine_git_object: b1f9143134e2e282d5beedd6ceb79c3dd68ceeb5
src/openrouter/oauth.py:
id: 1948ce27255b
last_write_checksum: sha1:e847767a0718afa3d0cac8a3d0735d95e6892265
pristine_git_object: ef6eb9aa10d9b067d96dad78a1d34f939c1091e8
+ src/openrouter/observability.py:
+ id: 6a17f32d3f33
+ last_write_checksum: sha1:1e31c36f61ec2a2c224c6ad0b0f5b2a09e758a3b
+ pristine_git_object: 37ee42a638f5fce69fc7db1e6b86efb51f381582
src/openrouter/operations/__init__.py:
id: 9afcea1e7161
- last_write_checksum: sha1:ec3ab8fd0729912259f86a370453dd311f440953
- pristine_git_object: 8c2b3198136aec28d1b51abc1b12386429039561
+ last_write_checksum: sha1:cd29da201ac98881ca09ef4a62294d6802396c6d
+ pristine_git_object: 7c6acb80d98f0a89d7c63848e52a29a00e097d59
+ src/openrouter/operations/bulkaddworkspacemembers.py:
+ id: e0ed56117619
+ last_write_checksum: sha1:2b9c73dd8a24d6c479d50118a309e4e0969ca7ea
+ pristine_git_object: 32dcfea12b195a499c91c55aee78aaa0144e60e0
src/openrouter/operations/bulkassignkeystoguardrail.py:
id: 6d8435d51d9d
last_write_checksum: sha1:2136b0223191e5d8159c77cff06845958930184e
@@ -4696,6 +7842,10 @@ trackedFiles:
id: 079706f81038
last_write_checksum: sha1:7c8fb1abae40f33c8d467f73b3779503469cad1c
pristine_git_object: 80a1cb770eb34221c7691abb44849bb6db23322d
+ src/openrouter/operations/bulkremoveworkspacemembers.py:
+ id: b5f68d465d4d
+ last_write_checksum: sha1:1fbd3d2660a4261d12c97b464bc445f4dc24c891
+ pristine_git_object: fe0ebfd7d6f5e748ba7105c848c94fe3ed6598ea
src/openrouter/operations/bulkunassignkeysfromguardrail.py:
id: 006249615b0e
last_write_checksum: sha1:88df9d073f73c7d1f0fb70e46a109b17f84f04e8
@@ -4704,34 +7854,70 @@ trackedFiles:
id: 8127aafae1ef
last_write_checksum: sha1:a4c24a2e84c611856ed0ea45168b31cd5b8e1dd0
pristine_git_object: 3613dcf6d85a45e916983f238cd807695433b401
+ src/openrouter/operations/createaudiospeech.py:
+ id: af9df6195878
+ last_write_checksum: sha1:a3bd0bd212bfd34631dfd07b265f3be23e0ef458
+ pristine_git_object: dae7b28a11b1c100ddf9c66f175d0d583a4506ca
+ src/openrouter/operations/createaudiotranscriptions.py:
+ id: 53f76e1550e4
+ last_write_checksum: sha1:f72d4be6f461aa2d12344394c1d8492f9018e035
+ pristine_git_object: 01441144f8433569cb0846df23bbafc9b790a1de
src/openrouter/operations/createauthkeyscode.py:
id: 4253a437de22
last_write_checksum: sha1:de809cb9a55efb7b22d033bace50344bf53696f4
pristine_git_object: d3ef6c4b8374be3dfa5d807f879a430e50dc444e
+ src/openrouter/operations/createbyokkey.py:
+ id: eaeefa9fe0c2
+ last_write_checksum: sha1:856828a03093b93a93edcc907531057f473e3447
+ pristine_git_object: 523d24efa869d63a145167b94e811671b84c5cfb
src/openrouter/operations/createembeddings.py:
id: fe1160a960e9
- last_write_checksum: sha1:7c43b2de3e40ec1fcbac46f4bc89ae6fbf5eb95d
- pristine_git_object: 3872d32380bd3ae8cb9cdb6d7420a4e32464596f
+ last_write_checksum: sha1:5307ac65b8a4c3eec3de9158c2a3d10554212e8b
+ pristine_git_object: 4cc4c5c044fa87a8ae21dd7aa0f83d09f4d00f09
src/openrouter/operations/createguardrail.py:
id: 52ed4b2f5903
last_write_checksum: sha1:119141c01d19df6b6d090b67f80145e3bf4d4d60
pristine_git_object: 75b9661b38be99f2a067eda4051592111301bed1
src/openrouter/operations/createkeys.py:
id: 64ad31fdaa6c
- last_write_checksum: sha1:2d9152fa4d928959e6fa6fd87064a5eff9593f85
- pristine_git_object: 5ed218dc83d851e8ccf7da73203c7677c7ef75c5
+ last_write_checksum: sha1:41931fecbca34b228d5fe6230810eb6bf9271250
+ pristine_git_object: 6d18cf707841629cc63ed2ed56aacd67f639a717
+ src/openrouter/operations/createobservabilitydestination.py:
+ id: ce29c303fb0d
+ last_write_checksum: sha1:b5e942c26b5cffe3a0fd0f44fbdde320f25305da
+ pristine_git_object: 3f22b575217335f5c8adc1bd1583c31a0920eba4
+ src/openrouter/operations/createpresetschatcompletions.py:
+ id: 946ce40bf5bf
+ last_write_checksum: sha1:221fc298430723f7899e0118a88aea00fcc76acc
+ pristine_git_object: e1ae37ed7a64ee216d45a45f16028f6257d89473
+ src/openrouter/operations/createpresetsmessages.py:
+ id: 62021b3fbcdd
+ last_write_checksum: sha1:79ce90ae1e5a1b792eec146bbcebc638675a8765
+ pristine_git_object: 0b7172f2a37cb7fdcbe2a4b2ba98d73f0bbafc41
+ src/openrouter/operations/createpresetsresponses.py:
+ id: 42f8d73c9c81
+ last_write_checksum: sha1:71d1d253871a1184c8dfc9b96b2fbbac58d9f000
+ pristine_git_object: 7dce093fb03ebc70fe263f21dde6c5e7c2ac47a6
src/openrouter/operations/creatererank.py:
id: 99b5d368a168
- last_write_checksum: sha1:86b7c32d7b0bb77f16b9926384c47774e9e25c6a
- pristine_git_object: 68f500af519207c91a5bb34c7006ec5f8d8b3f46
+ last_write_checksum: sha1:ea1518fd51b909230af090339f512d7f620d6e16
+ pristine_git_object: 3e701dc377bc2ebc9a92261129a70952cdde4bc3
src/openrouter/operations/createresponses.py:
id: afb834172b62
- last_write_checksum: sha1:55f5ba6a2eafc9d0519fa5aa072a1c22e42ed5f2
- pristine_git_object: e92bbc2995c3a3769c9cc45b0a6b6b690e67d02c
+ last_write_checksum: sha1:4526e1e256c74c89f40e9e68074a52ce566b37a0
+ pristine_git_object: 8f95daa0dff26dfbd6c0e19775665ef548102ea2
src/openrouter/operations/createvideos.py:
id: d52f6a4a3fe4
last_write_checksum: sha1:12507b8087961d8efe67590e8c5b93f47a9d1a23
pristine_git_object: 3892fc759bd022cdbbaf830f5f20f655131a6d90
+ src/openrouter/operations/createworkspace.py:
+ id: 690a809c4592
+ last_write_checksum: sha1:897268bff3352aff34ba62f6622ee3ba17406752
+ pristine_git_object: 1757be8d72bad9c0076d5492babb798eba2b5582
+ src/openrouter/operations/deletebyokkey.py:
+ id: b1b2c6b06913
+ last_write_checksum: sha1:c6e283d2af7bf36388aaf91b6bd433b1605b2ca8
+ pristine_git_object: 08c3b34c3f8fe29087074fa2359080b3637af8c6
src/openrouter/operations/deleteguardrail.py:
id: 1fbdb98bbb85
last_write_checksum: sha1:e245a5061592daf839d38caace9cc38abbce879d
@@ -4740,10 +7926,30 @@ trackedFiles:
id: 0bd72d53b0a0
last_write_checksum: sha1:de3ec2a557ba007482a9d7ecaecef00cb6ead537
pristine_git_object: 51d48818bce022ab5e9514ea48429e3aca75e997
+ src/openrouter/operations/deleteobservabilitydestination.py:
+ id: efcdc4e7e19d
+ last_write_checksum: sha1:022cfc9eedb230a84c9994e788ebb074df8042d1
+ pristine_git_object: 865b4d17b94571a016e9971f7288f2fb0747957e
+ src/openrouter/operations/deleteworkspace.py:
+ id: f92017ce65e8
+ last_write_checksum: sha1:ac9aa22002cf938a69643dac44c38ab7d702c31c
+ pristine_git_object: fbfef8826b9993d95d355ec0335f943e97a75bda
src/openrouter/operations/exchangeauthcodeforapikey.py:
id: 37bdd1517a07
last_write_checksum: sha1:963c95a165a35ae235d9b03d31c4e029de0246d4
pristine_git_object: 4e4295d69ef4c06a932c3141568c61cb72ebee4c
+ src/openrouter/operations/getanalyticsmeta.py:
+ id: 013673a37aa5
+ last_write_checksum: sha1:decceaad3f96dfa3d433a8ca8a4e5fcf2c8b408f
+ pristine_git_object: bdec790c32149d39da2defaee9b2e0e27711e32e
+ src/openrouter/operations/getapprankings.py:
+ id: 5ffd23dafcc1
+ last_write_checksum: sha1:c9011252cc7862d8c35b4ff2f3c82003c98953de
+ pristine_git_object: d19ef64ed4dcc19027c95ba19c9b37ed301ebb72
+ src/openrouter/operations/getbyokkey.py:
+ id: d141452bd88a
+ last_write_checksum: sha1:16c33afc84cd0d3a68e977e739a59d14dfd3bd44
+ pristine_git_object: 04945fd4eb11ee104cafcc6a06730b3f1c52a9e2
src/openrouter/operations/getcredits.py:
id: 83155df53da5
last_write_checksum: sha1:8b1eccdc3313fb35c0d5fdbfe63dbf64f35d460b
@@ -4754,20 +7960,36 @@ trackedFiles:
pristine_git_object: 2d26173fd7e4555e188999eee1e282e85b68c73d
src/openrouter/operations/getgeneration.py:
id: d7c64961334f
- last_write_checksum: sha1:8816e63b89634cc5b5df7ef6119421224965e529
- pristine_git_object: 94dfcb738c716d409f17be7a2e11485531d90a34
+ last_write_checksum: sha1:7c919236caf0943f145d584024a85bb663f0e911
+ pristine_git_object: bf21d05e955bbfc62ed484b566555bafe0049e10
src/openrouter/operations/getguardrail.py:
id: 9b3309b59c64
last_write_checksum: sha1:f83b3d52731324d0bc87c382196b84713e77f6da
pristine_git_object: e3a2ca2914e9add5060e7efa73dd268d5e32a9a5
src/openrouter/operations/getkey.py:
id: d9769da90865
- last_write_checksum: sha1:3630fb35d372c6541061cf2d425ebf58acc336f7
- pristine_git_object: ec3948b6b7c470258a3dfe10d304c2d52bd68b04
+ last_write_checksum: sha1:511b994a0bd1241856b06184f05433bec3a16733
+ pristine_git_object: d2370a94a10fadec861d31e6fd1a9b2566e94d22
src/openrouter/operations/getmodels.py:
id: 5bd5dfcb0125
- last_write_checksum: sha1:013ccee44da99aa609f290aef9f253e64dca38c6
- pristine_git_object: 4f37b3b7dfc9f4e6c0f127865afd5889baa8fda7
+ last_write_checksum: sha1:77daf349415cd86fce63b94fbee5344850b01c79
+ pristine_git_object: 288c8594750b28de72ec81299ffc36a42c8a683b
+ src/openrouter/operations/getobservabilitydestination.py:
+ id: 15b49f22aca9
+ last_write_checksum: sha1:89cbc1ea42d52efd81f18ebe90094c204fbe88ad
+ pristine_git_object: 3a79bcb425563eb0cbebc8103d20966f07173654
+ src/openrouter/operations/getpreset.py:
+ id: 8819dbeb2074
+ last_write_checksum: sha1:d42d0b432018ea72a6c924b5d5e949e8afebc22b
+ pristine_git_object: d0889139102d911511bf6013e6ed328d122181d5
+ src/openrouter/operations/getpresetversion.py:
+ id: 220006e17d37
+ last_write_checksum: sha1:8854b742529106290bcc2600bc3a36f0bc8f199d
+ pristine_git_object: b76d22dce4db994d55b6db8d7f174d3378aa381e
+ src/openrouter/operations/getrankingsdaily.py:
+ id: 61dd0325de08
+ last_write_checksum: sha1:4a96c332bdd9d5e9bf86b7bed29e65f387ea52b6
+ pristine_git_object: 2e3cf71acfb8771108bc32503a5b87860e5f2d91
src/openrouter/operations/getuseractivity.py:
id: 560a0e01c2c3
last_write_checksum: sha1:88c8f4fe8019dc79934cf6b566111bf34d4adb08
@@ -4776,10 +7998,18 @@ trackedFiles:
id: a5f626467a69
last_write_checksum: sha1:00f000b3fab29247f632c12bcdfe71a579a2ee6a
pristine_git_object: 3a120ed0aacd7ac94b3421fc1439e1308d53f83f
+ src/openrouter/operations/getworkspace.py:
+ id: 2ead327ab15e
+ last_write_checksum: sha1:d9c6371c14333537e74d326634bc2ed2dbbeb76a
+ pristine_git_object: f4d279e42c326dbda828b4a875cd152cfa0ae14a
src/openrouter/operations/list.py:
id: 3ced31e3804e
- last_write_checksum: sha1:a160c202d3cce31f3cb2f9cc911d5e4cd9c44c30
- pristine_git_object: e1d703cfe6485faee33c1ca4a7599b9c950bb7af
+ last_write_checksum: sha1:aeaae46cbe0e9403241e50baab791212404b29a0
+ pristine_git_object: bf9965a274d7249abb169adb43c8358b1ee73105
+ src/openrouter/operations/listbyokkeys.py:
+ id: b6dd42b3e05f
+ last_write_checksum: sha1:d9b6a80b2120649eef650acbfcddd0cf49901e88
+ pristine_git_object: 4b17f290d17f8de1bc81b39f71a4344100aae782
src/openrouter/operations/listembeddingsmodels.py:
id: bf749a1f23d6
last_write_checksum: sha1:654a4e7e7b486f1d321eeb11ef7a7fa928e501a6
@@ -4792,6 +8022,10 @@ trackedFiles:
id: 588bf206e92f
last_write_checksum: sha1:6d8e90c542ae6344e403767a3a4f8ec5d1d4dc75
pristine_git_object: 23e735db74e27dc35e80b2f72cf386b0eeeb116d
+ src/openrouter/operations/listgenerationcontent.py:
+ id: 2f086d74631c
+ last_write_checksum: sha1:922e30991bb7b3ef69e2672a2b969d74ce0b838d
+ pristine_git_object: 8d195009671fdd52cc86795bc1612fa3ddb79364
src/openrouter/operations/listguardrailkeyassignments.py:
id: ee9d33f4de6b
last_write_checksum: sha1:51cdc972a09b21dc3610b634bd0837a8d3b5b249
@@ -4802,8 +8036,8 @@ trackedFiles:
pristine_git_object: c9c8c3ec5ea6ebcf1e160aa1e3ec41390bcbdfe3
src/openrouter/operations/listguardrails.py:
id: c99a9e7be93c
- last_write_checksum: sha1:0a38c88bb6f4f89dc5dd671d6d8b752902e042b5
- pristine_git_object: 8345e0e2d960cb1df76f5a8c60dd7817db7d22f8
+ last_write_checksum: sha1:f82932a120516264880ec2defa377bb03a56071f
+ pristine_git_object: f91db9e67fe3a10b2fffd681a517a65eee4df8c8
src/openrouter/operations/listkeyassignments.py:
id: e26c11d1bd3c
last_write_checksum: sha1:2c4e9b2dac5566beb3b4f1331686ec45c174e021
@@ -4820,10 +8054,22 @@ trackedFiles:
id: 16eb5946cf60
last_write_checksum: sha1:bf9aee7db7762dcd082791962b962940dc7e16be
pristine_git_object: d25eea81bff3710243fca5874e934c024ab1f007
+ src/openrouter/operations/listobservabilitydestinations.py:
+ id: 40d2ffa975ee
+ last_write_checksum: sha1:e6214f3e639b5495977cb32a9b8a3780e4b0f8e2
+ pristine_git_object: 02233af5e6ecda1c0351d0b294c137ea0e3f5d3f
src/openrouter/operations/listorganizationmembers.py:
id: d40a3e0e2b38
last_write_checksum: sha1:201eccb7b2352cfeba4e2fb05dc23ae2ebe92e6c
pristine_git_object: 6d918f6f02ce6f0690ec93314d5982f098738b27
+ src/openrouter/operations/listpresets.py:
+ id: ecdc7097aab7
+ last_write_checksum: sha1:3739d378e7fb4142e0dbc5978bef54fbf2f77066
+ pristine_git_object: faa98f18e5dde101dc43834814cf0aadd2866c31
+ src/openrouter/operations/listpresetversions.py:
+ id: 697cf707300b
+ last_write_checksum: sha1:ba246bce7d15d2e52fac15403891aca8bd86e391
+ pristine_git_object: 48185b77921c712a4f32c17421a9192e98be8cd3
src/openrouter/operations/listproviders.py:
id: cf6e2db15118
last_write_checksum: sha1:384fc4522eedd74a186ed24077a116ef2b77dc42
@@ -4836,22 +8082,46 @@ trackedFiles:
id: 77ba4890284b
last_write_checksum: sha1:9bb93fb1d1d71effb5f4dc58cef9d7b2265a92b7
pristine_git_object: d1497b8429e19d06cc674940e2641b3ed2222ca7
+ src/openrouter/operations/listworkspaces.py:
+ id: fe94c6f61835
+ last_write_checksum: sha1:d8845cc07779359b6d9b29ff4a2367e8c8eeb942
+ pristine_git_object: 236dc188826db184deca4a749dab47e58c3dd637
+ src/openrouter/operations/queryanalytics.py:
+ id: d76c63ff66f6
+ last_write_checksum: sha1:3e1f7dffb9441705fcbe353ee1e1a46d3ca02b8f
+ pristine_git_object: fe4a010c49d57a5de816988706b10ea31bb935ef
src/openrouter/operations/sendchatcompletionrequest.py:
id: d9fee71bb577
- last_write_checksum: sha1:35f707844223de94c0ddcb0d7d67abb50dc0fa26
- pristine_git_object: ef5ccb09584600a7c8dc99c2f02a5d7f1c65f10e
+ last_write_checksum: sha1:130a25fdb3f44490b68ca99153c0cccba25db87e
+ pristine_git_object: cb1c3b3a4fc4819a912f052fa779cba9fd0bb191
+ src/openrouter/operations/updatebyokkey.py:
+ id: 486f4ea60120
+ last_write_checksum: sha1:abf8f1f9145140813a1f96d90b728577f0ffaae0
+ pristine_git_object: 1bf28a90e5f22a789112a93c9848f78233df156c
src/openrouter/operations/updateguardrail.py:
id: 6cfb33d7d40c
last_write_checksum: sha1:fa9ca7390db4e4b45d514f821c008748af8e4c8e
pristine_git_object: b3675a1d1a828f26750e5b7ac98fb7cf42ed49e1
src/openrouter/operations/updatekeys.py:
id: 56fb213253a8
- last_write_checksum: sha1:cd60ee4ccc84dc5e491edc2df0780f2ea757d3ae
- pristine_git_object: a8d2f865c3915c75bfef1865f567c3ffe6129bf7
+ last_write_checksum: sha1:d7eeeaae7c738016d176985c529b9a60df5f7966
+ pristine_git_object: 8ea23655b38916560ec65dc2f37842812add7c3f
+ src/openrouter/operations/updateobservabilitydestination.py:
+ id: 18e06708d1b4
+ last_write_checksum: sha1:3384214864aaba28a6cdf2ddcd55aae16bef9a3a
+ pristine_git_object: 749f0f72822f811653a4b89cf491388ce284db2b
+ src/openrouter/operations/updateworkspace.py:
+ id: 2e9960985cbc
+ last_write_checksum: sha1:88c11ee7a31bc5e2267981d882a01a2a71aafe55
+ pristine_git_object: 4ab7929896a5dede1fa4cf9ce6acfaedd99160aa
src/openrouter/organization.py:
id: 6f4c63c416e8
last_write_checksum: sha1:4ca00158cd6a4971e7a4cf6da1ef084da25630d9
pristine_git_object: ad2e7f86b6138cf2b2137345155e2b3a5784fb46
+ src/openrouter/presets.py:
+ id: bd0c40379dcd
+ last_write_checksum: sha1:13029d26c65600f4b0198f294bdccd29fb71d7b3
+ pristine_git_object: ab9e6ba6afa040493f70c882b152a994d1eee7d1
src/openrouter/providers.py:
id: debc4c48f149
last_write_checksum: sha1:f39f155f26e6f5e4fb5b7e0f577a8c49536f6bb3
@@ -4862,20 +8132,28 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
src/openrouter/rerank.py:
id: 8dbc1be8d76f
- last_write_checksum: sha1:058500aa379495d86e1fce727c49c8146eff3630
- pristine_git_object: e8fdd1dd0911b8cfb465e577d22079644733f687
+ last_write_checksum: sha1:c3dc646c7c7452d90b659c7611ba82eedc9a4b8d
+ pristine_git_object: 96401a2fe86fefe574e073952ca235e71953fbec
src/openrouter/responses.py:
id: f2108fb635e1
- last_write_checksum: sha1:0904d495ee9d0e8e08bd2000406c9f147acb730e
- pristine_git_object: 4844bc0a635f0d4450e617c4a66810ff9e55890e
+ last_write_checksum: sha1:e21e99418d831ca2f606406cc2736b39ecf02bd0
+ pristine_git_object: 944aff9aa812fff9b702d8735a37ea279d915a1d
src/openrouter/sdk.py:
id: ee9846c4c9c5
- last_write_checksum: sha1:af0469095dac69b5b92dd0f717ecf193a9c353e2
- pristine_git_object: 43d1636646e181c09eaa9a42cae71c53d8ee9f1e
+ last_write_checksum: sha1:4ea86de699eb1b480fbc5ef30bca6b9d900815d3
+ pristine_git_object: ec179e1832688dd2045f53af1360bb37a39ad6b1
src/openrouter/sdkconfiguration.py:
id: 55773bb98d7c
last_write_checksum: sha1:c01826125c31a8b8bc99d9d679782c8758fae001
pristine_git_object: 26433165a0b1c25d7bd3115b9b129b18f2dc9387
+ src/openrouter/stt.py:
+ id: fc0c2f669423
+ last_write_checksum: sha1:85b66bb07b0d906fc30f5077056fad632f34757a
+ pristine_git_object: 3b12f69849adc34582f75bb873ca1d15f562a187
+ src/openrouter/tts.py:
+ id: 5055d4b95f1d
+ last_write_checksum: sha1:4097f8545f7276c8d1e007e35ac90e2006300c69
+ pristine_git_object: 66886a4afd9e8195f2e1910741b3ee7d2e2b13cf
src/openrouter/types/__init__.py:
id: 5eab536205b7
last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed
@@ -4954,8 +8232,12 @@ trackedFiles:
pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3
src/openrouter/video_generation.py:
id: d0a90c1b8efe
- last_write_checksum: sha1:e71109a7ac4215c56e5fa3d0e843d532278d681c
- pristine_git_object: 238bbcc92885086a6faaf351dbfdc095b8c6d8d8
+ last_write_checksum: sha1:1d2b872c5f939b1758603eede3584cce3d5a97f6
+ pristine_git_object: 30f265d1bebd524ab6db41e4529d64d8df561d44
+ src/openrouter/workspaces.py:
+ id: cd6c533b1802
+ last_write_checksum: sha1:089b5b8a784ce816227c4caec15b7dd9cdb088bf
+ pristine_git_object: 13306888cde2053eff7b929398a2e70c41c5370a
examples:
createResponses:
speakeasy-default-create-responses:
@@ -4990,6 +8272,20 @@ examples:
application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
"529":
application/json: {"error": {"code": 529, "message": "Provider returned error"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ guardrail-blocked:
+ requestBody:
+ application/json: {"service_tier": "auto", "store": false, "stream": false}
+ responses:
+ "403":
+ application/json: {"error": {"code": 403, "message": "Request blocked: prompt injection patterns detected"}}
+ insufficient-permissions:
+ requestBody:
+ application/json: {"service_tier": "auto", "store": false, "stream": false}
+ responses:
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
getUserActivity:
speakeasy-default-get-user-activity:
responses:
@@ -5038,6 +8334,20 @@ examples:
application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
"529":
application/json: {"error": {"code": 529, "message": "Provider returned error"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ guardrail-blocked:
+ requestBody:
+ application/json: {"messages": [{"content": "You are a helpful assistant.", "role": "system"}, {"content": "What is the capital of France?", "role": "user"}], "stream": false}
+ responses:
+ "403":
+ application/json: {"error": {"code": 403, "message": "Request blocked: prompt injection patterns detected"}}
+ insufficient-permissions:
+ requestBody:
+ application/json: {"messages": [{"content": "You are a helpful assistant.", "role": "system"}, {"content": "What is the capital of France?", "role": "user"}], "stream": false}
+ responses:
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
getCredits:
speakeasy-default-get-credits:
responses:
@@ -5086,7 +8396,7 @@ examples:
speakeasy-default-list-embeddings-models:
responses:
"200":
- application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "top_provider": {"is_moderated": true}}]}
+ application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -5098,7 +8408,7 @@ examples:
id: "gen-1234567890"
responses:
"200":
- application/json: {"data": {"api_type": "completions", "app_id": 12345, "cache_discount": 0.0002, "cancelled": false, "created_at": "2024-07-15T23:33:19.433273+00:00", "external_user": "user-123", "finish_reason": "stop", "generation_time": 1200, "http_referer": "", "id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "is_byok": false, "latency": 1250, "model": "sao10k/l3-stheno-8b", "moderation_latency": 50, "native_finish_reason": "stop", "native_tokens_cached": 3, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_prompt": 10, "native_tokens_reasoning": 5, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_media_prompt": 1, "num_search_results": 5, "origin": "https://openrouter.ai/", "provider_name": "Infermatic", "provider_responses": [], "router": "openrouter/auto", "streamed": true, "tokens_completion": 25, "tokens_prompt": 10, "total_cost": 0.0015, "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "upstream_inference_cost": 0.0012, "usage": 0.0015, "user_agent": ""}}
+ application/json: {"data": {"api_type": "completions", "app_id": 12345, "cache_discount": null, "cancelled": false, "created_at": "2024-07-15T23:33:19.433273+00:00", "data_region": "global", "external_user": "user-123", "finish_reason": "stop", "generation_time": 1200, "http_referer": "https://openrouter.ai/", "id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "is_byok": false, "latency": 1250, "model": "sao10k/l3-stheno-8b", "moderation_latency": 50, "native_finish_reason": "stop", "native_tokens_cached": 3, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_prompt": 10, "native_tokens_reasoning": 5, "num_fetches": 0, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_media_prompt": 1, "num_search_results": 5, "origin": "https://openrouter.ai/", "preset_id": "a9e8d400-592a-494f-908c-375efa66cafd", "provider_name": "Infermatic", "provider_responses": null, "router": "openrouter/auto", "service_tier": "priority", "streamed": true, "tokens_completion": 25, "tokens_prompt": 10, "total_cost": 0.0015, "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "upstream_inference_cost": 0.0012, "usage": 0.0015, "user_agent": "Mozilla/5.0", "web_search_engine": "exa"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"402":
@@ -5128,7 +8438,7 @@ examples:
speakeasy-default-get-models:
responses:
"200":
- application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "top_provider": {"is_moderated": true}}]}
+ application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -5137,7 +8447,7 @@ examples:
speakeasy-default-list-models-user:
responses:
"200":
- application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "top_provider": {"is_moderated": true}}]}
+ application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-5.4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -5175,7 +8485,7 @@ examples:
speakeasy-default-list:
responses:
"200":
- application/json: {"data": [{"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}]}
+ application/json: {"data": [{"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"429":
@@ -5188,7 +8498,7 @@ examples:
application/json: {"name": "My New API Key"}
responses:
"201":
- application/json: {"data": {"byok_usage": 0, "byok_usage_daily": 0, "byok_usage_monthly": 0, "byok_usage_weekly": 0, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "My New API Key", "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "name": "My New API Key", "updated_at": null, "usage": 0, "usage_daily": 0, "usage_monthly": 0, "usage_weekly": 0}, "key": "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"}
+ application/json: {"data": {"byok_usage": 0, "byok_usage_daily": 0, "byok_usage_monthly": 0, "byok_usage_weekly": 0, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "My New API Key", "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "name": "My New API Key", "updated_at": null, "usage": 0, "usage_daily": 0, "usage_monthly": 0, "usage_weekly": 0, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}, "key": "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"}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -5197,6 +8507,8 @@ examples:
application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
updateKeys:
speakeasy-default-update-keys:
parameters:
@@ -5206,7 +8518,7 @@ examples:
application/json: {}
responses:
"200":
- application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "Updated API Key Name", "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "name": "Updated API Key Name", "updated_at": "2025-08-24T16:00:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}}
+ application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": true, "label": "Updated API Key Name", "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "name": "Updated API Key Name", "updated_at": "2025-08-24T16:00:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -5240,7 +8552,7 @@ examples:
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
responses:
"200":
- application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}}
+ application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "created_at": "2025-08-24T10:30:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "disabled": false, "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "include_byok_in_limit": false, "label": "Production API Key", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "name": "My Production Key", "updated_at": "2025-08-24T15:45:00Z", "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5, "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -5262,7 +8574,7 @@ examples:
speakeasy-default-list-guardrails:
responses:
"200":
- application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail"}], "total_count": 1}
+ application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -5273,13 +8585,15 @@ examples:
application/json: {"name": "My New Guardrail"}
responses:
"201":
- application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail"}}
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
getGuardrail:
speakeasy-default-get-guardrail:
parameters:
@@ -5287,7 +8601,7 @@ examples:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
- application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail"}}
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -5303,7 +8617,7 @@ examples:
application/json: {}
responses:
"200":
- application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name"}}
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -5489,7 +8803,7 @@ examples:
application/json: {"documents": ["Paris is the capital of France.", "Berlin is the capital of Germany."], "model": "cohere/rerank-v3.5", "query": "What is the capital of France?"}
responses:
"200":
- application/json: {"model": "cohere/rerank-v3.5", "results": [{"document": {"text": "Paris is the capital of France."}, "index": 0, "relevance_score": 0.98}]}
+ application/json: {"model": "cohere/rerank-v3.5", "results": [{"document": {}, "index": 0, "relevance_score": 0.98}]}
text/event-stream: ""
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
@@ -5573,4 +8887,528 @@ examples:
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getAnalyticsMeta:
+ speakeasy-default-get-analytics-meta:
+ responses:
+ "200":
+ application/json: {"data": {"dimensions": [{"display_label": "Model", "name": "model"}], "granularities": [{"display_label": "Day", "name": "day"}], "metrics": [{"display_format": "number", "display_label": "Request Count", "is_rate": false, "name": "request_count"}], "operators": [{"name": "eq", "value_type": "scalar"}]}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ queryAnalytics:
+ speakeasy-default-query-analytics:
+ requestBody:
+ application/json: {"metrics": ["request_count"]}
+ responses:
+ "200":
+ application/json: {"data": {"data": [{}], "metadata": {"query_time_ms": 1416.73, "row_count": 771694, "truncated": false}}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "408":
+ application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createAudioSpeech:
+ speakeasy-default-create-audio-speech:
+ requestBody:
+ application/json: {"input": "Hello world", "model": "elevenlabs/eleven-turbo-v2", "response_format": "pcm", "voice": "alloy"}
+ responses:
+ "200":
+ audio/*: ""
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "402":
+ application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "429":
+ application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "502":
+ application/json: {"error": {"code": 502, "message": "Provider returned error"}}
+ "503":
+ application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
+ "524":
+ application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
+ "529":
+ application/json: {"error": {"code": 529, "message": "Provider returned error"}}
+ createAudioTranscriptions:
+ speakeasy-default-create-audio-transcriptions:
+ requestBody:
+ application/json: {"input_audio": {"data": "UklGRiQA...", "format": "wav"}, "model": "openai/whisper-large-v3"}
+ responses:
+ "200":
+ application/json: {"text": "Hello, this is a test of OpenAI speech-to-text transcription."}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "402":
+ application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "429":
+ application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "502":
+ application/json: {"error": {"code": 502, "message": "Provider returned error"}}
+ "503":
+ application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
+ "524":
+ application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
+ "529":
+ application/json: {"error": {"code": 529, "message": "Provider returned error"}}
+ listBYOKKeys:
+ speakeasy-default-list-BYOK-keys:
+ responses:
+ "200":
+ application/json: {"data": [{"allowed_api_key_hashes": null, "allowed_models": null, "allowed_user_ids": null, "created_at": "2025-08-24T10:30:00Z", "disabled": false, "id": "11111111-2222-3333-4444-555555555555", "is_fallback": false, "label": "sk-...AbCd", "provider": "openai", "sort_order": 0, "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}], "total_count": 1}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createBYOKKey:
+ speakeasy-default-create-BYOK-key:
+ requestBody:
+ application/json: {"key": "sk-proj-abc123...", "provider": "openai"}
+ responses:
+ "201":
+ application/json: {"data": {"allowed_api_key_hashes": null, "allowed_models": null, "allowed_user_ids": null, "created_at": "2025-08-24T10:30:00Z", "disabled": false, "id": "11111111-2222-3333-4444-555555555555", "is_fallback": false, "label": "sk-...AbCd", "provider": "openai", "sort_order": 0, "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ deleteBYOKKey:
+ speakeasy-default-delete-BYOK-key:
+ parameters:
+ path:
+ id: "11111111-2222-3333-4444-555555555555"
+ responses:
+ "200":
+ application/json: {"deleted": true}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getBYOKKey:
+ speakeasy-default-get-BYOK-key:
+ parameters:
+ path:
+ id: "11111111-2222-3333-4444-555555555555"
+ responses:
+ "200":
+ application/json: {"data": {"allowed_api_key_hashes": null, "allowed_models": null, "allowed_user_ids": null, "created_at": "2025-08-24T10:30:00Z", "disabled": false, "id": "11111111-2222-3333-4444-555555555555", "is_fallback": false, "label": "sk-...AbCd", "provider": "openai", "sort_order": 0, "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ updateBYOKKey:
+ speakeasy-default-update-BYOK-key:
+ parameters:
+ path:
+ id: "11111111-2222-3333-4444-555555555555"
+ requestBody:
+ application/json: {}
+ responses:
+ "200":
+ application/json: {"data": {"allowed_api_key_hashes": null, "allowed_models": null, "allowed_user_ids": null, "created_at": "2025-08-24T10:30:00Z", "disabled": false, "id": "11111111-2222-3333-4444-555555555555", "is_fallback": false, "label": "sk-...AbCd", "provider": "openai", "sort_order": 0, "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getAppRankings:
+ speakeasy-default-get-app-rankings:
+ parameters:
+ query:
+ sort: "popular"
+ limit: 50
+ offset: 0
+ responses:
+ "200":
+ application/json: {"data": [{"app_id": 12345, "app_name": "Cline", "rank": 1, "total_requests": 4321, "total_tokens": "12345678"}, {"app_id": 67890, "app_name": "Roo Code", "rank": 2, "total_requests": 2109, "total_tokens": "9876543"}], "meta": {"as_of": "2026-05-12T02:00:00Z", "end_date": "2026-05-11", "start_date": "2026-04-12", "version": "v1"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "429":
+ application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getRankingsDaily:
+ speakeasy-default-get-rankings-daily:
+ responses:
+ "200":
+ application/json: {"data": [{"date": "2026-05-11", "model_permaslug": "openai/gpt-4o-2024-05-13", "total_tokens": "12345678"}, {"date": "2026-05-11", "model_permaslug": "anthropic/claude-3.5-sonnet-20241022", "total_tokens": "9876543"}], "meta": {"as_of": "2026-05-12T02:00:00Z", "end_date": "2026-05-11", "start_date": "2026-04-12", "version": "v1"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "429":
+ application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ listGenerationContent:
+ speakeasy-default-list-generation-content:
+ parameters:
+ query:
+ id: "gen-1234567890"
+ responses:
+ "200":
+ application/json: {"data": {"input": {"messages": [{"content": "What is the meaning of life?", "role": "user"}]}, "output": {"completion": "The meaning of life is a philosophical question...", "reasoning": null}}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "429":
+ application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "502":
+ application/json: {"error": {"code": 502, "message": "Provider returned error"}}
+ "524":
+ application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
+ "529":
+ application/json: {"error": {"code": 529, "message": "Provider returned error"}}
+ listObservabilityDestinations:
+ speakeasy-default-list-observability-destinations:
+ responses:
+ "200":
+ application/json: {"data": [{"api_key_hashes": null, "config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "created_at": "2025-08-24T10:30:00Z", "enabled": true, "filter_rules": null, "id": "99999999-aaaa-bbbb-cccc-dddddddddddd", "name": "Production Langfuse", "privacy_mode": false, "sampling_rate": 1, "type": "langfuse", "updated_at": "2025-08-24T15:45:00Z", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}], "total_count": 1}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createObservabilityDestination:
+ speakeasy-default-create-observability-destination:
+ requestBody:
+ application/json: {"config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "enabled": true, "name": "Production Langfuse", "privacy_mode": false, "type": "langfuse"}
+ responses:
+ "201":
+ application/json: {"data": {"api_key_hashes": null, "config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "created_at": "2025-08-24T10:30:00Z", "enabled": true, "filter_rules": null, "id": "99999999-aaaa-bbbb-cccc-dddddddddddd", "name": "Production Langfuse", "privacy_mode": false, "sampling_rate": 1, "type": "langfuse", "updated_at": "2025-08-24T15:45:00Z", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "409":
+ application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ deleteObservabilityDestination:
+ speakeasy-default-delete-observability-destination:
+ parameters:
+ path:
+ id: "99999999-aaaa-bbbb-cccc-dddddddddddd"
+ responses:
+ "200":
+ application/json: {"deleted": true}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getObservabilityDestination:
+ speakeasy-default-get-observability-destination:
+ parameters:
+ path:
+ id: "99999999-aaaa-bbbb-cccc-dddddddddddd"
+ responses:
+ "200":
+ application/json: {"data": {"api_key_hashes": null, "config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "created_at": "2025-08-24T10:30:00Z", "enabled": true, "filter_rules": null, "id": "99999999-aaaa-bbbb-cccc-dddddddddddd", "name": "Production Langfuse", "privacy_mode": false, "sampling_rate": 1, "type": "langfuse", "updated_at": "2025-08-24T15:45:00Z", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ updateObservabilityDestination:
+ speakeasy-default-update-observability-destination:
+ parameters:
+ path:
+ id: "99999999-aaaa-bbbb-cccc-dddddddddddd"
+ requestBody:
+ application/json: {}
+ responses:
+ "200":
+ application/json: {"data": {"api_key_hashes": null, "config": {"baseUrl": "https://us.cloud.langfuse.com", "publicKey": "pk-l...EfGh", "secretKey": "sk-l...AbCd"}, "created_at": "2025-08-24T10:30:00Z", "enabled": true, "filter_rules": null, "id": "99999999-aaaa-bbbb-cccc-dddddddddddd", "name": "Production Langfuse", "privacy_mode": false, "sampling_rate": 1, "type": "langfuse", "updated_at": "2025-08-24T15:45:00Z", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "409":
+ application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ listPresets:
+ speakeasy-default-list-presets:
+ responses:
+ "200":
+ application/json: {"data": [{"created_at": "2026-04-20T10:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "description": null, "designated_version_id": "550e8400-e29b-41d4-a716-446655440000", "id": "650e8400-e29b-41d4-a716-446655440001", "name": "my-preset", "slug": "my-preset", "status": "active", "status_updated_at": null, "updated_at": "2026-04-20T10:00:00Z", "workspace_id": "750e8400-e29b-41d4-a716-446655440002"}], "total_count": 1}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getPreset:
+ speakeasy-default-get-preset:
+ parameters:
+ path:
+ slug: "my-preset"
+ responses:
+ "200":
+ application/json: {"data": {"created_at": "2026-04-20T10:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "description": null, "designated_version_id": "550e8400-e29b-41d4-a716-446655440000", "id": "650e8400-e29b-41d4-a716-446655440001", "name": "my-preset", "slug": "my-preset", "status": "active", "status_updated_at": null, "updated_at": "2026-04-20T10:00:00Z", "workspace_id": "750e8400-e29b-41d4-a716-446655440002", "designated_version": {"config": {"model": "openai/gpt-4o", "temperature": 0.7}, "created_at": "2026-04-20T10:00:00Z", "creator_id": "user_2dHFtVWx2n56w6HkM0000000000", "id": "550e8400-e29b-41d4-a716-446655440000", "preset_id": "650e8400-e29b-41d4-a716-446655440001", "system_prompt": "You are a helpful assistant.", "updated_at": "2026-04-20T10:00:00Z", "version": 1}}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createPresetsChatCompletions:
+ speakeasy-default-create-presets-chat-completions:
+ parameters:
+ path:
+ slug: "my-preset"
+ requestBody:
+ application/json: {"messages": [{"content": "You are a helpful assistant.", "role": "system"}, {"content": "What is the capital of France?", "role": "user"}], "stream": false}
+ responses:
+ "200":
+ application/json: {"data": {"created_at": "2026-04-20T10:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "description": null, "designated_version_id": "550e8400-e29b-41d4-a716-446655440000", "id": "650e8400-e29b-41d4-a716-446655440001", "name": "my-preset", "slug": "my-preset", "status": "active", "status_updated_at": null, "updated_at": "2026-04-20T10:00:00Z", "workspace_id": "750e8400-e29b-41d4-a716-446655440002", "designated_version": {"config": {"model": "openai/gpt-4o", "temperature": 0.7}, "created_at": "2026-04-20T10:00:00Z", "creator_id": "user_2dHFtVWx2n56w6HkM0000000000", "id": "550e8400-e29b-41d4-a716-446655440000", "preset_id": "650e8400-e29b-41d4-a716-446655440001", "system_prompt": "You are a helpful assistant.", "updated_at": "2026-04-20T10:00:00Z", "version": 1}}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "409":
+ application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createPresetsMessages:
+ speakeasy-default-create-presets-messages:
+ parameters:
+ path:
+ slug: "my-preset"
+ requestBody:
+ application/json: {"messages": [{"content": "Hello, how are you?", "role": "user"}], "model": "anthropic/claude-4.5-sonnet-20250929"}
+ responses:
+ "200":
+ application/json: {"data": {"created_at": "2026-04-20T10:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "description": null, "designated_version_id": "550e8400-e29b-41d4-a716-446655440000", "id": "650e8400-e29b-41d4-a716-446655440001", "name": "my-preset", "slug": "my-preset", "status": "active", "status_updated_at": null, "updated_at": "2026-04-20T10:00:00Z", "workspace_id": "750e8400-e29b-41d4-a716-446655440002", "designated_version": {"config": {"model": "openai/gpt-4o", "temperature": 0.7}, "created_at": "2026-04-20T10:00:00Z", "creator_id": "user_2dHFtVWx2n56w6HkM0000000000", "id": "550e8400-e29b-41d4-a716-446655440000", "preset_id": "650e8400-e29b-41d4-a716-446655440001", "system_prompt": "You are a helpful assistant.", "updated_at": "2026-04-20T10:00:00Z", "version": 1}}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "409":
+ application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createPresetsResponses:
+ speakeasy-default-create-presets-responses:
+ parameters:
+ path:
+ slug: "my-preset"
+ requestBody:
+ application/json: {"service_tier": "auto", "store": false, "stream": false}
+ responses:
+ "200":
+ application/json: {"data": {"created_at": "2026-04-20T10:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "description": null, "designated_version_id": "550e8400-e29b-41d4-a716-446655440000", "id": "650e8400-e29b-41d4-a716-446655440001", "name": "my-preset", "slug": "my-preset", "status": "active", "status_updated_at": null, "updated_at": "2026-04-20T10:00:00Z", "workspace_id": "750e8400-e29b-41d4-a716-446655440002", "designated_version": {"config": {"model": "openai/gpt-4o", "temperature": 0.7}, "created_at": "2026-04-20T10:00:00Z", "creator_id": "user_2dHFtVWx2n56w6HkM0000000000", "id": "550e8400-e29b-41d4-a716-446655440000", "preset_id": "650e8400-e29b-41d4-a716-446655440001", "system_prompt": "You are a helpful assistant.", "updated_at": "2026-04-20T10:00:00Z", "version": 1}}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "409":
+ application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ listPresetVersions:
+ speakeasy-default-list-preset-versions:
+ parameters:
+ path:
+ slug: "my-preset"
+ responses:
+ "200":
+ application/json: {"data": [{"config": {"model": "openai/gpt-4o", "temperature": 0.7}, "created_at": "2026-04-20T10:00:00Z", "creator_id": "user_2dHFtVWx2n56w6HkM0000000000", "id": "550e8400-e29b-41d4-a716-446655440000", "preset_id": "650e8400-e29b-41d4-a716-446655440001", "system_prompt": "You are a helpful assistant.", "updated_at": "2026-04-20T10:00:00Z", "version": 1}], "total_count": 1}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getPresetVersion:
+ speakeasy-default-get-preset-version:
+ parameters:
+ path:
+ slug: "my-preset"
+ version: "1"
+ responses:
+ "200":
+ application/json: {"data": {"config": {"model": "openai/gpt-4o", "temperature": 0.7}, "created_at": "2026-04-20T10:00:00Z", "creator_id": "user_2dHFtVWx2n56w6HkM0000000000", "id": "550e8400-e29b-41d4-a716-446655440000", "preset_id": "650e8400-e29b-41d4-a716-446655440001", "system_prompt": "You are a helpful assistant.", "updated_at": "2026-04-20T10:00:00Z", "version": 1}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ listWorkspaces:
+ speakeasy-default-list-workspaces:
+ responses:
+ "200":
+ application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Production", "slug": "production", "updated_at": "2025-08-24T15:45:00Z"}], "total_count": 1}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ createWorkspace:
+ speakeasy-default-create-workspace:
+ requestBody:
+ application/json: {"name": "Production", "slug": "production"}
+ responses:
+ "201":
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Production", "slug": "production", "updated_at": null}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ deleteWorkspace:
+ speakeasy-default-delete-workspace:
+ parameters:
+ path:
+ id: "production"
+ responses:
+ "200":
+ application/json: {"deleted": true}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ getWorkspace:
+ speakeasy-default-get-workspace:
+ parameters:
+ path:
+ id: "production"
+ responses:
+ "200":
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Production", "slug": "production", "updated_at": "2025-08-24T15:45:00Z"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ updateWorkspace:
+ speakeasy-default-update-workspace:
+ parameters:
+ path:
+ id: "production"
+ requestBody:
+ application/json: {}
+ responses:
+ "200":
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "created_by": "user_abc123", "default_image_model": "openai/dall-e-3", "default_provider_sort": "price", "default_text_model": "openai/gpt-4o", "description": "Production environment workspace", "id": "550e8400-e29b-41d4-a716-446655440000", "io_logging_api_key_ids": null, "io_logging_sampling_rate": 1, "is_data_discount_logging_enabled": true, "is_observability_broadcast_enabled": false, "is_observability_io_logging_enabled": false, "name": "Updated Workspace", "slug": "updated-workspace", "updated_at": "2025-08-25T10:00:00Z"}}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ bulkAddWorkspaceMembers:
+ speakeasy-default-bulk-add-workspace-members:
+ parameters:
+ path:
+ id: "production"
+ requestBody:
+ application/json: {"user_ids": ["user_abc123", "user_def456"]}
+ responses:
+ "200":
+ application/json: {"added_count": 1, "data": [{"created_at": "2025-08-24T10:30:00Z", "id": "660e8400-e29b-41d4-a716-446655440000", "role": "member", "user_id": "user_abc123", "workspace_id": "550e8400-e29b-41d4-a716-446655440000"}]}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ bulkRemoveWorkspaceMembers:
+ speakeasy-default-bulk-remove-workspace-members:
+ parameters:
+ path:
+ id: "production"
+ requestBody:
+ application/json: {"user_ids": ["user_abc123", "user_def456"]}
+ responses:
+ "200":
+ application/json: {"removed_count": 2}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "403":
+ application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed**\n * `error` **Changed**\n* `open_router.video_generation.generate()`: \n * `request` **Changed** **Breaking** :warning:\n * `error.openrouter_metadata` **Added**\n* `open_router.beta.responses.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n * `error` **Changed**\n* `open_router.rerank.rerank()`: \n * `request.documents.[]` **Changed** **Breaking** :warning:\n * `response.results.[].document` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.generations.get_generation()`: \n * `response.data` **Changed** **Breaking** :warning:\n * `error.openrouter_metadata` **Added**\n* `open_router.o_auth.create_auth_code()`: `error.openrouter_metadata` **Added**\n* `open_router.endpoints.list()`: `error.openrouter_metadata` **Added**\n* `open_router.embeddings.list_models()`: \n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.byok.update()`: **Added**\n* `open_router.datasets.get_app_rankings()`: **Added**\n* `open_router.datasets.get_rankings_daily()`: **Added**\n* `open_router.generations.list_generation_content()`: **Added**\n* `open_router.observability.list()`: **Added**\n* `open_router.observability.create()`: **Added**\n* `open_router.observability.delete()`: **Added**\n* `open_router.observability.get()`: **Added**\n* `open_router.observability.update()`: **Added**\n* `open_router.presets.list()`: **Added**\n* `open_router.presets.get()`: **Added**\n* `open_router.presets.create_presets_chat_completions()`: **Added**\n* `open_router.presets.create_presets_messages()`: **Added**\n* `open_router.presets.create_presets_responses()`: **Added**\n* `open_router.presets.list_versions()`: **Added**\n* `open_router.presets.get_version()`: **Added**\n* `open_router.workspaces.list()`: **Added**\n* `open_router.workspaces.create()`: **Added**\n* `open_router.workspaces.delete()`: **Added**\n* `open_router.workspaces.get()`: **Added**\n* `open_router.workspaces.update()`: **Added**\n* `open_router.workspaces.bulk_add_members()`: **Added**\n* `open_router.workspaces.bulk_remove_members()`: **Added**\n* `open_router.analytics.get_user_activity()`: `error.openrouter_metadata` **Added**\n* `open_router.o_auth.exchange_auth_code_for_api_key()`: `error.openrouter_metadata` **Added**\n* `open_router.beta.analytics.get_analytics_meta()`: **Added**\n* `open_router.byok.create()`: **Added**\n* `open_router.credits.get_credits()`: `error.openrouter_metadata` **Added**\n* `open_router.embeddings.generate()`: \n * `request.input.[array].[].content.[]` **Changed**\n * `response.usage.prompt_tokens_details` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.byok.get()`: **Added**\n* `open_router.byok.delete()`: **Added**\n* `open_router.guardrails.list_guardrail_key_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.byok.list()`: **Added**\n* `open_router.guardrails.list()`: \n * `request.workspace_id` **Added**\n * `response.data.[]` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.guardrails.create()`: \n * `request` **Changed**\n * `response.data` **Changed**\n * `error` **Changed**\n* `open_router.guardrails.delete()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.get()`: \n * `response.data` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.guardrails.update()`: \n * `request` **Changed**\n * `response.data` **Changed**\n * `error.openrouter_metadata` **Added**\n* `open_router.endpoints.list_zdr_endpoints()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_assign_keys()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_unassign_keys()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_guardrail_member_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_assign_members()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.bulk_unassign_members()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_key_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_member_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.api_keys.get_current_key_metadata()`: `error.openrouter_metadata` **Added**\n* `open_router.api_keys.list()`: \n * `request.workspace_id` **Added**\n * `response.data.[].workspace_id` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.api_keys.create()`: \n * `request.workspace_id` **Added**\n * `response.data.workspace_id` **Added**\n * `error` **Changed**\n* `open_router.api_keys.delete()`: `error.openrouter_metadata` **Added**\n* `open_router.api_keys.get()`: \n * `response.data.workspace_id` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.api_keys.update()`: \n * `response.data.workspace_id` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.models.list()`: \n * `request.sort` **Added**\n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.models.count()`: `error.openrouter_metadata` **Added**\n* `open_router.models.list_for_user()`: \n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.organization.list_members()`: `error.openrouter_metadata` **Added**\n* `open_router.providers.list()`: `error.openrouter_metadata` **Added**\n* `open_router.stt.create_transcription()`: **Added**\n* `open_router.tts.create_speech()`: **Added**\n* `open_router.beta.analytics.query_analytics()`: **Added**\n* `open_router.video_generation.get_generation()`: `error.openrouter_metadata` **Added**\n* `open_router.video_generation.get_video_content()`: `error.openrouter_metadata` **Added**\n* `open_router.video_generation.list_videos_models()`: `error.openrouter_metadata` **Added**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 27a3b9f..a104a8b 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -32,7 +32,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
- version: 0.9.1
+ version: 0.9.2
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 6cbf6ba..c34dd86 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -119,6 +119,126 @@ components:
required:
- data
type: object
+ AdvisorNestedTool:
+ additionalProperties:
+ nullable: true
+ description: >-
+ A tool made available to the advisor sub-agent. Accepts function tools and OpenRouter server tools (e.g. openrouter:web_search). The advisor tool may not list itself.
+ example:
+ type: openrouter:web_search
+ properties:
+ function:
+ additionalProperties:
+ nullable: true
+ type: object
+ parameters:
+ additionalProperties:
+ nullable: true
+ type: object
+ type:
+ type: string
+ required:
+ - type
+ type: object
+ AdvisorReasoning:
+ description: >-
+ Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.
+ example:
+ effort: high
+ properties:
+ effort:
+ description: Reasoning effort level for the advisor call.
+ enum:
+ - xhigh
+ - high
+ - medium
+ - low
+ - minimal
+ - none
+ type: string
+ x-speakeasy-unknown-values: allow
+ max_tokens:
+ description: Maximum number of reasoning tokens the advisor may use.
+ type: integer
+ type: object
+ AdvisorServerTool_OpenRouter:
+ description: >-
+ OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
+ example:
+ parameters:
+ model: ~anthropic/claude-opus-latest
+ name: reviewer
+ type: openrouter:advisor
+ properties:
+ parameters:
+ $ref: '#/components/schemas/AdvisorServerToolConfig'
+ type:
+ enum:
+ - openrouter:advisor
+ type: string
+ required:
+ - type
+ type: object
+ AdvisorServerToolConfig:
+ description: Configuration for one openrouter:advisor server tool entry.
+ example:
+ model: ~anthropic/claude-opus-latest
+ name: reviewer
+ properties:
+ forward_transcript:
+ description: >-
+ When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call.
+ example: false
+ type: boolean
+ instructions:
+ description: >-
+ System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own.
+ example: You are a senior staff engineer. Give a focused, decisive plan.
+ type: string
+ max_completion_tokens:
+ description: >-
+ Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies.
+ example: 2048
+ type: integer
+ max_tool_calls:
+ description: >-
+ Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools.
+ example: 5
+ maximum: 25
+ minimum: 1
+ type: integer
+ model:
+ description: >-
+ Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model.
+ example: ~anthropic/claude-opus-latest
+ type: string
+ name:
+ description: >-
+ Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars.
+ example: reviewer
+ maxLength: 64
+ minLength: 1
+ pattern: ^[a-zA-Z0-9 _-]+$
+ type: string
+ reasoning:
+ $ref: '#/components/schemas/AdvisorReasoning'
+ stream:
+ description: >-
+ When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result.
+ example: false
+ type: boolean
+ temperature:
+ description: Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
+ example: 0.7
+ format: double
+ type: number
+ tools:
+ description: >-
+ Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Must not include the advisor tool itself.
+ items:
+ $ref: '#/components/schemas/AdvisorNestedTool'
+ type: array
+ type: object
AnnotationAddedEvent:
allOf:
- $ref: '#/components/schemas/BaseAnnotationAddedEvent'
@@ -138,6 +258,62 @@ components:
output_index: 0
sequence_number: 5
type: response.output_text.annotation.added
+ AnthropicAdvisorMessageUsageIteration:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicBaseUsageIteration'
+ - properties:
+ model:
+ type: string
+ type:
+ enum:
+ - advisor_message
+ type: string
+ required:
+ - type
+ - model
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: 0
+ cache_read_input_tokens: 0
+ input_tokens: 823
+ model: claude-opus-4-6
+ output_tokens: 1612
+ type: advisor_message
+ AnthropicAdvisorToolResult:
+ example:
+ content:
+ text: Advisor response text
+ type: advisor_result
+ tool_use_id: srvtoolu_01abc
+ type: advisor_tool_result
+ properties:
+ content:
+ additionalProperties:
+ nullable: true
+ type: object
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - advisor_tool_result
+ type: string
+ required:
+ - type
+ - tool_use_id
+ - content
+ type: object
+ AnthropicAllowedCallers:
+ example:
+ - direct
+ items:
+ enum:
+ - direct
+ - code_execution_20250825
+ - code_execution_20260120
+ type: string
+ x-speakeasy-unknown-values: allow
+ type: array
AnthropicBase64ImageSource:
example:
data: /9j/4AAQ...
@@ -303,6 +479,8 @@ components:
- type
type: object
AnthropicCacheControlDirective:
+ description: >-
+ Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
example:
type: ephemeral
properties:
@@ -557,6 +735,7 @@ components:
- end_page_number
type: object
AnthropicCitationsConfig:
+ default: null
example:
enabled: true
nullable: true
@@ -858,7 +1037,6 @@ components:
- document
type: string
required:
- - citations
- source
- title
- type
@@ -1046,6 +1224,16 @@ components:
input_tokens: 100
output_tokens: 50
type: message
+ AnthropicOutputTokensDetails:
+ example:
+ thinking_tokens: 0
+ nullable: true
+ properties:
+ thinking_tokens:
+ type: integer
+ required:
+ - thinking_tokens
+ type: object
AnthropicPlainTextSource:
example:
data: Hello, world!
@@ -1153,18 +1341,6 @@ components:
example: unavailable
type: string
x-speakeasy-unknown-values: allow
- AnthropicServerToolName:
- enum:
- - web_search
- - web_fetch
- - code_execution
- - bash_code_execution
- - text_editor_code_execution
- - tool_search_tool_regex
- - tool_search_tool_bm25
- example: web_search
- type: string
- x-speakeasy-unknown-values: allow
AnthropicServerToolUsage:
example:
web_fetch_requests: 0
@@ -1179,34 +1355,6 @@ components:
- web_search_requests
- web_fetch_requests
type: object
- AnthropicServerToolUseBlock:
- example:
- caller:
- type: direct
- id: srvtoolu_01abc
- input:
- query: latest news
- name: web_search
- type: server_tool_use
- properties:
- caller:
- $ref: '#/components/schemas/AnthropicCaller'
- id:
- type: string
- input:
- nullable: true
- name:
- $ref: '#/components/schemas/AnthropicServerToolName'
- type:
- enum:
- - server_tool_use
- type: string
- required:
- - type
- - id
- - caller
- - name
- type: object
AnthropicServiceTier:
enum:
- standard
@@ -1489,6 +1637,15 @@ components:
- thinking
- signature
type: object
+ AnthropicThinkingDisplay:
+ enum:
+ - summarized
+ - omitted
+ - null
+ example: summarized
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
AnthropicThinkingTurns:
example:
type: thinking_turns
@@ -1707,6 +1864,7 @@ components:
inference_geo: null
input_tokens: 100
output_tokens: 50
+ output_tokens_details: null
server_tool_use: null
service_tier: standard
properties:
@@ -1725,6 +1883,8 @@ components:
type: integer
output_tokens:
type: integer
+ output_tokens_details:
+ $ref: '#/components/schemas/AnthropicOutputTokensDetails'
server_tool_use:
$ref: '#/components/schemas/AnthropicServerToolUsage'
service_tier:
@@ -1732,6 +1892,7 @@ components:
required:
- input_tokens
- output_tokens
+ - output_tokens_details
- cache_creation_input_tokens
- cache_read_input_tokens
- cache_creation
@@ -1743,6 +1904,7 @@ components:
anyOf:
- $ref: '#/components/schemas/AnthropicCompactionUsageIteration'
- $ref: '#/components/schemas/AnthropicMessageUsageIteration'
+ - $ref: '#/components/schemas/AnthropicAdvisorMessageUsageIteration'
- $ref: '#/components/schemas/AnthropicUnknownUsageIteration'
example:
cache_creation: null
@@ -1996,6 +2158,210 @@ components:
required:
- type
type: object
+ ApplyPatchCallItem:
+ description: >-
+ A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn.
+ example:
+ call_id: call_abc123
+ id: apc_abc123
+ operation:
+ diff: |-
+ @@ function main() {
+ + console.log("hi");
+ }
+ path: /src/main.ts
+ type: update_file
+ status: completed
+ type: apply_patch_call
+ properties:
+ call_id:
+ type: string
+ id:
+ nullable: true
+ type: string
+ operation:
+ $ref: '#/components/schemas/ApplyPatchCallOperation'
+ status:
+ $ref: '#/components/schemas/ApplyPatchCallStatus'
+ type:
+ enum:
+ - apply_patch_call
+ type: string
+ required:
+ - type
+ - call_id
+ - status
+ - operation
+ type: object
+ ApplyPatchCallOperation:
+ description: >-
+ The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.
+ discriminator:
+ mapping:
+ create_file: '#/components/schemas/ApplyPatchCreateFileOperation'
+ delete_file: '#/components/schemas/ApplyPatchDeleteFileOperation'
+ update_file: '#/components/schemas/ApplyPatchUpdateFileOperation'
+ propertyName: type
+ example:
+ diff: |-
+ @@ function main() {
+ + console.log("hi");
+ }
+ path: /src/main.ts
+ type: update_file
+ oneOf:
+ - $ref: '#/components/schemas/ApplyPatchCreateFileOperation'
+ - $ref: '#/components/schemas/ApplyPatchUpdateFileOperation'
+ - $ref: '#/components/schemas/ApplyPatchDeleteFileOperation'
+ ApplyPatchCallOperationDiffDeltaEvent:
+ description: Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape.
+ example:
+ delta: |
+ +console.log("hi");
+ item_id: apc_abc123
+ output_index: 0
+ sequence_number: 5
+ type: response.apply_patch_call_operation_diff.delta
+ properties:
+ delta:
+ type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.apply_patch_call_operation_diff.delta
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - delta
+ - sequence_number
+ type: object
+ ApplyPatchCallOperationDiffDoneEvent:
+ description: Emitted when `operation.diff` streaming completes for an `apply_patch_call`.
+ example:
+ diff: |
+ @@
+ +console.log("hi");
+ item_id: apc_abc123
+ output_index: 0
+ sequence_number: 12
+ type: response.apply_patch_call_operation_diff.done
+ properties:
+ diff:
+ type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.apply_patch_call_operation_diff.done
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - diff
+ - sequence_number
+ type: object
+ ApplyPatchCallOutputItem:
+ description: >-
+ The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise.
+ example:
+ call_id: call_abc123
+ output: Applied patch to /src/main.ts
+ status: completed
+ type: apply_patch_call_output
+ properties:
+ call_id:
+ type: string
+ id:
+ nullable: true
+ type: string
+ output:
+ nullable: true
+ type: string
+ status:
+ enum:
+ - completed
+ - failed
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - apply_patch_call_output
+ type: string
+ required:
+ - type
+ - call_id
+ - status
+ type: object
+ ApplyPatchCallStatus:
+ description: Lifecycle state of an `apply_patch_call` output item.
+ enum:
+ - in_progress
+ - completed
+ example: completed
+ type: string
+ x-speakeasy-unknown-values: allow
+ ApplyPatchCreateFileOperation:
+ description: >-
+ The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents.
+ example:
+ diff: |
+ @@
+ +console.log("hi");
+ path: /src/main.ts
+ type: create_file
+ properties:
+ diff:
+ type: string
+ path:
+ type: string
+ type:
+ enum:
+ - create_file
+ type: string
+ required:
+ - type
+ - path
+ - diff
+ type: object
+ ApplyPatchDeleteFileOperation:
+ description: >-
+ The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required.
+ example:
+ path: /src/main.ts
+ type: delete_file
+ properties:
+ path:
+ type: string
+ type:
+ enum:
+ - delete_file
+ type: string
+ required:
+ - type
+ - path
+ type: object
+ ApplyPatchEngineEnum:
+ description: >-
+ Which apply_patch engine to use. "auto" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. "native" forces native passthrough — when the endpoint does not support native, the request falls back to HITL. "openrouter" always runs the HITL validator. Native passthrough streams the diff incrementally via `apply_patch_call_operation_diff.delta` events; HITL buffers the diff for atomic delivery as a single delta.
+ enum:
+ - auto
+ - native
+ - openrouter
+ example: auto
+ type: string
+ x-speakeasy-unknown-values: allow
ApplyPatchServerTool:
description: Apply patch tool configuration
example:
@@ -2008,11 +2374,126 @@ components:
required:
- type
type: object
+ ApplyPatchServerTool_OpenRouter:
+ description: >-
+ OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.
+ example:
+ type: openrouter:apply_patch
+ properties:
+ parameters:
+ $ref: '#/components/schemas/ApplyPatchServerToolConfig'
+ type:
+ enum:
+ - openrouter:apply_patch
+ type: string
+ required:
+ - type
+ type: object
+ ApplyPatchServerToolConfig:
+ description: Configuration for the openrouter:apply_patch server tool
+ example:
+ engine: auto
+ properties:
+ engine:
+ $ref: '#/components/schemas/ApplyPatchEngineEnum'
+ type: object
+ ApplyPatchUpdateFileOperation:
+ description: >-
+ The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file.
+ example:
+ diff: |-
+ @@ function main() {
+ + console.log("hi");
+ }
+ path: /src/main.ts
+ type: update_file
+ properties:
+ diff:
+ type: string
+ path:
+ type: string
+ type:
+ enum:
+ - update_file
+ type: string
+ required:
+ - type
+ - path
+ - diff
+ type: object
+ AppRankingsItem:
+ example:
+ app_id: 12345
+ app_name: Cline
+ rank: 1
+ total_requests: 4321
+ total_tokens: '12345678'
+ properties:
+ app_id:
+ description: Stable numeric identifier of the app on OpenRouter.
+ example: 12345
+ type: integer
+ app_name:
+ description: Public display name of the app.
+ example: Cline
+ type: string
+ rank:
+ description: 1-based position of the app within this response, per the requested `sort`.
+ example: 1
+ type: integer
+ total_requests:
+ description: Number of requests attributed to the app inside the date window.
+ example: 4321
+ type: integer
+ total_tokens:
+ description: >-
+ Sum of `prompt_tokens + completion_tokens` attributed to the app inside the date window, returned as a decimal string so 64-bit values are not truncated.
+ example: '12345678'
+ type: string
+ required:
+ - rank
+ - app_id
+ - app_name
+ - total_tokens
+ - total_requests
+ type: object
+ AppRankingsResponse:
+ example:
+ data:
+ - app_id: 12345
+ app_name: Cline
+ rank: 1
+ total_requests: 4321
+ total_tokens: '12345678'
+ - app_id: 67890
+ app_name: Roo Code
+ rank: 2
+ total_requests: 2109
+ total_tokens: '9876543'
+ meta:
+ as_of: '2026-05-12T02:00:00Z'
+ end_date: '2026-05-11'
+ start_date: '2026-04-12'
+ version: v1
+ properties:
+ data:
+ description: >-
+ Apps ranked per the requested `sort`, re-numbered 1..N after category filtering. `popular` sorts by `total_tokens` descending; `trending` sorts by absolute excess token growth descending and may return fewer than `limit` rows when few apps are growing.
+ items:
+ $ref: '#/components/schemas/AppRankingsItem'
+ type: array
+ meta:
+ $ref: '#/components/schemas/RankingsDailyMeta'
+ required:
+ - data
+ - meta
+ type: object
AutoRouterPlugin:
example:
allowed_models:
- anthropic/*
- openai/gpt-4o
+ cost_quality_tradeoff: 7
enabled: true
id: auto-router
properties:
@@ -2026,6 +2507,13 @@ components:
items:
type: string
type: array
+ cost_quality_tradeoff:
+ description: >-
+ Controls cost vs. quality routing tradeoff (0–10). 0 = pure quality (best model regardless of cost), 10 = maximize for cost (cheapest model wins). Intermediate values blend quality and cost signals continuously. Defaults to 7.
+ example: 7
+ maximum: 10
+ minimum: 0
+ type: integer
enabled:
description: Set to false to disable the auto-router plugin for this request. Defaults to true.
type: boolean
@@ -2045,6 +2533,11 @@ components:
properties:
error:
$ref: '#/components/schemas/BadGatewayResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -2079,6 +2572,11 @@ components:
properties:
error:
$ref: '#/components/schemas/BadRequestResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -2219,6 +2717,66 @@ components:
- part
- sequence_number
type: object
+ BaseCustomToolCallInputDeltaEvent:
+ description: >-
+ Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments.
+ example:
+ delta: '*** Begin Patch'
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ type: response.custom_tool_call_input.delta
+ properties:
+ delta:
+ type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.custom_tool_call_input.delta
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - delta
+ - sequence_number
+ type: object
+ BaseCustomToolCallInputDoneEvent:
+ description: >-
+ Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools.
+ example:
+ input: |-
+ *** Begin Patch
+ *** End Patch
+ item_id: item-1
+ output_index: 0
+ sequence_number: 6
+ type: response.custom_tool_call_input.done
+ properties:
+ input:
+ type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.custom_tool_call_input.done
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - input
+ - sequence_number
+ type: object
BaseErrorEvent:
description: Event emitted when an error occurs during streaming
example:
@@ -2368,6 +2926,10 @@ components:
- $ref: '#/components/schemas/OpenAIResponseFunctionToolCall'
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
- $ref: '#/components/schemas/OutputMessage'
+ - $ref: '#/components/schemas/OpenAIResponseCustomToolCall'
+ - $ref: '#/components/schemas/OpenAIResponseCustomToolCallOutput'
+ - $ref: '#/components/schemas/ApplyPatchCallItem'
+ - $ref: '#/components/schemas/ApplyPatchCallOutputItem'
type: array
- nullable: true
example:
@@ -2378,7 +2940,7 @@ components:
example:
container: null
content:
- - citations: null
+ - citations: []
text: Hello!
type: text
id: msg_01XFDUDYJgAACzvnptvVoYEL
@@ -2437,6 +2999,7 @@ components:
inference_geo: null
input_tokens: 100
output_tokens: 50
+ output_tokens_details: null
server_tool_use: null
service_tier: standard
required:
@@ -2780,6 +3343,8 @@ components:
items:
discriminator:
mapping:
+ apply_patch_call: '#/components/schemas/OutputItemApplyPatchCall'
+ custom_tool_call: '#/components/schemas/OutputItemCustomToolCall'
file_search_call: '#/components/schemas/OutputItemFileSearchCall'
function_call: '#/components/schemas/OutputItemFunctionCall'
image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
@@ -2791,9 +3356,11 @@ components:
- $ref: '#/components/schemas/OutputMessage'
- $ref: '#/components/schemas/OutputItemReasoning'
- $ref: '#/components/schemas/OutputItemFunctionCall'
+ - $ref: '#/components/schemas/OutputItemCustomToolCall'
- $ref: '#/components/schemas/OutputItemWebSearchCall'
- $ref: '#/components/schemas/OutputItemFileSearchCall'
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
+ - $ref: '#/components/schemas/OutputItemApplyPatchCall'
type: array
output_text:
type: string
@@ -2979,10 +3546,104 @@ components:
- sequence_number
- logprobs
type: object
+ BashServerTool:
+ description: 'OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container'
+ example:
+ parameters:
+ environment:
+ type: container_auto
+ type: openrouter:bash
+ properties:
+ parameters:
+ $ref: '#/components/schemas/BashServerToolConfig'
+ type:
+ enum:
+ - openrouter:bash
+ type: string
+ required:
+ - type
+ type: object
+ BashServerToolConfig:
+ description: Configuration for the openrouter:bash server tool
+ example:
+ environment:
+ type: container_auto
+ properties:
+ engine:
+ $ref: '#/components/schemas/BashServerToolEngine'
+ environment:
+ $ref: '#/components/schemas/BashServerToolEnvironment'
+ sleep_after_seconds:
+ $ref: '#/components/schemas/SandboxSleepAfterSeconds'
+ type: object
+ BashServerToolEngine:
+ description: >-
+ Which bash engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) and "native" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands.
+ enum:
+ - auto
+ - native
+ - openrouter
+ example: auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ BashServerToolEnvironment:
+ description: Execution environment for the bash server tool.
+ discriminator:
+ mapping:
+ container_auto: '#/components/schemas/ContainerAutoEnvironment'
+ container_reference: '#/components/schemas/ContainerReferenceEnvironment'
+ propertyName: type
+ example:
+ type: container_auto
+ oneOf:
+ - $ref: '#/components/schemas/ContainerAutoEnvironment'
+ - $ref: '#/components/schemas/ContainerReferenceEnvironment'
BigNumberUnion:
description: Price per million prompt tokens
example: 1000
type: string
+ BulkAddWorkspaceMembersRequest:
+ example:
+ user_ids:
+ - user_abc123
+ - user_def456
+ properties:
+ user_ids:
+ description: List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.
+ example:
+ - user_abc123
+ - user_def456
+ items:
+ type: string
+ maxItems: 100
+ minItems: 1
+ type: array
+ required:
+ - user_ids
+ type: object
+ BulkAddWorkspaceMembersResponse:
+ example:
+ added_count: 1
+ data:
+ - created_at: '2025-08-24T10:30:00Z'
+ id: 660e8400-e29b-41d4-a716-446655440000
+ role: member
+ user_id: user_abc123
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ added_count:
+ description: Number of workspace memberships created or updated
+ example: 2
+ type: integer
+ data:
+ description: List of added workspace memberships
+ items:
+ $ref: '#/components/schemas/WorkspaceMember'
+ type: array
+ required:
+ - data
+ - added_count
+ type: object
BulkAssignKeysRequest:
example:
key_hashes:
@@ -3041,6 +3702,36 @@ components:
required:
- assigned_count
type: object
+ BulkRemoveWorkspaceMembersRequest:
+ example:
+ user_ids:
+ - user_abc123
+ - user_def456
+ properties:
+ user_ids:
+ description: List of user IDs to remove from the workspace
+ example:
+ - user_abc123
+ - user_def456
+ items:
+ type: string
+ maxItems: 100
+ minItems: 1
+ type: array
+ required:
+ - user_ids
+ type: object
+ BulkRemoveWorkspaceMembersResponse:
+ example:
+ removed_count: 2
+ properties:
+ removed_count:
+ description: Number of members removed
+ example: 2
+ type: integer
+ required:
+ - removed_count
+ type: object
BulkUnassignKeysRequest:
example:
key_hashes:
@@ -3099,6 +3790,188 @@ components:
required:
- unassigned_count
type: object
+ BYOKKey:
+ example:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ allowed_api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction.
+ example:
+ - f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ allowed_models:
+ description: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ example: null
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ allowed_user_ids:
+ description: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ example: null
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ created_at:
+ description: ISO timestamp of when the credential was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ disabled:
+ description: Whether this credential is currently disabled.
+ example: false
+ type: boolean
+ id:
+ description: Stable public identifier for this BYOK credential.
+ example: 11111111-2222-3333-4444-555555555555
+ format: uuid
+ type: string
+ is_fallback:
+ description: >-
+ Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ example: false
+ type: boolean
+ label:
+ description: Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI.
+ example: sk-...AbCd
+ type: string
+ name:
+ description: Optional human-readable name for the credential.
+ example: Production OpenAI Key
+ nullable: true
+ type: string
+ provider:
+ $ref: '#/components/schemas/BYOKProviderSlug'
+ sort_order:
+ description: Position within the provider — credentials are tried in ascending sort order.
+ example: 0
+ type: integer
+ workspace_id:
+ description: ID of the workspace this credential belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - provider
+ - workspace_id
+ - label
+ - disabled
+ - is_fallback
+ - allowed_models
+ - allowed_api_key_hashes
+ - allowed_user_ids
+ - sort_order
+ - created_at
+ type: object
+ BYOKProviderSlug:
+ description: >-
+ The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`).
+ enum:
+ - ai21
+ - aion-labs
+ - akashml
+ - alibaba
+ - amazon-bedrock
+ - amazon-nova
+ - ambient
+ - anthropic
+ - arcee-ai
+ - atlas-cloud
+ - avian
+ - azure
+ - baidu
+ - baseten
+ - black-forest-labs
+ - byteplus
+ - cerebras
+ - chutes
+ - cirrascale
+ - clarifai
+ - cloudflare
+ - cohere
+ - crusoe
+ - darkbloom
+ - decart
+ - deepinfra
+ - deepseek
+ - dekallm
+ - digitalocean
+ - featherless
+ - fireworks
+ - friendli
+ - gmicloud
+ - google-ai-studio
+ - google-vertex
+ - groq
+ - inception
+ - inceptron
+ - inference-net
+ - infermatic
+ - inflection
+ - io-net
+ - ionstream
+ - liquid
+ - mancer
+ - mara
+ - minimax
+ - mistral
+ - modelrun
+ - modular
+ - moonshotai
+ - morph
+ - ncompass
+ - nebius
+ - nex-agi
+ - nextbit
+ - novita
+ - nvidia
+ - open-inference
+ - openai
+ - parasail
+ - perceptron
+ - perplexity
+ - phala
+ - poolside
+ - recraft
+ - reka
+ - relace
+ - sambanova
+ - seed
+ - siliconflow
+ - sourceful
+ - stepfun
+ - streamlake
+ - switchpoint
+ - together
+ - upstage
+ - venice
+ - wafer
+ - wandb
+ - xai
+ - xiaomi
+ - z-ai
+ example: openai
+ type: string
+ x-speakeasy-unknown-values: allow
ChatAssistantImages:
description: Generated images from image generation models
example:
@@ -3544,9 +4417,12 @@ components:
- type
- function
type: object
+ - $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
+ - $ref: '#/components/schemas/BashServerTool'
- $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
+ - $ref: '#/components/schemas/WebFetchServerTool'
- $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
- $ref: '#/components/schemas/ChatWebSearchShorthand'
description: Tool definition for function calling (regular function or OpenRouter built-in server tool)
@@ -3696,10 +4572,7 @@ components:
temperature: 0.7
properties:
cache_control:
- allOf:
- - $ref: '#/components/schemas/AnthropicCacheControlDirective'
- - description: >-
- Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
debug:
$ref: '#/components/schemas/ChatDebugOptions'
frequency_penalty:
@@ -3782,17 +4655,23 @@ components:
auto-router: '#/components/schemas/AutoRouterPlugin'
context-compression: '#/components/schemas/ContextCompressionPlugin'
file-parser: '#/components/schemas/FileParserPlugin'
+ fusion: '#/components/schemas/FusionPlugin'
moderation: '#/components/schemas/ModerationPlugin'
+ pareto-router: '#/components/schemas/ParetoRouterPlugin'
response-healing: '#/components/schemas/ResponseHealingPlugin'
web: '#/components/schemas/WebSearchPlugin'
+ web-fetch: '#/components/schemas/WebFetchPlugin'
propertyName: id
oneOf:
- $ref: '#/components/schemas/AutoRouterPlugin'
- $ref: '#/components/schemas/ModerationPlugin'
- $ref: '#/components/schemas/WebSearchPlugin'
+ - $ref: '#/components/schemas/WebFetchPlugin'
- $ref: '#/components/schemas/FileParserPlugin'
- $ref: '#/components/schemas/ResponseHealingPlugin'
- $ref: '#/components/schemas/ContextCompressionPlugin'
+ - $ref: '#/components/schemas/ParetoRouterPlugin'
+ - $ref: '#/components/schemas/FusionPlugin'
type: array
presence_penalty:
description: Presence penalty (-2.0 to 2.0)
@@ -3865,7 +4744,7 @@ components:
x-speakeasy-unknown-values: allow
session_id:
description: >-
- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
maxLength: 256
type: string
stop:
@@ -3879,6 +4758,8 @@ components:
description: Stop sequences (up to 4)
example:
- ""
+ stop_server_tools_when:
+ $ref: '#/components/schemas/StopServerToolsWhen'
stream:
default: false
description: Enable streaming response
@@ -3963,6 +4844,8 @@ components:
enum:
- chat.completion
type: string
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
service_tier:
description: The service tier used by the upstream provider for this request
example: default
@@ -3999,6 +4882,19 @@ components:
required:
- type
type: object
+ ChatServerToolChoice:
+ description: >-
+ OpenRouter extension: force a specific server tool by naming it directly in `tool_choice.type` instead of wrapping it in `{ type: "function", function: { name } }`.
+ example:
+ type: openrouter:web_search
+ properties:
+ type:
+ description: OpenRouter server-tool type to force (e.g. `openrouter:web_search`, `web_search`, `web_search_preview`).
+ example: openrouter:web_search
+ type: string
+ required:
+ - type
+ type: object
ChatStreamChoice:
description: Streaming completion choice chunk
example:
@@ -4077,6 +4973,8 @@ components:
enum:
- chat.completion.chunk
type: string
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
service_tier:
description: The service tier used by the upstream provider for this request
example: default
@@ -4135,6 +5033,25 @@ components:
$ref: '#/components/schemas/ChatStreamToolCall'
type: array
type: object
+ ChatStreamingResponse:
+ example:
+ data:
+ choices:
+ - delta:
+ content: Hello
+ role: assistant
+ finish_reason: null
+ index: 0
+ created: 1677652288
+ id: chatcmpl-123
+ model: openai/gpt-4
+ object: chat.completion.chunk
+ properties:
+ data:
+ $ref: '#/components/schemas/ChatStreamChunk'
+ required:
+ - data
+ type: object
ChatStreamOptions:
description: Streaming configuration options
example:
@@ -4342,6 +5259,7 @@ components:
- required
type: string
- $ref: '#/components/schemas/ChatNamedToolChoice'
+ - $ref: '#/components/schemas/ChatServerToolChoice'
description: Tool choice configuration
example: auto
ChatToolMessage:
@@ -4378,6 +5296,12 @@ components:
completion_tokens: 15
completion_tokens_details:
reasoning_tokens: 5
+ cost: 0.0012
+ cost_details:
+ upstream_inference_completions_cost: 0.0004
+ upstream_inference_cost: null
+ upstream_inference_prompt_cost: 0.0008
+ is_byok: false
prompt_tokens: 10
prompt_tokens_details:
cached_tokens: 2
@@ -4407,6 +5331,16 @@ components:
nullable: true
type: integer
type: object
+ cost:
+ description: Cost of the completion
+ format: double
+ nullable: true
+ type: number
+ cost_details:
+ $ref: '#/components/schemas/CostDetails'
+ is_byok:
+ description: Whether a request was made using a Bring Your Own Key configuration
+ type: boolean
prompt_tokens:
description: Number of tokens in the prompt
type: integer
@@ -4468,7 +5402,7 @@ components:
properties:
allowed_domains:
description: >-
- Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity.
+ Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.
items:
type: string
type: array
@@ -4476,10 +5410,15 @@ components:
$ref: '#/components/schemas/WebSearchEngineEnum'
excluded_domains:
description: >-
- Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity.
+ Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.
items:
type: string
type: array
+ max_characters:
+ description: >-
+ Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel).
+ example: 2000
+ type: integer
max_results:
description: >-
Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.
@@ -4487,8 +5426,8 @@ components:
type: integer
max_total_results:
description: >-
- Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.
- example: 20
+ Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.
+ example: 50
type: integer
parameters:
$ref: '#/components/schemas/WebSearchConfig'
@@ -4618,6 +5557,25 @@ components:
required:
- type
type: object
+ CompactionItem:
+ description: A context compaction marker with encrypted summary
+ example:
+ encrypted_content: enc_abc123...
+ type: compaction
+ properties:
+ encrypted_content:
+ type: string
+ id:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - compaction
+ type: string
+ required:
+ - type
+ - encrypted_content
+ type: object
CompletedEvent:
description: Event emitted when a response has completed successfully
example:
@@ -4727,6 +5685,11 @@ components:
properties:
error:
$ref: '#/components/schemas/ConflictResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -4752,6 +5715,141 @@ components:
- code
- message
type: object
+ ContainerAutoEnvironment:
+ description: An OpenRouter-managed, auto-provisioned ephemeral container.
+ example:
+ type: container_auto
+ properties:
+ type:
+ enum:
+ - container_auto
+ type: string
+ required:
+ - type
+ type: object
+ ContainerReferenceEnvironment:
+ description: Reference to a previously created container to reuse.
+ example:
+ container_id: cntr_abc123
+ type: container_reference
+ properties:
+ container_id:
+ description: Identifier of an existing container to reuse (max 20 characters).
+ example: cntr_abc123
+ maxLength: 20
+ minLength: 1
+ pattern: ^[\w-]+$
+ type: string
+ type:
+ enum:
+ - container_reference
+ type: string
+ required:
+ - type
+ - container_id
+ type: object
+ ContentFilterAction:
+ description: Action taken when the pattern matches
+ enum:
+ - redact
+ - block
+ example: block
+ type: string
+ x-speakeasy-unknown-values: allow
+ ContentFilterBuiltinAction:
+ description: Action taken when the builtin filter triggers
+ enum:
+ - redact
+ - block
+ - flag
+ example: block
+ type: string
+ x-speakeasy-unknown-values: allow
+ ContentFilterBuiltinEntry:
+ description: >-
+ A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector.
+ example:
+ action: redact
+ label: '[EMAIL]'
+ slug: email
+ properties:
+ action:
+ $ref: '#/components/schemas/ContentFilterBuiltinAction'
+ label:
+ description: >-
+ Read-only, system-assigned redaction placeholder derived from the slug (e.g. "[EMAIL]", "[PHONE]"). Not settable by the caller.
+ example: '[EMAIL]'
+ maxLength: 100
+ type: string
+ scan_scope:
+ $ref: '#/components/schemas/PromptInjectionScanScope'
+ slug:
+ $ref: '#/components/schemas/ContentFilterBuiltinSlug'
+ required:
+ - slug
+ - action
+ type: object
+ ContentFilterBuiltinEntryInput:
+ description: >-
+ A builtin content filter entry for create/update requests. Labels are system-assigned and cannot be set by the caller.
+ example:
+ action: redact
+ slug: email
+ properties:
+ action:
+ $ref: '#/components/schemas/ContentFilterBuiltinAction'
+ label:
+ deprecated: true
+ description: >-
+ Deprecated: labels are system-assigned and cannot be set by the caller. Accepted for backward compatibility but silently ignored.
+ maxLength: 100
+ type: string
+ scan_scope:
+ $ref: '#/components/schemas/PromptInjectionScanScope'
+ slug:
+ $ref: '#/components/schemas/ContentFilterBuiltinSlug'
+ required:
+ - slug
+ - action
+ type: object
+ ContentFilterBuiltinSlug:
+ description: The builtin filter identifier
+ enum:
+ - email
+ - phone
+ - ssn
+ - credit-card
+ - ip-address
+ - person-name
+ - address
+ - regex-prompt-injection
+ example: regex-prompt-injection
+ type: string
+ x-speakeasy-unknown-values: allow
+ ContentFilterEntry:
+ description: A custom regex content filter that scans request messages for matching patterns.
+ example:
+ action: redact
+ label: '[API_KEY]'
+ pattern: \b(sk-[a-zA-Z0-9]{48})\b
+ properties:
+ action:
+ $ref: '#/components/schemas/ContentFilterAction'
+ label:
+ description: Optional label used in redaction placeholders or error messages
+ example: '[API_KEY]'
+ maxLength: 100
+ nullable: true
+ type: string
+ pattern:
+ description: A regex pattern to match against request content
+ example: \b(sk-[a-zA-Z0-9]{48})\b
+ minLength: 1
+ type: string
+ required:
+ - pattern
+ - action
+ type: object
ContentPartAddedEvent:
allOf:
- $ref: '#/components/schemas/BaseContentPartAddedEvent'
@@ -4773,6 +5871,27 @@ components:
type: output_text
sequence_number: 3
type: response.content_part.added
+ ContentPartAudio:
+ example:
+ audio_url:
+ url: https://example.com/audio.mp3
+ type: audio_url
+ properties:
+ audio_url:
+ properties:
+ url:
+ type: string
+ required:
+ - url
+ type: object
+ type:
+ enum:
+ - audio_url
+ type: string
+ required:
+ - type
+ - audio_url
+ type: object
ContentPartDoneEvent:
allOf:
- $ref: '#/components/schemas/BaseContentPartDoneEvent'
@@ -4815,6 +5934,78 @@ components:
- type
- image_url
type: object
+ ContentPartInputAudio:
+ example:
+ input_audio:
+ data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...
+ format: wav
+ type: input_audio
+ properties:
+ input_audio:
+ $ref: '#/components/schemas/MultimodalMedia'
+ type:
+ enum:
+ - input_audio
+ type: string
+ required:
+ - type
+ - input_audio
+ type: object
+ ContentPartInputFile:
+ example:
+ input_file:
+ data: data:application/pdf;base64,JVBERi0xLjQKJeLjz9MKMyAw...
+ format: pdf
+ type: input_file
+ properties:
+ input_file:
+ $ref: '#/components/schemas/MultimodalMedia'
+ type:
+ enum:
+ - input_file
+ type: string
+ required:
+ - type
+ - input_file
+ type: object
+ ContentPartInputVideo:
+ example:
+ input_video:
+ data: data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQy...
+ format: mp4
+ type: input_video
+ properties:
+ input_video:
+ $ref: '#/components/schemas/MultimodalMedia'
+ type:
+ enum:
+ - input_video
+ type: string
+ required:
+ - type
+ - input_video
+ type: object
+ ContentPartVideo:
+ example:
+ type: video_url
+ video_url:
+ url: https://example.com/clip.mp4
+ properties:
+ type:
+ enum:
+ - video_url
+ type: string
+ video_url:
+ properties:
+ url:
+ type: string
+ required:
+ - url
+ type: object
+ required:
+ - type
+ - video_url
+ type: object
ContextCompressionEngine:
description: The compression engine to use. Defaults to "middle-out".
enum:
@@ -4839,6 +6030,104 @@ components:
required:
- id
type: object
+ CostDetails:
+ description: Breakdown of upstream inference costs
+ example:
+ upstream_inference_completions_cost: 0.0004
+ upstream_inference_cost: null
+ upstream_inference_prompt_cost: 0.0008
+ nullable: true
+ properties:
+ upstream_inference_completions_cost:
+ format: double
+ type: number
+ upstream_inference_cost:
+ format: double
+ nullable: true
+ type: number
+ upstream_inference_prompt_cost:
+ format: double
+ type: number
+ required:
+ - upstream_inference_prompt_cost
+ - upstream_inference_completions_cost
+ type: object
+ CreateBYOKKeyRequest:
+ example:
+ key: sk-proj-abc123...
+ name: Production OpenAI Key
+ provider: openai
+ properties:
+ allowed_models:
+ description: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ example: null
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ allowed_user_ids:
+ description: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ example: null
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ disabled:
+ description: Whether this credential should be created in a disabled state.
+ example: false
+ type: boolean
+ is_fallback:
+ description: >-
+ Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ example: false
+ type: boolean
+ key:
+ description: The raw provider API key or credential. This value is encrypted at rest and never returned in API responses.
+ example: sk-proj-abc123...
+ minLength: 1
+ type: string
+ name:
+ description: Optional human-readable name for the credential.
+ example: Production OpenAI Key
+ maxLength: 255
+ nullable: true
+ type: string
+ provider:
+ $ref: '#/components/schemas/BYOKProviderSlug'
+ workspace_id:
+ description: Optional workspace ID. Defaults to the authenticated entity's default workspace.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - provider
+ - key
+ type: object
+ CreateBYOKKeyResponse:
+ example:
+ data:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/BYOKKey'
+ - description: The created BYOK credential.
+ required:
+ - data
+ type: object
CreatedEvent:
description: Event emitted when a response is created
example:
@@ -4882,8 +6171,15 @@ components:
- openai
- anthropic
- deepseek
+ content_filter_builtins:
+ - action: block
+ slug: regex-prompt-injection
+ content_filters: null
description: A guardrail for limiting API usage
- enforce_zdr: false
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
ignored_models: null
ignored_providers: null
limit_usd: 50
@@ -4912,6 +6208,26 @@ components:
minItems: 1
nullable: true
type: array
+ content_filter_builtins:
+ description: >-
+ Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only.
+ example:
+ - action: block
+ slug: regex-prompt-injection
+ items:
+ $ref: '#/components/schemas/ContentFilterBuiltinEntryInput'
+ nullable: true
+ type: array
+ content_filters:
+ description: Custom regex content filters to apply to request messages
+ example:
+ - action: redact
+ label: '[API_KEY]'
+ pattern: \b(sk-[a-zA-Z0-9]{48})\b
+ items:
+ $ref: '#/components/schemas/ContentFilterEntry'
+ nullable: true
+ type: array
description:
description: Description of the guardrail
example: A guardrail for limiting API usage
@@ -4919,7 +6235,30 @@ components:
nullable: true
type: string
enforce_zdr:
- description: Whether to enforce zero data retention
+ deprecated: true
+ description: >-
+ Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_anthropic:
+ description: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_google:
+ description: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_openai:
+ description: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_other:
+ description: >-
+ Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
example: false
nullable: true
type: boolean
@@ -4955,6 +6294,11 @@ components:
type: string
reset_interval:
$ref: '#/components/schemas/GuardrailInterval'
+ workspace_id:
+ description: The workspace to create the guardrail in. Defaults to the default workspace if not provided.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ format: uuid
+ type: string
required:
- name
type: object
@@ -4966,9 +6310,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: redact
+ label: '[EMAIL]'
+ slug: email
+ content_filters: null
created_at: '2025-08-24T10:30:00Z'
description: A guardrail for limiting API usage
- enforce_zdr: false
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -4976,6 +6329,7 @@ components:
name: My New Guardrail
reset_interval: monthly
updated_at: null
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
allOf:
@@ -4984,6 +6338,242 @@ components:
required:
- data
type: object
+ CreateObservabilityDestinationRequest:
+ example:
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ name: Production Langfuse
+ type: langfuse
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided.
+ example: null
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ config:
+ additionalProperties:
+ nullable: true
+ description: Provider-specific configuration. The shape depends on `type` and is validated server-side.
+ example:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ type: object
+ enabled:
+ default: true
+ description: Whether this destination should be enabled immediately.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ type: string
+ privacy_mode:
+ default: false
+ description: When true, request/response bodies are not forwarded — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ description: The destination type. Only stable destination types are accepted.
+ enum:
+ - arize
+ - braintrust
+ - clickhouse
+ - datadog
+ - grafana
+ - langfuse
+ - langsmith
+ - newrelic
+ - opik
+ - otel-collector
+ - posthog
+ - ramp
+ - s3
+ - sentry
+ - snowflake
+ - weave
+ - webhook
+ example: langfuse
+ type: string
+ x-speakeasy-unknown-values: allow
+ workspace_id:
+ description: Optional workspace ID. Defaults to the authenticated entity's default workspace.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - type
+ - name
+ - config
+ type: object
+ CreateObservabilityDestinationResponse:
+ example:
+ data:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/ObservabilityDestination'
+ - description: The newly created observability destination.
+ required:
+ - data
+ type: object
+ CreatePresetFromInferenceResponse:
+ description: Response containing the created preset with its designated version.
+ example:
+ data:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ properties:
+ data:
+ $ref: '#/components/schemas/PresetWithDesignatedVersion'
+ required:
+ - data
+ type: object
+ CreateWorkspaceRequest:
+ example:
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ name: Production
+ slug: production
+ properties:
+ default_image_model:
+ description: Default image model for this workspace
+ example: openai/dall-e-3
+ nullable: true
+ type: string
+ default_provider_sort:
+ description: Default provider sort preference (price, throughput, latency, exacto)
+ example: price
+ nullable: true
+ type: string
+ default_text_model:
+ description: Default text model for this workspace
+ example: openai/gpt-4o
+ nullable: true
+ type: string
+ description:
+ description: Description of the workspace
+ example: Production environment workspace
+ maxLength: 500
+ nullable: true
+ type: string
+ io_logging_api_key_ids:
+ description: Optional array of API key IDs to filter I/O logging
+ example: null
+ items:
+ type: integer
+ nullable: true
+ type: array
+ io_logging_sampling_rate:
+ description: Sampling rate for I/O logging (0.0001-1)
+ example: 1
+ format: double
+ type: number
+ is_data_discount_logging_enabled:
+ description: Whether data discount logging is enabled
+ example: true
+ type: boolean
+ is_observability_broadcast_enabled:
+ description: Whether broadcast is enabled
+ example: false
+ type: boolean
+ is_observability_io_logging_enabled:
+ description: Whether private logging is enabled
+ example: false
+ type: boolean
+ name:
+ description: Name for the new workspace
+ example: Production
+ maxLength: 100
+ minLength: 1
+ type: string
+ slug:
+ description: URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)
+ example: production
+ maxLength: 50
+ minLength: 1
+ pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
+ type: string
+ required:
+ - name
+ - slug
+ type: object
+ CreateWorkspaceResponse:
+ example:
+ data:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: null
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/Workspace'
+ - description: The created workspace
+ required:
+ - data
+ type: object
CustomTool:
description: Custom tool configuration
example:
@@ -5030,6 +6620,96 @@ components:
- type
- name
type: object
+ CustomToolCallInputDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseCustomToolCallInputDeltaEvent'
+ - properties: {}
+ type: object
+ description: >-
+ Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments.
+ example:
+ delta: '*** Begin Patch'
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ type: response.custom_tool_call_input.delta
+ CustomToolCallInputDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseCustomToolCallInputDoneEvent'
+ - properties: {}
+ type: object
+ description: >-
+ Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools.
+ example:
+ input: |-
+ *** Begin Patch
+ *** End Patch
+ item_id: item-1
+ output_index: 0
+ sequence_number: 6
+ type: response.custom_tool_call_input.done
+ CustomToolCallItem:
+ description: >-
+ A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.
+ example:
+ call_id: call-abc123
+ id: ctc-abc123
+ input: |-
+ *** Begin Patch
+ *** End Patch
+ name: apply_patch
+ type: custom_tool_call
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ input:
+ type: string
+ name:
+ type: string
+ namespace:
+ description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
+ type: string
+ type:
+ enum:
+ - custom_tool_call
+ type: string
+ required:
+ - type
+ - call_id
+ - name
+ - input
+ type: object
+ CustomToolCallOutputItem:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponseCustomToolCallOutput'
+ - properties:
+ output:
+ anyOf:
+ - type: string
+ - items:
+ oneOf:
+ - $ref: '#/components/schemas/InputText'
+ - allOf:
+ - $ref: '#/components/schemas/InputImage'
+ - properties: {}
+ type: object
+ description: Image input content item
+ example:
+ detail: auto
+ image_url: https://example.com/image.jpg
+ type: input_image
+ - $ref: '#/components/schemas/InputFile'
+ type: array
+ type: object
+ description: >-
+ The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`.
+ example:
+ call_id: call-abc123
+ id: ctco-abc123
+ output: patch applied successfully
+ type: custom_tool_call_output
DatetimeServerTool:
description: 'OpenRouter built-in server tool: returns the current date and time'
example:
@@ -5092,6 +6772,18 @@ components:
nullable: true
type: number
type: object
+ DeleteBYOKKeyResponse:
+ example:
+ deleted: true
+ properties:
+ deleted:
+ const: true
+ description: Confirmation that the BYOK credential was deleted.
+ example: true
+ type: boolean
+ required:
+ - deleted
+ type: object
DeleteGuardrailResponse:
example:
deleted: true
@@ -5104,6 +6796,29 @@ components:
required:
- deleted
type: object
+ DeleteObservabilityDestinationResponse:
+ example:
+ deleted: true
+ properties:
+ deleted:
+ const: true
+ description: Always `true` on success.
+ type: boolean
+ required:
+ - deleted
+ type: object
+ DeleteWorkspaceResponse:
+ example:
+ deleted: true
+ properties:
+ deleted:
+ const: true
+ description: Confirmation that the workspace was deleted
+ example: true
+ type: boolean
+ required:
+ - deleted
+ type: object
DeprecatedRoute:
deprecated: true
description: >-
@@ -5186,6 +6901,11 @@ components:
properties:
error:
$ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -5211,6 +6931,41 @@ components:
- code
- message
type: object
+ EndpointInfo:
+ example:
+ model: openai/gpt-4o
+ provider: OpenAI
+ selected: true
+ properties:
+ model:
+ type: string
+ provider:
+ type: string
+ selected:
+ type: boolean
+ required:
+ - provider
+ - model
+ - selected
+ type: object
+ EndpointsMetadata:
+ example:
+ available:
+ - model: openai/gpt-4o
+ provider: OpenAI
+ selected: true
+ total: 3
+ properties:
+ available:
+ items:
+ $ref: '#/components/schemas/EndpointInfo'
+ type: array
+ total:
+ type: integer
+ required:
+ - total
+ - available
+ type: object
EndpointStatus:
enum:
- 0
@@ -5407,6 +7162,11 @@ components:
properties:
error:
$ref: '#/components/schemas/ForbiddenResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -5631,6 +7391,973 @@ components:
- name
- parameters
type: object
+ FusionAnalysisResult:
+ description: Structured analysis produced by the fusion judge model.
+ example:
+ blind_spots:
+ - No model considered the impact on existing API consumers.
+ consensus:
+ - All panel models agree the request is asking for a concise summary.
+ contradictions:
+ - stances:
+ - model: openai/gpt-5
+ stance: Favors an incremental rollout.
+ - model: anthropic/claude-sonnet-4.5
+ stance: Favors a single coordinated migration.
+ topic: Recommended approach
+ partial_coverage:
+ - models:
+ - openai/gpt-5
+ point: Only one model addressed the rollback strategy.
+ unique_insights:
+ - insight: Highlighted a backwards-compatibility risk the other models missed.
+ model: anthropic/claude-sonnet-4.5
+ properties:
+ blind_spots:
+ items:
+ type: string
+ type: array
+ consensus:
+ items:
+ type: string
+ type: array
+ contradictions:
+ items:
+ properties:
+ stances:
+ items:
+ properties:
+ model:
+ type: string
+ stance:
+ type: string
+ required:
+ - model
+ - stance
+ type: object
+ type: array
+ topic:
+ type: string
+ required:
+ - topic
+ - stances
+ type: object
+ type: array
+ partial_coverage:
+ items:
+ properties:
+ models:
+ items:
+ type: string
+ type: array
+ point:
+ type: string
+ required:
+ - models
+ - point
+ type: object
+ type: array
+ unique_insights:
+ items:
+ properties:
+ insight:
+ type: string
+ model:
+ type: string
+ required:
+ - model
+ - insight
+ type: object
+ type: array
+ required:
+ - consensus
+ - contradictions
+ - partial_coverage
+ - unique_insights
+ - blind_spots
+ type: object
+ FusionCallAnalysisCompletedEvent:
+ description: Emitted when the fusion judge completes with the structured analysis.
+ example:
+ analysis:
+ blind_spots: []
+ consensus: []
+ contradictions: []
+ partial_coverage: []
+ unique_insights: []
+ item_id: st_fusion_abc
+ output_index: 0
+ sequence_number: 40
+ type: response.fusion_call.analysis.completed
+ properties:
+ analysis:
+ $ref: '#/components/schemas/FusionAnalysisResult'
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.analysis.completed
+ type: string
+ required:
+ - type
+ - analysis
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallAnalysisInProgressEvent:
+ description: Emitted when the fusion judge starts producing the structured analysis.
+ example:
+ item_id: st_fusion_abc
+ judge_model: openai/gpt-5
+ output_index: 0
+ sequence_number: 25
+ type: response.fusion_call.analysis.in_progress
+ properties:
+ item_id:
+ type: string
+ judge_model:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.analysis.in_progress
+ type: string
+ required:
+ - type
+ - judge_model
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallCompletedEvent:
+ description: Emitted when the openrouter:fusion tool call finishes.
+ example:
+ item_id: st_fusion_abc
+ output_index: 0
+ sequence_number: 41
+ type: response.fusion_call.completed
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.completed
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallInProgressEvent:
+ description: Emitted when an openrouter:fusion tool call begins executing.
+ example:
+ item_id: st_fusion_abc
+ output_index: 0
+ sequence_number: 3
+ type: response.fusion_call.in_progress
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.in_progress
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallPanelAddedEvent:
+ description: Emitted when a fusion analysis-panel model starts.
+ example:
+ item_id: st_fusion_abc
+ model: openai/gpt-5
+ output_index: 0
+ sequence_number: 4
+ type: response.fusion_call.panel.added
+ properties:
+ item_id:
+ type: string
+ model:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.panel.added
+ type: string
+ required:
+ - type
+ - model
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallPanelCompletedEvent:
+ description: Emitted when a fusion panel model finishes with its full content.
+ example:
+ content: Full panel response text...
+ item_id: st_fusion_abc
+ model: openai/gpt-5
+ output_index: 0
+ sequence_number: 20
+ type: response.fusion_call.panel.completed
+ properties:
+ content:
+ type: string
+ item_id:
+ type: string
+ model:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.panel.completed
+ type: string
+ required:
+ - type
+ - model
+ - content
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallPanelDeltaEvent:
+ description: Incremental content token from a fusion panel model.
+ example:
+ delta: Carbon taxes
+ item_id: st_fusion_abc
+ model: openai/gpt-5
+ output_index: 0
+ sequence_number: 5
+ type: response.fusion_call.panel.delta
+ properties:
+ delta:
+ type: string
+ item_id:
+ type: string
+ model:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.panel.delta
+ type: string
+ required:
+ - type
+ - model
+ - delta
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallPanelFailedEvent:
+ description: Emitted when a fusion panel model fails.
+ example:
+ error: Upstream provider error
+ item_id: st_fusion_abc
+ model: openai/gpt-5
+ output_index: 0
+ sequence_number: 18
+ status_code: 502
+ type: response.fusion_call.panel.failed
+ properties:
+ error:
+ type: string
+ item_id:
+ type: string
+ model:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ status_code:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.panel.failed
+ type: string
+ required:
+ - type
+ - model
+ - error
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionCallPanelReasoningDeltaEvent:
+ description: Incremental reasoning token from a fusion panel model.
+ example:
+ delta: Considering both sides
+ item_id: st_fusion_abc
+ model: openai/gpt-5
+ output_index: 0
+ sequence_number: 6
+ type: response.fusion_call.panel.reasoning.delta
+ properties:
+ delta:
+ type: string
+ item_id:
+ type: string
+ model:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.fusion_call.panel.reasoning.delta
+ type: string
+ required:
+ - type
+ - model
+ - delta
+ - output_index
+ - item_id
+ - sequence_number
+ type: object
+ FusionPlugin:
+ example:
+ analysis_models:
+ - ~anthropic/claude-opus-latest
+ - ~openai/gpt-latest
+ - ~google/gemini-pro-latest
+ enabled: true
+ id: fusion
+ model: ~anthropic/claude-opus-latest
+ properties:
+ analysis_models:
+ description: >-
+ Slugs of models to run in parallel as the "expert panel" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).
+ example:
+ - ~anthropic/claude-opus-latest
+ - ~openai/gpt-latest
+ - ~google/gemini-pro-latest
+ items:
+ type: string
+ maxItems: 8
+ minItems: 1
+ type: array
+ enabled:
+ description: Set to false to disable the fusion plugin for this request. Defaults to true.
+ type: boolean
+ id:
+ enum:
+ - fusion
+ type: string
+ max_tool_calls:
+ description: >-
+ Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.
+ example: 12
+ maximum: 16
+ minimum: 1
+ type: integer
+ model:
+ description: >-
+ Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.
+ example: ~anthropic/claude-opus-latest
+ type: string
+ tools:
+ description: >-
+ Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
+ example:
+ - parameters:
+ excluded_domains:
+ - example.com
+ type: openrouter:web_search
+ - type: openrouter:web_fetch
+ items:
+ properties:
+ parameters:
+ additionalProperties:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ - type: boolean
+ - nullable: true
+ - items:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ - type: boolean
+ - nullable: true
+ - nullable: true
+ type: array
+ - additionalProperties:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ - type: boolean
+ - nullable: true
+ - nullable: true
+ type: object
+ - nullable: true
+ description: Optional configuration forwarded as the tool's `parameters` object.
+ type: object
+ type:
+ description: Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").
+ type: string
+ required:
+ - type
+ type: object
+ maxItems: 8
+ type: array
+ required:
+ - id
+ type: object
+ FusionServerTool_OpenRouter:
+ description: >-
+ OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from.
+ example:
+ parameters:
+ analysis_models:
+ - ~anthropic/claude-opus-latest
+ - ~openai/gpt-latest
+ type: openrouter:fusion
+ properties:
+ parameters:
+ $ref: '#/components/schemas/FusionServerToolConfig'
+ type:
+ enum:
+ - openrouter:fusion
+ type: string
+ required:
+ - type
+ type: object
+ FusionServerToolConfig:
+ description: Configuration for the openrouter:fusion server tool.
+ example:
+ analysis_models:
+ - ~anthropic/claude-opus-latest
+ - ~openai/gpt-latest
+ - ~google/gemini-pro-latest
+ properties:
+ analysis_models:
+ description: >-
+ Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.
+ example:
+ - ~anthropic/claude-opus-latest
+ - ~openai/gpt-latest
+ - ~google/gemini-pro-latest
+ items:
+ type: string
+ maxItems: 8
+ minItems: 1
+ type: array
+ max_completion_tokens:
+ description: >-
+ Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, the provider's default applies.
+ example: 16384
+ type: integer
+ max_tool_calls:
+ description: >-
+ Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.
+ example: 12
+ maximum: 16
+ minimum: 1
+ type: integer
+ model:
+ description: >-
+ Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request.
+ example: ~anthropic/claude-opus-latest
+ type: string
+ reasoning:
+ description: >-
+ Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.
+ properties:
+ effort:
+ description: Reasoning effort level for panelist and judge inner calls.
+ enum:
+ - xhigh
+ - high
+ - medium
+ - low
+ - minimal
+ - none
+ type: string
+ x-speakeasy-unknown-values: allow
+ max_tokens:
+ description: >-
+ Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought.
+ type: integer
+ type: object
+ temperature:
+ description: >-
+ Sampling temperature forwarded to panelist and judge inner calls. When omitted, the provider's default applies.
+ example: 0.7
+ format: double
+ type: number
+ tools:
+ description: >-
+ Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
+ example:
+ - parameters:
+ excluded_domains:
+ - example.com
+ type: openrouter:web_search
+ - type: openrouter:web_fetch
+ items:
+ properties:
+ parameters:
+ additionalProperties:
+ nullable: true
+ description: Optional configuration forwarded as the tool's `parameters` object.
+ type: object
+ type:
+ description: Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").
+ type: string
+ required:
+ - type
+ type: object
+ maxItems: 8
+ type: array
+ type: object
+ GenerationContentData:
+ description: Stored prompt and completion content
+ example:
+ input:
+ messages:
+ - content: What is the meaning of life?
+ role: user
+ output:
+ completion: The meaning of life is a philosophical question...
+ reasoning: null
+ properties:
+ input:
+ anyOf:
+ - properties:
+ prompt:
+ example: What is the meaning of life?
+ type: string
+ required:
+ - prompt
+ type: object
+ - properties:
+ messages:
+ example:
+ - content: What is the meaning of life?
+ role: user
+ items:
+ nullable: true
+ type: array
+ required:
+ - messages
+ type: object
+ description: The input to the generation — either a prompt string or an array of messages
+ output:
+ description: The output from the generation
+ properties:
+ completion:
+ description: The completion output
+ example: The meaning of life is a philosophical question...
+ nullable: true
+ type: string
+ reasoning:
+ description: Reasoning/thinking output, if any
+ example: null
+ nullable: true
+ type: string
+ required:
+ - reasoning
+ - completion
+ type: object
+ required:
+ - input
+ - output
+ type: object
+ GenerationContentResponse:
+ description: Stored prompt and completion content for a generation
+ example:
+ data:
+ input:
+ messages:
+ - content: What is the meaning of life?
+ role: user
+ output:
+ completion: The meaning of life is a philosophical question...
+ reasoning: null
+ properties:
+ data:
+ $ref: '#/components/schemas/GenerationContentData'
+ required:
+ - data
+ type: object
+ GenerationResponse:
+ description: Generation response
+ example:
+ data:
+ api_type: completions
+ app_id: 12345
+ cache_discount: null
+ cancelled: false
+ created_at: '2024-07-15T23:33:19.433273+00:00'
+ external_user: user-123
+ finish_reason: stop
+ generation_time: 1200
+ http_referer: https://openrouter.ai/
+ id: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG
+ is_byok: false
+ latency: 1250
+ model: sao10k/l3-stheno-8b
+ moderation_latency: 50
+ native_finish_reason: stop
+ native_tokens_cached: 3
+ native_tokens_completion: 25
+ native_tokens_completion_images: 0
+ native_tokens_prompt: 10
+ native_tokens_reasoning: 5
+ num_input_audio_prompt: 0
+ num_media_completion: 0
+ num_media_prompt: 1
+ num_search_results: 5
+ origin: https://openrouter.ai/
+ provider_name: Infermatic
+ provider_responses: null
+ request_id: req-1727282430-aBcDeFgHiJkLmNoPqRsT
+ router: openrouter/auto
+ service_tier: priority
+ session_id: null
+ streamed: true
+ tokens_completion: 25
+ tokens_prompt: 10
+ total_cost: 0.0015
+ upstream_id: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946
+ upstream_inference_cost: 0.0012
+ usage: 0.0015
+ user_agent: Mozilla/5.0
+ properties:
+ data:
+ description: Generation data
+ properties:
+ api_type:
+ description: Type of API used for the generation
+ enum:
+ - completions
+ - embeddings
+ - rerank
+ - tts
+ - stt
+ - video
+ - image
+ - null
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ app_id:
+ description: ID of the app that made the request
+ example: 12345
+ nullable: true
+ type: integer
+ cache_discount:
+ description: Discount applied due to caching
+ example: 0.0002
+ format: double
+ nullable: true
+ type: number
+ cancelled:
+ description: Whether the generation was cancelled
+ example: false
+ nullable: true
+ type: boolean
+ created_at:
+ description: ISO 8601 timestamp of when the generation was created
+ example: '2024-07-15T23:33:19.433273+00:00'
+ type: string
+ data_region:
+ description: The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
+ enum:
+ - global
+ - europe
+ example: global
+ type: string
+ x-speakeasy-unknown-values: allow
+ external_user:
+ description: External user identifier
+ example: user-123
+ nullable: true
+ type: string
+ finish_reason:
+ description: Reason the generation finished
+ example: stop
+ nullable: true
+ type: string
+ generation_time:
+ description: Time taken for generation in milliseconds
+ example: 1200
+ format: double
+ nullable: true
+ type: number
+ http_referer:
+ description: Referer header from the request
+ nullable: true
+ type: string
+ id:
+ description: Unique identifier for the generation
+ example: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG
+ type: string
+ is_byok:
+ description: Whether this used bring-your-own-key
+ example: false
+ type: boolean
+ latency:
+ description: Total latency in milliseconds
+ example: 1250
+ format: double
+ nullable: true
+ type: number
+ model:
+ description: Model used for the generation
+ example: sao10k/l3-stheno-8b
+ type: string
+ moderation_latency:
+ description: Moderation latency in milliseconds
+ example: 50
+ format: double
+ nullable: true
+ type: number
+ native_finish_reason:
+ description: Native finish reason as reported by provider
+ example: stop
+ nullable: true
+ type: string
+ native_tokens_cached:
+ description: Native cached tokens as reported by provider
+ example: 3
+ nullable: true
+ type: integer
+ native_tokens_completion:
+ description: Native completion tokens as reported by provider
+ example: 25
+ nullable: true
+ type: integer
+ native_tokens_completion_images:
+ description: Native completion image tokens as reported by provider
+ example: 0
+ nullable: true
+ type: integer
+ native_tokens_prompt:
+ description: Native prompt tokens as reported by provider
+ example: 10
+ nullable: true
+ type: integer
+ native_tokens_reasoning:
+ description: Native reasoning tokens as reported by provider
+ example: 5
+ nullable: true
+ type: integer
+ num_fetches:
+ description: Number of web fetches performed
+ example: 0
+ nullable: true
+ type: integer
+ num_input_audio_prompt:
+ description: Number of audio inputs in the prompt
+ example: 0
+ nullable: true
+ type: integer
+ num_media_completion:
+ description: Number of media items in the completion
+ example: 0
+ nullable: true
+ type: integer
+ num_media_prompt:
+ description: Number of media items in the prompt
+ example: 1
+ nullable: true
+ type: integer
+ num_search_results:
+ description: Number of search results included
+ example: 5
+ nullable: true
+ type: integer
+ origin:
+ description: Origin URL of the request
+ example: https://openrouter.ai/
+ type: string
+ preset_id:
+ description: ID of the preset used for this generation, null if no preset was used
+ example: a9e8d400-592a-494f-908c-375efa66cafd
+ nullable: true
+ type: string
+ provider_name:
+ description: Name of the provider that served the request
+ example: Infermatic
+ nullable: true
+ type: string
+ provider_responses:
+ description: List of provider responses for this generation, including fallback attempts
+ items:
+ $ref: '#/components/schemas/ProviderResponse'
+ nullable: true
+ type: array
+ request_id:
+ description: Unique identifier grouping all generations from a single API request
+ example: req-1727282430-aBcDeFgHiJkLmNoPqRsT
+ nullable: true
+ type: string
+ response_cache_source_id:
+ description: If this generation was served from response cache, contains the original generation ID. Null otherwise.
+ nullable: true
+ type: string
+ router:
+ description: Router used for the request (e.g., openrouter/auto)
+ example: openrouter/auto
+ nullable: true
+ type: string
+ service_tier:
+ description: Service tier the upstream provider reported running this request on, or null if it did not report one.
+ example: priority
+ nullable: true
+ type: string
+ session_id:
+ description: Session identifier grouping multiple generations in the same session
+ nullable: true
+ type: string
+ streamed:
+ description: Whether the response was streamed
+ example: true
+ nullable: true
+ type: boolean
+ tokens_completion:
+ description: Number of tokens in the completion
+ example: 25
+ nullable: true
+ type: integer
+ tokens_prompt:
+ description: Number of tokens in the prompt
+ example: 10
+ nullable: true
+ type: integer
+ total_cost:
+ description: Total cost of the generation in USD
+ example: 0.0015
+ format: double
+ type: number
+ upstream_id:
+ description: Upstream provider's identifier for this generation
+ example: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946
+ nullable: true
+ type: string
+ upstream_inference_cost:
+ description: Cost charged by the upstream provider
+ example: 0.0012
+ format: double
+ nullable: true
+ type: number
+ usage:
+ description: Usage amount in USD
+ example: 0.0015
+ format: double
+ type: number
+ user_agent:
+ description: User-Agent header from the request
+ nullable: true
+ type: string
+ web_search_engine:
+ description: The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)
+ example: exa
+ nullable: true
+ type: string
+ required:
+ - id
+ - upstream_id
+ - total_cost
+ - cache_discount
+ - upstream_inference_cost
+ - created_at
+ - model
+ - app_id
+ - streamed
+ - cancelled
+ - provider_name
+ - latency
+ - moderation_latency
+ - generation_time
+ - finish_reason
+ - service_tier
+ - tokens_prompt
+ - tokens_completion
+ - native_tokens_prompt
+ - native_tokens_completion
+ - native_tokens_completion_images
+ - native_tokens_reasoning
+ - native_tokens_cached
+ - num_media_prompt
+ - num_input_audio_prompt
+ - num_media_completion
+ - num_search_results
+ - num_fetches
+ - web_search_engine
+ - origin
+ - usage
+ - is_byok
+ - native_finish_reason
+ - external_user
+ - api_type
+ - preset_id
+ - router
+ - provider_responses
+ - user_agent
+ - http_referer
+ - data_region
+ type: object
+ required:
+ - data
+ type: object
+ GetBYOKKeyResponse:
+ example:
+ data:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/BYOKKey'
+ - description: The BYOK credential.
+ required:
+ - data
+ type: object
GetGuardrailResponse:
example:
data:
@@ -5639,9 +8366,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: redact
+ label: '[EMAIL]'
+ slug: email
+ content_filters: null
created_at: '2025-08-24T10:30:00Z'
description: Guardrail for production environment
- enforce_zdr: false
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -5649,6 +8385,7 @@ components:
name: Production Guardrail
reset_interval: monthly
updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
allOf:
@@ -5657,6 +8394,110 @@ components:
required:
- data
type: object
+ GetObservabilityDestinationResponse:
+ example:
+ data:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/ObservabilityDestination'
+ - description: The observability destination.
+ required:
+ - data
+ type: object
+ GetPresetResponse:
+ description: A preset with its currently designated version.
+ example:
+ data:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ properties:
+ data:
+ $ref: '#/components/schemas/PresetWithDesignatedVersion'
+ required:
+ - data
+ type: object
+ GetPresetVersionResponse:
+ description: A single version of a preset.
+ example:
+ data:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ properties:
+ data:
+ $ref: '#/components/schemas/PresetDesignatedVersion'
+ required:
+ - data
+ type: object
+ GetWorkspaceResponse:
+ example:
+ data:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: '2025-08-24T15:45:00Z'
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/Workspace'
+ - description: The workspace
+ required:
+ - data
+ type: object
GoneResponse:
description: Gone - Endpoint has been permanently removed or deprecated
example:
@@ -5667,6 +8508,11 @@ components:
properties:
error:
$ref: '#/components/schemas/GoneResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -5700,9 +8546,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: redact
+ label: '[EMAIL]'
+ slug: email
+ content_filters: null
created_at: '2025-08-24T10:30:00Z'
description: Guardrail for production environment
- enforce_zdr: false
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -5710,6 +8565,7 @@ components:
name: Production Guardrail
reset_interval: monthly
updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
allowed_models:
description: Array of model canonical_slugs (immutable identifiers)
@@ -5731,6 +8587,27 @@ components:
type: string
nullable: true
type: array
+ content_filter_builtins:
+ description: >-
+ Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector.
+ example:
+ - action: redact
+ label: '[EMAIL]'
+ slug: email
+ items:
+ $ref: '#/components/schemas/ContentFilterBuiltinEntry'
+ nullable: true
+ type: array
+ content_filters:
+ description: Custom regex content filters applied to request messages
+ example:
+ - action: redact
+ label: '[API_KEY]'
+ pattern: \b(sk-[a-zA-Z0-9]{48})\b
+ items:
+ $ref: '#/components/schemas/ContentFilterEntry'
+ nullable: true
+ type: array
created_at:
description: ISO 8601 timestamp of when the guardrail was created
example: '2025-08-24T10:30:00Z'
@@ -5741,7 +8618,30 @@ components:
nullable: true
type: string
enforce_zdr:
- description: Whether to enforce zero data retention
+ deprecated: true
+ description: >-
+ Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_anthropic:
+ description: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_google:
+ description: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_openai:
+ description: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ example: false
+ nullable: true
+ type: boolean
+ enforce_zdr_other:
+ description: >-
+ Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
example: false
nullable: true
type: boolean
@@ -5783,10 +8683,15 @@ components:
example: '2025-08-24T15:45:00Z'
nullable: true
type: string
+ workspace_id:
+ description: The workspace ID this guardrail belongs to.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ type: string
required:
- id
- name
- created_at
+ - workspace_id
type: object
GuardrailInterval:
description: Interval at which the limit resets (daily, weekly, monthly)
@@ -5938,7 +8843,7 @@ components:
description: 'OpenRouter built-in server tool: generates images from text prompts using an image generation model'
example:
parameters:
- model: openai/gpt-image-1
+ model: openai/gpt-5-image
quality: high
size: 1024x1024
type: openrouter:image_generation
@@ -5965,12 +8870,12 @@ components:
Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field.
example:
aspect_ratio: '16:9'
- model: openai/gpt-image-1
+ model: openai/gpt-5-image
quality: high
properties:
model:
- description: Which image generation model to use (e.g. "openai/gpt-image-1"). Defaults to "openai/gpt-image-1".
- example: openai/gpt-image-1
+ description: Which image generation model to use (e.g. "openai/gpt-5-image"). Defaults to "openai/gpt-5-image".
+ example: openai/gpt-5-image
type: string
type: object
ImageGenerationStatus:
@@ -6131,6 +9036,7 @@ components:
- auto
- high
- low
+ - original
type: string
x-speakeasy-unknown-values: allow
image_url:
@@ -6201,6 +9107,23 @@ components:
example: text
type: string
x-speakeasy-unknown-values: allow
+ InputReference:
+ description: >-
+ A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0).
+ discriminator:
+ mapping:
+ audio_url: '#/components/schemas/ContentPartAudio'
+ image_url: '#/components/schemas/ContentPartImage'
+ video_url: '#/components/schemas/ContentPartVideo'
+ propertyName: type
+ example:
+ image_url:
+ url: https://example.com/image.png
+ type: image_url
+ oneOf:
+ - $ref: '#/components/schemas/ContentPartImage'
+ - $ref: '#/components/schemas/ContentPartAudio'
+ - $ref: '#/components/schemas/ContentPartVideo'
Inputs:
anyOf:
- type: string
@@ -6211,6 +9134,8 @@ components:
- $ref: '#/components/schemas/InputMessageItem'
- $ref: '#/components/schemas/FunctionCallItem'
- $ref: '#/components/schemas/FunctionCallOutputItem'
+ - $ref: '#/components/schemas/ApplyPatchCallItem'
+ - $ref: '#/components/schemas/ApplyPatchCallOutputItem'
- allOf:
- $ref: '#/components/schemas/OutputMessageItem'
- properties:
@@ -6257,11 +9182,39 @@ components:
type: summary_text
type: reasoning
- $ref: '#/components/schemas/OutputFunctionCallItem'
+ - $ref: '#/components/schemas/OutputCustomToolCallItem'
- $ref: '#/components/schemas/OutputWebSearchCallItem'
- $ref: '#/components/schemas/OutputFileSearchCallItem'
- $ref: '#/components/schemas/OutputImageGenerationCallItem'
+ - $ref: '#/components/schemas/OutputCodeInterpreterCallItem'
+ - $ref: '#/components/schemas/OutputComputerCallItem'
- $ref: '#/components/schemas/OutputDatetimeItem'
- $ref: '#/components/schemas/OutputWebSearchServerToolItem'
+ - $ref: '#/components/schemas/OutputCodeInterpreterServerToolItem'
+ - $ref: '#/components/schemas/OutputFileSearchServerToolItem'
+ - $ref: '#/components/schemas/OutputImageGenerationServerToolItem'
+ - $ref: '#/components/schemas/OutputBrowserUseServerToolItem'
+ - $ref: '#/components/schemas/OutputBashServerToolItem'
+ - $ref: '#/components/schemas/OutputTextEditorServerToolItem'
+ - $ref: '#/components/schemas/OutputApplyPatchServerToolItem'
+ - $ref: '#/components/schemas/OutputWebFetchServerToolItem'
+ - $ref: '#/components/schemas/OutputToolSearchServerToolItem'
+ - $ref: '#/components/schemas/OutputMemoryServerToolItem'
+ - $ref: '#/components/schemas/OutputMcpServerToolItem'
+ - $ref: '#/components/schemas/OutputSearchModelsServerToolItem'
+ - $ref: '#/components/schemas/OutputAdvisorServerToolItem'
+ - $ref: '#/components/schemas/LocalShellCallItem'
+ - $ref: '#/components/schemas/LocalShellCallOutputItem'
+ - $ref: '#/components/schemas/ShellCallItem'
+ - $ref: '#/components/schemas/ShellCallOutputItem'
+ - $ref: '#/components/schemas/McpListToolsItem'
+ - $ref: '#/components/schemas/McpApprovalRequestItem'
+ - $ref: '#/components/schemas/McpApprovalResponseItem'
+ - $ref: '#/components/schemas/McpCallItem'
+ - $ref: '#/components/schemas/CustomToolCallItem'
+ - $ref: '#/components/schemas/CustomToolCallOutputItem'
+ - $ref: '#/components/schemas/CompactionItem'
+ - $ref: '#/components/schemas/ItemReferenceItem'
type: array
description: Input for a response request - can be a string or array of items
example:
@@ -6339,6 +9292,11 @@ components:
properties:
error:
$ref: '#/components/schemas/InternalServerResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -6364,6 +9322,22 @@ components:
- code
- message
type: object
+ ItemReferenceItem:
+ description: A reference to a previous response item by ID
+ example:
+ id: msg-abc123
+ type: item_reference
+ properties:
+ id:
+ type: string
+ type:
+ enum:
+ - item_reference
+ type: string
+ required:
+ - type
+ - id
+ type: object
KeyAssignment:
example:
assigned_by: user_abc123
@@ -6461,6 +9435,36 @@ components:
required:
- type
type: object
+ ListBYOKKeysResponse:
+ example:
+ data:
+ - allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ total_count: 1
+ properties:
+ data:
+ description: List of BYOK credentials.
+ items:
+ $ref: '#/components/schemas/BYOKKey'
+ type: array
+ total_count:
+ description: Total number of BYOK credentials matching the filters.
+ example: 1
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
ListEndpointsResponse:
description: List of available endpoints for a model
example:
@@ -6584,9 +9588,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: redact
+ label: '[EMAIL]'
+ slug: email
+ content_filters: null
created_at: '2025-08-24T10:30:00Z'
description: Guardrail for production environment
- enforce_zdr: false
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -6594,6 +9607,7 @@ components:
name: Production Guardrail
reset_interval: monthly
updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
total_count: 1
properties:
data:
@@ -6658,6 +9672,354 @@ components:
- data
- total_count
type: object
+ ListObservabilityDestinationsResponse:
+ example:
+ data:
+ - api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ total_count: 1
+ properties:
+ data:
+ description: List of observability destinations.
+ items:
+ $ref: '#/components/schemas/ObservabilityDestination'
+ type: array
+ total_count:
+ description: Total number of destinations matching the filters.
+ example: 1
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ ListPresetsResponse:
+ description: A paginated list of presets.
+ example:
+ data:
+ - created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ total_count: 1
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/Preset'
+ type: array
+ total_count:
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ ListPresetVersionsResponse:
+ description: A paginated list of preset versions.
+ example:
+ data:
+ - config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ total_count: 1
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/PresetDesignatedVersion'
+ type: array
+ total_count:
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ ListWorkspacesResponse:
+ example:
+ data:
+ - created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: '2025-08-24T15:45:00Z'
+ total_count: 1
+ properties:
+ data:
+ description: List of workspaces
+ items:
+ $ref: '#/components/schemas/Workspace'
+ type: array
+ total_count:
+ description: Total number of workspaces
+ example: 5
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ LocalShellCallItem:
+ description: A local shell command execution call
+ example:
+ action:
+ command:
+ - ls
+ - '-la'
+ env:
+ PATH: /usr/bin
+ timeout_ms: 5000
+ type: exec
+ call_id: call-abc123
+ id: shell-abc123
+ status: completed
+ type: local_shell_call
+ properties:
+ action:
+ properties:
+ command:
+ items:
+ type: string
+ type: array
+ env:
+ additionalProperties:
+ type: string
+ type: object
+ timeout_ms:
+ nullable: true
+ type: integer
+ type:
+ enum:
+ - exec
+ type: string
+ user:
+ nullable: true
+ type: string
+ working_directory:
+ nullable: true
+ type: string
+ required:
+ - type
+ - command
+ - env
+ type: object
+ call_id:
+ type: string
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - local_shell_call
+ type: string
+ required:
+ - type
+ - id
+ - call_id
+ - action
+ - status
+ type: object
+ LocalShellCallOutputItem:
+ description: Output from a local shell command execution
+ example:
+ id: output-abc123
+ output: |-
+ total 24
+ drwxr-xr-x 5 user staff 160 Jan 1 12:00 .
+ status: completed
+ type: local_shell_call_output
+ properties:
+ id:
+ type: string
+ output:
+ type: string
+ status:
+ allOf:
+ - $ref: '#/components/schemas/ToolCallStatus'
+ - nullable: true
+ type:
+ enum:
+ - local_shell_call_output
+ type: string
+ required:
+ - type
+ - id
+ - output
+ type: object
+ McpApprovalRequestItem:
+ description: Request for approval to execute an MCP tool
+ example:
+ arguments: '{"id":"123"}'
+ id: approval-abc123
+ name: delete_record
+ server_label: database-server
+ type: mcp_approval_request
+ properties:
+ arguments:
+ type: string
+ id:
+ type: string
+ name:
+ type: string
+ server_label:
+ type: string
+ type:
+ enum:
+ - mcp_approval_request
+ type: string
+ required:
+ - type
+ - id
+ - name
+ - arguments
+ - server_label
+ type: object
+ McpApprovalResponseItem:
+ description: User response to an MCP tool approval request
+ example:
+ approval_request_id: approval-abc123
+ approve: true
+ reason: Approved for execution
+ type: mcp_approval_response
+ properties:
+ approval_request_id:
+ type: string
+ approve:
+ type: boolean
+ id:
+ nullable: true
+ type: string
+ reason:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - mcp_approval_response
+ type: string
+ required:
+ - type
+ - approval_request_id
+ - approve
+ type: object
+ McpCallItem:
+ description: An MCP tool call with its output or error
+ example:
+ arguments: '{"query":"SELECT * FROM users"}'
+ id: mcp-call-abc123
+ name: query_database
+ output: '[{"id":1,"name":"Alice"}]'
+ server_label: database-server
+ type: mcp_call
+ properties:
+ arguments:
+ type: string
+ error:
+ nullable: true
+ type: string
+ id:
+ type: string
+ name:
+ type: string
+ output:
+ nullable: true
+ type: string
+ server_label:
+ type: string
+ type:
+ enum:
+ - mcp_call
+ type: string
+ required:
+ - type
+ - id
+ - name
+ - arguments
+ - server_label
+ type: object
+ McpListToolsItem:
+ description: List of available MCP tools from a server
+ example:
+ id: mcp-list-abc123
+ server_label: database-server
+ tools:
+ - description: Execute a database query
+ input_schema:
+ properties:
+ query:
+ type: string
+ type: object
+ name: query_database
+ type: mcp_list_tools
+ properties:
+ error:
+ nullable: true
+ type: string
+ id:
+ type: string
+ server_label:
+ type: string
+ tools:
+ items:
+ properties:
+ annotations:
+ nullable: true
+ description:
+ nullable: true
+ type: string
+ input_schema:
+ additionalProperties:
+ nullable: true
+ type: object
+ name:
+ type: string
+ required:
+ - name
+ - input_schema
+ type: object
+ type: array
+ type:
+ enum:
+ - mcp_list_tools
+ type: string
+ required:
+ - type
+ - id
+ - server_label
+ - tools
+ type: object
McpServerTool:
description: MCP (Model Context Protocol) tool configuration
example:
@@ -6781,6 +10143,31 @@ components:
- assigned_by
- created_at
type: object
+ MessagesAdvisorToolResultBlock:
+ description: >-
+ Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block Anthropic returns in assistant content when the `advisor_20260301` tool runs.
+ example:
+ content:
+ text: Advisor response text
+ type: advisor_result
+ tool_use_id: srvtoolu_01abc
+ type: advisor_tool_result
+ properties:
+ content:
+ additionalProperties:
+ nullable: true
+ type: object
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - advisor_tool_result
+ type: string
+ required:
+ - type
+ - tool_use_id
+ - content
+ type: object
MessagesContentBlockDeltaEvent:
description: Event sent when content is added to a content block
example:
@@ -6898,7 +10285,7 @@ components:
- $ref: '#/components/schemas/AnthropicToolUseBlock'
- $ref: '#/components/schemas/AnthropicThinkingBlock'
- $ref: '#/components/schemas/AnthropicRedactedThinkingBlock'
- - $ref: '#/components/schemas/AnthropicServerToolUseBlock'
+ - $ref: '#/components/schemas/ORAnthropicServerToolUseBlock'
- $ref: '#/components/schemas/AnthropicWebSearchToolResult'
- $ref: '#/components/schemas/AnthropicWebFetchToolResult'
- $ref: '#/components/schemas/AnthropicCodeExecutionToolResult'
@@ -6907,6 +10294,7 @@ components:
- $ref: '#/components/schemas/AnthropicToolSearchToolResult'
- $ref: '#/components/schemas/AnthropicContainerUpload'
- $ref: '#/components/schemas/AnthropicCompactionBlock'
+ - $ref: '#/components/schemas/AnthropicAdvisorToolResult'
- properties:
content:
nullable: true
@@ -6995,6 +10383,8 @@ components:
type: array
output_tokens:
type: integer
+ output_tokens_details:
+ $ref: '#/components/schemas/AnthropicOutputTokensDetails'
server_tool_use:
nullable: true
properties:
@@ -7009,6 +10399,7 @@ components:
required:
- input_tokens
- output_tokens
+ - output_tokens_details
- cache_creation_input_tokens
- cache_read_input_tokens
- server_tool_use
@@ -7175,7 +10566,7 @@ components:
input:
nullable: true
name:
- $ref: '#/components/schemas/AnthropicServerToolName'
+ type: string
type:
enum:
- server_tool_use
@@ -7237,11 +10628,13 @@ components:
- type
- content
type: object
+ - $ref: '#/components/schemas/MessagesAdvisorToolResultBlock'
type: array
role:
enum:
- user
- assistant
+ - system
type: string
x-speakeasy-unknown-values: allow
required:
@@ -7255,11 +10648,12 @@ components:
properties:
effort:
description: >-
- How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`.
+ How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.
enum:
- low
- medium
- high
+ - xhigh
- max
- null
example: medium
@@ -7283,6 +10677,29 @@ components:
- type
- schema
type: object
+ task_budget:
+ description: >-
+ Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap.
+ example:
+ total: 400000
+ type: tokens
+ nullable: true
+ properties:
+ remaining:
+ minimum: 0
+ nullable: true
+ type: integer
+ total:
+ minimum: 20000
+ type: integer
+ type:
+ enum:
+ - tokens
+ type: string
+ required:
+ - type
+ - total
+ type: object
type: object
MessagesPingEvent:
description: Keep-alive ping event
@@ -7422,31 +10839,33 @@ components:
auto-router: '#/components/schemas/AutoRouterPlugin'
context-compression: '#/components/schemas/ContextCompressionPlugin'
file-parser: '#/components/schemas/FileParserPlugin'
+ fusion: '#/components/schemas/FusionPlugin'
moderation: '#/components/schemas/ModerationPlugin'
+ pareto-router: '#/components/schemas/ParetoRouterPlugin'
response-healing: '#/components/schemas/ResponseHealingPlugin'
web: '#/components/schemas/WebSearchPlugin'
+ web-fetch: '#/components/schemas/WebFetchPlugin'
propertyName: id
oneOf:
- $ref: '#/components/schemas/AutoRouterPlugin'
- $ref: '#/components/schemas/ModerationPlugin'
- $ref: '#/components/schemas/WebSearchPlugin'
+ - $ref: '#/components/schemas/WebFetchPlugin'
- $ref: '#/components/schemas/FileParserPlugin'
- $ref: '#/components/schemas/ResponseHealingPlugin'
- $ref: '#/components/schemas/ContextCompressionPlugin'
+ - $ref: '#/components/schemas/ParetoRouterPlugin'
+ - $ref: '#/components/schemas/FusionPlugin'
type: array
provider:
$ref: '#/components/schemas/ProviderPreferences'
route:
$ref: '#/components/schemas/DeprecatedRoute'
service_tier:
- enum:
- - auto
- - standard_only
type: string
- x-speakeasy-unknown-values: allow
session_id:
description: >-
- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
maxLength: 256
type: string
speed:
@@ -7459,6 +10878,8 @@ components:
items:
type: string
type: array
+ stop_server_tools_when:
+ $ref: '#/components/schemas/StopServerToolsWhen'
stream:
type: boolean
system:
@@ -7475,6 +10896,8 @@ components:
- properties:
budget_tokens:
type: integer
+ display:
+ $ref: '#/components/schemas/AnthropicThinkingDisplay'
type:
enum:
- enabled
@@ -7492,6 +10915,8 @@ components:
- type
type: object
- properties:
+ display:
+ $ref: '#/components/schemas/AnthropicThinkingDisplay'
type:
enum:
- adaptive
@@ -7637,14 +11062,7 @@ components:
type: object
- properties:
allowed_callers:
- items:
- enum:
- - direct
- - code_execution_20250825
- - code_execution_20260120
- type: string
- x-speakeasy-unknown-values: allow
- type: array
+ $ref: '#/components/schemas/AnthropicAllowedCallers'
allowed_domains:
items:
type: string
@@ -7674,10 +11092,48 @@ components:
- type
- name
type: object
+ - properties:
+ allowed_callers:
+ $ref: '#/components/schemas/AnthropicAllowedCallers'
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ caching:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ - nullable: true
+ defer_loading:
+ type: boolean
+ max_uses:
+ type: integer
+ model:
+ type: string
+ name:
+ enum:
+ - advisor
+ type: string
+ type:
+ enum:
+ - advisor_20260301
+ type: string
+ required:
+ - type
+ - name
+ - model
+ type: object
+ - $ref: '#/components/schemas/BashServerTool'
- $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
+ - $ref: '#/components/schemas/WebFetchServerTool'
- $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
+ - additionalProperties:
+ nullable: true
+ properties:
+ type:
+ type: string
+ required:
+ - type
+ type: object
type: array
top_k:
type: integer
@@ -7699,6 +11155,25 @@ components:
allOf:
- $ref: '#/components/schemas/BaseMessagesResult'
- properties:
+ context_management:
+ nullable: true
+ properties:
+ applied_edits:
+ items:
+ additionalProperties:
+ nullable: true
+ properties:
+ type:
+ type: string
+ required:
+ - type
+ type: object
+ type: array
+ required:
+ - applied_edits
+ type: object
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
provider:
$ref: '#/components/schemas/ProviderName'
usage:
@@ -7710,22 +11185,7 @@ components:
nullable: true
type: number
cost_details:
- nullable: true
- properties:
- upstream_inference_completions_cost:
- format: double
- type: number
- upstream_inference_cost:
- format: double
- nullable: true
- type: number
- upstream_inference_prompt_cost:
- format: double
- type: number
- required:
- - upstream_inference_prompt_cost
- - upstream_inference_completions_cost
- type: object
+ $ref: '#/components/schemas/CostDetails'
is_byok:
type: boolean
iterations:
@@ -7746,13 +11206,13 @@ components:
input_tokens: 100
output_tokens: 50
server_tool_use: null
- service_tier: standard
+ service_tier: default
type: object
description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions
example:
container: null
content:
- - citations: null
+ - citations: []
text: Hello! I'm doing well, thank you for asking.
type: text
id: msg_01XFDUDYJgAACzvnptvVoYEL
@@ -7770,7 +11230,7 @@ components:
input_tokens: 12
output_tokens: 15
server_tool_use: null
- service_tier: standard
+ service_tier: default
MessagesStartEvent:
description: Event sent at the start of a streaming message
example:
@@ -7809,6 +11269,7 @@ components:
- Enfer
- GoPomelo
- HuggingFace
+ - Hyperbolic
- Hyperbolic 2
- InoCloud
- Kluster
@@ -7835,6 +11296,7 @@ components:
- AionLabs
- Alibaba
- Ambient
+ - Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
@@ -7851,10 +11313,14 @@ components:
- Clarifai
- Cloudflare
- Cohere
+ - Crucible
- Crusoe
+ - Darkbloom
+ - Decart
- DeepInfra
- DeepSeek
- DekaLLM
+ - DigitalOcean
- Featherless
- Fireworks
- Friendli
@@ -7862,7 +11328,6 @@ components:
- Google
- Google AI Studio
- Groq
- - Hyperbolic
- Inception
- Inceptron
- InferenceNet
@@ -7881,12 +11346,15 @@ components:
- Morph
- NCompass
- Nebius
+ - Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
+ - Poolside
+ - Perceptron
- Perplexity
- Phala
- Recraft
@@ -7903,6 +11371,7 @@ components:
- Together
- Upstage
- Venice
+ - Wafer
- WandB
- Xiaomi
- xAI
@@ -7943,7 +11412,7 @@ components:
input_tokens: 100
output_tokens: 50
server_tool_use: null
- service_tier: standard
+ service_tier: default
required:
- id
- type
@@ -7969,6 +11438,8 @@ components:
example:
type: message_stop
properties:
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
type:
enum:
- message_stop
@@ -8004,6 +11475,32 @@ components:
- $ref: '#/components/schemas/MessagesContentBlockStopEvent'
- $ref: '#/components/schemas/MessagesPingEvent'
- $ref: '#/components/schemas/MessagesErrorEvent'
+ MessagesStreamingResponse:
+ example:
+ data:
+ delta:
+ text: Hello
+ type: text_delta
+ index: 0
+ type: content_block_delta
+ event: content_block_delta
+ properties:
+ data:
+ $ref: '#/components/schemas/MessagesStreamEvents'
+ event:
+ type: string
+ required:
+ - event
+ - data
+ type: object
+ MetadataLevel:
+ description: Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
+ enum:
+ - disabled
+ - enabled
+ example: enabled
+ type: string
+ x-speakeasy-unknown-values: allow
Model:
description: Information about an AI model available on OpenRouter
example:
@@ -8036,6 +11533,7 @@ components:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -8096,6 +11594,13 @@ components:
items:
$ref: '#/components/schemas/Parameter'
type: array
+ supported_voices:
+ description: List of supported voice identifiers for TTS models. Null for non-TTS models.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
top_provider:
$ref: '#/components/schemas/TopProviderInfo'
required:
@@ -8110,6 +11615,7 @@ components:
- per_request_limits
- supported_parameters
- default_parameters
+ - supported_voices
- links
type: object
ModelArchitecture:
@@ -8273,6 +11779,7 @@ components:
- max_tokens
- frequency_penalty
- presence_penalty
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -8315,6 +11822,7 @@ components:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -8333,6 +11841,18 @@ components:
required:
- id
type: object
+ MultimodalMedia:
+ example:
+ data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...
+ format: wav
+ properties:
+ data:
+ type: string
+ format:
+ type: string
+ required:
+ - data
+ type: object
NotFoundResponse:
description: Not Found - Resource does not exist
example:
@@ -8342,6 +11862,11 @@ components:
properties:
error:
$ref: '#/components/schemas/NotFoundResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -8367,6 +11892,1958 @@ components:
- code
- message
type: object
+ ObservabilityArizeDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: arize_...AbCd
+ baseUrl: https://otlp.arize.com
+ modelId: openrouter-prod
+ spaceKey: space_...EfGh
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Arize
+ privacy_mode: false
+ sampling_rate: 1
+ type: arize
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ baseUrl:
+ default: https://otlp.arize.com
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ modelId:
+ minLength: 1
+ type: string
+ spaceKey:
+ minLength: 1
+ type: string
+ required:
+ - apiKey
+ - spaceKey
+ - modelId
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - arize
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityBraintrustDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: sk-...AbCd
+ baseUrl: https://api.braintrust.dev
+ projectId: proj_...
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Braintrust
+ privacy_mode: false
+ sampling_rate: 1
+ type: braintrust
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ baseUrl:
+ default: https://api.braintrust.dev
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ projectId:
+ minLength: 1
+ type: string
+ required:
+ - apiKey
+ - projectId
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - braintrust
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityClickhouseDestination:
+ example:
+ api_key_hashes: null
+ config:
+ database: analytics
+ host: https://clickhouse.example.com:8123
+ password: '********'
+ table: OPENROUTER_TRACES
+ username: default
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production ClickHouse
+ privacy_mode: false
+ sampling_rate: 1
+ type: clickhouse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ database:
+ minLength: 1
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ host:
+ minLength: 1
+ type: string
+ password:
+ minLength: 1
+ type: string
+ table:
+ default: OPENROUTER_TRACES
+ type: string
+ username:
+ description: If you have not set a specific username in ClickHouse, simply type in 'default' below.
+ minLength: 1
+ type: string
+ required:
+ - host
+ - database
+ - username
+ - password
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - clickhouse
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityDatadogDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: '************...AbCd'
+ mlApp: my-llm-app
+ url: https://api.us5.datadoghq.com
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Datadog
+ privacy_mode: false
+ sampling_rate: 1
+ type: datadog
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ description: 'Datadog API key must have LLM Observability permissions. Create at: '
+ minLength: 1
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ mlApp:
+ description: Name to identify your application in Datadog LLM Observability
+ minLength: 1
+ type: string
+ url:
+ default: https://api.us5.datadoghq.com
+ description: >-
+ Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu)
+ type: string
+ required:
+ - apiKey
+ - mlApp
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - datadog
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityDestination:
+ discriminator:
+ mapping:
+ arize: '#/components/schemas/ObservabilityArizeDestination'
+ braintrust: '#/components/schemas/ObservabilityBraintrustDestination'
+ clickhouse: '#/components/schemas/ObservabilityClickhouseDestination'
+ datadog: '#/components/schemas/ObservabilityDatadogDestination'
+ grafana: '#/components/schemas/ObservabilityGrafanaDestination'
+ langfuse: '#/components/schemas/ObservabilityLangfuseDestination'
+ langsmith: '#/components/schemas/ObservabilityLangsmithDestination'
+ newrelic: '#/components/schemas/ObservabilityNewrelicDestination'
+ opik: '#/components/schemas/ObservabilityOpikDestination'
+ otel-collector: '#/components/schemas/ObservabilityOtelCollectorDestination'
+ posthog: '#/components/schemas/ObservabilityPosthogDestination'
+ ramp: '#/components/schemas/ObservabilityRampDestination'
+ s3: '#/components/schemas/ObservabilityS3Destination'
+ sentry: '#/components/schemas/ObservabilitySentryDestination'
+ snowflake: '#/components/schemas/ObservabilitySnowflakeDestination'
+ weave: '#/components/schemas/ObservabilityWeaveDestination'
+ webhook: '#/components/schemas/ObservabilityWebhookDestination'
+ propertyName: type
+ example:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ oneOf:
+ - $ref: '#/components/schemas/ObservabilityArizeDestination'
+ - $ref: '#/components/schemas/ObservabilityBraintrustDestination'
+ - $ref: '#/components/schemas/ObservabilityClickhouseDestination'
+ - $ref: '#/components/schemas/ObservabilityDatadogDestination'
+ - $ref: '#/components/schemas/ObservabilityGrafanaDestination'
+ - $ref: '#/components/schemas/ObservabilityLangfuseDestination'
+ - $ref: '#/components/schemas/ObservabilityLangsmithDestination'
+ - $ref: '#/components/schemas/ObservabilityNewrelicDestination'
+ - $ref: '#/components/schemas/ObservabilityOpikDestination'
+ - $ref: '#/components/schemas/ObservabilityOtelCollectorDestination'
+ - $ref: '#/components/schemas/ObservabilityPosthogDestination'
+ - $ref: '#/components/schemas/ObservabilityRampDestination'
+ - $ref: '#/components/schemas/ObservabilityS3Destination'
+ - $ref: '#/components/schemas/ObservabilitySentryDestination'
+ - $ref: '#/components/schemas/ObservabilitySnowflakeDestination'
+ - $ref: '#/components/schemas/ObservabilityWeaveDestination'
+ - $ref: '#/components/schemas/ObservabilityWebhookDestination'
+ ObservabilityFilterRulesConfig:
+ description: Optional structured filter rules controlling which events are forwarded.
+ example: null
+ nullable: true
+ properties:
+ enabled:
+ default: true
+ type: boolean
+ groups:
+ items:
+ properties:
+ logic:
+ default: and
+ enum:
+ - and
+ - or
+ type: string
+ x-speakeasy-unknown-values: allow
+ rules:
+ items:
+ properties:
+ field:
+ enum:
+ - model
+ - provider
+ - session_id
+ - user_id
+ - api_key_name
+ - finish_reason
+ - input
+ - output
+ - total_cost
+ - total_tokens
+ - prompt_tokens
+ - completion_tokens
+ type: string
+ x-speakeasy-unknown-values: allow
+ operator:
+ enum:
+ - equals
+ - not_equals
+ - contains
+ - not_contains
+ - regex
+ - starts_with
+ - ends_with
+ - gt
+ - lt
+ - gte
+ - lte
+ - exists
+ - not_exists
+ type: string
+ x-speakeasy-unknown-values: allow
+ value:
+ anyOf:
+ - type: string
+ - type: number
+ required:
+ - field
+ - operator
+ type: object
+ type: array
+ required:
+ - rules
+ type: object
+ type: array
+ required:
+ - groups
+ type: object
+ ObservabilityGrafanaDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: glc_...AbCd
+ baseUrl: https://otlp-gateway-prod-us-west-0.grafana.net
+ instanceId: '123456'
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Grafana
+ privacy_mode: false
+ sampling_rate: 1
+ type: grafana
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ baseUrl:
+ default: https://otlp-gateway-prod-us-west-0.grafana.net
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ instanceId:
+ minLength: 1
+ type: string
+ required:
+ - apiKey
+ - instanceId
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - grafana
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityLangfuseDestination:
+ example:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ baseUrl:
+ default: https://us.cloud.langfuse.com
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ publicKey:
+ minLength: 1
+ type: string
+ secretKey:
+ minLength: 1
+ type: string
+ required:
+ - secretKey
+ - publicKey
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - langfuse
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityLangsmithDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: lsv2_...AbCd
+ endpoint: https://api.smith.langchain.com
+ project: main
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production LangSmith
+ privacy_mode: false
+ sampling_rate: 1
+ type: langsmith
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ endpoint:
+ default: https://api.smith.langchain.com
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ project:
+ default: main
+ description: The name for this project, such as pr-openrouter-demo. Defaults to "main" if not set.
+ minLength: 1
+ type: string
+ workspaceId:
+ description: Required for org-scoped API keys. Find this in your LangSmith workspace settings.
+ type: string
+ required:
+ - apiKey
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - langsmith
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityNewrelicDestination:
+ example:
+ api_key_hashes: null
+ config:
+ licenseKey: '****...AbCd'
+ region: US
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production New Relic
+ privacy_mode: false
+ sampling_rate: 1
+ type: newrelic
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ licenseKey:
+ minLength: 1
+ type: string
+ region:
+ default: us
+ enum:
+ - us
+ - eu
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - licenseKey
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - newrelic
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityOpikDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: '****...AbCd'
+ projectName: openrouter-prod
+ workspace: my-workspace
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Opik
+ privacy_mode: false
+ sampling_rate: 1
+ type: opik
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ projectName:
+ minLength: 1
+ type: string
+ workspace:
+ minLength: 1
+ type: string
+ required:
+ - apiKey
+ - workspace
+ - projectName
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - opik
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityOtelCollectorDestination:
+ example:
+ api_key_hashes: null
+ config:
+ endpoint: https://otel.example.com:4318
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production OTel Collector
+ privacy_mode: false
+ sampling_rate: 1
+ type: otel-collector
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ endpoint:
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: >-
+ Custom HTTP headers as a JSON object. For Axiom, use {"Authorization": "Bearer xaat-xxx", "X-Axiom-Dataset": "your-dataset"}
+ type: object
+ required:
+ - endpoint
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - otel-collector
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityPosthogDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: phc_...AbCd
+ endpoint: https://us.i.posthog.com
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production PostHog
+ privacy_mode: false
+ sampling_rate: 1
+ type: posthog
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ endpoint:
+ default: https://us.i.posthog.com
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ required:
+ - apiKey
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - posthog
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityRampDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: rmp_...AbCd
+ baseUrl: https://api.ramp.com/developer/v1/ai-usage/openrouter
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Ramp
+ privacy_mode: false
+ sampling_rate: 1
+ type: ramp
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ description: Generate this in your Ramp integration settings.
+ minLength: 1
+ type: string
+ baseUrl:
+ default: https://api.ramp.com/developer/v1/ai-usage/openrouter
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to Ramp.
+ type: object
+ required:
+ - apiKey
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - ramp
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityS3Destination:
+ example:
+ api_key_hashes: null
+ config:
+ accessKeyId: AKIA...AbCd
+ bucketName: openrouter-traces
+ secretAccessKey: '****...EfGh'
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production S3
+ privacy_mode: false
+ sampling_rate: 1
+ type: s3
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ accessKeyId:
+ minLength: 1
+ type: string
+ bucketName:
+ minLength: 1
+ type: string
+ endpoint:
+ description: >-
+ Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3.
+ format: uri
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ pathTemplate:
+ default: '{prefix}/{date}'
+ description: >-
+ Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}
+ type: string
+ prefix:
+ default: openrouter-traces
+ type: string
+ region:
+ type: string
+ secretAccessKey:
+ minLength: 1
+ type: string
+ sessionToken:
+ type: string
+ required:
+ - bucketName
+ - accessKeyId
+ - secretAccessKey
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - s3
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilitySentryDestination:
+ example:
+ api_key_hashes: null
+ config:
+ otlpEndpoint: https://o0.ingest.sentry.io/api/0/otlp
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Sentry
+ privacy_mode: false
+ sampling_rate: 1
+ type: sentry
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ dsn:
+ minLength: 1
+ pattern: ^https:\/\/([^:@]+)(?::[^@]*)?@([^/]+)(?:\/[^/]+)*\/(\d+)\/?$
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ otlpEndpoint:
+ type: string
+ required:
+ - otlpEndpoint
+ - dsn
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - sentry
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilitySnowflakeDestination:
+ example:
+ api_key_hashes: null
+ config:
+ account: xy12345.us-east-1
+ token: '****...AbCd'
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Snowflake
+ privacy_mode: false
+ sampling_rate: 1
+ type: snowflake
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ account:
+ minLength: 1
+ type: string
+ database:
+ default: SNOWFLAKE_LEARNING_DB
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ schema:
+ default: PUBLIC
+ type: string
+ table:
+ default: OPENROUTER_TRACES
+ type: string
+ token:
+ minLength: 1
+ type: string
+ warehouse:
+ default: COMPUTE_WH
+ type: string
+ required:
+ - account
+ - token
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - snowflake
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityWeaveDestination:
+ example:
+ api_key_hashes: null
+ config:
+ apiKey: '****...AbCd'
+ baseUrl: https://trace.wandb.ai
+ entity: my-team
+ project: openrouter-prod
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Weave
+ privacy_mode: false
+ sampling_rate: 1
+ type: weave
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ apiKey:
+ minLength: 1
+ type: string
+ baseUrl:
+ default: https://trace.wandb.ai
+ type: string
+ entity:
+ minLength: 1
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to include in requests to this destination.
+ type: object
+ project:
+ minLength: 1
+ type: string
+ required:
+ - apiKey
+ - entity
+ - project
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - weave
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ ObservabilityWebhookDestination:
+ example:
+ api_key_hashes: null
+ config:
+ url: https://example.com/openrouter-events
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Webhook
+ privacy_mode: false
+ sampling_rate: 1
+ type: webhook
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys.
+ example: null
+ items:
+ type: string
+ nullable: true
+ type: array
+ config:
+ properties:
+ headers:
+ additionalProperties:
+ type: string
+ type: object
+ method:
+ default: POST
+ enum:
+ - POST
+ - PUT
+ type: string
+ x-speakeasy-unknown-values: allow
+ url:
+ type: string
+ required:
+ - url
+ type: object
+ created_at:
+ description: ISO timestamp of when the destination was created.
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ enabled:
+ description: Whether this destination is currently enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ id:
+ description: Stable public identifier for this destination.
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ nullable: true
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded to this destination — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type:
+ enum:
+ - webhook
+ type: string
+ updated_at:
+ description: ISO timestamp of when the destination was last updated.
+ example: '2025-08-24T15:45:00Z'
+ type: string
+ workspace_id:
+ description: ID of the workspace this destination belongs to.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - name
+ - enabled
+ - privacy_mode
+ - sampling_rate
+ - api_key_hashes
+ - filter_rules
+ - created_at
+ - updated_at
+ - type
+ - config
+ type: object
+ OpenAIResponseCustomToolCall:
+ example:
+ call_id: call-abc123
+ id: ctc-abc123
+ input: |-
+ *** Begin Patch
+ *** End Patch
+ name: apply_patch
+ type: custom_tool_call
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ input:
+ type: string
+ name:
+ type: string
+ namespace:
+ description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
+ type: string
+ type:
+ enum:
+ - custom_tool_call
+ type: string
+ required:
+ - type
+ - call_id
+ - name
+ - input
+ type: object
+ OpenAIResponseCustomToolCallOutput:
+ example:
+ call_id: call-abc123
+ output: patch applied successfully
+ type: custom_tool_call_output
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ output:
+ anyOf:
+ - type: string
+ - items:
+ discriminator:
+ mapping:
+ input_file: '#/components/schemas/InputFile'
+ input_image: '#/components/schemas/InputImage'
+ input_text: '#/components/schemas/InputText'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/InputText'
+ - $ref: '#/components/schemas/InputImage'
+ - $ref: '#/components/schemas/InputFile'
+ type: array
+ type:
+ enum:
+ - custom_tool_call_output
+ type: string
+ required:
+ - type
+ - call_id
+ - output
+ type: object
OpenAIResponseFunctionToolCall:
example:
arguments: '{"location":"San Francisco"}'
@@ -8384,6 +13861,9 @@ components:
type: string
name:
type: string
+ namespace:
+ description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
+ type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
@@ -8675,6 +14155,22 @@ components:
- type
type: object
- $ref: '#/components/schemas/ToolChoiceAllowed'
+ - properties:
+ type:
+ enum:
+ - apply_patch
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ type:
+ enum:
+ - shell
+ type: string
+ required:
+ - type
+ type: object
example: auto
OpenAIResponsesTruncation:
enum:
@@ -8854,6 +14350,8 @@ components:
allOf:
- $ref: '#/components/schemas/BaseResponsesResult'
- properties:
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
output:
items:
$ref: '#/components/schemas/OutputItems'
@@ -8861,6 +14359,8 @@ components:
service_tier:
nullable: true
type: string
+ text:
+ $ref: '#/components/schemas/TextExtendedConfig'
usage:
$ref: '#/components/schemas/Usage'
type: object
@@ -8914,6 +14414,55 @@ components:
token:
type: string
type: object
+ OpenRouterMetadata:
+ example:
+ attempt: 1
+ endpoints:
+ available:
+ - model: openai/gpt-4o
+ provider: OpenAI
+ selected: true
+ total: 1
+ is_byok: false
+ region: iad
+ requested: openai/gpt-4o
+ strategy: direct
+ summary: available=1, selected=OpenAI
+ properties:
+ attempt:
+ type: integer
+ attempts:
+ items:
+ $ref: '#/components/schemas/RouterAttempt'
+ type: array
+ endpoints:
+ $ref: '#/components/schemas/EndpointsMetadata'
+ is_byok:
+ type: boolean
+ params:
+ $ref: '#/components/schemas/RouterParams'
+ pipeline:
+ items:
+ $ref: '#/components/schemas/PipelineStage'
+ type: array
+ region:
+ nullable: true
+ type: string
+ requested:
+ type: string
+ strategy:
+ $ref: '#/components/schemas/RoutingStrategy'
+ summary:
+ type: string
+ required:
+ - requested
+ - strategy
+ - region
+ - summary
+ - attempt
+ - is_byok
+ - endpoints
+ type: object
OpenRouterWebSearchServerTool:
description: 'OpenRouter built-in server tool: searches the web for current information'
example:
@@ -8933,12 +14482,13 @@ components:
ORAnthropicContentBlock:
discriminator:
mapping:
+ advisor_tool_result: '#/components/schemas/AnthropicAdvisorToolResult'
bash_code_execution_tool_result: '#/components/schemas/AnthropicBashCodeExecutionToolResult'
code_execution_tool_result: '#/components/schemas/AnthropicCodeExecutionToolResult'
compaction: '#/components/schemas/AnthropicCompactionBlock'
container_upload: '#/components/schemas/AnthropicContainerUpload'
redacted_thinking: '#/components/schemas/AnthropicRedactedThinkingBlock'
- server_tool_use: '#/components/schemas/AnthropicServerToolUseBlock'
+ server_tool_use: '#/components/schemas/ORAnthropicServerToolUseBlock'
text: '#/components/schemas/AnthropicTextBlock'
text_editor_code_execution_tool_result: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult'
thinking: '#/components/schemas/AnthropicThinkingBlock'
@@ -8956,7 +14506,7 @@ components:
- $ref: '#/components/schemas/AnthropicToolUseBlock'
- $ref: '#/components/schemas/AnthropicThinkingBlock'
- $ref: '#/components/schemas/AnthropicRedactedThinkingBlock'
- - $ref: '#/components/schemas/AnthropicServerToolUseBlock'
+ - $ref: '#/components/schemas/ORAnthropicServerToolUseBlock'
- $ref: '#/components/schemas/AnthropicWebSearchToolResult'
- $ref: '#/components/schemas/AnthropicWebFetchToolResult'
- $ref: '#/components/schemas/AnthropicCodeExecutionToolResult'
@@ -8965,6 +14515,45 @@ components:
- $ref: '#/components/schemas/AnthropicToolSearchToolResult'
- $ref: '#/components/schemas/AnthropicContainerUpload'
- $ref: '#/components/schemas/AnthropicCompactionBlock'
+ - $ref: '#/components/schemas/AnthropicAdvisorToolResult'
+ ORAnthropicNullableCaller:
+ discriminator:
+ mapping:
+ code_execution_20250825: '#/components/schemas/AnthropicCodeExecution20250825Caller'
+ code_execution_20260120: '#/components/schemas/AnthropicCodeExecution20260120Caller'
+ direct: '#/components/schemas/AnthropicDirectCaller'
+ propertyName: type
+ example: null
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicDirectCaller'
+ - $ref: '#/components/schemas/AnthropicCodeExecution20250825Caller'
+ - $ref: '#/components/schemas/AnthropicCodeExecution20260120Caller'
+ - nullable: true
+ ORAnthropicServerToolUseBlock:
+ example:
+ caller: null
+ id: srvtoolu_01abc
+ input: {}
+ name: advisor
+ type: server_tool_use
+ properties:
+ caller:
+ $ref: '#/components/schemas/ORAnthropicNullableCaller'
+ id:
+ type: string
+ input:
+ nullable: true
+ name:
+ type: string
+ type:
+ enum:
+ - server_tool_use
+ type: string
+ required:
+ - type
+ - id
+ - name
+ type: object
ORAnthropicStopReason:
enum:
- end_turn
@@ -8979,20 +14568,99 @@ components:
nullable: true
type: string
x-speakeasy-unknown-values: allow
- OutputApplyPatchServerToolItem:
- description: An openrouter:apply_patch server tool output item
+ OutputAdvisorServerToolItem:
+ description: An openrouter:advisor server tool output item
example:
- filePath: /src/main.ts
- id: ap_tmp_abc123
+ id: st_tmp_abc123
status: completed
- type: openrouter:apply_patch
+ type: openrouter:advisor
properties:
- filePath:
+ advice:
+ description: The advisor model's response (the advice text returned to the executor).
+ type: string
+ error:
+ description: Error message when the advisor call did not produce advice.
type: string
id:
type: string
- patch:
+ instance_name:
+ description: >-
+ Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance.
+ example: openrouter_advisor__1
type: string
+ model:
+ description: Slug of the advisor model that was consulted.
+ type: string
+ prompt:
+ description: The prompt the executor sent to the advisor.
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:advisor
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputApplyPatchCallItem:
+ description: >-
+ A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand.
+ example:
+ call_id: call_abc123
+ id: apc_abc123
+ operation:
+ diff: |-
+ @@ function main() {
+ + console.log("hi");
+ }
+ path: /src/main.ts
+ type: update_file
+ status: completed
+ type: apply_patch_call
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ operation:
+ $ref: '#/components/schemas/ApplyPatchCallOperation'
+ status:
+ $ref: '#/components/schemas/ApplyPatchCallStatus'
+ type:
+ enum:
+ - apply_patch_call
+ type: string
+ required:
+ - type
+ - id
+ - call_id
+ - status
+ - operation
+ type: object
+ OutputApplyPatchServerToolItem:
+ description: >-
+ An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn.
+ example:
+ call_id: call_abc123
+ id: apc_abc123
+ operation:
+ diff: |-
+ @@ function main() {
+ + console.log("hi");
+ }
+ path: /src/main.ts
+ type: update_file
+ status: completed
+ type: openrouter:apply_patch
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ operation:
+ $ref: '#/components/schemas/ApplyPatchCallOperation'
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
@@ -9155,6 +14823,39 @@ components:
- status
- pending_safety_checks
type: object
+ OutputCustomToolCallItem:
+ description: >-
+ A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.
+ example:
+ call_id: call-abc123
+ id: ctc-abc123
+ input: |-
+ *** Begin Patch
+ *** End Patch
+ name: apply_patch
+ type: custom_tool_call
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ input:
+ type: string
+ name:
+ type: string
+ namespace:
+ description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
+ type: string
+ type:
+ enum:
+ - custom_tool_call
+ type: string
+ required:
+ - type
+ - name
+ - input
+ - call_id
+ type: object
OutputDatetimeItem:
description: An openrouter:datetime server tool output item
example:
@@ -9233,6 +14934,65 @@ components:
name: get_weather
status: completed
type: function_call
+ OutputFusionServerToolItem:
+ description: An openrouter:fusion server tool output item
+ example:
+ id: st_tmp_abc123
+ status: completed
+ type: openrouter:fusion
+ properties:
+ analysis:
+ $ref: '#/components/schemas/FusionAnalysisResult'
+ error:
+ description: Error message when the fusion run did not produce an analysis result.
+ type: string
+ failed_models:
+ description: >-
+ Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel.
+ items:
+ properties:
+ error:
+ description: Error message describing why the model failed.
+ type: string
+ model:
+ description: Slug of the analysis model that failed.
+ type: string
+ status_code:
+ description: HTTP status code from the upstream response, when available (e.g. 402, 429).
+ type: integer
+ required:
+ - model
+ - error
+ type: object
+ type: array
+ failure_reason:
+ description: >-
+ Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion.
+ type: string
+ id:
+ type: string
+ responses:
+ description: Analysis models that produced a response in this fusion run, with each model's full panel content.
+ items:
+ properties:
+ content:
+ type: string
+ model:
+ type: string
+ required:
+ - model
+ type: object
+ type: array
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:fusion
+ type: string
+ required:
+ - status
+ - type
+ type: object
OutputImageGenerationCallItem:
allOf:
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
@@ -9248,6 +15008,7 @@ components:
example:
id: ig_tmp_abc123
imageUrl: https://example.com/image.png
+ result: https://example.com/image.png
status: completed
type: openrouter:image_generation
properties:
@@ -9257,6 +15018,10 @@ components:
type: string
imageUrl:
type: string
+ result:
+ description: The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format
+ nullable: true
+ type: string
revisedPrompt:
type: string
status:
@@ -9285,6 +15050,8 @@ components:
item:
discriminator:
mapping:
+ apply_patch_call: '#/components/schemas/OutputItemApplyPatchCall'
+ custom_tool_call: '#/components/schemas/OutputItemCustomToolCall'
file_search_call: '#/components/schemas/OutputItemFileSearchCall'
function_call: '#/components/schemas/OutputItemFunctionCall'
image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
@@ -9296,9 +15063,11 @@ components:
- $ref: '#/components/schemas/OutputMessage'
- $ref: '#/components/schemas/OutputItemReasoning'
- $ref: '#/components/schemas/OutputItemFunctionCall'
+ - $ref: '#/components/schemas/OutputItemCustomToolCall'
- $ref: '#/components/schemas/OutputItemWebSearchCall'
- $ref: '#/components/schemas/OutputItemFileSearchCall'
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
+ - $ref: '#/components/schemas/OutputItemApplyPatchCall'
output_index:
type: integer
sequence_number:
@@ -9313,6 +15082,85 @@ components:
- item
- sequence_number
type: object
+ OutputItemApplyPatchCall:
+ example:
+ call_id: call_abc123
+ id: apc_abc123
+ operation:
+ diff: |-
+ @@ function main() {
+ + console.log("hi");
+ }
+ path: /src/main.ts
+ type: update_file
+ status: completed
+ type: apply_patch_call
+ properties:
+ call_id:
+ type: string
+ created_by:
+ type: string
+ id:
+ type: string
+ operation:
+ discriminator:
+ mapping:
+ create_file: '#/components/schemas/ApplyPatchCreateFileOperation'
+ delete_file: '#/components/schemas/ApplyPatchDeleteFileOperation'
+ update_file: '#/components/schemas/ApplyPatchUpdateFileOperation'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/ApplyPatchCreateFileOperation'
+ - $ref: '#/components/schemas/ApplyPatchUpdateFileOperation'
+ - $ref: '#/components/schemas/ApplyPatchDeleteFileOperation'
+ status:
+ enum:
+ - in_progress
+ - completed
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - apply_patch_call
+ type: string
+ required:
+ - type
+ - id
+ - call_id
+ - operation
+ - status
+ type: object
+ OutputItemCustomToolCall:
+ example:
+ call_id: call-abc123
+ id: ctc-abc123
+ input: |-
+ *** Begin Patch
+ *** End Patch
+ name: apply_patch
+ type: custom_tool_call
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ input:
+ type: string
+ name:
+ type: string
+ namespace:
+ description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
+ type: string
+ type:
+ enum:
+ - custom_tool_call
+ type: string
+ required:
+ - type
+ - name
+ - input
+ - call_id
+ type: object
OutputItemDoneEvent:
description: Event emitted when an output item is complete
example:
@@ -9332,6 +15180,8 @@ components:
item:
discriminator:
mapping:
+ apply_patch_call: '#/components/schemas/OutputItemApplyPatchCall'
+ custom_tool_call: '#/components/schemas/OutputItemCustomToolCall'
file_search_call: '#/components/schemas/OutputItemFileSearchCall'
function_call: '#/components/schemas/OutputItemFunctionCall'
image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
@@ -9343,9 +15193,11 @@ components:
- $ref: '#/components/schemas/OutputMessage'
- $ref: '#/components/schemas/OutputItemReasoning'
- $ref: '#/components/schemas/OutputItemFunctionCall'
+ - $ref: '#/components/schemas/OutputItemCustomToolCall'
- $ref: '#/components/schemas/OutputItemWebSearchCall'
- $ref: '#/components/schemas/OutputItemFileSearchCall'
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
+ - $ref: '#/components/schemas/OutputItemApplyPatchCall'
output_index:
type: integer
sequence_number:
@@ -9403,6 +15255,9 @@ components:
type: string
name:
type: string
+ namespace:
+ description: Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
+ type: string
status:
anyOf:
- enum:
@@ -9493,18 +15348,23 @@ components:
description: An output item from the response
discriminator:
mapping:
+ apply_patch_call: '#/components/schemas/OutputApplyPatchCallItem'
code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem'
computer_call: '#/components/schemas/OutputComputerCallItem'
+ custom_tool_call: '#/components/schemas/OutputCustomToolCallItem'
file_search_call: '#/components/schemas/OutputFileSearchCallItem'
function_call: '#/components/schemas/OutputFunctionCallItem'
image_generation_call: '#/components/schemas/OutputImageGenerationCallItem'
message: '#/components/schemas/OutputMessageItem'
+ openrouter:advisor: '#/components/schemas/OutputAdvisorServerToolItem'
openrouter:apply_patch: '#/components/schemas/OutputApplyPatchServerToolItem'
openrouter:bash: '#/components/schemas/OutputBashServerToolItem'
openrouter:browser_use: '#/components/schemas/OutputBrowserUseServerToolItem'
openrouter:code_interpreter: '#/components/schemas/OutputCodeInterpreterServerToolItem'
openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
+ openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem'
openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
+ openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem'
openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
openrouter:memory: '#/components/schemas/OutputMemoryServerToolItem'
@@ -9513,6 +15373,8 @@ components:
openrouter:web_fetch: '#/components/schemas/OutputWebFetchServerToolItem'
openrouter:web_search: '#/components/schemas/OutputWebSearchServerToolItem'
reasoning: '#/components/schemas/OutputReasoningItem'
+ shell_call: '#/components/schemas/OutputShellCallItem'
+ shell_call_output: '#/components/schemas/OutputShellCallOutputItem'
web_search_call: '#/components/schemas/OutputWebSearchCallItem'
propertyName: type
example:
@@ -9541,10 +15403,17 @@ components:
- $ref: '#/components/schemas/OutputBashServerToolItem'
- $ref: '#/components/schemas/OutputTextEditorServerToolItem'
- $ref: '#/components/schemas/OutputApplyPatchServerToolItem'
+ - $ref: '#/components/schemas/OutputApplyPatchCallItem'
+ - $ref: '#/components/schemas/OutputShellCallItem'
+ - $ref: '#/components/schemas/OutputShellCallOutputItem'
- $ref: '#/components/schemas/OutputWebFetchServerToolItem'
- $ref: '#/components/schemas/OutputToolSearchServerToolItem'
- $ref: '#/components/schemas/OutputMemoryServerToolItem'
- $ref: '#/components/schemas/OutputMcpServerToolItem'
+ - $ref: '#/components/schemas/OutputSearchModelsServerToolItem'
+ - $ref: '#/components/schemas/OutputFusionServerToolItem'
+ - $ref: '#/components/schemas/OutputAdvisorServerToolItem'
+ - $ref: '#/components/schemas/OutputCustomToolCallItem'
OutputItemWebSearchCall:
example:
action:
@@ -9611,7 +15480,6 @@ components:
required:
- type
- id
- - action
- status
type: object
OutputMcpServerToolItem:
@@ -9748,6 +15616,8 @@ components:
- audio
- video
- rerank
+ - speech
+ - transcription
example: text
type: string
x-speakeasy-unknown-values: allow
@@ -9788,6 +15658,149 @@ components:
- text: Analyzed the problem and found the optimal solution.
type: summary_text
type: reasoning
+ OutputSearchModelsServerToolItem:
+ description: An openrouter:experimental__search_models server tool output item
+ example:
+ arguments: '{"query":"Claude Opus"}'
+ id: sm_tmp_abc123
+ query: Claude Opus
+ status: completed
+ type: openrouter:experimental__search_models
+ properties:
+ arguments:
+ description: The JSON arguments submitted to the search tool (e.g. {"query":"Claude"})
+ type: string
+ id:
+ type: string
+ query:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:experimental__search_models
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputShellCallItem:
+ description: >-
+ A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool.
+ example:
+ action:
+ commands:
+ - echo hello
+ max_output_length: null
+ timeout_ms: null
+ call_id: call_abc123
+ id: shc_abc123
+ status: completed
+ type: shell_call
+ properties:
+ action:
+ properties:
+ commands:
+ items:
+ type: string
+ type: array
+ max_output_length:
+ nullable: true
+ type: integer
+ timeout_ms:
+ nullable: true
+ type: integer
+ required:
+ - commands
+ - max_output_length
+ - timeout_ms
+ type: object
+ call_id:
+ type: string
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ShellCallStatus'
+ type:
+ enum:
+ - shell_call
+ type: string
+ required:
+ - type
+ - id
+ - call_id
+ - status
+ type: object
+ OutputShellCallOutputItem:
+ description: >-
+ A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.
+ example:
+ call_id: call_abc123
+ id: sho_abc123
+ output:
+ - outcome:
+ exit_code: 0
+ type: exit
+ stderr: ''
+ stdout: |
+ hello
+ status: completed
+ type: shell_call_output
+ properties:
+ call_id:
+ type: string
+ id:
+ type: string
+ max_output_length:
+ nullable: true
+ type: integer
+ output:
+ items:
+ properties:
+ outcome:
+ oneOf:
+ - properties:
+ exit_code:
+ type: integer
+ type:
+ enum:
+ - exit
+ type: string
+ required:
+ - type
+ - exit_code
+ type: object
+ - properties:
+ type:
+ enum:
+ - timeout
+ type: string
+ required:
+ - type
+ type: object
+ stderr:
+ type: string
+ stdout:
+ type: string
+ required:
+ - stdout
+ - stderr
+ - outcome
+ type: object
+ type: array
+ status:
+ $ref: '#/components/schemas/ShellCallStatus'
+ type:
+ enum:
+ - shell_call_output
+ type: string
+ required:
+ - type
+ - id
+ - call_id
+ - status
+ - output
+ type: object
OutputTextEditorServerToolItem:
description: An openrouter:text_editor server tool output item
example:
@@ -9844,6 +15857,7 @@ components:
OutputWebFetchServerToolItem:
description: An openrouter:web_fetch server tool output item
example:
+ httpStatus: 200
id: wf_tmp_abc123
status: completed
title: Example Domain
@@ -9852,6 +15866,12 @@ components:
properties:
content:
type: string
+ error:
+ description: The error message if the fetch failed.
+ type: string
+ httpStatus:
+ description: The HTTP status code returned by the upstream URL fetch.
+ type: integer
id:
type: string
status:
@@ -9880,10 +15900,41 @@ components:
OutputWebSearchServerToolItem:
description: An openrouter:web_search server tool output item
example:
+ action:
+ query: latest AI news
+ type: search
id: ws_tmp_abc123
status: completed
type: openrouter:web_search
properties:
+ action:
+ description: >-
+ The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.
+ properties:
+ query:
+ type: string
+ sources:
+ items:
+ properties:
+ type:
+ enum:
+ - url
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - url
+ type: object
+ type: array
+ type:
+ enum:
+ - search
+ type: string
+ required:
+ - type
+ - query
+ type: object
id:
type: string
status:
@@ -9926,6 +15977,30 @@ components:
example: temperature
type: string
x-speakeasy-unknown-values: allow
+ ParetoRouterPlugin:
+ example:
+ enabled: true
+ id: pareto-router
+ min_coding_score: 0.8
+ properties:
+ enabled:
+ description: Set to false to disable the pareto-router plugin for this request. Defaults to true.
+ type: boolean
+ id:
+ enum:
+ - pareto-router
+ type: string
+ min_coding_score:
+ description: >-
+ Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier.
+ example: 0.8
+ format: double
+ maximum: 1
+ minimum: 0
+ type: number
+ required:
+ - id
+ type: object
PayloadTooLargeResponse:
description: Payload Too Large - Request payload exceeds size limits
example:
@@ -9935,6 +16010,11 @@ components:
properties:
error:
$ref: '#/components/schemas/PayloadTooLargeResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -9969,6 +16049,11 @@ components:
properties:
error:
$ref: '#/components/schemas/PaymentRequiredResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -10125,6 +16210,54 @@ components:
- prompt_tokens
- completion_tokens
type: object
+ PipelineStage:
+ example:
+ data:
+ action: redacted
+ engines:
+ - presidio
+ flagged: true
+ matched_entity_types:
+ - EMAIL
+ - PHONE
+ name: content-filter
+ summary: PII redacted via Presidio (EMAIL, PHONE)
+ type: guardrail
+ properties:
+ cost_usd:
+ format: double
+ nullable: true
+ type: number
+ data:
+ additionalProperties:
+ nullable: true
+ type: object
+ guardrail_id:
+ type: string
+ guardrail_scope:
+ type: string
+ name:
+ type: string
+ summary:
+ type: string
+ type:
+ $ref: '#/components/schemas/PipelineStageType'
+ required:
+ - type
+ - name
+ type: object
+ PipelineStageType:
+ description: >-
+ Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it.
+ enum:
+ - guardrail
+ - plugin
+ - server_tools
+ - response_healing
+ - context_compression
+ example: guardrail
+ type: string
+ x-speakeasy-unknown-values: allow
PreferredMaxLatency:
anyOf:
- format: double
@@ -10143,6 +16276,147 @@ components:
description: >-
Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
example: 100
+ Preset:
+ description: A preset without version details.
+ example:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ properties:
+ created_at:
+ type: string
+ creator_user_id:
+ nullable: true
+ type: string
+ description:
+ nullable: true
+ type: string
+ designated_version_id:
+ nullable: true
+ type: string
+ id:
+ type: string
+ name:
+ type: string
+ slug:
+ type: string
+ status:
+ $ref: '#/components/schemas/PresetStatus'
+ status_updated_at:
+ nullable: true
+ type: string
+ updated_at:
+ type: string
+ workspace_id:
+ nullable: true
+ type: string
+ required:
+ - id
+ - creator_user_id
+ - workspace_id
+ - name
+ - slug
+ - description
+ - status
+ - designated_version_id
+ - created_at
+ - updated_at
+ - status_updated_at
+ type: object
+ PresetDesignatedVersion:
+ description: A specific version of a preset, containing config and optional system prompt.
+ example:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ nullable: true
+ properties:
+ config:
+ additionalProperties:
+ nullable: true
+ type: object
+ created_at:
+ type: string
+ creator_id:
+ type: string
+ id:
+ type: string
+ preset_id:
+ type: string
+ system_prompt:
+ nullable: true
+ type: string
+ updated_at:
+ type: string
+ version:
+ type: integer
+ required:
+ - id
+ - preset_id
+ - creator_id
+ - version
+ - system_prompt
+ - config
+ - created_at
+ - updated_at
+ type: object
+ PresetStatus:
+ description: The status of a preset.
+ enum:
+ - active
+ - disabled
+ - archived
+ example: active
+ type: string
+ x-speakeasy-unknown-values: allow
+ PresetWithDesignatedVersion:
+ allOf:
+ - $ref: '#/components/schemas/Preset'
+ - properties:
+ designated_version:
+ $ref: '#/components/schemas/PresetDesignatedVersion'
+ required:
+ - designated_version
+ type: object
+ description: A preset with its currently designated version.
+ example:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
Preview_20250311_WebSearchServerTool:
description: Web search preview tool configuration (2025-03-11 version)
example:
@@ -10221,6 +16495,15 @@ components:
required:
- type
type: object
+ PromptInjectionScanScope:
+ description: >-
+ Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.
+ enum:
+ - user_only
+ - all_messages
+ example: user_only
+ type: string
+ x-speakeasy-unknown-values: allow
ProviderName:
enum:
- AkashML
@@ -10228,6 +16511,7 @@ components:
- AionLabs
- Alibaba
- Ambient
+ - Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
@@ -10244,10 +16528,14 @@ components:
- Clarifai
- Cloudflare
- Cohere
+ - Crucible
- Crusoe
+ - Darkbloom
+ - Decart
- DeepInfra
- DeepSeek
- DekaLLM
+ - DigitalOcean
- Featherless
- Fireworks
- Friendli
@@ -10255,7 +16543,6 @@ components:
- Google
- Google AI Studio
- Groq
- - Hyperbolic
- Inception
- Inceptron
- InferenceNet
@@ -10274,12 +16561,15 @@ components:
- Morph
- NCompass
- Nebius
+ - Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
+ - Poolside
+ - Perceptron
- Perplexity
- Phala
- Recraft
@@ -10296,6 +16586,7 @@ components:
- Together
- Upstage
- Venice
+ - Wafer
- WandB
- Xiaomi
- xAI
@@ -10304,6 +16595,474 @@ components:
example: OpenAI
type: string
x-speakeasy-unknown-values: allow
+ ProviderOptions:
+ description: >-
+ Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
+ example:
+ openai:
+ max_tokens: 1000
+ properties:
+ 01ai:
+ additionalProperties:
+ nullable: true
+ type: object
+ ai21:
+ additionalProperties:
+ nullable: true
+ type: object
+ aion-labs:
+ additionalProperties:
+ nullable: true
+ type: object
+ akashml:
+ additionalProperties:
+ nullable: true
+ type: object
+ alibaba:
+ additionalProperties:
+ nullable: true
+ type: object
+ amazon-bedrock:
+ additionalProperties:
+ nullable: true
+ type: object
+ amazon-nova:
+ additionalProperties:
+ nullable: true
+ type: object
+ ambient:
+ additionalProperties:
+ nullable: true
+ type: object
+ anthropic:
+ additionalProperties:
+ nullable: true
+ type: object
+ anyscale:
+ additionalProperties:
+ nullable: true
+ type: object
+ arcee-ai:
+ additionalProperties:
+ nullable: true
+ type: object
+ atlas-cloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ atoma:
+ additionalProperties:
+ nullable: true
+ type: object
+ avian:
+ additionalProperties:
+ nullable: true
+ type: object
+ azure:
+ additionalProperties:
+ nullable: true
+ type: object
+ baidu:
+ additionalProperties:
+ nullable: true
+ type: object
+ baseten:
+ additionalProperties:
+ nullable: true
+ type: object
+ black-forest-labs:
+ additionalProperties:
+ nullable: true
+ type: object
+ byteplus:
+ additionalProperties:
+ nullable: true
+ type: object
+ centml:
+ additionalProperties:
+ nullable: true
+ type: object
+ cerebras:
+ additionalProperties:
+ nullable: true
+ type: object
+ chutes:
+ additionalProperties:
+ nullable: true
+ type: object
+ cirrascale:
+ additionalProperties:
+ nullable: true
+ type: object
+ clarifai:
+ additionalProperties:
+ nullable: true
+ type: object
+ cloudflare:
+ additionalProperties:
+ nullable: true
+ type: object
+ cohere:
+ additionalProperties:
+ nullable: true
+ type: object
+ crofai:
+ additionalProperties:
+ nullable: true
+ type: object
+ crucible:
+ additionalProperties:
+ nullable: true
+ type: object
+ crusoe:
+ additionalProperties:
+ nullable: true
+ type: object
+ darkbloom:
+ additionalProperties:
+ nullable: true
+ type: object
+ decart:
+ additionalProperties:
+ nullable: true
+ type: object
+ deepinfra:
+ additionalProperties:
+ nullable: true
+ type: object
+ deepseek:
+ additionalProperties:
+ nullable: true
+ type: object
+ dekallm:
+ additionalProperties:
+ nullable: true
+ type: object
+ digitalocean:
+ additionalProperties:
+ nullable: true
+ type: object
+ enfer:
+ additionalProperties:
+ nullable: true
+ type: object
+ fake-provider:
+ additionalProperties:
+ nullable: true
+ type: object
+ featherless:
+ additionalProperties:
+ nullable: true
+ type: object
+ fireworks:
+ additionalProperties:
+ nullable: true
+ type: object
+ friendli:
+ additionalProperties:
+ nullable: true
+ type: object
+ gmicloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ google-ai-studio:
+ additionalProperties:
+ nullable: true
+ type: object
+ google-vertex:
+ additionalProperties:
+ nullable: true
+ type: object
+ gopomelo:
+ additionalProperties:
+ nullable: true
+ type: object
+ groq:
+ additionalProperties:
+ nullable: true
+ type: object
+ huggingface:
+ additionalProperties:
+ nullable: true
+ type: object
+ hyperbolic:
+ additionalProperties:
+ nullable: true
+ type: object
+ hyperbolic-quantized:
+ additionalProperties:
+ nullable: true
+ type: object
+ inception:
+ additionalProperties:
+ nullable: true
+ type: object
+ inceptron:
+ additionalProperties:
+ nullable: true
+ type: object
+ inference-net:
+ additionalProperties:
+ nullable: true
+ type: object
+ infermatic:
+ additionalProperties:
+ nullable: true
+ type: object
+ inflection:
+ additionalProperties:
+ nullable: true
+ type: object
+ inocloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ io-net:
+ additionalProperties:
+ nullable: true
+ type: object
+ ionstream:
+ additionalProperties:
+ nullable: true
+ type: object
+ klusterai:
+ additionalProperties:
+ nullable: true
+ type: object
+ lambda:
+ additionalProperties:
+ nullable: true
+ type: object
+ lepton:
+ additionalProperties:
+ nullable: true
+ type: object
+ liquid:
+ additionalProperties:
+ nullable: true
+ type: object
+ lynn:
+ additionalProperties:
+ nullable: true
+ type: object
+ lynn-private:
+ additionalProperties:
+ nullable: true
+ type: object
+ mancer:
+ additionalProperties:
+ nullable: true
+ type: object
+ mancer-old:
+ additionalProperties:
+ nullable: true
+ type: object
+ mara:
+ additionalProperties:
+ nullable: true
+ type: object
+ meta:
+ additionalProperties:
+ nullable: true
+ type: object
+ minimax:
+ additionalProperties:
+ nullable: true
+ type: object
+ mistral:
+ additionalProperties:
+ nullable: true
+ type: object
+ modal:
+ additionalProperties:
+ nullable: true
+ type: object
+ modelrun:
+ additionalProperties:
+ nullable: true
+ type: object
+ modular:
+ additionalProperties:
+ nullable: true
+ type: object
+ moonshotai:
+ additionalProperties:
+ nullable: true
+ type: object
+ morph:
+ additionalProperties:
+ nullable: true
+ type: object
+ ncompass:
+ additionalProperties:
+ nullable: true
+ type: object
+ nebius:
+ additionalProperties:
+ nullable: true
+ type: object
+ nex-agi:
+ additionalProperties:
+ nullable: true
+ type: object
+ nextbit:
+ additionalProperties:
+ nullable: true
+ type: object
+ nineteen:
+ additionalProperties:
+ nullable: true
+ type: object
+ novita:
+ additionalProperties:
+ nullable: true
+ type: object
+ nvidia:
+ additionalProperties:
+ nullable: true
+ type: object
+ octoai:
+ additionalProperties:
+ nullable: true
+ type: object
+ open-inference:
+ additionalProperties:
+ nullable: true
+ type: object
+ openai:
+ additionalProperties:
+ nullable: true
+ type: object
+ parasail:
+ additionalProperties:
+ nullable: true
+ type: object
+ perceptron:
+ additionalProperties:
+ nullable: true
+ type: object
+ perplexity:
+ additionalProperties:
+ nullable: true
+ type: object
+ phala:
+ additionalProperties:
+ nullable: true
+ type: object
+ poolside:
+ additionalProperties:
+ nullable: true
+ type: object
+ recraft:
+ additionalProperties:
+ nullable: true
+ type: object
+ recursal:
+ additionalProperties:
+ nullable: true
+ type: object
+ reflection:
+ additionalProperties:
+ nullable: true
+ type: object
+ reka:
+ additionalProperties:
+ nullable: true
+ type: object
+ relace:
+ additionalProperties:
+ nullable: true
+ type: object
+ replicate:
+ additionalProperties:
+ nullable: true
+ type: object
+ sambanova:
+ additionalProperties:
+ nullable: true
+ type: object
+ sambanova-cloaked:
+ additionalProperties:
+ nullable: true
+ type: object
+ seed:
+ additionalProperties:
+ nullable: true
+ type: object
+ sf-compute:
+ additionalProperties:
+ nullable: true
+ type: object
+ siliconflow:
+ additionalProperties:
+ nullable: true
+ type: object
+ sourceful:
+ additionalProperties:
+ nullable: true
+ type: object
+ stealth:
+ additionalProperties:
+ nullable: true
+ type: object
+ stepfun:
+ additionalProperties:
+ nullable: true
+ type: object
+ streamlake:
+ additionalProperties:
+ nullable: true
+ type: object
+ switchpoint:
+ additionalProperties:
+ nullable: true
+ type: object
+ targon:
+ additionalProperties:
+ nullable: true
+ type: object
+ together:
+ additionalProperties:
+ nullable: true
+ type: object
+ together-lite:
+ additionalProperties:
+ nullable: true
+ type: object
+ ubicloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ upstage:
+ additionalProperties:
+ nullable: true
+ type: object
+ venice:
+ additionalProperties:
+ nullable: true
+ type: object
+ wafer:
+ additionalProperties:
+ nullable: true
+ type: object
+ wandb:
+ additionalProperties:
+ nullable: true
+ type: object
+ xai:
+ additionalProperties:
+ nullable: true
+ type: object
+ xiaomi:
+ additionalProperties:
+ nullable: true
+ type: object
+ z-ai:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: object
ProviderOverloadedResponse:
description: Provider Overloaded - Provider is temporarily overloaded
example:
@@ -10313,6 +17072,11 @@ components:
properties:
error:
$ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -10492,6 +17256,7 @@ components:
latency:
description: Response latency in milliseconds
example: 1200
+ format: double
type: number
model_permaslug:
description: Canonical model slug
@@ -10507,6 +17272,7 @@ components:
- Enfer
- GoPomelo
- HuggingFace
+ - Hyperbolic
- Hyperbolic 2
- InoCloud
- Kluster
@@ -10533,6 +17299,7 @@ components:
- AionLabs
- Alibaba
- Ambient
+ - Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
@@ -10549,10 +17316,14 @@ components:
- Clarifai
- Cloudflare
- Cohere
+ - Crucible
- Crusoe
+ - Darkbloom
+ - Decart
- DeepInfra
- DeepSeek
- DekaLLM
+ - DigitalOcean
- Featherless
- Fireworks
- Friendli
@@ -10560,7 +17331,6 @@ components:
- Google
- Google AI Studio
- Groq
- - Hyperbolic
- Inception
- Inceptron
- InferenceNet
@@ -10579,12 +17349,15 @@ components:
- Morph
- NCompass
- Nebius
+ - Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
+ - Poolside
+ - Perceptron
- Perplexity
- Phala
- Recraft
@@ -10601,6 +17374,7 @@ components:
- Together
- Upstage
- Venice
+ - Wafer
- WandB
- Xiaomi
- xAI
@@ -10613,7 +17387,7 @@ components:
description: HTTP status code from the provider
example: 200
nullable: true
- type: number
+ type: integer
required:
- status
type: object
@@ -10727,6 +17501,7 @@ components:
- $ref: '#/components/schemas/BigNumberUnion'
- description: A number or string value representing a large number
discount:
+ format: double
type: number
image:
allOf:
@@ -10849,6 +17624,7 @@ components:
- $ref: '#/components/schemas/BigNumberUnion'
- description: A number or string value representing a large number
discount:
+ format: double
type: number
image:
allOf:
@@ -10908,6 +17684,89 @@ components:
example: fp16
type: string
x-speakeasy-unknown-values: allow
+ RankingsDailyItem:
+ example:
+ date: '2026-05-11'
+ model_permaslug: openai/gpt-4o-2024-05-13
+ total_tokens: '12345678'
+ properties:
+ date:
+ description: UTC calendar date the row is aggregated over (YYYY-MM-DD).
+ example: '2026-05-11'
+ type: string
+ model_permaslug:
+ description: >-
+ Model variant permaslug (e.g. `openai/gpt-4o-2024-05-13`, `openai/gpt-4o-2024-05-13:free`). Non-default variants include a `:variant` suffix and are ranked as their own entry. The reserved value `other` denotes the aggregated row covering every model outside the daily top 50 for that date — always sorted last within its date.
+ example: openai/gpt-4o-2024-05-13
+ type: string
+ total_tokens:
+ description: >-
+ Sum of `prompt_tokens + completion_tokens` for the day, returned as a decimal string so 64-bit values are not truncated.
+ example: '12345678'
+ type: string
+ required:
+ - date
+ - model_permaslug
+ - total_tokens
+ type: object
+ RankingsDailyMeta:
+ example:
+ as_of: '2026-05-12T02:00:00Z'
+ end_date: '2026-05-11'
+ start_date: '2026-04-12'
+ version: v1
+ properties:
+ as_of:
+ description: >-
+ ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events.
+ example: '2026-05-12T02:00:00Z'
+ type: string
+ end_date:
+ description: Resolved end of the date window (UTC, inclusive).
+ example: '2026-05-11'
+ type: string
+ start_date:
+ description: Resolved start of the date window (UTC, inclusive).
+ example: '2026-04-12'
+ type: string
+ version:
+ description: Dataset version. Field names and grain are stable for the life of `v1`.
+ enum:
+ - v1
+ type: string
+ required:
+ - as_of
+ - version
+ - start_date
+ - end_date
+ type: object
+ RankingsDailyResponse:
+ example:
+ data:
+ - date: '2026-05-11'
+ model_permaslug: openai/gpt-4o-2024-05-13
+ total_tokens: '12345678'
+ - date: '2026-05-11'
+ model_permaslug: anthropic/claude-3.5-sonnet-20241022
+ total_tokens: '9876543'
+ meta:
+ as_of: '2026-05-12T02:00:00Z'
+ end_date: '2026-05-11'
+ start_date: '2026-04-12'
+ version: v1
+ properties:
+ data:
+ description: >-
+ Up to 51 rows per day — the top 50 public models by `total_tokens` for each UTC calendar date in the window, plus one aggregated `other` row summing every model outside that top 50 (omitted when the long tail is empty). Rows are sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date. Ties between real models break alphabetically on `model_permaslug` so the order is stable across requests.
+ items:
+ $ref: '#/components/schemas/RankingsDailyItem'
+ type: array
+ meta:
+ $ref: '#/components/schemas/RankingsDailyMeta'
+ required:
+ - data
+ - meta
+ type: object
ReasoningConfig:
allOf:
- $ref: '#/components/schemas/BaseReasoningConfig'
@@ -11228,6 +18087,11 @@ components:
properties:
error:
$ref: '#/components/schemas/RequestTimeoutResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -11398,6 +18262,8 @@ components:
background:
nullable: true
type: boolean
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
frequency_penalty:
format: double
nullable: true
@@ -11447,17 +18313,23 @@ components:
auto-router: '#/components/schemas/AutoRouterPlugin'
context-compression: '#/components/schemas/ContextCompressionPlugin'
file-parser: '#/components/schemas/FileParserPlugin'
+ fusion: '#/components/schemas/FusionPlugin'
moderation: '#/components/schemas/ModerationPlugin'
+ pareto-router: '#/components/schemas/ParetoRouterPlugin'
response-healing: '#/components/schemas/ResponseHealingPlugin'
web: '#/components/schemas/WebSearchPlugin'
+ web-fetch: '#/components/schemas/WebFetchPlugin'
propertyName: id
oneOf:
- $ref: '#/components/schemas/AutoRouterPlugin'
- $ref: '#/components/schemas/ModerationPlugin'
- $ref: '#/components/schemas/WebSearchPlugin'
+ - $ref: '#/components/schemas/WebFetchPlugin'
- $ref: '#/components/schemas/FileParserPlugin'
- $ref: '#/components/schemas/ResponseHealingPlugin'
- $ref: '#/components/schemas/ContextCompressionPlugin'
+ - $ref: '#/components/schemas/ParetoRouterPlugin'
+ - $ref: '#/components/schemas/FusionPlugin'
type: array
presence_penalty:
format: double
@@ -11494,9 +18366,11 @@ components:
x-speakeasy-unknown-values: allow
session_id:
description: >-
- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
maxLength: 256
type: string
+ stop_server_tools_when:
+ $ref: '#/components/schemas/StopServerToolsWhen'
store:
const: false
default: false
@@ -11551,10 +18425,16 @@ components:
- $ref: '#/components/schemas/ShellServerTool'
- $ref: '#/components/schemas/ApplyPatchServerTool'
- $ref: '#/components/schemas/CustomTool'
+ - $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
- $ref: '#/components/schemas/DatetimeServerTool'
+ - $ref: '#/components/schemas/FusionServerTool_OpenRouter'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
+ - $ref: '#/components/schemas/WebFetchServerTool'
- $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
+ - $ref: '#/components/schemas/ApplyPatchServerTool_OpenRouter'
+ - $ref: '#/components/schemas/BashServerTool'
+ - $ref: '#/components/schemas/ShellServerTool_OpenRouter'
type: array
top_k:
type: integer
@@ -11575,6 +18455,68 @@ components:
maxLength: 256
type: string
type: object
+ ResponsesStreamingResponse:
+ example:
+ data:
+ delta: Hello
+ type: response.output_text.delta
+ properties:
+ data:
+ $ref: '#/components/schemas/StreamEvents'
+ required:
+ - data
+ type: object
+ RouterAttempt:
+ example:
+ model: openai/gpt-4o
+ provider: OpenAI
+ status: 200
+ properties:
+ model:
+ type: string
+ provider:
+ type: string
+ status:
+ type: integer
+ required:
+ - provider
+ - model
+ - status
+ type: object
+ RouterParams:
+ additionalProperties:
+ nullable: true
+ example:
+ version_group: anthropic/claude-sonnet-4
+ properties:
+ quality_floor:
+ format: double
+ type: number
+ throughput_floor:
+ format: double
+ type: number
+ version_group:
+ type: string
+ type: object
+ RoutingStrategy:
+ enum:
+ - direct
+ - auto
+ - free
+ - latest
+ - alias
+ - fallback
+ - pareto
+ - bodybuilder
+ - fusion
+ example: direct
+ type: string
+ x-speakeasy-unknown-values: allow
+ SandboxSleepAfterSeconds:
+ description: >-
+ How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days).
+ example: 900
+ type: integer
SearchContextSizeEnum:
description: Size of the search context for web search tools
enum:
@@ -11596,7 +18538,7 @@ components:
type: object
SearchQualityLevel:
description: >-
- How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.
+ How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set.
enum:
- low
- medium
@@ -11625,6 +18567,11 @@ components:
properties:
error:
$ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -11650,6 +18597,111 @@ components:
- code
- message
type: object
+ ShellCallItem:
+ description: A shell command execution call (newer variant)
+ example:
+ action:
+ commands:
+ - ls
+ - '-la'
+ max_output_length: 10000
+ call_id: call-abc123
+ status: completed
+ type: shell_call
+ properties:
+ action:
+ properties:
+ commands:
+ items:
+ type: string
+ type: array
+ max_output_length:
+ nullable: true
+ type: integer
+ timeout_ms:
+ nullable: true
+ type: integer
+ required:
+ - commands
+ type: object
+ call_id:
+ type: string
+ environment:
+ nullable: true
+ id:
+ nullable: true
+ type: string
+ status:
+ allOf:
+ - $ref: '#/components/schemas/ToolCallStatus'
+ - nullable: true
+ type:
+ enum:
+ - shell_call
+ type: string
+ required:
+ - type
+ - call_id
+ - action
+ type: object
+ ShellCallOutputItem:
+ description: Output from a shell command execution (newer variant)
+ example:
+ call_id: call-abc123
+ output:
+ - content: |
+ total 0
+ type: stdout
+ status: completed
+ type: shell_call_output
+ properties:
+ call_id:
+ type: string
+ id:
+ nullable: true
+ type: string
+ max_output_length:
+ nullable: true
+ type: integer
+ output:
+ items:
+ additionalProperties:
+ nullable: true
+ properties:
+ content:
+ nullable: true
+ type: string
+ exit_code:
+ nullable: true
+ type: integer
+ type:
+ type: string
+ required:
+ - type
+ type: object
+ type: array
+ status:
+ allOf:
+ - $ref: '#/components/schemas/ToolCallStatus'
+ - nullable: true
+ type:
+ enum:
+ - shell_call_output
+ type: string
+ required:
+ - type
+ - call_id
+ - output
+ type: object
+ ShellCallStatus:
+ description: Status of a shell call or its output.
+ enum:
+ - in_progress
+ - completed
+ - incomplete
+ example: completed
+ type: string
+ x-speakeasy-unknown-values: allow
ShellServerTool:
description: Shell tool configuration
example:
@@ -11662,6 +18714,222 @@ components:
required:
- type
type: object
+ ShellServerTool_OpenRouter:
+ description: >-
+ OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool)
+ example:
+ parameters:
+ engine: openrouter
+ environment:
+ type: container_auto
+ type: openrouter:shell
+ properties:
+ parameters:
+ $ref: '#/components/schemas/ShellServerToolConfig'
+ type:
+ enum:
+ - openrouter:shell
+ type: string
+ required:
+ - type
+ type: object
+ ShellServerToolConfig:
+ description: Configuration for the openrouter:shell server tool
+ example:
+ engine: openrouter
+ environment:
+ type: container_auto
+ properties:
+ engine:
+ $ref: '#/components/schemas/ShellServerToolEngine'
+ environment:
+ $ref: '#/components/schemas/ShellServerToolEnvironment'
+ sleep_after_seconds:
+ $ref: '#/components/schemas/SandboxSleepAfterSeconds'
+ type: object
+ ShellServerToolEngine:
+ description: >-
+ Which shell engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox.
+ enum:
+ - auto
+ - openrouter
+ example: openrouter
+ type: string
+ x-speakeasy-unknown-values: allow
+ ShellServerToolEnvironment:
+ description: >-
+ Server-side execution environment for the shell tool. Only container-backed environments are supported; "local" shells are not.
+ discriminator:
+ mapping:
+ container_auto: '#/components/schemas/ContainerAutoEnvironment'
+ container_reference: '#/components/schemas/ContainerReferenceEnvironment'
+ propertyName: type
+ example:
+ type: container_auto
+ oneOf:
+ - $ref: '#/components/schemas/ContainerAutoEnvironment'
+ - $ref: '#/components/schemas/ContainerReferenceEnvironment'
+ SpeechRequest:
+ description: Text-to-speech request input
+ example:
+ input: Hello world
+ model: elevenlabs/eleven-turbo-v2
+ response_format: pcm
+ speed: 1
+ voice: alloy
+ properties:
+ input:
+ description: Text to synthesize
+ example: Hello world
+ type: string
+ model:
+ description: TTS model identifier
+ example: elevenlabs/eleven-turbo-v2
+ type: string
+ provider:
+ description: Provider-specific passthrough configuration
+ properties:
+ options:
+ $ref: '#/components/schemas/ProviderOptions'
+ type: object
+ response_format:
+ default: pcm
+ description: Audio output format
+ enum:
+ - mp3
+ - pcm
+ example: pcm
+ type: string
+ x-speakeasy-unknown-values: allow
+ speed:
+ description: >-
+ Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.
+ example: 1
+ format: double
+ type: number
+ voice:
+ description: Voice identifier (provider-specific).
+ example: alloy
+ type: string
+ required:
+ - model
+ - input
+ - voice
+ type: object
+ StopServerToolsWhen:
+ description: >-
+ Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ example:
+ - step_count: 5
+ type: step_count_is
+ - max_cost_in_dollars: 0.5
+ type: max_cost
+ items:
+ $ref: '#/components/schemas/StopServerToolsWhenCondition'
+ minItems: 1
+ type: array
+ StopServerToolsWhenCondition:
+ description: A single condition that, when met, halts the server-tool agent loop.
+ discriminator:
+ mapping:
+ finish_reason_is: '#/components/schemas/StopServerToolsWhenFinishReasonIs'
+ has_tool_call: '#/components/schemas/StopServerToolsWhenHasToolCall'
+ max_cost: '#/components/schemas/StopServerToolsWhenMaxCost'
+ max_tokens_used: '#/components/schemas/StopServerToolsWhenMaxTokensUsed'
+ step_count_is: '#/components/schemas/StopServerToolsWhenStepCountIs'
+ propertyName: type
+ example:
+ step_count: 5
+ type: step_count_is
+ oneOf:
+ - $ref: '#/components/schemas/StopServerToolsWhenStepCountIs'
+ - $ref: '#/components/schemas/StopServerToolsWhenHasToolCall'
+ - $ref: '#/components/schemas/StopServerToolsWhenMaxTokensUsed'
+ - $ref: '#/components/schemas/StopServerToolsWhenMaxCost'
+ - $ref: '#/components/schemas/StopServerToolsWhenFinishReasonIs'
+ StopServerToolsWhenFinishReasonIs:
+ description: Stop when the upstream model emits this finish reason (e.g. `length`).
+ example:
+ reason: length
+ type: finish_reason_is
+ properties:
+ reason:
+ minLength: 1
+ type: string
+ type:
+ enum:
+ - finish_reason_is
+ type: string
+ required:
+ - type
+ - reason
+ type: object
+ StopServerToolsWhenHasToolCall:
+ description: Stop after a tool with this name has been called.
+ example:
+ tool_name: finalize
+ type: has_tool_call
+ properties:
+ tool_name:
+ minLength: 1
+ type: string
+ type:
+ enum:
+ - has_tool_call
+ type: string
+ required:
+ - type
+ - tool_name
+ type: object
+ StopServerToolsWhenMaxCost:
+ description: Stop once cumulative cost across the loop exceeds this dollar threshold.
+ example:
+ max_cost_in_dollars: 0.5
+ type: max_cost
+ properties:
+ max_cost_in_dollars:
+ format: double
+ type: number
+ type:
+ enum:
+ - max_cost
+ type: string
+ required:
+ - type
+ - max_cost_in_dollars
+ type: object
+ StopServerToolsWhenMaxTokensUsed:
+ description: Stop once cumulative token usage across the loop exceeds this threshold.
+ example:
+ max_tokens: 10000
+ type: max_tokens_used
+ properties:
+ max_tokens:
+ type: integer
+ type:
+ enum:
+ - max_tokens_used
+ type: string
+ required:
+ - type
+ - max_tokens
+ type: object
+ StopServerToolsWhenStepCountIs:
+ description: Stop after the agent loop has executed this many steps.
+ example:
+ step_count: 5
+ type: step_count_is
+ properties:
+ step_count:
+ type: integer
+ type:
+ enum:
+ - step_count_is
+ type: string
+ required:
+ - type
+ - step_count
+ type: object
StoredPromptTemplate:
example:
id: prompt-abc123
@@ -11688,13 +18956,26 @@ components:
discriminator:
mapping:
error: '#/components/schemas/ErrorEvent'
+ response.apply_patch_call_operation_diff.delta: '#/components/schemas/ApplyPatchCallOperationDiffDeltaEvent'
+ response.apply_patch_call_operation_diff.done: '#/components/schemas/ApplyPatchCallOperationDiffDoneEvent'
response.completed: '#/components/schemas/StreamEventsResponseCompleted'
response.content_part.added: '#/components/schemas/ContentPartAddedEvent'
response.content_part.done: '#/components/schemas/ContentPartDoneEvent'
response.created: '#/components/schemas/OpenResponsesCreatedEvent'
+ response.custom_tool_call_input.delta: '#/components/schemas/CustomToolCallInputDeltaEvent'
+ response.custom_tool_call_input.done: '#/components/schemas/CustomToolCallInputDoneEvent'
response.failed: '#/components/schemas/StreamEventsResponseFailed'
response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent'
response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent'
+ response.fusion_call.analysis.completed: '#/components/schemas/FusionCallAnalysisCompletedEvent'
+ response.fusion_call.analysis.in_progress: '#/components/schemas/FusionCallAnalysisInProgressEvent'
+ response.fusion_call.completed: '#/components/schemas/FusionCallCompletedEvent'
+ response.fusion_call.in_progress: '#/components/schemas/FusionCallInProgressEvent'
+ response.fusion_call.panel.added: '#/components/schemas/FusionCallPanelAddedEvent'
+ response.fusion_call.panel.completed: '#/components/schemas/FusionCallPanelCompletedEvent'
+ response.fusion_call.panel.delta: '#/components/schemas/FusionCallPanelDeltaEvent'
+ response.fusion_call.panel.failed: '#/components/schemas/FusionCallPanelFailedEvent'
+ response.fusion_call.panel.reasoning.delta: '#/components/schemas/FusionCallPanelReasoningDeltaEvent'
response.image_generation_call.completed: '#/components/schemas/ImageGenCallCompletedEvent'
response.image_generation_call.generating: '#/components/schemas/ImageGenCallGeneratingEvent'
response.image_generation_call.in_progress: '#/components/schemas/ImageGenCallInProgressEvent'
@@ -11769,6 +19050,19 @@ components:
- $ref: '#/components/schemas/WebSearchCallInProgressEvent'
- $ref: '#/components/schemas/WebSearchCallSearchingEvent'
- $ref: '#/components/schemas/WebSearchCallCompletedEvent'
+ - $ref: '#/components/schemas/CustomToolCallInputDeltaEvent'
+ - $ref: '#/components/schemas/CustomToolCallInputDoneEvent'
+ - $ref: '#/components/schemas/ApplyPatchCallOperationDiffDeltaEvent'
+ - $ref: '#/components/schemas/ApplyPatchCallOperationDiffDoneEvent'
+ - $ref: '#/components/schemas/FusionCallInProgressEvent'
+ - $ref: '#/components/schemas/FusionCallPanelAddedEvent'
+ - $ref: '#/components/schemas/FusionCallPanelDeltaEvent'
+ - $ref: '#/components/schemas/FusionCallPanelReasoningDeltaEvent'
+ - $ref: '#/components/schemas/FusionCallPanelCompletedEvent'
+ - $ref: '#/components/schemas/FusionCallPanelFailedEvent'
+ - $ref: '#/components/schemas/FusionCallAnalysisInProgressEvent'
+ - $ref: '#/components/schemas/FusionCallAnalysisCompletedEvent'
+ - $ref: '#/components/schemas/FusionCallCompletedEvent'
StreamEventsResponseCompleted:
allOf:
- $ref: '#/components/schemas/CompletedEvent'
@@ -11927,6 +19221,109 @@ components:
- 111
logprob: -0.5
token: Hello
+ STTInputAudio:
+ description: Base64-encoded audio to transcribe
+ example:
+ data: UklGRiQA...
+ format: wav
+ properties:
+ data:
+ description: Base64-encoded audio data (raw bytes, not a data URI)
+ type: string
+ format:
+ description: Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider.
+ type: string
+ required:
+ - data
+ - format
+ type: object
+ STTRequest:
+ description: Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio.
+ example:
+ input_audio:
+ data: UklGRiQA...
+ format: wav
+ language: en
+ model: openai/whisper-large-v3
+ properties:
+ input_audio:
+ $ref: '#/components/schemas/STTInputAudio'
+ language:
+ description: ISO-639-1 language code (e.g., "en", "ja"). Auto-detected if omitted.
+ example: en
+ type: string
+ model:
+ description: STT model identifier
+ example: openai/whisper-large-v3
+ type: string
+ provider:
+ description: Provider-specific passthrough configuration
+ properties:
+ options:
+ $ref: '#/components/schemas/ProviderOptions'
+ type: object
+ temperature:
+ description: Sampling temperature for transcription
+ example: 0
+ format: double
+ type: number
+ required:
+ - model
+ - input_audio
+ type: object
+ STTResponse:
+ description: STT response containing transcribed text and optional usage statistics
+ example:
+ text: Hello, this is a test of OpenAI speech-to-text transcription.
+ usage:
+ cost: 0.000508
+ input_tokens: 83
+ output_tokens: 30
+ seconds: 9.2
+ total_tokens: 113
+ properties:
+ text:
+ description: The transcribed text
+ example: >-
+ Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees.
+ type: string
+ usage:
+ $ref: '#/components/schemas/STTUsage'
+ required:
+ - text
+ type: object
+ STTUsage:
+ description: Aggregated usage statistics for the request
+ example:
+ cost: 0.000508
+ input_tokens: 83
+ output_tokens: 30
+ seconds: 9.2
+ total_tokens: 113
+ properties:
+ cost:
+ description: Total cost of the request in USD
+ example: 0.000508
+ format: double
+ type: number
+ input_tokens:
+ description: Number of input tokens billed for this request
+ example: 83
+ type: integer
+ output_tokens:
+ description: Number of output tokens generated
+ example: 30
+ type: integer
+ seconds:
+ description: Duration of the input audio in seconds
+ example: 9.2
+ format: double
+ type: number
+ total_tokens:
+ description: Total number of tokens used (input + output)
+ example: 113
+ type: integer
+ type: object
TextConfig:
description: Text output configuration including format and verbosity
example:
@@ -11985,7 +19382,18 @@ components:
TextExtendedConfig:
allOf:
- $ref: '#/components/schemas/TextConfig'
- - properties: {}
+ - properties:
+ verbosity:
+ enum:
+ - low
+ - medium
+ - high
+ - xhigh
+ - max
+ - null
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
type: object
description: Text output configuration including format and verbosity
example:
@@ -12040,6 +19448,11 @@ components:
properties:
error:
$ref: '#/components/schemas/TooManyRequestsResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -12127,6 +19540,11 @@ components:
properties:
error:
$ref: '#/components/schemas/UnauthorizedResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -12161,6 +19579,11 @@ components:
properties:
error:
$ref: '#/components/schemas/UnprocessableEntityResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -12186,6 +19609,72 @@ components:
- code
- message
type: object
+ UpdateBYOKKeyRequest:
+ example:
+ disabled: false
+ name: Updated OpenAI Key
+ properties:
+ allowed_models:
+ description: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ example: null
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ allowed_user_ids:
+ description: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ example: null
+ items:
+ type: string
+ maxItems: 100
+ nullable: true
+ type: array
+ disabled:
+ description: Whether this credential is disabled.
+ example: false
+ type: boolean
+ is_fallback:
+ description: >-
+ Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ example: false
+ type: boolean
+ key:
+ description: >-
+ A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses.
+ example: sk-proj-newkey456...
+ minLength: 1
+ type: string
+ name:
+ description: Optional human-readable name for the credential.
+ example: Updated OpenAI Key
+ maxLength: 255
+ nullable: true
+ type: string
+ type: object
+ UpdateBYOKKeyResponse:
+ example:
+ data:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Updated OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/BYOKKey'
+ - description: The updated BYOK credential.
+ required:
+ - data
+ type: object
UpdateGuardrailRequest:
example:
description: Updated description
@@ -12213,6 +19702,23 @@ components:
minItems: 1
nullable: true
type: array
+ content_filter_builtins:
+ description: >-
+ Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only.
+ example:
+ - action: block
+ slug: regex-prompt-injection
+ items:
+ $ref: '#/components/schemas/ContentFilterBuiltinEntryInput'
+ nullable: true
+ type: array
+ content_filters:
+ description: Custom regex content filters to apply. Set to null to remove.
+ example: null
+ items:
+ $ref: '#/components/schemas/ContentFilterEntry'
+ nullable: true
+ type: array
description:
description: New description for the guardrail
example: Updated description
@@ -12220,7 +19726,30 @@ components:
nullable: true
type: string
enforce_zdr:
- description: Whether to enforce zero data retention
+ deprecated: true
+ description: >-
+ Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ example: true
+ nullable: true
+ type: boolean
+ enforce_zdr_anthropic:
+ description: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ example: true
+ nullable: true
+ type: boolean
+ enforce_zdr_google:
+ description: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ example: true
+ nullable: true
+ type: boolean
+ enforce_zdr_openai:
+ description: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ example: true
+ nullable: true
+ type: boolean
+ enforce_zdr_other:
+ description: >-
+ Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
example: true
nullable: true
type: boolean
@@ -12263,9 +19792,18 @@ components:
allowed_models: null
allowed_providers:
- openai
+ content_filter_builtins:
+ - action: redact
+ label: '[EMAIL]'
+ slug: email
+ content_filters: null
created_at: '2025-08-24T10:30:00Z'
description: Updated description
- enforce_zdr: true
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: true
+ enforce_zdr_openai: true
+ enforce_zdr_other: true
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -12273,6 +19811,7 @@ components:
name: Updated Guardrail Name
reset_interval: weekly
updated_at: '2025-08-24T16:00:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
allOf:
@@ -12281,6 +19820,169 @@ components:
required:
- data
type: object
+ UpdateObservabilityDestinationRequest:
+ example:
+ enabled: false
+ name: Updated Langfuse
+ properties:
+ api_key_hashes:
+ description: >-
+ Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided.
+ example: null
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ config:
+ additionalProperties:
+ nullable: true
+ description: >-
+ Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value.
+ example:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ type: object
+ enabled:
+ description: Whether the destination is enabled.
+ example: true
+ type: boolean
+ filter_rules:
+ allOf:
+ - $ref: '#/components/schemas/ObservabilityFilterRulesConfig'
+ - description: Optional structured filter rules. `null` clears the rules. Omitting keeps the current value.
+ name:
+ description: Human-readable name for the destination.
+ example: Production Langfuse
+ type: string
+ privacy_mode:
+ description: When true, request/response bodies are not forwarded — only metadata.
+ example: false
+ type: boolean
+ sampling_rate:
+ description: Sampling rate between 0.0001 and 1 (1 = 100%).
+ example: 1
+ format: double
+ type: number
+ type: object
+ UpdateObservabilityDestinationResponse:
+ example:
+ data:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/ObservabilityDestination'
+ - description: The updated observability destination.
+ required:
+ - data
+ type: object
+ UpdateWorkspaceRequest:
+ example:
+ name: Updated Workspace
+ slug: updated-workspace
+ properties:
+ default_image_model:
+ description: Default image model for this workspace
+ example: openai/dall-e-3
+ nullable: true
+ type: string
+ default_provider_sort:
+ description: Default provider sort preference (price, throughput, latency, exacto)
+ example: price
+ nullable: true
+ type: string
+ default_text_model:
+ description: Default text model for this workspace
+ example: openai/gpt-4o
+ nullable: true
+ type: string
+ description:
+ description: New description for the workspace
+ example: Updated description
+ maxLength: 500
+ nullable: true
+ type: string
+ io_logging_api_key_ids:
+ description: Optional array of API key IDs to filter I/O logging
+ example: null
+ items:
+ type: integer
+ nullable: true
+ type: array
+ io_logging_sampling_rate:
+ description: Sampling rate for I/O logging (0.0001-1)
+ example: 1
+ format: double
+ type: number
+ is_data_discount_logging_enabled:
+ description: Whether data discount logging is enabled
+ example: true
+ type: boolean
+ is_observability_broadcast_enabled:
+ description: Whether broadcast is enabled
+ example: false
+ type: boolean
+ is_observability_io_logging_enabled:
+ description: Whether private logging is enabled
+ example: false
+ type: boolean
+ name:
+ description: New name for the workspace
+ example: Updated Workspace
+ maxLength: 100
+ minLength: 1
+ type: string
+ slug:
+ description: >-
+ New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)
+ example: updated-workspace
+ maxLength: 50
+ minLength: 1
+ pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
+ type: string
+ type: object
+ UpdateWorkspaceResponse:
+ example:
+ data:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Updated Workspace
+ slug: updated-workspace
+ updated_at: '2025-08-25T10:00:00Z'
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/Workspace'
+ - description: The updated workspace
+ required:
+ - data
+ type: object
URLCitation:
example:
end_index: 42
@@ -12368,11 +20070,19 @@ components:
- '1:1'
- '4:3'
- '3:4'
+ - '3:2'
+ - '2:3'
- '21:9'
- '9:21'
example: '16:9'
type: string
x-speakeasy-unknown-values: allow
+ callback_url:
+ description: >-
+ URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
+ example: https://example.com/webhook
+ format: uri
+ type: string
duration:
description: Duration of the generated video in seconds
example: 8
@@ -12390,9 +20100,10 @@ components:
example: true
type: boolean
input_references:
- description: Reference images to guide video generation
+ description: >-
+ Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
items:
- $ref: '#/components/schemas/ContentPartImage'
+ $ref: '#/components/schemas/InputReference'
type: array
model:
type: string
@@ -12402,438 +20113,12 @@ components:
description: Provider-specific passthrough configuration
properties:
options:
- description: >-
- Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
- example:
- google-vertex:
- output_config:
- effort: low
- properties:
- 01ai:
- additionalProperties:
- nullable: true
- type: object
- ai21:
- additionalProperties:
- nullable: true
- type: object
- aion-labs:
- additionalProperties:
- nullable: true
- type: object
- akashml:
- additionalProperties:
- nullable: true
- type: object
- alibaba:
- additionalProperties:
- nullable: true
- type: object
- amazon-bedrock:
- additionalProperties:
- nullable: true
- type: object
- amazon-nova:
- additionalProperties:
- nullable: true
- type: object
- ambient:
- additionalProperties:
- nullable: true
- type: object
- anthropic:
- additionalProperties:
- nullable: true
- type: object
- anyscale:
- additionalProperties:
- nullable: true
- type: object
- arcee-ai:
- additionalProperties:
- nullable: true
- type: object
- atlas-cloud:
- additionalProperties:
- nullable: true
- type: object
- atoma:
- additionalProperties:
- nullable: true
- type: object
- avian:
- additionalProperties:
- nullable: true
- type: object
- azure:
- additionalProperties:
- nullable: true
- type: object
- baseten:
- additionalProperties:
- nullable: true
- type: object
- black-forest-labs:
- additionalProperties:
- nullable: true
- type: object
- byteplus:
- additionalProperties:
- nullable: true
- type: object
- centml:
- additionalProperties:
- nullable: true
- type: object
- cerebras:
- additionalProperties:
- nullable: true
- type: object
- chutes:
- additionalProperties:
- nullable: true
- type: object
- cirrascale:
- additionalProperties:
- nullable: true
- type: object
- clarifai:
- additionalProperties:
- nullable: true
- type: object
- cloudflare:
- additionalProperties:
- nullable: true
- type: object
- cohere:
- additionalProperties:
- nullable: true
- type: object
- crofai:
- additionalProperties:
- nullable: true
- type: object
- crusoe:
- additionalProperties:
- nullable: true
- type: object
- deepinfra:
- additionalProperties:
- nullable: true
- type: object
- deepseek:
- additionalProperties:
- nullable: true
- type: object
- dekallm:
- additionalProperties:
- nullable: true
- type: object
- enfer:
- additionalProperties:
- nullable: true
- type: object
- fake-provider:
- additionalProperties:
- nullable: true
- type: object
- featherless:
- additionalProperties:
- nullable: true
- type: object
- fireworks:
- additionalProperties:
- nullable: true
- type: object
- friendli:
- additionalProperties:
- nullable: true
- type: object
- gmicloud:
- additionalProperties:
- nullable: true
- type: object
- google-ai-studio:
- additionalProperties:
- nullable: true
- type: object
- google-vertex:
- additionalProperties:
- nullable: true
- type: object
- gopomelo:
- additionalProperties:
- nullable: true
- type: object
- groq:
- additionalProperties:
- nullable: true
- type: object
- huggingface:
- additionalProperties:
- nullable: true
- type: object
- hyperbolic:
- additionalProperties:
- nullable: true
- type: object
- hyperbolic-quantized:
- additionalProperties:
- nullable: true
- type: object
- inception:
- additionalProperties:
- nullable: true
- type: object
- inceptron:
- additionalProperties:
- nullable: true
- type: object
- inference-net:
- additionalProperties:
- nullable: true
- type: object
- infermatic:
- additionalProperties:
- nullable: true
- type: object
- inflection:
- additionalProperties:
- nullable: true
- type: object
- inocloud:
- additionalProperties:
- nullable: true
- type: object
- io-net:
- additionalProperties:
- nullable: true
- type: object
- ionstream:
- additionalProperties:
- nullable: true
- type: object
- klusterai:
- additionalProperties:
- nullable: true
- type: object
- lambda:
- additionalProperties:
- nullable: true
- type: object
- lepton:
- additionalProperties:
- nullable: true
- type: object
- liquid:
- additionalProperties:
- nullable: true
- type: object
- lynn:
- additionalProperties:
- nullable: true
- type: object
- lynn-private:
- additionalProperties:
- nullable: true
- type: object
- mancer:
- additionalProperties:
- nullable: true
- type: object
- mancer-old:
- additionalProperties:
- nullable: true
- type: object
- mara:
- additionalProperties:
- nullable: true
- type: object
- meta:
- additionalProperties:
- nullable: true
- type: object
- minimax:
- additionalProperties:
- nullable: true
- type: object
- mistral:
- additionalProperties:
- nullable: true
- type: object
- modal:
- additionalProperties:
- nullable: true
- type: object
- modelrun:
- additionalProperties:
- nullable: true
- type: object
- modular:
- additionalProperties:
- nullable: true
- type: object
- moonshotai:
- additionalProperties:
- nullable: true
- type: object
- morph:
- additionalProperties:
- nullable: true
- type: object
- ncompass:
- additionalProperties:
- nullable: true
- type: object
- nebius:
- additionalProperties:
- nullable: true
- type: object
- nextbit:
- additionalProperties:
- nullable: true
- type: object
- nineteen:
- additionalProperties:
- nullable: true
- type: object
- novita:
- additionalProperties:
- nullable: true
- type: object
- nvidia:
- additionalProperties:
- nullable: true
- type: object
- octoai:
- additionalProperties:
- nullable: true
- type: object
- open-inference:
- additionalProperties:
- nullable: true
- type: object
- openai:
- additionalProperties:
- nullable: true
- type: object
- parasail:
- additionalProperties:
- nullable: true
- type: object
- perplexity:
- additionalProperties:
- nullable: true
- type: object
- phala:
- additionalProperties:
- nullable: true
- type: object
- recraft:
- additionalProperties:
- nullable: true
- type: object
- recursal:
- additionalProperties:
- nullable: true
- type: object
- reflection:
- additionalProperties:
- nullable: true
- type: object
- reka:
- additionalProperties:
- nullable: true
- type: object
- relace:
- additionalProperties:
- nullable: true
- type: object
- replicate:
- additionalProperties:
- nullable: true
- type: object
- sambanova:
- additionalProperties:
- nullable: true
- type: object
- sambanova-cloaked:
- additionalProperties:
- nullable: true
- type: object
- seed:
- additionalProperties:
- nullable: true
- type: object
- sf-compute:
- additionalProperties:
- nullable: true
- type: object
- siliconflow:
- additionalProperties:
- nullable: true
- type: object
- sourceful:
- additionalProperties:
- nullable: true
- type: object
- stealth:
- additionalProperties:
- nullable: true
- type: object
- stepfun:
- additionalProperties:
- nullable: true
- type: object
- streamlake:
- additionalProperties:
- nullable: true
- type: object
- switchpoint:
- additionalProperties:
- nullable: true
- type: object
- targon:
- additionalProperties:
- nullable: true
- type: object
- together:
- additionalProperties:
- nullable: true
- type: object
- together-lite:
- additionalProperties:
- nullable: true
- type: object
- ubicloud:
- additionalProperties:
- nullable: true
- type: object
- upstage:
- additionalProperties:
- nullable: true
- type: object
- venice:
- additionalProperties:
- nullable: true
- type: object
- wandb:
- additionalProperties:
- nullable: true
- type: object
- xai:
- additionalProperties:
- nullable: true
- type: object
- xiaomi:
- additionalProperties:
- nullable: true
- type: object
- z-ai:
- additionalProperties:
- nullable: true
- type: object
- type: object
+ allOf:
+ - $ref: '#/components/schemas/ProviderOptions'
+ - example:
+ google-vertex:
+ output_config:
+ effort: low
type: object
resolution:
description: Resolution of the generated video
@@ -12989,6 +20274,8 @@ components:
- '1:1'
- '4:3'
- '3:4'
+ - '3:2'
+ - '2:3'
- '21:9'
- '9:21'
type: string
@@ -13031,30 +20318,38 @@ components:
enum:
- 480x480
- 480x640
+ - 480x720
- 480x854
- 480x1120
- 640x480
+ - 720x480
- 720x720
- 720x960
+ - 720x1080
- 720x1280
- 720x1680
- 854x480
- 960x720
+ - 1080x720
- 1080x1080
- 1080x1440
+ - 1080x1620
- 1080x1920
- 1080x2520
- 1120x480
- 1280x720
- 1440x1080
+ - 1620x1080
- 1680x720
- 1920x1080
- 2160x2160
- 2160x2880
+ - 2160x3240
- 2160x3840
- 2160x5040
- 2520x1080
- 2880x2160
+ - 3240x2160
- 3840x2160
- 5040x2160
type: string
@@ -13107,6 +20402,90 @@ components:
required:
- data
type: object
+ WebFetchEngineEnum:
+ description: >-
+ Which fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape (requires BYOK). "parallel" uses the Parallel extract API.
+ enum:
+ - auto
+ - native
+ - openrouter
+ - exa
+ - parallel
+ - firecrawl
+ example: auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ WebFetchPlugin:
+ example:
+ id: web-fetch
+ max_uses: 10
+ properties:
+ allowed_domains:
+ description: Only fetch from these domains.
+ items:
+ type: string
+ type: array
+ blocked_domains:
+ description: Never fetch from these domains.
+ items:
+ type: string
+ type: array
+ id:
+ enum:
+ - web-fetch
+ type: string
+ max_content_tokens:
+ description: Maximum content length in approximate tokens. Content exceeding this limit is truncated.
+ type: integer
+ max_uses:
+ description: Maximum number of web fetches per request. Once exceeded, the tool returns an error.
+ type: integer
+ required:
+ - id
+ type: object
+ WebFetchServerTool:
+ description: 'OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)'
+ example:
+ parameters:
+ max_uses: 10
+ type: openrouter:web_fetch
+ properties:
+ parameters:
+ $ref: '#/components/schemas/WebFetchServerToolConfig'
+ type:
+ enum:
+ - openrouter:web_fetch
+ type: string
+ required:
+ - type
+ type: object
+ WebFetchServerToolConfig:
+ description: Configuration for the openrouter:web_fetch server tool
+ example:
+ max_content_tokens: 100000
+ max_uses: 10
+ properties:
+ allowed_domains:
+ description: Only fetch from these domains.
+ items:
+ type: string
+ type: array
+ blocked_domains:
+ description: Never fetch from these domains.
+ items:
+ type: string
+ type: array
+ engine:
+ $ref: '#/components/schemas/WebFetchEngineEnum'
+ max_content_tokens:
+ description: Maximum content length in approximate tokens. Content exceeding this limit is truncated.
+ example: 100000
+ type: integer
+ max_uses:
+ description: Maximum number of web fetches per request. Once exceeded, the tool returns an error.
+ example: 10
+ type: integer
+ type: object
WebSearchCallCompletedEvent:
allOf:
- $ref: '#/components/schemas/OpenAIResponsesSearchCompleted'
@@ -13147,7 +20526,7 @@ components:
properties:
allowed_domains:
description: >-
- Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity.
+ Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.
items:
type: string
type: array
@@ -13155,10 +20534,15 @@ components:
$ref: '#/components/schemas/WebSearchEngineEnum'
excluded_domains:
description: >-
- Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity.
+ Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.
items:
type: string
type: array
+ max_characters:
+ description: >-
+ Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel).
+ example: 2000
+ type: integer
max_results:
description: >-
Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.
@@ -13166,8 +20550,8 @@ components:
type: integer
max_total_results:
description: >-
- Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.
- example: 20
+ Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.
+ example: 50
type: integer
search_context_size:
$ref: '#/components/schemas/SearchQualityLevel'
@@ -13210,8 +20594,8 @@ components:
- auto
- native
- exa
- - firecrawl
- parallel
+ - firecrawl
example: auto
type: string
x-speakeasy-unknown-values: allow
@@ -13252,8 +20636,25 @@ components:
type: array
max_results:
type: integer
+ max_uses:
+ description: >-
+ Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).
+ type: integer
search_prompt:
type: string
+ user_location:
+ allOf:
+ - $ref: '#/components/schemas/WebSearchUserLocation'
+ - description: >-
+ Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic).
+ example:
+ city: San Francisco
+ country: US
+ region: California
+ timezone: America/Los_Angeles
+ type: approximate
+ required:
+ - type
required:
- id
type: object
@@ -13294,17 +20695,7 @@ components:
type: openrouter:web_search
properties:
parameters:
- properties:
- max_results:
- description: Maximum number of search results to return per search call. Defaults to 5.
- example: 5
- type: integer
- max_total_results:
- description: >-
- Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results.
- example: 20
- type: integer
- type: object
+ $ref: '#/components/schemas/WebSearchServerToolConfig'
type:
enum:
- openrouter:web_search
@@ -13312,6 +20703,46 @@ components:
required:
- type
type: object
+ WebSearchServerToolConfig:
+ description: Configuration for the openrouter:web_search server tool
+ example:
+ max_results: 5
+ search_context_size: medium
+ properties:
+ allowed_domains:
+ description: >-
+ Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.
+ items:
+ type: string
+ type: array
+ engine:
+ $ref: '#/components/schemas/WebSearchEngineEnum'
+ excluded_domains:
+ description: >-
+ Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.
+ items:
+ type: string
+ type: array
+ max_characters:
+ description: >-
+ Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel).
+ example: 2000
+ type: integer
+ max_results:
+ description: >-
+ Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.
+ example: 5
+ type: integer
+ max_total_results:
+ description: >-
+ Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.
+ example: 50
+ type: integer
+ search_context_size:
+ $ref: '#/components/schemas/SearchQualityLevel'
+ user_location:
+ $ref: '#/components/schemas/WebSearchUserLocationServerTool'
+ type: object
WebSearchSource:
example:
type: url
@@ -13373,18 +20804,169 @@ components:
type: approximate
properties:
city:
+ nullable: true
type: string
country:
+ nullable: true
type: string
region:
+ nullable: true
type: string
timezone:
+ nullable: true
type: string
type:
enum:
- approximate
type: string
type: object
+ Workspace:
+ example:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: '2025-08-24T15:45:00Z'
+ properties:
+ created_at:
+ description: ISO 8601 timestamp of when the workspace was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ created_by:
+ description: User ID of the workspace creator
+ example: user_abc123
+ nullable: true
+ type: string
+ default_image_model:
+ description: Default image model for this workspace
+ example: openai/dall-e-3
+ nullable: true
+ type: string
+ default_provider_sort:
+ description: Default provider sort preference (price, throughput, latency, exacto)
+ example: price
+ nullable: true
+ type: string
+ default_text_model:
+ description: Default text model for this workspace
+ example: openai/gpt-4o
+ nullable: true
+ type: string
+ description:
+ description: Description of the workspace
+ example: Production environment workspace
+ nullable: true
+ type: string
+ id:
+ description: Unique identifier for the workspace
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ io_logging_api_key_ids:
+ description: Optional array of API key IDs to filter I/O logging. Null means all keys are logged.
+ example: null
+ items:
+ type: integer
+ nullable: true
+ type: array
+ io_logging_sampling_rate:
+ description: Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.
+ example: 1
+ format: double
+ type: number
+ is_data_discount_logging_enabled:
+ description: Whether data discount logging is enabled for this workspace
+ example: true
+ type: boolean
+ is_observability_broadcast_enabled:
+ description: Whether broadcast is enabled for this workspace
+ example: false
+ type: boolean
+ is_observability_io_logging_enabled:
+ description: Whether private logging is enabled for this workspace
+ example: false
+ type: boolean
+ name:
+ description: Name of the workspace
+ example: Production
+ type: string
+ slug:
+ description: URL-friendly slug for the workspace
+ example: production
+ type: string
+ updated_at:
+ description: ISO 8601 timestamp of when the workspace was last updated
+ example: '2025-08-24T15:45:00Z'
+ nullable: true
+ type: string
+ required:
+ - id
+ - name
+ - slug
+ - description
+ - default_text_model
+ - default_image_model
+ - default_provider_sort
+ - is_observability_io_logging_enabled
+ - is_observability_broadcast_enabled
+ - is_data_discount_logging_enabled
+ - io_logging_sampling_rate
+ - io_logging_api_key_ids
+ - created_at
+ - updated_at
+ - created_by
+ type: object
+ WorkspaceMember:
+ example:
+ created_at: '2025-08-24T10:30:00Z'
+ id: 660e8400-e29b-41d4-a716-446655440000
+ role: member
+ user_id: user_abc123
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ properties:
+ created_at:
+ description: ISO 8601 timestamp of when the membership was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ id:
+ description: Unique identifier for the workspace membership
+ example: 660e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ role:
+ description: Role of the member in the workspace
+ enum:
+ - admin
+ - member
+ example: member
+ type: string
+ x-speakeasy-unknown-values: allow
+ user_id:
+ description: Clerk user ID of the member
+ example: user_abc123
+ type: string
+ workspace_id:
+ description: ID of the workspace
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ required:
+ - id
+ - workspace_id
+ - user_id
+ - role
+ - created_at
+ type: object
securitySchemes:
apiKey:
description: API key as bearer token in Authorization header
@@ -13517,6 +21099,673 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /analytics/meta:
+ get:
+ description: >-
+ Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getAnalyticsMeta
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ dimensions:
+ - display_label: Model
+ name: model
+ granularities:
+ - display_label: Day
+ name: day
+ metrics:
+ - display_format: number
+ display_label: Request Count
+ is_rate: false
+ name: request_count
+ operators:
+ - name: eq
+ value_type: scalar
+ schema:
+ properties:
+ data:
+ properties:
+ dimensions:
+ items:
+ properties:
+ display_label:
+ description: Human-readable label
+ example: Model
+ type: string
+ name:
+ description: Dimension identifier used in query requests
+ example: model
+ type: string
+ required:
+ - name
+ - display_label
+ type: object
+ type: array
+ granularities:
+ items:
+ properties:
+ display_label:
+ description: Human-readable label
+ example: Day
+ type: string
+ name:
+ description: Granularity identifier
+ enum:
+ - minute
+ - hour
+ - day
+ - week
+ - month
+ example: day
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - name
+ - display_label
+ type: object
+ type: array
+ metrics:
+ items:
+ properties:
+ display_format:
+ description: >-
+ How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)
+ enum:
+ - number
+ - currency
+ - percent
+ - latency
+ - throughput
+ example: number
+ type: string
+ x-speakeasy-unknown-values: allow
+ display_label:
+ description: Human-readable label
+ example: Request Count
+ type: string
+ is_rate:
+ description: Whether this metric is a rate/ratio (averaged, not summed)
+ type: boolean
+ name:
+ description: Metric identifier used in query requests
+ example: request_count
+ type: string
+ required:
+ - name
+ - display_label
+ - is_rate
+ - display_format
+ type: object
+ type: array
+ operators:
+ items:
+ properties:
+ name:
+ description: Operator identifier used in filter definitions
+ enum:
+ - eq
+ - neq
+ - in
+ - not_in
+ - gt
+ - gte
+ - lt
+ - lte
+ example: eq
+ type: string
+ x-speakeasy-unknown-values: allow
+ value_type:
+ description: Whether the operator expects a single value or an array
+ enum:
+ - scalar
+ - array
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - name
+ - value_type
+ type: object
+ type: array
+ required:
+ - metrics
+ - dimensions
+ - operators
+ - granularities
+ type: object
+ required:
+ - data
+ type: object
+ description: Returns analytics query metadata
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Get available analytics metrics and dimensions
+ tags:
+ - beta.Analytics
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /analytics/query:
+ post:
+ description: >-
+ Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: queryAnalytics
+ requestBody:
+ content:
+ application/json:
+ example:
+ dimensions:
+ - model
+ granularity: day
+ limit: 100
+ metrics:
+ - request_count
+ time_range:
+ end: '2025-01-08T00:00:00Z'
+ start: '2025-01-01T00:00:00Z'
+ schema:
+ properties:
+ dimensions:
+ items:
+ description: Dimension name
+ example: model
+ type: string
+ maxItems: 2
+ type: array
+ filters:
+ items:
+ properties:
+ field:
+ description: Dimension to filter on
+ example: model
+ type: string
+ operator:
+ description: Filter operator
+ example: eq
+ type: string
+ value:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ - items:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ type: array
+ description: Filter value (scalar or array depending on operator)
+ required:
+ - field
+ - operator
+ - value
+ type: object
+ maxItems: 20
+ type: array
+ granularity:
+ description: Time granularity
+ example: day
+ type: string
+ group_limit:
+ description: >-
+ Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.
+ example: 100
+ type: integer
+ limit:
+ description: >-
+ Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.
+ type: integer
+ metrics:
+ items:
+ description: Metric name
+ example: request_count
+ type: string
+ minItems: 1
+ type: array
+ order_by:
+ properties:
+ direction:
+ enum:
+ - asc
+ - desc
+ type: string
+ x-speakeasy-unknown-values: allow
+ field:
+ description: Field to order by
+ example: request_count
+ type: string
+ required:
+ - field
+ - direction
+ type: object
+ time_range:
+ properties:
+ end:
+ format: date-time
+ type: string
+ start:
+ format: date-time
+ type: string
+ required:
+ - start
+ - end
+ type: object
+ required:
+ - metrics
+ type: object
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ data:
+ - date__day: '2025-01-01T00:00:00.000Z'
+ request_count: 1500
+ metadata:
+ query_time_ms: 42
+ row_count: 1
+ truncated: false
+ schema:
+ properties:
+ data:
+ properties:
+ cachedAt:
+ format: double
+ type: number
+ data:
+ items:
+ description: A row of analytics data with metric/dimension values
+ type: object
+ type: array
+ metadata:
+ properties:
+ query_time_ms:
+ format: double
+ type: number
+ row_count:
+ type: integer
+ truncated:
+ type: boolean
+ required:
+ - query_time_ms
+ - row_count
+ - truncated
+ type: object
+ required:
+ - data
+ - metadata
+ type: object
+ required:
+ - data
+ type: object
+ description: Analytics query results
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '408':
+ content:
+ application/json:
+ example:
+ error:
+ code: 408
+ message: Operation timed out. Please try again later.
+ schema:
+ $ref: '#/components/schemas/RequestTimeoutResponse'
+ description: Request Timeout - Operation exceeded time limit
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Query analytics data
+ tags:
+ - beta.Analytics
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /audio/speech:
+ post:
+ description: >-
+ Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
+ operationId: createAudioSpeech
+ requestBody:
+ content:
+ application/json:
+ example:
+ input: Hello world
+ model: elevenlabs/eleven-turbo-v2
+ response_format: pcm
+ speed: 1
+ voice: alloy
+ schema:
+ $ref: '#/components/schemas/SpeechRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ audio/*:
+ schema:
+ description: >-
+ Raw audio bytestream. Content-Type varies by requested format (audio/mpeg for mp3, audio/pcm for pcm — 16-bit little-endian).
+ example:
+ format: binary
+ type: string
+ description: Audio bytes stream
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '402':
+ content:
+ application/json:
+ example:
+ error:
+ code: 402
+ message: Insufficient credits. Add more using https://openrouter.ai/credits
+ schema:
+ $ref: '#/components/schemas/PaymentRequiredResponse'
+ description: Payment Required - Insufficient credits or quota to complete request
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ schema:
+ $ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ '502':
+ content:
+ application/json:
+ example:
+ error:
+ code: 502
+ message: Provider returned error
+ schema:
+ $ref: '#/components/schemas/BadGatewayResponse'
+ description: Bad Gateway - Provider/upstream API failure
+ '503':
+ content:
+ application/json:
+ example:
+ error:
+ code: 503
+ message: Service temporarily unavailable
+ schema:
+ $ref: '#/components/schemas/ServiceUnavailableResponse'
+ description: Service Unavailable - Service temporarily unavailable
+ '524':
+ content:
+ application/json:
+ example:
+ error:
+ code: 524
+ message: Request timed out. Please try again later.
+ schema:
+ $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
+ description: Infrastructure Timeout - Provider request timed out at edge network
+ '529':
+ content:
+ application/json:
+ example:
+ error:
+ code: 529
+ message: Provider returned error
+ schema:
+ $ref: '#/components/schemas/ProviderOverloadedResponse'
+ description: Provider Overloaded - Provider is temporarily overloaded
+ summary: Create speech
+ tags:
+ - TTS
+ x-speakeasy-max-method-params: 1
+ x-speakeasy-name-override: createSpeech
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /audio/transcriptions:
+ post:
+ description: Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
+ operationId: createAudioTranscriptions
+ requestBody:
+ content:
+ application/json:
+ example:
+ input_audio:
+ data: UklGRiQA...
+ format: wav
+ language: en
+ model: openai/whisper-large-v3
+ schema:
+ $ref: '#/components/schemas/STTRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ text: Hello, this is a test of OpenAI speech-to-text transcription.
+ usage:
+ cost: 0.000508
+ input_tokens: 83
+ output_tokens: 30
+ seconds: 9.2
+ total_tokens: 113
+ schema:
+ $ref: '#/components/schemas/STTResponse'
+ description: Transcription result
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '402':
+ content:
+ application/json:
+ example:
+ error:
+ code: 402
+ message: Insufficient credits. Add more using https://openrouter.ai/credits
+ schema:
+ $ref: '#/components/schemas/PaymentRequiredResponse'
+ description: Payment Required - Insufficient credits or quota to complete request
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ schema:
+ $ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ '502':
+ content:
+ application/json:
+ example:
+ error:
+ code: 502
+ message: Provider returned error
+ schema:
+ $ref: '#/components/schemas/BadGatewayResponse'
+ description: Bad Gateway - Provider/upstream API failure
+ '503':
+ content:
+ application/json:
+ example:
+ error:
+ code: 503
+ message: Service temporarily unavailable
+ schema:
+ $ref: '#/components/schemas/ServiceUnavailableResponse'
+ description: Service Unavailable - Service temporarily unavailable
+ '524':
+ content:
+ application/json:
+ example:
+ error:
+ code: 524
+ message: Request timed out. Please try again later.
+ schema:
+ $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
+ description: Infrastructure Timeout - Provider request timed out at edge network
+ '529':
+ content:
+ application/json:
+ example:
+ error:
+ code: 529
+ message: Provider returned error
+ schema:
+ $ref: '#/components/schemas/ProviderOverloadedResponse'
+ description: Provider Overloaded - Provider is temporarily overloaded
+ summary: Create transcription
+ tags:
+ - STT
+ x-speakeasy-max-method-params: 1
+ x-speakeasy-name-override: createTranscription
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/auth/keys:
post:
description: Exchange an authorization code from the PKCE flow for a user-controlled API key
@@ -13789,11 +22038,507 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /byok:
+ get:
+ description: >-
+ List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listBYOKKeys
+ parameters:
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ nullable: false
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ - description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ in: query
+ name: workspace_id
+ required: false
+ schema:
+ description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ - description: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
+ in: query
+ name: provider
+ required: false
+ schema:
+ description: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
+ enum:
+ - ai21
+ - aion-labs
+ - akashml
+ - alibaba
+ - amazon-bedrock
+ - amazon-nova
+ - ambient
+ - anthropic
+ - arcee-ai
+ - atlas-cloud
+ - avian
+ - azure
+ - baidu
+ - baseten
+ - black-forest-labs
+ - byteplus
+ - cerebras
+ - chutes
+ - cirrascale
+ - clarifai
+ - cloudflare
+ - cohere
+ - crusoe
+ - darkbloom
+ - decart
+ - deepinfra
+ - deepseek
+ - dekallm
+ - digitalocean
+ - featherless
+ - fireworks
+ - friendli
+ - gmicloud
+ - google-ai-studio
+ - google-vertex
+ - groq
+ - inception
+ - inceptron
+ - inference-net
+ - infermatic
+ - inflection
+ - io-net
+ - ionstream
+ - liquid
+ - mancer
+ - mara
+ - minimax
+ - mistral
+ - modelrun
+ - modular
+ - moonshotai
+ - morph
+ - ncompass
+ - nebius
+ - nex-agi
+ - nextbit
+ - novita
+ - nvidia
+ - open-inference
+ - openai
+ - parasail
+ - perceptron
+ - perplexity
+ - phala
+ - poolside
+ - recraft
+ - reka
+ - relace
+ - sambanova
+ - seed
+ - siliconflow
+ - sourceful
+ - stepfun
+ - streamlake
+ - switchpoint
+ - together
+ - upstage
+ - venice
+ - wafer
+ - wandb
+ - xai
+ - xiaomi
+ - z-ai
+ example: openai
+ type: string
+ x-speakeasy-unknown-values: allow
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListBYOKKeysResponse'
+ description: List of BYOK credentials
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List BYOK provider credentials
+ tags:
+ - BYOK
+ x-speakeasy-name-override: list
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ 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.
+ operationId: createBYOKKey
+ requestBody:
+ content:
+ application/json:
+ example:
+ key: sk-proj-abc123...
+ name: Production OpenAI Key
+ provider: openai
+ schema:
+ $ref: '#/components/schemas/CreateBYOKKeyRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ example:
+ data:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/CreateBYOKKeyResponse'
+ description: BYOK credential created successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Create a BYOK provider credential
+ tags:
+ - BYOK
+ x-speakeasy-name-override: create
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /byok/{id}:
+ delete:
+ description: >-
+ Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: deleteBYOKKey
+ parameters:
+ - description: The BYOK credential ID (UUID).
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The BYOK credential ID (UUID).
+ example: 11111111-2222-3333-4444-555555555555
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ deleted: true
+ schema:
+ $ref: '#/components/schemas/DeleteBYOKKeyResponse'
+ description: BYOK credential deleted successfully
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Delete a BYOK provider credential
+ tags:
+ - BYOK
+ x-speakeasy-name-override: delete
+ get:
+ description: >-
+ Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getBYOKKey
+ parameters:
+ - description: The BYOK credential ID (UUID).
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The BYOK credential ID (UUID).
+ example: 11111111-2222-3333-4444-555555555555
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Production OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/GetBYOKKeyResponse'
+ description: BYOK credential details
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Get a BYOK provider credential
+ tags:
+ - BYOK
+ x-speakeasy-name-override: get
+ patch:
+ description: >-
+ Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: updateBYOKKey
+ parameters:
+ - description: The BYOK credential ID (UUID).
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The BYOK credential ID (UUID).
+ example: 11111111-2222-3333-4444-555555555555
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ disabled: false
+ name: Updated OpenAI Key
+ schema:
+ $ref: '#/components/schemas/UpdateBYOKKeyRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ allowed_api_key_hashes: null
+ allowed_models: null
+ allowed_user_ids: null
+ created_at: '2025-08-24T10:30:00Z'
+ disabled: false
+ id: 11111111-2222-3333-4444-555555555555
+ is_fallback: false
+ label: sk-...AbCd
+ name: Updated OpenAI Key
+ provider: openai
+ sort_order: 0
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/UpdateBYOKKeyResponse'
+ description: BYOK credential updated successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Update a BYOK provider credential
+ tags:
+ - BYOK
+ x-speakeasy-name-override: update
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/chat/completions:
post:
description: >-
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
operationId: sendChatCompletionRequest
+ parameters:
+ - description: >-
+ Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ example: enabled
+ in: header
+ name: X-OpenRouter-Metadata
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetadataLevel'
requestBody:
content:
application/json:
@@ -13844,12 +22589,7 @@ paths:
model: openai/gpt-4
object: chat.completion.chunk
schema:
- properties:
- data:
- $ref: '#/components/schemas/ChatStreamChunk'
- required:
- - data
- type: object
+ $ref: '#/components/schemas/ChatStreamingResponse'
x-speakeasy-sse-sentinel: '[DONE]'
description: Successful chat completion response
'400':
@@ -13882,6 +22622,55 @@ paths:
schema:
$ref: '#/components/schemas/PaymentRequiredResponse'
description: Payment Required - Insufficient credits or quota to complete request
+ '403':
+ content:
+ application/json:
+ examples:
+ guardrail-blocked:
+ summary: Guardrail blocked the request
+ value:
+ error:
+ code: 403
+ message: 'Request blocked: prompt injection patterns detected'
+ metadata:
+ patterns:
+ - ignore all previous instructions
+ openrouter_metadata:
+ attempt: 1
+ endpoints:
+ available:
+ - model: openai/gpt-4o
+ provider: OpenAI
+ selected: false
+ total: 1
+ is_byok: false
+ pipeline:
+ - data:
+ action: blocked
+ detected: true
+ engines:
+ - regex
+ patterns:
+ - ignore all previous instructions
+ guardrail_id: grd_abc123
+ guardrail_scope: api-key
+ name: regex_pi_detection
+ summary: 'Blocked: prompt injection detected (1 pattern matched)'
+ type: guardrail
+ region: iad
+ requested: openai/gpt-4o
+ strategy: direct
+ summary: available=1
+ insufficient-permissions:
+ summary: Insufficient permissions
+ value:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: >-
+ Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
'404':
content:
application/json:
@@ -14104,6 +22893,339 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /datasets/app-rankings:
+ get:
+ description: |-
+ Returns the top public apps on OpenRouter ranked by token usage inside the requested
+ date window, matching the public apps marketplace on openrouter.ai/apps. Token totals
+ are `prompt_tokens + completion_tokens`; hidden and private apps are excluded and
+ traffic from related app aliases is merged into the canonical visible app.
+
+ `sort=popular` (default) ranks by total token volume inside the window.
+ `sort=trending` ranks by absolute excess token growth: window volume minus the average
+ volume of the three equal-length periods immediately preceding the window. Apps with
+ no excess growth are omitted, so `trending` may return fewer than `limit` rows.
+
+ Filter with `category` (marketplace category group, e.g. `coding`) or `subcategory`
+ (e.g. `cli-agent`). Ranks are re-numbered 1..N after filtering. Page with `offset` —
+ `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+
+ Authenticate with any valid OpenRouter API key (same key used for inference).
+ Rate-limited to 30 requests/minute per key and 500 requests/day per account.
+
+ When republishing or quoting this dataset, OpenRouter must be cited as:
+ "Source: OpenRouter (openrouter.ai/apps), as of {as_of}."
+
+ Token counts come from each upstream provider's own tokenizer, so a token attributed
+ to one app is not directly comparable to a token attributed to another app whose
+ traffic flows through a different provider.
+ operationId: getAppRankings
+ parameters:
+ - description: >-
+ Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
+ in: query
+ name: category
+ required: false
+ schema:
+ description: >-
+ Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
+ enum:
+ - coding
+ - creative
+ - productivity
+ - entertainment
+ example: coding
+ type: string
+ x-speakeasy-unknown-values: allow
+ - description: >-
+ Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
+ in: query
+ name: subcategory
+ required: false
+ schema:
+ description: >-
+ Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
+ enum:
+ - cli-agent
+ - ide-extension
+ - cloud-agent
+ - programming-app
+ - native-app-builder
+ - creative-writing
+ - video-gen
+ - image-gen
+ - audio-gen
+ - roleplay
+ - game
+ - writing-assistant
+ - general-chat
+ - personal-agent
+ - legal
+ example: cli-agent
+ type: string
+ x-speakeasy-unknown-values: allow
+ - description: >-
+ `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
+ in: query
+ name: sort
+ required: false
+ schema:
+ default: popular
+ description: >-
+ `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
+ enum:
+ - popular
+ - trending
+ example: popular
+ type: string
+ x-speakeasy-unknown-values: allow
+ - description: >-
+ Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ in: query
+ name: start_date
+ required: false
+ schema:
+ description: >-
+ Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ example: '2026-04-12'
+ pattern: ^\d{4}-\d{2}-\d{2}$
+ type: string
+ - description: >-
+ End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ in: query
+ name: end_date
+ required: false
+ schema:
+ description: >-
+ End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ example: '2026-05-11'
+ pattern: ^\d{4}-\d{2}-\d{2}$
+ type: string
+ - description: Maximum number of apps to return (1-100). Defaults to 50.
+ in: query
+ name: limit
+ required: false
+ schema:
+ default: 50
+ description: Maximum number of apps to return (1-100). Defaults to 50.
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ - description: >-
+ Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+ in: query
+ name: offset
+ required: false
+ schema:
+ default: 0
+ description: >-
+ Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+ example: 0
+ maximum: 100
+ minimum: 0
+ nullable: false
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - app_id: 12345
+ app_name: Cline
+ rank: 1
+ total_requests: 4321
+ total_tokens: '12345678'
+ - app_id: 67890
+ app_name: Roo Code
+ rank: 2
+ total_requests: 2109
+ total_tokens: '9876543'
+ meta:
+ as_of: '2026-05-12T02:00:00Z'
+ end_date: '2026-05-11'
+ start_date: '2026-04-12'
+ version: v1
+ schema:
+ $ref: '#/components/schemas/AppRankingsResponse'
+ description: >-
+ Apps ranked per the requested `sort`, re-numbered 1..N. `popular` sorts by `total_tokens` descending; `trending` sorts by absolute excess token growth descending and may return fewer than `limit` rows.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ schema:
+ $ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Top apps by token usage
+ tags:
+ - Datasets
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /datasets/rankings-daily:
+ get:
+ description: |-
+ Returns the top 50 public models per day by total token usage on OpenRouter, plus a
+ single aggregated `other` row per day that sums every model outside that top 50.
+ Token totals are `prompt_tokens + completion_tokens`, matching the public rankings
+ chart on openrouter.ai/rankings.
+
+ Each row is a distinct `(date, model_permaslug)` pair. The `other` row uses the
+ reserved permaslug `other` and is always returned last within its date, so callers
+ can compute `top-50 traffic / total daily traffic` without a second request.
+
+ Authenticate with any valid OpenRouter API key (same key used for inference).
+ Rate-limited to 30 requests/minute per key and 500 requests/day per account.
+
+ When republishing or quoting this dataset, OpenRouter must be cited as:
+ "Source: OpenRouter (openrouter.ai/rankings), as of {as_of}."
+
+ Token counts come from each upstream provider's own tokenizer (Anthropic counts
+ are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
+ a token in one row is not directly comparable to a token in another row from a
+ different provider.
+ operationId: getRankingsDaily
+ parameters:
+ - description: >-
+ Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ in: query
+ name: start_date
+ required: false
+ schema:
+ description: >-
+ Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ example: '2026-04-12'
+ pattern: ^\d{4}-\d{2}-\d{2}$
+ type: string
+ - description: >-
+ End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ in: query
+ name: end_date
+ required: false
+ schema:
+ description: >-
+ End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ example: '2026-05-11'
+ pattern: ^\d{4}-\d{2}-\d{2}$
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - date: '2026-05-11'
+ model_permaslug: openai/gpt-4o-2024-05-13
+ total_tokens: '12345678'
+ - date: '2026-05-11'
+ model_permaslug: anthropic/claude-3.5-sonnet-20241022
+ total_tokens: '9876543'
+ - date: '2026-05-11'
+ model_permaslug: other
+ total_tokens: '4321098'
+ meta:
+ as_of: '2026-05-12T02:00:00Z'
+ end_date: '2026-05-11'
+ start_date: '2026-04-12'
+ version: v1
+ schema:
+ $ref: '#/components/schemas/RankingsDailyResponse'
+ description: >-
+ Up to 51 rows per day — the top 50 public models by `total_tokens` plus a single aggregated `other` row covering every model outside that top 50. Sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ schema:
+ $ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Daily token totals for top 50 models
+ tags:
+ - Datasets
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/embeddings:
post:
description: Submits an embedding request to the embeddings router
@@ -14177,6 +23299,9 @@ paths:
- type
- image_url
type: object
+ - $ref: '#/components/schemas/ContentPartInputAudio'
+ - $ref: '#/components/schemas/ContentPartInputVideo'
+ - $ref: '#/components/schemas/ContentPartInputFile'
type: array
required:
- content
@@ -14295,6 +23420,28 @@ paths:
description: Number of tokens in the input
example: 8
type: integer
+ prompt_tokens_details:
+ description: >-
+ Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
+ properties:
+ audio_tokens:
+ description: Number of audio tokens in the input
+ type: integer
+ file_tokens:
+ description: Number of file/document tokens in the input
+ type: integer
+ image_tokens:
+ description: Number of image tokens in the input
+ example: 258
+ type: integer
+ text_tokens:
+ description: Number of text tokens in the input
+ example: 8
+ type: integer
+ video_tokens:
+ description: Number of video tokens in the input
+ type: integer
+ type: object
total_tokens:
description: Total number of tokens used
example: 8
@@ -14459,6 +23606,7 @@ paths:
prompt: '0.00000002'
request: '0'
supported_parameters: []
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: false
@@ -14618,15 +23766,15 @@ paths:
application/json:
example:
data:
- api_type: null
+ api_type: completions
app_id: 12345
- cache_discount: 0.0002
+ cache_discount: null
cancelled: false
created_at: '2024-07-15T23:33:19.433273+00:00'
external_user: user-123
finish_reason: stop
generation_time: 1200
- http_referer: null
+ http_referer: https://openrouter.ai/
id: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG
is_byok: false
latency: 1250
@@ -14646,7 +23794,8 @@ paths:
provider_name: Infermatic
provider_responses: null
request_id: req-1727282430-aBcDeFgHiJkLmNoPqRsT
- router: null
+ router: openrouter/auto
+ session_id: null
streamed: true
tokens_completion: 25
tokens_prompt: 10
@@ -14654,248 +23803,9 @@ paths:
upstream_id: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946
upstream_inference_cost: 0.0012
usage: 0.0015
- user_agent: null
+ user_agent: Mozilla/5.0
schema:
- description: Generation response
- properties:
- data:
- description: Generation data
- properties:
- api_type:
- description: Type of API used for the generation
- enum:
- - completions
- - embeddings
- - rerank
- - video
- - null
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- app_id:
- description: ID of the app that made the request
- example: 12345
- nullable: true
- type: integer
- cache_discount:
- description: Discount applied due to caching
- example: 0.0002
- format: double
- nullable: true
- type: number
- cancelled:
- description: Whether the generation was cancelled
- example: false
- nullable: true
- type: boolean
- created_at:
- description: ISO 8601 timestamp of when the generation was created
- example: '2024-07-15T23:33:19.433273+00:00'
- type: string
- external_user:
- description: External user identifier
- example: user-123
- nullable: true
- type: string
- finish_reason:
- description: Reason the generation finished
- example: stop
- nullable: true
- type: string
- generation_time:
- description: Time taken for generation in milliseconds
- example: 1200
- format: double
- nullable: true
- type: number
- http_referer:
- description: Referer header from the request
- nullable: true
- type: string
- id:
- description: Unique identifier for the generation
- example: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG
- type: string
- is_byok:
- description: Whether this used bring-your-own-key
- example: false
- type: boolean
- latency:
- description: Total latency in milliseconds
- example: 1250
- format: double
- nullable: true
- type: number
- model:
- description: Model used for the generation
- example: sao10k/l3-stheno-8b
- type: string
- moderation_latency:
- description: Moderation latency in milliseconds
- example: 50
- format: double
- nullable: true
- type: number
- native_finish_reason:
- description: Native finish reason as reported by provider
- example: stop
- nullable: true
- type: string
- native_tokens_cached:
- description: Native cached tokens as reported by provider
- example: 3
- nullable: true
- type: integer
- native_tokens_completion:
- description: Native completion tokens as reported by provider
- example: 25
- nullable: true
- type: integer
- native_tokens_completion_images:
- description: Native completion image tokens as reported by provider
- example: 0
- nullable: true
- type: integer
- native_tokens_prompt:
- description: Native prompt tokens as reported by provider
- example: 10
- nullable: true
- type: integer
- native_tokens_reasoning:
- description: Native reasoning tokens as reported by provider
- example: 5
- nullable: true
- type: integer
- num_input_audio_prompt:
- description: Number of audio inputs in the prompt
- example: 0
- nullable: true
- type: integer
- num_media_completion:
- description: Number of media items in the completion
- example: 0
- nullable: true
- type: integer
- num_media_prompt:
- description: Number of media items in the prompt
- example: 1
- nullable: true
- type: integer
- num_search_results:
- description: Number of search results included
- example: 5
- nullable: true
- type: integer
- origin:
- description: Origin URL of the request
- example: https://openrouter.ai/
- type: string
- provider_name:
- description: Name of the provider that served the request
- example: Infermatic
- nullable: true
- type: string
- provider_responses:
- description: List of provider responses for this generation, including fallback attempts
- items:
- $ref: '#/components/schemas/ProviderResponse'
- nullable: true
- type: array
- request_id:
- description: Unique identifier grouping all generations from a single API request
- example: req-1727282430-aBcDeFgHiJkLmNoPqRsT
- nullable: true
- type: string
- router:
- description: Router used for the request (e.g., openrouter/auto)
- example: openrouter/auto
- nullable: true
- type: string
- session_id:
- description: Session identifier grouping multiple generations in the same session
- nullable: true
- type: string
- streamed:
- description: Whether the response was streamed
- example: true
- nullable: true
- type: boolean
- tokens_completion:
- description: Number of tokens in the completion
- example: 25
- nullable: true
- type: integer
- tokens_prompt:
- description: Number of tokens in the prompt
- example: 10
- nullable: true
- type: integer
- total_cost:
- description: Total cost of the generation in USD
- example: 0.0015
- format: double
- type: number
- upstream_id:
- description: Upstream provider's identifier for this generation
- example: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946
- nullable: true
- type: string
- upstream_inference_cost:
- description: Cost charged by the upstream provider
- example: 0.0012
- format: double
- nullable: true
- type: number
- usage:
- description: Usage amount in USD
- example: 0.0015
- format: double
- type: number
- user_agent:
- description: User-Agent header from the request
- nullable: true
- type: string
- required:
- - id
- - upstream_id
- - total_cost
- - cache_discount
- - upstream_inference_cost
- - created_at
- - model
- - app_id
- - streamed
- - cancelled
- - provider_name
- - latency
- - moderation_latency
- - generation_time
- - finish_reason
- - tokens_prompt
- - tokens_completion
- - native_tokens_prompt
- - native_tokens_completion
- - native_tokens_completion_images
- - native_tokens_reasoning
- - native_tokens_cached
- - num_media_prompt
- - num_input_audio_prompt
- - num_media_completion
- - num_search_results
- - origin
- - usage
- - is_byok
- - native_finish_reason
- - external_user
- - api_type
- - router
- - provider_responses
- - user_agent
- - http_referer
- type: object
- required:
- - data
- type: object
+ $ref: '#/components/schemas/GenerationResponse'
description: Returns the request metadata for this generation
'401':
content:
@@ -14984,6 +23894,122 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /generation/content:
+ get:
+ operationId: listGenerationContent
+ parameters:
+ - description: The generation ID
+ in: query
+ name: id
+ required: true
+ schema:
+ description: The generation ID
+ example: gen-1234567890
+ minLength: 1
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ input:
+ messages:
+ - content: What is the meaning of life?
+ role: user
+ output:
+ completion: The meaning of life is a philosophical question...
+ reasoning: null
+ schema:
+ $ref: '#/components/schemas/GenerationContentResponse'
+ description: Returns the stored prompt and completion content
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ schema:
+ $ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ '502':
+ content:
+ application/json:
+ example:
+ error:
+ code: 502
+ message: Provider returned error
+ schema:
+ $ref: '#/components/schemas/BadGatewayResponse'
+ description: Bad Gateway - Provider/upstream API failure
+ '524':
+ content:
+ application/json:
+ example:
+ error:
+ code: 524
+ message: Request timed out. Please try again later.
+ schema:
+ $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
+ description: Infrastructure Timeout - Provider request timed out at edge network
+ '529':
+ content:
+ application/json:
+ example:
+ error:
+ code: 529
+ message: Provider returned error
+ schema:
+ $ref: '#/components/schemas/ProviderOverloadedResponse'
+ description: Provider Overloaded - Provider is temporarily overloaded
+ summary: Get stored prompt and completion content for a generation
+ tags:
+ - Generations
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/guardrails:
get:
description: >-
@@ -15010,6 +24036,15 @@ paths:
maximum: 100
minimum: 1
type: integer
+ - description: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
+ in: query
+ name: workspace_id
+ required: false
+ schema:
+ description: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ format: uuid
+ type: string
responses:
'200':
content:
@@ -15031,6 +24066,7 @@ paths:
name: Production Guardrail
reset_interval: monthly
updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
total_count: 1
schema:
$ref: '#/components/schemas/ListGuardrailsResponse'
@@ -15084,7 +24120,10 @@ paths:
- anthropic
- deepseek
description: A guardrail for limiting API usage
- enforce_zdr: false
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
ignored_models: null
ignored_providers: null
limit_usd: 50
@@ -15106,7 +24145,11 @@ paths:
- google
created_at: '2025-08-24T10:30:00Z'
description: A guardrail for limiting API usage
- enforce_zdr: false
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: false
+ enforce_zdr_openai: true
+ enforce_zdr_other: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -15114,6 +24157,7 @@ paths:
name: My New Guardrail
reset_interval: monthly
updated_at: null
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
schema:
$ref: '#/components/schemas/CreateGuardrailResponse'
description: Guardrail created successfully
@@ -15137,6 +24181,16 @@ paths:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
'500':
content:
application/json:
@@ -15246,6 +24300,7 @@ paths:
name: Production Guardrail
reset_interval: monthly
updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
schema:
$ref: '#/components/schemas/GetGuardrailResponse'
description: Guardrail details
@@ -15318,7 +24373,11 @@ paths:
- openai
created_at: '2025-08-24T10:30:00Z'
description: Updated description
- enforce_zdr: true
+ enforce_zdr: null
+ enforce_zdr_anthropic: true
+ enforce_zdr_google: true
+ enforce_zdr_openai: true
+ enforce_zdr_other: true
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
@@ -15326,6 +24385,7 @@ paths:
name: Updated Guardrail Name
reset_interval: weekly
updated_at: '2025-08-24T16:00:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
schema:
$ref: '#/components/schemas/UpdateGuardrailResponse'
description: Guardrail updated successfully
@@ -16333,6 +25393,15 @@ paths:
minimum: 0
nullable: false
type: integer
+ - description: Filter API keys by workspace ID. By default, keys in the default workspace are returned.
+ in: query
+ name: workspace_id
+ required: false
+ schema:
+ description: Filter API keys by workspace ID. By default, keys in the default workspace are returned.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ format: uuid
+ type: string
responses:
'200':
content:
@@ -16359,6 +25428,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
schema:
example:
data:
@@ -16382,6 +25452,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
description: List of API keys
@@ -16407,6 +25478,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
byok_usage:
description: Total external BYOK usage (in USD) for the API key
@@ -16506,6 +25578,10 @@ paths:
example: 25.5
format: double
type: number
+ workspace_id:
+ description: The workspace ID this API key belongs to.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ type: string
required:
- hash
- name
@@ -16526,6 +25602,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
type: array
required:
@@ -16628,6 +25705,11 @@ paths:
example: My New API Key
minLength: 1
type: string
+ workspace_id:
+ description: The workspace to create the API key in. Defaults to the default workspace if not provided.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ format: uuid
+ type: string
required:
- name
type: object
@@ -16658,6 +25740,7 @@ paths:
usage_daily: 0
usage_monthly: 0
usage_weekly: 0
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
key: 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
schema:
example:
@@ -16682,6 +25765,7 @@ paths:
usage_daily: 0
usage_monthly: 0
usage_weekly: 0
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
key: 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
properties:
data:
@@ -16707,6 +25791,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
byok_usage:
description: Total external BYOK usage (in USD) for the API key
@@ -16806,6 +25891,10 @@ paths:
example: 25.5
format: double
type: number
+ workspace_id:
+ description: The workspace ID this API key belongs to.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ type: string
required:
- hash
- name
@@ -16826,6 +25915,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
key:
description: The actual API key string (only shown once)
@@ -16856,6 +25946,16 @@ paths:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
'429':
content:
application/json:
@@ -16998,6 +26098,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
schema:
example:
data:
@@ -17021,6 +26122,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
description: The API key information
@@ -17045,6 +26147,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
byok_usage:
description: Total external BYOK usage (in USD) for the API key
@@ -17144,6 +26247,10 @@ paths:
example: 25.5
format: double
type: number
+ workspace_id:
+ description: The workspace ID this API key belongs to.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ type: string
required:
- hash
- name
@@ -17164,6 +26271,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
required:
- data
@@ -17300,6 +26408,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
schema:
example:
data:
@@ -17323,6 +26432,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
description: The updated API key information
@@ -17347,6 +26457,7 @@ paths:
usage_daily: 25.5
usage_monthly: 25.5
usage_weekly: 25.5
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
byok_usage:
description: Total external BYOK usage (in USD) for the API key
@@ -17446,6 +26557,10 @@ paths:
example: 25.5
format: double
type: number
+ workspace_id:
+ description: The workspace ID this API key belongs to.
+ example: 0df9e665-d932-5740-b2c7-b52af166bc11
+ type: string
required:
- hash
- name
@@ -17466,6 +26581,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
required:
- data
@@ -17534,6 +26650,15 @@ paths:
description: >-
Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
operationId: createMessages
+ parameters:
+ - description: >-
+ Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ example: enabled
+ in: header
+ name: X-OpenRouter-Metadata
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetadataLevel'
requestBody:
content:
application/json:
@@ -17574,15 +26699,7 @@ paths:
type: content_block_delta
event: content_block_delta
schema:
- properties:
- data:
- $ref: '#/components/schemas/MessagesStreamEvents'
- event:
- type: string
- required:
- - event
- - data
- type: object
+ $ref: '#/components/schemas/MessagesStreamingResponse'
x-speakeasy-sse-sentinel: '[DONE]'
description: Successful response
'400':
@@ -17610,14 +26727,52 @@ paths:
'403':
content:
application/json:
- example:
- error:
- message: Permission denied
- type: permission_error
- type: error
+ examples:
+ guardrail-blocked:
+ summary: Guardrail blocked the request
+ value:
+ error:
+ code: 403
+ message: 'Request blocked: prompt injection patterns detected'
+ metadata:
+ patterns:
+ - ignore all previous instructions
+ openrouter_metadata:
+ attempt: 1
+ endpoints:
+ available:
+ - model: openai/gpt-4o
+ provider: OpenAI
+ selected: false
+ total: 1
+ is_byok: false
+ pipeline:
+ - data:
+ action: blocked
+ detected: true
+ engines:
+ - regex
+ patterns:
+ - ignore all previous instructions
+ guardrail_id: grd_abc123
+ guardrail_scope: api-key
+ name: regex_pi_detection
+ summary: 'Blocked: prompt injection detected (1 pattern matched)'
+ type: guardrail
+ region: iad
+ requested: openai/gpt-4o
+ strategy: direct
+ summary: available=1
+ insufficient-permissions:
+ summary: Insufficient permissions
+ value:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
schema:
- $ref: '#/components/schemas/MessagesErrorResponse'
- description: Permission denied error
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: >-
+ Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
'404':
content:
application/json:
@@ -17727,6 +26882,26 @@ paths:
Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
example: text
type: string
+ - description: >-
+ Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
+ in: query
+ name: sort
+ required: false
+ schema:
+ description: >-
+ Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
+ enum:
+ - most-popular
+ - newest
+ - top-weekly
+ - pricing-low-to-high
+ - pricing-high-to-low
+ - context-high-to-low
+ - throughput-high-to-low
+ - latency-low-to-high
+ example: newest
+ type: string
+ x-speakeasy-unknown-values: allow
responses:
'200':
content:
@@ -17762,6 +26937,7 @@ paths:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -18012,6 +27188,7 @@ paths:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -18059,6 +27236,435 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /observability/destinations:
+ get:
+ description: >-
+ List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listObservabilityDestinations
+ parameters:
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ nullable: false
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ - description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ in: query
+ name: workspace_id
+ required: false
+ schema:
+ description: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListObservabilityDestinationsResponse'
+ description: List of observability destinations
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List observability destinations
+ tags:
+ - Observability
+ x-speakeasy-name-override: list
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ post:
+ description: >-
+ Create a new observability destination. A maximum of 5 destinations per type is allowed. 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.
+ operationId: createObservabilityDestination
+ requestBody:
+ content:
+ application/json:
+ example:
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ name: Production Langfuse
+ type: langfuse
+ schema:
+ $ref: '#/components/schemas/CreateObservabilityDestinationRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ example:
+ data:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/CreateObservabilityDestinationResponse'
+ description: Destination created successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ schema:
+ $ref: '#/components/schemas/ConflictResponse'
+ description: Conflict - Resource conflict or concurrent modification
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Create an observability destination
+ tags:
+ - Observability
+ x-speakeasy-name-override: create
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /observability/destinations/{id}:
+ delete:
+ description: >-
+ Delete an existing observability destination. This performs a soft delete. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: deleteObservabilityDestination
+ parameters:
+ - description: The destination ID (UUID).
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The destination ID (UUID).
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ deleted: true
+ schema:
+ $ref: '#/components/schemas/DeleteObservabilityDestinationResponse'
+ description: Destination deleted successfully
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Delete an observability destination
+ tags:
+ - Observability
+ x-speakeasy-name-override: delete
+ get:
+ description: >-
+ Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getObservabilityDestination
+ parameters:
+ - description: The destination ID (UUID).
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The destination ID (UUID).
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/GetObservabilityDestinationResponse'
+ description: The observability destination
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Get an observability destination
+ tags:
+ - Observability
+ x-speakeasy-name-override: get
+ patch:
+ description: >-
+ Update an existing observability destination. Only the fields provided in the request body are updated. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: updateObservabilityDestination
+ parameters:
+ - description: The destination ID (UUID).
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The destination ID (UUID).
+ example: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ enabled: false
+ name: Updated Langfuse
+ schema:
+ $ref: '#/components/schemas/UpdateObservabilityDestinationRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ api_key_hashes: null
+ config:
+ baseUrl: https://us.cloud.langfuse.com
+ publicKey: pk-l...EfGh
+ secretKey: sk-l...AbCd
+ created_at: '2025-08-24T10:30:00Z'
+ enabled: true
+ filter_rules: null
+ id: 99999999-aaaa-bbbb-cccc-dddddddddddd
+ name: Production Langfuse
+ privacy_mode: false
+ sampling_rate: 1
+ type: langfuse
+ updated_at: '2025-08-24T15:45:00Z'
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/UpdateObservabilityDestinationResponse'
+ description: Destination updated successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ schema:
+ $ref: '#/components/schemas/ConflictResponse'
+ description: Conflict - Resource conflict or concurrent modification
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Update an observability destination
+ tags:
+ - Observability
+ x-speakeasy-name-override: update
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/organization/members:
get:
description: >-
@@ -18195,6 +27801,786 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /presets:
+ get:
+ description: Lists all presets for the authenticated user, ordered by most recently updated first.
+ operationId: listPresets
+ parameters:
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ nullable: false
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListPresetsResponse'
+ description: Paginated list of presets.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: List presets
+ tags:
+ - Presets
+ x-speakeasy-name-override: list
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /presets/{slug}:
+ get:
+ description: Retrieves a preset by its slug with its currently designated version inline.
+ operationId: getPreset
+ parameters:
+ - description: URL-safe slug identifying the preset.
+ in: path
+ name: slug
+ required: true
+ schema:
+ description: URL-safe slug identifying the preset.
+ example: my-preset
+ minLength: 1
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ schema:
+ $ref: '#/components/schemas/GetPresetResponse'
+ description: Preset with its designated version.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: Get a preset
+ tags:
+ - Presets
+ x-speakeasy-name-override: get
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /presets/{slug}/chat/completions:
+ post:
+ description: >-
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+ operationId: createPresetsChatCompletions
+ parameters:
+ - description: URL-safe slug identifying the preset. Created if it does not exist.
+ in: path
+ name: slug
+ required: true
+ schema:
+ description: URL-safe slug identifying the preset. Created if it does not exist.
+ example: my-preset
+ minLength: 1
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ messages:
+ - content: You are a helpful assistant.
+ role: system
+ - content: Hello!
+ role: user
+ model: openai/gpt-5.4
+ temperature: 0.7
+ schema:
+ $ref: '#/components/schemas/ChatRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ model: openai/gpt-5.4
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ schema:
+ $ref: '#/components/schemas/CreatePresetFromInferenceResponse'
+ description: Preset created or updated successfully.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ schema:
+ $ref: '#/components/schemas/ConflictResponse'
+ description: Conflict - Resource conflict or concurrent modification
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: Create a preset from a chat-completions request body
+ tags:
+ - Presets
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /presets/{slug}/messages:
+ post:
+ description: >-
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+ operationId: createPresetsMessages
+ parameters:
+ - description: URL-safe slug identifying the preset. Created if it does not exist.
+ in: path
+ name: slug
+ required: true
+ schema:
+ description: URL-safe slug identifying the preset. Created if it does not exist.
+ example: my-preset
+ minLength: 1
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ max_tokens: 1024
+ messages:
+ - content: Hello!
+ role: user
+ model: anthropic/claude-4.6-sonnet
+ system: You are a helpful assistant.
+ schema:
+ $ref: '#/components/schemas/MessagesRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ max_tokens: 1024
+ model: anthropic/claude-4.6-sonnet
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ schema:
+ $ref: '#/components/schemas/CreatePresetFromInferenceResponse'
+ description: Preset created or updated successfully.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ schema:
+ $ref: '#/components/schemas/ConflictResponse'
+ description: Conflict - Resource conflict or concurrent modification
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: Create a preset from a messages request body
+ tags:
+ - Presets
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /presets/{slug}/responses:
+ post:
+ description: >-
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+ operationId: createPresetsResponses
+ parameters:
+ - description: URL-safe slug identifying the preset. Created if it does not exist.
+ in: path
+ name: slug
+ required: true
+ schema:
+ description: URL-safe slug identifying the preset. Created if it does not exist.
+ example: my-preset
+ minLength: 1
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ input: Hello!
+ instructions: You are a helpful assistant.
+ model: openai/gpt-5.4
+ schema:
+ $ref: '#/components/schemas/ResponsesRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2026-04-20T10:00:00Z'
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ description: null
+ designated_version:
+ config:
+ model: openai/gpt-5.4
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
+ id: 650e8400-e29b-41d4-a716-446655440001
+ name: my-preset
+ slug: my-preset
+ status: active
+ status_updated_at: null
+ updated_at: '2026-04-20T10:00:00Z'
+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
+ schema:
+ $ref: '#/components/schemas/CreatePresetFromInferenceResponse'
+ description: Preset created or updated successfully.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ schema:
+ $ref: '#/components/schemas/ConflictResponse'
+ description: Conflict - Resource conflict or concurrent modification
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: Create a preset from a responses request body
+ tags:
+ - Presets
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /presets/{slug}/versions:
+ get:
+ description: Lists all versions of a preset, ordered by version number ascending (oldest first).
+ operationId: listPresetVersions
+ parameters:
+ - description: URL-safe slug identifying the preset.
+ in: path
+ name: slug
+ required: true
+ schema:
+ description: URL-safe slug identifying the preset.
+ example: my-preset
+ minLength: 1
+ type: string
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ nullable: false
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListPresetVersionsResponse'
+ description: Paginated list of preset versions.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: List versions of a preset
+ tags:
+ - Presets
+ x-speakeasy-name-override: listVersions
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /presets/{slug}/versions/{version}:
+ get:
+ description: Retrieves a specific version of a preset by its slug and version number.
+ operationId: getPresetVersion
+ parameters:
+ - description: URL-safe slug identifying the preset.
+ in: path
+ name: slug
+ required: true
+ schema:
+ description: URL-safe slug identifying the preset.
+ example: my-preset
+ minLength: 1
+ type: string
+ - description: Version number of the preset.
+ in: path
+ name: version
+ required: true
+ schema:
+ description: Version number of the preset.
+ example: '1'
+ minLength: 1
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ config:
+ model: openai/gpt-4o
+ temperature: 0.7
+ created_at: '2026-04-20T10:00:00Z'
+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
+ id: 550e8400-e29b-41d4-a716-446655440000
+ preset_id: 650e8400-e29b-41d4-a716-446655440001
+ system_prompt: You are a helpful assistant.
+ updated_at: '2026-04-20T10:00:00Z'
+ version: 1
+ schema:
+ $ref: '#/components/schemas/GetPresetVersionResponse'
+ description: The requested preset version.
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - apiKey: []
+ summary: Get a specific version of a preset
+ tags:
+ - Presets
+ x-speakeasy-name-override: getVersion
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/providers:
get:
operationId: listProviders
@@ -18825,12 +29211,30 @@ paths:
top_n: 3
properties:
documents:
- description: The list of documents to rerank
+ description: >-
+ The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models.
example:
- Paris is the capital of France.
- Berlin is the capital of Germany.
items:
- type: string
+ anyOf:
+ - type: string
+ - description: >-
+ A structured document with optional text and/or image content. At least one of `text` or `image` must be provided.
+ properties:
+ image:
+ description: >-
+ An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...).
+ example: https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Phytogenic.png
+ type: string
+ text:
+ description: The document text
+ example: AI enables robots to perceive, plan, and act autonomously.
+ type: string
+ type: object
+ description: >-
+ A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`.
+ minItems: 1
type: array
model:
description: The rerank model to use
@@ -18901,14 +29305,16 @@ paths:
relevance_score: 0.98
properties:
document:
- description: The document object containing the original text
+ description: The document object echoing the original input (text and/or image)
properties:
+ image:
+ description: The image (URL or data URI) from the original document
+ example: https://example.com/image.png
+ type: string
text:
description: The document text
example: Paris is the capital of France.
type: string
- required:
- - text
type: object
index:
description: Index of the document in the original input list
@@ -19068,6 +29474,15 @@ paths:
post:
description: Creates a streaming or non-streaming response using OpenResponses API format
operationId: createResponses
+ parameters:
+ - description: >-
+ Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ example: enabled
+ in: header
+ name: X-OpenRouter-Metadata
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetadataLevel'
requestBody:
content:
application/json:
@@ -19105,12 +29520,7 @@ paths:
delta: Hello
type: response.output_text.delta
schema:
- properties:
- data:
- $ref: '#/components/schemas/StreamEvents'
- required:
- - data
- type: object
+ $ref: '#/components/schemas/ResponsesStreamingResponse'
x-speakeasy-sse-sentinel: '[DONE]'
description: Successful response
'400':
@@ -19143,6 +29553,55 @@ paths:
schema:
$ref: '#/components/schemas/PaymentRequiredResponse'
description: Payment Required - Insufficient credits or quota to complete request
+ '403':
+ content:
+ application/json:
+ examples:
+ guardrail-blocked:
+ summary: Guardrail blocked the request
+ value:
+ error:
+ code: 403
+ message: 'Request blocked: prompt injection patterns detected'
+ metadata:
+ patterns:
+ - ignore all previous instructions
+ openrouter_metadata:
+ attempt: 1
+ endpoints:
+ available:
+ - model: openai/gpt-4o
+ provider: OpenAI
+ selected: false
+ total: 1
+ is_byok: false
+ pipeline:
+ - data:
+ action: blocked
+ detected: true
+ engines:
+ - regex
+ patterns:
+ - ignore all previous instructions
+ guardrail_id: grd_abc123
+ guardrail_scope: api-key
+ name: regex_pi_detection
+ summary: 'Blocked: prompt injection detected (1 pattern matched)'
+ type: guardrail
+ region: iad
+ requested: openai/gpt-4o
+ strategy: direct
+ summary: available=1
+ insufficient-permissions:
+ summary: Insufficient permissions
+ value:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: >-
+ Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
'404':
content:
application/json:
@@ -19368,7 +29827,7 @@ paths:
generation_id: gen-xyz789
id: job-abc123
polling_url: /api/v1/videos/job-abc123
- status: complete
+ status: completed
unsigned_urls:
- https://storage.example.com/video.mp4
usage:
@@ -19563,6 +30022,625 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /workspaces:
+ get:
+ description: >-
+ List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listWorkspaces
+ parameters:
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ nullable: false
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: '2025-08-24T15:45:00Z'
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListWorkspacesResponse'
+ description: List of workspaces
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List workspaces
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: list
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ post:
+ description: >-
+ Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: createWorkspace
+ requestBody:
+ content:
+ application/json:
+ example:
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ name: Production
+ slug: production
+ schema:
+ $ref: '#/components/schemas/CreateWorkspaceRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: null
+ schema:
+ $ref: '#/components/schemas/CreateWorkspaceResponse'
+ description: Workspace created successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Create a workspace
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: create
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /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.
+ operationId: deleteWorkspace
+ parameters:
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The workspace ID (UUID) or slug
+ example: production
+ minLength: 1
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ deleted: true
+ schema:
+ $ref: '#/components/schemas/DeleteWorkspaceResponse'
+ description: Workspace deleted successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Delete a workspace
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: delete
+ get:
+ description: Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getWorkspace
+ parameters:
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The workspace ID (UUID) or slug
+ example: production
+ minLength: 1
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Production
+ slug: production
+ updated_at: '2025-08-24T15:45:00Z'
+ schema:
+ $ref: '#/components/schemas/GetWorkspaceResponse'
+ description: Workspace details
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Get a workspace
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: get
+ patch:
+ description: >-
+ Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: updateWorkspace
+ parameters:
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The workspace ID (UUID) or slug
+ example: production
+ minLength: 1
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ name: Updated Workspace
+ slug: updated-workspace
+ schema:
+ $ref: '#/components/schemas/UpdateWorkspaceRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ created_at: '2025-08-24T10:30:00Z'
+ created_by: user_abc123
+ default_image_model: openai/dall-e-3
+ default_provider_sort: price
+ default_text_model: openai/gpt-4o
+ description: Production environment workspace
+ id: 550e8400-e29b-41d4-a716-446655440000
+ io_logging_api_key_ids: null
+ io_logging_sampling_rate: 1
+ is_data_discount_logging_enabled: true
+ is_observability_broadcast_enabled: false
+ is_observability_io_logging_enabled: false
+ name: Updated Workspace
+ slug: updated-workspace
+ updated_at: '2025-08-25T10:00:00Z'
+ schema:
+ $ref: '#/components/schemas/UpdateWorkspaceResponse'
+ description: Workspace updated successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Update a workspace
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: update
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /workspaces/{id}/members/add:
+ post:
+ description: >-
+ Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: bulkAddWorkspaceMembers
+ parameters:
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The workspace ID (UUID) or slug
+ example: production
+ minLength: 1
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ user_ids:
+ - user_abc123
+ - user_def456
+ schema:
+ $ref: '#/components/schemas/BulkAddWorkspaceMembersRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ added_count: 1
+ data:
+ - created_at: '2025-08-24T10:30:00Z'
+ id: 660e8400-e29b-41d4-a716-446655440000
+ role: member
+ user_id: user_abc123
+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
+ schema:
+ $ref: '#/components/schemas/BulkAddWorkspaceMembersResponse'
+ description: Members added successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Bulk add members to a workspace
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: bulkAddMembers
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /workspaces/{id}/members/remove:
+ post:
+ description: >-
+ Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: bulkRemoveWorkspaceMembers
+ parameters:
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The workspace ID (UUID) or slug
+ example: production
+ minLength: 1
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ user_ids:
+ - user_abc123
+ - user_def456
+ schema:
+ $ref: '#/components/schemas/BulkRemoveWorkspaceMembersRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ removed_count: 2
+ schema:
+ $ref: '#/components/schemas/BulkRemoveWorkspaceMembersResponse'
+ description: Members removed successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Bulk remove members from a workspace
+ tags:
+ - Workspaces
+ x-speakeasy-name-override: bulkRemoveMembers
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
security:
- apiKey: []
servers:
@@ -19576,10 +30654,14 @@ tags:
name: Analytics
- description: Anthropic Messages endpoints
name: Anthropic Messages
+ - description: BYOK endpoints
+ name: BYOK
- description: Chat completion endpoints
name: Chat
- description: Credit management endpoints
name: Credits
+ - description: Datasets endpoints
+ name: Datasets
- description: Text embedding endpoints
name: Embeddings
- description: Endpoint information
@@ -19592,17 +30674,30 @@ tags:
name: Models
- description: OAuth authentication endpoints
name: OAuth
+ - description: Observability endpoints
+ name: Observability
- description: Organization endpoints
name: Organization
+ - description: Presets endpoints
+ name: Presets
- description: Provider information endpoints
name: Providers
- description: Rerank endpoints
name: Rerank
+ - description: Speech-to-text endpoints
+ name: STT
+ x-displayName: Transcriptions
+ - description: Text-to-speech endpoints
+ name: TTS
+ x-displayName: Speech
- description: Video Generation endpoints
name: Video Generation
+ - description: Workspaces endpoints
+ name: Workspaces
+ - description: beta.Analytics endpoints
+ name: beta.Analytics
- description: beta.responses endpoints
name: beta.responses
-x-fern-base-path: /
x-retry-strategy:
initialDelay: 500
maxAttempts: 3
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 8be4494..8d478ad 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -1,23 +1,24 @@
-speakeasyVersion: 1.763.2
+speakeasyVersion: 1.680.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9
- sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f
+ sourceRevisionDigest: sha256:08108f43d4fba1406b4c8f624792054965c95a14819f442262663cb25ce6cc25
+ sourceBlobDigest: sha256:47fc5915e6a9ff29fca019515d6491adce926407ebb47cee480feb77cfb68f03
tags:
- latest
+ - speakeasy-sdk-regen-1776991284
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9
- sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f
+ sourceRevisionDigest: sha256:08108f43d4fba1406b4c8f624792054965c95a14819f442262663cb25ce6cc25
+ sourceBlobDigest: sha256:47fc5915e6a9ff29fca019515d6491adce926407ebb47cee480feb77cfb68f03
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:db86aed74d199f265e2e20442ef652dac0911c8a657ccb3e6614d56a26b8b44e
+ codeSamplesRevisionDigest: sha256:3c7b0aef799130660fd4017ab9113e6fd3e06a80cff6a540043b9b34dc22facf
workflow:
workflowVersion: 1.0.0
- speakeasyVersion: 1.763.2
+ speakeasyVersion: 1.680.0
sources:
OpenRouter API:
inputs:
diff --git a/README-PYPI.md b/README-PYPI.md
index 5f7e784..eb6cb3e 100644
--- a/README-PYPI.md
+++ b/README-PYPI.md
@@ -169,6 +169,36 @@ asyncio.run(main())
+
+## Pagination
+
+Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
+returned response object will have a `Next` method that can be called to pull down the next group of results. If the
+return value of `Next` is `None`, then there are no more pages to be fetched.
+
+Here's an example of one such pagination call:
+```python
+from openrouter import OpenRouter
+import os
+
+
+with OpenRouter(
+ http_referer="",
+ x_open_router_title="",
+ x_open_router_categories="",
+ api_key=os.getenv("OPENROUTER_API_KEY", ""),
+) as open_router:
+
+ res = open_router.byok.list()
+
+ while res is not None:
+ # Handle items
+
+ res = res.next()
+
+```
+
+
## Resource Management
diff --git a/README.md b/README.md
index 35f11f1..eb6cb3e 100644
--- a/README.md
+++ b/README.md
@@ -189,7 +189,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.guardrails.list()
+ res = open_router.byok.list()
while res is not None:
# Handle items
diff --git a/RELEASES.md b/RELEASES.md
index 0d0d01f..a5b6b37 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -8,4 +8,14 @@ Based on:
### Generated
- [python v0.0.16] .
### Releases
-- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
\ No newline at end of file
+- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
+
+## 2026-06-11 00:55:55
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.9.2] .
+### Releases
+- [PyPI v0.9.2] https://pypi.org/project/openrouter/0.9.2 - .
\ No newline at end of file
diff --git a/docs/components/costdetails.md b/docs/components/costdetails.md
index ada009c..58a1aa8 100644
--- a/docs/components/costdetails.md
+++ b/docs/components/costdetails.md
@@ -1,10 +1,12 @@
# CostDetails
+Breakdown of upstream inference costs
+
## Fields
-| Field | Type | Required | Description |
-| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
-| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-| `upstream_inference_input_cost` | *float* | :heavy_check_mark: | N/A |
-| `upstream_inference_output_cost` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
+| `upstream_inference_completions_cost` | *float* | :heavy_check_mark: | N/A |
+| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
+| `upstream_inference_prompt_cost` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/data.md b/docs/components/data.md
deleted file mode 100644
index 386321b..0000000
--- a/docs/components/data.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Data
-
-Model count data
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
-| `count` | *int* | :heavy_check_mark: | Total number of available models | 150 |
\ No newline at end of file
diff --git a/docs/components/effort.md b/docs/components/effort.md
deleted file mode 100644
index b23f0fb..0000000
--- a/docs/components/effort.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Effort
-
-Constrains effort on reasoning for reasoning models
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `XHIGH` | xhigh |
-| `HIGH` | high |
-| `MEDIUM` | medium |
-| `LOW` | low |
-| `MINIMAL` | minimal |
-| `NONE` | none |
\ No newline at end of file
diff --git a/docs/components/model.md b/docs/components/model.md
index 106eb5c..55f6fe4 100644
--- a/docs/components/model.md
+++ b/docs/components/model.md
@@ -22,4 +22,5 @@ Information about an AI model available on OpenRouter
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"completion_tokens": 1000,
"prompt_tokens": 1000
} |
| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
} |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
+| `supported_voices` | List[*str*] | :heavy_check_mark: | List of supported voice identifiers for TTS models. Null for non-TTS models. | |
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
} |
\ No newline at end of file
diff --git a/docs/components/modelscountresponse.md b/docs/components/modelscountresponse.md
index 84bbce8..4ad6e6a 100644
--- a/docs/components/modelscountresponse.md
+++ b/docs/components/modelscountresponse.md
@@ -5,6 +5,6 @@ Model count data
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
-| `data` | [components.Data](../components/data.md) | :heavy_check_mark: | Model count data | {
"count": 150
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `data` | [components.ModelsCountResponseData](../components/modelscountresponsedata.md) | :heavy_check_mark: | Model count data | {
"count": 150
} |
\ No newline at end of file
diff --git a/docs/components/modelslistresponse.md b/docs/components/modelslistresponse.md
index fb5d458..04b43f5 100644
--- a/docs/components/modelslistresponse.md
+++ b/docs/components/modelslistresponse.md
@@ -5,6 +5,6 @@ List of available models
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models | [
{
"architecture": {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"top_provider": {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models | [
{
"architecture": {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] |
\ No newline at end of file
diff --git a/docs/components/openairesponsestoolchoiceunion.md b/docs/components/openairesponsestoolchoiceunion.md
index 7e503bb..15e1482 100644
--- a/docs/components/openairesponsestoolchoiceunion.md
+++ b/docs/components/openairesponsestoolchoiceunion.md
@@ -39,3 +39,15 @@ value: components.OpenAIResponsesToolChoice = /* values here */
value: components.ToolChoiceAllowed = /* values here */
```
+### `components.OpenAIResponsesToolChoiceApplyPatch`
+
+```python
+value: components.OpenAIResponsesToolChoiceApplyPatch = /* values here */
+```
+
+### `components.OpenAIResponsesToolChoiceShell`
+
+```python
+value: components.OpenAIResponsesToolChoiceShell = /* values here */
+```
+
diff --git a/docs/components/outputmodality.md b/docs/components/outputmodality.md
index 7b8edcf..2e0633e 100644
--- a/docs/components/outputmodality.md
+++ b/docs/components/outputmodality.md
@@ -3,11 +3,13 @@
## Values
-| Name | Value |
-| ------------ | ------------ |
-| `TEXT` | text |
-| `IMAGE` | image |
-| `EMBEDDINGS` | embeddings |
-| `AUDIO` | audio |
-| `VIDEO` | video |
-| `RERANK` | rerank |
\ No newline at end of file
+| Name | Value |
+| --------------- | --------------- |
+| `TEXT` | text |
+| `IMAGE` | image |
+| `EMBEDDINGS` | embeddings |
+| `AUDIO` | audio |
+| `VIDEO` | video |
+| `RERANK` | rerank |
+| `SPEECH` | speech |
+| `TRANSCRIPTION` | transcription |
\ No newline at end of file
diff --git a/docs/components/providername.md b/docs/components/providername.md
index 22effdd..e27624b 100644
--- a/docs/components/providername.md
+++ b/docs/components/providername.md
@@ -10,6 +10,7 @@
| `AION_LABS` | AionLabs |
| `ALIBABA` | Alibaba |
| `AMBIENT` | Ambient |
+| `BAIDU` | Baidu |
| `AMAZON_BEDROCK` | Amazon Bedrock |
| `AMAZON_NOVA` | Amazon Nova |
| `ANTHROPIC` | Anthropic |
@@ -26,10 +27,14 @@
| `CLARIFAI` | Clarifai |
| `CLOUDFLARE` | Cloudflare |
| `COHERE` | Cohere |
+| `CRUCIBLE` | Crucible |
| `CRUSOE` | Crusoe |
+| `DARKBLOOM` | Darkbloom |
+| `DECART` | Decart |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
| `DEKA_LLM` | DekaLLM |
+| `DIGITAL_OCEAN` | DigitalOcean |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
@@ -37,7 +42,6 @@
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
-| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
@@ -56,12 +60,15 @@
| `MORPH` | Morph |
| `N_COMPASS` | NCompass |
| `NEBIUS` | Nebius |
+| `NEX_AGI` | Nex AGI |
| `NEXT_BIT` | NextBit |
| `NOVITA` | Novita |
| `NVIDIA` | Nvidia |
| `OPEN_AI` | OpenAI |
| `OPEN_INFERENCE` | OpenInference |
| `PARASAIL` | Parasail |
+| `POOLSIDE` | Poolside |
+| `PERCEPTRON` | Perceptron |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
| `RECRAFT` | Recraft |
@@ -78,6 +85,7 @@
| `TOGETHER` | Together |
| `UPSTAGE` | Upstage |
| `VENICE` | Venice |
+| `WAFER` | Wafer |
| `WAND_B` | WandB |
| `XIAOMI` | Xiaomi |
| `X_AI` | xAI |
diff --git a/docs/components/reasoning.md b/docs/components/reasoning.md
deleted file mode 100644
index a56f26b..0000000
--- a/docs/components/reasoning.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Reasoning
-
-Configuration options for reasoning models
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
-| `effort` | [OptionalNullable[components.Effort]](../components/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium |
-| `summary` | [OptionalNullable[components.ChatReasoningSummaryVerbosityEnum]](../components/chatreasoningsummaryverbosityenum.md) | :heavy_minus_sign: | N/A | concise |
\ No newline at end of file
diff --git a/docs/errors/badgatewayresponseerror.md b/docs/errors/badgatewayresponseerror.md
index 54c51b9..5bd359e 100644
--- a/docs/errors/badgatewayresponseerror.md
+++ b/docs/errors/badgatewayresponseerror.md
@@ -8,4 +8,5 @@ Bad Gateway - Provider/upstream API failure
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `error` | [components.BadGatewayResponseErrorData](../components/badgatewayresponseerrordata.md) | :heavy_check_mark: | Error data for BadGatewayResponse | {
"code": 502,
"message": "Provider returned error"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/badrequestresponseerror.md b/docs/errors/badrequestresponseerror.md
index b7ca5ac..6bb5d84 100644
--- a/docs/errors/badrequestresponseerror.md
+++ b/docs/errors/badrequestresponseerror.md
@@ -8,4 +8,5 @@ Bad Request - Invalid request parameters or malformed input
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `error` | [components.BadRequestResponseErrorData](../components/badrequestresponseerrordata.md) | :heavy_check_mark: | Error data for BadRequestResponse | {
"code": 400,
"message": "Invalid request parameters"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/edgenetworktimeoutresponseerror.md b/docs/errors/edgenetworktimeoutresponseerror.md
index b12eb06..3720bcc 100644
--- a/docs/errors/edgenetworktimeoutresponseerror.md
+++ b/docs/errors/edgenetworktimeoutresponseerror.md
@@ -8,4 +8,5 @@ Infrastructure Timeout - Provider request timed out at edge network
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `error` | [components.EdgeNetworkTimeoutResponseErrorData](../components/edgenetworktimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for EdgeNetworkTimeoutResponse | {
"code": 524,
"message": "Request timed out. Please try again later."
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/forbiddenresponseerror.md b/docs/errors/forbiddenresponseerror.md
index 290d3a4..8015439 100644
--- a/docs/errors/forbiddenresponseerror.md
+++ b/docs/errors/forbiddenresponseerror.md
@@ -8,4 +8,5 @@ Forbidden - Authentication successful but insufficient permissions
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {
"code": 403,
"message": "Only management keys can perform this operation"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/internalserverresponseerror.md b/docs/errors/internalserverresponseerror.md
index b625175..5db18a9 100644
--- a/docs/errors/internalserverresponseerror.md
+++ b/docs/errors/internalserverresponseerror.md
@@ -8,4 +8,5 @@ Internal Server Error - Unexpected server error
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `error` | [components.InternalServerResponseErrorData](../components/internalserverresponseerrordata.md) | :heavy_check_mark: | Error data for InternalServerResponse | {
"code": 500,
"message": "Internal Server Error"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/notfoundresponseerror.md b/docs/errors/notfoundresponseerror.md
index 80d0191..3f37747 100644
--- a/docs/errors/notfoundresponseerror.md
+++ b/docs/errors/notfoundresponseerror.md
@@ -8,4 +8,5 @@ Not Found - Resource does not exist
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `error` | [components.NotFoundResponseErrorData](../components/notfoundresponseerrordata.md) | :heavy_check_mark: | Error data for NotFoundResponse | {
"code": 404,
"message": "Resource not found"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/payloadtoolargeresponseerror.md b/docs/errors/payloadtoolargeresponseerror.md
index 322cefe..5027338 100644
--- a/docs/errors/payloadtoolargeresponseerror.md
+++ b/docs/errors/payloadtoolargeresponseerror.md
@@ -8,4 +8,5 @@ Payload Too Large - Request payload exceeds size limits
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `error` | [components.PayloadTooLargeResponseErrorData](../components/payloadtoolargeresponseerrordata.md) | :heavy_check_mark: | Error data for PayloadTooLargeResponse | {
"code": 413,
"message": "Request payload too large"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/paymentrequiredresponseerror.md b/docs/errors/paymentrequiredresponseerror.md
index 1cf4c3f..9743189 100644
--- a/docs/errors/paymentrequiredresponseerror.md
+++ b/docs/errors/paymentrequiredresponseerror.md
@@ -8,4 +8,5 @@ Payment Required - Insufficient credits or quota to complete request
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `error` | [components.PaymentRequiredResponseErrorData](../components/paymentrequiredresponseerrordata.md) | :heavy_check_mark: | Error data for PaymentRequiredResponse | {
"code": 402,
"message": "Insufficient credits. Add more using https://openrouter.ai/credits"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/provideroverloadedresponseerror.md b/docs/errors/provideroverloadedresponseerror.md
index 9eff488..7a2e578 100644
--- a/docs/errors/provideroverloadedresponseerror.md
+++ b/docs/errors/provideroverloadedresponseerror.md
@@ -8,4 +8,5 @@ Provider Overloaded - Provider is temporarily overloaded
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `error` | [components.ProviderOverloadedResponseErrorData](../components/provideroverloadedresponseerrordata.md) | :heavy_check_mark: | Error data for ProviderOverloadedResponse | {
"code": 529,
"message": "Provider returned error"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/requesttimeoutresponseerror.md b/docs/errors/requesttimeoutresponseerror.md
index 4f5d8f7..4029799 100644
--- a/docs/errors/requesttimeoutresponseerror.md
+++ b/docs/errors/requesttimeoutresponseerror.md
@@ -8,4 +8,5 @@ Request Timeout - Operation exceeded time limit
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `error` | [components.RequestTimeoutResponseErrorData](../components/requesttimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for RequestTimeoutResponse | {
"code": 408,
"message": "Operation timed out. Please try again later."
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/serviceunavailableresponseerror.md b/docs/errors/serviceunavailableresponseerror.md
index ecd703a..ac2fed9 100644
--- a/docs/errors/serviceunavailableresponseerror.md
+++ b/docs/errors/serviceunavailableresponseerror.md
@@ -8,4 +8,5 @@ Service Unavailable - Service temporarily unavailable
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `error` | [components.ServiceUnavailableResponseErrorData](../components/serviceunavailableresponseerrordata.md) | :heavy_check_mark: | Error data for ServiceUnavailableResponse | {
"code": 503,
"message": "Service temporarily unavailable"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/toomanyrequestsresponseerror.md b/docs/errors/toomanyrequestsresponseerror.md
index d03ed75..294f695 100644
--- a/docs/errors/toomanyrequestsresponseerror.md
+++ b/docs/errors/toomanyrequestsresponseerror.md
@@ -8,4 +8,5 @@ Too Many Requests - Rate limit exceeded
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `error` | [components.TooManyRequestsResponseErrorData](../components/toomanyrequestsresponseerrordata.md) | :heavy_check_mark: | Error data for TooManyRequestsResponse | {
"code": 429,
"message": "Rate limit exceeded"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/unauthorizedresponseerror.md b/docs/errors/unauthorizedresponseerror.md
index 7dd7744..50d78da 100644
--- a/docs/errors/unauthorizedresponseerror.md
+++ b/docs/errors/unauthorizedresponseerror.md
@@ -8,4 +8,5 @@ Unauthorized - Authentication required or invalid credentials
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `error` | [components.UnauthorizedResponseErrorData](../components/unauthorizedresponseerrordata.md) | :heavy_check_mark: | Error data for UnauthorizedResponse | {
"code": 401,
"message": "Missing Authentication header"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/errors/unprocessableentityresponseerror.md b/docs/errors/unprocessableentityresponseerror.md
index 33f001c..77b5572 100644
--- a/docs/errors/unprocessableentityresponseerror.md
+++ b/docs/errors/unprocessableentityresponseerror.md
@@ -8,4 +8,5 @@ Unprocessable Entity - Semantic validation failure
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `error` | [components.UnprocessableEntityResponseErrorData](../components/unprocessableentityresponseerrordata.md) | :heavy_check_mark: | Error data for UnprocessableEntityResponse | {
"code": 422,
"message": "Invalid argument"
} |
+| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/docs/operations/apitype.md b/docs/operations/apitype.md
deleted file mode 100644
index ffff0b9..0000000
--- a/docs/operations/apitype.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# APIType
-
-Type of API used for the generation
-
-
-## Values
-
-| Name | Value |
-| ------------- | ------------- |
-| `COMPLETIONS` | completions |
-| `EMBEDDINGS` | embeddings |
-| `RERANK` | rerank |
-| `VIDEO` | video |
\ No newline at end of file
diff --git a/docs/operations/category.md b/docs/operations/category.md
deleted file mode 100644
index f0fa9d7..0000000
--- a/docs/operations/category.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Category
-
-Filter models by use case category
-
-
-## Values
-
-| Name | Value |
-| --------------- | --------------- |
-| `PROGRAMMING` | programming |
-| `ROLEPLAY` | roleplay |
-| `MARKETING` | marketing |
-| `MARKETING_SEO` | marketing/seo |
-| `TECHNOLOGY` | technology |
-| `SCIENCE` | science |
-| `TRANSLATION` | translation |
-| `LEGAL` | legal |
-| `FINANCE` | finance |
-| `HEALTH` | health |
-| `TRIVIA` | trivia |
-| `ACADEMIA` | academia |
\ No newline at end of file
diff --git a/docs/operations/content.md b/docs/operations/content.md
index 727997f..22aef15 100644
--- a/docs/operations/content.md
+++ b/docs/operations/content.md
@@ -15,3 +15,21 @@ value: operations.ContentText = /* values here */
value: operations.ContentImageURL = /* values here */
```
+### `components.ContentPartInputAudio`
+
+```python
+value: components.ContentPartInputAudio = /* values here */
+```
+
+### `components.ContentPartInputVideo`
+
+```python
+value: components.ContentPartInputVideo = /* values here */
+```
+
+### `components.ContentPartInputFile`
+
+```python
+value: components.ContentPartInputFile = /* values here */
+```
+
diff --git a/docs/operations/createguardrailrequest.md b/docs/operations/createguardrailrequest.md
index 5a414e2..74958a2 100644
--- a/docs/operations/createguardrailrequest.md
+++ b/docs/operations/createguardrailrequest.md
@@ -3,9 +3,9 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.md) | :heavy_check_mark: | N/A | {
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"description": "A guardrail for limiting API usage",
"enforce_zdr": false,
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.md) | :heavy_check_mark: | N/A | {
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"content_filter_builtins": [
{
"action": "block",
"slug": "regex-prompt-injection"
}
],
"content_filters": null,
"description": "A guardrail for limiting API usage",
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} |
\ No newline at end of file
diff --git a/docs/operations/createkeysdata.md b/docs/operations/createkeysdata.md
index f51f201..e60eaf9 100644
--- a/docs/operations/createkeysdata.md
+++ b/docs/operations/createkeysdata.md
@@ -26,4 +26,5 @@ The created API key information
| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
-| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
\ No newline at end of file
+| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
+| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/createkeysrequestbody.md b/docs/operations/createkeysrequestbody.md
index a384fab..e63e997 100644
--- a/docs/operations/createkeysrequestbody.md
+++ b/docs/operations/createkeysrequestbody.md
@@ -10,4 +10,5 @@
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 |
| `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
-| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
\ No newline at end of file
+| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/createkeysresponse.md b/docs/operations/createkeysresponse.md
index e749075..91744f3 100644
--- a/docs/operations/createkeysresponse.md
+++ b/docs/operations/createkeysresponse.md
@@ -5,7 +5,7 @@ API key created successfully
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} |
-| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5,
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
+| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 |
\ No newline at end of file
diff --git a/docs/operations/createresponsesrequest.md b/docs/operations/createresponsesrequest.md
index 479750c..87238b0 100644
--- a/docs/operations/createresponsesrequest.md
+++ b/docs/operations/createresponsesrequest.md
@@ -8,4 +8,5 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
| `responses_request` | [components.ResponsesRequest](../components/responsesrequest.md) | :heavy_check_mark: | N/A | {
"input": [
{
"content": "Hello, how are you?",
"role": "user",
"type": "message"
}
],
"model": "anthropic/claude-4.5-sonnet-20250929",
"temperature": 0.7,
"tools": [
{
"description": "Get the current weather in a given location",
"name": "get_current_weather",
"parameters": {
"properties": {
"location": {
"type": "string"
}
},
"type": "object"
},
"type": "function"
}
],
"top_p": 0.9
} |
\ No newline at end of file
diff --git a/docs/operations/createresponsesresponsebody.md b/docs/operations/createresponsesresponsebody.md
deleted file mode 100644
index b6dddbc..0000000
--- a/docs/operations/createresponsesresponsebody.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# CreateResponsesResponseBody
-
-Successful response
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.StreamEvents](../components/streamevents.md) | :heavy_check_mark: | Union of all possible event types emitted during response streaming | {
"response": {
"created_at": 1704067200,
"error": null,
"id": "resp-abc123",
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"metadata": null,
"model": "gpt-4",
"object": "response",
"output": [],
"parallel_tool_calls": true,
"status": "in_progress",
"temperature": null,
"tool_choice": "auto",
"tools": [],
"top_p": null
},
"sequence_number": 0,
"type": "response.created"
} |
\ No newline at end of file
diff --git a/docs/operations/getgenerationdata.md b/docs/operations/getgenerationdata.md
deleted file mode 100644
index 7be5766..0000000
--- a/docs/operations/getgenerationdata.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# GetGenerationData
-
-Generation data
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | |
-| `app_id` | *Nullable[int]* | :heavy_check_mark: | ID of the app that made the request | 12345 |
-| `cache_discount` | *Nullable[float]* | :heavy_check_mark: | Discount applied due to caching | 0.0002 |
-| `cancelled` | *Nullable[bool]* | :heavy_check_mark: | Whether the generation was cancelled | false |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 |
-| `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 |
-| `finish_reason` | *Nullable[str]* | :heavy_check_mark: | Reason the generation finished | stop |
-| `generation_time` | *Nullable[float]* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 |
-| `http_referer` | *Nullable[str]* | :heavy_check_mark: | Referer header from the request | |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG |
-| `is_byok` | *bool* | :heavy_check_mark: | Whether this used bring-your-own-key | false |
-| `latency` | *Nullable[float]* | :heavy_check_mark: | Total latency in milliseconds | 1250 |
-| `model` | *str* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b |
-| `moderation_latency` | *Nullable[float]* | :heavy_check_mark: | Moderation latency in milliseconds | 50 |
-| `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop |
-| `native_tokens_cached` | *Nullable[int]* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 |
-| `native_tokens_completion` | *Nullable[int]* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 |
-| `native_tokens_completion_images` | *Nullable[int]* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 |
-| `native_tokens_prompt` | *Nullable[int]* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 |
-| `native_tokens_reasoning` | *Nullable[int]* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 |
-| `num_input_audio_prompt` | *Nullable[int]* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 |
-| `num_media_completion` | *Nullable[int]* | :heavy_check_mark: | Number of media items in the completion | 0 |
-| `num_media_prompt` | *Nullable[int]* | :heavy_check_mark: | Number of media items in the prompt | 1 |
-| `num_search_results` | *Nullable[int]* | :heavy_check_mark: | Number of search results included | 5 |
-| `origin` | *str* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ |
-| `provider_name` | *Nullable[str]* | :heavy_check_mark: | Name of the provider that served the request | Infermatic |
-| `provider_responses` | List[[components.ProviderResponse](../components/providerresponse.md)] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | |
-| `request_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier grouping all generations from a single API request | req-1727282430-aBcDeFgHiJkLmNoPqRsT |
-| `router` | *Nullable[str]* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto |
-| `session_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Session identifier grouping multiple generations in the same session | |
-| `streamed` | *Nullable[bool]* | :heavy_check_mark: | Whether the response was streamed | true |
-| `tokens_completion` | *Nullable[int]* | :heavy_check_mark: | Number of tokens in the completion | 25 |
-| `tokens_prompt` | *Nullable[int]* | :heavy_check_mark: | Number of tokens in the prompt | 10 |
-| `total_cost` | *float* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 |
-| `upstream_id` | *Nullable[str]* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 |
-| `upstream_inference_cost` | *Nullable[float]* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 |
-| `usage` | *float* | :heavy_check_mark: | Usage amount in USD | 0.0015 |
-| `user_agent` | *Nullable[str]* | :heavy_check_mark: | User-Agent header from the request | |
\ No newline at end of file
diff --git a/docs/operations/getgenerationresponse.md b/docs/operations/getgenerationresponse.md
deleted file mode 100644
index 989c19a..0000000
--- a/docs/operations/getgenerationresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# GetGenerationResponse
-
-Generation response
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
-| `data` | [operations.GetGenerationData](../operations/getgenerationdata.md) | :heavy_check_mark: | Generation data |
\ No newline at end of file
diff --git a/docs/operations/getkeydata.md b/docs/operations/getkeydata.md
index 5ba4a1f..c5a3db6 100644
--- a/docs/operations/getkeydata.md
+++ b/docs/operations/getkeydata.md
@@ -26,4 +26,5 @@ The API key information
| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
-| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
\ No newline at end of file
+| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
+| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/getkeyresponse.md b/docs/operations/getkeyresponse.md
index 7959a40..72e8055 100644
--- a/docs/operations/getkeyresponse.md
+++ b/docs/operations/getkeyresponse.md
@@ -5,6 +5,6 @@ API key details
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5,
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
diff --git a/docs/operations/getmodelsrequest.md b/docs/operations/getmodelsrequest.md
index afb02bf..8fa79b3 100644
--- a/docs/operations/getmodelsrequest.md
+++ b/docs/operations/getmodelsrequest.md
@@ -3,11 +3,12 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
-| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
-| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `category` | [Optional[operations.GetModelsCategory]](../operations/getmodelscategory.md) | :heavy_minus_sign: | Filter models by use case category | programming |
+| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
+| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
+| `sort` | [Optional[operations.GetModelsSort]](../operations/getmodelssort.md) | :heavy_minus_sign: | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved. | newest |
\ No newline at end of file
diff --git a/docs/operations/listdata.md b/docs/operations/listdata.md
index d8fcbe3..d2a0b36 100644
--- a/docs/operations/listdata.md
+++ b/docs/operations/listdata.md
@@ -24,4 +24,5 @@
| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
-| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
\ No newline at end of file
+| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
+| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/listguardrailsrequest.md b/docs/operations/listguardrailsrequest.md
index 65946b1..e6f8126 100644
--- a/docs/operations/listguardrailsrequest.md
+++ b/docs/operations/listguardrailsrequest.md
@@ -9,4 +9,5 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
\ No newline at end of file
+| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/listguardrailsresponse.md b/docs/operations/listguardrailsresponse.md
index 3046aeb..c2e3510 100644
--- a/docs/operations/listguardrailsresponse.md
+++ b/docs/operations/listguardrailsresponse.md
@@ -3,6 +3,6 @@
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `result` | [components.ListGuardrailsResponse](../components/listguardrailsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z"
}
],
"total_count": 1
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.ListGuardrailsResponse](../components/listguardrailsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"allowed_models": null,
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"content_filter_builtins": [
{
"action": "redact",
"label": "[EMAIL]",
"slug": "email"
}
],
"content_filters": null,
"created_at": "2025-08-24T10:30:00Z",
"description": "Guardrail for production environment",
"enforce_zdr": null,
"enforce_zdr_anthropic": true,
"enforce_zdr_google": false,
"enforce_zdr_openai": true,
"enforce_zdr_other": false,
"id": "550e8400-e29b-41d4-a716-446655440000",
"ignored_models": null,
"ignored_providers": null,
"limit_usd": 100,
"name": "Production Guardrail",
"reset_interval": "monthly",
"updated_at": "2025-08-24T15:45:00Z",
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
}
],
"total_count": 1
} |
\ No newline at end of file
diff --git a/docs/operations/listrequest.md b/docs/operations/listrequest.md
index 5507b0a..a5646bd 100644
--- a/docs/operations/listrequest.md
+++ b/docs/operations/listrequest.md
@@ -9,4 +9,5 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
| `include_disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
-| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
\ No newline at end of file
+| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter API keys by workspace ID. By default, keys in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/sendchatcompletionrequestrequest.md b/docs/operations/sendchatcompletionrequestrequest.md
index f0a096f..bcb4bc4 100644
--- a/docs/operations/sendchatcompletionrequestrequest.md
+++ b/docs/operations/sendchatcompletionrequestrequest.md
@@ -8,4 +8,5 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
| `chat_request` | [components.ChatRequest](../components/chatrequest.md) | :heavy_check_mark: | N/A | {
"max_tokens": 150,
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "What is the capital of France?",
"role": "user"
}
],
"model": "openai/gpt-4",
"temperature": 0.7
} |
\ No newline at end of file
diff --git a/docs/operations/sendchatcompletionrequestresponsebody.md b/docs/operations/sendchatcompletionrequestresponsebody.md
deleted file mode 100644
index ff4ce98..0000000
--- a/docs/operations/sendchatcompletionrequestresponsebody.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# SendChatCompletionRequestResponseBody
-
-Successful chat completion response
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.ChatStreamChunk](../components/chatstreamchunk.md) | :heavy_check_mark: | Streaming chat completion chunk | {
"choices": [
{
"delta": {
"content": "Hello",
"role": "assistant"
},
"finish_reason": null,
"index": 0
}
],
"created": 1677652288,
"id": "chatcmpl-123",
"model": "openai/gpt-4",
"object": "chat.completion.chunk"
} |
\ No newline at end of file
diff --git a/docs/operations/updatekeysdata.md b/docs/operations/updatekeysdata.md
index 499598c..f1ef382 100644
--- a/docs/operations/updatekeysdata.md
+++ b/docs/operations/updatekeysdata.md
@@ -26,4 +26,5 @@ The updated API key information
| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
-| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
\ No newline at end of file
+| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
+| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this API key belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
\ No newline at end of file
diff --git a/docs/operations/updatekeysresponse.md b/docs/operations/updatekeysresponse.md
index c1dde7c..8b5ef1f 100644
--- a/docs/operations/updatekeysresponse.md
+++ b/docs/operations/updatekeysresponse.md
@@ -5,6 +5,6 @@ API key updated successfully
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"disabled": false,
"expires_at": "2027-12-31T23:59:59Z",
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"include_byok_in_limit": false,
"label": "sk-or-v1-0e6...1c96",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"name": "My Production Key",
"updated_at": "2025-08-24T15:45:00Z",
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5,
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
} |
\ No newline at end of file
diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md
index 0e6da85..6e72f51 100644
--- a/docs/sdks/apikeys/README.md
+++ b/docs/sdks/apikeys/README.md
@@ -95,6 +95,7 @@ with OpenRouter(
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
| `include_disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter API keys by workspace ID. By default, keys in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -150,6 +151,7 @@ with OpenRouter(
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 |
| `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -162,6 +164,7 @@ with OpenRouter(
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.ForbiddenResponseError | 403 | application/json |
| errors.TooManyRequestsResponseError | 429 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md
index 03d623c..6ef1960 100644
--- a/docs/sdks/chat/README.md
+++ b/docs/sdks/chat/README.md
@@ -34,7 +34,7 @@ with OpenRouter(
"content": "What is the capital of France?",
"role": "user",
},
- ], max_tokens=150, model="openai/gpt-4", stream=False, temperature=0.7)
+ ], x_open_router_metadata="enabled", max_tokens=150, model="openai/gpt-4", stream=False, temperature=0.7)
with res as event_stream:
for event in event_stream:
@@ -45,44 +45,46 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `messages` | List[[components.ChatMessages](../../components/chatmessages.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"content": "Hello!",
"role": "user"
}
] |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.md) | :heavy_minus_sign: | N/A | {
"type": "ephemeral"
} |
-| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} |
-| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 |
-| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9",
"quality": "high"
} |
-| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | {
"50256": -100
} |
-| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | false |
-| `max_completion_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum tokens in completion | 100 |
-| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. | 100 |
-| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"session_id": "session-456",
"user_id": "user-123"
} |
-| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text", "image", and "audio". | [
"text",
"image"
] |
-| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | openai/gpt-4 |
-| `models` | List[*str*] | :heavy_minus_sign: | Models to use for completion | [
"openai/gpt-4",
"openai/gpt-4o"
] |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. | true |
-| `plugins` | List[[components.ChatRequestPlugin](../../components/chatrequestplugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
-| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 |
-| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | {
"allow_fallbacks": true
} |
-| `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | Configuration options for reasoning models | {
"effort": "medium",
"summary": "concise"
} |
-| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | Response format configuration | {
"type": "json_object"
} |
-| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | 42 |
-| `service_tier` | [OptionalNullable[components.ChatRequestServiceTier]](../../components/chatrequestservicetier.md) | :heavy_minus_sign: | The service tier to use for processing this request. | auto |
-| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | [
""
] |
-| `stream` | *Optional[bool]* | :heavy_minus_sign: | Enable streaming response | false |
-| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | Streaming configuration options | {
"include_usage": true
} |
-| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 |
-| `tool_choice` | [Optional[components.ChatToolChoice]](../../components/chattoolchoice.md) | :heavy_minus_sign: | Tool choice configuration | auto |
-| `tools` | List[[components.ChatFunctionTool](../../components/chatfunctiontool.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"function": {
"description": "Get weather",
"name": "get_weather"
},
"type": "function"
}
] |
-| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 |
-| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 |
-| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
-| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | user-123 |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `messages` | List[[components.ChatMessages](../../components/chatmessages.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"content": "Hello!",
"role": "user"
}
] |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
+| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | {
"type": "ephemeral"
} |
+| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} |
+| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 |
+| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9",
"quality": "high"
} |
+| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | {
"50256": -100
} |
+| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | false |
+| `max_completion_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum tokens in completion | 100 |
+| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. | 100 |
+| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"session_id": "session-456",
"user_id": "user-123"
} |
+| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text", "image", and "audio". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | openai/gpt-4 |
+| `models` | List[*str*] | :heavy_minus_sign: | Models to use for completion | [
"openai/gpt-4",
"openai/gpt-4o"
] |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. | true |
+| `plugins` | List[[components.ChatRequestPlugin](../../components/chatrequestplugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | {
"allow_fallbacks": true
} |
+| `reasoning` | [Optional[components.ChatRequestReasoning]](../../components/chatrequestreasoning.md) | :heavy_minus_sign: | Configuration options for reasoning models | {
"effort": "medium",
"summary": "concise"
} |
+| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | Response format configuration | {
"type": "json_object"
} |
+| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | 42 |
+| `service_tier` | [OptionalNullable[components.ChatRequestServiceTier]](../../components/chatrequestservicetier.md) | :heavy_minus_sign: | The service tier to use for processing this request. | auto |
+| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
+| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | [
""
] |
+| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.md)] | :heavy_minus_sign: | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. | [
{
"step_count": 5,
"type": "step_count_is"
},
{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
+| `stream` | *Optional[bool]* | :heavy_minus_sign: | Enable streaming response | false |
+| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | Streaming configuration options | {
"include_usage": true
} |
+| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 |
+| `tool_choice` | [Optional[components.ChatToolChoice]](../../components/chattoolchoice.md) | :heavy_minus_sign: | Tool choice configuration | auto |
+| `tools` | List[[components.ChatFunctionTool](../../components/chatfunctiontool.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"function": {
"description": "Get weather",
"name": "get_weather"
},
"type": "function"
}
] |
+| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 |
+| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | user-123 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -95,6 +97,7 @@ with OpenRouter(
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.PaymentRequiredResponseError | 402 | application/json |
+| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.RequestTimeoutResponseError | 408 | application/json |
| errors.PayloadTooLargeResponseError | 413 | application/json |
diff --git a/docs/sdks/generations/README.md b/docs/sdks/generations/README.md
index 332b568..7fd647d 100644
--- a/docs/sdks/generations/README.md
+++ b/docs/sdks/generations/README.md
@@ -7,6 +7,7 @@ Generation history endpoints
### Available Operations
* [get_generation](#get_generation) - Get request & usage metadata for a generation
+* [list_generation_content](#list_generation_content) - Get stored prompt and completion content for a generation
## get_generation
@@ -46,7 +47,7 @@ with OpenRouter(
### Response
-**[operations.GetGenerationResponse](../../operations/getgenerationresponse.md)**
+**[components.GenerationResponse](../../components/generationresponse.md)**
### Errors
@@ -60,4 +61,58 @@ with OpenRouter(
| errors.BadGatewayResponseError | 502 | application/json |
| errors.EdgeNetworkTimeoutResponseError | 524 | application/json |
| errors.ProviderOverloadedResponseError | 529 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
+## list_generation_content
+
+Get stored prompt and completion content for a generation
+
+### Example Usage
+
+
+```python
+from openrouter import OpenRouter
+import os
+
+
+with OpenRouter(
+ http_referer="",
+ x_open_router_title="",
+ x_open_router_categories="",
+ api_key=os.getenv("OPENROUTER_API_KEY", ""),
+) as open_router:
+
+ res = open_router.generations.list_generation_content(id="gen-1234567890")
+
+ # Handle response
+ print(res)
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *str* | :heavy_check_mark: | The generation ID | gen-1234567890 |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+
+### Response
+
+**[components.GenerationContentResponse](../../components/generationcontentresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| -------------------------------------- | -------------------------------------- | -------------------------------------- |
+| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.ForbiddenResponseError | 403 | application/json |
+| errors.NotFoundResponseError | 404 | application/json |
+| errors.TooManyRequestsResponseError | 429 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
+| errors.BadGatewayResponseError | 502 | application/json |
+| errors.EdgeNetworkTimeoutResponseError | 524 | application/json |
+| errors.ProviderOverloadedResponseError | 529 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/docs/sdks/guardrails/README.md b/docs/sdks/guardrails/README.md
index 7bcdbb6..427dac5 100644
--- a/docs/sdks/guardrails/README.md
+++ b/docs/sdks/guardrails/README.md
@@ -57,6 +57,7 @@ with OpenRouter(
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -94,7 +95,7 @@ with OpenRouter(
"openai",
"anthropic",
"deepseek",
- ], description="A guardrail for limiting API usage", enforce_zdr=False, ignored_models=None, ignored_providers=None, limit_usd=50, reset_interval="monthly")
+ ], description="A guardrail for limiting API usage", enforce_zdr_anthropic=True, enforce_zdr_google=False, enforce_zdr_openai=True, enforce_zdr_other=False, ignored_models=None, ignored_providers=None, limit_usd=50, reset_interval="monthly")
# Handle response
print(res)
@@ -103,21 +104,28 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.md)] | :heavy_minus_sign: | Builtin content filters to apply. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.md)] | :heavy_minus_sign: | Custom regex content filters to apply to request messages | [
{
"action": "redact",
"label": "[API_KEY]",
"pattern": "\\b(sk-[a-zA-Z0-9]{48})\\b"
}
] |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
+| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | false |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | false |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
+| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the guardrail in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -129,6 +137,7 @@ with OpenRouter(
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.ForbiddenResponseError | 403 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
@@ -258,22 +267,28 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true |
-| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
-| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
+| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntryInput](../../components/contentfilterbuiltinentryinput.md)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. The "flag" action is only supported for "regex-prompt-injection"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept "block" or "redact" only. | [
{
"action": "block",
"slug": "regex-prompt-injection"
}
] |
+| `content_filters` | List[[components.ContentFilterEntry](../../components/contentfilterentry.md)] | :heavy_minus_sign: | Custom regex content filters to apply. Set to null to remove. | |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
+| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true |
+| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true |
+| `enforce_zdr_other` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | true |
+| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [
"openai/gpt-4o-mini"
] |
+| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
+| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
+| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
+| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../../components/guardrailinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md
index 74618cb..4875c60 100644
--- a/docs/sdks/models/README.md
+++ b/docs/sdks/models/README.md
@@ -38,15 +38,16 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
-| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
-| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `category` | [Optional[operations.GetModelsCategory]](../../operations/getmodelscategory.md) | :heavy_minus_sign: | Filter models by use case category | programming |
+| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
+| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
+| `sort` | [Optional[operations.GetModelsSort]](../../operations/getmodelssort.md) | :heavy_minus_sign: | Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved. | newest |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md
index a38d2b1..b1c9d9f 100644
--- a/docs/sdks/responses/README.md
+++ b/docs/sdks/responses/README.md
@@ -27,7 +27,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.beta.responses.send(input="Tell me a joke", model="openai/gpt-4o", service_tier="auto", stream=False)
+ res = open_router.beta.responses.send(x_open_router_metadata="enabled", input="Tell me a joke", model="openai/gpt-4o", service_tier="auto", stream=False)
with res as event_stream:
for event in event_stream:
@@ -38,46 +38,49 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
-| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9",
"quality": "high"
} |
-| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.md)] | :heavy_minus_sign: | N/A | |
-| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"content": "What is the weather today?",
"role": "user"
}
] |
-| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `max_output_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
-| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
-| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"session_id": "abc-def-ghi",
"user_id": "123"
} |
-| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
-| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | |
-| `models` | List[*str*] | :heavy_minus_sign: | N/A | |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
-| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
-| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.md) | :heavy_minus_sign: | N/A | {
"id": "prompt-abc123",
"variables": {
"name": "John"
}
} |
-| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | {
"allow_fallbacks": true
} |
-| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"effort": "medium",
"summary": "auto"
} |
-| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.md) | :heavy_minus_sign: | N/A | |
-| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
-| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} |
-| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.md) | :heavy_minus_sign: | N/A | auto |
-| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | |
-| `top_k` | *Optional[int]* | :heavy_minus_sign: | N/A | |
-| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
-| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
-| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.md) | :heavy_minus_sign: | N/A | auto |
-| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
+| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | {
"type": "ephemeral"
} |
+| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
+| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9",
"quality": "high"
} |
+| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.md)] | :heavy_minus_sign: | N/A | |
+| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"content": "What is the weather today?",
"role": "user"
}
] |
+| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `max_output_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
+| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
+| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"session_id": "abc-def-ghi",
"user_id": "123"
} |
+| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `models` | List[*str*] | :heavy_minus_sign: | N/A | |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
+| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.md) | :heavy_minus_sign: | N/A | {
"id": "prompt-abc123",
"variables": {
"name": "John"
}
} |
+| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | {
"allow_fallbacks": true
} |
+| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"effort": "medium",
"summary": "auto"
} |
+| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.md) | :heavy_minus_sign: | N/A | |
+| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
+| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.md)] | :heavy_minus_sign: | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. | [
{
"step_count": 5,
"type": "step_count_is"
},
{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
+| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
+| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
+| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} |
+| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.md) | :heavy_minus_sign: | N/A | auto |
+| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | |
+| `top_k` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
+| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.md) | :heavy_minus_sign: | N/A | auto |
+| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -90,6 +93,7 @@ with OpenRouter(
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.PaymentRequiredResponseError | 402 | application/json |
+| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.RequestTimeoutResponseError | 408 | application/json |
| errors.PayloadTooLargeResponseError | 413 | application/json |
diff --git a/pyproject.toml b/pyproject.toml
index c678027..9e4606d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,9 +1,9 @@
[project]
name = "openrouter"
-version = "0.9.1"
+version = "0.9.2"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
-readme = "README.md"
+readme = "README-PYPI.md"
requires-python = ">=3.9.2"
dependencies = [
"httpcore >=1.0.9",
@@ -11,6 +11,7 @@ dependencies = [
"jsonpath-python >=1.0.6",
"pydantic >=2.11.2",
]
+urls.repository = "https://github.com/OpenRouterTeam/python-sdk.git"
license = { text = "Apache-2.0" }
[dependency-groups]
diff --git a/scripts/publish.sh b/scripts/publish.sh
index ef28dc1..c35748f 100755
--- a/scripts/publish.sh
+++ b/scripts/publish.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+uv run python scripts/prepare_readme.py
+
uv build
uv publish --token $PYPI_TOKEN
diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py
index 4d43d33..fcebde3 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "0.9.1"
+__version__: str = "0.9.2"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.788.4"
-__user_agent__: str = "speakeasy-sdk/python 0.9.1 2.788.4 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 0.9.2 2.788.4 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/api_keys.py b/src/openrouter/api_keys.py
index 923a5f8..e4a30e1 100644
--- a/src/openrouter/api_keys.py
+++ b/src/openrouter/api_keys.py
@@ -257,6 +257,7 @@ class APIKeys(BaseSDK):
x_open_router_categories: Optional[str] = None,
include_disabled: Optional[bool] = None,
offset: Optional[int] = None,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -275,6 +276,7 @@ class APIKeys(BaseSDK):
:param include_disabled: Whether to include disabled API keys in the response
:param offset: Number of API keys to skip for pagination
+ :param workspace_id: Filter API keys by workspace ID. By default, keys in the default workspace are returned.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -296,6 +298,7 @@ class APIKeys(BaseSDK):
x_open_router_categories=x_open_router_categories,
include_disabled=include_disabled,
offset=offset,
+ workspace_id=workspace_id,
)
req = self._build_request(
@@ -386,6 +389,7 @@ class APIKeys(BaseSDK):
x_open_router_categories: Optional[str] = None,
include_disabled: Optional[bool] = None,
offset: Optional[int] = None,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -404,6 +408,7 @@ class APIKeys(BaseSDK):
:param include_disabled: Whether to include disabled API keys in the response
:param offset: Number of API keys to skip for pagination
+ :param workspace_id: Filter API keys by workspace ID. By default, keys in the default workspace are returned.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -425,6 +430,7 @@ class APIKeys(BaseSDK):
x_open_router_categories=x_open_router_categories,
include_disabled=include_disabled,
offset=offset,
+ workspace_id=workspace_id,
)
req = self._build_request_async(
@@ -519,6 +525,7 @@ class APIKeys(BaseSDK):
include_byok_in_limit: Optional[bool] = None,
limit: OptionalNullable[float] = UNSET,
limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -541,6 +548,7 @@ class APIKeys(BaseSDK):
:param include_byok_in_limit: Whether to include BYOK usage in the limit
:param limit: Optional spending limit for the API key in USD
:param limit_reset: Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
+ :param workspace_id: The workspace to create the API key in. Defaults to the default workspace if not provided.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -567,6 +575,7 @@ class APIKeys(BaseSDK):
limit=limit,
limit_reset=limit_reset,
name=name,
+ workspace_id=workspace_id,
),
)
@@ -622,7 +631,7 @@ class APIKeys(BaseSDK):
),
),
request=req,
- error_status_codes=["400", "401", "429", "4XX", "500", "5XX"],
+ error_status_codes=["400", "401", "403", "429", "4XX", "500", "5XX"],
retry_config=retry_config,
)
@@ -639,6 +648,11 @@ class APIKeys(BaseSDK):
errors.UnauthorizedResponseErrorData, http_res
)
raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
if utils.match_response(http_res, "429", "application/json"):
response_data = unmarshal_json_response(
errors.TooManyRequestsResponseErrorData, http_res
@@ -674,6 +688,7 @@ class APIKeys(BaseSDK):
include_byok_in_limit: Optional[bool] = None,
limit: OptionalNullable[float] = UNSET,
limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -696,6 +711,7 @@ class APIKeys(BaseSDK):
:param include_byok_in_limit: Whether to include BYOK usage in the limit
:param limit: Optional spending limit for the API key in USD
:param limit_reset: Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
+ :param workspace_id: The workspace to create the API key in. Defaults to the default workspace if not provided.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -722,6 +738,7 @@ class APIKeys(BaseSDK):
limit=limit,
limit_reset=limit_reset,
name=name,
+ workspace_id=workspace_id,
),
)
@@ -777,7 +794,7 @@ class APIKeys(BaseSDK):
),
),
request=req,
- error_status_codes=["400", "401", "429", "4XX", "500", "5XX"],
+ error_status_codes=["400", "401", "403", "429", "4XX", "500", "5XX"],
retry_config=retry_config,
)
@@ -794,6 +811,11 @@ class APIKeys(BaseSDK):
errors.UnauthorizedResponseErrorData, http_res
)
raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
if utils.match_response(http_res, "429", "application/json"):
response_data = unmarshal_json_response(
errors.TooManyRequestsResponseErrorData, http_res
diff --git a/src/openrouter/beta.py b/src/openrouter/beta.py
index 5e7c70d..9c02cc6 100644
--- a/src/openrouter/beta.py
+++ b/src/openrouter/beta.py
@@ -2,11 +2,14 @@
from .basesdk import BaseSDK
from .sdkconfiguration import SDKConfiguration
+from openrouter.beta_analytics import BetaAnalytics
from openrouter.responses import Responses
from typing import Optional
class Beta(BaseSDK):
+ analytics: BetaAnalytics
+ r"""beta.Analytics endpoints"""
responses: Responses
r"""beta.responses endpoints"""
@@ -18,4 +21,7 @@ class Beta(BaseSDK):
self._init_sdks()
def _init_sdks(self):
+ self.analytics = BetaAnalytics(
+ self.sdk_configuration, parent_ref=self.parent_ref
+ )
self.responses = Responses(self.sdk_configuration, parent_ref=self.parent_ref)
diff --git a/src/openrouter/beta_analytics.py b/src/openrouter/beta_analytics.py
new file mode 100644
index 0000000..6c56ac1
--- /dev/null
+++ b/src/openrouter/beta_analytics.py
@@ -0,0 +1,619 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, List, Mapping, Optional, Union
+
+
+class BetaAnalytics(BaseSDK):
+ r"""beta.Analytics endpoints"""
+
+ def get_analytics_meta(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.GetAnalyticsMetaResponse:
+ r"""Get available analytics metrics and dimensions
+
+ Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetAnalyticsMetaRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/analytics/meta",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetAnalyticsMetaGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getAnalyticsMeta",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "403", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ operations.GetAnalyticsMetaResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_analytics_meta_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.GetAnalyticsMetaResponse:
+ r"""Get available analytics metrics and dimensions
+
+ Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetAnalyticsMetaRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/analytics/meta",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetAnalyticsMetaGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getAnalyticsMeta",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "403", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ operations.GetAnalyticsMetaResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def query_analytics(
+ self,
+ *,
+ metrics: List[str],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ dimensions: Optional[List[str]] = None,
+ filters: Optional[
+ Union[List[operations.Filter], List[operations.FilterTypedDict]]
+ ] = None,
+ granularity: Optional[str] = None,
+ group_limit: Optional[int] = None,
+ limit: Optional[int] = None,
+ order_by: Optional[
+ Union[operations.OrderBy, operations.OrderByTypedDict]
+ ] = None,
+ time_range: Optional[
+ Union[operations.TimeRange, operations.TimeRangeTypedDict]
+ ] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.QueryAnalyticsResponse:
+ r"""Query analytics data
+
+ Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param metrics:
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param dimensions:
+ :param filters:
+ :param granularity: Time granularity
+ :param group_limit: Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.
+ :param limit: Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.
+ :param order_by:
+ :param time_range:
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.QueryAnalyticsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ request_body=operations.QueryAnalyticsRequestBody(
+ dimensions=dimensions,
+ filters=utils.get_pydantic_model(
+ filters, Optional[List[operations.Filter]]
+ ),
+ granularity=granularity,
+ group_limit=group_limit,
+ limit=limit,
+ metrics=metrics,
+ order_by=utils.get_pydantic_model(
+ order_by, Optional[operations.OrderBy]
+ ),
+ time_range=utils.get_pydantic_model(
+ time_range, Optional[operations.TimeRange]
+ ),
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/analytics/query",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.QueryAnalyticsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ operations.QueryAnalyticsRequestBody,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="queryAnalytics",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "408", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(operations.QueryAnalyticsResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "408", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.RequestTimeoutResponseErrorData, http_res
+ )
+ raise errors.RequestTimeoutResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def query_analytics_async(
+ self,
+ *,
+ metrics: List[str],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ dimensions: Optional[List[str]] = None,
+ filters: Optional[
+ Union[List[operations.Filter], List[operations.FilterTypedDict]]
+ ] = None,
+ granularity: Optional[str] = None,
+ group_limit: Optional[int] = None,
+ limit: Optional[int] = None,
+ order_by: Optional[
+ Union[operations.OrderBy, operations.OrderByTypedDict]
+ ] = None,
+ time_range: Optional[
+ Union[operations.TimeRange, operations.TimeRangeTypedDict]
+ ] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.QueryAnalyticsResponse:
+ r"""Query analytics data
+
+ Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param metrics:
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param dimensions:
+ :param filters:
+ :param granularity: Time granularity
+ :param group_limit: Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.
+ :param limit: Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.
+ :param order_by:
+ :param time_range:
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.QueryAnalyticsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ request_body=operations.QueryAnalyticsRequestBody(
+ dimensions=dimensions,
+ filters=utils.get_pydantic_model(
+ filters, Optional[List[operations.Filter]]
+ ),
+ granularity=granularity,
+ group_limit=group_limit,
+ limit=limit,
+ metrics=metrics,
+ order_by=utils.get_pydantic_model(
+ order_by, Optional[operations.OrderBy]
+ ),
+ time_range=utils.get_pydantic_model(
+ time_range, Optional[operations.TimeRange]
+ ),
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/analytics/query",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.QueryAnalyticsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ operations.QueryAnalyticsRequestBody,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="queryAnalytics",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "408", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(operations.QueryAnalyticsResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "408", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.RequestTimeoutResponseErrorData, http_res
+ )
+ raise errors.RequestTimeoutResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/byok.py b/src/openrouter/byok.py
new file mode 100644
index 0000000..9c2b675
--- /dev/null
+++ b/src/openrouter/byok.py
@@ -0,0 +1,1481 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from jsonpath import JSONPath
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union
+
+
+class Byok(BaseSDK):
+ r"""BYOK endpoints"""
+
+ def list(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ workspace_id: Optional[str] = None,
+ provider: Optional[operations.Provider] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListBYOKKeysResponse]:
+ r"""List BYOK provider credentials
+
+ List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ :param provider: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListBYOKKeysRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ provider=provider,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/byok",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListBYOKKeysGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listBYOKKeys",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Optional[operations.ListBYOKKeysResponse]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return None
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return None
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return None
+ next_offset = offset + len(results[0])
+
+ return self.list(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ provider=provider,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListBYOKKeysResponse(
+ result=unmarshal_json_response(
+ components.ListBYOKKeysResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ workspace_id: Optional[str] = None,
+ provider: Optional[operations.Provider] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListBYOKKeysResponse]:
+ r"""List BYOK provider credentials
+
+ List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ :param provider: Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListBYOKKeysRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ provider=provider,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/byok",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListBYOKKeysGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listBYOKKeys",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Awaitable[Optional[operations.ListBYOKKeysResponse]]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ async def empty_result():
+ return None
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return empty_result()
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return empty_result()
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return empty_result()
+ next_offset = offset + len(results[0])
+
+ return self.list_async(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ provider=provider,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListBYOKKeysResponse(
+ result=unmarshal_json_response(
+ components.ListBYOKKeysResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def create(
+ self,
+ *,
+ key: str,
+ provider: components.BYOKProviderSlug,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_user_ids: OptionalNullable[List[str]] = UNSET,
+ disabled: Optional[bool] = None,
+ is_fallback: Optional[bool] = None,
+ name: OptionalNullable[str] = UNSET,
+ workspace_id: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> 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.
+
+ :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`).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ :param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ :param disabled: Whether this credential should be created in a disabled state.
+ :param is_fallback: Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ :param name: Optional human-readable name for the credential.
+ :param workspace_id: Optional workspace ID. Defaults to the authenticated entity's default workspace.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ create_byok_key_request=components.CreateBYOKKeyRequest(
+ allowed_models=allowed_models,
+ allowed_user_ids=allowed_user_ids,
+ disabled=disabled,
+ is_fallback=is_fallback,
+ key=key,
+ name=name,
+ provider=provider,
+ workspace_id=workspace_id,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/byok",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_byok_key_request,
+ False,
+ False,
+ "json",
+ components.CreateBYOKKeyRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "201", "application/json"):
+ return unmarshal_json_response(components.CreateBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_async(
+ self,
+ *,
+ key: str,
+ provider: components.BYOKProviderSlug,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_user_ids: OptionalNullable[List[str]] = UNSET,
+ disabled: Optional[bool] = None,
+ is_fallback: Optional[bool] = None,
+ name: OptionalNullable[str] = UNSET,
+ workspace_id: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> 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.
+
+ :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`).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ :param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ :param disabled: Whether this credential should be created in a disabled state.
+ :param is_fallback: Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ :param name: Optional human-readable name for the credential.
+ :param workspace_id: Optional workspace ID. Defaults to the authenticated entity's default workspace.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ create_byok_key_request=components.CreateBYOKKeyRequest(
+ allowed_models=allowed_models,
+ allowed_user_ids=allowed_user_ids,
+ disabled=disabled,
+ is_fallback=is_fallback,
+ key=key,
+ name=name,
+ provider=provider,
+ workspace_id=workspace_id,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/byok",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_byok_key_request,
+ False,
+ False,
+ "json",
+ components.CreateBYOKKeyRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "201", "application/json"):
+ return unmarshal_json_response(components.CreateBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def delete(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.DeleteBYOKKeyResponse:
+ r"""Delete a BYOK provider credential
+
+ Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The BYOK credential ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.DeleteBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="DELETE",
+ path="/byok/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.DeleteBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="deleteBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.DeleteBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def delete_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.DeleteBYOKKeyResponse:
+ r"""Delete a BYOK provider credential
+
+ Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The BYOK credential ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.DeleteBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="DELETE",
+ path="/byok/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.DeleteBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="deleteBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.DeleteBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetBYOKKeyResponse:
+ r"""Get a BYOK provider credential
+
+ Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The BYOK credential ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/byok/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.GetBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetBYOKKeyResponse:
+ r"""Get a BYOK provider credential
+
+ Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The BYOK credential ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/byok/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.GetBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def update(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_user_ids: OptionalNullable[List[str]] = UNSET,
+ disabled: Optional[bool] = None,
+ is_fallback: Optional[bool] = None,
+ key: Optional[str] = None,
+ name: OptionalNullable[str] = UNSET,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.UpdateBYOKKeyResponse:
+ r"""Update a BYOK provider credential
+
+ Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The BYOK credential ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ :param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ :param disabled: Whether this credential is disabled.
+ :param is_fallback: Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ :param key: A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses.
+ :param name: Optional human-readable name for the credential.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.UpdateBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ update_byok_key_request=components.UpdateBYOKKeyRequest(
+ allowed_models=allowed_models,
+ allowed_user_ids=allowed_user_ids,
+ disabled=disabled,
+ is_fallback=is_fallback,
+ key=key,
+ name=name,
+ ),
+ )
+
+ req = self._build_request(
+ method="PATCH",
+ path="/byok/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.UpdateBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.update_byok_key_request,
+ False,
+ False,
+ "json",
+ components.UpdateBYOKKeyRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="updateBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.UpdateBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def update_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_user_ids: OptionalNullable[List[str]] = UNSET,
+ disabled: Optional[bool] = None,
+ is_fallback: Optional[bool] = None,
+ key: Optional[str] = None,
+ name: OptionalNullable[str] = UNSET,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.UpdateBYOKKeyResponse:
+ r"""Update a BYOK provider credential
+
+ Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The BYOK credential ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param allowed_models: Optional allowlist of model slugs this credential may be used for. `null` means no restriction.
+ :param allowed_user_ids: Optional allowlist of user IDs that may use this credential. `null` means no restriction.
+ :param disabled: Whether this credential is disabled.
+ :param is_fallback: Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried.
+ :param key: A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses.
+ :param name: Optional human-readable name for the credential.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.UpdateBYOKKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ update_byok_key_request=components.UpdateBYOKKeyRequest(
+ allowed_models=allowed_models,
+ allowed_user_ids=allowed_user_ids,
+ disabled=disabled,
+ is_fallback=is_fallback,
+ key=key,
+ name=name,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="PATCH",
+ path="/byok/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.UpdateBYOKKeyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.update_byok_key_request,
+ False,
+ False,
+ "json",
+ components.UpdateBYOKKeyRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="updateBYOKKey",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.UpdateBYOKKeyResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/chat.py b/src/openrouter/chat.py
index bfa078e..3b47457 100644
--- a/src/openrouter/chat.py
+++ b/src/openrouter/chat.py
@@ -26,6 +26,7 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -64,7 +65,10 @@ class Chat(BaseSDK):
]
] = UNSET,
reasoning: Optional[
- Union[components.Reasoning, components.ReasoningTypedDict]
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
@@ -75,6 +79,12 @@ class Chat(BaseSDK):
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Union[Literal[False], None] = None,
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
@@ -112,7 +122,8 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param cache_control:
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
@@ -132,8 +143,9 @@ class Chat(BaseSDK):
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
:param service_tier: The service tier to use for processing this request.
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
@@ -160,6 +172,7 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -198,7 +211,10 @@ class Chat(BaseSDK):
]
] = UNSET,
reasoning: Optional[
- Union[components.Reasoning, components.ReasoningTypedDict]
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
@@ -209,6 +225,12 @@ class Chat(BaseSDK):
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Literal[True],
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
@@ -246,7 +268,8 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param cache_control:
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
@@ -266,8 +289,9 @@ class Chat(BaseSDK):
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
:param service_tier: The service tier to use for processing this request.
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
@@ -293,6 +317,7 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -331,7 +356,10 @@ class Chat(BaseSDK):
]
] = UNSET,
reasoning: Optional[
- Union[components.Reasoning, components.ReasoningTypedDict]
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
@@ -342,6 +370,12 @@ class Chat(BaseSDK):
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Optional[bool] = False,
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
@@ -379,7 +413,8 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param cache_control:
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
@@ -399,8 +434,9 @@ class Chat(BaseSDK):
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
:param service_tier: The service tier to use for processing this request.
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
@@ -430,6 +466,7 @@ class Chat(BaseSDK):
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_metadata=x_open_router_metadata,
chat_request=components.ChatRequest(
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -459,7 +496,7 @@ class Chat(BaseSDK):
provider, OptionalNullable[components.ProviderPreferences]
),
reasoning=utils.get_pydantic_model(
- reasoning, Optional[components.Reasoning]
+ reasoning, Optional[components.ChatRequestReasoning]
),
response_format=utils.get_pydantic_model(
response_format, Optional[components.ResponseFormat]
@@ -468,6 +505,10 @@ class Chat(BaseSDK):
service_tier=service_tier,
session_id=session_id,
stop=stop,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
stream=stream,
stream_options=utils.get_pydantic_model(
stream_options, OptionalNullable[components.ChatStreamOptions]
@@ -538,6 +579,7 @@ class Chat(BaseSDK):
"400",
"401",
"402",
+ "403",
"404",
"408",
"413",
@@ -565,7 +607,7 @@ class Chat(BaseSDK):
return eventstreaming.EventStream(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.SendChatCompletionRequestResponseBody
+ raw, components.ChatStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -592,6 +634,12 @@ class Chat(BaseSDK):
raise errors.PaymentRequiredResponseError(
response_data, http_res, http_res_text
)
+ if utils.match_response(http_res, "403", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res, http_res_text)
if utils.match_response(http_res, "404", "application/json"):
http_res_text = utils.stream_to_text(http_res)
response_data = unmarshal_json_response(
@@ -694,6 +742,7 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -732,7 +781,10 @@ class Chat(BaseSDK):
]
] = UNSET,
reasoning: Optional[
- Union[components.Reasoning, components.ReasoningTypedDict]
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
@@ -743,6 +795,12 @@ class Chat(BaseSDK):
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Union[Literal[False], None] = None,
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
@@ -780,7 +838,8 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param cache_control:
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
@@ -800,8 +859,9 @@ class Chat(BaseSDK):
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
:param service_tier: The service tier to use for processing this request.
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
@@ -828,6 +888,7 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -866,7 +927,10 @@ class Chat(BaseSDK):
]
] = UNSET,
reasoning: Optional[
- Union[components.Reasoning, components.ReasoningTypedDict]
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
@@ -877,6 +941,12 @@ class Chat(BaseSDK):
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Literal[True],
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
@@ -914,7 +984,8 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param cache_control:
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
@@ -934,8 +1005,9 @@ class Chat(BaseSDK):
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
:param service_tier: The service tier to use for processing this request.
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
@@ -961,6 +1033,7 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -999,7 +1072,10 @@ class Chat(BaseSDK):
]
] = UNSET,
reasoning: Optional[
- Union[components.Reasoning, components.ReasoningTypedDict]
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
@@ -1010,6 +1086,12 @@ class Chat(BaseSDK):
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Optional[bool] = False,
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
@@ -1047,7 +1129,8 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param cache_control:
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
@@ -1067,8 +1150,9 @@ class Chat(BaseSDK):
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
:param service_tier: The service tier to use for processing this request.
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
@@ -1098,6 +1182,7 @@ class Chat(BaseSDK):
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_metadata=x_open_router_metadata,
chat_request=components.ChatRequest(
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -1127,7 +1212,7 @@ class Chat(BaseSDK):
provider, OptionalNullable[components.ProviderPreferences]
),
reasoning=utils.get_pydantic_model(
- reasoning, Optional[components.Reasoning]
+ reasoning, Optional[components.ChatRequestReasoning]
),
response_format=utils.get_pydantic_model(
response_format, Optional[components.ResponseFormat]
@@ -1136,6 +1221,10 @@ class Chat(BaseSDK):
service_tier=service_tier,
session_id=session_id,
stop=stop,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
stream=stream,
stream_options=utils.get_pydantic_model(
stream_options, OptionalNullable[components.ChatStreamOptions]
@@ -1206,6 +1295,7 @@ class Chat(BaseSDK):
"400",
"401",
"402",
+ "403",
"404",
"408",
"413",
@@ -1233,7 +1323,7 @@ class Chat(BaseSDK):
return eventstreaming.EventStreamAsync(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.SendChatCompletionRequestResponseBody
+ raw, components.ChatStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -1260,6 +1350,12 @@ class Chat(BaseSDK):
raise errors.PaymentRequiredResponseError(
response_data, http_res, http_res_text
)
+ if utils.match_response(http_res, "403", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res, http_res_text)
if utils.match_response(http_res, "404", "application/json"):
http_res_text = await utils.stream_to_text_async(http_res)
response_data = unmarshal_json_response(
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index e41de29..ebf1361 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -8,22 +8,217 @@ import sys
if TYPE_CHECKING:
from .activityitem import ActivityItem, ActivityItemTypedDict
from .activityresponse import ActivityResponse, ActivityResponseTypedDict
+ from .advisornestedtool import AdvisorNestedTool, AdvisorNestedToolTypedDict
+ from .advisorreasoning import (
+ AdvisorReasoning,
+ AdvisorReasoningEffort,
+ AdvisorReasoningTypedDict,
+ )
+ from .advisorservertool_openrouter import (
+ AdvisorServerToolOpenRouter,
+ AdvisorServerToolOpenRouterType,
+ AdvisorServerToolOpenRouterTypedDict,
+ )
+ from .advisorservertoolconfig import (
+ AdvisorServerToolConfig,
+ AdvisorServerToolConfigTypedDict,
+ )
from .annotationaddedevent import (
AnnotationAddedEvent,
AnnotationAddedEventType,
AnnotationAddedEventTypedDict,
)
+ from .anthropicallowedcallers import AnthropicAllowedCallers
+ from .anthropicbase64imagesource import (
+ AnthropicBase64ImageSource,
+ AnthropicBase64ImageSourceType,
+ AnthropicBase64ImageSourceTypedDict,
+ )
+ from .anthropicbase64pdfsource import (
+ AnthropicBase64PdfSource,
+ AnthropicBase64PdfSourceMediaType,
+ AnthropicBase64PdfSourceType,
+ AnthropicBase64PdfSourceTypedDict,
+ )
from .anthropiccachecontroldirective import (
AnthropicCacheControlDirective,
AnthropicCacheControlDirectiveType,
AnthropicCacheControlDirectiveTypedDict,
)
from .anthropiccachecontrolttl import AnthropicCacheControlTTL
+ from .anthropiccitationcharlocationparam import (
+ AnthropicCitationCharLocationParam,
+ AnthropicCitationCharLocationParamType,
+ AnthropicCitationCharLocationParamTypedDict,
+ )
+ from .anthropiccitationcontentblocklocationparam import (
+ AnthropicCitationContentBlockLocationParam,
+ AnthropicCitationContentBlockLocationParamType,
+ AnthropicCitationContentBlockLocationParamTypedDict,
+ )
+ from .anthropiccitationpagelocationparam import (
+ AnthropicCitationPageLocationParam,
+ AnthropicCitationPageLocationParamType,
+ AnthropicCitationPageLocationParamTypedDict,
+ )
+ from .anthropiccitationsearchresultlocation import (
+ AnthropicCitationSearchResultLocation,
+ AnthropicCitationSearchResultLocationType,
+ AnthropicCitationSearchResultLocationTypedDict,
+ )
+ from .anthropiccitationwebsearchresultlocation import (
+ AnthropicCitationWebSearchResultLocation,
+ AnthropicCitationWebSearchResultLocationType,
+ AnthropicCitationWebSearchResultLocationTypedDict,
+ )
+ from .anthropicdocumentblockparam import (
+ AnthropicDocumentBlockParam,
+ AnthropicDocumentBlockParamCitations,
+ AnthropicDocumentBlockParamCitationsTypedDict,
+ AnthropicDocumentBlockParamContent1,
+ AnthropicDocumentBlockParamContent1TypedDict,
+ AnthropicDocumentBlockParamContent2,
+ AnthropicDocumentBlockParamContent2TypedDict,
+ AnthropicDocumentBlockParamSourceUnion,
+ AnthropicDocumentBlockParamSourceUnionTypedDict,
+ AnthropicDocumentBlockParamTypedDict,
+ SourceContent,
+ SourceContentTypedDict,
+ SourceType,
+ TypeDocument,
+ )
+ from .anthropicimageblockparam import (
+ AnthropicImageBlockParam,
+ AnthropicImageBlockParamSource,
+ AnthropicImageBlockParamSourceTypedDict,
+ AnthropicImageBlockParamType,
+ AnthropicImageBlockParamTypedDict,
+ )
+ from .anthropicimagemimetype import AnthropicImageMimeType
+ from .anthropicinputtokensclearatleast import (
+ AnthropicInputTokensClearAtLeast,
+ AnthropicInputTokensClearAtLeastType,
+ AnthropicInputTokensClearAtLeastTypedDict,
+ )
+ from .anthropicinputtokenstrigger import (
+ AnthropicInputTokensTrigger,
+ AnthropicInputTokensTriggerType,
+ AnthropicInputTokensTriggerTypedDict,
+ )
+ from .anthropicplaintextsource import (
+ AnthropicPlainTextSource,
+ AnthropicPlainTextSourceMediaType,
+ AnthropicPlainTextSourceType,
+ AnthropicPlainTextSourceTypedDict,
+ )
+ from .anthropicsearchresultblockparam import (
+ AnthropicSearchResultBlockParam,
+ AnthropicSearchResultBlockParamCitations,
+ AnthropicSearchResultBlockParamCitationsTypedDict,
+ AnthropicSearchResultBlockParamType,
+ AnthropicSearchResultBlockParamTypedDict,
+ )
+ from .anthropictextblockparam import (
+ AnthropicTextBlockParam,
+ AnthropicTextBlockParamType,
+ AnthropicTextBlockParamTypedDict,
+ Citation,
+ CitationTypedDict,
+ )
+ from .anthropicthinkingdisplay import AnthropicThinkingDisplay
+ from .anthropicthinkingturns import (
+ AnthropicThinkingTurns,
+ AnthropicThinkingTurnsType,
+ AnthropicThinkingTurnsTypedDict,
+ )
+ from .anthropictooluseskeep import (
+ AnthropicToolUsesKeep,
+ AnthropicToolUsesKeepType,
+ AnthropicToolUsesKeepTypedDict,
+ )
+ from .anthropictoolusestrigger import (
+ AnthropicToolUsesTrigger,
+ AnthropicToolUsesTriggerType,
+ AnthropicToolUsesTriggerTypedDict,
+ )
+ from .anthropicurlimagesource import (
+ AnthropicURLImageSource,
+ AnthropicURLImageSourceType,
+ AnthropicURLImageSourceTypedDict,
+ )
+ from .anthropicurlpdfsource import (
+ AnthropicURLPdfSource,
+ AnthropicURLPdfSourceType,
+ AnthropicURLPdfSourceTypedDict,
+ )
+ from .anthropicwebsearchresultblockparam import (
+ AnthropicWebSearchResultBlockParam,
+ AnthropicWebSearchResultBlockParamType,
+ AnthropicWebSearchResultBlockParamTypedDict,
+ )
+ from .anthropicwebsearchtooluserlocation import (
+ AnthropicWebSearchToolUserLocation,
+ AnthropicWebSearchToolUserLocationType,
+ AnthropicWebSearchToolUserLocationTypedDict,
+ )
+ from .applypatchcallitem import (
+ ApplyPatchCallItem,
+ ApplyPatchCallItemType,
+ ApplyPatchCallItemTypedDict,
+ )
+ from .applypatchcalloperation import (
+ ApplyPatchCallOperation,
+ ApplyPatchCallOperationTypedDict,
+ )
+ from .applypatchcalloperationdiffdeltaevent import (
+ ApplyPatchCallOperationDiffDeltaEvent,
+ ApplyPatchCallOperationDiffDeltaEventType,
+ ApplyPatchCallOperationDiffDeltaEventTypedDict,
+ )
+ from .applypatchcalloperationdiffdoneevent import (
+ ApplyPatchCallOperationDiffDoneEvent,
+ ApplyPatchCallOperationDiffDoneEventType,
+ ApplyPatchCallOperationDiffDoneEventTypedDict,
+ )
+ from .applypatchcalloutputitem import (
+ ApplyPatchCallOutputItem,
+ ApplyPatchCallOutputItemStatus,
+ ApplyPatchCallOutputItemType,
+ ApplyPatchCallOutputItemTypedDict,
+ )
+ from .applypatchcallstatus import ApplyPatchCallStatus
+ from .applypatchcreatefileoperation import (
+ ApplyPatchCreateFileOperation,
+ ApplyPatchCreateFileOperationType,
+ ApplyPatchCreateFileOperationTypedDict,
+ )
+ from .applypatchdeletefileoperation import (
+ ApplyPatchDeleteFileOperation,
+ ApplyPatchDeleteFileOperationType,
+ ApplyPatchDeleteFileOperationTypedDict,
+ )
+ from .applypatchengineenum import ApplyPatchEngineEnum
from .applypatchservertool import (
ApplyPatchServerTool,
ApplyPatchServerToolType,
ApplyPatchServerToolTypedDict,
)
+ from .applypatchservertool_openrouter import (
+ ApplyPatchServerToolOpenRouter,
+ ApplyPatchServerToolOpenRouterType,
+ ApplyPatchServerToolOpenRouterTypedDict,
+ )
+ from .applypatchservertoolconfig import (
+ ApplyPatchServerToolConfig,
+ ApplyPatchServerToolConfigTypedDict,
+ )
+ from .applypatchupdatefileoperation import (
+ ApplyPatchUpdateFileOperation,
+ ApplyPatchUpdateFileOperationType,
+ ApplyPatchUpdateFileOperationTypedDict,
+ )
+ from .apprankingsitem import AppRankingsItem, AppRankingsItemTypedDict
+ from .apprankingsresponse import AppRankingsResponse, AppRankingsResponseTypedDict
from .autorouterplugin import (
AutoRouterPlugin,
AutoRouterPluginID,
@@ -61,6 +256,28 @@ if TYPE_CHECKING:
BaseInputsUnionTypedDict,
)
from .basereasoningconfig import BaseReasoningConfig, BaseReasoningConfigTypedDict
+ from .bashservertool import (
+ BashServerTool,
+ BashServerToolType,
+ BashServerToolTypedDict,
+ )
+ from .bashservertoolconfig import (
+ BashServerToolConfig,
+ BashServerToolConfigTypedDict,
+ )
+ from .bashservertoolengine import BashServerToolEngine
+ from .bashservertoolenvironment import (
+ BashServerToolEnvironment,
+ BashServerToolEnvironmentTypedDict,
+ )
+ from .bulkaddworkspacemembersrequest import (
+ BulkAddWorkspaceMembersRequest,
+ BulkAddWorkspaceMembersRequestTypedDict,
+ )
+ from .bulkaddworkspacemembersresponse import (
+ BulkAddWorkspaceMembersResponse,
+ BulkAddWorkspaceMembersResponseTypedDict,
+ )
from .bulkassignkeysrequest import (
BulkAssignKeysRequest,
BulkAssignKeysRequestTypedDict,
@@ -77,6 +294,14 @@ if TYPE_CHECKING:
BulkAssignMembersResponse,
BulkAssignMembersResponseTypedDict,
)
+ from .bulkremoveworkspacemembersrequest import (
+ BulkRemoveWorkspaceMembersRequest,
+ BulkRemoveWorkspaceMembersRequestTypedDict,
+ )
+ from .bulkremoveworkspacemembersresponse import (
+ BulkRemoveWorkspaceMembersResponse,
+ BulkRemoveWorkspaceMembersResponseTypedDict,
+ )
from .bulkunassignkeysrequest import (
BulkUnassignKeysRequest,
BulkUnassignKeysRequestTypedDict,
@@ -93,6 +318,8 @@ if TYPE_CHECKING:
BulkUnassignMembersResponse,
BulkUnassignMembersResponseTypedDict,
)
+ from .byokkey import BYOKKey, BYOKKeyTypedDict
+ from .byokproviderslug import BYOKProviderSlug
from .chatassistantimages import (
ChatAssistantImages,
ChatAssistantImagesImageURL,
@@ -203,14 +430,14 @@ if TYPE_CHECKING:
from .chatreasoningsummaryverbosityenum import ChatReasoningSummaryVerbosityEnum
from .chatrequest import (
ChatRequest,
+ ChatRequestEffort,
ChatRequestPlugin,
ChatRequestPluginTypedDict,
+ ChatRequestReasoning,
+ ChatRequestReasoningTypedDict,
ChatRequestServiceTier,
ChatRequestTypedDict,
- Effort,
Modality,
- Reasoning,
- ReasoningTypedDict,
ResponseFormat,
ResponseFormatTypedDict,
Stop,
@@ -222,6 +449,10 @@ if TYPE_CHECKING:
ChatSearchModelsServerToolType,
ChatSearchModelsServerToolTypedDict,
)
+ from .chatservertoolchoice import (
+ ChatServerToolChoice,
+ ChatServerToolChoiceTypedDict,
+ )
from .chatstreamchoice import ChatStreamChoice, ChatStreamChoiceTypedDict
from .chatstreamchunk import (
ChatStreamChunk,
@@ -235,6 +466,10 @@ if TYPE_CHECKING:
ChatStreamDeltaRole,
ChatStreamDeltaTypedDict,
)
+ from .chatstreamingresponse import (
+ ChatStreamingResponse,
+ ChatStreamingResponseTypedDict,
+ )
from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict
from .chatstreamtoolcall import (
ChatStreamToolCall,
@@ -314,6 +549,11 @@ if TYPE_CHECKING:
CodexLocalShellToolType,
CodexLocalShellToolTypedDict,
)
+ from .compactionitem import (
+ CompactionItem,
+ CompactionItemType,
+ CompactionItemTypedDict,
+ )
from .compoundfilter import (
CompoundFilter,
CompoundFilterType,
@@ -329,6 +569,28 @@ if TYPE_CHECKING:
ConflictResponseErrorData,
ConflictResponseErrorDataTypedDict,
)
+ from .containerautoenvironment import (
+ ContainerAutoEnvironment,
+ ContainerAutoEnvironmentType,
+ ContainerAutoEnvironmentTypedDict,
+ )
+ from .containerreferenceenvironment import (
+ ContainerReferenceEnvironment,
+ ContainerReferenceEnvironmentType,
+ ContainerReferenceEnvironmentTypedDict,
+ )
+ from .contentfilteraction import ContentFilterAction
+ from .contentfilterbuiltinaction import ContentFilterBuiltinAction
+ from .contentfilterbuiltinentry import (
+ ContentFilterBuiltinEntry,
+ ContentFilterBuiltinEntryTypedDict,
+ )
+ from .contentfilterbuiltinentryinput import (
+ ContentFilterBuiltinEntryInput,
+ ContentFilterBuiltinEntryInputTypedDict,
+ )
+ from .contentfilterbuiltinslug import ContentFilterBuiltinSlug
+ from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .contentpartaddedevent import (
ContentPartAddedEvent,
ContentPartAddedEventPart,
@@ -336,6 +598,13 @@ if TYPE_CHECKING:
ContentPartAddedEventType,
ContentPartAddedEventTypedDict,
)
+ from .contentpartaudio import (
+ AudioURL,
+ AudioURLTypedDict,
+ ContentPartAudio,
+ ContentPartAudioType,
+ ContentPartAudioTypedDict,
+ )
from .contentpartdoneevent import (
ContentPartDoneEvent,
ContentPartDoneEventPart,
@@ -350,12 +619,43 @@ if TYPE_CHECKING:
ContentPartImageType,
ContentPartImageTypedDict,
)
+ from .contentpartinputaudio import (
+ ContentPartInputAudio,
+ ContentPartInputAudioType,
+ ContentPartInputAudioTypedDict,
+ )
+ from .contentpartinputfile import (
+ ContentPartInputFile,
+ ContentPartInputFileType,
+ ContentPartInputFileTypedDict,
+ )
+ from .contentpartinputvideo import (
+ ContentPartInputVideo,
+ ContentPartInputVideoType,
+ ContentPartInputVideoTypedDict,
+ )
+ from .contentpartvideo import (
+ ContentPartVideo,
+ ContentPartVideoType,
+ ContentPartVideoTypedDict,
+ VideoURL,
+ VideoURLTypedDict,
+ )
from .contextcompressionengine import ContextCompressionEngine
from .contextcompressionplugin import (
ContextCompressionPlugin,
ContextCompressionPluginID,
ContextCompressionPluginTypedDict,
)
+ from .costdetails import CostDetails, CostDetailsTypedDict
+ from .createbyokkeyrequest import (
+ CreateBYOKKeyRequest,
+ CreateBYOKKeyRequestTypedDict,
+ )
+ from .createbyokkeyresponse import (
+ CreateBYOKKeyResponse,
+ CreateBYOKKeyResponseTypedDict,
+ )
from .createguardrailrequest import (
CreateGuardrailRequest,
CreateGuardrailRequestTypedDict,
@@ -364,8 +664,30 @@ if TYPE_CHECKING:
CreateGuardrailResponse,
CreateGuardrailResponseTypedDict,
)
+ from .createobservabilitydestinationrequest import (
+ CreateObservabilityDestinationRequest,
+ CreateObservabilityDestinationRequestType,
+ CreateObservabilityDestinationRequestTypedDict,
+ )
+ from .createobservabilitydestinationresponse import (
+ CreateObservabilityDestinationResponse,
+ CreateObservabilityDestinationResponseTypedDict,
+ )
+ from .createpresetfrominferenceresponse import (
+ CreatePresetFromInferenceResponse,
+ CreatePresetFromInferenceResponseTypedDict,
+ )
+ from .createworkspacerequest import (
+ CreateWorkspaceRequest,
+ CreateWorkspaceRequestTypedDict,
+ )
+ from .createworkspaceresponse import (
+ CreateWorkspaceResponse,
+ CreateWorkspaceResponseTypedDict,
+ )
from .customtool import (
CustomTool,
+ CustomToolTypeCustom,
CustomToolTypedDict,
Format,
FormatGrammar,
@@ -376,7 +698,34 @@ if TYPE_CHECKING:
FormatTypeText,
FormatTypedDict,
Syntax,
- TypeCustom,
+ )
+ from .customtoolcallinputdeltaevent import (
+ CustomToolCallInputDeltaEvent,
+ CustomToolCallInputDeltaEventType,
+ CustomToolCallInputDeltaEventTypedDict,
+ )
+ from .customtoolcallinputdoneevent import (
+ CustomToolCallInputDoneEvent,
+ CustomToolCallInputDoneEventType,
+ CustomToolCallInputDoneEventTypedDict,
+ )
+ from .customtoolcallitem import (
+ CustomToolCallItem,
+ CustomToolCallItemType,
+ CustomToolCallItemTypedDict,
+ )
+ from .customtoolcalloutputitem import (
+ CustomToolCallOutputItem,
+ CustomToolCallOutputItemDetail,
+ CustomToolCallOutputItemOutputInputImage,
+ CustomToolCallOutputItemOutputInputImageTypedDict,
+ CustomToolCallOutputItemOutputUnion1,
+ CustomToolCallOutputItemOutputUnion1TypedDict,
+ CustomToolCallOutputItemOutputUnion2,
+ CustomToolCallOutputItemOutputUnion2TypedDict,
+ CustomToolCallOutputItemTypeCustomToolCallOutput,
+ CustomToolCallOutputItemTypeInputImage,
+ CustomToolCallOutputItemTypedDict,
)
from .datetimeservertool import (
DatetimeServerTool,
@@ -388,15 +737,26 @@ if TYPE_CHECKING:
DatetimeServerToolConfigTypedDict,
)
from .defaultparameters import DefaultParameters, DefaultParametersTypedDict
+ from .deletebyokkeyresponse import (
+ DeleteBYOKKeyResponse,
+ DeleteBYOKKeyResponseTypedDict,
+ )
from .deleteguardrailresponse import (
DeleteGuardrailResponse,
DeleteGuardrailResponseTypedDict,
)
+ from .deleteobservabilitydestinationresponse import (
+ DeleteObservabilityDestinationResponse,
+ DeleteObservabilityDestinationResponseTypedDict,
+ )
+ from .deleteworkspaceresponse import (
+ DeleteWorkspaceResponse,
+ DeleteWorkspaceResponseTypedDict,
+ )
from .easyinputmessage import (
EasyInputMessage,
EasyInputMessageContentInputImage,
EasyInputMessageContentInputImageTypedDict,
- EasyInputMessageContentType,
EasyInputMessageContentUnion1,
EasyInputMessageContentUnion1TypedDict,
EasyInputMessageContentUnion2,
@@ -412,6 +772,7 @@ if TYPE_CHECKING:
EasyInputMessageRoleUnion,
EasyInputMessageRoleUnionTypedDict,
EasyInputMessageRoleUser,
+ EasyInputMessageTypeInputImage,
EasyInputMessageTypeMessage,
EasyInputMessageTypedDict,
)
@@ -419,6 +780,8 @@ if TYPE_CHECKING:
EdgeNetworkTimeoutResponseErrorData,
EdgeNetworkTimeoutResponseErrorDataTypedDict,
)
+ from .endpointinfo import EndpointInfo, EndpointInfoTypedDict
+ from .endpointsmetadata import EndpointsMetadata, EndpointsMetadataTypedDict
from .endpointstatus import EndpointStatus
from .errorevent import ErrorEvent, ErrorEventType, ErrorEventTypedDict
from .filecitation import FileCitation, FileCitationType, FileCitationTypedDict
@@ -431,6 +794,10 @@ if TYPE_CHECKING:
from .filesearchservertool import (
FileSearchServerTool,
FileSearchServerToolTypedDict,
+ FileSearchServerToolValue1,
+ FileSearchServerToolValue1TypedDict,
+ FileSearchServerToolValue2,
+ FileSearchServerToolValue2TypedDict,
Filters,
FiltersType,
FiltersTypedDict,
@@ -440,10 +807,6 @@ if TYPE_CHECKING:
RankingOptions,
RankingOptionsTypedDict,
TypeFileSearch,
- Value1,
- Value1TypedDict,
- Value2,
- Value2TypedDict,
)
from .forbiddenresponseerrordata import (
ForbiddenResponseErrorData,
@@ -491,21 +854,137 @@ if TYPE_CHECKING:
from .functioncalloutputitem import (
FunctionCallOutputItem,
FunctionCallOutputItemDetail,
- FunctionCallOutputItemOutputType,
+ FunctionCallOutputItemOutputInputImage,
+ FunctionCallOutputItemOutputInputImageTypedDict,
FunctionCallOutputItemOutputUnion1,
FunctionCallOutputItemOutputUnion1TypedDict,
FunctionCallOutputItemOutputUnion2,
FunctionCallOutputItemOutputUnion2TypedDict,
FunctionCallOutputItemStatus,
FunctionCallOutputItemTypeFunctionCallOutput,
+ FunctionCallOutputItemTypeInputImage,
FunctionCallOutputItemTypedDict,
- OutputInputImage,
- OutputInputImageTypedDict,
)
+ from .fusionanalysisresult import (
+ Contradiction,
+ ContradictionTypedDict,
+ FusionAnalysisResult,
+ FusionAnalysisResultTypedDict,
+ PartialCoverage,
+ PartialCoverageTypedDict,
+ Stance,
+ StanceTypedDict,
+ UniqueInsight,
+ UniqueInsightTypedDict,
+ )
+ from .fusioncallanalysiscompletedevent import (
+ FusionCallAnalysisCompletedEvent,
+ FusionCallAnalysisCompletedEventType,
+ FusionCallAnalysisCompletedEventTypedDict,
+ )
+ from .fusioncallanalysisinprogressevent import (
+ FusionCallAnalysisInProgressEvent,
+ FusionCallAnalysisInProgressEventType,
+ FusionCallAnalysisInProgressEventTypedDict,
+ )
+ from .fusioncallcompletedevent import (
+ FusionCallCompletedEvent,
+ FusionCallCompletedEventType,
+ FusionCallCompletedEventTypedDict,
+ )
+ from .fusioncallinprogressevent import (
+ FusionCallInProgressEvent,
+ FusionCallInProgressEventType,
+ FusionCallInProgressEventTypedDict,
+ )
+ from .fusioncallpaneladdedevent import (
+ FusionCallPanelAddedEvent,
+ FusionCallPanelAddedEventType,
+ FusionCallPanelAddedEventTypedDict,
+ )
+ from .fusioncallpanelcompletedevent import (
+ FusionCallPanelCompletedEvent,
+ FusionCallPanelCompletedEventType,
+ FusionCallPanelCompletedEventTypedDict,
+ )
+ from .fusioncallpaneldeltaevent import (
+ FusionCallPanelDeltaEvent,
+ FusionCallPanelDeltaEventType,
+ FusionCallPanelDeltaEventTypedDict,
+ )
+ from .fusioncallpanelfailedevent import (
+ FusionCallPanelFailedEvent,
+ FusionCallPanelFailedEventType,
+ FusionCallPanelFailedEventTypedDict,
+ )
+ from .fusioncallpanelreasoningdeltaevent import (
+ FusionCallPanelReasoningDeltaEvent,
+ FusionCallPanelReasoningDeltaEventType,
+ FusionCallPanelReasoningDeltaEventTypedDict,
+ )
+ from .fusionplugin import (
+ FusionPlugin,
+ FusionPluginID,
+ FusionPluginTool,
+ FusionPluginToolTypedDict,
+ FusionPluginTypedDict,
+ )
+ from .fusionservertool_openrouter import (
+ FusionServerToolOpenRouter,
+ FusionServerToolOpenRouterType,
+ FusionServerToolOpenRouterTypedDict,
+ )
+ from .fusionservertoolconfig import (
+ FusionServerToolConfig,
+ FusionServerToolConfigEffort,
+ FusionServerToolConfigReasoning,
+ FusionServerToolConfigReasoningTypedDict,
+ FusionServerToolConfigTool,
+ FusionServerToolConfigToolTypedDict,
+ FusionServerToolConfigTypedDict,
+ )
+ from .generationcontentdata import (
+ GenerationContentData,
+ GenerationContentDataOutput,
+ GenerationContentDataOutputTypedDict,
+ GenerationContentDataTypedDict,
+ Input1,
+ Input1TypedDict,
+ Input2,
+ Input2TypedDict,
+ InputUnion,
+ InputUnionTypedDict,
+ )
+ from .generationcontentresponse import (
+ GenerationContentResponse,
+ GenerationContentResponseTypedDict,
+ )
+ from .generationresponse import (
+ APIType,
+ DataRegion,
+ GenerationResponse,
+ GenerationResponseData,
+ GenerationResponseDataTypedDict,
+ GenerationResponseTypedDict,
+ )
+ from .getbyokkeyresponse import GetBYOKKeyResponse, GetBYOKKeyResponseTypedDict
from .getguardrailresponse import (
GetGuardrailResponse,
GetGuardrailResponseTypedDict,
)
+ from .getobservabilitydestinationresponse import (
+ GetObservabilityDestinationResponse,
+ GetObservabilityDestinationResponseTypedDict,
+ )
+ from .getpresetresponse import GetPresetResponse, GetPresetResponseTypedDict
+ from .getpresetversionresponse import (
+ GetPresetVersionResponse,
+ GetPresetVersionResponseTypedDict,
+ )
+ from .getworkspaceresponse import (
+ GetWorkspaceResponse,
+ GetWorkspaceResponseTypedDict,
+ )
from .guardrail import Guardrail, GuardrailTypedDict
from .guardrailinterval import GuardrailInterval
from .imageconfig import ImageConfig, ImageConfigTypedDict
@@ -577,7 +1056,6 @@ if TYPE_CHECKING:
InputMessageItem,
InputMessageItemContentInputImage,
InputMessageItemContentInputImageTypedDict,
- InputMessageItemContentType,
InputMessageItemContentUnion,
InputMessageItemContentUnionTypedDict,
InputMessageItemDetail,
@@ -586,10 +1064,12 @@ if TYPE_CHECKING:
InputMessageItemRoleUnion,
InputMessageItemRoleUnionTypedDict,
InputMessageItemRoleUser,
+ InputMessageItemTypeInputImage,
InputMessageItemTypeMessage,
InputMessageItemTypedDict,
)
from .inputmodality import InputModality
+ from .inputreference import InputReference, InputReferenceTypedDict
from .inputs_union import (
InputsContent1,
InputsContent1TypedDict,
@@ -628,6 +1108,11 @@ if TYPE_CHECKING:
InternalServerResponseErrorData,
InternalServerResponseErrorDataTypedDict,
)
+ from .itemreferenceitem import (
+ ItemReferenceItem,
+ ItemReferenceItemType,
+ ItemReferenceItemTypedDict,
+ )
from .keyassignment import KeyAssignment, KeyAssignmentTypedDict
from .legacy_chatcontentvideo import (
LegacyChatContentVideo,
@@ -639,6 +1124,10 @@ if TYPE_CHECKING:
LegacyWebSearchServerToolType,
LegacyWebSearchServerToolTypedDict,
)
+ from .listbyokkeysresponse import (
+ ListBYOKKeysResponse,
+ ListBYOKKeysResponseTypedDict,
+ )
from .listendpointsresponse import (
Architecture,
ArchitectureTypedDict,
@@ -658,6 +1147,51 @@ if TYPE_CHECKING:
ListMemberAssignmentsResponse,
ListMemberAssignmentsResponseTypedDict,
)
+ from .listobservabilitydestinationsresponse import (
+ ListObservabilityDestinationsResponse,
+ ListObservabilityDestinationsResponseTypedDict,
+ )
+ from .listpresetsresponse import ListPresetsResponse, ListPresetsResponseTypedDict
+ from .listpresetversionsresponse import (
+ ListPresetVersionsResponse,
+ ListPresetVersionsResponseTypedDict,
+ )
+ from .listworkspacesresponse import (
+ ListWorkspacesResponse,
+ ListWorkspacesResponseTypedDict,
+ )
+ from .localshellcallitem import (
+ LocalShellCallItem,
+ LocalShellCallItemAction,
+ LocalShellCallItemActionTypedDict,
+ LocalShellCallItemTypedDict,
+ TypeExec,
+ TypeLocalShellCall,
+ )
+ from .localshellcalloutputitem import (
+ LocalShellCallOutputItem,
+ LocalShellCallOutputItemStatus,
+ LocalShellCallOutputItemType,
+ LocalShellCallOutputItemTypedDict,
+ )
+ from .mcpapprovalrequestitem import (
+ McpApprovalRequestItem,
+ McpApprovalRequestItemType,
+ McpApprovalRequestItemTypedDict,
+ )
+ from .mcpapprovalresponseitem import (
+ McpApprovalResponseItem,
+ McpApprovalResponseItemType,
+ McpApprovalResponseItemTypedDict,
+ )
+ from .mcpcallitem import McpCallItem, McpCallItemType, McpCallItemTypedDict
+ from .mcplisttoolsitem import (
+ McpListToolsItem,
+ McpListToolsItemTool,
+ McpListToolsItemToolTypedDict,
+ McpListToolsItemType,
+ McpListToolsItemTypedDict,
+ )
from .mcpservertool import (
AllowedTools,
AllowedToolsTypedDict,
@@ -679,6 +1213,160 @@ if TYPE_CHECKING:
RequireApprovalUnionTypedDict,
)
from .memberassignment import MemberAssignment, MemberAssignmentTypedDict
+ from .messagesadvisortoolresultblock import (
+ MessagesAdvisorToolResultBlock,
+ MessagesAdvisorToolResultBlockType,
+ MessagesAdvisorToolResultBlockTypedDict,
+ )
+ from .messagesmessageparam import (
+ ContentCompaction,
+ ContentCompactionTypedDict,
+ ContentRedactedThinking,
+ ContentRedactedThinkingTypedDict,
+ ContentServerToolUse,
+ ContentServerToolUseTypedDict,
+ ContentThinking,
+ ContentThinkingTypedDict,
+ ContentToolReference,
+ ContentToolReferenceTypedDict,
+ ContentToolResult,
+ ContentToolResultTypedDict,
+ ContentToolUse,
+ ContentToolUseTypedDict,
+ ContentWebSearchToolResult,
+ ContentWebSearchToolResultError,
+ ContentWebSearchToolResultErrorTypedDict,
+ ContentWebSearchToolResultTypedDict,
+ ErrorCode,
+ MessagesMessageParam,
+ MessagesMessageParamContentUnion1,
+ MessagesMessageParamContentUnion1TypedDict,
+ MessagesMessageParamContentUnion2,
+ MessagesMessageParamContentUnion2TypedDict,
+ MessagesMessageParamContentUnion3,
+ MessagesMessageParamContentUnion3TypedDict,
+ MessagesMessageParamContentUnion4,
+ MessagesMessageParamContentUnion4TypedDict,
+ MessagesMessageParamContentUnion5,
+ MessagesMessageParamContentUnion5TypedDict,
+ MessagesMessageParamRole,
+ MessagesMessageParamTypeCompaction,
+ MessagesMessageParamTypedDict,
+ TypeRedactedThinking,
+ TypeServerToolUse,
+ TypeThinking,
+ TypeToolReference,
+ TypeToolResult,
+ TypeToolUse,
+ TypeWebSearchToolResult,
+ TypeWebSearchToolResultError,
+ )
+ from .messagesoutputconfig import (
+ MessagesOutputConfig,
+ MessagesOutputConfigEffort,
+ MessagesOutputConfigFormat,
+ MessagesOutputConfigFormatTypedDict,
+ MessagesOutputConfigTypeJSONSchema,
+ MessagesOutputConfigTypedDict,
+ TaskBudget,
+ TaskBudgetTypedDict,
+ TypeTokens,
+ )
+ from .messagesrequest import (
+ Caching,
+ CachingTypedDict,
+ ClearToolInputs,
+ ClearToolInputsTypedDict,
+ ContextManagement,
+ ContextManagementTypedDict,
+ Edit,
+ EditClearThinking20251015,
+ EditClearThinking20251015TypedDict,
+ EditClearToolUses20250919,
+ EditClearToolUses20250919TypedDict,
+ EditCompact20260112,
+ EditCompact20260112TypedDict,
+ EditTypeInputTokens,
+ EditTypedDict,
+ InputSchema,
+ InputSchemaTypedDict,
+ Keep,
+ KeepAll,
+ KeepAllTypedDict,
+ KeepEnum,
+ KeepType,
+ KeepTypedDict,
+ MessagesRequest,
+ MessagesRequestPlugin,
+ MessagesRequestPluginTypedDict,
+ MessagesRequestTool,
+ MessagesRequestToolTypedDict,
+ MessagesRequestToolUnion,
+ MessagesRequestToolUnionTypedDict,
+ MessagesRequestTypedDict,
+ Metadata,
+ MetadataTypedDict,
+ NameAdvisor,
+ NameBash,
+ NameStrReplaceEditor,
+ NameWebSearch1,
+ NameWebSearch2,
+ Speed,
+ System,
+ SystemTypedDict,
+ Thinking,
+ ThinkingAdaptive,
+ ThinkingAdaptiveTypedDict,
+ ThinkingDisabled,
+ ThinkingDisabledTypedDict,
+ ThinkingEnabled,
+ ThinkingEnabledTypedDict,
+ ThinkingTypedDict,
+ ToolAdvisor20260301,
+ ToolAdvisor20260301TypedDict,
+ ToolBash20250124,
+ ToolBash20250124TypedDict,
+ ToolChoice,
+ ToolChoiceAny,
+ ToolChoiceAnyTypedDict,
+ ToolChoiceAuto,
+ ToolChoiceAutoTypedDict,
+ ToolChoiceNone,
+ ToolChoiceNoneTypedDict,
+ ToolChoiceTool,
+ ToolChoiceToolTypedDict,
+ ToolChoiceTypeAuto,
+ ToolChoiceTypedDict,
+ ToolCustom,
+ ToolCustomTypedDict,
+ ToolTextEditor20250124,
+ ToolTextEditor20250124TypedDict,
+ ToolTypeCustom,
+ ToolTypeEphemeral,
+ ToolWebSearch20250305,
+ ToolWebSearch20250305TypedDict,
+ ToolWebSearch20260209,
+ ToolWebSearch20260209TypedDict,
+ Trigger,
+ TriggerInputTokens,
+ TriggerInputTokensTypedDict,
+ TriggerTypedDict,
+ TypeAdaptive,
+ TypeAdvisor20260301,
+ TypeAny,
+ TypeBash20250124,
+ TypeClearThinking20251015,
+ TypeClearToolUses20250919,
+ TypeCompact20260112,
+ TypeDisabled,
+ TypeEnabled,
+ TypeNone,
+ TypeTextEditor20250124,
+ TypeTool,
+ TypeWebSearch20250305,
+ TypeWebSearch20260209,
+ )
+ from .metadatalevel import MetadataLevel
from .model import Model, ModelTypedDict
from .modelarchitecture import (
ModelArchitecture,
@@ -688,9 +1376,9 @@ if TYPE_CHECKING:
from .modelgroup import ModelGroup
from .modellinks import ModelLinks, ModelLinksTypedDict
from .modelscountresponse import (
- Data,
- DataTypedDict,
ModelsCountResponse,
+ ModelsCountResponseData,
+ ModelsCountResponseDataTypedDict,
ModelsCountResponseTypedDict,
)
from .modelslistresponse import ModelsListResponse, ModelsListResponseTypedDict
@@ -699,10 +1387,163 @@ if TYPE_CHECKING:
ModerationPluginID,
ModerationPluginTypedDict,
)
+ from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict
from .notfoundresponseerrordata import (
NotFoundResponseErrorData,
NotFoundResponseErrorDataTypedDict,
)
+ from .observabilityarizedestination import (
+ ObservabilityArizeDestination,
+ ObservabilityArizeDestinationConfig,
+ ObservabilityArizeDestinationConfigTypedDict,
+ ObservabilityArizeDestinationType,
+ ObservabilityArizeDestinationTypedDict,
+ )
+ from .observabilitybraintrustdestination import (
+ ObservabilityBraintrustDestination,
+ ObservabilityBraintrustDestinationConfig,
+ ObservabilityBraintrustDestinationConfigTypedDict,
+ ObservabilityBraintrustDestinationType,
+ ObservabilityBraintrustDestinationTypedDict,
+ )
+ from .observabilityclickhousedestination import (
+ ObservabilityClickhouseDestination,
+ ObservabilityClickhouseDestinationConfig,
+ ObservabilityClickhouseDestinationConfigTypedDict,
+ ObservabilityClickhouseDestinationType,
+ ObservabilityClickhouseDestinationTypedDict,
+ )
+ from .observabilitydatadogdestination import (
+ ObservabilityDatadogDestination,
+ ObservabilityDatadogDestinationConfig,
+ ObservabilityDatadogDestinationConfigTypedDict,
+ ObservabilityDatadogDestinationType,
+ ObservabilityDatadogDestinationTypedDict,
+ )
+ from .observabilitydestination import (
+ ObservabilityDestination,
+ ObservabilityDestinationTypedDict,
+ )
+ from .observabilityfilterrulesconfig import (
+ FieldT,
+ Group,
+ GroupTypedDict,
+ Logic,
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+ ObservabilityFilterRulesConfigValue,
+ ObservabilityFilterRulesConfigValueTypedDict,
+ Operator,
+ Rule,
+ RuleTypedDict,
+ )
+ from .observabilitygrafanadestination import (
+ ObservabilityGrafanaDestination,
+ ObservabilityGrafanaDestinationConfig,
+ ObservabilityGrafanaDestinationConfigTypedDict,
+ ObservabilityGrafanaDestinationType,
+ ObservabilityGrafanaDestinationTypedDict,
+ )
+ from .observabilitylangfusedestination import (
+ ObservabilityLangfuseDestination,
+ ObservabilityLangfuseDestinationConfig,
+ ObservabilityLangfuseDestinationConfigTypedDict,
+ ObservabilityLangfuseDestinationType,
+ ObservabilityLangfuseDestinationTypedDict,
+ )
+ from .observabilitylangsmithdestination import (
+ ObservabilityLangsmithDestination,
+ ObservabilityLangsmithDestinationConfig,
+ ObservabilityLangsmithDestinationConfigTypedDict,
+ ObservabilityLangsmithDestinationType,
+ ObservabilityLangsmithDestinationTypedDict,
+ )
+ from .observabilitynewrelicdestination import (
+ ObservabilityNewrelicDestination,
+ ObservabilityNewrelicDestinationConfig,
+ ObservabilityNewrelicDestinationConfigTypedDict,
+ ObservabilityNewrelicDestinationType,
+ ObservabilityNewrelicDestinationTypedDict,
+ Region,
+ )
+ from .observabilityopikdestination import (
+ ObservabilityOpikDestination,
+ ObservabilityOpikDestinationConfig,
+ ObservabilityOpikDestinationConfigTypedDict,
+ ObservabilityOpikDestinationType,
+ ObservabilityOpikDestinationTypedDict,
+ )
+ from .observabilityotelcollectordestination import (
+ ObservabilityOtelCollectorDestination,
+ ObservabilityOtelCollectorDestinationConfig,
+ ObservabilityOtelCollectorDestinationConfigTypedDict,
+ ObservabilityOtelCollectorDestinationType,
+ ObservabilityOtelCollectorDestinationTypedDict,
+ )
+ from .observabilityposthogdestination import (
+ ObservabilityPosthogDestination,
+ ObservabilityPosthogDestinationConfig,
+ ObservabilityPosthogDestinationConfigTypedDict,
+ ObservabilityPosthogDestinationType,
+ ObservabilityPosthogDestinationTypedDict,
+ )
+ from .observabilityrampdestination import (
+ ObservabilityRampDestination,
+ ObservabilityRampDestinationConfig,
+ ObservabilityRampDestinationConfigTypedDict,
+ ObservabilityRampDestinationType,
+ ObservabilityRampDestinationTypedDict,
+ )
+ from .observabilitys3destination import (
+ ObservabilityS3Destination,
+ ObservabilityS3DestinationConfig,
+ ObservabilityS3DestinationConfigTypedDict,
+ ObservabilityS3DestinationType,
+ ObservabilityS3DestinationTypedDict,
+ )
+ from .observabilitysentrydestination import (
+ ObservabilitySentryDestination,
+ ObservabilitySentryDestinationConfig,
+ ObservabilitySentryDestinationConfigTypedDict,
+ ObservabilitySentryDestinationType,
+ ObservabilitySentryDestinationTypedDict,
+ )
+ from .observabilitysnowflakedestination import (
+ ObservabilitySnowflakeDestination,
+ ObservabilitySnowflakeDestinationConfig,
+ ObservabilitySnowflakeDestinationConfigTypedDict,
+ ObservabilitySnowflakeDestinationType,
+ ObservabilitySnowflakeDestinationTypedDict,
+ )
+ from .observabilityweavedestination import (
+ ObservabilityWeaveDestination,
+ ObservabilityWeaveDestinationConfig,
+ ObservabilityWeaveDestinationConfigTypedDict,
+ ObservabilityWeaveDestinationType,
+ ObservabilityWeaveDestinationTypedDict,
+ )
+ from .observabilitywebhookdestination import (
+ Method,
+ ObservabilityWebhookDestination,
+ ObservabilityWebhookDestinationConfig,
+ ObservabilityWebhookDestinationConfigTypedDict,
+ ObservabilityWebhookDestinationType,
+ ObservabilityWebhookDestinationTypedDict,
+ )
+ from .openairesponsecustomtoolcall import (
+ OpenAIResponseCustomToolCall,
+ OpenAIResponseCustomToolCallType,
+ OpenAIResponseCustomToolCallTypedDict,
+ )
+ from .openairesponsecustomtoolcalloutput import (
+ OpenAIResponseCustomToolCallOutput,
+ OpenAIResponseCustomToolCallOutputOutput1,
+ OpenAIResponseCustomToolCallOutputOutput1TypedDict,
+ OpenAIResponseCustomToolCallOutputOutput2,
+ OpenAIResponseCustomToolCallOutputOutput2TypedDict,
+ OpenAIResponseCustomToolCallOutputType,
+ OpenAIResponseCustomToolCallOutputTypedDict,
+ )
from .openairesponsefunctiontoolcall import (
OpenAIResponseFunctionToolCall,
OpenAIResponseFunctionToolCallType,
@@ -742,12 +1583,18 @@ if TYPE_CHECKING:
from .openairesponsesresponsestatus import OpenAIResponsesResponseStatus
from .openairesponsestoolchoice_union import (
OpenAIResponsesToolChoice,
+ OpenAIResponsesToolChoiceApplyPatch,
+ OpenAIResponsesToolChoiceApplyPatchTypedDict,
OpenAIResponsesToolChoiceAuto,
OpenAIResponsesToolChoiceFunction,
OpenAIResponsesToolChoiceFunctionTypedDict,
OpenAIResponsesToolChoiceNone,
OpenAIResponsesToolChoiceRequired,
+ OpenAIResponsesToolChoiceShell,
+ OpenAIResponsesToolChoiceShellTypedDict,
+ OpenAIResponsesToolChoiceTypeApplyPatch,
OpenAIResponsesToolChoiceTypeFunction,
+ OpenAIResponsesToolChoiceTypeShell,
OpenAIResponsesToolChoiceTypeWebSearchPreview,
OpenAIResponsesToolChoiceTypeWebSearchPreview20250311,
OpenAIResponsesToolChoiceTypedDict,
@@ -777,11 +1624,22 @@ if TYPE_CHECKING:
OpenResponsesResultType,
OpenResponsesResultTypedDict,
)
+ from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict
from .openrouterwebsearchservertool import (
OpenRouterWebSearchServerTool,
OpenRouterWebSearchServerToolType,
OpenRouterWebSearchServerToolTypedDict,
)
+ from .outputadvisorservertoolitem import (
+ OutputAdvisorServerToolItem,
+ OutputAdvisorServerToolItemType,
+ OutputAdvisorServerToolItemTypedDict,
+ )
+ from .outputapplypatchcallitem import (
+ OutputApplyPatchCallItem,
+ OutputApplyPatchCallItemType,
+ OutputApplyPatchCallItemTypedDict,
+ )
from .outputapplypatchservertoolitem import (
OutputApplyPatchServerToolItem,
OutputApplyPatchServerToolItemType,
@@ -801,13 +1659,13 @@ if TYPE_CHECKING:
OutputCodeInterpreterCallItem,
OutputCodeInterpreterCallItemOutputUnion,
OutputCodeInterpreterCallItemOutputUnionTypedDict,
+ OutputCodeInterpreterCallItemTypeImage,
OutputCodeInterpreterCallItemTypedDict,
OutputImage,
OutputImageTypedDict,
OutputLogs,
OutputLogsTypedDict,
TypeCodeInterpreterCall,
- TypeImage,
TypeLogs,
)
from .outputcodeinterpreterservertoolitem import (
@@ -823,6 +1681,11 @@ if TYPE_CHECKING:
PendingSafetyCheck,
PendingSafetyCheckTypedDict,
)
+ from .outputcustomtoolcallitem import (
+ OutputCustomToolCallItem,
+ OutputCustomToolCallItemType,
+ OutputCustomToolCallItemTypedDict,
+ )
from .outputdatetimeitem import (
OutputDatetimeItem,
OutputDatetimeItemType,
@@ -848,6 +1711,15 @@ if TYPE_CHECKING:
OutputFunctionCallItemType,
OutputFunctionCallItemTypedDict,
)
+ from .outputfusionservertoolitem import (
+ FailedModel,
+ FailedModelTypedDict,
+ OutputFusionServerToolItem,
+ OutputFusionServerToolItemType,
+ OutputFusionServerToolItemTypedDict,
+ Response,
+ ResponseTypedDict,
+ )
from .outputimagegenerationcallitem import (
OutputImageGenerationCallItem,
OutputImageGenerationCallItemType,
@@ -921,6 +1793,33 @@ if TYPE_CHECKING:
OutputReasoningItemType,
OutputReasoningItemTypedDict,
)
+ from .outputsearchmodelsservertoolitem import (
+ OutputSearchModelsServerToolItem,
+ OutputSearchModelsServerToolItemType,
+ OutputSearchModelsServerToolItemTypedDict,
+ )
+ from .outputshellcallitem import (
+ OutputShellCallItem,
+ OutputShellCallItemAction,
+ OutputShellCallItemActionTypedDict,
+ OutputShellCallItemType,
+ OutputShellCallItemTypedDict,
+ )
+ from .outputshellcalloutputitem import (
+ Outcome,
+ OutcomeExit,
+ OutcomeExitTypedDict,
+ OutcomeTimeout,
+ OutcomeTimeoutTypedDict,
+ OutcomeTypedDict,
+ OutputShellCallOutputItem,
+ OutputShellCallOutputItemOutput,
+ OutputShellCallOutputItemOutputTypedDict,
+ OutputShellCallOutputItemTypeShellCallOutput,
+ OutputShellCallOutputItemTypedDict,
+ TypeExit,
+ TypeTimeout,
+ )
from .outputtexteditorservertoolitem import (
Command,
OutputTextEditorServerToolItem,
@@ -943,22 +1842,33 @@ if TYPE_CHECKING:
ActionFindInPageTypedDict,
ActionOpenPage,
ActionOpenPageTypedDict,
- ActionSearch,
- ActionSearchTypedDict,
+ ActionTypeSearch,
ActionTypedDict,
OutputWebSearchCallItem,
+ OutputWebSearchCallItemActionSearch,
+ OutputWebSearchCallItemActionSearchTypedDict,
OutputWebSearchCallItemTypedDict,
TypeFindInPage,
TypeOpenPage,
- TypeSearch,
TypeWebSearchCall,
)
from .outputwebsearchservertoolitem import (
OutputWebSearchServerToolItem,
- OutputWebSearchServerToolItemType,
+ OutputWebSearchServerToolItemAction,
+ OutputWebSearchServerToolItemActionTypedDict,
+ OutputWebSearchServerToolItemSource,
+ OutputWebSearchServerToolItemSourceTypedDict,
+ OutputWebSearchServerToolItemTypeOpenrouterWebSearch,
+ OutputWebSearchServerToolItemTypeSearch,
+ OutputWebSearchServerToolItemTypeURL,
OutputWebSearchServerToolItemTypedDict,
)
from .parameter import Parameter
+ from .paretorouterplugin import (
+ ParetoRouterPlugin,
+ ParetoRouterPluginID,
+ ParetoRouterPluginTypedDict,
+ )
from .payloadtoolargeresponseerrordata import (
PayloadTooLargeResponseErrorData,
PayloadTooLargeResponseErrorDataTypedDict,
@@ -984,11 +1894,23 @@ if TYPE_CHECKING:
PercentileThroughputCutoffsTypedDict,
)
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
+ from .pipelinestage import PipelineStage, PipelineStageTypedDict
+ from .pipelinestagetype import PipelineStageType
from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
from .preferredminthroughput import (
PreferredMinThroughput,
PreferredMinThroughputTypedDict,
)
+ from .preset import Preset, PresetTypedDict
+ from .presetdesignatedversion import (
+ PresetDesignatedVersion,
+ PresetDesignatedVersionTypedDict,
+ )
+ from .presetstatus import PresetStatus
+ from .presetwithdesignatedversion import (
+ PresetWithDesignatedVersion,
+ PresetWithDesignatedVersionTypedDict,
+ )
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
Preview20250311WebSearchServerToolType,
@@ -1004,7 +1926,9 @@ if TYPE_CHECKING:
PreviewWebSearchUserLocationType,
PreviewWebSearchUserLocationTypedDict,
)
+ from .promptinjectionscanscope import PromptInjectionScanScope
from .providername import ProviderName
+ from .provideroptions import ProviderOptions, ProviderOptionsTypedDict
from .provideroverloadedresponseerrordata import (
ProviderOverloadedResponseErrorData,
ProviderOverloadedResponseErrorDataTypedDict,
@@ -1045,6 +1969,16 @@ if TYPE_CHECKING:
)
from .publicpricing import PublicPricing, PublicPricingTypedDict
from .quantization import Quantization
+ from .rankingsdailyitem import RankingsDailyItem, RankingsDailyItemTypedDict
+ from .rankingsdailymeta import (
+ RankingsDailyMeta,
+ RankingsDailyMetaTypedDict,
+ Version,
+ )
+ from .rankingsdailyresponse import (
+ RankingsDailyResponse,
+ RankingsDailyResponseTypedDict,
+ )
from .reasoningconfig import ReasoningConfig, ReasoningConfigTypedDict
from .reasoningdeltaevent import (
ReasoningDeltaEvent,
@@ -1164,6 +2098,13 @@ if TYPE_CHECKING:
ResponsesRequestType,
ResponsesRequestTypedDict,
)
+ from .responsesstreamingresponse import (
+ ResponsesStreamingResponse,
+ ResponsesStreamingResponseTypedDict,
+ )
+ from .routerattempt import RouterAttempt, RouterAttemptTypedDict
+ from .routerparams import RouterParams, RouterParamsTypedDict
+ from .routingstrategy import RoutingStrategy
from .searchcontextsizeenum import SearchContextSizeEnum
from .searchmodelsservertoolconfig import (
SearchModelsServerToolConfig,
@@ -1175,11 +2116,78 @@ if TYPE_CHECKING:
ServiceUnavailableResponseErrorData,
ServiceUnavailableResponseErrorDataTypedDict,
)
+ from .shellcallitem import (
+ ShellCallItem,
+ ShellCallItemAction,
+ ShellCallItemActionTypedDict,
+ ShellCallItemStatus,
+ ShellCallItemType,
+ ShellCallItemTypedDict,
+ )
+ from .shellcalloutputitem import (
+ ShellCallOutputItem,
+ ShellCallOutputItemOutput,
+ ShellCallOutputItemOutputTypedDict,
+ ShellCallOutputItemStatus,
+ ShellCallOutputItemType,
+ ShellCallOutputItemTypedDict,
+ )
+ from .shellcallstatus import ShellCallStatus
from .shellservertool import (
ShellServerTool,
ShellServerToolType,
ShellServerToolTypedDict,
)
+ from .shellservertool_openrouter import (
+ ShellServerToolOpenRouter,
+ ShellServerToolOpenRouterType,
+ ShellServerToolOpenRouterTypedDict,
+ )
+ from .shellservertoolconfig import (
+ ShellServerToolConfig,
+ ShellServerToolConfigTypedDict,
+ )
+ from .shellservertoolengine import ShellServerToolEngine
+ from .shellservertoolenvironment import (
+ ShellServerToolEnvironment,
+ ShellServerToolEnvironmentTypedDict,
+ )
+ from .speechrequest import (
+ ResponseFormatEnum,
+ SpeechRequest,
+ SpeechRequestProvider,
+ SpeechRequestProviderTypedDict,
+ SpeechRequestTypedDict,
+ )
+ from .stopservertoolswhencondition import (
+ StopServerToolsWhenCondition,
+ StopServerToolsWhenConditionTypedDict,
+ )
+ from .stopservertoolswhenfinishreasonis import (
+ StopServerToolsWhenFinishReasonIs,
+ StopServerToolsWhenFinishReasonIsType,
+ StopServerToolsWhenFinishReasonIsTypedDict,
+ )
+ from .stopservertoolswhenhastoolcall import (
+ StopServerToolsWhenHasToolCall,
+ StopServerToolsWhenHasToolCallType,
+ StopServerToolsWhenHasToolCallTypedDict,
+ )
+ from .stopservertoolswhenmaxcost import (
+ StopServerToolsWhenMaxCost,
+ StopServerToolsWhenMaxCostType,
+ StopServerToolsWhenMaxCostTypedDict,
+ )
+ from .stopservertoolswhenmaxtokensused import (
+ StopServerToolsWhenMaxTokensUsed,
+ StopServerToolsWhenMaxTokensUsedType,
+ StopServerToolsWhenMaxTokensUsedTypedDict,
+ )
+ from .stopservertoolswhenstepcountis import (
+ StopServerToolsWhenStepCountIs,
+ StopServerToolsWhenStepCountIsType,
+ StopServerToolsWhenStepCountIsTypedDict,
+ )
from .storedprompttemplate import (
StoredPromptTemplate,
StoredPromptTemplateTypedDict,
@@ -1217,7 +2225,15 @@ if TYPE_CHECKING:
StreamLogprobTopLogprob,
StreamLogprobTopLogprobTypedDict,
)
- from .textconfig import TextConfig, TextConfigTypedDict, TextConfigVerbosity
+ from .sttinputaudio import STTInputAudio, STTInputAudioTypedDict
+ from .sttrequest import (
+ STTRequest,
+ STTRequestProvider,
+ STTRequestProviderTypedDict,
+ STTRequestTypedDict,
+ )
+ from .sttresponse import STTResponse, STTResponseTypedDict
+ from .sttusage import STTUsage, STTUsageTypedDict
from .textdeltaevent import (
TextDeltaEvent,
TextDeltaEventType,
@@ -1227,7 +2243,7 @@ if TYPE_CHECKING:
from .textextendedconfig import (
TextExtendedConfig,
TextExtendedConfigTypedDict,
- TextExtendedConfigVerbosity,
+ Verbosity,
)
from .toolcallstatus import ToolCallStatus
from .toolchoiceallowed import (
@@ -1254,6 +2270,14 @@ if TYPE_CHECKING:
UnprocessableEntityResponseErrorData,
UnprocessableEntityResponseErrorDataTypedDict,
)
+ from .updatebyokkeyrequest import (
+ UpdateBYOKKeyRequest,
+ UpdateBYOKKeyRequestTypedDict,
+ )
+ from .updatebyokkeyresponse import (
+ UpdateBYOKKeyResponse,
+ UpdateBYOKKeyResponseTypedDict,
+ )
from .updateguardrailrequest import (
UpdateGuardrailRequest,
UpdateGuardrailRequestTypedDict,
@@ -1262,25 +2286,41 @@ if TYPE_CHECKING:
UpdateGuardrailResponse,
UpdateGuardrailResponseTypedDict,
)
+ from .updateobservabilitydestinationrequest import (
+ UpdateObservabilityDestinationRequest,
+ UpdateObservabilityDestinationRequestTypedDict,
+ )
+ from .updateobservabilitydestinationresponse import (
+ UpdateObservabilityDestinationResponse,
+ UpdateObservabilityDestinationResponseTypedDict,
+ )
+ from .updateworkspacerequest import (
+ UpdateWorkspaceRequest,
+ UpdateWorkspaceRequestTypedDict,
+ )
+ from .updateworkspaceresponse import (
+ UpdateWorkspaceResponse,
+ UpdateWorkspaceResponseTypedDict,
+ )
from .urlcitation import URLCitation, URLCitationType, URLCitationTypedDict
from .usage import (
- CostDetails,
- CostDetailsTypedDict,
InputTokensDetails,
InputTokensDetailsTypedDict,
OutputTokensDetails,
OutputTokensDetailsTypedDict,
Usage,
+ UsageCostDetails,
+ UsageCostDetailsTypedDict,
UsageTypedDict,
)
from .videogenerationrequest import (
AspectRatio,
Options,
OptionsTypedDict,
- Provider,
- ProviderTypedDict,
Resolution,
VideoGenerationRequest,
+ VideoGenerationRequestProvider,
+ VideoGenerationRequestProviderTypedDict,
VideoGenerationRequestTypedDict,
)
from .videogenerationresponse import (
@@ -1304,6 +2344,21 @@ if TYPE_CHECKING:
VideoModelsListResponse,
VideoModelsListResponseTypedDict,
)
+ from .webfetchengineenum import WebFetchEngineEnum
+ from .webfetchplugin import (
+ WebFetchPlugin,
+ WebFetchPluginID,
+ WebFetchPluginTypedDict,
+ )
+ from .webfetchservertool import (
+ WebFetchServerTool,
+ WebFetchServerToolType,
+ WebFetchServerToolTypedDict,
+ )
+ from .webfetchservertoolconfig import (
+ WebFetchServerToolConfig,
+ WebFetchServerToolConfigTypedDict,
+ )
from .websearchcallcompletedevent import (
WebSearchCallCompletedEvent,
WebSearchCallCompletedEventType,
@@ -1327,8 +2382,11 @@ if TYPE_CHECKING:
from .websearchengine import WebSearchEngine
from .websearchengineenum import WebSearchEngineEnum
from .websearchplugin import (
+ UserLocation,
+ UserLocationTypedDict,
WebSearchPlugin,
WebSearchPluginID,
+ WebSearchPluginType,
WebSearchPluginTypedDict,
)
from .websearchservertool import (
@@ -1337,12 +2395,14 @@ if TYPE_CHECKING:
WebSearchServerToolTypedDict,
)
from .websearchservertool_openrouter import (
- Parameters,
- ParametersTypedDict,
WebSearchServerToolOpenRouter,
WebSearchServerToolOpenRouterType,
WebSearchServerToolOpenRouterTypedDict,
)
+ from .websearchservertoolconfig import (
+ WebSearchServerToolConfig,
+ WebSearchServerToolConfigTypedDict,
+ )
from .websearchsource import (
WebSearchSource,
WebSearchSourceType,
@@ -1359,21 +2419,37 @@ if TYPE_CHECKING:
WebSearchUserLocationServerToolType,
WebSearchUserLocationServerToolTypedDict,
)
+ from .workspace import Workspace, WorkspaceTypedDict
+ from .workspacemember import (
+ WorkspaceMember,
+ WorkspaceMemberRole,
+ WorkspaceMemberTypedDict,
+ )
__all__ = [
+ "APIType",
"Action",
"ActionEnum",
"ActionFindInPage",
"ActionFindInPageTypedDict",
"ActionOpenPage",
"ActionOpenPageTypedDict",
- "ActionSearch",
- "ActionSearchTypedDict",
+ "ActionTypeSearch",
"ActionTypedDict",
"ActivityItem",
"ActivityItemTypedDict",
"ActivityResponse",
"ActivityResponseTypedDict",
+ "AdvisorNestedTool",
+ "AdvisorNestedToolTypedDict",
+ "AdvisorReasoning",
+ "AdvisorReasoningEffort",
+ "AdvisorReasoningTypedDict",
+ "AdvisorServerToolConfig",
+ "AdvisorServerToolConfigTypedDict",
+ "AdvisorServerToolOpenRouter",
+ "AdvisorServerToolOpenRouterType",
+ "AdvisorServerToolOpenRouterTypedDict",
"AllowedTools",
"AllowedToolsTypedDict",
"AllowedToolsUnion",
@@ -1383,19 +2459,138 @@ __all__ = [
"AnnotationAddedEvent",
"AnnotationAddedEventType",
"AnnotationAddedEventTypedDict",
+ "AnthropicAllowedCallers",
+ "AnthropicBase64ImageSource",
+ "AnthropicBase64ImageSourceType",
+ "AnthropicBase64ImageSourceTypedDict",
+ "AnthropicBase64PdfSource",
+ "AnthropicBase64PdfSourceMediaType",
+ "AnthropicBase64PdfSourceType",
+ "AnthropicBase64PdfSourceTypedDict",
"AnthropicCacheControlDirective",
"AnthropicCacheControlDirectiveType",
"AnthropicCacheControlDirectiveTypedDict",
"AnthropicCacheControlTTL",
+ "AnthropicCitationCharLocationParam",
+ "AnthropicCitationCharLocationParamType",
+ "AnthropicCitationCharLocationParamTypedDict",
+ "AnthropicCitationContentBlockLocationParam",
+ "AnthropicCitationContentBlockLocationParamType",
+ "AnthropicCitationContentBlockLocationParamTypedDict",
+ "AnthropicCitationPageLocationParam",
+ "AnthropicCitationPageLocationParamType",
+ "AnthropicCitationPageLocationParamTypedDict",
+ "AnthropicCitationSearchResultLocation",
+ "AnthropicCitationSearchResultLocationType",
+ "AnthropicCitationSearchResultLocationTypedDict",
+ "AnthropicCitationWebSearchResultLocation",
+ "AnthropicCitationWebSearchResultLocationType",
+ "AnthropicCitationWebSearchResultLocationTypedDict",
+ "AnthropicDocumentBlockParam",
+ "AnthropicDocumentBlockParamCitations",
+ "AnthropicDocumentBlockParamCitationsTypedDict",
+ "AnthropicDocumentBlockParamContent1",
+ "AnthropicDocumentBlockParamContent1TypedDict",
+ "AnthropicDocumentBlockParamContent2",
+ "AnthropicDocumentBlockParamContent2TypedDict",
+ "AnthropicDocumentBlockParamSourceUnion",
+ "AnthropicDocumentBlockParamSourceUnionTypedDict",
+ "AnthropicDocumentBlockParamTypedDict",
+ "AnthropicImageBlockParam",
+ "AnthropicImageBlockParamSource",
+ "AnthropicImageBlockParamSourceTypedDict",
+ "AnthropicImageBlockParamType",
+ "AnthropicImageBlockParamTypedDict",
+ "AnthropicImageMimeType",
+ "AnthropicInputTokensClearAtLeast",
+ "AnthropicInputTokensClearAtLeastType",
+ "AnthropicInputTokensClearAtLeastTypedDict",
+ "AnthropicInputTokensTrigger",
+ "AnthropicInputTokensTriggerType",
+ "AnthropicInputTokensTriggerTypedDict",
+ "AnthropicPlainTextSource",
+ "AnthropicPlainTextSourceMediaType",
+ "AnthropicPlainTextSourceType",
+ "AnthropicPlainTextSourceTypedDict",
+ "AnthropicSearchResultBlockParam",
+ "AnthropicSearchResultBlockParamCitations",
+ "AnthropicSearchResultBlockParamCitationsTypedDict",
+ "AnthropicSearchResultBlockParamType",
+ "AnthropicSearchResultBlockParamTypedDict",
+ "AnthropicTextBlockParam",
+ "AnthropicTextBlockParamType",
+ "AnthropicTextBlockParamTypedDict",
+ "AnthropicThinkingDisplay",
+ "AnthropicThinkingTurns",
+ "AnthropicThinkingTurnsType",
+ "AnthropicThinkingTurnsTypedDict",
+ "AnthropicToolUsesKeep",
+ "AnthropicToolUsesKeepType",
+ "AnthropicToolUsesKeepTypedDict",
+ "AnthropicToolUsesTrigger",
+ "AnthropicToolUsesTriggerType",
+ "AnthropicToolUsesTriggerTypedDict",
+ "AnthropicURLImageSource",
+ "AnthropicURLImageSourceType",
+ "AnthropicURLImageSourceTypedDict",
+ "AnthropicURLPdfSource",
+ "AnthropicURLPdfSourceType",
+ "AnthropicURLPdfSourceTypedDict",
+ "AnthropicWebSearchResultBlockParam",
+ "AnthropicWebSearchResultBlockParamType",
+ "AnthropicWebSearchResultBlockParamTypedDict",
+ "AnthropicWebSearchToolUserLocation",
+ "AnthropicWebSearchToolUserLocationType",
+ "AnthropicWebSearchToolUserLocationTypedDict",
+ "AppRankingsItem",
+ "AppRankingsItemTypedDict",
+ "AppRankingsResponse",
+ "AppRankingsResponseTypedDict",
+ "ApplyPatchCallItem",
+ "ApplyPatchCallItemType",
+ "ApplyPatchCallItemTypedDict",
+ "ApplyPatchCallOperation",
+ "ApplyPatchCallOperationDiffDeltaEvent",
+ "ApplyPatchCallOperationDiffDeltaEventType",
+ "ApplyPatchCallOperationDiffDeltaEventTypedDict",
+ "ApplyPatchCallOperationDiffDoneEvent",
+ "ApplyPatchCallOperationDiffDoneEventType",
+ "ApplyPatchCallOperationDiffDoneEventTypedDict",
+ "ApplyPatchCallOperationTypedDict",
+ "ApplyPatchCallOutputItem",
+ "ApplyPatchCallOutputItemStatus",
+ "ApplyPatchCallOutputItemType",
+ "ApplyPatchCallOutputItemTypedDict",
+ "ApplyPatchCallStatus",
+ "ApplyPatchCreateFileOperation",
+ "ApplyPatchCreateFileOperationType",
+ "ApplyPatchCreateFileOperationTypedDict",
+ "ApplyPatchDeleteFileOperation",
+ "ApplyPatchDeleteFileOperationType",
+ "ApplyPatchDeleteFileOperationTypedDict",
+ "ApplyPatchEngineEnum",
"ApplyPatchServerTool",
+ "ApplyPatchServerToolConfig",
+ "ApplyPatchServerToolConfigTypedDict",
+ "ApplyPatchServerToolOpenRouter",
+ "ApplyPatchServerToolOpenRouterType",
+ "ApplyPatchServerToolOpenRouterTypedDict",
"ApplyPatchServerToolType",
"ApplyPatchServerToolTypedDict",
+ "ApplyPatchUpdateFileOperation",
+ "ApplyPatchUpdateFileOperationType",
+ "ApplyPatchUpdateFileOperationTypedDict",
"Architecture",
"ArchitectureTypedDict",
"AspectRatio",
+ "AudioURL",
+ "AudioURLTypedDict",
"AutoRouterPlugin",
"AutoRouterPluginID",
"AutoRouterPluginTypedDict",
+ "BYOKKey",
+ "BYOKKeyTypedDict",
+ "BYOKProviderSlug",
"Background",
"BadGatewayResponseErrorData",
"BadGatewayResponseErrorDataTypedDict",
@@ -1424,6 +2619,18 @@ __all__ = [
"BaseInputsUnionTypedDict",
"BaseReasoningConfig",
"BaseReasoningConfigTypedDict",
+ "BashServerTool",
+ "BashServerToolConfig",
+ "BashServerToolConfigTypedDict",
+ "BashServerToolEngine",
+ "BashServerToolEnvironment",
+ "BashServerToolEnvironmentTypedDict",
+ "BashServerToolType",
+ "BashServerToolTypedDict",
+ "BulkAddWorkspaceMembersRequest",
+ "BulkAddWorkspaceMembersRequestTypedDict",
+ "BulkAddWorkspaceMembersResponse",
+ "BulkAddWorkspaceMembersResponseTypedDict",
"BulkAssignKeysRequest",
"BulkAssignKeysRequestTypedDict",
"BulkAssignKeysResponse",
@@ -1432,6 +2639,10 @@ __all__ = [
"BulkAssignMembersRequestTypedDict",
"BulkAssignMembersResponse",
"BulkAssignMembersResponseTypedDict",
+ "BulkRemoveWorkspaceMembersRequest",
+ "BulkRemoveWorkspaceMembersRequestTypedDict",
+ "BulkRemoveWorkspaceMembersResponse",
+ "BulkRemoveWorkspaceMembersResponseTypedDict",
"BulkUnassignKeysRequest",
"BulkUnassignKeysRequestTypedDict",
"BulkUnassignKeysResponse",
@@ -1441,6 +2652,8 @@ __all__ = [
"BulkUnassignMembersResponse",
"BulkUnassignMembersResponseTypedDict",
"By",
+ "Caching",
+ "CachingTypedDict",
"ChatAssistantImages",
"ChatAssistantImagesImageURL",
"ChatAssistantImagesImageURLTypedDict",
@@ -1519,8 +2732,11 @@ __all__ = [
"ChatNamedToolChoiceTypedDict",
"ChatReasoningSummaryVerbosityEnum",
"ChatRequest",
+ "ChatRequestEffort",
"ChatRequestPlugin",
"ChatRequestPluginTypedDict",
+ "ChatRequestReasoning",
+ "ChatRequestReasoningTypedDict",
"ChatRequestServiceTier",
"ChatRequestTypedDict",
"ChatResult",
@@ -1529,6 +2745,8 @@ __all__ = [
"ChatSearchModelsServerTool",
"ChatSearchModelsServerToolType",
"ChatSearchModelsServerToolTypedDict",
+ "ChatServerToolChoice",
+ "ChatServerToolChoiceTypedDict",
"ChatStreamChoice",
"ChatStreamChoiceTypedDict",
"ChatStreamChunk",
@@ -1544,6 +2762,8 @@ __all__ = [
"ChatStreamToolCallFunctionTypedDict",
"ChatStreamToolCallType",
"ChatStreamToolCallTypedDict",
+ "ChatStreamingResponse",
+ "ChatStreamingResponseTypedDict",
"ChatSystemMessage",
"ChatSystemMessageContent",
"ChatSystemMessageContentTypedDict",
@@ -1580,6 +2800,10 @@ __all__ = [
"ChatWebSearchShorthand",
"ChatWebSearchShorthandType",
"ChatWebSearchShorthandTypedDict",
+ "Citation",
+ "CitationTypedDict",
+ "ClearToolInputs",
+ "ClearToolInputsTypedDict",
"Code",
"CodeInterpreterServerTool",
"CodeInterpreterServerToolTypedDict",
@@ -1587,6 +2811,9 @@ __all__ = [
"CodexLocalShellToolType",
"CodexLocalShellToolTypedDict",
"Command",
+ "CompactionItem",
+ "CompactionItemType",
+ "CompactionItemTypedDict",
"CompletionTokensDetails",
"CompletionTokensDetailsTypedDict",
"CompoundFilter",
@@ -1600,14 +2827,34 @@ __all__ = [
"ConnectorID",
"Container",
"ContainerAuto",
+ "ContainerAutoEnvironment",
+ "ContainerAutoEnvironmentType",
+ "ContainerAutoEnvironmentTypedDict",
"ContainerAutoTypedDict",
+ "ContainerReferenceEnvironment",
+ "ContainerReferenceEnvironmentType",
+ "ContainerReferenceEnvironmentTypedDict",
"ContainerType",
"ContainerTypedDict",
+ "ContentCompaction",
+ "ContentCompactionTypedDict",
+ "ContentFilterAction",
+ "ContentFilterBuiltinAction",
+ "ContentFilterBuiltinEntry",
+ "ContentFilterBuiltinEntryInput",
+ "ContentFilterBuiltinEntryInputTypedDict",
+ "ContentFilterBuiltinEntryTypedDict",
+ "ContentFilterBuiltinSlug",
+ "ContentFilterEntry",
+ "ContentFilterEntryTypedDict",
"ContentPartAddedEvent",
"ContentPartAddedEventPart",
"ContentPartAddedEventPartTypedDict",
"ContentPartAddedEventType",
"ContentPartAddedEventTypedDict",
+ "ContentPartAudio",
+ "ContentPartAudioType",
+ "ContentPartAudioTypedDict",
"ContentPartDoneEvent",
"ContentPartDoneEventPart",
"ContentPartDoneEventPartTypedDict",
@@ -1618,21 +2865,88 @@ __all__ = [
"ContentPartImageImageURLTypedDict",
"ContentPartImageType",
"ContentPartImageTypedDict",
+ "ContentPartInputAudio",
+ "ContentPartInputAudioType",
+ "ContentPartInputAudioTypedDict",
+ "ContentPartInputFile",
+ "ContentPartInputFileType",
+ "ContentPartInputFileTypedDict",
+ "ContentPartInputVideo",
+ "ContentPartInputVideoType",
+ "ContentPartInputVideoTypedDict",
+ "ContentPartVideo",
+ "ContentPartVideoType",
+ "ContentPartVideoTypedDict",
+ "ContentRedactedThinking",
+ "ContentRedactedThinkingTypedDict",
+ "ContentServerToolUse",
+ "ContentServerToolUseTypedDict",
+ "ContentThinking",
+ "ContentThinkingTypedDict",
+ "ContentToolReference",
+ "ContentToolReferenceTypedDict",
+ "ContentToolResult",
+ "ContentToolResultTypedDict",
+ "ContentToolUse",
+ "ContentToolUseTypedDict",
+ "ContentWebSearchToolResult",
+ "ContentWebSearchToolResultError",
+ "ContentWebSearchToolResultErrorTypedDict",
+ "ContentWebSearchToolResultTypedDict",
"ContextCompressionEngine",
"ContextCompressionPlugin",
"ContextCompressionPluginID",
"ContextCompressionPluginTypedDict",
+ "ContextManagement",
+ "ContextManagementTypedDict",
+ "Contradiction",
+ "ContradictionTypedDict",
"CostDetails",
"CostDetailsTypedDict",
+ "CreateBYOKKeyRequest",
+ "CreateBYOKKeyRequestTypedDict",
+ "CreateBYOKKeyResponse",
+ "CreateBYOKKeyResponseTypedDict",
"CreateGuardrailRequest",
"CreateGuardrailRequestTypedDict",
"CreateGuardrailResponse",
"CreateGuardrailResponseTypedDict",
+ "CreateObservabilityDestinationRequest",
+ "CreateObservabilityDestinationRequestType",
+ "CreateObservabilityDestinationRequestTypedDict",
+ "CreateObservabilityDestinationResponse",
+ "CreateObservabilityDestinationResponseTypedDict",
+ "CreatePresetFromInferenceResponse",
+ "CreatePresetFromInferenceResponseTypedDict",
+ "CreateWorkspaceRequest",
+ "CreateWorkspaceRequestTypedDict",
+ "CreateWorkspaceResponse",
+ "CreateWorkspaceResponseTypedDict",
"CustomTool",
+ "CustomToolCallInputDeltaEvent",
+ "CustomToolCallInputDeltaEventType",
+ "CustomToolCallInputDeltaEventTypedDict",
+ "CustomToolCallInputDoneEvent",
+ "CustomToolCallInputDoneEventType",
+ "CustomToolCallInputDoneEventTypedDict",
+ "CustomToolCallItem",
+ "CustomToolCallItemType",
+ "CustomToolCallItemTypedDict",
+ "CustomToolCallOutputItem",
+ "CustomToolCallOutputItemDetail",
+ "CustomToolCallOutputItemOutputInputImage",
+ "CustomToolCallOutputItemOutputInputImageTypedDict",
+ "CustomToolCallOutputItemOutputUnion1",
+ "CustomToolCallOutputItemOutputUnion1TypedDict",
+ "CustomToolCallOutputItemOutputUnion2",
+ "CustomToolCallOutputItemOutputUnion2TypedDict",
+ "CustomToolCallOutputItemTypeCustomToolCallOutput",
+ "CustomToolCallOutputItemTypeInputImage",
+ "CustomToolCallOutputItemTypedDict",
+ "CustomToolTypeCustom",
"CustomToolTypedDict",
- "Data",
"DataCollection",
- "DataTypedDict",
+ "DataRegion",
"DatetimeServerTool",
"DatetimeServerToolConfig",
"DatetimeServerToolConfigTypedDict",
@@ -1640,12 +2954,17 @@ __all__ = [
"DatetimeServerToolTypedDict",
"DefaultParameters",
"DefaultParametersTypedDict",
+ "DeleteBYOKKeyResponse",
+ "DeleteBYOKKeyResponseTypedDict",
"DeleteGuardrailResponse",
"DeleteGuardrailResponseTypedDict",
+ "DeleteObservabilityDestinationResponse",
+ "DeleteObservabilityDestinationResponseTypedDict",
+ "DeleteWorkspaceResponse",
+ "DeleteWorkspaceResponseTypedDict",
"EasyInputMessage",
"EasyInputMessageContentInputImage",
"EasyInputMessageContentInputImageTypedDict",
- "EasyInputMessageContentType",
"EasyInputMessageContentUnion1",
"EasyInputMessageContentUnion1TypedDict",
"EasyInputMessageContentUnion2",
@@ -1661,18 +2980,35 @@ __all__ = [
"EasyInputMessageRoleUnion",
"EasyInputMessageRoleUnionTypedDict",
"EasyInputMessageRoleUser",
+ "EasyInputMessageTypeInputImage",
"EasyInputMessageTypeMessage",
"EasyInputMessageTypedDict",
"EdgeNetworkTimeoutResponseErrorData",
"EdgeNetworkTimeoutResponseErrorDataTypedDict",
- "Effort",
+ "Edit",
+ "EditClearThinking20251015",
+ "EditClearThinking20251015TypedDict",
+ "EditClearToolUses20250919",
+ "EditClearToolUses20250919TypedDict",
+ "EditCompact20260112",
+ "EditCompact20260112TypedDict",
+ "EditTypeInputTokens",
+ "EditTypedDict",
+ "EndpointInfo",
+ "EndpointInfoTypedDict",
"EndpointStatus",
+ "EndpointsMetadata",
+ "EndpointsMetadataTypedDict",
"Environment",
"Error",
+ "ErrorCode",
"ErrorEvent",
"ErrorEventType",
"ErrorEventTypedDict",
"ErrorTypedDict",
+ "FailedModel",
+ "FailedModelTypedDict",
+ "FieldT",
"File",
"FileCitation",
"FileCitationType",
@@ -1685,6 +3021,10 @@ __all__ = [
"FilePathTypedDict",
"FileSearchServerTool",
"FileSearchServerToolTypedDict",
+ "FileSearchServerToolValue1",
+ "FileSearchServerToolValue1TypedDict",
+ "FileSearchServerToolValue2",
+ "FileSearchServerToolValue2TypedDict",
"FileTypedDict",
"Filters",
"FiltersType",
@@ -1730,16 +3070,84 @@ __all__ = [
"FunctionCallItemTypedDict",
"FunctionCallOutputItem",
"FunctionCallOutputItemDetail",
- "FunctionCallOutputItemOutputType",
+ "FunctionCallOutputItemOutputInputImage",
+ "FunctionCallOutputItemOutputInputImageTypedDict",
"FunctionCallOutputItemOutputUnion1",
"FunctionCallOutputItemOutputUnion1TypedDict",
"FunctionCallOutputItemOutputUnion2",
"FunctionCallOutputItemOutputUnion2TypedDict",
"FunctionCallOutputItemStatus",
"FunctionCallOutputItemTypeFunctionCallOutput",
+ "FunctionCallOutputItemTypeInputImage",
"FunctionCallOutputItemTypedDict",
+ "FusionAnalysisResult",
+ "FusionAnalysisResultTypedDict",
+ "FusionCallAnalysisCompletedEvent",
+ "FusionCallAnalysisCompletedEventType",
+ "FusionCallAnalysisCompletedEventTypedDict",
+ "FusionCallAnalysisInProgressEvent",
+ "FusionCallAnalysisInProgressEventType",
+ "FusionCallAnalysisInProgressEventTypedDict",
+ "FusionCallCompletedEvent",
+ "FusionCallCompletedEventType",
+ "FusionCallCompletedEventTypedDict",
+ "FusionCallInProgressEvent",
+ "FusionCallInProgressEventType",
+ "FusionCallInProgressEventTypedDict",
+ "FusionCallPanelAddedEvent",
+ "FusionCallPanelAddedEventType",
+ "FusionCallPanelAddedEventTypedDict",
+ "FusionCallPanelCompletedEvent",
+ "FusionCallPanelCompletedEventType",
+ "FusionCallPanelCompletedEventTypedDict",
+ "FusionCallPanelDeltaEvent",
+ "FusionCallPanelDeltaEventType",
+ "FusionCallPanelDeltaEventTypedDict",
+ "FusionCallPanelFailedEvent",
+ "FusionCallPanelFailedEventType",
+ "FusionCallPanelFailedEventTypedDict",
+ "FusionCallPanelReasoningDeltaEvent",
+ "FusionCallPanelReasoningDeltaEventType",
+ "FusionCallPanelReasoningDeltaEventTypedDict",
+ "FusionPlugin",
+ "FusionPluginID",
+ "FusionPluginTool",
+ "FusionPluginToolTypedDict",
+ "FusionPluginTypedDict",
+ "FusionServerToolConfig",
+ "FusionServerToolConfigEffort",
+ "FusionServerToolConfigReasoning",
+ "FusionServerToolConfigReasoningTypedDict",
+ "FusionServerToolConfigTool",
+ "FusionServerToolConfigToolTypedDict",
+ "FusionServerToolConfigTypedDict",
+ "FusionServerToolOpenRouter",
+ "FusionServerToolOpenRouterType",
+ "FusionServerToolOpenRouterTypedDict",
+ "GenerationContentData",
+ "GenerationContentDataOutput",
+ "GenerationContentDataOutputTypedDict",
+ "GenerationContentDataTypedDict",
+ "GenerationContentResponse",
+ "GenerationContentResponseTypedDict",
+ "GenerationResponse",
+ "GenerationResponseData",
+ "GenerationResponseDataTypedDict",
+ "GenerationResponseTypedDict",
+ "GetBYOKKeyResponse",
+ "GetBYOKKeyResponseTypedDict",
"GetGuardrailResponse",
"GetGuardrailResponseTypedDict",
+ "GetObservabilityDestinationResponse",
+ "GetObservabilityDestinationResponseTypedDict",
+ "GetPresetResponse",
+ "GetPresetResponseTypedDict",
+ "GetPresetVersionResponse",
+ "GetPresetVersionResponseTypedDict",
+ "GetWorkspaceResponse",
+ "GetWorkspaceResponseTypedDict",
+ "Group",
+ "GroupTypedDict",
"Guardrail",
"GuardrailInterval",
"GuardrailTypedDict",
@@ -1772,6 +3180,10 @@ __all__ = [
"ImageGenerationStatus",
"IncompleteDetails",
"IncompleteDetailsTypedDict",
+ "Input1",
+ "Input1TypedDict",
+ "Input2",
+ "Input2TypedDict",
"InputAudio",
"InputAudioInputAudio",
"InputAudioInputAudioTypedDict",
@@ -1790,7 +3202,6 @@ __all__ = [
"InputMessageItem",
"InputMessageItemContentInputImage",
"InputMessageItemContentInputImageTypedDict",
- "InputMessageItemContentType",
"InputMessageItemContentUnion",
"InputMessageItemContentUnionTypedDict",
"InputMessageItemDetail",
@@ -1799,14 +3210,21 @@ __all__ = [
"InputMessageItemRoleUnion",
"InputMessageItemRoleUnionTypedDict",
"InputMessageItemRoleUser",
+ "InputMessageItemTypeInputImage",
"InputMessageItemTypeMessage",
"InputMessageItemTypedDict",
"InputModality",
+ "InputReference",
+ "InputReferenceTypedDict",
+ "InputSchema",
+ "InputSchemaTypedDict",
"InputText",
"InputTextType",
"InputTextTypedDict",
"InputTokensDetails",
"InputTokensDetailsTypedDict",
+ "InputUnion",
+ "InputUnionTypedDict",
"InputVideo",
"InputVideoType",
"InputVideoTypedDict",
@@ -1842,6 +3260,15 @@ __all__ = [
"InstructType",
"InternalServerResponseErrorData",
"InternalServerResponseErrorDataTypedDict",
+ "ItemReferenceItem",
+ "ItemReferenceItemType",
+ "ItemReferenceItemTypedDict",
+ "Keep",
+ "KeepAll",
+ "KeepAllTypedDict",
+ "KeepEnum",
+ "KeepType",
+ "KeepTypedDict",
"KeyAssignment",
"KeyAssignmentTypedDict",
"LegacyChatContentVideo",
@@ -1850,6 +3277,8 @@ __all__ = [
"LegacyWebSearchServerTool",
"LegacyWebSearchServerToolType",
"LegacyWebSearchServerToolTypedDict",
+ "ListBYOKKeysResponse",
+ "ListBYOKKeysResponseTypedDict",
"ListEndpointsResponse",
"ListEndpointsResponseTypedDict",
"ListGuardrailsResponse",
@@ -1858,16 +3287,82 @@ __all__ = [
"ListKeyAssignmentsResponseTypedDict",
"ListMemberAssignmentsResponse",
"ListMemberAssignmentsResponseTypedDict",
+ "ListObservabilityDestinationsResponse",
+ "ListObservabilityDestinationsResponseTypedDict",
+ "ListPresetVersionsResponse",
+ "ListPresetVersionsResponseTypedDict",
+ "ListPresetsResponse",
+ "ListPresetsResponseTypedDict",
+ "ListWorkspacesResponse",
+ "ListWorkspacesResponseTypedDict",
+ "LocalShellCallItem",
+ "LocalShellCallItemAction",
+ "LocalShellCallItemActionTypedDict",
+ "LocalShellCallItemTypedDict",
+ "LocalShellCallOutputItem",
+ "LocalShellCallOutputItemStatus",
+ "LocalShellCallOutputItemType",
+ "LocalShellCallOutputItemTypedDict",
+ "Logic",
"Logprob",
"LogprobTypedDict",
"MaxPrice",
"MaxPriceTypedDict",
+ "McpApprovalRequestItem",
+ "McpApprovalRequestItemType",
+ "McpApprovalRequestItemTypedDict",
+ "McpApprovalResponseItem",
+ "McpApprovalResponseItemType",
+ "McpApprovalResponseItemTypedDict",
+ "McpCallItem",
+ "McpCallItemType",
+ "McpCallItemTypedDict",
+ "McpListToolsItem",
+ "McpListToolsItemTool",
+ "McpListToolsItemToolTypedDict",
+ "McpListToolsItemType",
+ "McpListToolsItemTypedDict",
"McpServerTool",
"McpServerToolType",
"McpServerToolTypedDict",
"MemberAssignment",
"MemberAssignmentTypedDict",
"MemoryLimit",
+ "MessagesAdvisorToolResultBlock",
+ "MessagesAdvisorToolResultBlockType",
+ "MessagesAdvisorToolResultBlockTypedDict",
+ "MessagesMessageParam",
+ "MessagesMessageParamContentUnion1",
+ "MessagesMessageParamContentUnion1TypedDict",
+ "MessagesMessageParamContentUnion2",
+ "MessagesMessageParamContentUnion2TypedDict",
+ "MessagesMessageParamContentUnion3",
+ "MessagesMessageParamContentUnion3TypedDict",
+ "MessagesMessageParamContentUnion4",
+ "MessagesMessageParamContentUnion4TypedDict",
+ "MessagesMessageParamContentUnion5",
+ "MessagesMessageParamContentUnion5TypedDict",
+ "MessagesMessageParamRole",
+ "MessagesMessageParamTypeCompaction",
+ "MessagesMessageParamTypedDict",
+ "MessagesOutputConfig",
+ "MessagesOutputConfigEffort",
+ "MessagesOutputConfigFormat",
+ "MessagesOutputConfigFormatTypedDict",
+ "MessagesOutputConfigTypeJSONSchema",
+ "MessagesOutputConfigTypedDict",
+ "MessagesRequest",
+ "MessagesRequestPlugin",
+ "MessagesRequestPluginTypedDict",
+ "MessagesRequestTool",
+ "MessagesRequestToolTypedDict",
+ "MessagesRequestToolUnion",
+ "MessagesRequestToolUnionTypedDict",
+ "MessagesRequestTypedDict",
+ "Metadata",
+ "MetadataLevel",
+ "MetadataTypedDict",
+ "Method",
"Modality",
"Mode",
"ModeAuto",
@@ -1883,6 +3378,8 @@ __all__ = [
"ModelLinksTypedDict",
"ModelTypedDict",
"ModelsCountResponse",
+ "ModelsCountResponseData",
+ "ModelsCountResponseDataTypedDict",
"ModelsCountResponseTypedDict",
"ModelsListResponse",
"ModelsListResponseTypedDict",
@@ -1890,12 +3387,120 @@ __all__ = [
"ModerationPlugin",
"ModerationPluginID",
"ModerationPluginTypedDict",
+ "MultimodalMedia",
+ "MultimodalMediaTypedDict",
+ "NameAdvisor",
+ "NameBash",
+ "NameStrReplaceEditor",
+ "NameWebSearch1",
+ "NameWebSearch2",
"Never",
"NeverTypedDict",
"NotFoundResponseErrorData",
"NotFoundResponseErrorDataTypedDict",
+ "ObservabilityArizeDestination",
+ "ObservabilityArizeDestinationConfig",
+ "ObservabilityArizeDestinationConfigTypedDict",
+ "ObservabilityArizeDestinationType",
+ "ObservabilityArizeDestinationTypedDict",
+ "ObservabilityBraintrustDestination",
+ "ObservabilityBraintrustDestinationConfig",
+ "ObservabilityBraintrustDestinationConfigTypedDict",
+ "ObservabilityBraintrustDestinationType",
+ "ObservabilityBraintrustDestinationTypedDict",
+ "ObservabilityClickhouseDestination",
+ "ObservabilityClickhouseDestinationConfig",
+ "ObservabilityClickhouseDestinationConfigTypedDict",
+ "ObservabilityClickhouseDestinationType",
+ "ObservabilityClickhouseDestinationTypedDict",
+ "ObservabilityDatadogDestination",
+ "ObservabilityDatadogDestinationConfig",
+ "ObservabilityDatadogDestinationConfigTypedDict",
+ "ObservabilityDatadogDestinationType",
+ "ObservabilityDatadogDestinationTypedDict",
+ "ObservabilityDestination",
+ "ObservabilityDestinationTypedDict",
+ "ObservabilityFilterRulesConfig",
+ "ObservabilityFilterRulesConfigTypedDict",
+ "ObservabilityFilterRulesConfigValue",
+ "ObservabilityFilterRulesConfigValueTypedDict",
+ "ObservabilityGrafanaDestination",
+ "ObservabilityGrafanaDestinationConfig",
+ "ObservabilityGrafanaDestinationConfigTypedDict",
+ "ObservabilityGrafanaDestinationType",
+ "ObservabilityGrafanaDestinationTypedDict",
+ "ObservabilityLangfuseDestination",
+ "ObservabilityLangfuseDestinationConfig",
+ "ObservabilityLangfuseDestinationConfigTypedDict",
+ "ObservabilityLangfuseDestinationType",
+ "ObservabilityLangfuseDestinationTypedDict",
+ "ObservabilityLangsmithDestination",
+ "ObservabilityLangsmithDestinationConfig",
+ "ObservabilityLangsmithDestinationConfigTypedDict",
+ "ObservabilityLangsmithDestinationType",
+ "ObservabilityLangsmithDestinationTypedDict",
+ "ObservabilityNewrelicDestination",
+ "ObservabilityNewrelicDestinationConfig",
+ "ObservabilityNewrelicDestinationConfigTypedDict",
+ "ObservabilityNewrelicDestinationType",
+ "ObservabilityNewrelicDestinationTypedDict",
+ "ObservabilityOpikDestination",
+ "ObservabilityOpikDestinationConfig",
+ "ObservabilityOpikDestinationConfigTypedDict",
+ "ObservabilityOpikDestinationType",
+ "ObservabilityOpikDestinationTypedDict",
+ "ObservabilityOtelCollectorDestination",
+ "ObservabilityOtelCollectorDestinationConfig",
+ "ObservabilityOtelCollectorDestinationConfigTypedDict",
+ "ObservabilityOtelCollectorDestinationType",
+ "ObservabilityOtelCollectorDestinationTypedDict",
+ "ObservabilityPosthogDestination",
+ "ObservabilityPosthogDestinationConfig",
+ "ObservabilityPosthogDestinationConfigTypedDict",
+ "ObservabilityPosthogDestinationType",
+ "ObservabilityPosthogDestinationTypedDict",
+ "ObservabilityRampDestination",
+ "ObservabilityRampDestinationConfig",
+ "ObservabilityRampDestinationConfigTypedDict",
+ "ObservabilityRampDestinationType",
+ "ObservabilityRampDestinationTypedDict",
+ "ObservabilityS3Destination",
+ "ObservabilityS3DestinationConfig",
+ "ObservabilityS3DestinationConfigTypedDict",
+ "ObservabilityS3DestinationType",
+ "ObservabilityS3DestinationTypedDict",
+ "ObservabilitySentryDestination",
+ "ObservabilitySentryDestinationConfig",
+ "ObservabilitySentryDestinationConfigTypedDict",
+ "ObservabilitySentryDestinationType",
+ "ObservabilitySentryDestinationTypedDict",
+ "ObservabilitySnowflakeDestination",
+ "ObservabilitySnowflakeDestinationConfig",
+ "ObservabilitySnowflakeDestinationConfigTypedDict",
+ "ObservabilitySnowflakeDestinationType",
+ "ObservabilitySnowflakeDestinationTypedDict",
+ "ObservabilityWeaveDestination",
+ "ObservabilityWeaveDestinationConfig",
+ "ObservabilityWeaveDestinationConfigTypedDict",
+ "ObservabilityWeaveDestinationType",
+ "ObservabilityWeaveDestinationTypedDict",
+ "ObservabilityWebhookDestination",
+ "ObservabilityWebhookDestinationConfig",
+ "ObservabilityWebhookDestinationConfigTypedDict",
+ "ObservabilityWebhookDestinationType",
+ "ObservabilityWebhookDestinationTypedDict",
"Only",
"OnlyTypedDict",
+ "OpenAIResponseCustomToolCall",
+ "OpenAIResponseCustomToolCallOutput",
+ "OpenAIResponseCustomToolCallOutputOutput1",
+ "OpenAIResponseCustomToolCallOutputOutput1TypedDict",
+ "OpenAIResponseCustomToolCallOutputOutput2",
+ "OpenAIResponseCustomToolCallOutputOutput2TypedDict",
+ "OpenAIResponseCustomToolCallOutputType",
+ "OpenAIResponseCustomToolCallOutputTypedDict",
+ "OpenAIResponseCustomToolCallType",
+ "OpenAIResponseCustomToolCallTypedDict",
"OpenAIResponseFunctionToolCall",
"OpenAIResponseFunctionToolCallOutput",
"OpenAIResponseFunctionToolCallOutputOutput1",
@@ -1924,12 +3529,18 @@ __all__ = [
"OpenAIResponsesRefusalContentTypedDict",
"OpenAIResponsesResponseStatus",
"OpenAIResponsesToolChoice",
+ "OpenAIResponsesToolChoiceApplyPatch",
+ "OpenAIResponsesToolChoiceApplyPatchTypedDict",
"OpenAIResponsesToolChoiceAuto",
"OpenAIResponsesToolChoiceFunction",
"OpenAIResponsesToolChoiceFunctionTypedDict",
"OpenAIResponsesToolChoiceNone",
"OpenAIResponsesToolChoiceRequired",
+ "OpenAIResponsesToolChoiceShell",
+ "OpenAIResponsesToolChoiceShellTypedDict",
+ "OpenAIResponsesToolChoiceTypeApplyPatch",
"OpenAIResponsesToolChoiceTypeFunction",
+ "OpenAIResponsesToolChoiceTypeShell",
"OpenAIResponsesToolChoiceTypeWebSearchPreview",
"OpenAIResponsesToolChoiceTypeWebSearchPreview20250311",
"OpenAIResponsesToolChoiceTypedDict",
@@ -1950,13 +3561,28 @@ __all__ = [
"OpenResponsesResultToolUnionTypedDict",
"OpenResponsesResultType",
"OpenResponsesResultTypedDict",
+ "OpenRouterMetadata",
+ "OpenRouterMetadataTypedDict",
"OpenRouterWebSearchServerTool",
"OpenRouterWebSearchServerToolType",
"OpenRouterWebSearchServerToolTypedDict",
+ "Operator",
"Options",
"OptionsTypedDict",
"Order",
"OrderTypedDict",
+ "Outcome",
+ "OutcomeExit",
+ "OutcomeExitTypedDict",
+ "OutcomeTimeout",
+ "OutcomeTimeoutTypedDict",
+ "OutcomeTypedDict",
+ "OutputAdvisorServerToolItem",
+ "OutputAdvisorServerToolItemType",
+ "OutputAdvisorServerToolItemTypedDict",
+ "OutputApplyPatchCallItem",
+ "OutputApplyPatchCallItemType",
+ "OutputApplyPatchCallItemTypedDict",
"OutputApplyPatchServerToolItem",
"OutputApplyPatchServerToolItemType",
"OutputApplyPatchServerToolItemTypedDict",
@@ -1969,6 +3595,7 @@ __all__ = [
"OutputCodeInterpreterCallItem",
"OutputCodeInterpreterCallItemOutputUnion",
"OutputCodeInterpreterCallItemOutputUnionTypedDict",
+ "OutputCodeInterpreterCallItemTypeImage",
"OutputCodeInterpreterCallItemTypedDict",
"OutputCodeInterpreterServerToolItem",
"OutputCodeInterpreterServerToolItemType",
@@ -1977,6 +3604,9 @@ __all__ = [
"OutputComputerCallItemStatus",
"OutputComputerCallItemType",
"OutputComputerCallItemTypedDict",
+ "OutputCustomToolCallItem",
+ "OutputCustomToolCallItemType",
+ "OutputCustomToolCallItemTypedDict",
"OutputDatetimeItem",
"OutputDatetimeItemType",
"OutputDatetimeItemTypedDict",
@@ -1995,6 +3625,9 @@ __all__ = [
"OutputFunctionCallItemStatusUnionTypedDict",
"OutputFunctionCallItemType",
"OutputFunctionCallItemTypedDict",
+ "OutputFusionServerToolItem",
+ "OutputFusionServerToolItemType",
+ "OutputFusionServerToolItemTypedDict",
"OutputImage",
"OutputImageGenerationCallItem",
"OutputImageGenerationCallItemType",
@@ -2003,8 +3636,6 @@ __all__ = [
"OutputImageGenerationServerToolItemType",
"OutputImageGenerationServerToolItemTypedDict",
"OutputImageTypedDict",
- "OutputInputImage",
- "OutputInputImageTypedDict",
"OutputItemImageGenerationCall",
"OutputItemImageGenerationCallType",
"OutputItemImageGenerationCallTypedDict",
@@ -2058,6 +3689,19 @@ __all__ = [
"OutputReasoningItemStatusUnionTypedDict",
"OutputReasoningItemType",
"OutputReasoningItemTypedDict",
+ "OutputSearchModelsServerToolItem",
+ "OutputSearchModelsServerToolItemType",
+ "OutputSearchModelsServerToolItemTypedDict",
+ "OutputShellCallItem",
+ "OutputShellCallItemAction",
+ "OutputShellCallItemActionTypedDict",
+ "OutputShellCallItemType",
+ "OutputShellCallItemTypedDict",
+ "OutputShellCallOutputItem",
+ "OutputShellCallOutputItemOutput",
+ "OutputShellCallOutputItemOutputTypedDict",
+ "OutputShellCallOutputItemTypeShellCallOutput",
+ "OutputShellCallOutputItemTypedDict",
"OutputTextEditorServerToolItem",
"OutputTextEditorServerToolItemType",
"OutputTextEditorServerToolItemTypedDict",
@@ -2070,9 +3714,17 @@ __all__ = [
"OutputWebFetchServerToolItemType",
"OutputWebFetchServerToolItemTypedDict",
"OutputWebSearchCallItem",
+ "OutputWebSearchCallItemActionSearch",
+ "OutputWebSearchCallItemActionSearchTypedDict",
"OutputWebSearchCallItemTypedDict",
"OutputWebSearchServerToolItem",
- "OutputWebSearchServerToolItemType",
+ "OutputWebSearchServerToolItemAction",
+ "OutputWebSearchServerToolItemActionTypedDict",
+ "OutputWebSearchServerToolItemSource",
+ "OutputWebSearchServerToolItemSourceTypedDict",
+ "OutputWebSearchServerToolItemTypeOpenrouterWebSearch",
+ "OutputWebSearchServerToolItemTypeSearch",
+ "OutputWebSearchServerToolItemTypeURL",
"OutputWebSearchServerToolItemTypedDict",
"PDFParserEngine",
"PDFParserEngineEnum",
@@ -2081,8 +3733,11 @@ __all__ = [
"PDFParserOptions",
"PDFParserOptionsTypedDict",
"Parameter",
- "Parameters",
- "ParametersTypedDict",
+ "ParetoRouterPlugin",
+ "ParetoRouterPluginID",
+ "ParetoRouterPluginTypedDict",
+ "PartialCoverage",
+ "PartialCoverageTypedDict",
"Partition",
"PayloadTooLargeResponseErrorData",
"PayloadTooLargeResponseErrorDataTypedDict",
@@ -2098,10 +3753,20 @@ __all__ = [
"PercentileStatsTypedDict",
"PercentileThroughputCutoffs",
"PercentileThroughputCutoffsTypedDict",
+ "PipelineStage",
+ "PipelineStageType",
+ "PipelineStageTypedDict",
"PreferredMaxLatency",
"PreferredMaxLatencyTypedDict",
"PreferredMinThroughput",
"PreferredMinThroughputTypedDict",
+ "Preset",
+ "PresetDesignatedVersion",
+ "PresetDesignatedVersionTypedDict",
+ "PresetStatus",
+ "PresetTypedDict",
+ "PresetWithDesignatedVersion",
+ "PresetWithDesignatedVersionTypedDict",
"Preview20250311WebSearchServerTool",
"Preview20250311WebSearchServerToolType",
"Preview20250311WebSearchServerToolTypedDict",
@@ -2113,10 +3778,12 @@ __all__ = [
"PreviewWebSearchUserLocationTypedDict",
"Pricing",
"PricingTypedDict",
+ "PromptInjectionScanScope",
"PromptTokensDetails",
"PromptTokensDetailsTypedDict",
- "Provider",
"ProviderName",
+ "ProviderOptions",
+ "ProviderOptionsTypedDict",
"ProviderOverloadedResponseErrorData",
"ProviderOverloadedResponseErrorDataTypedDict",
"ProviderPreferences",
@@ -2127,7 +3794,6 @@ __all__ = [
"ProviderSort",
"ProviderSortConfig",
"ProviderSortConfigTypedDict",
- "ProviderTypedDict",
"PublicEndpoint",
"PublicEndpointQuantization",
"PublicEndpointTypedDict",
@@ -2138,8 +3804,13 @@ __all__ = [
"Ranker",
"RankingOptions",
"RankingOptionsTypedDict",
+ "RankingsDailyItem",
+ "RankingsDailyItemTypedDict",
+ "RankingsDailyMeta",
+ "RankingsDailyMetaTypedDict",
+ "RankingsDailyResponse",
+ "RankingsDailyResponseTypedDict",
"Reason",
- "Reasoning",
"ReasoningConfig",
"ReasoningConfigTypedDict",
"ReasoningDeltaEvent",
@@ -2188,13 +3859,13 @@ __all__ = [
"ReasoningTextContent",
"ReasoningTextContentType",
"ReasoningTextContentTypedDict",
- "ReasoningTypedDict",
"RefusalDeltaEvent",
"RefusalDeltaEventType",
"RefusalDeltaEventTypedDict",
"RefusalDoneEvent",
"RefusalDoneEventType",
"RefusalDoneEventTypedDict",
+ "Region",
"RequestTimeoutResponseErrorData",
"RequestTimeoutResponseErrorDataTypedDict",
"RequireApproval",
@@ -2204,7 +3875,9 @@ __all__ = [
"RequireApprovalUnion",
"RequireApprovalUnionTypedDict",
"Resolution",
+ "Response",
"ResponseFormat",
+ "ResponseFormatEnum",
"ResponseFormatTypedDict",
"ResponseHealingPlugin",
"ResponseHealingPluginID",
@@ -2215,6 +3888,7 @@ __all__ = [
"ResponseOutputTextTopLogprobTypedDict",
"ResponseOutputTextType",
"ResponseOutputTextTypedDict",
+ "ResponseTypedDict",
"ResponsesErrorField",
"ResponsesErrorFieldTypedDict",
"ResponsesRequest",
@@ -2227,6 +3901,25 @@ __all__ = [
"ResponsesRequestToolUnionTypedDict",
"ResponsesRequestType",
"ResponsesRequestTypedDict",
+ "ResponsesStreamingResponse",
+ "ResponsesStreamingResponseTypedDict",
+ "RouterAttempt",
+ "RouterAttemptTypedDict",
+ "RouterParams",
+ "RouterParamsTypedDict",
+ "RoutingStrategy",
+ "Rule",
+ "RuleTypedDict",
+ "STTInputAudio",
+ "STTInputAudioTypedDict",
+ "STTRequest",
+ "STTRequestProvider",
+ "STTRequestProviderTypedDict",
+ "STTRequestTypedDict",
+ "STTResponse",
+ "STTResponseTypedDict",
+ "STTUsage",
+ "STTUsageTypedDict",
"SearchContextSizeEnum",
"SearchModelsServerToolConfig",
"SearchModelsServerToolConfigTypedDict",
@@ -2235,13 +3928,61 @@ __all__ = [
"SecurityTypedDict",
"ServiceUnavailableResponseErrorData",
"ServiceUnavailableResponseErrorDataTypedDict",
+ "ShellCallItem",
+ "ShellCallItemAction",
+ "ShellCallItemActionTypedDict",
+ "ShellCallItemStatus",
+ "ShellCallItemType",
+ "ShellCallItemTypedDict",
+ "ShellCallOutputItem",
+ "ShellCallOutputItemOutput",
+ "ShellCallOutputItemOutputTypedDict",
+ "ShellCallOutputItemStatus",
+ "ShellCallOutputItemType",
+ "ShellCallOutputItemTypedDict",
+ "ShellCallStatus",
"ShellServerTool",
+ "ShellServerToolConfig",
+ "ShellServerToolConfigTypedDict",
+ "ShellServerToolEngine",
+ "ShellServerToolEnvironment",
+ "ShellServerToolEnvironmentTypedDict",
+ "ShellServerToolOpenRouter",
+ "ShellServerToolOpenRouterType",
+ "ShellServerToolOpenRouterTypedDict",
"ShellServerToolType",
"ShellServerToolTypedDict",
"Size",
"Sort",
"SortTypedDict",
+ "SourceContent",
+ "SourceContentTypedDict",
+ "SourceType",
+ "SpeechRequest",
+ "SpeechRequestProvider",
+ "SpeechRequestProviderTypedDict",
+ "SpeechRequestTypedDict",
+ "Speed",
+ "Stance",
+ "StanceTypedDict",
"Stop",
+ "StopServerToolsWhenCondition",
+ "StopServerToolsWhenConditionTypedDict",
+ "StopServerToolsWhenFinishReasonIs",
+ "StopServerToolsWhenFinishReasonIsType",
+ "StopServerToolsWhenFinishReasonIsTypedDict",
+ "StopServerToolsWhenHasToolCall",
+ "StopServerToolsWhenHasToolCallType",
+ "StopServerToolsWhenHasToolCallTypedDict",
+ "StopServerToolsWhenMaxCost",
+ "StopServerToolsWhenMaxCostType",
+ "StopServerToolsWhenMaxCostTypedDict",
+ "StopServerToolsWhenMaxTokensUsed",
+ "StopServerToolsWhenMaxTokensUsedType",
+ "StopServerToolsWhenMaxTokensUsedTypedDict",
+ "StopServerToolsWhenStepCountIs",
+ "StopServerToolsWhenStepCountIsType",
+ "StopServerToolsWhenStepCountIsTypedDict",
"StopTypedDict",
"StoredPromptTemplate",
"StoredPromptTemplateTypedDict",
@@ -2271,9 +4012,10 @@ __all__ = [
"SupportedResolution",
"SupportedSize",
"Syntax",
- "TextConfig",
- "TextConfigTypedDict",
- "TextConfigVerbosity",
+ "System",
+ "SystemTypedDict",
+ "TaskBudget",
+ "TaskBudgetTypedDict",
"TextDeltaEvent",
"TextDeltaEventType",
"TextDeltaEventTypedDict",
@@ -2282,51 +4024,130 @@ __all__ = [
"TextDoneEventTypedDict",
"TextExtendedConfig",
"TextExtendedConfigTypedDict",
- "TextExtendedConfigVerbosity",
+ "Thinking",
+ "ThinkingAdaptive",
+ "ThinkingAdaptiveTypedDict",
+ "ThinkingDisabled",
+ "ThinkingDisabledTypedDict",
+ "ThinkingEnabled",
+ "ThinkingEnabledTypedDict",
+ "ThinkingTypedDict",
"Tokenizer",
"TooManyRequestsResponseErrorData",
"TooManyRequestsResponseErrorDataTypedDict",
+ "ToolAdvisor20260301",
+ "ToolAdvisor20260301TypedDict",
+ "ToolBash20250124",
+ "ToolBash20250124TypedDict",
"ToolCallStatus",
+ "ToolChoice",
"ToolChoiceAllowed",
"ToolChoiceAllowedType",
"ToolChoiceAllowedTypedDict",
+ "ToolChoiceAny",
+ "ToolChoiceAnyTypedDict",
+ "ToolChoiceAuto",
+ "ToolChoiceAutoTypedDict",
+ "ToolChoiceNone",
+ "ToolChoiceNoneTypedDict",
+ "ToolChoiceTool",
+ "ToolChoiceToolTypedDict",
+ "ToolChoiceTypeAuto",
+ "ToolChoiceTypedDict",
+ "ToolCustom",
+ "ToolCustomTypedDict",
+ "ToolTextEditor20250124",
+ "ToolTextEditor20250124TypedDict",
+ "ToolTypeCustom",
+ "ToolTypeEphemeral",
+ "ToolWebSearch20250305",
+ "ToolWebSearch20250305TypedDict",
+ "ToolWebSearch20260209",
+ "ToolWebSearch20260209TypedDict",
"TopProviderInfo",
"TopProviderInfoTypedDict",
"TraceConfig",
"TraceConfigTypedDict",
+ "Trigger",
+ "TriggerInputTokens",
+ "TriggerInputTokensTypedDict",
+ "TriggerTypedDict",
"Truncation",
"Type",
+ "TypeAdaptive",
+ "TypeAdvisor20260301",
+ "TypeAny",
+ "TypeBash20250124",
+ "TypeClearThinking20251015",
+ "TypeClearToolUses20250919",
"TypeCodeInterpreter",
"TypeCodeInterpreterCall",
- "TypeCustom",
+ "TypeCompact20260112",
+ "TypeDisabled",
+ "TypeDocument",
+ "TypeEnabled",
+ "TypeExec",
+ "TypeExit",
"TypeFileSearch",
"TypeFindInPage",
- "TypeImage",
+ "TypeLocalShellCall",
"TypeLogs",
+ "TypeNone",
"TypeOpenPage",
- "TypeSearch",
+ "TypeRedactedThinking",
+ "TypeServerToolUse",
+ "TypeTextEditor20250124",
+ "TypeThinking",
+ "TypeTimeout",
+ "TypeTokens",
+ "TypeTool",
+ "TypeToolReference",
+ "TypeToolResult",
+ "TypeToolUse",
"TypeTypedDict",
+ "TypeWebSearch20250305",
+ "TypeWebSearch20260209",
"TypeWebSearchCall",
+ "TypeWebSearchToolResult",
+ "TypeWebSearchToolResultError",
"URLCitation",
"URLCitationType",
"URLCitationTypedDict",
"UnauthorizedResponseErrorData",
"UnauthorizedResponseErrorDataTypedDict",
+ "UniqueInsight",
+ "UniqueInsightTypedDict",
"UnprocessableEntityResponseErrorData",
"UnprocessableEntityResponseErrorDataTypedDict",
+ "UpdateBYOKKeyRequest",
+ "UpdateBYOKKeyRequestTypedDict",
+ "UpdateBYOKKeyResponse",
+ "UpdateBYOKKeyResponseTypedDict",
"UpdateGuardrailRequest",
"UpdateGuardrailRequestTypedDict",
"UpdateGuardrailResponse",
"UpdateGuardrailResponseTypedDict",
+ "UpdateObservabilityDestinationRequest",
+ "UpdateObservabilityDestinationRequestTypedDict",
+ "UpdateObservabilityDestinationResponse",
+ "UpdateObservabilityDestinationResponseTypedDict",
+ "UpdateWorkspaceRequest",
+ "UpdateWorkspaceRequestTypedDict",
+ "UpdateWorkspaceResponse",
+ "UpdateWorkspaceResponseTypedDict",
"Usage",
+ "UsageCostDetails",
+ "UsageCostDetailsTypedDict",
"UsageTypedDict",
- "Value1",
- "Value1TypedDict",
- "Value2",
- "Value2TypedDict",
+ "UserLocation",
+ "UserLocationTypedDict",
"Variables",
"VariablesTypedDict",
+ "Verbosity",
+ "Version",
"VideoGenerationRequest",
+ "VideoGenerationRequestProvider",
+ "VideoGenerationRequestProviderTypedDict",
"VideoGenerationRequestTypedDict",
"VideoGenerationResponse",
"VideoGenerationResponseStatus",
@@ -2337,6 +4158,17 @@ __all__ = [
"VideoModelTypedDict",
"VideoModelsListResponse",
"VideoModelsListResponseTypedDict",
+ "VideoURL",
+ "VideoURLTypedDict",
+ "WebFetchEngineEnum",
+ "WebFetchPlugin",
+ "WebFetchPluginID",
+ "WebFetchPluginTypedDict",
+ "WebFetchServerTool",
+ "WebFetchServerToolConfig",
+ "WebFetchServerToolConfigTypedDict",
+ "WebFetchServerToolType",
+ "WebFetchServerToolTypedDict",
"WebSearchCallCompletedEvent",
"WebSearchCallCompletedEventType",
"WebSearchCallCompletedEventTypedDict",
@@ -2354,8 +4186,11 @@ __all__ = [
"WebSearchEngineEnum",
"WebSearchPlugin",
"WebSearchPluginID",
+ "WebSearchPluginType",
"WebSearchPluginTypedDict",
"WebSearchServerTool",
+ "WebSearchServerToolConfig",
+ "WebSearchServerToolConfigTypedDict",
"WebSearchServerToolOpenRouter",
"WebSearchServerToolOpenRouterType",
"WebSearchServerToolOpenRouterTypedDict",
@@ -2371,6 +4206,11 @@ __all__ = [
"WebSearchUserLocationServerToolTypedDict",
"WebSearchUserLocationType",
"WebSearchUserLocationTypedDict",
+ "Workspace",
+ "WorkspaceMember",
+ "WorkspaceMemberRole",
+ "WorkspaceMemberTypedDict",
+ "WorkspaceTypedDict",
]
_dynamic_imports: dict[str, str] = {
@@ -2378,16 +4218,146 @@ _dynamic_imports: dict[str, str] = {
"ActivityItemTypedDict": ".activityitem",
"ActivityResponse": ".activityresponse",
"ActivityResponseTypedDict": ".activityresponse",
+ "AdvisorNestedTool": ".advisornestedtool",
+ "AdvisorNestedToolTypedDict": ".advisornestedtool",
+ "AdvisorReasoning": ".advisorreasoning",
+ "AdvisorReasoningEffort": ".advisorreasoning",
+ "AdvisorReasoningTypedDict": ".advisorreasoning",
+ "AdvisorServerToolOpenRouter": ".advisorservertool_openrouter",
+ "AdvisorServerToolOpenRouterType": ".advisorservertool_openrouter",
+ "AdvisorServerToolOpenRouterTypedDict": ".advisorservertool_openrouter",
+ "AdvisorServerToolConfig": ".advisorservertoolconfig",
+ "AdvisorServerToolConfigTypedDict": ".advisorservertoolconfig",
"AnnotationAddedEvent": ".annotationaddedevent",
"AnnotationAddedEventType": ".annotationaddedevent",
"AnnotationAddedEventTypedDict": ".annotationaddedevent",
+ "AnthropicAllowedCallers": ".anthropicallowedcallers",
+ "AnthropicBase64ImageSource": ".anthropicbase64imagesource",
+ "AnthropicBase64ImageSourceType": ".anthropicbase64imagesource",
+ "AnthropicBase64ImageSourceTypedDict": ".anthropicbase64imagesource",
+ "AnthropicBase64PdfSource": ".anthropicbase64pdfsource",
+ "AnthropicBase64PdfSourceMediaType": ".anthropicbase64pdfsource",
+ "AnthropicBase64PdfSourceType": ".anthropicbase64pdfsource",
+ "AnthropicBase64PdfSourceTypedDict": ".anthropicbase64pdfsource",
"AnthropicCacheControlDirective": ".anthropiccachecontroldirective",
"AnthropicCacheControlDirectiveType": ".anthropiccachecontroldirective",
"AnthropicCacheControlDirectiveTypedDict": ".anthropiccachecontroldirective",
"AnthropicCacheControlTTL": ".anthropiccachecontrolttl",
+ "AnthropicCitationCharLocationParam": ".anthropiccitationcharlocationparam",
+ "AnthropicCitationCharLocationParamType": ".anthropiccitationcharlocationparam",
+ "AnthropicCitationCharLocationParamTypedDict": ".anthropiccitationcharlocationparam",
+ "AnthropicCitationContentBlockLocationParam": ".anthropiccitationcontentblocklocationparam",
+ "AnthropicCitationContentBlockLocationParamType": ".anthropiccitationcontentblocklocationparam",
+ "AnthropicCitationContentBlockLocationParamTypedDict": ".anthropiccitationcontentblocklocationparam",
+ "AnthropicCitationPageLocationParam": ".anthropiccitationpagelocationparam",
+ "AnthropicCitationPageLocationParamType": ".anthropiccitationpagelocationparam",
+ "AnthropicCitationPageLocationParamTypedDict": ".anthropiccitationpagelocationparam",
+ "AnthropicCitationSearchResultLocation": ".anthropiccitationsearchresultlocation",
+ "AnthropicCitationSearchResultLocationType": ".anthropiccitationsearchresultlocation",
+ "AnthropicCitationSearchResultLocationTypedDict": ".anthropiccitationsearchresultlocation",
+ "AnthropicCitationWebSearchResultLocation": ".anthropiccitationwebsearchresultlocation",
+ "AnthropicCitationWebSearchResultLocationType": ".anthropiccitationwebsearchresultlocation",
+ "AnthropicCitationWebSearchResultLocationTypedDict": ".anthropiccitationwebsearchresultlocation",
+ "AnthropicDocumentBlockParam": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamCitations": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamCitationsTypedDict": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamContent1": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamContent1TypedDict": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamContent2": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamContent2TypedDict": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamSourceUnion": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamSourceUnionTypedDict": ".anthropicdocumentblockparam",
+ "AnthropicDocumentBlockParamTypedDict": ".anthropicdocumentblockparam",
+ "SourceContent": ".anthropicdocumentblockparam",
+ "SourceContentTypedDict": ".anthropicdocumentblockparam",
+ "SourceType": ".anthropicdocumentblockparam",
+ "TypeDocument": ".anthropicdocumentblockparam",
+ "AnthropicImageBlockParam": ".anthropicimageblockparam",
+ "AnthropicImageBlockParamSource": ".anthropicimageblockparam",
+ "AnthropicImageBlockParamSourceTypedDict": ".anthropicimageblockparam",
+ "AnthropicImageBlockParamType": ".anthropicimageblockparam",
+ "AnthropicImageBlockParamTypedDict": ".anthropicimageblockparam",
+ "AnthropicImageMimeType": ".anthropicimagemimetype",
+ "AnthropicInputTokensClearAtLeast": ".anthropicinputtokensclearatleast",
+ "AnthropicInputTokensClearAtLeastType": ".anthropicinputtokensclearatleast",
+ "AnthropicInputTokensClearAtLeastTypedDict": ".anthropicinputtokensclearatleast",
+ "AnthropicInputTokensTrigger": ".anthropicinputtokenstrigger",
+ "AnthropicInputTokensTriggerType": ".anthropicinputtokenstrigger",
+ "AnthropicInputTokensTriggerTypedDict": ".anthropicinputtokenstrigger",
+ "AnthropicPlainTextSource": ".anthropicplaintextsource",
+ "AnthropicPlainTextSourceMediaType": ".anthropicplaintextsource",
+ "AnthropicPlainTextSourceType": ".anthropicplaintextsource",
+ "AnthropicPlainTextSourceTypedDict": ".anthropicplaintextsource",
+ "AnthropicSearchResultBlockParam": ".anthropicsearchresultblockparam",
+ "AnthropicSearchResultBlockParamCitations": ".anthropicsearchresultblockparam",
+ "AnthropicSearchResultBlockParamCitationsTypedDict": ".anthropicsearchresultblockparam",
+ "AnthropicSearchResultBlockParamType": ".anthropicsearchresultblockparam",
+ "AnthropicSearchResultBlockParamTypedDict": ".anthropicsearchresultblockparam",
+ "AnthropicTextBlockParam": ".anthropictextblockparam",
+ "AnthropicTextBlockParamType": ".anthropictextblockparam",
+ "AnthropicTextBlockParamTypedDict": ".anthropictextblockparam",
+ "Citation": ".anthropictextblockparam",
+ "CitationTypedDict": ".anthropictextblockparam",
+ "AnthropicThinkingDisplay": ".anthropicthinkingdisplay",
+ "AnthropicThinkingTurns": ".anthropicthinkingturns",
+ "AnthropicThinkingTurnsType": ".anthropicthinkingturns",
+ "AnthropicThinkingTurnsTypedDict": ".anthropicthinkingturns",
+ "AnthropicToolUsesKeep": ".anthropictooluseskeep",
+ "AnthropicToolUsesKeepType": ".anthropictooluseskeep",
+ "AnthropicToolUsesKeepTypedDict": ".anthropictooluseskeep",
+ "AnthropicToolUsesTrigger": ".anthropictoolusestrigger",
+ "AnthropicToolUsesTriggerType": ".anthropictoolusestrigger",
+ "AnthropicToolUsesTriggerTypedDict": ".anthropictoolusestrigger",
+ "AnthropicURLImageSource": ".anthropicurlimagesource",
+ "AnthropicURLImageSourceType": ".anthropicurlimagesource",
+ "AnthropicURLImageSourceTypedDict": ".anthropicurlimagesource",
+ "AnthropicURLPdfSource": ".anthropicurlpdfsource",
+ "AnthropicURLPdfSourceType": ".anthropicurlpdfsource",
+ "AnthropicURLPdfSourceTypedDict": ".anthropicurlpdfsource",
+ "AnthropicWebSearchResultBlockParam": ".anthropicwebsearchresultblockparam",
+ "AnthropicWebSearchResultBlockParamType": ".anthropicwebsearchresultblockparam",
+ "AnthropicWebSearchResultBlockParamTypedDict": ".anthropicwebsearchresultblockparam",
+ "AnthropicWebSearchToolUserLocation": ".anthropicwebsearchtooluserlocation",
+ "AnthropicWebSearchToolUserLocationType": ".anthropicwebsearchtooluserlocation",
+ "AnthropicWebSearchToolUserLocationTypedDict": ".anthropicwebsearchtooluserlocation",
+ "ApplyPatchCallItem": ".applypatchcallitem",
+ "ApplyPatchCallItemType": ".applypatchcallitem",
+ "ApplyPatchCallItemTypedDict": ".applypatchcallitem",
+ "ApplyPatchCallOperation": ".applypatchcalloperation",
+ "ApplyPatchCallOperationTypedDict": ".applypatchcalloperation",
+ "ApplyPatchCallOperationDiffDeltaEvent": ".applypatchcalloperationdiffdeltaevent",
+ "ApplyPatchCallOperationDiffDeltaEventType": ".applypatchcalloperationdiffdeltaevent",
+ "ApplyPatchCallOperationDiffDeltaEventTypedDict": ".applypatchcalloperationdiffdeltaevent",
+ "ApplyPatchCallOperationDiffDoneEvent": ".applypatchcalloperationdiffdoneevent",
+ "ApplyPatchCallOperationDiffDoneEventType": ".applypatchcalloperationdiffdoneevent",
+ "ApplyPatchCallOperationDiffDoneEventTypedDict": ".applypatchcalloperationdiffdoneevent",
+ "ApplyPatchCallOutputItem": ".applypatchcalloutputitem",
+ "ApplyPatchCallOutputItemStatus": ".applypatchcalloutputitem",
+ "ApplyPatchCallOutputItemType": ".applypatchcalloutputitem",
+ "ApplyPatchCallOutputItemTypedDict": ".applypatchcalloutputitem",
+ "ApplyPatchCallStatus": ".applypatchcallstatus",
+ "ApplyPatchCreateFileOperation": ".applypatchcreatefileoperation",
+ "ApplyPatchCreateFileOperationType": ".applypatchcreatefileoperation",
+ "ApplyPatchCreateFileOperationTypedDict": ".applypatchcreatefileoperation",
+ "ApplyPatchDeleteFileOperation": ".applypatchdeletefileoperation",
+ "ApplyPatchDeleteFileOperationType": ".applypatchdeletefileoperation",
+ "ApplyPatchDeleteFileOperationTypedDict": ".applypatchdeletefileoperation",
+ "ApplyPatchEngineEnum": ".applypatchengineenum",
"ApplyPatchServerTool": ".applypatchservertool",
"ApplyPatchServerToolType": ".applypatchservertool",
"ApplyPatchServerToolTypedDict": ".applypatchservertool",
+ "ApplyPatchServerToolOpenRouter": ".applypatchservertool_openrouter",
+ "ApplyPatchServerToolOpenRouterType": ".applypatchservertool_openrouter",
+ "ApplyPatchServerToolOpenRouterTypedDict": ".applypatchservertool_openrouter",
+ "ApplyPatchServerToolConfig": ".applypatchservertoolconfig",
+ "ApplyPatchServerToolConfigTypedDict": ".applypatchservertoolconfig",
+ "ApplyPatchUpdateFileOperation": ".applypatchupdatefileoperation",
+ "ApplyPatchUpdateFileOperationType": ".applypatchupdatefileoperation",
+ "ApplyPatchUpdateFileOperationTypedDict": ".applypatchupdatefileoperation",
+ "AppRankingsItem": ".apprankingsitem",
+ "AppRankingsItemTypedDict": ".apprankingsitem",
+ "AppRankingsResponse": ".apprankingsresponse",
+ "AppRankingsResponseTypedDict": ".apprankingsresponse",
"AutoRouterPlugin": ".autorouterplugin",
"AutoRouterPluginID": ".autorouterplugin",
"AutoRouterPluginTypedDict": ".autorouterplugin",
@@ -2418,6 +4388,18 @@ _dynamic_imports: dict[str, str] = {
"BaseInputsUnionTypedDict": ".baseinputs_union",
"BaseReasoningConfig": ".basereasoningconfig",
"BaseReasoningConfigTypedDict": ".basereasoningconfig",
+ "BashServerTool": ".bashservertool",
+ "BashServerToolType": ".bashservertool",
+ "BashServerToolTypedDict": ".bashservertool",
+ "BashServerToolConfig": ".bashservertoolconfig",
+ "BashServerToolConfigTypedDict": ".bashservertoolconfig",
+ "BashServerToolEngine": ".bashservertoolengine",
+ "BashServerToolEnvironment": ".bashservertoolenvironment",
+ "BashServerToolEnvironmentTypedDict": ".bashservertoolenvironment",
+ "BulkAddWorkspaceMembersRequest": ".bulkaddworkspacemembersrequest",
+ "BulkAddWorkspaceMembersRequestTypedDict": ".bulkaddworkspacemembersrequest",
+ "BulkAddWorkspaceMembersResponse": ".bulkaddworkspacemembersresponse",
+ "BulkAddWorkspaceMembersResponseTypedDict": ".bulkaddworkspacemembersresponse",
"BulkAssignKeysRequest": ".bulkassignkeysrequest",
"BulkAssignKeysRequestTypedDict": ".bulkassignkeysrequest",
"BulkAssignKeysResponse": ".bulkassignkeysresponse",
@@ -2426,6 +4408,10 @@ _dynamic_imports: dict[str, str] = {
"BulkAssignMembersRequestTypedDict": ".bulkassignmembersrequest",
"BulkAssignMembersResponse": ".bulkassignmembersresponse",
"BulkAssignMembersResponseTypedDict": ".bulkassignmembersresponse",
+ "BulkRemoveWorkspaceMembersRequest": ".bulkremoveworkspacemembersrequest",
+ "BulkRemoveWorkspaceMembersRequestTypedDict": ".bulkremoveworkspacemembersrequest",
+ "BulkRemoveWorkspaceMembersResponse": ".bulkremoveworkspacemembersresponse",
+ "BulkRemoveWorkspaceMembersResponseTypedDict": ".bulkremoveworkspacemembersresponse",
"BulkUnassignKeysRequest": ".bulkunassignkeysrequest",
"BulkUnassignKeysRequestTypedDict": ".bulkunassignkeysrequest",
"BulkUnassignKeysResponse": ".bulkunassignkeysresponse",
@@ -2434,6 +4420,9 @@ _dynamic_imports: dict[str, str] = {
"BulkUnassignMembersRequestTypedDict": ".bulkunassignmembersrequest",
"BulkUnassignMembersResponse": ".bulkunassignmembersresponse",
"BulkUnassignMembersResponseTypedDict": ".bulkunassignmembersresponse",
+ "BYOKKey": ".byokkey",
+ "BYOKKeyTypedDict": ".byokkey",
+ "BYOKProviderSlug": ".byokproviderslug",
"ChatAssistantImages": ".chatassistantimages",
"ChatAssistantImagesImageURL": ".chatassistantimages",
"ChatAssistantImagesImageURLTypedDict": ".chatassistantimages",
@@ -2514,14 +4503,14 @@ _dynamic_imports: dict[str, str] = {
"ChatNamedToolChoiceTypedDict": ".chatnamedtoolchoice",
"ChatReasoningSummaryVerbosityEnum": ".chatreasoningsummaryverbosityenum",
"ChatRequest": ".chatrequest",
+ "ChatRequestEffort": ".chatrequest",
"ChatRequestPlugin": ".chatrequest",
"ChatRequestPluginTypedDict": ".chatrequest",
+ "ChatRequestReasoning": ".chatrequest",
+ "ChatRequestReasoningTypedDict": ".chatrequest",
"ChatRequestServiceTier": ".chatrequest",
"ChatRequestTypedDict": ".chatrequest",
- "Effort": ".chatrequest",
"Modality": ".chatrequest",
- "Reasoning": ".chatrequest",
- "ReasoningTypedDict": ".chatrequest",
"ResponseFormat": ".chatrequest",
"ResponseFormatTypedDict": ".chatrequest",
"Stop": ".chatrequest",
@@ -2532,6 +4521,8 @@ _dynamic_imports: dict[str, str] = {
"ChatSearchModelsServerTool": ".chatsearchmodelsservertool",
"ChatSearchModelsServerToolType": ".chatsearchmodelsservertool",
"ChatSearchModelsServerToolTypedDict": ".chatsearchmodelsservertool",
+ "ChatServerToolChoice": ".chatservertoolchoice",
+ "ChatServerToolChoiceTypedDict": ".chatservertoolchoice",
"ChatStreamChoice": ".chatstreamchoice",
"ChatStreamChoiceTypedDict": ".chatstreamchoice",
"ChatStreamChunk": ".chatstreamchunk",
@@ -2542,6 +4533,8 @@ _dynamic_imports: dict[str, str] = {
"ChatStreamDelta": ".chatstreamdelta",
"ChatStreamDeltaRole": ".chatstreamdelta",
"ChatStreamDeltaTypedDict": ".chatstreamdelta",
+ "ChatStreamingResponse": ".chatstreamingresponse",
+ "ChatStreamingResponseTypedDict": ".chatstreamingresponse",
"ChatStreamOptions": ".chatstreamoptions",
"ChatStreamOptionsTypedDict": ".chatstreamoptions",
"ChatStreamToolCall": ".chatstreamtoolcall",
@@ -2601,6 +4594,9 @@ _dynamic_imports: dict[str, str] = {
"CodexLocalShellTool": ".codexlocalshelltool",
"CodexLocalShellToolType": ".codexlocalshelltool",
"CodexLocalShellToolTypedDict": ".codexlocalshelltool",
+ "CompactionItem": ".compactionitem",
+ "CompactionItemType": ".compactionitem",
+ "CompactionItemTypedDict": ".compactionitem",
"CompoundFilter": ".compoundfilter",
"CompoundFilterType": ".compoundfilter",
"CompoundFilterTypedDict": ".compoundfilter",
@@ -2610,11 +4606,31 @@ _dynamic_imports: dict[str, str] = {
"Environment": ".computeruseservertool",
"ConflictResponseErrorData": ".conflictresponseerrordata",
"ConflictResponseErrorDataTypedDict": ".conflictresponseerrordata",
+ "ContainerAutoEnvironment": ".containerautoenvironment",
+ "ContainerAutoEnvironmentType": ".containerautoenvironment",
+ "ContainerAutoEnvironmentTypedDict": ".containerautoenvironment",
+ "ContainerReferenceEnvironment": ".containerreferenceenvironment",
+ "ContainerReferenceEnvironmentType": ".containerreferenceenvironment",
+ "ContainerReferenceEnvironmentTypedDict": ".containerreferenceenvironment",
+ "ContentFilterAction": ".contentfilteraction",
+ "ContentFilterBuiltinAction": ".contentfilterbuiltinaction",
+ "ContentFilterBuiltinEntry": ".contentfilterbuiltinentry",
+ "ContentFilterBuiltinEntryTypedDict": ".contentfilterbuiltinentry",
+ "ContentFilterBuiltinEntryInput": ".contentfilterbuiltinentryinput",
+ "ContentFilterBuiltinEntryInputTypedDict": ".contentfilterbuiltinentryinput",
+ "ContentFilterBuiltinSlug": ".contentfilterbuiltinslug",
+ "ContentFilterEntry": ".contentfilterentry",
+ "ContentFilterEntryTypedDict": ".contentfilterentry",
"ContentPartAddedEvent": ".contentpartaddedevent",
"ContentPartAddedEventPart": ".contentpartaddedevent",
"ContentPartAddedEventPartTypedDict": ".contentpartaddedevent",
"ContentPartAddedEventType": ".contentpartaddedevent",
"ContentPartAddedEventTypedDict": ".contentpartaddedevent",
+ "AudioURL": ".contentpartaudio",
+ "AudioURLTypedDict": ".contentpartaudio",
+ "ContentPartAudio": ".contentpartaudio",
+ "ContentPartAudioType": ".contentpartaudio",
+ "ContentPartAudioTypedDict": ".contentpartaudio",
"ContentPartDoneEvent": ".contentpartdoneevent",
"ContentPartDoneEventPart": ".contentpartdoneevent",
"ContentPartDoneEventPartTypedDict": ".contentpartdoneevent",
@@ -2625,15 +4641,47 @@ _dynamic_imports: dict[str, str] = {
"ContentPartImageImageURLTypedDict": ".contentpartimage",
"ContentPartImageType": ".contentpartimage",
"ContentPartImageTypedDict": ".contentpartimage",
+ "ContentPartInputAudio": ".contentpartinputaudio",
+ "ContentPartInputAudioType": ".contentpartinputaudio",
+ "ContentPartInputAudioTypedDict": ".contentpartinputaudio",
+ "ContentPartInputFile": ".contentpartinputfile",
+ "ContentPartInputFileType": ".contentpartinputfile",
+ "ContentPartInputFileTypedDict": ".contentpartinputfile",
+ "ContentPartInputVideo": ".contentpartinputvideo",
+ "ContentPartInputVideoType": ".contentpartinputvideo",
+ "ContentPartInputVideoTypedDict": ".contentpartinputvideo",
+ "ContentPartVideo": ".contentpartvideo",
+ "ContentPartVideoType": ".contentpartvideo",
+ "ContentPartVideoTypedDict": ".contentpartvideo",
+ "VideoURL": ".contentpartvideo",
+ "VideoURLTypedDict": ".contentpartvideo",
"ContextCompressionEngine": ".contextcompressionengine",
"ContextCompressionPlugin": ".contextcompressionplugin",
"ContextCompressionPluginID": ".contextcompressionplugin",
"ContextCompressionPluginTypedDict": ".contextcompressionplugin",
+ "CostDetails": ".costdetails",
+ "CostDetailsTypedDict": ".costdetails",
+ "CreateBYOKKeyRequest": ".createbyokkeyrequest",
+ "CreateBYOKKeyRequestTypedDict": ".createbyokkeyrequest",
+ "CreateBYOKKeyResponse": ".createbyokkeyresponse",
+ "CreateBYOKKeyResponseTypedDict": ".createbyokkeyresponse",
"CreateGuardrailRequest": ".createguardrailrequest",
"CreateGuardrailRequestTypedDict": ".createguardrailrequest",
"CreateGuardrailResponse": ".createguardrailresponse",
"CreateGuardrailResponseTypedDict": ".createguardrailresponse",
+ "CreateObservabilityDestinationRequest": ".createobservabilitydestinationrequest",
+ "CreateObservabilityDestinationRequestType": ".createobservabilitydestinationrequest",
+ "CreateObservabilityDestinationRequestTypedDict": ".createobservabilitydestinationrequest",
+ "CreateObservabilityDestinationResponse": ".createobservabilitydestinationresponse",
+ "CreateObservabilityDestinationResponseTypedDict": ".createobservabilitydestinationresponse",
+ "CreatePresetFromInferenceResponse": ".createpresetfrominferenceresponse",
+ "CreatePresetFromInferenceResponseTypedDict": ".createpresetfrominferenceresponse",
+ "CreateWorkspaceRequest": ".createworkspacerequest",
+ "CreateWorkspaceRequestTypedDict": ".createworkspacerequest",
+ "CreateWorkspaceResponse": ".createworkspaceresponse",
+ "CreateWorkspaceResponseTypedDict": ".createworkspaceresponse",
"CustomTool": ".customtool",
+ "CustomToolTypeCustom": ".customtool",
"CustomToolTypedDict": ".customtool",
"Format": ".customtool",
"FormatGrammar": ".customtool",
@@ -2644,7 +4692,26 @@ _dynamic_imports: dict[str, str] = {
"FormatTypeText": ".customtool",
"FormatTypedDict": ".customtool",
"Syntax": ".customtool",
- "TypeCustom": ".customtool",
+ "CustomToolCallInputDeltaEvent": ".customtoolcallinputdeltaevent",
+ "CustomToolCallInputDeltaEventType": ".customtoolcallinputdeltaevent",
+ "CustomToolCallInputDeltaEventTypedDict": ".customtoolcallinputdeltaevent",
+ "CustomToolCallInputDoneEvent": ".customtoolcallinputdoneevent",
+ "CustomToolCallInputDoneEventType": ".customtoolcallinputdoneevent",
+ "CustomToolCallInputDoneEventTypedDict": ".customtoolcallinputdoneevent",
+ "CustomToolCallItem": ".customtoolcallitem",
+ "CustomToolCallItemType": ".customtoolcallitem",
+ "CustomToolCallItemTypedDict": ".customtoolcallitem",
+ "CustomToolCallOutputItem": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemDetail": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemOutputInputImage": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemOutputInputImageTypedDict": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemOutputUnion1": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemOutputUnion1TypedDict": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemOutputUnion2": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemOutputUnion2TypedDict": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemTypeCustomToolCallOutput": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemTypeInputImage": ".customtoolcalloutputitem",
+ "CustomToolCallOutputItemTypedDict": ".customtoolcalloutputitem",
"DatetimeServerTool": ".datetimeservertool",
"DatetimeServerToolType": ".datetimeservertool",
"DatetimeServerToolTypedDict": ".datetimeservertool",
@@ -2652,12 +4719,17 @@ _dynamic_imports: dict[str, str] = {
"DatetimeServerToolConfigTypedDict": ".datetimeservertoolconfig",
"DefaultParameters": ".defaultparameters",
"DefaultParametersTypedDict": ".defaultparameters",
+ "DeleteBYOKKeyResponse": ".deletebyokkeyresponse",
+ "DeleteBYOKKeyResponseTypedDict": ".deletebyokkeyresponse",
"DeleteGuardrailResponse": ".deleteguardrailresponse",
"DeleteGuardrailResponseTypedDict": ".deleteguardrailresponse",
+ "DeleteObservabilityDestinationResponse": ".deleteobservabilitydestinationresponse",
+ "DeleteObservabilityDestinationResponseTypedDict": ".deleteobservabilitydestinationresponse",
+ "DeleteWorkspaceResponse": ".deleteworkspaceresponse",
+ "DeleteWorkspaceResponseTypedDict": ".deleteworkspaceresponse",
"EasyInputMessage": ".easyinputmessage",
"EasyInputMessageContentInputImage": ".easyinputmessage",
"EasyInputMessageContentInputImageTypedDict": ".easyinputmessage",
- "EasyInputMessageContentType": ".easyinputmessage",
"EasyInputMessageContentUnion1": ".easyinputmessage",
"EasyInputMessageContentUnion1TypedDict": ".easyinputmessage",
"EasyInputMessageContentUnion2": ".easyinputmessage",
@@ -2673,10 +4745,15 @@ _dynamic_imports: dict[str, str] = {
"EasyInputMessageRoleUnion": ".easyinputmessage",
"EasyInputMessageRoleUnionTypedDict": ".easyinputmessage",
"EasyInputMessageRoleUser": ".easyinputmessage",
+ "EasyInputMessageTypeInputImage": ".easyinputmessage",
"EasyInputMessageTypeMessage": ".easyinputmessage",
"EasyInputMessageTypedDict": ".easyinputmessage",
"EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponseerrordata",
"EdgeNetworkTimeoutResponseErrorDataTypedDict": ".edgenetworktimeoutresponseerrordata",
+ "EndpointInfo": ".endpointinfo",
+ "EndpointInfoTypedDict": ".endpointinfo",
+ "EndpointsMetadata": ".endpointsmetadata",
+ "EndpointsMetadataTypedDict": ".endpointsmetadata",
"EndpointStatus": ".endpointstatus",
"ErrorEvent": ".errorevent",
"ErrorEventType": ".errorevent",
@@ -2692,6 +4769,10 @@ _dynamic_imports: dict[str, str] = {
"FilePathTypedDict": ".filepath",
"FileSearchServerTool": ".filesearchservertool",
"FileSearchServerToolTypedDict": ".filesearchservertool",
+ "FileSearchServerToolValue1": ".filesearchservertool",
+ "FileSearchServerToolValue1TypedDict": ".filesearchservertool",
+ "FileSearchServerToolValue2": ".filesearchservertool",
+ "FileSearchServerToolValue2TypedDict": ".filesearchservertool",
"Filters": ".filesearchservertool",
"FiltersType": ".filesearchservertool",
"FiltersTypedDict": ".filesearchservertool",
@@ -2701,10 +4782,6 @@ _dynamic_imports: dict[str, str] = {
"RankingOptions": ".filesearchservertool",
"RankingOptionsTypedDict": ".filesearchservertool",
"TypeFileSearch": ".filesearchservertool",
- "Value1": ".filesearchservertool",
- "Value1TypedDict": ".filesearchservertool",
- "Value2": ".filesearchservertool",
- "Value2TypedDict": ".filesearchservertool",
"ForbiddenResponseErrorData": ".forbiddenresponseerrordata",
"ForbiddenResponseErrorDataTypedDict": ".forbiddenresponseerrordata",
"FormatJSONObjectConfig": ".formatjsonobjectconfig",
@@ -2735,18 +4812,98 @@ _dynamic_imports: dict[str, str] = {
"FunctionCallItemTypedDict": ".functioncallitem",
"FunctionCallOutputItem": ".functioncalloutputitem",
"FunctionCallOutputItemDetail": ".functioncalloutputitem",
- "FunctionCallOutputItemOutputType": ".functioncalloutputitem",
+ "FunctionCallOutputItemOutputInputImage": ".functioncalloutputitem",
+ "FunctionCallOutputItemOutputInputImageTypedDict": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion1": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion1TypedDict": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion2": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion2TypedDict": ".functioncalloutputitem",
"FunctionCallOutputItemStatus": ".functioncalloutputitem",
"FunctionCallOutputItemTypeFunctionCallOutput": ".functioncalloutputitem",
+ "FunctionCallOutputItemTypeInputImage": ".functioncalloutputitem",
"FunctionCallOutputItemTypedDict": ".functioncalloutputitem",
- "OutputInputImage": ".functioncalloutputitem",
- "OutputInputImageTypedDict": ".functioncalloutputitem",
+ "Contradiction": ".fusionanalysisresult",
+ "ContradictionTypedDict": ".fusionanalysisresult",
+ "FusionAnalysisResult": ".fusionanalysisresult",
+ "FusionAnalysisResultTypedDict": ".fusionanalysisresult",
+ "PartialCoverage": ".fusionanalysisresult",
+ "PartialCoverageTypedDict": ".fusionanalysisresult",
+ "Stance": ".fusionanalysisresult",
+ "StanceTypedDict": ".fusionanalysisresult",
+ "UniqueInsight": ".fusionanalysisresult",
+ "UniqueInsightTypedDict": ".fusionanalysisresult",
+ "FusionCallAnalysisCompletedEvent": ".fusioncallanalysiscompletedevent",
+ "FusionCallAnalysisCompletedEventType": ".fusioncallanalysiscompletedevent",
+ "FusionCallAnalysisCompletedEventTypedDict": ".fusioncallanalysiscompletedevent",
+ "FusionCallAnalysisInProgressEvent": ".fusioncallanalysisinprogressevent",
+ "FusionCallAnalysisInProgressEventType": ".fusioncallanalysisinprogressevent",
+ "FusionCallAnalysisInProgressEventTypedDict": ".fusioncallanalysisinprogressevent",
+ "FusionCallCompletedEvent": ".fusioncallcompletedevent",
+ "FusionCallCompletedEventType": ".fusioncallcompletedevent",
+ "FusionCallCompletedEventTypedDict": ".fusioncallcompletedevent",
+ "FusionCallInProgressEvent": ".fusioncallinprogressevent",
+ "FusionCallInProgressEventType": ".fusioncallinprogressevent",
+ "FusionCallInProgressEventTypedDict": ".fusioncallinprogressevent",
+ "FusionCallPanelAddedEvent": ".fusioncallpaneladdedevent",
+ "FusionCallPanelAddedEventType": ".fusioncallpaneladdedevent",
+ "FusionCallPanelAddedEventTypedDict": ".fusioncallpaneladdedevent",
+ "FusionCallPanelCompletedEvent": ".fusioncallpanelcompletedevent",
+ "FusionCallPanelCompletedEventType": ".fusioncallpanelcompletedevent",
+ "FusionCallPanelCompletedEventTypedDict": ".fusioncallpanelcompletedevent",
+ "FusionCallPanelDeltaEvent": ".fusioncallpaneldeltaevent",
+ "FusionCallPanelDeltaEventType": ".fusioncallpaneldeltaevent",
+ "FusionCallPanelDeltaEventTypedDict": ".fusioncallpaneldeltaevent",
+ "FusionCallPanelFailedEvent": ".fusioncallpanelfailedevent",
+ "FusionCallPanelFailedEventType": ".fusioncallpanelfailedevent",
+ "FusionCallPanelFailedEventTypedDict": ".fusioncallpanelfailedevent",
+ "FusionCallPanelReasoningDeltaEvent": ".fusioncallpanelreasoningdeltaevent",
+ "FusionCallPanelReasoningDeltaEventType": ".fusioncallpanelreasoningdeltaevent",
+ "FusionCallPanelReasoningDeltaEventTypedDict": ".fusioncallpanelreasoningdeltaevent",
+ "FusionPlugin": ".fusionplugin",
+ "FusionPluginID": ".fusionplugin",
+ "FusionPluginTool": ".fusionplugin",
+ "FusionPluginToolTypedDict": ".fusionplugin",
+ "FusionPluginTypedDict": ".fusionplugin",
+ "FusionServerToolOpenRouter": ".fusionservertool_openrouter",
+ "FusionServerToolOpenRouterType": ".fusionservertool_openrouter",
+ "FusionServerToolOpenRouterTypedDict": ".fusionservertool_openrouter",
+ "FusionServerToolConfig": ".fusionservertoolconfig",
+ "FusionServerToolConfigEffort": ".fusionservertoolconfig",
+ "FusionServerToolConfigReasoning": ".fusionservertoolconfig",
+ "FusionServerToolConfigReasoningTypedDict": ".fusionservertoolconfig",
+ "FusionServerToolConfigTool": ".fusionservertoolconfig",
+ "FusionServerToolConfigToolTypedDict": ".fusionservertoolconfig",
+ "FusionServerToolConfigTypedDict": ".fusionservertoolconfig",
+ "GenerationContentData": ".generationcontentdata",
+ "GenerationContentDataOutput": ".generationcontentdata",
+ "GenerationContentDataOutputTypedDict": ".generationcontentdata",
+ "GenerationContentDataTypedDict": ".generationcontentdata",
+ "Input1": ".generationcontentdata",
+ "Input1TypedDict": ".generationcontentdata",
+ "Input2": ".generationcontentdata",
+ "Input2TypedDict": ".generationcontentdata",
+ "InputUnion": ".generationcontentdata",
+ "InputUnionTypedDict": ".generationcontentdata",
+ "GenerationContentResponse": ".generationcontentresponse",
+ "GenerationContentResponseTypedDict": ".generationcontentresponse",
+ "APIType": ".generationresponse",
+ "DataRegion": ".generationresponse",
+ "GenerationResponse": ".generationresponse",
+ "GenerationResponseData": ".generationresponse",
+ "GenerationResponseDataTypedDict": ".generationresponse",
+ "GenerationResponseTypedDict": ".generationresponse",
+ "GetBYOKKeyResponse": ".getbyokkeyresponse",
+ "GetBYOKKeyResponseTypedDict": ".getbyokkeyresponse",
"GetGuardrailResponse": ".getguardrailresponse",
"GetGuardrailResponseTypedDict": ".getguardrailresponse",
+ "GetObservabilityDestinationResponse": ".getobservabilitydestinationresponse",
+ "GetObservabilityDestinationResponseTypedDict": ".getobservabilitydestinationresponse",
+ "GetPresetResponse": ".getpresetresponse",
+ "GetPresetResponseTypedDict": ".getpresetresponse",
+ "GetPresetVersionResponse": ".getpresetversionresponse",
+ "GetPresetVersionResponseTypedDict": ".getpresetversionresponse",
+ "GetWorkspaceResponse": ".getworkspaceresponse",
+ "GetWorkspaceResponseTypedDict": ".getworkspaceresponse",
"Guardrail": ".guardrail",
"GuardrailTypedDict": ".guardrail",
"GuardrailInterval": ".guardrailinterval",
@@ -2803,7 +4960,6 @@ _dynamic_imports: dict[str, str] = {
"InputMessageItem": ".inputmessageitem",
"InputMessageItemContentInputImage": ".inputmessageitem",
"InputMessageItemContentInputImageTypedDict": ".inputmessageitem",
- "InputMessageItemContentType": ".inputmessageitem",
"InputMessageItemContentUnion": ".inputmessageitem",
"InputMessageItemContentUnionTypedDict": ".inputmessageitem",
"InputMessageItemDetail": ".inputmessageitem",
@@ -2812,9 +4968,12 @@ _dynamic_imports: dict[str, str] = {
"InputMessageItemRoleUnion": ".inputmessageitem",
"InputMessageItemRoleUnionTypedDict": ".inputmessageitem",
"InputMessageItemRoleUser": ".inputmessageitem",
+ "InputMessageItemTypeInputImage": ".inputmessageitem",
"InputMessageItemTypeMessage": ".inputmessageitem",
"InputMessageItemTypedDict": ".inputmessageitem",
"InputModality": ".inputmodality",
+ "InputReference": ".inputreference",
+ "InputReferenceTypedDict": ".inputreference",
"InputsContent1": ".inputs_union",
"InputsContent1TypedDict": ".inputs_union",
"InputsContent2": ".inputs_union",
@@ -2853,6 +5012,9 @@ _dynamic_imports: dict[str, str] = {
"InstructType": ".instructtype",
"InternalServerResponseErrorData": ".internalserverresponseerrordata",
"InternalServerResponseErrorDataTypedDict": ".internalserverresponseerrordata",
+ "ItemReferenceItem": ".itemreferenceitem",
+ "ItemReferenceItemType": ".itemreferenceitem",
+ "ItemReferenceItemTypedDict": ".itemreferenceitem",
"KeyAssignment": ".keyassignment",
"KeyAssignmentTypedDict": ".keyassignment",
"LegacyChatContentVideo": ".legacy_chatcontentvideo",
@@ -2861,6 +5023,8 @@ _dynamic_imports: dict[str, str] = {
"LegacyWebSearchServerTool": ".legacy_websearchservertool",
"LegacyWebSearchServerToolType": ".legacy_websearchservertool",
"LegacyWebSearchServerToolTypedDict": ".legacy_websearchservertool",
+ "ListBYOKKeysResponse": ".listbyokkeysresponse",
+ "ListBYOKKeysResponseTypedDict": ".listbyokkeysresponse",
"Architecture": ".listendpointsresponse",
"ArchitectureTypedDict": ".listendpointsresponse",
"ListEndpointsResponse": ".listendpointsresponse",
@@ -2872,6 +5036,38 @@ _dynamic_imports: dict[str, str] = {
"ListKeyAssignmentsResponseTypedDict": ".listkeyassignmentsresponse",
"ListMemberAssignmentsResponse": ".listmemberassignmentsresponse",
"ListMemberAssignmentsResponseTypedDict": ".listmemberassignmentsresponse",
+ "ListObservabilityDestinationsResponse": ".listobservabilitydestinationsresponse",
+ "ListObservabilityDestinationsResponseTypedDict": ".listobservabilitydestinationsresponse",
+ "ListPresetsResponse": ".listpresetsresponse",
+ "ListPresetsResponseTypedDict": ".listpresetsresponse",
+ "ListPresetVersionsResponse": ".listpresetversionsresponse",
+ "ListPresetVersionsResponseTypedDict": ".listpresetversionsresponse",
+ "ListWorkspacesResponse": ".listworkspacesresponse",
+ "ListWorkspacesResponseTypedDict": ".listworkspacesresponse",
+ "LocalShellCallItem": ".localshellcallitem",
+ "LocalShellCallItemAction": ".localshellcallitem",
+ "LocalShellCallItemActionTypedDict": ".localshellcallitem",
+ "LocalShellCallItemTypedDict": ".localshellcallitem",
+ "TypeExec": ".localshellcallitem",
+ "TypeLocalShellCall": ".localshellcallitem",
+ "LocalShellCallOutputItem": ".localshellcalloutputitem",
+ "LocalShellCallOutputItemStatus": ".localshellcalloutputitem",
+ "LocalShellCallOutputItemType": ".localshellcalloutputitem",
+ "LocalShellCallOutputItemTypedDict": ".localshellcalloutputitem",
+ "McpApprovalRequestItem": ".mcpapprovalrequestitem",
+ "McpApprovalRequestItemType": ".mcpapprovalrequestitem",
+ "McpApprovalRequestItemTypedDict": ".mcpapprovalrequestitem",
+ "McpApprovalResponseItem": ".mcpapprovalresponseitem",
+ "McpApprovalResponseItemType": ".mcpapprovalresponseitem",
+ "McpApprovalResponseItemTypedDict": ".mcpapprovalresponseitem",
+ "McpCallItem": ".mcpcallitem",
+ "McpCallItemType": ".mcpcallitem",
+ "McpCallItemTypedDict": ".mcpcallitem",
+ "McpListToolsItem": ".mcplisttoolsitem",
+ "McpListToolsItemTool": ".mcplisttoolsitem",
+ "McpListToolsItemToolTypedDict": ".mcplisttoolsitem",
+ "McpListToolsItemType": ".mcplisttoolsitem",
+ "McpListToolsItemTypedDict": ".mcplisttoolsitem",
"AllowedTools": ".mcpservertool",
"AllowedToolsTypedDict": ".mcpservertool",
"AllowedToolsUnion": ".mcpservertool",
@@ -2892,6 +5088,152 @@ _dynamic_imports: dict[str, str] = {
"RequireApprovalUnionTypedDict": ".mcpservertool",
"MemberAssignment": ".memberassignment",
"MemberAssignmentTypedDict": ".memberassignment",
+ "MessagesAdvisorToolResultBlock": ".messagesadvisortoolresultblock",
+ "MessagesAdvisorToolResultBlockType": ".messagesadvisortoolresultblock",
+ "MessagesAdvisorToolResultBlockTypedDict": ".messagesadvisortoolresultblock",
+ "ContentCompaction": ".messagesmessageparam",
+ "ContentCompactionTypedDict": ".messagesmessageparam",
+ "ContentRedactedThinking": ".messagesmessageparam",
+ "ContentRedactedThinkingTypedDict": ".messagesmessageparam",
+ "ContentServerToolUse": ".messagesmessageparam",
+ "ContentServerToolUseTypedDict": ".messagesmessageparam",
+ "ContentThinking": ".messagesmessageparam",
+ "ContentThinkingTypedDict": ".messagesmessageparam",
+ "ContentToolReference": ".messagesmessageparam",
+ "ContentToolReferenceTypedDict": ".messagesmessageparam",
+ "ContentToolResult": ".messagesmessageparam",
+ "ContentToolResultTypedDict": ".messagesmessageparam",
+ "ContentToolUse": ".messagesmessageparam",
+ "ContentToolUseTypedDict": ".messagesmessageparam",
+ "ContentWebSearchToolResult": ".messagesmessageparam",
+ "ContentWebSearchToolResultError": ".messagesmessageparam",
+ "ContentWebSearchToolResultErrorTypedDict": ".messagesmessageparam",
+ "ContentWebSearchToolResultTypedDict": ".messagesmessageparam",
+ "ErrorCode": ".messagesmessageparam",
+ "MessagesMessageParam": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion1": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion1TypedDict": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion2": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion2TypedDict": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion3": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion3TypedDict": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion4": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion4TypedDict": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion5": ".messagesmessageparam",
+ "MessagesMessageParamContentUnion5TypedDict": ".messagesmessageparam",
+ "MessagesMessageParamRole": ".messagesmessageparam",
+ "MessagesMessageParamTypeCompaction": ".messagesmessageparam",
+ "MessagesMessageParamTypedDict": ".messagesmessageparam",
+ "TypeRedactedThinking": ".messagesmessageparam",
+ "TypeServerToolUse": ".messagesmessageparam",
+ "TypeThinking": ".messagesmessageparam",
+ "TypeToolReference": ".messagesmessageparam",
+ "TypeToolResult": ".messagesmessageparam",
+ "TypeToolUse": ".messagesmessageparam",
+ "TypeWebSearchToolResult": ".messagesmessageparam",
+ "TypeWebSearchToolResultError": ".messagesmessageparam",
+ "MessagesOutputConfig": ".messagesoutputconfig",
+ "MessagesOutputConfigEffort": ".messagesoutputconfig",
+ "MessagesOutputConfigFormat": ".messagesoutputconfig",
+ "MessagesOutputConfigFormatTypedDict": ".messagesoutputconfig",
+ "MessagesOutputConfigTypeJSONSchema": ".messagesoutputconfig",
+ "MessagesOutputConfigTypedDict": ".messagesoutputconfig",
+ "TaskBudget": ".messagesoutputconfig",
+ "TaskBudgetTypedDict": ".messagesoutputconfig",
+ "TypeTokens": ".messagesoutputconfig",
+ "Caching": ".messagesrequest",
+ "CachingTypedDict": ".messagesrequest",
+ "ClearToolInputs": ".messagesrequest",
+ "ClearToolInputsTypedDict": ".messagesrequest",
+ "ContextManagement": ".messagesrequest",
+ "ContextManagementTypedDict": ".messagesrequest",
+ "Edit": ".messagesrequest",
+ "EditClearThinking20251015": ".messagesrequest",
+ "EditClearThinking20251015TypedDict": ".messagesrequest",
+ "EditClearToolUses20250919": ".messagesrequest",
+ "EditClearToolUses20250919TypedDict": ".messagesrequest",
+ "EditCompact20260112": ".messagesrequest",
+ "EditCompact20260112TypedDict": ".messagesrequest",
+ "EditTypeInputTokens": ".messagesrequest",
+ "EditTypedDict": ".messagesrequest",
+ "InputSchema": ".messagesrequest",
+ "InputSchemaTypedDict": ".messagesrequest",
+ "Keep": ".messagesrequest",
+ "KeepAll": ".messagesrequest",
+ "KeepAllTypedDict": ".messagesrequest",
+ "KeepEnum": ".messagesrequest",
+ "KeepType": ".messagesrequest",
+ "KeepTypedDict": ".messagesrequest",
+ "MessagesRequest": ".messagesrequest",
+ "MessagesRequestPlugin": ".messagesrequest",
+ "MessagesRequestPluginTypedDict": ".messagesrequest",
+ "MessagesRequestTool": ".messagesrequest",
+ "MessagesRequestToolTypedDict": ".messagesrequest",
+ "MessagesRequestToolUnion": ".messagesrequest",
+ "MessagesRequestToolUnionTypedDict": ".messagesrequest",
+ "MessagesRequestTypedDict": ".messagesrequest",
+ "Metadata": ".messagesrequest",
+ "MetadataTypedDict": ".messagesrequest",
+ "NameAdvisor": ".messagesrequest",
+ "NameBash": ".messagesrequest",
+ "NameStrReplaceEditor": ".messagesrequest",
+ "NameWebSearch1": ".messagesrequest",
+ "NameWebSearch2": ".messagesrequest",
+ "Speed": ".messagesrequest",
+ "System": ".messagesrequest",
+ "SystemTypedDict": ".messagesrequest",
+ "Thinking": ".messagesrequest",
+ "ThinkingAdaptive": ".messagesrequest",
+ "ThinkingAdaptiveTypedDict": ".messagesrequest",
+ "ThinkingDisabled": ".messagesrequest",
+ "ThinkingDisabledTypedDict": ".messagesrequest",
+ "ThinkingEnabled": ".messagesrequest",
+ "ThinkingEnabledTypedDict": ".messagesrequest",
+ "ThinkingTypedDict": ".messagesrequest",
+ "ToolAdvisor20260301": ".messagesrequest",
+ "ToolAdvisor20260301TypedDict": ".messagesrequest",
+ "ToolBash20250124": ".messagesrequest",
+ "ToolBash20250124TypedDict": ".messagesrequest",
+ "ToolChoice": ".messagesrequest",
+ "ToolChoiceAny": ".messagesrequest",
+ "ToolChoiceAnyTypedDict": ".messagesrequest",
+ "ToolChoiceAuto": ".messagesrequest",
+ "ToolChoiceAutoTypedDict": ".messagesrequest",
+ "ToolChoiceNone": ".messagesrequest",
+ "ToolChoiceNoneTypedDict": ".messagesrequest",
+ "ToolChoiceTool": ".messagesrequest",
+ "ToolChoiceToolTypedDict": ".messagesrequest",
+ "ToolChoiceTypeAuto": ".messagesrequest",
+ "ToolChoiceTypedDict": ".messagesrequest",
+ "ToolCustom": ".messagesrequest",
+ "ToolCustomTypedDict": ".messagesrequest",
+ "ToolTextEditor20250124": ".messagesrequest",
+ "ToolTextEditor20250124TypedDict": ".messagesrequest",
+ "ToolTypeCustom": ".messagesrequest",
+ "ToolTypeEphemeral": ".messagesrequest",
+ "ToolWebSearch20250305": ".messagesrequest",
+ "ToolWebSearch20250305TypedDict": ".messagesrequest",
+ "ToolWebSearch20260209": ".messagesrequest",
+ "ToolWebSearch20260209TypedDict": ".messagesrequest",
+ "Trigger": ".messagesrequest",
+ "TriggerInputTokens": ".messagesrequest",
+ "TriggerInputTokensTypedDict": ".messagesrequest",
+ "TriggerTypedDict": ".messagesrequest",
+ "TypeAdaptive": ".messagesrequest",
+ "TypeAdvisor20260301": ".messagesrequest",
+ "TypeAny": ".messagesrequest",
+ "TypeBash20250124": ".messagesrequest",
+ "TypeClearThinking20251015": ".messagesrequest",
+ "TypeClearToolUses20250919": ".messagesrequest",
+ "TypeCompact20260112": ".messagesrequest",
+ "TypeDisabled": ".messagesrequest",
+ "TypeEnabled": ".messagesrequest",
+ "TypeNone": ".messagesrequest",
+ "TypeTextEditor20250124": ".messagesrequest",
+ "TypeTool": ".messagesrequest",
+ "TypeWebSearch20250305": ".messagesrequest",
+ "TypeWebSearch20260209": ".messagesrequest",
+ "MetadataLevel": ".metadatalevel",
"Model": ".model",
"ModelTypedDict": ".model",
"ModelArchitecture": ".modelarchitecture",
@@ -2900,17 +5242,129 @@ _dynamic_imports: dict[str, str] = {
"ModelGroup": ".modelgroup",
"ModelLinks": ".modellinks",
"ModelLinksTypedDict": ".modellinks",
- "Data": ".modelscountresponse",
- "DataTypedDict": ".modelscountresponse",
"ModelsCountResponse": ".modelscountresponse",
+ "ModelsCountResponseData": ".modelscountresponse",
+ "ModelsCountResponseDataTypedDict": ".modelscountresponse",
"ModelsCountResponseTypedDict": ".modelscountresponse",
"ModelsListResponse": ".modelslistresponse",
"ModelsListResponseTypedDict": ".modelslistresponse",
"ModerationPlugin": ".moderationplugin",
"ModerationPluginID": ".moderationplugin",
"ModerationPluginTypedDict": ".moderationplugin",
+ "MultimodalMedia": ".multimodalmedia",
+ "MultimodalMediaTypedDict": ".multimodalmedia",
"NotFoundResponseErrorData": ".notfoundresponseerrordata",
"NotFoundResponseErrorDataTypedDict": ".notfoundresponseerrordata",
+ "ObservabilityArizeDestination": ".observabilityarizedestination",
+ "ObservabilityArizeDestinationConfig": ".observabilityarizedestination",
+ "ObservabilityArizeDestinationConfigTypedDict": ".observabilityarizedestination",
+ "ObservabilityArizeDestinationType": ".observabilityarizedestination",
+ "ObservabilityArizeDestinationTypedDict": ".observabilityarizedestination",
+ "ObservabilityBraintrustDestination": ".observabilitybraintrustdestination",
+ "ObservabilityBraintrustDestinationConfig": ".observabilitybraintrustdestination",
+ "ObservabilityBraintrustDestinationConfigTypedDict": ".observabilitybraintrustdestination",
+ "ObservabilityBraintrustDestinationType": ".observabilitybraintrustdestination",
+ "ObservabilityBraintrustDestinationTypedDict": ".observabilitybraintrustdestination",
+ "ObservabilityClickhouseDestination": ".observabilityclickhousedestination",
+ "ObservabilityClickhouseDestinationConfig": ".observabilityclickhousedestination",
+ "ObservabilityClickhouseDestinationConfigTypedDict": ".observabilityclickhousedestination",
+ "ObservabilityClickhouseDestinationType": ".observabilityclickhousedestination",
+ "ObservabilityClickhouseDestinationTypedDict": ".observabilityclickhousedestination",
+ "ObservabilityDatadogDestination": ".observabilitydatadogdestination",
+ "ObservabilityDatadogDestinationConfig": ".observabilitydatadogdestination",
+ "ObservabilityDatadogDestinationConfigTypedDict": ".observabilitydatadogdestination",
+ "ObservabilityDatadogDestinationType": ".observabilitydatadogdestination",
+ "ObservabilityDatadogDestinationTypedDict": ".observabilitydatadogdestination",
+ "ObservabilityDestination": ".observabilitydestination",
+ "ObservabilityDestinationTypedDict": ".observabilitydestination",
+ "FieldT": ".observabilityfilterrulesconfig",
+ "Group": ".observabilityfilterrulesconfig",
+ "GroupTypedDict": ".observabilityfilterrulesconfig",
+ "Logic": ".observabilityfilterrulesconfig",
+ "ObservabilityFilterRulesConfig": ".observabilityfilterrulesconfig",
+ "ObservabilityFilterRulesConfigTypedDict": ".observabilityfilterrulesconfig",
+ "ObservabilityFilterRulesConfigValue": ".observabilityfilterrulesconfig",
+ "ObservabilityFilterRulesConfigValueTypedDict": ".observabilityfilterrulesconfig",
+ "Operator": ".observabilityfilterrulesconfig",
+ "Rule": ".observabilityfilterrulesconfig",
+ "RuleTypedDict": ".observabilityfilterrulesconfig",
+ "ObservabilityGrafanaDestination": ".observabilitygrafanadestination",
+ "ObservabilityGrafanaDestinationConfig": ".observabilitygrafanadestination",
+ "ObservabilityGrafanaDestinationConfigTypedDict": ".observabilitygrafanadestination",
+ "ObservabilityGrafanaDestinationType": ".observabilitygrafanadestination",
+ "ObservabilityGrafanaDestinationTypedDict": ".observabilitygrafanadestination",
+ "ObservabilityLangfuseDestination": ".observabilitylangfusedestination",
+ "ObservabilityLangfuseDestinationConfig": ".observabilitylangfusedestination",
+ "ObservabilityLangfuseDestinationConfigTypedDict": ".observabilitylangfusedestination",
+ "ObservabilityLangfuseDestinationType": ".observabilitylangfusedestination",
+ "ObservabilityLangfuseDestinationTypedDict": ".observabilitylangfusedestination",
+ "ObservabilityLangsmithDestination": ".observabilitylangsmithdestination",
+ "ObservabilityLangsmithDestinationConfig": ".observabilitylangsmithdestination",
+ "ObservabilityLangsmithDestinationConfigTypedDict": ".observabilitylangsmithdestination",
+ "ObservabilityLangsmithDestinationType": ".observabilitylangsmithdestination",
+ "ObservabilityLangsmithDestinationTypedDict": ".observabilitylangsmithdestination",
+ "ObservabilityNewrelicDestination": ".observabilitynewrelicdestination",
+ "ObservabilityNewrelicDestinationConfig": ".observabilitynewrelicdestination",
+ "ObservabilityNewrelicDestinationConfigTypedDict": ".observabilitynewrelicdestination",
+ "ObservabilityNewrelicDestinationType": ".observabilitynewrelicdestination",
+ "ObservabilityNewrelicDestinationTypedDict": ".observabilitynewrelicdestination",
+ "Region": ".observabilitynewrelicdestination",
+ "ObservabilityOpikDestination": ".observabilityopikdestination",
+ "ObservabilityOpikDestinationConfig": ".observabilityopikdestination",
+ "ObservabilityOpikDestinationConfigTypedDict": ".observabilityopikdestination",
+ "ObservabilityOpikDestinationType": ".observabilityopikdestination",
+ "ObservabilityOpikDestinationTypedDict": ".observabilityopikdestination",
+ "ObservabilityOtelCollectorDestination": ".observabilityotelcollectordestination",
+ "ObservabilityOtelCollectorDestinationConfig": ".observabilityotelcollectordestination",
+ "ObservabilityOtelCollectorDestinationConfigTypedDict": ".observabilityotelcollectordestination",
+ "ObservabilityOtelCollectorDestinationType": ".observabilityotelcollectordestination",
+ "ObservabilityOtelCollectorDestinationTypedDict": ".observabilityotelcollectordestination",
+ "ObservabilityPosthogDestination": ".observabilityposthogdestination",
+ "ObservabilityPosthogDestinationConfig": ".observabilityposthogdestination",
+ "ObservabilityPosthogDestinationConfigTypedDict": ".observabilityposthogdestination",
+ "ObservabilityPosthogDestinationType": ".observabilityposthogdestination",
+ "ObservabilityPosthogDestinationTypedDict": ".observabilityposthogdestination",
+ "ObservabilityRampDestination": ".observabilityrampdestination",
+ "ObservabilityRampDestinationConfig": ".observabilityrampdestination",
+ "ObservabilityRampDestinationConfigTypedDict": ".observabilityrampdestination",
+ "ObservabilityRampDestinationType": ".observabilityrampdestination",
+ "ObservabilityRampDestinationTypedDict": ".observabilityrampdestination",
+ "ObservabilityS3Destination": ".observabilitys3destination",
+ "ObservabilityS3DestinationConfig": ".observabilitys3destination",
+ "ObservabilityS3DestinationConfigTypedDict": ".observabilitys3destination",
+ "ObservabilityS3DestinationType": ".observabilitys3destination",
+ "ObservabilityS3DestinationTypedDict": ".observabilitys3destination",
+ "ObservabilitySentryDestination": ".observabilitysentrydestination",
+ "ObservabilitySentryDestinationConfig": ".observabilitysentrydestination",
+ "ObservabilitySentryDestinationConfigTypedDict": ".observabilitysentrydestination",
+ "ObservabilitySentryDestinationType": ".observabilitysentrydestination",
+ "ObservabilitySentryDestinationTypedDict": ".observabilitysentrydestination",
+ "ObservabilitySnowflakeDestination": ".observabilitysnowflakedestination",
+ "ObservabilitySnowflakeDestinationConfig": ".observabilitysnowflakedestination",
+ "ObservabilitySnowflakeDestinationConfigTypedDict": ".observabilitysnowflakedestination",
+ "ObservabilitySnowflakeDestinationType": ".observabilitysnowflakedestination",
+ "ObservabilitySnowflakeDestinationTypedDict": ".observabilitysnowflakedestination",
+ "ObservabilityWeaveDestination": ".observabilityweavedestination",
+ "ObservabilityWeaveDestinationConfig": ".observabilityweavedestination",
+ "ObservabilityWeaveDestinationConfigTypedDict": ".observabilityweavedestination",
+ "ObservabilityWeaveDestinationType": ".observabilityweavedestination",
+ "ObservabilityWeaveDestinationTypedDict": ".observabilityweavedestination",
+ "Method": ".observabilitywebhookdestination",
+ "ObservabilityWebhookDestination": ".observabilitywebhookdestination",
+ "ObservabilityWebhookDestinationConfig": ".observabilitywebhookdestination",
+ "ObservabilityWebhookDestinationConfigTypedDict": ".observabilitywebhookdestination",
+ "ObservabilityWebhookDestinationType": ".observabilitywebhookdestination",
+ "ObservabilityWebhookDestinationTypedDict": ".observabilitywebhookdestination",
+ "OpenAIResponseCustomToolCall": ".openairesponsecustomtoolcall",
+ "OpenAIResponseCustomToolCallType": ".openairesponsecustomtoolcall",
+ "OpenAIResponseCustomToolCallTypedDict": ".openairesponsecustomtoolcall",
+ "OpenAIResponseCustomToolCallOutput": ".openairesponsecustomtoolcalloutput",
+ "OpenAIResponseCustomToolCallOutputOutput1": ".openairesponsecustomtoolcalloutput",
+ "OpenAIResponseCustomToolCallOutputOutput1TypedDict": ".openairesponsecustomtoolcalloutput",
+ "OpenAIResponseCustomToolCallOutputOutput2": ".openairesponsecustomtoolcalloutput",
+ "OpenAIResponseCustomToolCallOutputOutput2TypedDict": ".openairesponsecustomtoolcalloutput",
+ "OpenAIResponseCustomToolCallOutputType": ".openairesponsecustomtoolcalloutput",
+ "OpenAIResponseCustomToolCallOutputTypedDict": ".openairesponsecustomtoolcalloutput",
"OpenAIResponseFunctionToolCall": ".openairesponsefunctiontoolcall",
"OpenAIResponseFunctionToolCallType": ".openairesponsefunctiontoolcall",
"OpenAIResponseFunctionToolCallTypedDict": ".openairesponsefunctiontoolcall",
@@ -2939,12 +5393,18 @@ _dynamic_imports: dict[str, str] = {
"OpenAIResponsesRefusalContentTypedDict": ".openairesponsesrefusalcontent",
"OpenAIResponsesResponseStatus": ".openairesponsesresponsestatus",
"OpenAIResponsesToolChoice": ".openairesponsestoolchoice_union",
+ "OpenAIResponsesToolChoiceApplyPatch": ".openairesponsestoolchoice_union",
+ "OpenAIResponsesToolChoiceApplyPatchTypedDict": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceAuto": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceFunction": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceFunctionTypedDict": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceNone": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceRequired": ".openairesponsestoolchoice_union",
+ "OpenAIResponsesToolChoiceShell": ".openairesponsestoolchoice_union",
+ "OpenAIResponsesToolChoiceShellTypedDict": ".openairesponsestoolchoice_union",
+ "OpenAIResponsesToolChoiceTypeApplyPatch": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceTypeFunction": ".openairesponsestoolchoice_union",
+ "OpenAIResponsesToolChoiceTypeShell": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceTypeWebSearchPreview": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceTypeWebSearchPreview20250311": ".openairesponsestoolchoice_union",
"OpenAIResponsesToolChoiceTypedDict": ".openairesponsestoolchoice_union",
@@ -2967,9 +5427,17 @@ _dynamic_imports: dict[str, str] = {
"OpenResponsesResultToolUnionTypedDict": ".openresponsesresult",
"OpenResponsesResultType": ".openresponsesresult",
"OpenResponsesResultTypedDict": ".openresponsesresult",
+ "OpenRouterMetadata": ".openroutermetadata",
+ "OpenRouterMetadataTypedDict": ".openroutermetadata",
"OpenRouterWebSearchServerTool": ".openrouterwebsearchservertool",
"OpenRouterWebSearchServerToolType": ".openrouterwebsearchservertool",
"OpenRouterWebSearchServerToolTypedDict": ".openrouterwebsearchservertool",
+ "OutputAdvisorServerToolItem": ".outputadvisorservertoolitem",
+ "OutputAdvisorServerToolItemType": ".outputadvisorservertoolitem",
+ "OutputAdvisorServerToolItemTypedDict": ".outputadvisorservertoolitem",
+ "OutputApplyPatchCallItem": ".outputapplypatchcallitem",
+ "OutputApplyPatchCallItemType": ".outputapplypatchcallitem",
+ "OutputApplyPatchCallItemTypedDict": ".outputapplypatchcallitem",
"OutputApplyPatchServerToolItem": ".outputapplypatchservertoolitem",
"OutputApplyPatchServerToolItemType": ".outputapplypatchservertoolitem",
"OutputApplyPatchServerToolItemTypedDict": ".outputapplypatchservertoolitem",
@@ -2982,13 +5450,13 @@ _dynamic_imports: dict[str, str] = {
"OutputCodeInterpreterCallItem": ".outputcodeinterpretercallitem",
"OutputCodeInterpreterCallItemOutputUnion": ".outputcodeinterpretercallitem",
"OutputCodeInterpreterCallItemOutputUnionTypedDict": ".outputcodeinterpretercallitem",
+ "OutputCodeInterpreterCallItemTypeImage": ".outputcodeinterpretercallitem",
"OutputCodeInterpreterCallItemTypedDict": ".outputcodeinterpretercallitem",
"OutputImage": ".outputcodeinterpretercallitem",
"OutputImageTypedDict": ".outputcodeinterpretercallitem",
"OutputLogs": ".outputcodeinterpretercallitem",
"OutputLogsTypedDict": ".outputcodeinterpretercallitem",
"TypeCodeInterpreterCall": ".outputcodeinterpretercallitem",
- "TypeImage": ".outputcodeinterpretercallitem",
"TypeLogs": ".outputcodeinterpretercallitem",
"OutputCodeInterpreterServerToolItem": ".outputcodeinterpreterservertoolitem",
"OutputCodeInterpreterServerToolItemType": ".outputcodeinterpreterservertoolitem",
@@ -2999,6 +5467,9 @@ _dynamic_imports: dict[str, str] = {
"OutputComputerCallItemTypedDict": ".outputcomputercallitem",
"PendingSafetyCheck": ".outputcomputercallitem",
"PendingSafetyCheckTypedDict": ".outputcomputercallitem",
+ "OutputCustomToolCallItem": ".outputcustomtoolcallitem",
+ "OutputCustomToolCallItemType": ".outputcustomtoolcallitem",
+ "OutputCustomToolCallItemTypedDict": ".outputcustomtoolcallitem",
"OutputDatetimeItem": ".outputdatetimeitem",
"OutputDatetimeItemType": ".outputdatetimeitem",
"OutputDatetimeItemTypedDict": ".outputdatetimeitem",
@@ -3016,6 +5487,13 @@ _dynamic_imports: dict[str, str] = {
"OutputFunctionCallItemStatusUnionTypedDict": ".outputfunctioncallitem",
"OutputFunctionCallItemType": ".outputfunctioncallitem",
"OutputFunctionCallItemTypedDict": ".outputfunctioncallitem",
+ "FailedModel": ".outputfusionservertoolitem",
+ "FailedModelTypedDict": ".outputfusionservertoolitem",
+ "OutputFusionServerToolItem": ".outputfusionservertoolitem",
+ "OutputFusionServerToolItemType": ".outputfusionservertoolitem",
+ "OutputFusionServerToolItemTypedDict": ".outputfusionservertoolitem",
+ "Response": ".outputfusionservertoolitem",
+ "ResponseTypedDict": ".outputfusionservertoolitem",
"OutputImageGenerationCallItem": ".outputimagegenerationcallitem",
"OutputImageGenerationCallItemType": ".outputimagegenerationcallitem",
"OutputImageGenerationCallItemTypedDict": ".outputimagegenerationcallitem",
@@ -3074,6 +5552,27 @@ _dynamic_imports: dict[str, str] = {
"OutputReasoningItemStatusUnionTypedDict": ".outputreasoningitem",
"OutputReasoningItemType": ".outputreasoningitem",
"OutputReasoningItemTypedDict": ".outputreasoningitem",
+ "OutputSearchModelsServerToolItem": ".outputsearchmodelsservertoolitem",
+ "OutputSearchModelsServerToolItemType": ".outputsearchmodelsservertoolitem",
+ "OutputSearchModelsServerToolItemTypedDict": ".outputsearchmodelsservertoolitem",
+ "OutputShellCallItem": ".outputshellcallitem",
+ "OutputShellCallItemAction": ".outputshellcallitem",
+ "OutputShellCallItemActionTypedDict": ".outputshellcallitem",
+ "OutputShellCallItemType": ".outputshellcallitem",
+ "OutputShellCallItemTypedDict": ".outputshellcallitem",
+ "Outcome": ".outputshellcalloutputitem",
+ "OutcomeExit": ".outputshellcalloutputitem",
+ "OutcomeExitTypedDict": ".outputshellcalloutputitem",
+ "OutcomeTimeout": ".outputshellcalloutputitem",
+ "OutcomeTimeoutTypedDict": ".outputshellcalloutputitem",
+ "OutcomeTypedDict": ".outputshellcalloutputitem",
+ "OutputShellCallOutputItem": ".outputshellcalloutputitem",
+ "OutputShellCallOutputItemOutput": ".outputshellcalloutputitem",
+ "OutputShellCallOutputItemOutputTypedDict": ".outputshellcalloutputitem",
+ "OutputShellCallOutputItemTypeShellCallOutput": ".outputshellcalloutputitem",
+ "OutputShellCallOutputItemTypedDict": ".outputshellcalloutputitem",
+ "TypeExit": ".outputshellcalloutputitem",
+ "TypeTimeout": ".outputshellcalloutputitem",
"Command": ".outputtexteditorservertoolitem",
"OutputTextEditorServerToolItem": ".outputtexteditorservertoolitem",
"OutputTextEditorServerToolItemType": ".outputtexteditorservertoolitem",
@@ -3089,19 +5588,28 @@ _dynamic_imports: dict[str, str] = {
"ActionFindInPageTypedDict": ".outputwebsearchcallitem",
"ActionOpenPage": ".outputwebsearchcallitem",
"ActionOpenPageTypedDict": ".outputwebsearchcallitem",
- "ActionSearch": ".outputwebsearchcallitem",
- "ActionSearchTypedDict": ".outputwebsearchcallitem",
+ "ActionTypeSearch": ".outputwebsearchcallitem",
"ActionTypedDict": ".outputwebsearchcallitem",
"OutputWebSearchCallItem": ".outputwebsearchcallitem",
+ "OutputWebSearchCallItemActionSearch": ".outputwebsearchcallitem",
+ "OutputWebSearchCallItemActionSearchTypedDict": ".outputwebsearchcallitem",
"OutputWebSearchCallItemTypedDict": ".outputwebsearchcallitem",
"TypeFindInPage": ".outputwebsearchcallitem",
"TypeOpenPage": ".outputwebsearchcallitem",
- "TypeSearch": ".outputwebsearchcallitem",
"TypeWebSearchCall": ".outputwebsearchcallitem",
"OutputWebSearchServerToolItem": ".outputwebsearchservertoolitem",
- "OutputWebSearchServerToolItemType": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemAction": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemActionTypedDict": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemSource": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemSourceTypedDict": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemTypeOpenrouterWebSearch": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemTypeSearch": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemTypeURL": ".outputwebsearchservertoolitem",
"OutputWebSearchServerToolItemTypedDict": ".outputwebsearchservertoolitem",
"Parameter": ".parameter",
+ "ParetoRouterPlugin": ".paretorouterplugin",
+ "ParetoRouterPluginID": ".paretorouterplugin",
+ "ParetoRouterPluginTypedDict": ".paretorouterplugin",
"PayloadTooLargeResponseErrorData": ".payloadtoolargeresponseerrordata",
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
"PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata",
@@ -3120,10 +5628,20 @@ _dynamic_imports: dict[str, str] = {
"PercentileThroughputCutoffsTypedDict": ".percentilethroughputcutoffs",
"PerRequestLimits": ".perrequestlimits",
"PerRequestLimitsTypedDict": ".perrequestlimits",
+ "PipelineStage": ".pipelinestage",
+ "PipelineStageTypedDict": ".pipelinestage",
+ "PipelineStageType": ".pipelinestagetype",
"PreferredMaxLatency": ".preferredmaxlatency",
"PreferredMaxLatencyTypedDict": ".preferredmaxlatency",
"PreferredMinThroughput": ".preferredminthroughput",
"PreferredMinThroughputTypedDict": ".preferredminthroughput",
+ "Preset": ".preset",
+ "PresetTypedDict": ".preset",
+ "PresetDesignatedVersion": ".presetdesignatedversion",
+ "PresetDesignatedVersionTypedDict": ".presetdesignatedversion",
+ "PresetStatus": ".presetstatus",
+ "PresetWithDesignatedVersion": ".presetwithdesignatedversion",
+ "PresetWithDesignatedVersionTypedDict": ".presetwithdesignatedversion",
"Preview20250311WebSearchServerTool": ".preview_20250311_websearchservertool",
"Preview20250311WebSearchServerToolType": ".preview_20250311_websearchservertool",
"Preview20250311WebSearchServerToolTypedDict": ".preview_20250311_websearchservertool",
@@ -3133,7 +5651,10 @@ _dynamic_imports: dict[str, str] = {
"PreviewWebSearchUserLocation": ".preview_websearchuserlocation",
"PreviewWebSearchUserLocationType": ".preview_websearchuserlocation",
"PreviewWebSearchUserLocationTypedDict": ".preview_websearchuserlocation",
+ "PromptInjectionScanScope": ".promptinjectionscanscope",
"ProviderName": ".providername",
+ "ProviderOptions": ".provideroptions",
+ "ProviderOptionsTypedDict": ".provideroptions",
"ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata",
"ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata",
"DataCollection": ".providerpreferences",
@@ -3165,6 +5686,13 @@ _dynamic_imports: dict[str, str] = {
"PublicPricing": ".publicpricing",
"PublicPricingTypedDict": ".publicpricing",
"Quantization": ".quantization",
+ "RankingsDailyItem": ".rankingsdailyitem",
+ "RankingsDailyItemTypedDict": ".rankingsdailyitem",
+ "RankingsDailyMeta": ".rankingsdailymeta",
+ "RankingsDailyMetaTypedDict": ".rankingsdailymeta",
+ "Version": ".rankingsdailymeta",
+ "RankingsDailyResponse": ".rankingsdailyresponse",
+ "RankingsDailyResponseTypedDict": ".rankingsdailyresponse",
"ReasoningConfig": ".reasoningconfig",
"ReasoningConfigTypedDict": ".reasoningconfig",
"ReasoningDeltaEvent": ".reasoningdeltaevent",
@@ -3245,6 +5773,13 @@ _dynamic_imports: dict[str, str] = {
"ResponsesRequestToolUnionTypedDict": ".responsesrequest",
"ResponsesRequestType": ".responsesrequest",
"ResponsesRequestTypedDict": ".responsesrequest",
+ "ResponsesStreamingResponse": ".responsesstreamingresponse",
+ "ResponsesStreamingResponseTypedDict": ".responsesstreamingresponse",
+ "RouterAttempt": ".routerattempt",
+ "RouterAttemptTypedDict": ".routerattempt",
+ "RouterParams": ".routerparams",
+ "RouterParamsTypedDict": ".routerparams",
+ "RoutingStrategy": ".routingstrategy",
"SearchContextSizeEnum": ".searchcontextsizeenum",
"SearchModelsServerToolConfig": ".searchmodelsservertoolconfig",
"SearchModelsServerToolConfigTypedDict": ".searchmodelsservertoolconfig",
@@ -3253,9 +5788,52 @@ _dynamic_imports: dict[str, str] = {
"SecurityTypedDict": ".security",
"ServiceUnavailableResponseErrorData": ".serviceunavailableresponseerrordata",
"ServiceUnavailableResponseErrorDataTypedDict": ".serviceunavailableresponseerrordata",
+ "ShellCallItem": ".shellcallitem",
+ "ShellCallItemAction": ".shellcallitem",
+ "ShellCallItemActionTypedDict": ".shellcallitem",
+ "ShellCallItemStatus": ".shellcallitem",
+ "ShellCallItemType": ".shellcallitem",
+ "ShellCallItemTypedDict": ".shellcallitem",
+ "ShellCallOutputItem": ".shellcalloutputitem",
+ "ShellCallOutputItemOutput": ".shellcalloutputitem",
+ "ShellCallOutputItemOutputTypedDict": ".shellcalloutputitem",
+ "ShellCallOutputItemStatus": ".shellcalloutputitem",
+ "ShellCallOutputItemType": ".shellcalloutputitem",
+ "ShellCallOutputItemTypedDict": ".shellcalloutputitem",
+ "ShellCallStatus": ".shellcallstatus",
"ShellServerTool": ".shellservertool",
"ShellServerToolType": ".shellservertool",
"ShellServerToolTypedDict": ".shellservertool",
+ "ShellServerToolOpenRouter": ".shellservertool_openrouter",
+ "ShellServerToolOpenRouterType": ".shellservertool_openrouter",
+ "ShellServerToolOpenRouterTypedDict": ".shellservertool_openrouter",
+ "ShellServerToolConfig": ".shellservertoolconfig",
+ "ShellServerToolConfigTypedDict": ".shellservertoolconfig",
+ "ShellServerToolEngine": ".shellservertoolengine",
+ "ShellServerToolEnvironment": ".shellservertoolenvironment",
+ "ShellServerToolEnvironmentTypedDict": ".shellservertoolenvironment",
+ "ResponseFormatEnum": ".speechrequest",
+ "SpeechRequest": ".speechrequest",
+ "SpeechRequestProvider": ".speechrequest",
+ "SpeechRequestProviderTypedDict": ".speechrequest",
+ "SpeechRequestTypedDict": ".speechrequest",
+ "StopServerToolsWhenCondition": ".stopservertoolswhencondition",
+ "StopServerToolsWhenConditionTypedDict": ".stopservertoolswhencondition",
+ "StopServerToolsWhenFinishReasonIs": ".stopservertoolswhenfinishreasonis",
+ "StopServerToolsWhenFinishReasonIsType": ".stopservertoolswhenfinishreasonis",
+ "StopServerToolsWhenFinishReasonIsTypedDict": ".stopservertoolswhenfinishreasonis",
+ "StopServerToolsWhenHasToolCall": ".stopservertoolswhenhastoolcall",
+ "StopServerToolsWhenHasToolCallType": ".stopservertoolswhenhastoolcall",
+ "StopServerToolsWhenHasToolCallTypedDict": ".stopservertoolswhenhastoolcall",
+ "StopServerToolsWhenMaxCost": ".stopservertoolswhenmaxcost",
+ "StopServerToolsWhenMaxCostType": ".stopservertoolswhenmaxcost",
+ "StopServerToolsWhenMaxCostTypedDict": ".stopservertoolswhenmaxcost",
+ "StopServerToolsWhenMaxTokensUsed": ".stopservertoolswhenmaxtokensused",
+ "StopServerToolsWhenMaxTokensUsedType": ".stopservertoolswhenmaxtokensused",
+ "StopServerToolsWhenMaxTokensUsedTypedDict": ".stopservertoolswhenmaxtokensused",
+ "StopServerToolsWhenStepCountIs": ".stopservertoolswhenstepcountis",
+ "StopServerToolsWhenStepCountIsType": ".stopservertoolswhenstepcountis",
+ "StopServerToolsWhenStepCountIsTypedDict": ".stopservertoolswhenstepcountis",
"StoredPromptTemplate": ".storedprompttemplate",
"StoredPromptTemplateTypedDict": ".storedprompttemplate",
"Variables": ".storedprompttemplate",
@@ -3281,9 +5859,16 @@ _dynamic_imports: dict[str, str] = {
"StreamLogprobTypedDict": ".streamlogprob",
"StreamLogprobTopLogprob": ".streamlogprobtoplogprob",
"StreamLogprobTopLogprobTypedDict": ".streamlogprobtoplogprob",
- "TextConfig": ".textconfig",
- "TextConfigTypedDict": ".textconfig",
- "TextConfigVerbosity": ".textconfig",
+ "STTInputAudio": ".sttinputaudio",
+ "STTInputAudioTypedDict": ".sttinputaudio",
+ "STTRequest": ".sttrequest",
+ "STTRequestProvider": ".sttrequest",
+ "STTRequestProviderTypedDict": ".sttrequest",
+ "STTRequestTypedDict": ".sttrequest",
+ "STTResponse": ".sttresponse",
+ "STTResponseTypedDict": ".sttresponse",
+ "STTUsage": ".sttusage",
+ "STTUsageTypedDict": ".sttusage",
"TextDeltaEvent": ".textdeltaevent",
"TextDeltaEventType": ".textdeltaevent",
"TextDeltaEventTypedDict": ".textdeltaevent",
@@ -3292,7 +5877,7 @@ _dynamic_imports: dict[str, str] = {
"TextDoneEventTypedDict": ".textdoneevent",
"TextExtendedConfig": ".textextendedconfig",
"TextExtendedConfigTypedDict": ".textextendedconfig",
- "TextExtendedConfigVerbosity": ".textextendedconfig",
+ "Verbosity": ".textextendedconfig",
"ToolCallStatus": ".toolcallstatus",
"Mode": ".toolchoiceallowed",
"ModeAuto": ".toolchoiceallowed",
@@ -3312,28 +5897,40 @@ _dynamic_imports: dict[str, str] = {
"UnauthorizedResponseErrorDataTypedDict": ".unauthorizedresponseerrordata",
"UnprocessableEntityResponseErrorData": ".unprocessableentityresponseerrordata",
"UnprocessableEntityResponseErrorDataTypedDict": ".unprocessableentityresponseerrordata",
+ "UpdateBYOKKeyRequest": ".updatebyokkeyrequest",
+ "UpdateBYOKKeyRequestTypedDict": ".updatebyokkeyrequest",
+ "UpdateBYOKKeyResponse": ".updatebyokkeyresponse",
+ "UpdateBYOKKeyResponseTypedDict": ".updatebyokkeyresponse",
"UpdateGuardrailRequest": ".updateguardrailrequest",
"UpdateGuardrailRequestTypedDict": ".updateguardrailrequest",
"UpdateGuardrailResponse": ".updateguardrailresponse",
"UpdateGuardrailResponseTypedDict": ".updateguardrailresponse",
+ "UpdateObservabilityDestinationRequest": ".updateobservabilitydestinationrequest",
+ "UpdateObservabilityDestinationRequestTypedDict": ".updateobservabilitydestinationrequest",
+ "UpdateObservabilityDestinationResponse": ".updateobservabilitydestinationresponse",
+ "UpdateObservabilityDestinationResponseTypedDict": ".updateobservabilitydestinationresponse",
+ "UpdateWorkspaceRequest": ".updateworkspacerequest",
+ "UpdateWorkspaceRequestTypedDict": ".updateworkspacerequest",
+ "UpdateWorkspaceResponse": ".updateworkspaceresponse",
+ "UpdateWorkspaceResponseTypedDict": ".updateworkspaceresponse",
"URLCitation": ".urlcitation",
"URLCitationType": ".urlcitation",
"URLCitationTypedDict": ".urlcitation",
- "CostDetails": ".usage",
- "CostDetailsTypedDict": ".usage",
"InputTokensDetails": ".usage",
"InputTokensDetailsTypedDict": ".usage",
"OutputTokensDetails": ".usage",
"OutputTokensDetailsTypedDict": ".usage",
"Usage": ".usage",
+ "UsageCostDetails": ".usage",
+ "UsageCostDetailsTypedDict": ".usage",
"UsageTypedDict": ".usage",
"AspectRatio": ".videogenerationrequest",
"Options": ".videogenerationrequest",
"OptionsTypedDict": ".videogenerationrequest",
- "Provider": ".videogenerationrequest",
- "ProviderTypedDict": ".videogenerationrequest",
"Resolution": ".videogenerationrequest",
"VideoGenerationRequest": ".videogenerationrequest",
+ "VideoGenerationRequestProvider": ".videogenerationrequest",
+ "VideoGenerationRequestProviderTypedDict": ".videogenerationrequest",
"VideoGenerationRequestTypedDict": ".videogenerationrequest",
"VideoGenerationResponse": ".videogenerationresponse",
"VideoGenerationResponseStatus": ".videogenerationresponse",
@@ -3348,6 +5945,15 @@ _dynamic_imports: dict[str, str] = {
"VideoModelTypedDict": ".videomodel",
"VideoModelsListResponse": ".videomodelslistresponse",
"VideoModelsListResponseTypedDict": ".videomodelslistresponse",
+ "WebFetchEngineEnum": ".webfetchengineenum",
+ "WebFetchPlugin": ".webfetchplugin",
+ "WebFetchPluginID": ".webfetchplugin",
+ "WebFetchPluginTypedDict": ".webfetchplugin",
+ "WebFetchServerTool": ".webfetchservertool",
+ "WebFetchServerToolType": ".webfetchservertool",
+ "WebFetchServerToolTypedDict": ".webfetchservertool",
+ "WebFetchServerToolConfig": ".webfetchservertoolconfig",
+ "WebFetchServerToolConfigTypedDict": ".webfetchservertoolconfig",
"WebSearchCallCompletedEvent": ".websearchcallcompletedevent",
"WebSearchCallCompletedEventType": ".websearchcallcompletedevent",
"WebSearchCallCompletedEventTypedDict": ".websearchcallcompletedevent",
@@ -3363,17 +5969,20 @@ _dynamic_imports: dict[str, str] = {
"WebSearchDomainFilterTypedDict": ".websearchdomainfilter",
"WebSearchEngine": ".websearchengine",
"WebSearchEngineEnum": ".websearchengineenum",
+ "UserLocation": ".websearchplugin",
+ "UserLocationTypedDict": ".websearchplugin",
"WebSearchPlugin": ".websearchplugin",
"WebSearchPluginID": ".websearchplugin",
+ "WebSearchPluginType": ".websearchplugin",
"WebSearchPluginTypedDict": ".websearchplugin",
"WebSearchServerTool": ".websearchservertool",
"WebSearchServerToolType": ".websearchservertool",
"WebSearchServerToolTypedDict": ".websearchservertool",
- "Parameters": ".websearchservertool_openrouter",
- "ParametersTypedDict": ".websearchservertool_openrouter",
"WebSearchServerToolOpenRouter": ".websearchservertool_openrouter",
"WebSearchServerToolOpenRouterType": ".websearchservertool_openrouter",
"WebSearchServerToolOpenRouterTypedDict": ".websearchservertool_openrouter",
+ "WebSearchServerToolConfig": ".websearchservertoolconfig",
+ "WebSearchServerToolConfigTypedDict": ".websearchservertoolconfig",
"WebSearchSource": ".websearchsource",
"WebSearchSourceType": ".websearchsource",
"WebSearchSourceTypedDict": ".websearchsource",
@@ -3384,6 +5993,11 @@ _dynamic_imports: dict[str, str] = {
"WebSearchUserLocationServerTool": ".websearchuserlocationservertool",
"WebSearchUserLocationServerToolType": ".websearchuserlocationservertool",
"WebSearchUserLocationServerToolTypedDict": ".websearchuserlocationservertool",
+ "Workspace": ".workspace",
+ "WorkspaceTypedDict": ".workspace",
+ "WorkspaceMember": ".workspacemember",
+ "WorkspaceMemberRole": ".workspacemember",
+ "WorkspaceMemberTypedDict": ".workspacemember",
}
diff --git a/src/openrouter/components/advisornestedtool.py b/src/openrouter/components/advisornestedtool.py
new file mode 100644
index 0000000..0226627
--- /dev/null
+++ b/src/openrouter/components/advisornestedtool.py
@@ -0,0 +1,39 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable
+import pydantic
+from pydantic import ConfigDict
+from typing import Any, Dict, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class AdvisorNestedToolTypedDict(TypedDict):
+ r"""A tool made available to the advisor sub-agent. Accepts function tools and OpenRouter server tools (e.g. openrouter:web_search). The advisor tool may not list itself."""
+
+ type: str
+ function: NotRequired[Dict[str, Nullable[Any]]]
+ parameters: NotRequired[Dict[str, Nullable[Any]]]
+
+
+class AdvisorNestedTool(BaseModel):
+ r"""A tool made available to the advisor sub-agent. Accepts function tools and OpenRouter server tools (e.g. openrouter:web_search). The advisor tool may not list itself."""
+
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
+ )
+ __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
+
+ type: str
+
+ function: Optional[Dict[str, Nullable[Any]]] = None
+
+ parameters: Optional[Dict[str, Nullable[Any]]] = None
+
+ @property
+ def additional_properties(self):
+ return self.__pydantic_extra__
+
+ @additional_properties.setter
+ def additional_properties(self, value):
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
diff --git a/src/openrouter/components/advisorreasoning.py b/src/openrouter/components/advisorreasoning.py
new file mode 100644
index 0000000..7376346
--- /dev/null
+++ b/src/openrouter/components/advisorreasoning.py
@@ -0,0 +1,43 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+AdvisorReasoningEffort = Union[
+ Literal[
+ "xhigh",
+ "high",
+ "medium",
+ "low",
+ "minimal",
+ "none",
+ ],
+ UnrecognizedStr,
+]
+r"""Reasoning effort level for the advisor call."""
+
+
+class AdvisorReasoningTypedDict(TypedDict):
+ r"""Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking."""
+
+ effort: NotRequired[AdvisorReasoningEffort]
+ r"""Reasoning effort level for the advisor call."""
+ max_tokens: NotRequired[int]
+ r"""Maximum number of reasoning tokens the advisor may use."""
+
+
+class AdvisorReasoning(BaseModel):
+ r"""Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking."""
+
+ effort: Annotated[
+ Optional[AdvisorReasoningEffort], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Reasoning effort level for the advisor call."""
+
+ max_tokens: Optional[int] = None
+ r"""Maximum number of reasoning tokens the advisor may use."""
diff --git a/src/openrouter/components/advisorservertool_openrouter.py b/src/openrouter/components/advisorservertool_openrouter.py
new file mode 100644
index 0000000..923d263
--- /dev/null
+++ b/src/openrouter/components/advisorservertool_openrouter.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .advisorservertoolconfig import (
+ AdvisorServerToolConfig,
+ AdvisorServerToolConfigTypedDict,
+)
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+AdvisorServerToolOpenRouterType = Literal["openrouter:advisor",]
+
+
+class AdvisorServerToolOpenRouterTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor."""
+
+ type: AdvisorServerToolOpenRouterType
+ parameters: NotRequired[AdvisorServerToolConfigTypedDict]
+ r"""Configuration for one openrouter:advisor server tool entry."""
+
+
+class AdvisorServerToolOpenRouter(BaseModel):
+ r"""OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor."""
+
+ type: AdvisorServerToolOpenRouterType
+
+ parameters: Optional[AdvisorServerToolConfig] = None
+ r"""Configuration for one openrouter:advisor server tool entry."""
diff --git a/src/openrouter/components/advisorservertoolconfig.py b/src/openrouter/components/advisorservertoolconfig.py
new file mode 100644
index 0000000..7cfdf3a
--- /dev/null
+++ b/src/openrouter/components/advisorservertoolconfig.py
@@ -0,0 +1,67 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .advisornestedtool import AdvisorNestedTool, AdvisorNestedToolTypedDict
+from .advisorreasoning import AdvisorReasoning, AdvisorReasoningTypedDict
+from openrouter.types import BaseModel
+from typing import List, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class AdvisorServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for one openrouter:advisor server tool entry."""
+
+ forward_transcript: NotRequired[bool]
+ r"""When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call."""
+ instructions: NotRequired[str]
+ r"""System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own."""
+ max_completion_tokens: NotRequired[int]
+ r"""Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies."""
+ max_tool_calls: NotRequired[int]
+ r"""Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools."""
+ model: NotRequired[str]
+ r"""Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model."""
+ name: NotRequired[str]
+ r"""Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars."""
+ reasoning: NotRequired[AdvisorReasoningTypedDict]
+ r"""Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking."""
+ stream: NotRequired[bool]
+ r"""When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result."""
+ temperature: NotRequired[float]
+ r"""Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies."""
+ tools: NotRequired[List[AdvisorNestedToolTypedDict]]
+ r"""Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Must not include the advisor tool itself."""
+
+
+class AdvisorServerToolConfig(BaseModel):
+ r"""Configuration for one openrouter:advisor server tool entry."""
+
+ forward_transcript: Optional[bool] = None
+ r"""When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call."""
+
+ instructions: Optional[str] = None
+ r"""System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own."""
+
+ max_completion_tokens: Optional[int] = None
+ r"""Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies."""
+
+ max_tool_calls: Optional[int] = None
+ r"""Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools."""
+
+ model: Optional[str] = None
+ r"""Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model."""
+
+ name: Optional[str] = None
+ r"""Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars."""
+
+ reasoning: Optional[AdvisorReasoning] = None
+ r"""Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking."""
+
+ stream: Optional[bool] = None
+ r"""When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result."""
+
+ temperature: Optional[float] = None
+ r"""Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies."""
+
+ tools: Optional[List[AdvisorNestedTool]] = None
+ r"""Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Must not include the advisor tool itself."""
diff --git a/src/openrouter/components/anthropicallowedcallers.py b/src/openrouter/components/anthropicallowedcallers.py
new file mode 100644
index 0000000..500de1c
--- /dev/null
+++ b/src/openrouter/components/anthropicallowedcallers.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+AnthropicAllowedCallers = Union[
+ Literal[
+ "direct",
+ "code_execution_20250825",
+ "code_execution_20260120",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/anthropicbase64imagesource.py b/src/openrouter/components/anthropicbase64imagesource.py
new file mode 100644
index 0000000..b49ef8c
--- /dev/null
+++ b/src/openrouter/components/anthropicbase64imagesource.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropicimagemimetype import AnthropicImageMimeType
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal
+from typing_extensions import Annotated, TypedDict
+
+
+AnthropicBase64ImageSourceType = Literal["base64",]
+
+
+class AnthropicBase64ImageSourceTypedDict(TypedDict):
+ data: str
+ media_type: AnthropicImageMimeType
+ type: AnthropicBase64ImageSourceType
+
+
+class AnthropicBase64ImageSource(BaseModel):
+ data: str
+
+ media_type: Annotated[
+ AnthropicImageMimeType, PlainValidator(validate_open_enum(False))
+ ]
+
+ type: AnthropicBase64ImageSourceType
diff --git a/src/openrouter/components/anthropicbase64pdfsource.py b/src/openrouter/components/anthropicbase64pdfsource.py
new file mode 100644
index 0000000..870c2e7
--- /dev/null
+++ b/src/openrouter/components/anthropicbase64pdfsource.py
@@ -0,0 +1,26 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicBase64PdfSourceMediaType = Literal["application/pdf",]
+
+
+AnthropicBase64PdfSourceType = Literal["base64",]
+
+
+class AnthropicBase64PdfSourceTypedDict(TypedDict):
+ data: str
+ media_type: AnthropicBase64PdfSourceMediaType
+ type: AnthropicBase64PdfSourceType
+
+
+class AnthropicBase64PdfSource(BaseModel):
+ data: str
+
+ media_type: AnthropicBase64PdfSourceMediaType
+
+ type: AnthropicBase64PdfSourceType
diff --git a/src/openrouter/components/anthropiccachecontroldirective.py b/src/openrouter/components/anthropiccachecontroldirective.py
index 67645f0..4b2567b 100644
--- a/src/openrouter/components/anthropiccachecontroldirective.py
+++ b/src/openrouter/components/anthropiccachecontroldirective.py
@@ -13,14 +13,14 @@ AnthropicCacheControlDirectiveType = Literal["ephemeral",]
class AnthropicCacheControlDirectiveTypedDict(TypedDict):
- r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
type: AnthropicCacheControlDirectiveType
ttl: NotRequired[AnthropicCacheControlTTL]
class AnthropicCacheControlDirective(BaseModel):
- r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
type: AnthropicCacheControlDirectiveType
diff --git a/src/openrouter/components/anthropiccitationcharlocationparam.py b/src/openrouter/components/anthropiccitationcharlocationparam.py
new file mode 100644
index 0000000..08a89ab
--- /dev/null
+++ b/src/openrouter/components/anthropiccitationcharlocationparam.py
@@ -0,0 +1,63 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicCitationCharLocationParamType = Literal["char_location",]
+
+
+class AnthropicCitationCharLocationParamTypedDict(TypedDict):
+ cited_text: str
+ document_index: int
+ document_title: Nullable[str]
+ end_char_index: int
+ start_char_index: int
+ type: AnthropicCitationCharLocationParamType
+
+
+class AnthropicCitationCharLocationParam(BaseModel):
+ cited_text: str
+
+ document_index: int
+
+ document_title: Nullable[str]
+
+ end_char_index: int
+
+ start_char_index: int
+
+ type: AnthropicCitationCharLocationParamType
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["document_title"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropiccitationcontentblocklocationparam.py b/src/openrouter/components/anthropiccitationcontentblocklocationparam.py
new file mode 100644
index 0000000..8763d42
--- /dev/null
+++ b/src/openrouter/components/anthropiccitationcontentblocklocationparam.py
@@ -0,0 +1,63 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicCitationContentBlockLocationParamType = Literal["content_block_location",]
+
+
+class AnthropicCitationContentBlockLocationParamTypedDict(TypedDict):
+ cited_text: str
+ document_index: int
+ document_title: Nullable[str]
+ end_block_index: int
+ start_block_index: int
+ type: AnthropicCitationContentBlockLocationParamType
+
+
+class AnthropicCitationContentBlockLocationParam(BaseModel):
+ cited_text: str
+
+ document_index: int
+
+ document_title: Nullable[str]
+
+ end_block_index: int
+
+ start_block_index: int
+
+ type: AnthropicCitationContentBlockLocationParamType
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["document_title"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropiccitationpagelocationparam.py b/src/openrouter/components/anthropiccitationpagelocationparam.py
new file mode 100644
index 0000000..24af0c2
--- /dev/null
+++ b/src/openrouter/components/anthropiccitationpagelocationparam.py
@@ -0,0 +1,63 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicCitationPageLocationParamType = Literal["page_location",]
+
+
+class AnthropicCitationPageLocationParamTypedDict(TypedDict):
+ cited_text: str
+ document_index: int
+ document_title: Nullable[str]
+ end_page_number: int
+ start_page_number: int
+ type: AnthropicCitationPageLocationParamType
+
+
+class AnthropicCitationPageLocationParam(BaseModel):
+ cited_text: str
+
+ document_index: int
+
+ document_title: Nullable[str]
+
+ end_page_number: int
+
+ start_page_number: int
+
+ type: AnthropicCitationPageLocationParamType
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["document_title"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropiccitationsearchresultlocation.py b/src/openrouter/components/anthropiccitationsearchresultlocation.py
new file mode 100644
index 0000000..2c3548b
--- /dev/null
+++ b/src/openrouter/components/anthropiccitationsearchresultlocation.py
@@ -0,0 +1,66 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicCitationSearchResultLocationType = Literal["search_result_location",]
+
+
+class AnthropicCitationSearchResultLocationTypedDict(TypedDict):
+ cited_text: str
+ end_block_index: int
+ search_result_index: int
+ source: str
+ start_block_index: int
+ title: Nullable[str]
+ type: AnthropicCitationSearchResultLocationType
+
+
+class AnthropicCitationSearchResultLocation(BaseModel):
+ cited_text: str
+
+ end_block_index: int
+
+ search_result_index: int
+
+ source: str
+
+ start_block_index: int
+
+ title: Nullable[str]
+
+ type: AnthropicCitationSearchResultLocationType
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["title"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropiccitationwebsearchresultlocation.py b/src/openrouter/components/anthropiccitationwebsearchresultlocation.py
new file mode 100644
index 0000000..e64d169
--- /dev/null
+++ b/src/openrouter/components/anthropiccitationwebsearchresultlocation.py
@@ -0,0 +1,60 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicCitationWebSearchResultLocationType = Literal["web_search_result_location",]
+
+
+class AnthropicCitationWebSearchResultLocationTypedDict(TypedDict):
+ cited_text: str
+ encrypted_index: str
+ title: Nullable[str]
+ type: AnthropicCitationWebSearchResultLocationType
+ url: str
+
+
+class AnthropicCitationWebSearchResultLocation(BaseModel):
+ cited_text: str
+
+ encrypted_index: str
+
+ title: Nullable[str]
+
+ type: AnthropicCitationWebSearchResultLocationType
+
+ url: str
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["title"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropicdocumentblockparam.py b/src/openrouter/components/anthropicdocumentblockparam.py
new file mode 100644
index 0000000..2df4509
--- /dev/null
+++ b/src/openrouter/components/anthropicdocumentblockparam.py
@@ -0,0 +1,164 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropicbase64pdfsource import (
+ AnthropicBase64PdfSource,
+ AnthropicBase64PdfSourceTypedDict,
+)
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .anthropicimageblockparam import (
+ AnthropicImageBlockParam,
+ AnthropicImageBlockParamTypedDict,
+)
+from .anthropicplaintextsource import (
+ AnthropicPlainTextSource,
+ AnthropicPlainTextSourceTypedDict,
+)
+from .anthropictextblockparam import (
+ AnthropicTextBlockParam,
+ AnthropicTextBlockParamTypedDict,
+)
+from .anthropicurlpdfsource import AnthropicURLPdfSource, AnthropicURLPdfSourceTypedDict
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag, model_serializer
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+class AnthropicDocumentBlockParamCitationsTypedDict(TypedDict):
+ enabled: NotRequired[bool]
+
+
+class AnthropicDocumentBlockParamCitations(BaseModel):
+ enabled: Optional[bool] = None
+
+
+AnthropicDocumentBlockParamContent1TypedDict = TypeAliasType(
+ "AnthropicDocumentBlockParamContent1TypedDict",
+ Union[AnthropicImageBlockParamTypedDict, AnthropicTextBlockParamTypedDict],
+)
+
+
+AnthropicDocumentBlockParamContent1 = Annotated[
+ Union[
+ Annotated[AnthropicImageBlockParam, Tag("image")],
+ Annotated[AnthropicTextBlockParam, Tag("text")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+AnthropicDocumentBlockParamContent2TypedDict = TypeAliasType(
+ "AnthropicDocumentBlockParamContent2TypedDict",
+ Union[str, List[AnthropicDocumentBlockParamContent1TypedDict]],
+)
+
+
+AnthropicDocumentBlockParamContent2 = TypeAliasType(
+ "AnthropicDocumentBlockParamContent2",
+ Union[str, List[AnthropicDocumentBlockParamContent1]],
+)
+
+
+SourceType = Literal["content",]
+
+
+class SourceContentTypedDict(TypedDict):
+ content: AnthropicDocumentBlockParamContent2TypedDict
+ type: SourceType
+
+
+class SourceContent(BaseModel):
+ content: AnthropicDocumentBlockParamContent2
+
+ type: SourceType
+
+
+AnthropicDocumentBlockParamSourceUnionTypedDict = TypeAliasType(
+ "AnthropicDocumentBlockParamSourceUnionTypedDict",
+ Union[
+ SourceContentTypedDict,
+ AnthropicURLPdfSourceTypedDict,
+ AnthropicBase64PdfSourceTypedDict,
+ AnthropicPlainTextSourceTypedDict,
+ ],
+)
+
+
+AnthropicDocumentBlockParamSourceUnion = Annotated[
+ Union[
+ Annotated[AnthropicBase64PdfSource, Tag("base64")],
+ Annotated[AnthropicPlainTextSource, Tag("text")],
+ Annotated[SourceContent, Tag("content")],
+ Annotated[AnthropicURLPdfSource, Tag("url")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+TypeDocument = Literal["document",]
+
+
+class AnthropicDocumentBlockParamTypedDict(TypedDict):
+ source: AnthropicDocumentBlockParamSourceUnionTypedDict
+ type: TypeDocument
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ citations: NotRequired[Nullable[AnthropicDocumentBlockParamCitationsTypedDict]]
+ context: NotRequired[Nullable[str]]
+ title: NotRequired[Nullable[str]]
+
+
+class AnthropicDocumentBlockParam(BaseModel):
+ source: AnthropicDocumentBlockParamSourceUnion
+
+ type: TypeDocument
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ citations: OptionalNullable[AnthropicDocumentBlockParamCitations] = UNSET
+
+ context: OptionalNullable[str] = UNSET
+
+ title: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["cache_control", "citations", "context", "title"]
+ nullable_fields = ["citations", "context", "title"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropicimageblockparam.py b/src/openrouter/components/anthropicimageblockparam.py
new file mode 100644
index 0000000..05e6773
--- /dev/null
+++ b/src/openrouter/components/anthropicimageblockparam.py
@@ -0,0 +1,54 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropicbase64imagesource import (
+ AnthropicBase64ImageSource,
+ AnthropicBase64ImageSourceTypedDict,
+)
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .anthropicurlimagesource import (
+ AnthropicURLImageSource,
+ AnthropicURLImageSourceTypedDict,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+AnthropicImageBlockParamSourceTypedDict = TypeAliasType(
+ "AnthropicImageBlockParamSourceTypedDict",
+ Union[AnthropicURLImageSourceTypedDict, AnthropicBase64ImageSourceTypedDict],
+)
+
+
+AnthropicImageBlockParamSource = Annotated[
+ Union[
+ Annotated[AnthropicBase64ImageSource, Tag("base64")],
+ Annotated[AnthropicURLImageSource, Tag("url")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+AnthropicImageBlockParamType = Literal["image",]
+
+
+class AnthropicImageBlockParamTypedDict(TypedDict):
+ source: AnthropicImageBlockParamSourceTypedDict
+ type: AnthropicImageBlockParamType
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+class AnthropicImageBlockParam(BaseModel):
+ source: AnthropicImageBlockParamSource
+
+ type: AnthropicImageBlockParamType
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
diff --git a/src/openrouter/components/anthropicimagemimetype.py b/src/openrouter/components/anthropicimagemimetype.py
new file mode 100644
index 0000000..fc80dce
--- /dev/null
+++ b/src/openrouter/components/anthropicimagemimetype.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+AnthropicImageMimeType = Union[
+ Literal[
+ "image/jpeg",
+ "image/png",
+ "image/gif",
+ "image/webp",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/anthropicinputtokensclearatleast.py b/src/openrouter/components/anthropicinputtokensclearatleast.py
new file mode 100644
index 0000000..ebabdc1
--- /dev/null
+++ b/src/openrouter/components/anthropicinputtokensclearatleast.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicInputTokensClearAtLeastType = Literal["input_tokens",]
+
+
+class AnthropicInputTokensClearAtLeastTypedDict(TypedDict):
+ type: AnthropicInputTokensClearAtLeastType
+ value: int
+
+
+class AnthropicInputTokensClearAtLeast(BaseModel):
+ type: AnthropicInputTokensClearAtLeastType
+
+ value: int
diff --git a/src/openrouter/components/anthropicinputtokenstrigger.py b/src/openrouter/components/anthropicinputtokenstrigger.py
new file mode 100644
index 0000000..8ff4915
--- /dev/null
+++ b/src/openrouter/components/anthropicinputtokenstrigger.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicInputTokensTriggerType = Literal["input_tokens",]
+
+
+class AnthropicInputTokensTriggerTypedDict(TypedDict):
+ type: AnthropicInputTokensTriggerType
+ value: int
+
+
+class AnthropicInputTokensTrigger(BaseModel):
+ type: AnthropicInputTokensTriggerType
+
+ value: int
diff --git a/src/openrouter/components/anthropicplaintextsource.py b/src/openrouter/components/anthropicplaintextsource.py
new file mode 100644
index 0000000..d16f6dc
--- /dev/null
+++ b/src/openrouter/components/anthropicplaintextsource.py
@@ -0,0 +1,26 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicPlainTextSourceMediaType = Literal["text/plain",]
+
+
+AnthropicPlainTextSourceType = Literal["text",]
+
+
+class AnthropicPlainTextSourceTypedDict(TypedDict):
+ data: str
+ media_type: AnthropicPlainTextSourceMediaType
+ type: AnthropicPlainTextSourceType
+
+
+class AnthropicPlainTextSource(BaseModel):
+ data: str
+
+ media_type: AnthropicPlainTextSourceMediaType
+
+ type: AnthropicPlainTextSourceType
diff --git a/src/openrouter/components/anthropicsearchresultblockparam.py b/src/openrouter/components/anthropicsearchresultblockparam.py
new file mode 100644
index 0000000..f953ecd
--- /dev/null
+++ b/src/openrouter/components/anthropicsearchresultblockparam.py
@@ -0,0 +1,50 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .anthropictextblockparam import (
+ AnthropicTextBlockParam,
+ AnthropicTextBlockParamTypedDict,
+)
+from openrouter.types import BaseModel
+from typing import List, Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class AnthropicSearchResultBlockParamCitationsTypedDict(TypedDict):
+ enabled: NotRequired[bool]
+
+
+class AnthropicSearchResultBlockParamCitations(BaseModel):
+ enabled: Optional[bool] = None
+
+
+AnthropicSearchResultBlockParamType = Literal["search_result",]
+
+
+class AnthropicSearchResultBlockParamTypedDict(TypedDict):
+ content: List[AnthropicTextBlockParamTypedDict]
+ source: str
+ title: str
+ type: AnthropicSearchResultBlockParamType
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ citations: NotRequired[AnthropicSearchResultBlockParamCitationsTypedDict]
+
+
+class AnthropicSearchResultBlockParam(BaseModel):
+ content: List[AnthropicTextBlockParam]
+
+ source: str
+
+ title: str
+
+ type: AnthropicSearchResultBlockParamType
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ citations: Optional[AnthropicSearchResultBlockParamCitations] = None
diff --git a/src/openrouter/components/anthropictextblockparam.py b/src/openrouter/components/anthropictextblockparam.py
new file mode 100644
index 0000000..38b493a
--- /dev/null
+++ b/src/openrouter/components/anthropictextblockparam.py
@@ -0,0 +1,118 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .anthropiccitationcharlocationparam import (
+ AnthropicCitationCharLocationParam,
+ AnthropicCitationCharLocationParamTypedDict,
+)
+from .anthropiccitationcontentblocklocationparam import (
+ AnthropicCitationContentBlockLocationParam,
+ AnthropicCitationContentBlockLocationParamTypedDict,
+)
+from .anthropiccitationpagelocationparam import (
+ AnthropicCitationPageLocationParam,
+ AnthropicCitationPageLocationParamTypedDict,
+)
+from .anthropiccitationsearchresultlocation import (
+ AnthropicCitationSearchResultLocation,
+ AnthropicCitationSearchResultLocationTypedDict,
+)
+from .anthropiccitationwebsearchresultlocation import (
+ AnthropicCitationWebSearchResultLocation,
+ AnthropicCitationWebSearchResultLocationTypedDict,
+)
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag, model_serializer
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+CitationTypedDict = TypeAliasType(
+ "CitationTypedDict",
+ Union[
+ AnthropicCitationWebSearchResultLocationTypedDict,
+ AnthropicCitationCharLocationParamTypedDict,
+ AnthropicCitationPageLocationParamTypedDict,
+ AnthropicCitationContentBlockLocationParamTypedDict,
+ AnthropicCitationSearchResultLocationTypedDict,
+ ],
+)
+
+
+Citation = Annotated[
+ Union[
+ Annotated[AnthropicCitationCharLocationParam, Tag("char_location")],
+ Annotated[
+ AnthropicCitationContentBlockLocationParam, Tag("content_block_location")
+ ],
+ Annotated[AnthropicCitationPageLocationParam, Tag("page_location")],
+ Annotated[AnthropicCitationSearchResultLocation, Tag("search_result_location")],
+ Annotated[
+ AnthropicCitationWebSearchResultLocation, Tag("web_search_result_location")
+ ],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+AnthropicTextBlockParamType = Literal["text",]
+
+
+class AnthropicTextBlockParamTypedDict(TypedDict):
+ text: str
+ type: AnthropicTextBlockParamType
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ citations: NotRequired[Nullable[List[CitationTypedDict]]]
+
+
+class AnthropicTextBlockParam(BaseModel):
+ text: str
+
+ type: AnthropicTextBlockParamType
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ citations: OptionalNullable[List[Citation]] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["cache_control", "citations"]
+ nullable_fields = ["citations"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropicthinkingdisplay.py b/src/openrouter/components/anthropicthinkingdisplay.py
new file mode 100644
index 0000000..1cf485c
--- /dev/null
+++ b/src/openrouter/components/anthropicthinkingdisplay.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+AnthropicThinkingDisplay = Union[
+ Literal[
+ "summarized",
+ "omitted",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/anthropicthinkingturns.py b/src/openrouter/components/anthropicthinkingturns.py
new file mode 100644
index 0000000..09137b7
--- /dev/null
+++ b/src/openrouter/components/anthropicthinkingturns.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicThinkingTurnsType = Literal["thinking_turns",]
+
+
+class AnthropicThinkingTurnsTypedDict(TypedDict):
+ type: AnthropicThinkingTurnsType
+ value: int
+
+
+class AnthropicThinkingTurns(BaseModel):
+ type: AnthropicThinkingTurnsType
+
+ value: int
diff --git a/src/openrouter/components/anthropictooluseskeep.py b/src/openrouter/components/anthropictooluseskeep.py
new file mode 100644
index 0000000..75073a4
--- /dev/null
+++ b/src/openrouter/components/anthropictooluseskeep.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicToolUsesKeepType = Literal["tool_uses",]
+
+
+class AnthropicToolUsesKeepTypedDict(TypedDict):
+ type: AnthropicToolUsesKeepType
+ value: int
+
+
+class AnthropicToolUsesKeep(BaseModel):
+ type: AnthropicToolUsesKeepType
+
+ value: int
diff --git a/src/openrouter/components/anthropictoolusestrigger.py b/src/openrouter/components/anthropictoolusestrigger.py
new file mode 100644
index 0000000..97aca7f
--- /dev/null
+++ b/src/openrouter/components/anthropictoolusestrigger.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicToolUsesTriggerType = Literal["tool_uses",]
+
+
+class AnthropicToolUsesTriggerTypedDict(TypedDict):
+ type: AnthropicToolUsesTriggerType
+ value: int
+
+
+class AnthropicToolUsesTrigger(BaseModel):
+ type: AnthropicToolUsesTriggerType
+
+ value: int
diff --git a/src/openrouter/components/anthropicurlimagesource.py b/src/openrouter/components/anthropicurlimagesource.py
new file mode 100644
index 0000000..9593a60
--- /dev/null
+++ b/src/openrouter/components/anthropicurlimagesource.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicURLImageSourceType = Literal["url",]
+
+
+class AnthropicURLImageSourceTypedDict(TypedDict):
+ type: AnthropicURLImageSourceType
+ url: str
+
+
+class AnthropicURLImageSource(BaseModel):
+ type: AnthropicURLImageSourceType
+
+ url: str
diff --git a/src/openrouter/components/anthropicurlpdfsource.py b/src/openrouter/components/anthropicurlpdfsource.py
new file mode 100644
index 0000000..c0a140b
--- /dev/null
+++ b/src/openrouter/components/anthropicurlpdfsource.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+AnthropicURLPdfSourceType = Literal["url",]
+
+
+class AnthropicURLPdfSourceTypedDict(TypedDict):
+ type: AnthropicURLPdfSourceType
+ url: str
+
+
+class AnthropicURLPdfSource(BaseModel):
+ type: AnthropicURLPdfSourceType
+
+ url: str
diff --git a/src/openrouter/components/anthropicwebsearchresultblockparam.py b/src/openrouter/components/anthropicwebsearchresultblockparam.py
new file mode 100644
index 0000000..b9df82c
--- /dev/null
+++ b/src/openrouter/components/anthropicwebsearchresultblockparam.py
@@ -0,0 +1,66 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import NotRequired, TypedDict
+
+
+AnthropicWebSearchResultBlockParamType = Literal["web_search_result",]
+
+
+class AnthropicWebSearchResultBlockParamTypedDict(TypedDict):
+ encrypted_content: str
+ title: str
+ type: AnthropicWebSearchResultBlockParamType
+ url: str
+ page_age: NotRequired[Nullable[str]]
+
+
+class AnthropicWebSearchResultBlockParam(BaseModel):
+ encrypted_content: str
+
+ title: str
+
+ type: AnthropicWebSearchResultBlockParamType
+
+ url: str
+
+ page_age: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["page_age"]
+ nullable_fields = ["page_age"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/anthropicwebsearchtooluserlocation.py b/src/openrouter/components/anthropicwebsearchtooluserlocation.py
new file mode 100644
index 0000000..888de6c
--- /dev/null
+++ b/src/openrouter/components/anthropicwebsearchtooluserlocation.py
@@ -0,0 +1,66 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import NotRequired, TypedDict
+
+
+AnthropicWebSearchToolUserLocationType = Literal["approximate",]
+
+
+class AnthropicWebSearchToolUserLocationTypedDict(TypedDict):
+ type: AnthropicWebSearchToolUserLocationType
+ city: NotRequired[Nullable[str]]
+ country: NotRequired[Nullable[str]]
+ region: NotRequired[Nullable[str]]
+ timezone: NotRequired[Nullable[str]]
+
+
+class AnthropicWebSearchToolUserLocation(BaseModel):
+ type: AnthropicWebSearchToolUserLocationType
+
+ city: OptionalNullable[str] = UNSET
+
+ country: OptionalNullable[str] = UNSET
+
+ region: OptionalNullable[str] = UNSET
+
+ timezone: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["city", "country", "region", "timezone"]
+ nullable_fields = ["city", "country", "region", "timezone"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/applypatchcallitem.py b/src/openrouter/components/applypatchcallitem.py
new file mode 100644
index 0000000..1a5f1e0
--- /dev/null
+++ b/src/openrouter/components/applypatchcallitem.py
@@ -0,0 +1,81 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .applypatchcalloperation import (
+ ApplyPatchCallOperation,
+ ApplyPatchCallOperationTypedDict,
+)
+from .applypatchcallstatus import ApplyPatchCallStatus
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Literal
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+ApplyPatchCallItemType = Literal["apply_patch_call",]
+
+
+class ApplyPatchCallItemTypedDict(TypedDict):
+ r"""A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn."""
+
+ call_id: str
+ operation: ApplyPatchCallOperationTypedDict
+ r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
+ status: ApplyPatchCallStatus
+ r"""Lifecycle state of an `apply_patch_call` output item."""
+ type: ApplyPatchCallItemType
+ id: NotRequired[Nullable[str]]
+
+
+class ApplyPatchCallItem(BaseModel):
+ r"""A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn."""
+
+ call_id: str
+
+ operation: ApplyPatchCallOperation
+ r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
+
+ status: Annotated[ApplyPatchCallStatus, PlainValidator(validate_open_enum(False))]
+ r"""Lifecycle state of an `apply_patch_call` output item."""
+
+ type: ApplyPatchCallItemType
+
+ id: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id"]
+ nullable_fields = ["id"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/applypatchcalloperation.py b/src/openrouter/components/applypatchcalloperation.py
new file mode 100644
index 0000000..f0188f4
--- /dev/null
+++ b/src/openrouter/components/applypatchcalloperation.py
@@ -0,0 +1,41 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .applypatchcreatefileoperation import (
+ ApplyPatchCreateFileOperation,
+ ApplyPatchCreateFileOperationTypedDict,
+)
+from .applypatchdeletefileoperation import (
+ ApplyPatchDeleteFileOperation,
+ ApplyPatchDeleteFileOperationTypedDict,
+)
+from .applypatchupdatefileoperation import (
+ ApplyPatchUpdateFileOperation,
+ ApplyPatchUpdateFileOperationTypedDict,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
+
+
+ApplyPatchCallOperationTypedDict = TypeAliasType(
+ "ApplyPatchCallOperationTypedDict",
+ Union[
+ ApplyPatchDeleteFileOperationTypedDict,
+ ApplyPatchCreateFileOperationTypedDict,
+ ApplyPatchUpdateFileOperationTypedDict,
+ ],
+)
+r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
+
+
+ApplyPatchCallOperation = Annotated[
+ Union[
+ Annotated[ApplyPatchCreateFileOperation, Tag("create_file")],
+ Annotated[ApplyPatchDeleteFileOperation, Tag("delete_file")],
+ Annotated[ApplyPatchUpdateFileOperation, Tag("update_file")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
diff --git a/src/openrouter/components/applypatchcalloperationdiffdeltaevent.py b/src/openrouter/components/applypatchcalloperationdiffdeltaevent.py
new file mode 100644
index 0000000..830de6c
--- /dev/null
+++ b/src/openrouter/components/applypatchcalloperationdiffdeltaevent.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ApplyPatchCallOperationDiffDeltaEventType = Literal[
+ "response.apply_patch_call_operation_diff.delta",
+]
+
+
+class ApplyPatchCallOperationDiffDeltaEventTypedDict(TypedDict):
+ r"""Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape."""
+
+ delta: str
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: ApplyPatchCallOperationDiffDeltaEventType
+
+
+class ApplyPatchCallOperationDiffDeltaEvent(BaseModel):
+ r"""Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape."""
+
+ delta: str
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: ApplyPatchCallOperationDiffDeltaEventType
diff --git a/src/openrouter/components/applypatchcalloperationdiffdoneevent.py b/src/openrouter/components/applypatchcalloperationdiffdoneevent.py
new file mode 100644
index 0000000..d03decf
--- /dev/null
+++ b/src/openrouter/components/applypatchcalloperationdiffdoneevent.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ApplyPatchCallOperationDiffDoneEventType = Literal[
+ "response.apply_patch_call_operation_diff.done",
+]
+
+
+class ApplyPatchCallOperationDiffDoneEventTypedDict(TypedDict):
+ r"""Emitted when `operation.diff` streaming completes for an `apply_patch_call`."""
+
+ diff: str
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: ApplyPatchCallOperationDiffDoneEventType
+
+
+class ApplyPatchCallOperationDiffDoneEvent(BaseModel):
+ r"""Emitted when `operation.diff` streaming completes for an `apply_patch_call`."""
+
+ diff: str
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: ApplyPatchCallOperationDiffDoneEventType
diff --git a/src/openrouter/components/applypatchcalloutputitem.py b/src/openrouter/components/applypatchcalloutputitem.py
new file mode 100644
index 0000000..1b768e6
--- /dev/null
+++ b/src/openrouter/components/applypatchcalloutputitem.py
@@ -0,0 +1,84 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+ApplyPatchCallOutputItemStatus = Union[
+ Literal[
+ "completed",
+ "failed",
+ ],
+ UnrecognizedStr,
+]
+
+
+ApplyPatchCallOutputItemType = Literal["apply_patch_call_output",]
+
+
+class ApplyPatchCallOutputItemTypedDict(TypedDict):
+ r"""The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise."""
+
+ call_id: str
+ status: ApplyPatchCallOutputItemStatus
+ type: ApplyPatchCallOutputItemType
+ id: NotRequired[Nullable[str]]
+ output: NotRequired[Nullable[str]]
+
+
+class ApplyPatchCallOutputItem(BaseModel):
+ r"""The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise."""
+
+ call_id: str
+
+ status: Annotated[
+ ApplyPatchCallOutputItemStatus, PlainValidator(validate_open_enum(False))
+ ]
+
+ type: ApplyPatchCallOutputItemType
+
+ id: OptionalNullable[str] = UNSET
+
+ output: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id", "output"]
+ nullable_fields = ["id", "output"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/applypatchcallstatus.py b/src/openrouter/components/applypatchcallstatus.py
new file mode 100644
index 0000000..ae5ca58
--- /dev/null
+++ b/src/openrouter/components/applypatchcallstatus.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ApplyPatchCallStatus = Union[
+ Literal[
+ "in_progress",
+ "completed",
+ ],
+ UnrecognizedStr,
+]
+r"""Lifecycle state of an `apply_patch_call` output item."""
diff --git a/src/openrouter/components/applypatchcreatefileoperation.py b/src/openrouter/components/applypatchcreatefileoperation.py
new file mode 100644
index 0000000..759113e
--- /dev/null
+++ b/src/openrouter/components/applypatchcreatefileoperation.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ApplyPatchCreateFileOperationType = Literal["create_file",]
+
+
+class ApplyPatchCreateFileOperationTypedDict(TypedDict):
+ r"""The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."""
+
+ diff: str
+ path: str
+ type: ApplyPatchCreateFileOperationType
+
+
+class ApplyPatchCreateFileOperation(BaseModel):
+ r"""The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents."""
+
+ diff: str
+
+ path: str
+
+ type: ApplyPatchCreateFileOperationType
diff --git a/src/openrouter/components/applypatchdeletefileoperation.py b/src/openrouter/components/applypatchdeletefileoperation.py
new file mode 100644
index 0000000..2d84495
--- /dev/null
+++ b/src/openrouter/components/applypatchdeletefileoperation.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ApplyPatchDeleteFileOperationType = Literal["delete_file",]
+
+
+class ApplyPatchDeleteFileOperationTypedDict(TypedDict):
+ r"""The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."""
+
+ path: str
+ type: ApplyPatchDeleteFileOperationType
+
+
+class ApplyPatchDeleteFileOperation(BaseModel):
+ r"""The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required."""
+
+ path: str
+
+ type: ApplyPatchDeleteFileOperationType
diff --git a/src/openrouter/components/applypatchengineenum.py b/src/openrouter/components/applypatchengineenum.py
new file mode 100644
index 0000000..073a01a
--- /dev/null
+++ b/src/openrouter/components/applypatchengineenum.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ApplyPatchEngineEnum = Union[
+ Literal[
+ "auto",
+ "native",
+ "openrouter",
+ ],
+ UnrecognizedStr,
+]
+r"""Which apply_patch engine to use. \"auto\" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. \"native\" forces native passthrough — when the endpoint does not support native, the request falls back to HITL. \"openrouter\" always runs the HITL validator. Native passthrough streams the diff incrementally via `apply_patch_call_operation_diff.delta` events; HITL buffers the diff for atomic delivery as a single delta."""
diff --git a/src/openrouter/components/applypatchservertool_openrouter.py b/src/openrouter/components/applypatchservertool_openrouter.py
new file mode 100644
index 0000000..158c52b
--- /dev/null
+++ b/src/openrouter/components/applypatchservertool_openrouter.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .applypatchservertoolconfig import (
+ ApplyPatchServerToolConfig,
+ ApplyPatchServerToolConfigTypedDict,
+)
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+ApplyPatchServerToolOpenRouterType = Literal["openrouter:apply_patch",]
+
+
+class ApplyPatchServerToolOpenRouterTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API."""
+
+ type: ApplyPatchServerToolOpenRouterType
+ parameters: NotRequired[ApplyPatchServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:apply_patch server tool"""
+
+
+class ApplyPatchServerToolOpenRouter(BaseModel):
+ r"""OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API."""
+
+ type: ApplyPatchServerToolOpenRouterType
+
+ parameters: Optional[ApplyPatchServerToolConfig] = None
+ r"""Configuration for the openrouter:apply_patch server tool"""
diff --git a/src/openrouter/components/applypatchservertoolconfig.py b/src/openrouter/components/applypatchservertoolconfig.py
new file mode 100644
index 0000000..61d5a3b
--- /dev/null
+++ b/src/openrouter/components/applypatchservertoolconfig.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .applypatchengineenum import ApplyPatchEngineEnum
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ApplyPatchServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:apply_patch server tool"""
+
+ engine: NotRequired[ApplyPatchEngineEnum]
+ r"""Which apply_patch engine to use. \"auto\" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. \"native\" forces native passthrough — when the endpoint does not support native, the request falls back to HITL. \"openrouter\" always runs the HITL validator. Native passthrough streams the diff incrementally via `apply_patch_call_operation_diff.delta` events; HITL buffers the diff for atomic delivery as a single delta."""
+
+
+class ApplyPatchServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:apply_patch server tool"""
+
+ engine: Annotated[
+ Optional[ApplyPatchEngineEnum], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which apply_patch engine to use. \"auto\" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. \"native\" forces native passthrough — when the endpoint does not support native, the request falls back to HITL. \"openrouter\" always runs the HITL validator. Native passthrough streams the diff incrementally via `apply_patch_call_operation_diff.delta` events; HITL buffers the diff for atomic delivery as a single delta."""
diff --git a/src/openrouter/components/applypatchupdatefileoperation.py b/src/openrouter/components/applypatchupdatefileoperation.py
new file mode 100644
index 0000000..8fdd6b9
--- /dev/null
+++ b/src/openrouter/components/applypatchupdatefileoperation.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ApplyPatchUpdateFileOperationType = Literal["update_file",]
+
+
+class ApplyPatchUpdateFileOperationTypedDict(TypedDict):
+ r"""The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."""
+
+ diff: str
+ path: str
+ type: ApplyPatchUpdateFileOperationType
+
+
+class ApplyPatchUpdateFileOperation(BaseModel):
+ r"""The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file."""
+
+ diff: str
+
+ path: str
+
+ type: ApplyPatchUpdateFileOperationType
diff --git a/src/openrouter/components/apprankingsitem.py b/src/openrouter/components/apprankingsitem.py
new file mode 100644
index 0000000..a0fdd97
--- /dev/null
+++ b/src/openrouter/components/apprankingsitem.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class AppRankingsItemTypedDict(TypedDict):
+ app_id: int
+ r"""Stable numeric identifier of the app on OpenRouter."""
+ app_name: str
+ r"""Public display name of the app."""
+ rank: int
+ r"""1-based position of the app within this response, per the requested `sort`."""
+ total_requests: int
+ r"""Number of requests attributed to the app inside the date window."""
+ total_tokens: str
+ r"""Sum of `prompt_tokens + completion_tokens` attributed to the app inside the date window, returned as a decimal string so 64-bit values are not truncated."""
+
+
+class AppRankingsItem(BaseModel):
+ app_id: int
+ r"""Stable numeric identifier of the app on OpenRouter."""
+
+ app_name: str
+ r"""Public display name of the app."""
+
+ rank: int
+ r"""1-based position of the app within this response, per the requested `sort`."""
+
+ total_requests: int
+ r"""Number of requests attributed to the app inside the date window."""
+
+ total_tokens: str
+ r"""Sum of `prompt_tokens + completion_tokens` attributed to the app inside the date window, returned as a decimal string so 64-bit values are not truncated."""
diff --git a/src/openrouter/components/apprankingsresponse.py b/src/openrouter/components/apprankingsresponse.py
new file mode 100644
index 0000000..2ccc3d9
--- /dev/null
+++ b/src/openrouter/components/apprankingsresponse.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .apprankingsitem import AppRankingsItem, AppRankingsItemTypedDict
+from .rankingsdailymeta import RankingsDailyMeta, RankingsDailyMetaTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class AppRankingsResponseTypedDict(TypedDict):
+ data: List[AppRankingsItemTypedDict]
+ r"""Apps ranked per the requested `sort`, re-numbered 1..N after category filtering. `popular` sorts by `total_tokens` descending; `trending` sorts by absolute excess token growth descending and may return fewer than `limit` rows when few apps are growing."""
+ meta: RankingsDailyMetaTypedDict
+
+
+class AppRankingsResponse(BaseModel):
+ data: List[AppRankingsItem]
+ r"""Apps ranked per the requested `sort`, re-numbered 1..N after category filtering. `popular` sorts by `total_tokens` descending; `trending` sorts by absolute excess token growth descending and may return fewer than `limit` rows when few apps are growing."""
+
+ meta: RankingsDailyMeta
diff --git a/src/openrouter/components/autorouterplugin.py b/src/openrouter/components/autorouterplugin.py
index 2cec0f7..665aaa0 100644
--- a/src/openrouter/components/autorouterplugin.py
+++ b/src/openrouter/components/autorouterplugin.py
@@ -13,6 +13,8 @@ class AutoRouterPluginTypedDict(TypedDict):
id: AutoRouterPluginID
allowed_models: NotRequired[List[str]]
r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
+ cost_quality_tradeoff: NotRequired[int]
+ r"""Controls cost vs. quality routing tradeoff (0–10). 0 = pure quality (best model regardless of cost), 10 = maximize for cost (cheapest model wins). Intermediate values blend quality and cost signals continuously. Defaults to 7."""
enabled: NotRequired[bool]
r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
@@ -23,5 +25,8 @@ class AutoRouterPlugin(BaseModel):
allowed_models: Optional[List[str]] = None
r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
+ cost_quality_tradeoff: Optional[int] = None
+ r"""Controls cost vs. quality routing tradeoff (0–10). 0 = pure quality (best model regardless of cost), 10 = maximize for cost (cheapest model wins). Intermediate values blend quality and cost signals continuously. Defaults to 7."""
+
enabled: Optional[bool] = None
r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
diff --git a/src/openrouter/components/baseinputs_union.py b/src/openrouter/components/baseinputs_union.py
index 7e50121..25128bd 100644
--- a/src/openrouter/components/baseinputs_union.py
+++ b/src/openrouter/components/baseinputs_union.py
@@ -1,10 +1,23 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .applypatchcallitem import ApplyPatchCallItem, ApplyPatchCallItemTypedDict
+from .applypatchcalloutputitem import (
+ ApplyPatchCallOutputItem,
+ ApplyPatchCallOutputItemTypedDict,
+)
from .inputaudio import InputAudio, InputAudioTypedDict
from .inputfile import InputFile, InputFileTypedDict
from .inputimage import InputImage, InputImageTypedDict
from .inputtext import InputText, InputTextTypedDict
+from .openairesponsecustomtoolcall import (
+ OpenAIResponseCustomToolCall,
+ OpenAIResponseCustomToolCallTypedDict,
+)
+from .openairesponsecustomtoolcalloutput import (
+ OpenAIResponseCustomToolCallOutput,
+ OpenAIResponseCustomToolCallOutputTypedDict,
+)
from .openairesponsefunctiontoolcall import (
OpenAIResponseFunctionToolCall,
OpenAIResponseFunctionToolCallTypedDict,
@@ -172,9 +185,13 @@ BaseInputsUnion1TypedDict = TypeAliasType(
BaseInputsMessageTypedDict,
OpenAIResponseInputMessageItemTypedDict,
OutputItemImageGenerationCallTypedDict,
+ OpenAIResponseCustomToolCallOutputTypedDict,
OpenAIResponseFunctionToolCallOutputTypedDict,
- OpenAIResponseFunctionToolCallTypedDict,
+ ApplyPatchCallItemTypedDict,
+ ApplyPatchCallOutputItemTypedDict,
OutputMessageTypedDict,
+ OpenAIResponseCustomToolCallTypedDict,
+ OpenAIResponseFunctionToolCallTypedDict,
],
)
@@ -185,9 +202,13 @@ BaseInputsUnion1 = TypeAliasType(
BaseInputsMessage,
OpenAIResponseInputMessageItem,
OutputItemImageGenerationCall,
+ OpenAIResponseCustomToolCallOutput,
OpenAIResponseFunctionToolCallOutput,
- OpenAIResponseFunctionToolCall,
+ ApplyPatchCallItem,
+ ApplyPatchCallOutputItem,
OutputMessage,
+ OpenAIResponseCustomToolCall,
+ OpenAIResponseFunctionToolCall,
],
)
diff --git a/src/openrouter/components/bashservertool.py b/src/openrouter/components/bashservertool.py
new file mode 100644
index 0000000..a3021f9
--- /dev/null
+++ b/src/openrouter/components/bashservertool.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bashservertoolconfig import BashServerToolConfig, BashServerToolConfigTypedDict
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+BashServerToolType = Literal["openrouter:bash",]
+
+
+class BashServerToolTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container"""
+
+ type: BashServerToolType
+ parameters: NotRequired[BashServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:bash server tool"""
+
+
+class BashServerTool(BaseModel):
+ r"""OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container"""
+
+ type: BashServerToolType
+
+ parameters: Optional[BashServerToolConfig] = None
+ r"""Configuration for the openrouter:bash server tool"""
diff --git a/src/openrouter/components/bashservertoolconfig.py b/src/openrouter/components/bashservertoolconfig.py
new file mode 100644
index 0000000..4ccf38d
--- /dev/null
+++ b/src/openrouter/components/bashservertoolconfig.py
@@ -0,0 +1,39 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bashservertoolengine import BashServerToolEngine
+from .bashservertoolenvironment import (
+ BashServerToolEnvironment,
+ BashServerToolEnvironmentTypedDict,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class BashServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:bash server tool"""
+
+ engine: NotRequired[BashServerToolEngine]
+ r"""Which bash engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) and \"native\" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands."""
+ environment: NotRequired[BashServerToolEnvironmentTypedDict]
+ r"""Execution environment for the bash server tool."""
+ sleep_after_seconds: NotRequired[int]
+ r"""How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days)."""
+
+
+class BashServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:bash server tool"""
+
+ engine: Annotated[
+ Optional[BashServerToolEngine], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which bash engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) and \"native\" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands."""
+
+ environment: Optional[BashServerToolEnvironment] = None
+ r"""Execution environment for the bash server tool."""
+
+ sleep_after_seconds: Optional[int] = None
+ r"""How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days)."""
diff --git a/src/openrouter/components/bashservertoolengine.py b/src/openrouter/components/bashservertoolengine.py
new file mode 100644
index 0000000..7ea1673
--- /dev/null
+++ b/src/openrouter/components/bashservertoolengine.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+BashServerToolEngine = Union[
+ Literal[
+ "auto",
+ "native",
+ "openrouter",
+ ],
+ UnrecognizedStr,
+]
+r"""Which bash engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) and \"native\" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands."""
diff --git a/src/openrouter/components/bashservertoolenvironment.py b/src/openrouter/components/bashservertoolenvironment.py
new file mode 100644
index 0000000..0e61068
--- /dev/null
+++ b/src/openrouter/components/bashservertoolenvironment.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .containerautoenvironment import (
+ ContainerAutoEnvironment,
+ ContainerAutoEnvironmentTypedDict,
+)
+from .containerreferenceenvironment import (
+ ContainerReferenceEnvironment,
+ ContainerReferenceEnvironmentTypedDict,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
+
+
+BashServerToolEnvironmentTypedDict = TypeAliasType(
+ "BashServerToolEnvironmentTypedDict",
+ Union[ContainerAutoEnvironmentTypedDict, ContainerReferenceEnvironmentTypedDict],
+)
+r"""Execution environment for the bash server tool."""
+
+
+BashServerToolEnvironment = Annotated[
+ Union[
+ Annotated[ContainerAutoEnvironment, Tag("container_auto")],
+ Annotated[ContainerReferenceEnvironment, Tag("container_reference")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+r"""Execution environment for the bash server tool."""
diff --git a/src/openrouter/components/bulkaddworkspacemembersrequest.py b/src/openrouter/components/bulkaddworkspacemembersrequest.py
new file mode 100644
index 0000000..c792725
--- /dev/null
+++ b/src/openrouter/components/bulkaddworkspacemembersrequest.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class BulkAddWorkspaceMembersRequestTypedDict(TypedDict):
+ user_ids: List[str]
+ r"""List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization."""
+
+
+class BulkAddWorkspaceMembersRequest(BaseModel):
+ user_ids: List[str]
+ r"""List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization."""
diff --git a/src/openrouter/components/bulkaddworkspacemembersresponse.py b/src/openrouter/components/bulkaddworkspacemembersresponse.py
new file mode 100644
index 0000000..f46030f
--- /dev/null
+++ b/src/openrouter/components/bulkaddworkspacemembersresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .workspacemember import WorkspaceMember, WorkspaceMemberTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class BulkAddWorkspaceMembersResponseTypedDict(TypedDict):
+ added_count: int
+ r"""Number of workspace memberships created or updated"""
+ data: List[WorkspaceMemberTypedDict]
+ r"""List of added workspace memberships"""
+
+
+class BulkAddWorkspaceMembersResponse(BaseModel):
+ added_count: int
+ r"""Number of workspace memberships created or updated"""
+
+ data: List[WorkspaceMember]
+ r"""List of added workspace memberships"""
diff --git a/src/openrouter/components/bulkremoveworkspacemembersrequest.py b/src/openrouter/components/bulkremoveworkspacemembersrequest.py
new file mode 100644
index 0000000..a02c46c
--- /dev/null
+++ b/src/openrouter/components/bulkremoveworkspacemembersrequest.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class BulkRemoveWorkspaceMembersRequestTypedDict(TypedDict):
+ user_ids: List[str]
+ r"""List of user IDs to remove from the workspace"""
+
+
+class BulkRemoveWorkspaceMembersRequest(BaseModel):
+ user_ids: List[str]
+ r"""List of user IDs to remove from the workspace"""
diff --git a/src/openrouter/components/bulkremoveworkspacemembersresponse.py b/src/openrouter/components/bulkremoveworkspacemembersresponse.py
new file mode 100644
index 0000000..69082ff
--- /dev/null
+++ b/src/openrouter/components/bulkremoveworkspacemembersresponse.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class BulkRemoveWorkspaceMembersResponseTypedDict(TypedDict):
+ removed_count: int
+ r"""Number of members removed"""
+
+
+class BulkRemoveWorkspaceMembersResponse(BaseModel):
+ removed_count: int
+ r"""Number of members removed"""
diff --git a/src/openrouter/components/byokkey.py b/src/openrouter/components/byokkey.py
new file mode 100644
index 0000000..033a6f3
--- /dev/null
+++ b/src/openrouter/components/byokkey.py
@@ -0,0 +1,116 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .byokproviderslug import BYOKProviderSlug
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class BYOKKeyTypedDict(TypedDict):
+ allowed_api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction."""
+ allowed_models: Nullable[List[str]]
+ r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
+ allowed_user_ids: Nullable[List[str]]
+ r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction."""
+ created_at: str
+ r"""ISO timestamp of when the credential was created."""
+ disabled: bool
+ r"""Whether this credential is currently disabled."""
+ id: str
+ r"""Stable public identifier for this BYOK credential."""
+ is_fallback: bool
+ r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."""
+ label: str
+ r"""Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI."""
+ provider: BYOKProviderSlug
+ r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+ sort_order: int
+ r"""Position within the provider — credentials are tried in ascending sort order."""
+ workspace_id: str
+ r"""ID of the workspace this credential belongs to."""
+ name: NotRequired[Nullable[str]]
+ r"""Optional human-readable name for the credential."""
+
+
+class BYOKKey(BaseModel):
+ allowed_api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) that may use this credential. `null` means no restriction."""
+
+ allowed_models: Nullable[List[str]]
+ r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
+
+ allowed_user_ids: Nullable[List[str]]
+ r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction."""
+
+ created_at: str
+ r"""ISO timestamp of when the credential was created."""
+
+ disabled: bool
+ r"""Whether this credential is currently disabled."""
+
+ id: str
+ r"""Stable public identifier for this BYOK credential."""
+
+ is_fallback: bool
+ r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."""
+
+ label: str
+ r"""Short masked snippet of the key (e.g. the first/last few characters) used to identify it in the UI."""
+
+ provider: Annotated[BYOKProviderSlug, PlainValidator(validate_open_enum(False))]
+ r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+
+ sort_order: int
+ r"""Position within the provider — credentials are tried in ascending sort order."""
+
+ workspace_id: str
+ r"""ID of the workspace this credential belongs to."""
+
+ name: OptionalNullable[str] = UNSET
+ r"""Optional human-readable name for the credential."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["name"]
+ nullable_fields = [
+ "allowed_api_key_hashes",
+ "allowed_models",
+ "allowed_user_ids",
+ "name",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/byokproviderslug.py b/src/openrouter/components/byokproviderslug.py
new file mode 100644
index 0000000..1786f6d
--- /dev/null
+++ b/src/openrouter/components/byokproviderslug.py
@@ -0,0 +1,96 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+BYOKProviderSlug = Union[
+ Literal[
+ "ai21",
+ "aion-labs",
+ "akashml",
+ "alibaba",
+ "amazon-bedrock",
+ "amazon-nova",
+ "ambient",
+ "anthropic",
+ "arcee-ai",
+ "atlas-cloud",
+ "avian",
+ "azure",
+ "baidu",
+ "baseten",
+ "black-forest-labs",
+ "byteplus",
+ "cerebras",
+ "chutes",
+ "cirrascale",
+ "clarifai",
+ "cloudflare",
+ "cohere",
+ "crusoe",
+ "darkbloom",
+ "decart",
+ "deepinfra",
+ "deepseek",
+ "dekallm",
+ "digitalocean",
+ "featherless",
+ "fireworks",
+ "friendli",
+ "gmicloud",
+ "google-ai-studio",
+ "google-vertex",
+ "groq",
+ "inception",
+ "inceptron",
+ "inference-net",
+ "infermatic",
+ "inflection",
+ "io-net",
+ "ionstream",
+ "liquid",
+ "mancer",
+ "mara",
+ "minimax",
+ "mistral",
+ "modelrun",
+ "modular",
+ "moonshotai",
+ "morph",
+ "ncompass",
+ "nebius",
+ "nex-agi",
+ "nextbit",
+ "novita",
+ "nvidia",
+ "open-inference",
+ "openai",
+ "parasail",
+ "perceptron",
+ "perplexity",
+ "phala",
+ "poolside",
+ "recraft",
+ "reka",
+ "relace",
+ "sambanova",
+ "seed",
+ "siliconflow",
+ "sourceful",
+ "stepfun",
+ "streamlake",
+ "switchpoint",
+ "together",
+ "upstage",
+ "venice",
+ "wafer",
+ "wandb",
+ "xai",
+ "xiaomi",
+ "z-ai",
+ ],
+ UnrecognizedStr,
+]
+r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
diff --git a/src/openrouter/components/chatfunctiontool.py b/src/openrouter/components/chatfunctiontool.py
index b0c0d43..ab87fc3 100644
--- a/src/openrouter/components/chatfunctiontool.py
+++ b/src/openrouter/components/chatfunctiontool.py
@@ -1,6 +1,11 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .advisorservertool_openrouter import (
+ AdvisorServerToolOpenRouter,
+ AdvisorServerToolOpenRouterTypedDict,
+)
+from .bashservertool import BashServerTool, BashServerToolTypedDict
from .chatcontentcachecontrol import (
ChatContentCacheControl,
ChatContentCacheControlTypedDict,
@@ -22,6 +27,7 @@ from .openrouterwebsearchservertool import (
OpenRouterWebSearchServerTool,
OpenRouterWebSearchServerToolTypedDict,
)
+from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -118,9 +124,12 @@ class ChatFunctionToolFunction(BaseModel):
ChatFunctionToolTypedDict = TypeAliasType(
"ChatFunctionToolTypedDict",
Union[
+ AdvisorServerToolOpenRouterTypedDict,
+ BashServerToolTypedDict,
DatetimeServerToolTypedDict,
ImageGenerationServerToolOpenRouterTypedDict,
ChatSearchModelsServerToolTypedDict,
+ WebFetchServerToolTypedDict,
OpenRouterWebSearchServerToolTypedDict,
ChatFunctionToolFunctionTypedDict,
ChatWebSearchShorthandTypedDict,
@@ -132,6 +141,8 @@ r"""Tool definition for function calling (regular function or OpenRouter built-i
ChatFunctionTool = Annotated[
Union[
Annotated[ChatFunctionToolFunction, Tag("function")],
+ Annotated[AdvisorServerToolOpenRouter, Tag("openrouter:advisor")],
+ Annotated[BashServerTool, Tag("openrouter:bash")],
Annotated[DatetimeServerTool, Tag("openrouter:datetime")],
Annotated[
ImageGenerationServerToolOpenRouter, Tag("openrouter:image_generation")
@@ -139,6 +150,7 @@ ChatFunctionTool = Annotated[
Annotated[
ChatSearchModelsServerTool, Tag("openrouter:experimental__search_models")
],
+ Annotated[WebFetchServerTool, Tag("openrouter:web_fetch")],
Annotated[OpenRouterWebSearchServerTool, Tag("openrouter:web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview")],
diff --git a/src/openrouter/components/chatrequest.py b/src/openrouter/components/chatrequest.py
index 7559c77..97f89d9 100644
--- a/src/openrouter/components/chatrequest.py
+++ b/src/openrouter/components/chatrequest.py
@@ -34,11 +34,18 @@ from .formatjsonobjectconfig import (
FormatJSONObjectConfig,
FormatJSONObjectConfigTypedDict,
)
+from .fusionplugin import FusionPlugin, FusionPluginTypedDict
from .imageconfig import ImageConfig, ImageConfigTypedDict
from .moderationplugin import ModerationPlugin, ModerationPluginTypedDict
+from .paretorouterplugin import ParetoRouterPlugin, ParetoRouterPluginTypedDict
from .providerpreferences import ProviderPreferences, ProviderPreferencesTypedDict
from .responsehealingplugin import ResponseHealingPlugin, ResponseHealingPluginTypedDict
+from .stopservertoolswhencondition import (
+ StopServerToolsWhenCondition,
+ StopServerToolsWhenConditionTypedDict,
+)
from .traceconfig import TraceConfig, TraceConfigTypedDict
+from .webfetchplugin import WebFetchPlugin, WebFetchPluginTypedDict
from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict
from openrouter.types import (
BaseModel,
@@ -70,9 +77,12 @@ ChatRequestPluginTypedDict = TypeAliasType(
Union[
ModerationPluginTypedDict,
ResponseHealingPluginTypedDict,
- AutoRouterPluginTypedDict,
FileParserPluginTypedDict,
ContextCompressionPluginTypedDict,
+ ParetoRouterPluginTypedDict,
+ AutoRouterPluginTypedDict,
+ WebFetchPluginTypedDict,
+ FusionPluginTypedDict,
WebSearchPluginTypedDict,
],
)
@@ -83,15 +93,18 @@ ChatRequestPlugin = Annotated[
Annotated[AutoRouterPlugin, Tag("auto-router")],
Annotated[ContextCompressionPlugin, Tag("context-compression")],
Annotated[FileParserPlugin, Tag("file-parser")],
+ Annotated[FusionPlugin, Tag("fusion")],
Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ParetoRouterPlugin, Tag("pareto-router")],
Annotated[ResponseHealingPlugin, Tag("response-healing")],
Annotated[WebSearchPlugin, Tag("web")],
+ Annotated[WebFetchPlugin, Tag("web-fetch")],
],
Discriminator(lambda m: get_discriminator(m, "id", "id")),
]
-Effort = Union[
+ChatRequestEffort = Union[
Literal[
"xhigh",
"high",
@@ -105,19 +118,19 @@ Effort = Union[
r"""Constrains effort on reasoning for reasoning models"""
-class ReasoningTypedDict(TypedDict):
+class ChatRequestReasoningTypedDict(TypedDict):
r"""Configuration options for reasoning models"""
- effort: NotRequired[Nullable[Effort]]
+ effort: NotRequired[Nullable[ChatRequestEffort]]
r"""Constrains effort on reasoning for reasoning models"""
summary: NotRequired[Nullable[ChatReasoningSummaryVerbosityEnum]]
-class Reasoning(BaseModel):
+class ChatRequestReasoning(BaseModel):
r"""Configuration options for reasoning models"""
effort: Annotated[
- OptionalNullable[Effort], PlainValidator(validate_open_enum(False))
+ OptionalNullable[ChatRequestEffort], PlainValidator(validate_open_enum(False))
] = UNSET
r"""Constrains effort on reasoning for reasoning models"""
@@ -210,6 +223,7 @@ class ChatRequestTypedDict(TypedDict):
messages: List[ChatMessagesTypedDict]
r"""List of messages for the conversation"""
cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
debug: NotRequired[ChatDebugOptionsTypedDict]
r"""Debug options for inspecting request transformations (streaming only)"""
frequency_penalty: NotRequired[Nullable[float]]
@@ -240,7 +254,7 @@ class ChatRequestTypedDict(TypedDict):
r"""Presence penalty (-2.0 to 2.0)"""
provider: NotRequired[Nullable[ProviderPreferencesTypedDict]]
r"""When multiple model providers are available, optionally indicate your routing preference."""
- reasoning: NotRequired[ReasoningTypedDict]
+ reasoning: NotRequired[ChatRequestReasoningTypedDict]
r"""Configuration options for reasoning models"""
response_format: NotRequired[ResponseFormatTypedDict]
r"""Response format configuration"""
@@ -249,9 +263,11 @@ class ChatRequestTypedDict(TypedDict):
service_tier: NotRequired[Nullable[ChatRequestServiceTier]]
r"""The service tier to use for processing this request."""
session_id: NotRequired[str]
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
stop: NotRequired[Nullable[StopTypedDict]]
r"""Stop sequences (up to 4)"""
+ stop_server_tools_when: NotRequired[List[StopServerToolsWhenConditionTypedDict]]
+ r"""Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`."""
stream: NotRequired[bool]
r"""Enable streaming response"""
stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]]
@@ -279,6 +295,7 @@ class ChatRequest(BaseModel):
r"""List of messages for the conversation"""
cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
debug: Optional[ChatDebugOptions] = None
r"""Debug options for inspecting request transformations (streaming only)"""
@@ -327,7 +344,7 @@ class ChatRequest(BaseModel):
provider: OptionalNullable[ProviderPreferences] = UNSET
r"""When multiple model providers are available, optionally indicate your routing preference."""
- reasoning: Optional[Reasoning] = None
+ reasoning: Optional[ChatRequestReasoning] = None
r"""Configuration options for reasoning models"""
response_format: Optional[ResponseFormat] = None
@@ -343,11 +360,14 @@ class ChatRequest(BaseModel):
r"""The service tier to use for processing this request."""
session_id: Optional[str] = None
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
stop: OptionalNullable[Stop] = UNSET
r"""Stop sequences (up to 4)"""
+ stop_server_tools_when: Optional[List[StopServerToolsWhenCondition]] = None
+ r"""Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`."""
+
stream: Optional[bool] = False
r"""Enable streaming response"""
@@ -400,6 +420,7 @@ class ChatRequest(BaseModel):
"service_tier",
"session_id",
"stop",
+ "stop_server_tools_when",
"stream",
"stream_options",
"temperature",
diff --git a/src/openrouter/components/chatresult.py b/src/openrouter/components/chatresult.py
index 35a7ea2..85bb6c1 100644
--- a/src/openrouter/components/chatresult.py
+++ b/src/openrouter/components/chatresult.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from .chatchoice import ChatChoice, ChatChoiceTypedDict
from .chatusage import ChatUsage, ChatUsageTypedDict
+from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -32,6 +33,7 @@ class ChatResultTypedDict(TypedDict):
object: ChatResultObject
system_fingerprint: Nullable[str]
r"""System fingerprint"""
+ openrouter_metadata: NotRequired[OpenRouterMetadataTypedDict]
service_tier: NotRequired[Nullable[str]]
r"""The service tier used by the upstream provider for this request"""
usage: NotRequired[ChatUsageTypedDict]
@@ -58,6 +60,8 @@ class ChatResult(BaseModel):
system_fingerprint: Nullable[str]
r"""System fingerprint"""
+ openrouter_metadata: Optional[OpenRouterMetadata] = None
+
service_tier: OptionalNullable[str] = UNSET
r"""The service tier used by the upstream provider for this request"""
@@ -66,7 +70,7 @@ class ChatResult(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["service_tier", "usage"]
+ optional_fields = ["openrouter_metadata", "service_tier", "usage"]
nullable_fields = ["service_tier", "system_fingerprint"]
null_default_fields = []
diff --git a/src/openrouter/components/chatservertoolchoice.py b/src/openrouter/components/chatservertoolchoice.py
new file mode 100644
index 0000000..51b7a93
--- /dev/null
+++ b/src/openrouter/components/chatservertoolchoice.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class ChatServerToolChoiceTypedDict(TypedDict):
+ r"""OpenRouter extension: force a specific server tool by naming it directly in `tool_choice.type` instead of wrapping it in `{ type: \"function\", function: { name } }`."""
+
+ type: str
+ r"""OpenRouter server-tool type to force (e.g. `openrouter:web_search`, `web_search`, `web_search_preview`)."""
+
+
+class ChatServerToolChoice(BaseModel):
+ r"""OpenRouter extension: force a specific server tool by naming it directly in `tool_choice.type` instead of wrapping it in `{ type: \"function\", function: { name } }`."""
+
+ type: str
+ r"""OpenRouter server-tool type to force (e.g. `openrouter:web_search`, `web_search`, `web_search_preview`)."""
diff --git a/src/openrouter/components/chatstreamchunk.py b/src/openrouter/components/chatstreamchunk.py
index 24aa825..52c3776 100644
--- a/src/openrouter/components/chatstreamchunk.py
+++ b/src/openrouter/components/chatstreamchunk.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from .chatstreamchoice import ChatStreamChoice, ChatStreamChoiceTypedDict
from .chatusage import ChatUsage, ChatUsageTypedDict
+from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -51,6 +52,7 @@ class ChatStreamChunkTypedDict(TypedDict):
object: ChatStreamChunkObject
error: NotRequired[ErrorTypedDict]
r"""Error information"""
+ openrouter_metadata: NotRequired[OpenRouterMetadataTypedDict]
service_tier: NotRequired[Nullable[str]]
r"""The service tier used by the upstream provider for this request"""
system_fingerprint: NotRequired[str]
@@ -79,6 +81,8 @@ class ChatStreamChunk(BaseModel):
error: Optional[Error] = None
r"""Error information"""
+ openrouter_metadata: Optional[OpenRouterMetadata] = None
+
service_tier: OptionalNullable[str] = UNSET
r"""The service tier used by the upstream provider for this request"""
@@ -90,7 +94,13 @@ class ChatStreamChunk(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["error", "service_tier", "system_fingerprint", "usage"]
+ optional_fields = [
+ "error",
+ "openrouter_metadata",
+ "service_tier",
+ "system_fingerprint",
+ "usage",
+ ]
nullable_fields = ["service_tier"]
null_default_fields = []
diff --git a/src/openrouter/components/chatstreamingresponse.py b/src/openrouter/components/chatstreamingresponse.py
new file mode 100644
index 0000000..cf5a90d
--- /dev/null
+++ b/src/openrouter/components/chatstreamingresponse.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .chatstreamchunk import ChatStreamChunk, ChatStreamChunkTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class ChatStreamingResponseTypedDict(TypedDict):
+ data: ChatStreamChunkTypedDict
+ r"""Streaming chat completion chunk"""
+
+
+class ChatStreamingResponse(BaseModel):
+ data: ChatStreamChunk
+ r"""Streaming chat completion chunk"""
diff --git a/src/openrouter/components/chattoolchoice.py b/src/openrouter/components/chattoolchoice.py
index 4bdebae..7ade116 100644
--- a/src/openrouter/components/chattoolchoice.py
+++ b/src/openrouter/components/chattoolchoice.py
@@ -2,6 +2,7 @@
from __future__ import annotations
from .chatnamedtoolchoice import ChatNamedToolChoice, ChatNamedToolChoiceTypedDict
+from .chatservertoolchoice import ChatServerToolChoice, ChatServerToolChoiceTypedDict
from typing import Literal, Union
from typing_extensions import TypeAliasType
@@ -18,6 +19,7 @@ ChatToolChoiceNone = Literal["none",]
ChatToolChoiceTypedDict = TypeAliasType(
"ChatToolChoiceTypedDict",
Union[
+ ChatServerToolChoiceTypedDict,
ChatNamedToolChoiceTypedDict,
ChatToolChoiceNone,
ChatToolChoiceAuto,
@@ -30,6 +32,7 @@ r"""Tool choice configuration"""
ChatToolChoice = TypeAliasType(
"ChatToolChoice",
Union[
+ ChatServerToolChoice,
ChatNamedToolChoice,
ChatToolChoiceNone,
ChatToolChoiceAuto,
diff --git a/src/openrouter/components/chatusage.py b/src/openrouter/components/chatusage.py
index 12b58ec..3a7357d 100644
--- a/src/openrouter/components/chatusage.py
+++ b/src/openrouter/components/chatusage.py
@@ -1,6 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .costdetails import CostDetails, CostDetailsTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -122,6 +123,12 @@ class ChatUsageTypedDict(TypedDict):
r"""Total number of tokens"""
completion_tokens_details: NotRequired[Nullable[CompletionTokensDetailsTypedDict]]
r"""Detailed completion token usage"""
+ cost: NotRequired[Nullable[float]]
+ r"""Cost of the completion"""
+ cost_details: NotRequired[Nullable[CostDetailsTypedDict]]
+ r"""Breakdown of upstream inference costs"""
+ is_byok: NotRequired[bool]
+ r"""Whether a request was made using a Bring Your Own Key configuration"""
prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]]
r"""Detailed prompt token usage"""
@@ -141,13 +148,33 @@ class ChatUsage(BaseModel):
completion_tokens_details: OptionalNullable[CompletionTokensDetails] = UNSET
r"""Detailed completion token usage"""
+ cost: OptionalNullable[float] = UNSET
+ r"""Cost of the completion"""
+
+ cost_details: OptionalNullable[CostDetails] = UNSET
+ r"""Breakdown of upstream inference costs"""
+
+ is_byok: Optional[bool] = None
+ r"""Whether a request was made using a Bring Your Own Key configuration"""
+
prompt_tokens_details: OptionalNullable[PromptTokensDetails] = UNSET
r"""Detailed prompt token usage"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["completion_tokens_details", "prompt_tokens_details"]
- nullable_fields = ["completion_tokens_details", "prompt_tokens_details"]
+ optional_fields = [
+ "completion_tokens_details",
+ "cost",
+ "cost_details",
+ "is_byok",
+ "prompt_tokens_details",
+ ]
+ nullable_fields = [
+ "completion_tokens_details",
+ "cost",
+ "cost_details",
+ "prompt_tokens_details",
+ ]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/chatwebsearchshorthand.py b/src/openrouter/components/chatwebsearchshorthand.py
index 707f0cf..ee79798 100644
--- a/src/openrouter/components/chatwebsearchshorthand.py
+++ b/src/openrouter/components/chatwebsearchshorthand.py
@@ -31,18 +31,20 @@ class ChatWebSearchShorthandTypedDict(TypedDict):
type: ChatWebSearchShorthandType
allowed_domains: NotRequired[List[str]]
- r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity."""
+ r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains."""
engine: NotRequired[WebSearchEngineEnum]
r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API."""
excluded_domains: NotRequired[List[str]]
- r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity."""
+ r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains."""
+ max_characters: NotRequired[int]
+ r"""Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel)."""
max_results: NotRequired[int]
r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search."""
max_total_results: NotRequired[int]
- r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops."""
+ r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified."""
parameters: NotRequired[WebSearchConfigTypedDict]
search_context_size: NotRequired[SearchQualityLevel]
- r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search."""
+ r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
user_location: NotRequired[WebSearchUserLocationServerToolTypedDict]
r"""Approximate user location for location-biased results."""
@@ -55,7 +57,7 @@ class ChatWebSearchShorthand(BaseModel):
]
allowed_domains: Optional[List[str]] = None
- r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity."""
+ r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains."""
engine: Annotated[
Optional[WebSearchEngineEnum], PlainValidator(validate_open_enum(False))
@@ -63,20 +65,23 @@ class ChatWebSearchShorthand(BaseModel):
r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API."""
excluded_domains: Optional[List[str]] = None
- r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity."""
+ r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains."""
+
+ max_characters: Optional[int] = None
+ r"""Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel)."""
max_results: Optional[int] = None
r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search."""
max_total_results: Optional[int] = None
- r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops."""
+ r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified."""
parameters: Optional[WebSearchConfig] = None
search_context_size: Annotated[
Optional[SearchQualityLevel], PlainValidator(validate_open_enum(False))
] = None
- r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search."""
+ r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
user_location: Optional[WebSearchUserLocationServerTool] = None
r"""Approximate user location for location-biased results."""
diff --git a/src/openrouter/components/compactionitem.py b/src/openrouter/components/compactionitem.py
new file mode 100644
index 0000000..eb9ac69
--- /dev/null
+++ b/src/openrouter/components/compactionitem.py
@@ -0,0 +1,64 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import NotRequired, TypedDict
+
+
+CompactionItemType = Literal["compaction",]
+
+
+class CompactionItemTypedDict(TypedDict):
+ r"""A context compaction marker with encrypted summary"""
+
+ encrypted_content: str
+ type: CompactionItemType
+ id: NotRequired[Nullable[str]]
+
+
+class CompactionItem(BaseModel):
+ r"""A context compaction marker with encrypted summary"""
+
+ encrypted_content: str
+
+ type: CompactionItemType
+
+ id: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id"]
+ nullable_fields = ["id"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/containerautoenvironment.py b/src/openrouter/components/containerautoenvironment.py
new file mode 100644
index 0000000..78d8937
--- /dev/null
+++ b/src/openrouter/components/containerautoenvironment.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ContainerAutoEnvironmentType = Literal["container_auto",]
+
+
+class ContainerAutoEnvironmentTypedDict(TypedDict):
+ r"""An OpenRouter-managed, auto-provisioned ephemeral container."""
+
+ type: ContainerAutoEnvironmentType
+
+
+class ContainerAutoEnvironment(BaseModel):
+ r"""An OpenRouter-managed, auto-provisioned ephemeral container."""
+
+ type: ContainerAutoEnvironmentType
diff --git a/src/openrouter/components/containerreferenceenvironment.py b/src/openrouter/components/containerreferenceenvironment.py
new file mode 100644
index 0000000..30240fa
--- /dev/null
+++ b/src/openrouter/components/containerreferenceenvironment.py
@@ -0,0 +1,26 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ContainerReferenceEnvironmentType = Literal["container_reference",]
+
+
+class ContainerReferenceEnvironmentTypedDict(TypedDict):
+ r"""Reference to a previously created container to reuse."""
+
+ container_id: str
+ r"""Identifier of an existing container to reuse (max 20 characters)."""
+ type: ContainerReferenceEnvironmentType
+
+
+class ContainerReferenceEnvironment(BaseModel):
+ r"""Reference to a previously created container to reuse."""
+
+ container_id: str
+ r"""Identifier of an existing container to reuse (max 20 characters)."""
+
+ type: ContainerReferenceEnvironmentType
diff --git a/src/openrouter/components/contentfilteraction.py b/src/openrouter/components/contentfilteraction.py
new file mode 100644
index 0000000..55c559e
--- /dev/null
+++ b/src/openrouter/components/contentfilteraction.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ContentFilterAction = Union[
+ Literal[
+ "redact",
+ "block",
+ ],
+ UnrecognizedStr,
+]
+r"""Action taken when the pattern matches"""
diff --git a/src/openrouter/components/contentfilterbuiltinaction.py b/src/openrouter/components/contentfilterbuiltinaction.py
new file mode 100644
index 0000000..d5ba92a
--- /dev/null
+++ b/src/openrouter/components/contentfilterbuiltinaction.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ContentFilterBuiltinAction = Union[
+ Literal[
+ "redact",
+ "block",
+ "flag",
+ ],
+ UnrecognizedStr,
+]
+r"""Action taken when the builtin filter triggers"""
diff --git a/src/openrouter/components/contentfilterbuiltinentry.py b/src/openrouter/components/contentfilterbuiltinentry.py
new file mode 100644
index 0000000..294696b
--- /dev/null
+++ b/src/openrouter/components/contentfilterbuiltinentry.py
@@ -0,0 +1,44 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contentfilterbuiltinaction import ContentFilterBuiltinAction
+from .contentfilterbuiltinslug import ContentFilterBuiltinSlug
+from .promptinjectionscanscope import PromptInjectionScanScope
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ContentFilterBuiltinEntryTypedDict(TypedDict):
+ r"""A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector."""
+
+ action: ContentFilterBuiltinAction
+ r"""Action taken when the builtin filter triggers"""
+ slug: ContentFilterBuiltinSlug
+ r"""The builtin filter identifier"""
+ label: NotRequired[str]
+ r"""Read-only, system-assigned redaction placeholder derived from the slug (e.g. \"[EMAIL]\", \"[PHONE]\"). Not settable by the caller."""
+ scan_scope: NotRequired[PromptInjectionScanScope]
+ r"""Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages."""
+
+
+class ContentFilterBuiltinEntry(BaseModel):
+ r"""A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector."""
+
+ action: Annotated[
+ ContentFilterBuiltinAction, PlainValidator(validate_open_enum(False))
+ ]
+ r"""Action taken when the builtin filter triggers"""
+
+ slug: Annotated[ContentFilterBuiltinSlug, PlainValidator(validate_open_enum(False))]
+ r"""The builtin filter identifier"""
+
+ label: Optional[str] = None
+ r"""Read-only, system-assigned redaction placeholder derived from the slug (e.g. \"[EMAIL]\", \"[PHONE]\"). Not settable by the caller."""
+
+ scan_scope: Annotated[
+ Optional[PromptInjectionScanScope], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages."""
diff --git a/src/openrouter/components/contentfilterbuiltinentryinput.py b/src/openrouter/components/contentfilterbuiltinentryinput.py
new file mode 100644
index 0000000..b51baca
--- /dev/null
+++ b/src/openrouter/components/contentfilterbuiltinentryinput.py
@@ -0,0 +1,50 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contentfilterbuiltinaction import ContentFilterBuiltinAction
+from .contentfilterbuiltinslug import ContentFilterBuiltinSlug
+from .promptinjectionscanscope import PromptInjectionScanScope
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ContentFilterBuiltinEntryInputTypedDict(TypedDict):
+ r"""A builtin content filter entry for create/update requests. Labels are system-assigned and cannot be set by the caller."""
+
+ action: ContentFilterBuiltinAction
+ r"""Action taken when the builtin filter triggers"""
+ slug: ContentFilterBuiltinSlug
+ r"""The builtin filter identifier"""
+ label: NotRequired[str]
+ r"""Deprecated: labels are system-assigned and cannot be set by the caller. Accepted for backward compatibility but silently ignored."""
+ scan_scope: NotRequired[PromptInjectionScanScope]
+ r"""Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages."""
+
+
+class ContentFilterBuiltinEntryInput(BaseModel):
+ r"""A builtin content filter entry for create/update requests. Labels are system-assigned and cannot be set by the caller."""
+
+ action: Annotated[
+ ContentFilterBuiltinAction, PlainValidator(validate_open_enum(False))
+ ]
+ r"""Action taken when the builtin filter triggers"""
+
+ slug: Annotated[ContentFilterBuiltinSlug, PlainValidator(validate_open_enum(False))]
+ r"""The builtin filter identifier"""
+
+ label: Annotated[
+ Optional[str],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
+ ),
+ ] = None
+ r"""Deprecated: labels are system-assigned and cannot be set by the caller. Accepted for backward compatibility but silently ignored."""
+
+ scan_scope: Annotated[
+ Optional[PromptInjectionScanScope], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages."""
diff --git a/src/openrouter/components/contentfilterbuiltinslug.py b/src/openrouter/components/contentfilterbuiltinslug.py
new file mode 100644
index 0000000..bbc07e6
--- /dev/null
+++ b/src/openrouter/components/contentfilterbuiltinslug.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ContentFilterBuiltinSlug = Union[
+ Literal[
+ "email",
+ "phone",
+ "ssn",
+ "credit-card",
+ "ip-address",
+ "person-name",
+ "address",
+ "regex-prompt-injection",
+ ],
+ UnrecognizedStr,
+]
+r"""The builtin filter identifier"""
diff --git a/src/openrouter/components/contentfilterentry.py b/src/openrouter/components/contentfilterentry.py
new file mode 100644
index 0000000..856522d
--- /dev/null
+++ b/src/openrouter/components/contentfilterentry.py
@@ -0,0 +1,69 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contentfilteraction import ContentFilterAction
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ContentFilterEntryTypedDict(TypedDict):
+ r"""A custom regex content filter that scans request messages for matching patterns."""
+
+ action: ContentFilterAction
+ r"""Action taken when the pattern matches"""
+ pattern: str
+ r"""A regex pattern to match against request content"""
+ label: NotRequired[Nullable[str]]
+ r"""Optional label used in redaction placeholders or error messages"""
+
+
+class ContentFilterEntry(BaseModel):
+ r"""A custom regex content filter that scans request messages for matching patterns."""
+
+ action: Annotated[ContentFilterAction, PlainValidator(validate_open_enum(False))]
+ r"""Action taken when the pattern matches"""
+
+ pattern: str
+ r"""A regex pattern to match against request content"""
+
+ label: OptionalNullable[str] = UNSET
+ r"""Optional label used in redaction placeholders or error messages"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["label"]
+ nullable_fields = ["label"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/contentpartaudio.py b/src/openrouter/components/contentpartaudio.py
new file mode 100644
index 0000000..450ced1
--- /dev/null
+++ b/src/openrouter/components/contentpartaudio.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+class AudioURLTypedDict(TypedDict):
+ url: str
+
+
+class AudioURL(BaseModel):
+ url: str
+
+
+ContentPartAudioType = Literal["audio_url",]
+
+
+class ContentPartAudioTypedDict(TypedDict):
+ audio_url: AudioURLTypedDict
+ type: ContentPartAudioType
+
+
+class ContentPartAudio(BaseModel):
+ audio_url: AudioURL
+
+ type: ContentPartAudioType
diff --git a/src/openrouter/components/contentpartinputaudio.py b/src/openrouter/components/contentpartinputaudio.py
new file mode 100644
index 0000000..99da9ad
--- /dev/null
+++ b/src/openrouter/components/contentpartinputaudio.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ContentPartInputAudioType = Literal["input_audio",]
+
+
+class ContentPartInputAudioTypedDict(TypedDict):
+ input_audio: MultimodalMediaTypedDict
+ type: ContentPartInputAudioType
+
+
+class ContentPartInputAudio(BaseModel):
+ input_audio: MultimodalMedia
+
+ type: ContentPartInputAudioType
diff --git a/src/openrouter/components/contentpartinputfile.py b/src/openrouter/components/contentpartinputfile.py
new file mode 100644
index 0000000..1adf8a7
--- /dev/null
+++ b/src/openrouter/components/contentpartinputfile.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ContentPartInputFileType = Literal["input_file",]
+
+
+class ContentPartInputFileTypedDict(TypedDict):
+ input_file: MultimodalMediaTypedDict
+ type: ContentPartInputFileType
+
+
+class ContentPartInputFile(BaseModel):
+ input_file: MultimodalMedia
+
+ type: ContentPartInputFileType
diff --git a/src/openrouter/components/contentpartinputvideo.py b/src/openrouter/components/contentpartinputvideo.py
new file mode 100644
index 0000000..6c6f819
--- /dev/null
+++ b/src/openrouter/components/contentpartinputvideo.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .multimodalmedia import MultimodalMedia, MultimodalMediaTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ContentPartInputVideoType = Literal["input_video",]
+
+
+class ContentPartInputVideoTypedDict(TypedDict):
+ input_video: MultimodalMediaTypedDict
+ type: ContentPartInputVideoType
+
+
+class ContentPartInputVideo(BaseModel):
+ input_video: MultimodalMedia
+
+ type: ContentPartInputVideoType
diff --git a/src/openrouter/components/contentpartvideo.py b/src/openrouter/components/contentpartvideo.py
new file mode 100644
index 0000000..50bdff0
--- /dev/null
+++ b/src/openrouter/components/contentpartvideo.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ContentPartVideoType = Literal["video_url",]
+
+
+class VideoURLTypedDict(TypedDict):
+ url: str
+
+
+class VideoURL(BaseModel):
+ url: str
+
+
+class ContentPartVideoTypedDict(TypedDict):
+ type: ContentPartVideoType
+ video_url: VideoURLTypedDict
+
+
+class ContentPartVideo(BaseModel):
+ type: ContentPartVideoType
+
+ video_url: VideoURL
diff --git a/src/openrouter/components/costdetails.py b/src/openrouter/components/costdetails.py
new file mode 100644
index 0000000..7880cdc
--- /dev/null
+++ b/src/openrouter/components/costdetails.py
@@ -0,0 +1,60 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing_extensions import NotRequired, TypedDict
+
+
+class CostDetailsTypedDict(TypedDict):
+ r"""Breakdown of upstream inference costs"""
+
+ upstream_inference_completions_cost: float
+ upstream_inference_prompt_cost: float
+ upstream_inference_cost: NotRequired[Nullable[float]]
+
+
+class CostDetails(BaseModel):
+ r"""Breakdown of upstream inference costs"""
+
+ upstream_inference_completions_cost: float
+
+ upstream_inference_prompt_cost: float
+
+ upstream_inference_cost: OptionalNullable[float] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["upstream_inference_cost"]
+ nullable_fields = ["upstream_inference_cost"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/createbyokkeyrequest.py b/src/openrouter/components/createbyokkeyrequest.py
new file mode 100644
index 0000000..1287f0a
--- /dev/null
+++ b/src/openrouter/components/createbyokkeyrequest.py
@@ -0,0 +1,98 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .byokproviderslug import BYOKProviderSlug
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateBYOKKeyRequestTypedDict(TypedDict):
+ key: str
+ r"""The raw provider API key or credential. This value is encrypted at rest and never returned in API responses."""
+ provider: BYOKProviderSlug
+ r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+ allowed_models: NotRequired[Nullable[List[str]]]
+ r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
+ allowed_user_ids: NotRequired[Nullable[List[str]]]
+ r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction."""
+ disabled: NotRequired[bool]
+ r"""Whether this credential should be created in a disabled state."""
+ is_fallback: NotRequired[bool]
+ r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."""
+ name: NotRequired[Nullable[str]]
+ r"""Optional human-readable name for the credential."""
+ workspace_id: NotRequired[str]
+ r"""Optional workspace ID. Defaults to the authenticated entity's default workspace."""
+
+
+class CreateBYOKKeyRequest(BaseModel):
+ key: str
+ r"""The raw provider API key or credential. This value is encrypted at rest and never returned in API responses."""
+
+ provider: Annotated[BYOKProviderSlug, PlainValidator(validate_open_enum(False))]
+ r"""The upstream provider this credential authenticates against, as a lowercase slug (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+
+ allowed_models: OptionalNullable[List[str]] = UNSET
+ r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
+
+ allowed_user_ids: OptionalNullable[List[str]] = UNSET
+ r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction."""
+
+ disabled: Optional[bool] = None
+ r"""Whether this credential should be created in a disabled state."""
+
+ is_fallback: Optional[bool] = None
+ r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."""
+
+ name: OptionalNullable[str] = UNSET
+ r"""Optional human-readable name for the credential."""
+
+ workspace_id: Optional[str] = None
+ r"""Optional workspace ID. Defaults to the authenticated entity's default workspace."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_models",
+ "allowed_user_ids",
+ "disabled",
+ "is_fallback",
+ "name",
+ "workspace_id",
+ ]
+ nullable_fields = ["allowed_models", "allowed_user_ids", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/createbyokkeyresponse.py b/src/openrouter/components/createbyokkeyresponse.py
new file mode 100644
index 0000000..fcfd9d6
--- /dev/null
+++ b/src/openrouter/components/createbyokkeyresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .byokkey import BYOKKey, BYOKKeyTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class CreateBYOKKeyResponseTypedDict(TypedDict):
+ data: BYOKKeyTypedDict
+
+
+class CreateBYOKKeyResponse(BaseModel):
+ data: BYOKKey
diff --git a/src/openrouter/components/createguardrailrequest.py b/src/openrouter/components/createguardrailrequest.py
index c6dd6d6..36bce65 100644
--- a/src/openrouter/components/createguardrailrequest.py
+++ b/src/openrouter/components/createguardrailrequest.py
@@ -1,6 +1,11 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .contentfilterbuiltinentryinput import (
+ ContentFilterBuiltinEntryInput,
+ ContentFilterBuiltinEntryInputTypedDict,
+)
+from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .guardrailinterval import GuardrailInterval
from openrouter.types import (
BaseModel,
@@ -10,9 +15,10 @@ from openrouter.types import (
UNSET_SENTINEL,
)
from openrouter.utils import validate_open_enum
+import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
-from typing import List
+from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -23,10 +29,24 @@ class CreateGuardrailRequestTypedDict(TypedDict):
r"""Array of model identifiers (slug or canonical_slug accepted)"""
allowed_providers: NotRequired[Nullable[List[str]]]
r"""List of allowed provider IDs"""
+ content_filter_builtins: NotRequired[
+ Nullable[List[ContentFilterBuiltinEntryInputTypedDict]]
+ ]
+ r"""Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only."""
+ content_filters: NotRequired[Nullable[List[ContentFilterEntryTypedDict]]]
+ r"""Custom regex content filters to apply to request messages"""
description: NotRequired[Nullable[str]]
r"""Description of the guardrail"""
enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ enforce_zdr_anthropic: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_google: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_openai: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_other: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
ignored_models: NotRequired[Nullable[List[str]]]
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
ignored_providers: NotRequired[Nullable[List[str]]]
@@ -35,6 +55,8 @@ class CreateGuardrailRequestTypedDict(TypedDict):
r"""Spending limit in USD"""
reset_interval: NotRequired[Nullable[GuardrailInterval]]
r"""Interval at which the limit resets (daily, weekly, monthly)"""
+ workspace_id: NotRequired[str]
+ r"""The workspace to create the guardrail in. Defaults to the default workspace if not provided."""
class CreateGuardrailRequest(BaseModel):
@@ -47,11 +69,36 @@ class CreateGuardrailRequest(BaseModel):
allowed_providers: OptionalNullable[List[str]] = UNSET
r"""List of allowed provider IDs"""
+ content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntryInput]] = (
+ UNSET
+ )
+ r"""Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only."""
+
+ content_filters: OptionalNullable[List[ContentFilterEntry]] = UNSET
+ r"""Custom regex content filters to apply to request messages"""
+
description: OptionalNullable[str] = UNSET
r"""Description of the guardrail"""
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
+ enforce_zdr: Annotated[
+ OptionalNullable[bool],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
+ ),
+ ] = UNSET
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_google: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_other: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
ignored_models: OptionalNullable[List[str]] = UNSET
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
@@ -67,23 +114,39 @@ class CreateGuardrailRequest(BaseModel):
] = UNSET
r"""Interval at which the limit resets (daily, weekly, monthly)"""
+ workspace_id: Optional[str] = None
+ r"""The workspace to create the guardrail in. Defaults to the default workspace if not provided."""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
"allowed_models",
"allowed_providers",
+ "content_filter_builtins",
+ "content_filters",
"description",
"enforce_zdr",
+ "enforce_zdr_anthropic",
+ "enforce_zdr_google",
+ "enforce_zdr_openai",
+ "enforce_zdr_other",
"ignored_models",
"ignored_providers",
"limit_usd",
"reset_interval",
+ "workspace_id",
]
nullable_fields = [
"allowed_models",
"allowed_providers",
+ "content_filter_builtins",
+ "content_filters",
"description",
"enforce_zdr",
+ "enforce_zdr_anthropic",
+ "enforce_zdr_google",
+ "enforce_zdr_openai",
+ "enforce_zdr_other",
"ignored_models",
"ignored_providers",
"limit_usd",
diff --git a/src/openrouter/components/createobservabilitydestinationrequest.py b/src/openrouter/components/createobservabilitydestinationrequest.py
new file mode 100644
index 0000000..65aab43
--- /dev/null
+++ b/src/openrouter/components/createobservabilitydestinationrequest.py
@@ -0,0 +1,135 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+CreateObservabilityDestinationRequestType = Union[
+ Literal[
+ "arize",
+ "braintrust",
+ "clickhouse",
+ "datadog",
+ "grafana",
+ "langfuse",
+ "langsmith",
+ "newrelic",
+ "opik",
+ "otel-collector",
+ "posthog",
+ "ramp",
+ "s3",
+ "sentry",
+ "snowflake",
+ "weave",
+ "webhook",
+ ],
+ UnrecognizedStr,
+]
+r"""The destination type. Only stable destination types are accepted."""
+
+
+class CreateObservabilityDestinationRequestTypedDict(TypedDict):
+ config: Dict[str, Nullable[Any]]
+ r"""Provider-specific configuration. The shape depends on `type` and is validated server-side."""
+ name: str
+ r"""Human-readable name for the destination."""
+ type: CreateObservabilityDestinationRequestType
+ r"""The destination type. Only stable destination types are accepted."""
+ api_key_hashes: NotRequired[Nullable[List[str]]]
+ r"""Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided."""
+ enabled: NotRequired[bool]
+ r"""Whether this destination should be enabled immediately."""
+ filter_rules: NotRequired[Nullable[ObservabilityFilterRulesConfigTypedDict]]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ privacy_mode: NotRequired[bool]
+ r"""When true, request/response bodies are not forwarded — only metadata."""
+ sampling_rate: NotRequired[float]
+ r"""Sampling rate between 0.0001 and 1 (1 = 100%)."""
+ workspace_id: NotRequired[str]
+ r"""Optional workspace ID. Defaults to the authenticated entity's default workspace."""
+
+
+class CreateObservabilityDestinationRequest(BaseModel):
+ config: Dict[str, Nullable[Any]]
+ r"""Provider-specific configuration. The shape depends on `type` and is validated server-side."""
+
+ name: str
+ r"""Human-readable name for the destination."""
+
+ type: Annotated[
+ CreateObservabilityDestinationRequestType,
+ PlainValidator(validate_open_enum(False)),
+ ]
+ r"""The destination type. Only stable destination types are accepted."""
+
+ api_key_hashes: OptionalNullable[List[str]] = UNSET
+ r"""Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided."""
+
+ enabled: Optional[bool] = True
+ r"""Whether this destination should be enabled immediately."""
+
+ filter_rules: OptionalNullable[ObservabilityFilterRulesConfig] = UNSET
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ privacy_mode: Optional[bool] = False
+ r"""When true, request/response bodies are not forwarded — only metadata."""
+
+ sampling_rate: Optional[float] = None
+ r"""Sampling rate between 0.0001 and 1 (1 = 100%)."""
+
+ workspace_id: Optional[str] = None
+ r"""Optional workspace ID. Defaults to the authenticated entity's default workspace."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "api_key_hashes",
+ "enabled",
+ "filter_rules",
+ "privacy_mode",
+ "sampling_rate",
+ "workspace_id",
+ ]
+ nullable_fields = ["api_key_hashes", "filter_rules"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/createobservabilitydestinationresponse.py b/src/openrouter/components/createobservabilitydestinationresponse.py
new file mode 100644
index 0000000..ecef840
--- /dev/null
+++ b/src/openrouter/components/createobservabilitydestinationresponse.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilitydestination import (
+ ObservabilityDestination,
+ ObservabilityDestinationTypedDict,
+)
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class CreateObservabilityDestinationResponseTypedDict(TypedDict):
+ data: ObservabilityDestinationTypedDict
+
+
+class CreateObservabilityDestinationResponse(BaseModel):
+ data: ObservabilityDestination
diff --git a/src/openrouter/components/createpresetfrominferenceresponse.py b/src/openrouter/components/createpresetfrominferenceresponse.py
new file mode 100644
index 0000000..ffdb375
--- /dev/null
+++ b/src/openrouter/components/createpresetfrominferenceresponse.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .presetwithdesignatedversion import (
+ PresetWithDesignatedVersion,
+ PresetWithDesignatedVersionTypedDict,
+)
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class CreatePresetFromInferenceResponseTypedDict(TypedDict):
+ r"""Response containing the created preset with its designated version."""
+
+ data: PresetWithDesignatedVersionTypedDict
+ r"""A preset with its currently designated version."""
+
+
+class CreatePresetFromInferenceResponse(BaseModel):
+ r"""Response containing the created preset with its designated version."""
+
+ data: PresetWithDesignatedVersion
+ r"""A preset with its currently designated version."""
diff --git a/src/openrouter/components/createworkspacerequest.py b/src/openrouter/components/createworkspacerequest.py
new file mode 100644
index 0000000..e068f80
--- /dev/null
+++ b/src/openrouter/components/createworkspacerequest.py
@@ -0,0 +1,119 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import List, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class CreateWorkspaceRequestTypedDict(TypedDict):
+ name: str
+ r"""Name for the new workspace"""
+ slug: str
+ r"""URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)"""
+ default_image_model: NotRequired[Nullable[str]]
+ r"""Default image model for this workspace"""
+ default_provider_sort: NotRequired[Nullable[str]]
+ r"""Default provider sort preference (price, throughput, latency, exacto)"""
+ default_text_model: NotRequired[Nullable[str]]
+ r"""Default text model for this workspace"""
+ description: NotRequired[Nullable[str]]
+ r"""Description of the workspace"""
+ io_logging_api_key_ids: NotRequired[Nullable[List[int]]]
+ r"""Optional array of API key IDs to filter I/O logging"""
+ io_logging_sampling_rate: NotRequired[float]
+ r"""Sampling rate for I/O logging (0.0001-1)"""
+ is_data_discount_logging_enabled: NotRequired[bool]
+ r"""Whether data discount logging is enabled"""
+ is_observability_broadcast_enabled: NotRequired[bool]
+ r"""Whether broadcast is enabled"""
+ is_observability_io_logging_enabled: NotRequired[bool]
+ r"""Whether private logging is enabled"""
+
+
+class CreateWorkspaceRequest(BaseModel):
+ name: str
+ r"""Name for the new workspace"""
+
+ slug: str
+ r"""URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)"""
+
+ default_image_model: OptionalNullable[str] = UNSET
+ r"""Default image model for this workspace"""
+
+ default_provider_sort: OptionalNullable[str] = UNSET
+ r"""Default provider sort preference (price, throughput, latency, exacto)"""
+
+ default_text_model: OptionalNullable[str] = UNSET
+ r"""Default text model for this workspace"""
+
+ description: OptionalNullable[str] = UNSET
+ r"""Description of the workspace"""
+
+ io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET
+ r"""Optional array of API key IDs to filter I/O logging"""
+
+ io_logging_sampling_rate: Optional[float] = None
+ r"""Sampling rate for I/O logging (0.0001-1)"""
+
+ is_data_discount_logging_enabled: Optional[bool] = None
+ r"""Whether data discount logging is enabled"""
+
+ is_observability_broadcast_enabled: Optional[bool] = None
+ r"""Whether broadcast is enabled"""
+
+ is_observability_io_logging_enabled: Optional[bool] = None
+ r"""Whether private logging is enabled"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "default_image_model",
+ "default_provider_sort",
+ "default_text_model",
+ "description",
+ "io_logging_api_key_ids",
+ "io_logging_sampling_rate",
+ "is_data_discount_logging_enabled",
+ "is_observability_broadcast_enabled",
+ "is_observability_io_logging_enabled",
+ ]
+ nullable_fields = [
+ "default_image_model",
+ "default_provider_sort",
+ "default_text_model",
+ "description",
+ "io_logging_api_key_ids",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/createworkspaceresponse.py b/src/openrouter/components/createworkspaceresponse.py
new file mode 100644
index 0000000..54c7b43
--- /dev/null
+++ b/src/openrouter/components/createworkspaceresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .workspace import Workspace, WorkspaceTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class CreateWorkspaceResponseTypedDict(TypedDict):
+ data: WorkspaceTypedDict
+
+
+class CreateWorkspaceResponse(BaseModel):
+ data: Workspace
diff --git a/src/openrouter/components/customtool.py b/src/openrouter/components/customtool.py
index 128bede..d243793 100644
--- a/src/openrouter/components/customtool.py
+++ b/src/openrouter/components/customtool.py
@@ -58,14 +58,14 @@ Format = Annotated[
]
-TypeCustom = Literal["custom",]
+CustomToolTypeCustom = Literal["custom",]
class CustomToolTypedDict(TypedDict):
r"""Custom tool configuration"""
name: str
- type: TypeCustom
+ type: CustomToolTypeCustom
description: NotRequired[str]
format_: NotRequired[FormatTypedDict]
@@ -75,7 +75,7 @@ class CustomTool(BaseModel):
name: str
- type: TypeCustom
+ type: CustomToolTypeCustom
description: Optional[str] = None
diff --git a/src/openrouter/components/customtoolcallinputdeltaevent.py b/src/openrouter/components/customtoolcallinputdeltaevent.py
new file mode 100644
index 0000000..bb8eacd
--- /dev/null
+++ b/src/openrouter/components/customtoolcallinputdeltaevent.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+CustomToolCallInputDeltaEventType = Literal["response.custom_tool_call_input.delta",]
+
+
+class CustomToolCallInputDeltaEventTypedDict(TypedDict):
+ r"""Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments."""
+
+ delta: str
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: CustomToolCallInputDeltaEventType
+
+
+class CustomToolCallInputDeltaEvent(BaseModel):
+ r"""Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments."""
+
+ delta: str
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: CustomToolCallInputDeltaEventType
diff --git a/src/openrouter/components/customtoolcallinputdoneevent.py b/src/openrouter/components/customtoolcallinputdoneevent.py
new file mode 100644
index 0000000..308a296
--- /dev/null
+++ b/src/openrouter/components/customtoolcallinputdoneevent.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+CustomToolCallInputDoneEventType = Literal["response.custom_tool_call_input.done",]
+
+
+class CustomToolCallInputDoneEventTypedDict(TypedDict):
+ r"""Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools."""
+
+ input: str
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: CustomToolCallInputDoneEventType
+
+
+class CustomToolCallInputDoneEvent(BaseModel):
+ r"""Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools."""
+
+ input: str
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: CustomToolCallInputDoneEventType
diff --git a/src/openrouter/components/customtoolcallitem.py b/src/openrouter/components/customtoolcallitem.py
new file mode 100644
index 0000000..486f76d
--- /dev/null
+++ b/src/openrouter/components/customtoolcallitem.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+CustomToolCallItemType = Literal["custom_tool_call",]
+
+
+class CustomToolCallItemTypedDict(TypedDict):
+ r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments."""
+
+ call_id: str
+ input: str
+ name: str
+ type: CustomToolCallItemType
+ id: NotRequired[str]
+ namespace: NotRequired[str]
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
+
+
+class CustomToolCallItem(BaseModel):
+ r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments."""
+
+ call_id: str
+
+ input: str
+
+ name: str
+
+ type: CustomToolCallItemType
+
+ id: Optional[str] = None
+
+ namespace: Optional[str] = None
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
diff --git a/src/openrouter/components/customtoolcalloutputitem.py b/src/openrouter/components/customtoolcalloutputitem.py
new file mode 100644
index 0000000..c820142
--- /dev/null
+++ b/src/openrouter/components/customtoolcalloutputitem.py
@@ -0,0 +1,138 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .inputfile import InputFile, InputFileTypedDict
+from .inputtext import InputText, InputTextTypedDict
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import get_discriminator, validate_open_enum
+from pydantic import Discriminator, Tag, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+CustomToolCallOutputItemDetail = Union[
+ Literal[
+ "auto",
+ "high",
+ "low",
+ "original",
+ ],
+ UnrecognizedStr,
+]
+
+
+CustomToolCallOutputItemTypeInputImage = Literal["input_image",]
+
+
+class CustomToolCallOutputItemOutputInputImageTypedDict(TypedDict):
+ r"""Image input content item"""
+
+ detail: CustomToolCallOutputItemDetail
+ type: CustomToolCallOutputItemTypeInputImage
+ image_url: NotRequired[Nullable[str]]
+
+
+class CustomToolCallOutputItemOutputInputImage(BaseModel):
+ r"""Image input content item"""
+
+ detail: Annotated[
+ CustomToolCallOutputItemDetail, PlainValidator(validate_open_enum(False))
+ ]
+
+ type: CustomToolCallOutputItemTypeInputImage
+
+ image_url: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["image_url"]
+ nullable_fields = ["image_url"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+CustomToolCallOutputItemOutputUnion1TypedDict = TypeAliasType(
+ "CustomToolCallOutputItemOutputUnion1TypedDict",
+ Union[
+ InputTextTypedDict,
+ CustomToolCallOutputItemOutputInputImageTypedDict,
+ InputFileTypedDict,
+ ],
+)
+
+
+CustomToolCallOutputItemOutputUnion1 = Annotated[
+ Union[
+ Annotated[InputText, Tag("input_text")],
+ Annotated[CustomToolCallOutputItemOutputInputImage, Tag("input_image")],
+ Annotated[InputFile, Tag("input_file")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+CustomToolCallOutputItemOutputUnion2TypedDict = TypeAliasType(
+ "CustomToolCallOutputItemOutputUnion2TypedDict",
+ Union[str, List[CustomToolCallOutputItemOutputUnion1TypedDict]],
+)
+
+
+CustomToolCallOutputItemOutputUnion2 = TypeAliasType(
+ "CustomToolCallOutputItemOutputUnion2",
+ Union[str, List[CustomToolCallOutputItemOutputUnion1]],
+)
+
+
+CustomToolCallOutputItemTypeCustomToolCallOutput = Literal["custom_tool_call_output",]
+
+
+class CustomToolCallOutputItemTypedDict(TypedDict):
+ r"""The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`."""
+
+ call_id: str
+ output: CustomToolCallOutputItemOutputUnion2TypedDict
+ type: CustomToolCallOutputItemTypeCustomToolCallOutput
+ id: NotRequired[str]
+
+
+class CustomToolCallOutputItem(BaseModel):
+ r"""The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`."""
+
+ call_id: str
+
+ output: CustomToolCallOutputItemOutputUnion2
+
+ type: CustomToolCallOutputItemTypeCustomToolCallOutput
+
+ id: Optional[str] = None
diff --git a/src/openrouter/components/deletebyokkeyresponse.py b/src/openrouter/components/deletebyokkeyresponse.py
new file mode 100644
index 0000000..19946d2
--- /dev/null
+++ b/src/openrouter/components/deletebyokkeyresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import validate_const
+import pydantic
+from pydantic.functional_validators import AfterValidator
+from typing import Literal
+from typing_extensions import Annotated, TypedDict
+
+
+class DeleteBYOKKeyResponseTypedDict(TypedDict):
+ deleted: Literal[True]
+ r"""Confirmation that the BYOK credential was deleted."""
+
+
+class DeleteBYOKKeyResponse(BaseModel):
+ DELETED: Annotated[
+ Annotated[Literal[True], AfterValidator(validate_const(True))],
+ pydantic.Field(alias="deleted"),
+ ] = True
+ r"""Confirmation that the BYOK credential was deleted."""
diff --git a/src/openrouter/components/deleteobservabilitydestinationresponse.py b/src/openrouter/components/deleteobservabilitydestinationresponse.py
new file mode 100644
index 0000000..3765156
--- /dev/null
+++ b/src/openrouter/components/deleteobservabilitydestinationresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import validate_const
+import pydantic
+from pydantic.functional_validators import AfterValidator
+from typing import Literal
+from typing_extensions import Annotated, TypedDict
+
+
+class DeleteObservabilityDestinationResponseTypedDict(TypedDict):
+ deleted: Literal[True]
+ r"""Always `true` on success."""
+
+
+class DeleteObservabilityDestinationResponse(BaseModel):
+ DELETED: Annotated[
+ Annotated[Literal[True], AfterValidator(validate_const(True))],
+ pydantic.Field(alias="deleted"),
+ ] = True
+ r"""Always `true` on success."""
diff --git a/src/openrouter/components/deleteworkspaceresponse.py b/src/openrouter/components/deleteworkspaceresponse.py
new file mode 100644
index 0000000..bed4595
--- /dev/null
+++ b/src/openrouter/components/deleteworkspaceresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import validate_const
+import pydantic
+from pydantic.functional_validators import AfterValidator
+from typing import Literal
+from typing_extensions import Annotated, TypedDict
+
+
+class DeleteWorkspaceResponseTypedDict(TypedDict):
+ deleted: Literal[True]
+ r"""Confirmation that the workspace was deleted"""
+
+
+class DeleteWorkspaceResponse(BaseModel):
+ DELETED: Annotated[
+ Annotated[Literal[True], AfterValidator(validate_const(True))],
+ pydantic.Field(alias="deleted"),
+ ] = True
+ r"""Confirmation that the workspace was deleted"""
diff --git a/src/openrouter/components/easyinputmessage.py b/src/openrouter/components/easyinputmessage.py
index 7566167..60dabda 100644
--- a/src/openrouter/components/easyinputmessage.py
+++ b/src/openrouter/components/easyinputmessage.py
@@ -25,19 +25,20 @@ EasyInputMessageDetail = Union[
"auto",
"high",
"low",
+ "original",
],
UnrecognizedStr,
]
-EasyInputMessageContentType = Literal["input_image",]
+EasyInputMessageTypeInputImage = Literal["input_image",]
class EasyInputMessageContentInputImageTypedDict(TypedDict):
r"""Image input content item"""
detail: EasyInputMessageDetail
- type: EasyInputMessageContentType
+ type: EasyInputMessageTypeInputImage
image_url: NotRequired[Nullable[str]]
@@ -46,7 +47,7 @@ class EasyInputMessageContentInputImage(BaseModel):
detail: Annotated[EasyInputMessageDetail, PlainValidator(validate_open_enum(False))]
- type: EasyInputMessageContentType
+ type: EasyInputMessageTypeInputImage
image_url: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/components/endpointinfo.py b/src/openrouter/components/endpointinfo.py
new file mode 100644
index 0000000..cac5d92
--- /dev/null
+++ b/src/openrouter/components/endpointinfo.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class EndpointInfoTypedDict(TypedDict):
+ model: str
+ provider: str
+ selected: bool
+
+
+class EndpointInfo(BaseModel):
+ model: str
+
+ provider: str
+
+ selected: bool
diff --git a/src/openrouter/components/endpointsmetadata.py b/src/openrouter/components/endpointsmetadata.py
new file mode 100644
index 0000000..5234443
--- /dev/null
+++ b/src/openrouter/components/endpointsmetadata.py
@@ -0,0 +1,18 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .endpointinfo import EndpointInfo, EndpointInfoTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class EndpointsMetadataTypedDict(TypedDict):
+ available: List[EndpointInfoTypedDict]
+ total: int
+
+
+class EndpointsMetadata(BaseModel):
+ available: List[EndpointInfo]
+
+ total: int
diff --git a/src/openrouter/components/filesearchservertool.py b/src/openrouter/components/filesearchservertool.py
index 54e3cfb..974ee97 100644
--- a/src/openrouter/components/filesearchservertool.py
+++ b/src/openrouter/components/filesearchservertool.py
@@ -30,24 +30,32 @@ FiltersType = Union[
]
-Value1TypedDict = TypeAliasType("Value1TypedDict", Union[str, float])
-
-
-Value1 = TypeAliasType("Value1", Union[str, float])
-
-
-Value2TypedDict = TypeAliasType(
- "Value2TypedDict", Union[str, float, bool, List[Value1TypedDict]]
+FileSearchServerToolValue1TypedDict = TypeAliasType(
+ "FileSearchServerToolValue1TypedDict", Union[str, float]
)
-Value2 = TypeAliasType("Value2", Union[str, float, bool, List[Value1]])
+FileSearchServerToolValue1 = TypeAliasType(
+ "FileSearchServerToolValue1", Union[str, float]
+)
+
+
+FileSearchServerToolValue2TypedDict = TypeAliasType(
+ "FileSearchServerToolValue2TypedDict",
+ Union[str, float, bool, List[FileSearchServerToolValue1TypedDict]],
+)
+
+
+FileSearchServerToolValue2 = TypeAliasType(
+ "FileSearchServerToolValue2",
+ Union[str, float, bool, List[FileSearchServerToolValue1]],
+)
class FiltersTypedDict(TypedDict):
key: str
type: FiltersType
- value: Value2TypedDict
+ value: FileSearchServerToolValue2TypedDict
class Filters(BaseModel):
@@ -55,7 +63,7 @@ class Filters(BaseModel):
type: Annotated[FiltersType, PlainValidator(validate_open_enum(False))]
- value: Value2
+ value: FileSearchServerToolValue2
FiltersUnionTypedDict = TypeAliasType(
diff --git a/src/openrouter/components/functioncallitem.py b/src/openrouter/components/functioncallitem.py
index 5f04a05..82a1e63 100644
--- a/src/openrouter/components/functioncallitem.py
+++ b/src/openrouter/components/functioncallitem.py
@@ -20,6 +20,8 @@ class FunctionCallItemTypedDict(TypedDict):
id: str
name: str
type: FunctionCallItemType
+ namespace: NotRequired[str]
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
status: NotRequired[ToolCallStatus]
@@ -36,6 +38,9 @@ class FunctionCallItem(BaseModel):
type: FunctionCallItemType
+ namespace: Optional[str] = None
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
+
status: Annotated[
Optional[ToolCallStatus], PlainValidator(validate_open_enum(False))
] = None
diff --git a/src/openrouter/components/functioncalloutputitem.py b/src/openrouter/components/functioncalloutputitem.py
index 239f67d..842269a 100644
--- a/src/openrouter/components/functioncalloutputitem.py
+++ b/src/openrouter/components/functioncalloutputitem.py
@@ -23,30 +23,31 @@ FunctionCallOutputItemDetail = Union[
"auto",
"high",
"low",
+ "original",
],
UnrecognizedStr,
]
-FunctionCallOutputItemOutputType = Literal["input_image",]
+FunctionCallOutputItemTypeInputImage = Literal["input_image",]
-class OutputInputImageTypedDict(TypedDict):
+class FunctionCallOutputItemOutputInputImageTypedDict(TypedDict):
r"""Image input content item"""
detail: FunctionCallOutputItemDetail
- type: FunctionCallOutputItemOutputType
+ type: FunctionCallOutputItemTypeInputImage
image_url: NotRequired[Nullable[str]]
-class OutputInputImage(BaseModel):
+class FunctionCallOutputItemOutputInputImage(BaseModel):
r"""Image input content item"""
detail: Annotated[
FunctionCallOutputItemDetail, PlainValidator(validate_open_enum(False))
]
- type: FunctionCallOutputItemOutputType
+ type: FunctionCallOutputItemTypeInputImage
image_url: OptionalNullable[str] = UNSET
@@ -83,14 +84,18 @@ class OutputInputImage(BaseModel):
FunctionCallOutputItemOutputUnion1TypedDict = TypeAliasType(
"FunctionCallOutputItemOutputUnion1TypedDict",
- Union[InputTextTypedDict, OutputInputImageTypedDict, InputFileTypedDict],
+ Union[
+ InputTextTypedDict,
+ FunctionCallOutputItemOutputInputImageTypedDict,
+ InputFileTypedDict,
+ ],
)
FunctionCallOutputItemOutputUnion1 = Annotated[
Union[
Annotated[InputText, Tag("input_text")],
- Annotated[OutputInputImage, Tag("input_image")],
+ Annotated[FunctionCallOutputItemOutputInputImage, Tag("input_image")],
Annotated[InputFile, Tag("input_file")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
diff --git a/src/openrouter/components/fusionanalysisresult.py b/src/openrouter/components/fusionanalysisresult.py
new file mode 100644
index 0000000..44526fc
--- /dev/null
+++ b/src/openrouter/components/fusionanalysisresult.py
@@ -0,0 +1,74 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class StanceTypedDict(TypedDict):
+ model: str
+ stance: str
+
+
+class Stance(BaseModel):
+ model: str
+
+ stance: str
+
+
+class ContradictionTypedDict(TypedDict):
+ stances: List[StanceTypedDict]
+ topic: str
+
+
+class Contradiction(BaseModel):
+ stances: List[Stance]
+
+ topic: str
+
+
+class PartialCoverageTypedDict(TypedDict):
+ models: List[str]
+ point: str
+
+
+class PartialCoverage(BaseModel):
+ models: List[str]
+
+ point: str
+
+
+class UniqueInsightTypedDict(TypedDict):
+ insight: str
+ model: str
+
+
+class UniqueInsight(BaseModel):
+ insight: str
+
+ model: str
+
+
+class FusionAnalysisResultTypedDict(TypedDict):
+ r"""Structured analysis produced by the fusion judge model."""
+
+ blind_spots: List[str]
+ consensus: List[str]
+ contradictions: List[ContradictionTypedDict]
+ partial_coverage: List[PartialCoverageTypedDict]
+ unique_insights: List[UniqueInsightTypedDict]
+
+
+class FusionAnalysisResult(BaseModel):
+ r"""Structured analysis produced by the fusion judge model."""
+
+ blind_spots: List[str]
+
+ consensus: List[str]
+
+ contradictions: List[Contradiction]
+
+ partial_coverage: List[PartialCoverage]
+
+ unique_insights: List[UniqueInsight]
diff --git a/src/openrouter/components/fusioncallanalysiscompletedevent.py b/src/openrouter/components/fusioncallanalysiscompletedevent.py
new file mode 100644
index 0000000..c6c88ac
--- /dev/null
+++ b/src/openrouter/components/fusioncallanalysiscompletedevent.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .fusionanalysisresult import FusionAnalysisResult, FusionAnalysisResultTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallAnalysisCompletedEventType = Literal[
+ "response.fusion_call.analysis.completed",
+]
+
+
+class FusionCallAnalysisCompletedEventTypedDict(TypedDict):
+ r"""Emitted when the fusion judge completes with the structured analysis."""
+
+ analysis: FusionAnalysisResultTypedDict
+ r"""Structured analysis produced by the fusion judge model."""
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallAnalysisCompletedEventType
+
+
+class FusionCallAnalysisCompletedEvent(BaseModel):
+ r"""Emitted when the fusion judge completes with the structured analysis."""
+
+ analysis: FusionAnalysisResult
+ r"""Structured analysis produced by the fusion judge model."""
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallAnalysisCompletedEventType
diff --git a/src/openrouter/components/fusioncallanalysisinprogressevent.py b/src/openrouter/components/fusioncallanalysisinprogressevent.py
new file mode 100644
index 0000000..4031d8d
--- /dev/null
+++ b/src/openrouter/components/fusioncallanalysisinprogressevent.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallAnalysisInProgressEventType = Literal[
+ "response.fusion_call.analysis.in_progress",
+]
+
+
+class FusionCallAnalysisInProgressEventTypedDict(TypedDict):
+ r"""Emitted when the fusion judge starts producing the structured analysis."""
+
+ item_id: str
+ judge_model: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallAnalysisInProgressEventType
+
+
+class FusionCallAnalysisInProgressEvent(BaseModel):
+ r"""Emitted when the fusion judge starts producing the structured analysis."""
+
+ item_id: str
+
+ judge_model: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallAnalysisInProgressEventType
diff --git a/src/openrouter/components/fusioncallcompletedevent.py b/src/openrouter/components/fusioncallcompletedevent.py
new file mode 100644
index 0000000..2297fcd
--- /dev/null
+++ b/src/openrouter/components/fusioncallcompletedevent.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallCompletedEventType = Literal["response.fusion_call.completed",]
+
+
+class FusionCallCompletedEventTypedDict(TypedDict):
+ r"""Emitted when the openrouter:fusion tool call finishes."""
+
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallCompletedEventType
+
+
+class FusionCallCompletedEvent(BaseModel):
+ r"""Emitted when the openrouter:fusion tool call finishes."""
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallCompletedEventType
diff --git a/src/openrouter/components/fusioncallinprogressevent.py b/src/openrouter/components/fusioncallinprogressevent.py
new file mode 100644
index 0000000..e1e93e9
--- /dev/null
+++ b/src/openrouter/components/fusioncallinprogressevent.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallInProgressEventType = Literal["response.fusion_call.in_progress",]
+
+
+class FusionCallInProgressEventTypedDict(TypedDict):
+ r"""Emitted when an openrouter:fusion tool call begins executing."""
+
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallInProgressEventType
+
+
+class FusionCallInProgressEvent(BaseModel):
+ r"""Emitted when an openrouter:fusion tool call begins executing."""
+
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallInProgressEventType
diff --git a/src/openrouter/components/fusioncallpaneladdedevent.py b/src/openrouter/components/fusioncallpaneladdedevent.py
new file mode 100644
index 0000000..7ff7320
--- /dev/null
+++ b/src/openrouter/components/fusioncallpaneladdedevent.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallPanelAddedEventType = Literal["response.fusion_call.panel.added",]
+
+
+class FusionCallPanelAddedEventTypedDict(TypedDict):
+ r"""Emitted when a fusion analysis-panel model starts."""
+
+ item_id: str
+ model: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallPanelAddedEventType
+
+
+class FusionCallPanelAddedEvent(BaseModel):
+ r"""Emitted when a fusion analysis-panel model starts."""
+
+ item_id: str
+
+ model: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallPanelAddedEventType
diff --git a/src/openrouter/components/fusioncallpanelcompletedevent.py b/src/openrouter/components/fusioncallpanelcompletedevent.py
new file mode 100644
index 0000000..ef91f4c
--- /dev/null
+++ b/src/openrouter/components/fusioncallpanelcompletedevent.py
@@ -0,0 +1,36 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallPanelCompletedEventType = Literal["response.fusion_call.panel.completed",]
+
+
+class FusionCallPanelCompletedEventTypedDict(TypedDict):
+ r"""Emitted when a fusion panel model finishes with its full content."""
+
+ content: str
+ item_id: str
+ model: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallPanelCompletedEventType
+
+
+class FusionCallPanelCompletedEvent(BaseModel):
+ r"""Emitted when a fusion panel model finishes with its full content."""
+
+ content: str
+
+ item_id: str
+
+ model: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallPanelCompletedEventType
diff --git a/src/openrouter/components/fusioncallpaneldeltaevent.py b/src/openrouter/components/fusioncallpaneldeltaevent.py
new file mode 100644
index 0000000..223d8c9
--- /dev/null
+++ b/src/openrouter/components/fusioncallpaneldeltaevent.py
@@ -0,0 +1,36 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallPanelDeltaEventType = Literal["response.fusion_call.panel.delta",]
+
+
+class FusionCallPanelDeltaEventTypedDict(TypedDict):
+ r"""Incremental content token from a fusion panel model."""
+
+ delta: str
+ item_id: str
+ model: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallPanelDeltaEventType
+
+
+class FusionCallPanelDeltaEvent(BaseModel):
+ r"""Incremental content token from a fusion panel model."""
+
+ delta: str
+
+ item_id: str
+
+ model: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallPanelDeltaEventType
diff --git a/src/openrouter/components/fusioncallpanelfailedevent.py b/src/openrouter/components/fusioncallpanelfailedevent.py
new file mode 100644
index 0000000..e1ac791
--- /dev/null
+++ b/src/openrouter/components/fusioncallpanelfailedevent.py
@@ -0,0 +1,39 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+FusionCallPanelFailedEventType = Literal["response.fusion_call.panel.failed",]
+
+
+class FusionCallPanelFailedEventTypedDict(TypedDict):
+ r"""Emitted when a fusion panel model fails."""
+
+ error: str
+ item_id: str
+ model: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallPanelFailedEventType
+ status_code: NotRequired[int]
+
+
+class FusionCallPanelFailedEvent(BaseModel):
+ r"""Emitted when a fusion panel model fails."""
+
+ error: str
+
+ item_id: str
+
+ model: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallPanelFailedEventType
+
+ status_code: Optional[int] = None
diff --git a/src/openrouter/components/fusioncallpanelreasoningdeltaevent.py b/src/openrouter/components/fusioncallpanelreasoningdeltaevent.py
new file mode 100644
index 0000000..2836ce3
--- /dev/null
+++ b/src/openrouter/components/fusioncallpanelreasoningdeltaevent.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+FusionCallPanelReasoningDeltaEventType = Literal[
+ "response.fusion_call.panel.reasoning.delta",
+]
+
+
+class FusionCallPanelReasoningDeltaEventTypedDict(TypedDict):
+ r"""Incremental reasoning token from a fusion panel model."""
+
+ delta: str
+ item_id: str
+ model: str
+ output_index: int
+ sequence_number: int
+ type: FusionCallPanelReasoningDeltaEventType
+
+
+class FusionCallPanelReasoningDeltaEvent(BaseModel):
+ r"""Incremental reasoning token from a fusion panel model."""
+
+ delta: str
+
+ item_id: str
+
+ model: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: FusionCallPanelReasoningDeltaEventType
diff --git a/src/openrouter/components/fusionplugin.py b/src/openrouter/components/fusionplugin.py
new file mode 100644
index 0000000..c998bf9
--- /dev/null
+++ b/src/openrouter/components/fusionplugin.py
@@ -0,0 +1,57 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable
+from typing import Any, Dict, List, Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+FusionPluginID = Literal["fusion",]
+
+
+class FusionPluginToolTypedDict(TypedDict):
+ type: str
+ r"""Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\")."""
+ parameters: NotRequired[Dict[str, Nullable[Any]]]
+ r"""Optional configuration forwarded as the tool's `parameters` object."""
+
+
+class FusionPluginTool(BaseModel):
+ type: str
+ r"""Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\")."""
+
+ parameters: Optional[Dict[str, Nullable[Any]]] = None
+ r"""Optional configuration forwarded as the tool's `parameters` object."""
+
+
+class FusionPluginTypedDict(TypedDict):
+ id: FusionPluginID
+ analysis_models: NotRequired[List[str]]
+ r"""Slugs of models to run in parallel as the \"expert panel\" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest)."""
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the fusion plugin for this request. Defaults to true."""
+ max_tool_calls: NotRequired[int]
+ r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16."""
+ model: NotRequired[str]
+ r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset."""
+ tools: NotRequired[List[FusionPluginToolTypedDict]]
+ r"""Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."""
+
+
+class FusionPlugin(BaseModel):
+ id: FusionPluginID
+
+ analysis_models: Optional[List[str]] = None
+ r"""Slugs of models to run in parallel as the \"expert panel\" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest)."""
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the fusion plugin for this request. Defaults to true."""
+
+ max_tool_calls: Optional[int] = None
+ r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16."""
+
+ model: Optional[str] = None
+ r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset."""
+
+ tools: Optional[List[FusionPluginTool]] = None
+ r"""Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."""
diff --git a/src/openrouter/components/fusionservertool_openrouter.py b/src/openrouter/components/fusionservertool_openrouter.py
new file mode 100644
index 0000000..5729ea0
--- /dev/null
+++ b/src/openrouter/components/fusionservertool_openrouter.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .fusionservertoolconfig import (
+ FusionServerToolConfig,
+ FusionServerToolConfigTypedDict,
+)
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+FusionServerToolOpenRouterType = Literal["openrouter:fusion",]
+
+
+class FusionServerToolOpenRouterTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from."""
+
+ type: FusionServerToolOpenRouterType
+ parameters: NotRequired[FusionServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:fusion server tool."""
+
+
+class FusionServerToolOpenRouter(BaseModel):
+ r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from."""
+
+ type: FusionServerToolOpenRouterType
+
+ parameters: Optional[FusionServerToolConfig] = None
+ r"""Configuration for the openrouter:fusion server tool."""
diff --git a/src/openrouter/components/fusionservertoolconfig.py b/src/openrouter/components/fusionservertoolconfig.py
new file mode 100644
index 0000000..4eae6cf
--- /dev/null
+++ b/src/openrouter/components/fusionservertoolconfig.py
@@ -0,0 +1,103 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+FusionServerToolConfigEffort = Union[
+ Literal[
+ "xhigh",
+ "high",
+ "medium",
+ "low",
+ "minimal",
+ "none",
+ ],
+ UnrecognizedStr,
+]
+r"""Reasoning effort level for panelist and judge inner calls."""
+
+
+class FusionServerToolConfigReasoningTypedDict(TypedDict):
+ r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking."""
+
+ effort: NotRequired[FusionServerToolConfigEffort]
+ r"""Reasoning effort level for panelist and judge inner calls."""
+ max_tokens: NotRequired[int]
+ r"""Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought."""
+
+
+class FusionServerToolConfigReasoning(BaseModel):
+ r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking."""
+
+ effort: Annotated[
+ Optional[FusionServerToolConfigEffort],
+ PlainValidator(validate_open_enum(False)),
+ ] = None
+ r"""Reasoning effort level for panelist and judge inner calls."""
+
+ max_tokens: Optional[int] = None
+ r"""Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought."""
+
+
+class FusionServerToolConfigToolTypedDict(TypedDict):
+ type: str
+ r"""Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\")."""
+ parameters: NotRequired[Dict[str, Nullable[Any]]]
+ r"""Optional configuration forwarded as the tool's `parameters` object."""
+
+
+class FusionServerToolConfigTool(BaseModel):
+ type: str
+ r"""Server tool type identifier (e.g. \"openrouter:web_search\", \"openrouter:web_fetch\")."""
+
+ parameters: Optional[Dict[str, Nullable[Any]]] = None
+ r"""Optional configuration forwarded as the tool's `parameters` object."""
+
+
+class FusionServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:fusion server tool."""
+
+ analysis_models: NotRequired[List[str]]
+ r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion."""
+ max_completion_tokens: NotRequired[int]
+ r"""Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, the provider's default applies."""
+ max_tool_calls: NotRequired[int]
+ r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16."""
+ model: NotRequired[str]
+ r"""Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request."""
+ reasoning: NotRequired[FusionServerToolConfigReasoningTypedDict]
+ r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking."""
+ temperature: NotRequired[float]
+ r"""Sampling temperature forwarded to panelist and judge inner calls. When omitted, the provider's default applies."""
+ tools: NotRequired[List[FusionServerToolConfigToolTypedDict]]
+ r"""Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."""
+
+
+class FusionServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:fusion server tool."""
+
+ analysis_models: Optional[List[str]] = None
+ r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion."""
+
+ max_completion_tokens: Optional[int] = None
+ r"""Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, the provider's default applies."""
+
+ max_tool_calls: Optional[int] = None
+ r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16."""
+
+ model: Optional[str] = None
+ r"""Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request."""
+
+ reasoning: Optional[FusionServerToolConfigReasoning] = None
+ r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking."""
+
+ temperature: Optional[float] = None
+ r"""Sampling temperature forwarded to panelist and judge inner calls. When omitted, the provider's default applies."""
+
+ tools: Optional[List[FusionServerToolConfigTool]] = None
+ r"""Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only)."""
diff --git a/src/openrouter/components/generationcontentdata.py b/src/openrouter/components/generationcontentdata.py
new file mode 100644
index 0000000..065679a
--- /dev/null
+++ b/src/openrouter/components/generationcontentdata.py
@@ -0,0 +1,101 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Any, List, Union
+from typing_extensions import TypeAliasType, TypedDict
+
+
+class Input2TypedDict(TypedDict):
+ messages: List[Nullable[Any]]
+
+
+class Input2(BaseModel):
+ messages: List[Nullable[Any]]
+
+
+class Input1TypedDict(TypedDict):
+ prompt: str
+
+
+class Input1(BaseModel):
+ prompt: str
+
+
+InputUnionTypedDict = TypeAliasType(
+ "InputUnionTypedDict", Union[Input1TypedDict, Input2TypedDict]
+)
+r"""The input to the generation — either a prompt string or an array of messages"""
+
+
+InputUnion = TypeAliasType("InputUnion", Union[Input1, Input2])
+r"""The input to the generation — either a prompt string or an array of messages"""
+
+
+class GenerationContentDataOutputTypedDict(TypedDict):
+ r"""The output from the generation"""
+
+ completion: Nullable[str]
+ r"""The completion output"""
+ reasoning: Nullable[str]
+ r"""Reasoning/thinking output, if any"""
+
+
+class GenerationContentDataOutput(BaseModel):
+ r"""The output from the generation"""
+
+ completion: Nullable[str]
+ r"""The completion output"""
+
+ reasoning: Nullable[str]
+ r"""Reasoning/thinking output, if any"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["completion", "reasoning"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class GenerationContentDataTypedDict(TypedDict):
+ r"""Stored prompt and completion content"""
+
+ input: InputUnionTypedDict
+ r"""The input to the generation — either a prompt string or an array of messages"""
+ output: GenerationContentDataOutputTypedDict
+ r"""The output from the generation"""
+
+
+class GenerationContentData(BaseModel):
+ r"""Stored prompt and completion content"""
+
+ input: InputUnion
+ r"""The input to the generation — either a prompt string or an array of messages"""
+
+ output: GenerationContentDataOutput
+ r"""The output from the generation"""
diff --git a/src/openrouter/components/generationcontentresponse.py b/src/openrouter/components/generationcontentresponse.py
new file mode 100644
index 0000000..b762f65
--- /dev/null
+++ b/src/openrouter/components/generationcontentresponse.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .generationcontentdata import GenerationContentData, GenerationContentDataTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class GenerationContentResponseTypedDict(TypedDict):
+ r"""Stored prompt and completion content for a generation"""
+
+ data: GenerationContentDataTypedDict
+ r"""Stored prompt and completion content"""
+
+
+class GenerationContentResponse(BaseModel):
+ r"""Stored prompt and completion content for a generation"""
+
+ data: GenerationContentData
+ r"""Stored prompt and completion content"""
diff --git a/src/openrouter/components/generationresponse.py b/src/openrouter/components/generationresponse.py
new file mode 100644
index 0000000..5c2e03b
--- /dev/null
+++ b/src/openrouter/components/generationresponse.py
@@ -0,0 +1,352 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .providerresponse import ProviderResponse, ProviderResponseTypedDict
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+APIType = Union[
+ Literal[
+ "completions",
+ "embeddings",
+ "rerank",
+ "tts",
+ "stt",
+ "video",
+ "image",
+ ],
+ UnrecognizedStr,
+]
+r"""Type of API used for the generation"""
+
+
+DataRegion = Union[
+ Literal[
+ "global",
+ "europe",
+ ],
+ UnrecognizedStr,
+]
+r"""The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise."""
+
+
+class GenerationResponseDataTypedDict(TypedDict):
+ r"""Generation data"""
+
+ api_type: Nullable[APIType]
+ r"""Type of API used for the generation"""
+ app_id: Nullable[int]
+ r"""ID of the app that made the request"""
+ cache_discount: Nullable[float]
+ r"""Discount applied due to caching"""
+ cancelled: Nullable[bool]
+ r"""Whether the generation was cancelled"""
+ created_at: str
+ r"""ISO 8601 timestamp of when the generation was created"""
+ data_region: DataRegion
+ r"""The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise."""
+ external_user: Nullable[str]
+ r"""External user identifier"""
+ finish_reason: Nullable[str]
+ r"""Reason the generation finished"""
+ generation_time: Nullable[float]
+ r"""Time taken for generation in milliseconds"""
+ http_referer: Nullable[str]
+ r"""Referer header from the request"""
+ id: str
+ r"""Unique identifier for the generation"""
+ is_byok: bool
+ r"""Whether this used bring-your-own-key"""
+ latency: Nullable[float]
+ r"""Total latency in milliseconds"""
+ model: str
+ r"""Model used for the generation"""
+ moderation_latency: Nullable[float]
+ r"""Moderation latency in milliseconds"""
+ native_finish_reason: Nullable[str]
+ r"""Native finish reason as reported by provider"""
+ native_tokens_cached: Nullable[int]
+ r"""Native cached tokens as reported by provider"""
+ native_tokens_completion: Nullable[int]
+ r"""Native completion tokens as reported by provider"""
+ native_tokens_completion_images: Nullable[int]
+ r"""Native completion image tokens as reported by provider"""
+ native_tokens_prompt: Nullable[int]
+ r"""Native prompt tokens as reported by provider"""
+ native_tokens_reasoning: Nullable[int]
+ r"""Native reasoning tokens as reported by provider"""
+ num_fetches: Nullable[int]
+ r"""Number of web fetches performed"""
+ num_input_audio_prompt: Nullable[int]
+ r"""Number of audio inputs in the prompt"""
+ num_media_completion: Nullable[int]
+ r"""Number of media items in the completion"""
+ num_media_prompt: Nullable[int]
+ r"""Number of media items in the prompt"""
+ num_search_results: Nullable[int]
+ r"""Number of search results included"""
+ origin: str
+ r"""Origin URL of the request"""
+ preset_id: Nullable[str]
+ r"""ID of the preset used for this generation, null if no preset was used"""
+ provider_name: Nullable[str]
+ r"""Name of the provider that served the request"""
+ provider_responses: Nullable[List[ProviderResponseTypedDict]]
+ r"""List of provider responses for this generation, including fallback attempts"""
+ router: Nullable[str]
+ r"""Router used for the request (e.g., openrouter/auto)"""
+ service_tier: Nullable[str]
+ r"""Service tier the upstream provider reported running this request on, or null if it did not report one."""
+ streamed: Nullable[bool]
+ r"""Whether the response was streamed"""
+ tokens_completion: Nullable[int]
+ r"""Number of tokens in the completion"""
+ tokens_prompt: Nullable[int]
+ r"""Number of tokens in the prompt"""
+ total_cost: float
+ r"""Total cost of the generation in USD"""
+ upstream_id: Nullable[str]
+ r"""Upstream provider's identifier for this generation"""
+ upstream_inference_cost: Nullable[float]
+ r"""Cost charged by the upstream provider"""
+ usage: float
+ r"""Usage amount in USD"""
+ user_agent: Nullable[str]
+ r"""User-Agent header from the request"""
+ web_search_engine: Nullable[str]
+ r"""The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)"""
+ request_id: NotRequired[Nullable[str]]
+ r"""Unique identifier grouping all generations from a single API request"""
+ response_cache_source_id: NotRequired[Nullable[str]]
+ r"""If this generation was served from response cache, contains the original generation ID. Null otherwise."""
+ session_id: NotRequired[Nullable[str]]
+ r"""Session identifier grouping multiple generations in the same session"""
+
+
+class GenerationResponseData(BaseModel):
+ r"""Generation data"""
+
+ api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))]
+ r"""Type of API used for the generation"""
+
+ app_id: Nullable[int]
+ r"""ID of the app that made the request"""
+
+ cache_discount: Nullable[float]
+ r"""Discount applied due to caching"""
+
+ cancelled: Nullable[bool]
+ r"""Whether the generation was cancelled"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the generation was created"""
+
+ data_region: Annotated[DataRegion, PlainValidator(validate_open_enum(False))]
+ r"""The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise."""
+
+ external_user: Nullable[str]
+ r"""External user identifier"""
+
+ finish_reason: Nullable[str]
+ r"""Reason the generation finished"""
+
+ generation_time: Nullable[float]
+ r"""Time taken for generation in milliseconds"""
+
+ http_referer: Nullable[str]
+ r"""Referer header from the request"""
+
+ id: str
+ r"""Unique identifier for the generation"""
+
+ is_byok: bool
+ r"""Whether this used bring-your-own-key"""
+
+ latency: Nullable[float]
+ r"""Total latency in milliseconds"""
+
+ model: str
+ r"""Model used for the generation"""
+
+ moderation_latency: Nullable[float]
+ r"""Moderation latency in milliseconds"""
+
+ native_finish_reason: Nullable[str]
+ r"""Native finish reason as reported by provider"""
+
+ native_tokens_cached: Nullable[int]
+ r"""Native cached tokens as reported by provider"""
+
+ native_tokens_completion: Nullable[int]
+ r"""Native completion tokens as reported by provider"""
+
+ native_tokens_completion_images: Nullable[int]
+ r"""Native completion image tokens as reported by provider"""
+
+ native_tokens_prompt: Nullable[int]
+ r"""Native prompt tokens as reported by provider"""
+
+ native_tokens_reasoning: Nullable[int]
+ r"""Native reasoning tokens as reported by provider"""
+
+ num_fetches: Nullable[int]
+ r"""Number of web fetches performed"""
+
+ num_input_audio_prompt: Nullable[int]
+ r"""Number of audio inputs in the prompt"""
+
+ num_media_completion: Nullable[int]
+ r"""Number of media items in the completion"""
+
+ num_media_prompt: Nullable[int]
+ r"""Number of media items in the prompt"""
+
+ num_search_results: Nullable[int]
+ r"""Number of search results included"""
+
+ origin: str
+ r"""Origin URL of the request"""
+
+ preset_id: Nullable[str]
+ r"""ID of the preset used for this generation, null if no preset was used"""
+
+ provider_name: Nullable[str]
+ r"""Name of the provider that served the request"""
+
+ provider_responses: Nullable[List[ProviderResponse]]
+ r"""List of provider responses for this generation, including fallback attempts"""
+
+ router: Nullable[str]
+ r"""Router used for the request (e.g., openrouter/auto)"""
+
+ service_tier: Nullable[str]
+ r"""Service tier the upstream provider reported running this request on, or null if it did not report one."""
+
+ streamed: Nullable[bool]
+ r"""Whether the response was streamed"""
+
+ tokens_completion: Nullable[int]
+ r"""Number of tokens in the completion"""
+
+ tokens_prompt: Nullable[int]
+ r"""Number of tokens in the prompt"""
+
+ total_cost: float
+ r"""Total cost of the generation in USD"""
+
+ upstream_id: Nullable[str]
+ r"""Upstream provider's identifier for this generation"""
+
+ upstream_inference_cost: Nullable[float]
+ r"""Cost charged by the upstream provider"""
+
+ usage: float
+ r"""Usage amount in USD"""
+
+ user_agent: Nullable[str]
+ r"""User-Agent header from the request"""
+
+ web_search_engine: Nullable[str]
+ r"""The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)"""
+
+ request_id: OptionalNullable[str] = UNSET
+ r"""Unique identifier grouping all generations from a single API request"""
+
+ response_cache_source_id: OptionalNullable[str] = UNSET
+ r"""If this generation was served from response cache, contains the original generation ID. Null otherwise."""
+
+ session_id: OptionalNullable[str] = UNSET
+ r"""Session identifier grouping multiple generations in the same session"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["request_id", "response_cache_source_id", "session_id"]
+ nullable_fields = [
+ "api_type",
+ "app_id",
+ "cache_discount",
+ "cancelled",
+ "external_user",
+ "finish_reason",
+ "generation_time",
+ "http_referer",
+ "latency",
+ "moderation_latency",
+ "native_finish_reason",
+ "native_tokens_cached",
+ "native_tokens_completion",
+ "native_tokens_completion_images",
+ "native_tokens_prompt",
+ "native_tokens_reasoning",
+ "num_fetches",
+ "num_input_audio_prompt",
+ "num_media_completion",
+ "num_media_prompt",
+ "num_search_results",
+ "preset_id",
+ "provider_name",
+ "provider_responses",
+ "request_id",
+ "response_cache_source_id",
+ "router",
+ "service_tier",
+ "session_id",
+ "streamed",
+ "tokens_completion",
+ "tokens_prompt",
+ "upstream_id",
+ "upstream_inference_cost",
+ "user_agent",
+ "web_search_engine",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class GenerationResponseTypedDict(TypedDict):
+ r"""Generation response"""
+
+ data: GenerationResponseDataTypedDict
+ r"""Generation data"""
+
+
+class GenerationResponse(BaseModel):
+ r"""Generation response"""
+
+ data: GenerationResponseData
+ r"""Generation data"""
diff --git a/src/openrouter/components/getbyokkeyresponse.py b/src/openrouter/components/getbyokkeyresponse.py
new file mode 100644
index 0000000..a9f5994
--- /dev/null
+++ b/src/openrouter/components/getbyokkeyresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .byokkey import BYOKKey, BYOKKeyTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class GetBYOKKeyResponseTypedDict(TypedDict):
+ data: BYOKKeyTypedDict
+
+
+class GetBYOKKeyResponse(BaseModel):
+ data: BYOKKey
diff --git a/src/openrouter/components/getobservabilitydestinationresponse.py b/src/openrouter/components/getobservabilitydestinationresponse.py
new file mode 100644
index 0000000..8cab91d
--- /dev/null
+++ b/src/openrouter/components/getobservabilitydestinationresponse.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilitydestination import (
+ ObservabilityDestination,
+ ObservabilityDestinationTypedDict,
+)
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class GetObservabilityDestinationResponseTypedDict(TypedDict):
+ data: ObservabilityDestinationTypedDict
+
+
+class GetObservabilityDestinationResponse(BaseModel):
+ data: ObservabilityDestination
diff --git a/src/openrouter/components/getpresetresponse.py b/src/openrouter/components/getpresetresponse.py
new file mode 100644
index 0000000..3c24129
--- /dev/null
+++ b/src/openrouter/components/getpresetresponse.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .presetwithdesignatedversion import (
+ PresetWithDesignatedVersion,
+ PresetWithDesignatedVersionTypedDict,
+)
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class GetPresetResponseTypedDict(TypedDict):
+ r"""A preset with its currently designated version."""
+
+ data: PresetWithDesignatedVersionTypedDict
+ r"""A preset with its currently designated version."""
+
+
+class GetPresetResponse(BaseModel):
+ r"""A preset with its currently designated version."""
+
+ data: PresetWithDesignatedVersion
+ r"""A preset with its currently designated version."""
diff --git a/src/openrouter/components/getpresetversionresponse.py b/src/openrouter/components/getpresetversionresponse.py
new file mode 100644
index 0000000..c7fbebc
--- /dev/null
+++ b/src/openrouter/components/getpresetversionresponse.py
@@ -0,0 +1,54 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .presetdesignatedversion import (
+ PresetDesignatedVersion,
+ PresetDesignatedVersionTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing_extensions import TypedDict
+
+
+class GetPresetVersionResponseTypedDict(TypedDict):
+ r"""A single version of a preset."""
+
+ data: Nullable[PresetDesignatedVersionTypedDict]
+ r"""A specific version of a preset, containing config and optional system prompt."""
+
+
+class GetPresetVersionResponse(BaseModel):
+ r"""A single version of a preset."""
+
+ data: Nullable[PresetDesignatedVersion]
+ r"""A specific version of a preset, containing config and optional system prompt."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["data"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/getworkspaceresponse.py b/src/openrouter/components/getworkspaceresponse.py
new file mode 100644
index 0000000..acda534
--- /dev/null
+++ b/src/openrouter/components/getworkspaceresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .workspace import Workspace, WorkspaceTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class GetWorkspaceResponseTypedDict(TypedDict):
+ data: WorkspaceTypedDict
+
+
+class GetWorkspaceResponse(BaseModel):
+ data: Workspace
diff --git a/src/openrouter/components/guardrail.py b/src/openrouter/components/guardrail.py
index afc25c7..ec0d139 100644
--- a/src/openrouter/components/guardrail.py
+++ b/src/openrouter/components/guardrail.py
@@ -1,6 +1,11 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .contentfilterbuiltinentry import (
+ ContentFilterBuiltinEntry,
+ ContentFilterBuiltinEntryTypedDict,
+)
+from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .guardrailinterval import GuardrailInterval
from openrouter.types import (
BaseModel,
@@ -10,6 +15,7 @@ from openrouter.types import (
UNSET_SENTINEL,
)
from openrouter.utils import validate_open_enum
+import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List
@@ -23,14 +29,30 @@ class GuardrailTypedDict(TypedDict):
r"""Unique identifier for the guardrail"""
name: str
r"""Name of the guardrail"""
+ workspace_id: str
+ r"""The workspace ID this guardrail belongs to."""
allowed_models: NotRequired[Nullable[List[str]]]
r"""Array of model canonical_slugs (immutable identifiers)"""
allowed_providers: NotRequired[Nullable[List[str]]]
r"""List of allowed provider IDs"""
+ content_filter_builtins: NotRequired[
+ Nullable[List[ContentFilterBuiltinEntryTypedDict]]
+ ]
+ r"""Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector."""
+ content_filters: NotRequired[Nullable[List[ContentFilterEntryTypedDict]]]
+ r"""Custom regex content filters applied to request messages"""
description: NotRequired[Nullable[str]]
r"""Description of the guardrail"""
enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ enforce_zdr_anthropic: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_google: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_openai: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_other: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
ignored_models: NotRequired[Nullable[List[str]]]
r"""Array of model canonical_slugs to exclude from routing"""
ignored_providers: NotRequired[Nullable[List[str]]]
@@ -53,17 +75,43 @@ class Guardrail(BaseModel):
name: str
r"""Name of the guardrail"""
+ workspace_id: str
+ r"""The workspace ID this guardrail belongs to."""
+
allowed_models: OptionalNullable[List[str]] = UNSET
r"""Array of model canonical_slugs (immutable identifiers)"""
allowed_providers: OptionalNullable[List[str]] = UNSET
r"""List of allowed provider IDs"""
+ content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntry]] = UNSET
+ r"""Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector."""
+
+ content_filters: OptionalNullable[List[ContentFilterEntry]] = UNSET
+ r"""Custom regex content filters applied to request messages"""
+
description: OptionalNullable[str] = UNSET
r"""Description of the guardrail"""
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
+ enforce_zdr: Annotated[
+ OptionalNullable[bool],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
+ ),
+ ] = UNSET
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_google: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_other: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
ignored_models: OptionalNullable[List[str]] = UNSET
r"""Array of model canonical_slugs to exclude from routing"""
@@ -87,8 +135,14 @@ class Guardrail(BaseModel):
optional_fields = [
"allowed_models",
"allowed_providers",
+ "content_filter_builtins",
+ "content_filters",
"description",
"enforce_zdr",
+ "enforce_zdr_anthropic",
+ "enforce_zdr_google",
+ "enforce_zdr_openai",
+ "enforce_zdr_other",
"ignored_models",
"ignored_providers",
"limit_usd",
@@ -98,8 +152,14 @@ class Guardrail(BaseModel):
nullable_fields = [
"allowed_models",
"allowed_providers",
+ "content_filter_builtins",
+ "content_filters",
"description",
"enforce_zdr",
+ "enforce_zdr_anthropic",
+ "enforce_zdr_google",
+ "enforce_zdr_openai",
+ "enforce_zdr_other",
"ignored_models",
"ignored_providers",
"limit_usd",
diff --git a/src/openrouter/components/imagegenerationservertoolconfig.py b/src/openrouter/components/imagegenerationservertoolconfig.py
index 7b7010a..0fdc8f6 100644
--- a/src/openrouter/components/imagegenerationservertoolconfig.py
+++ b/src/openrouter/components/imagegenerationservertoolconfig.py
@@ -13,7 +13,7 @@ class ImageGenerationServerToolConfigTypedDict(TypedDict):
r"""Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field."""
model: NotRequired[str]
- r"""Which image generation model to use (e.g. \"openai/gpt-image-1\"). Defaults to \"openai/gpt-image-1\"."""
+ r"""Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\"."""
class ImageGenerationServerToolConfig(BaseModel):
@@ -27,7 +27,7 @@ class ImageGenerationServerToolConfig(BaseModel):
)
model: Optional[str] = None
- r"""Which image generation model to use (e.g. \"openai/gpt-image-1\"). Defaults to \"openai/gpt-image-1\"."""
+ r"""Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\"."""
@property
def additional_properties(self):
diff --git a/src/openrouter/components/inputimage.py b/src/openrouter/components/inputimage.py
index 279f76b..c249efe 100644
--- a/src/openrouter/components/inputimage.py
+++ b/src/openrouter/components/inputimage.py
@@ -21,6 +21,7 @@ InputImageDetail = Union[
"auto",
"high",
"low",
+ "original",
],
UnrecognizedStr,
]
diff --git a/src/openrouter/components/inputmessageitem.py b/src/openrouter/components/inputmessageitem.py
index 9ee8aab..0a812fc 100644
--- a/src/openrouter/components/inputmessageitem.py
+++ b/src/openrouter/components/inputmessageitem.py
@@ -25,19 +25,20 @@ InputMessageItemDetail = Union[
"auto",
"high",
"low",
+ "original",
],
UnrecognizedStr,
]
-InputMessageItemContentType = Literal["input_image",]
+InputMessageItemTypeInputImage = Literal["input_image",]
class InputMessageItemContentInputImageTypedDict(TypedDict):
r"""Image input content item"""
detail: InputMessageItemDetail
- type: InputMessageItemContentType
+ type: InputMessageItemTypeInputImage
image_url: NotRequired[Nullable[str]]
@@ -46,7 +47,7 @@ class InputMessageItemContentInputImage(BaseModel):
detail: Annotated[InputMessageItemDetail, PlainValidator(validate_open_enum(False))]
- type: InputMessageItemContentType
+ type: InputMessageItemTypeInputImage
image_url: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/components/inputreference.py b/src/openrouter/components/inputreference.py
new file mode 100644
index 0000000..a3d84a9
--- /dev/null
+++ b/src/openrouter/components/inputreference.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contentpartaudio import ContentPartAudio, ContentPartAudioTypedDict
+from .contentpartimage import ContentPartImage, ContentPartImageTypedDict
+from .contentpartvideo import ContentPartVideo, ContentPartVideoTypedDict
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
+
+
+InputReferenceTypedDict = TypeAliasType(
+ "InputReferenceTypedDict",
+ Union[
+ ContentPartImageTypedDict, ContentPartAudioTypedDict, ContentPartVideoTypedDict
+ ],
+)
+r"""A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0)."""
+
+
+InputReference = Annotated[
+ Union[
+ Annotated[ContentPartAudio, Tag("audio_url")],
+ Annotated[ContentPartImage, Tag("image_url")],
+ Annotated[ContentPartVideo, Tag("video_url")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+r"""A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0)."""
diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py
index 723f035..b409898 100644
--- a/src/openrouter/components/inputs_union.py
+++ b/src/openrouter/components/inputs_union.py
@@ -1,6 +1,17 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .applypatchcallitem import ApplyPatchCallItem, ApplyPatchCallItemTypedDict
+from .applypatchcalloutputitem import (
+ ApplyPatchCallOutputItem,
+ ApplyPatchCallOutputItemTypedDict,
+)
+from .compactionitem import CompactionItem, CompactionItemTypedDict
+from .customtoolcallitem import CustomToolCallItem, CustomToolCallItemTypedDict
+from .customtoolcalloutputitem import (
+ CustomToolCallOutputItem,
+ CustomToolCallOutputItemTypedDict,
+)
from .easyinputmessage import EasyInputMessage, EasyInputMessageTypedDict
from .functioncallitem import FunctionCallItem, FunctionCallItemTypedDict
from .functioncalloutputitem import (
@@ -8,15 +19,67 @@ from .functioncalloutputitem import (
FunctionCallOutputItemTypedDict,
)
from .inputmessageitem import InputMessageItem, InputMessageItemTypedDict
+from .itemreferenceitem import ItemReferenceItem, ItemReferenceItemTypedDict
+from .localshellcallitem import LocalShellCallItem, LocalShellCallItemTypedDict
+from .localshellcalloutputitem import (
+ LocalShellCallOutputItem,
+ LocalShellCallOutputItemTypedDict,
+)
+from .mcpapprovalrequestitem import (
+ McpApprovalRequestItem,
+ McpApprovalRequestItemTypedDict,
+)
+from .mcpapprovalresponseitem import (
+ McpApprovalResponseItem,
+ McpApprovalResponseItemTypedDict,
+)
+from .mcpcallitem import McpCallItem, McpCallItemTypedDict
+from .mcplisttoolsitem import McpListToolsItem, McpListToolsItemTypedDict
from .openairesponsesrefusalcontent import (
OpenAIResponsesRefusalContent,
OpenAIResponsesRefusalContentTypedDict,
)
+from .outputadvisorservertoolitem import (
+ OutputAdvisorServerToolItem,
+ OutputAdvisorServerToolItemTypedDict,
+)
+from .outputapplypatchservertoolitem import (
+ OutputApplyPatchServerToolItem,
+ OutputApplyPatchServerToolItemTypedDict,
+)
+from .outputbashservertoolitem import (
+ OutputBashServerToolItem,
+ OutputBashServerToolItemTypedDict,
+)
+from .outputbrowseruseservertoolitem import (
+ OutputBrowserUseServerToolItem,
+ OutputBrowserUseServerToolItemTypedDict,
+)
+from .outputcodeinterpretercallitem import (
+ OutputCodeInterpreterCallItem,
+ OutputCodeInterpreterCallItemTypedDict,
+)
+from .outputcodeinterpreterservertoolitem import (
+ OutputCodeInterpreterServerToolItem,
+ OutputCodeInterpreterServerToolItemTypedDict,
+)
+from .outputcomputercallitem import (
+ OutputComputerCallItem,
+ OutputComputerCallItemTypedDict,
+)
+from .outputcustomtoolcallitem import (
+ OutputCustomToolCallItem,
+ OutputCustomToolCallItemTypedDict,
+)
from .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict
from .outputfilesearchcallitem import (
OutputFileSearchCallItem,
OutputFileSearchCallItemTypedDict,
)
+from .outputfilesearchservertoolitem import (
+ OutputFileSearchServerToolItem,
+ OutputFileSearchServerToolItemTypedDict,
+)
from .outputfunctioncallitem import (
OutputFunctionCallItem,
OutputFunctionCallItemTypedDict,
@@ -25,6 +88,34 @@ from .outputimagegenerationcallitem import (
OutputImageGenerationCallItem,
OutputImageGenerationCallItemTypedDict,
)
+from .outputimagegenerationservertoolitem import (
+ OutputImageGenerationServerToolItem,
+ OutputImageGenerationServerToolItemTypedDict,
+)
+from .outputmcpservertoolitem import (
+ OutputMcpServerToolItem,
+ OutputMcpServerToolItemTypedDict,
+)
+from .outputmemoryservertoolitem import (
+ OutputMemoryServerToolItem,
+ OutputMemoryServerToolItemTypedDict,
+)
+from .outputsearchmodelsservertoolitem import (
+ OutputSearchModelsServerToolItem,
+ OutputSearchModelsServerToolItemTypedDict,
+)
+from .outputtexteditorservertoolitem import (
+ OutputTextEditorServerToolItem,
+ OutputTextEditorServerToolItemTypedDict,
+)
+from .outputtoolsearchservertoolitem import (
+ OutputToolSearchServerToolItem,
+ OutputToolSearchServerToolItemTypedDict,
+)
+from .outputwebfetchservertoolitem import (
+ OutputWebFetchServerToolItem,
+ OutputWebFetchServerToolItemTypedDict,
+)
from .outputwebsearchcallitem import (
OutputWebSearchCallItem,
OutputWebSearchCallItemTypedDict,
@@ -38,6 +129,8 @@ from .reasoningitem import ReasoningItem, ReasoningItemTypedDict
from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict
from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict
from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict
+from .shellcallitem import ShellCallItem, ShellCallItemTypedDict
+from .shellcalloutputitem import ShellCallOutputItem, ShellCallOutputItemTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -290,19 +383,49 @@ class InputsMessage(BaseModel):
InputsUnion1TypedDict = TypeAliasType(
"InputsUnion1TypedDict",
Union[
- OutputWebSearchServerToolItemTypedDict,
- OutputWebSearchCallItemTypedDict,
+ ItemReferenceItemTypedDict,
+ CompactionItemTypedDict,
+ OutputFileSearchCallItemTypedDict,
EasyInputMessageTypedDict,
InputMessageItemTypedDict,
+ LocalShellCallOutputItemTypedDict,
+ OutputToolSearchServerToolItemTypedDict,
+ OutputFileSearchServerToolItemTypedDict,
+ OutputWebSearchServerToolItemTypedDict,
+ CustomToolCallOutputItemTypedDict,
OutputImageGenerationCallItemTypedDict,
- OutputFileSearchCallItemTypedDict,
- FunctionCallOutputItemTypedDict,
+ OutputWebSearchCallItemTypedDict,
OutputDatetimeItemTypedDict,
- FunctionCallItemTypedDict,
- OutputFunctionCallItemTypedDict,
+ OutputMcpServerToolItemTypedDict,
+ FunctionCallOutputItemTypedDict,
+ LocalShellCallItemTypedDict,
+ OutputSearchModelsServerToolItemTypedDict,
+ ApplyPatchCallItemTypedDict,
+ McpListToolsItemTypedDict,
+ ApplyPatchCallOutputItemTypedDict,
+ McpApprovalResponseItemTypedDict,
+ OutputBrowserUseServerToolItemTypedDict,
+ McpApprovalRequestItemTypedDict,
+ OutputTextEditorServerToolItemTypedDict,
+ OutputApplyPatchServerToolItemTypedDict,
+ CustomToolCallItemTypedDict,
InputsMessageTypedDict,
- InputsReasoningTypedDict,
+ OutputMemoryServerToolItemTypedDict,
+ OutputCustomToolCallItemTypedDict,
+ ShellCallItemTypedDict,
+ ShellCallOutputItemTypedDict,
+ OutputComputerCallItemTypedDict,
+ OutputCodeInterpreterCallItemTypedDict,
+ OutputImageGenerationServerToolItemTypedDict,
+ OutputBashServerToolItemTypedDict,
+ McpCallItemTypedDict,
+ OutputFunctionCallItemTypedDict,
+ FunctionCallItemTypedDict,
+ OutputAdvisorServerToolItemTypedDict,
+ OutputWebFetchServerToolItemTypedDict,
ReasoningItemTypedDict,
+ OutputCodeInterpreterServerToolItemTypedDict,
+ InputsReasoningTypedDict,
],
)
@@ -310,19 +433,49 @@ InputsUnion1TypedDict = TypeAliasType(
InputsUnion1 = TypeAliasType(
"InputsUnion1",
Union[
- OutputWebSearchServerToolItem,
- OutputWebSearchCallItem,
+ ItemReferenceItem,
+ CompactionItem,
+ OutputFileSearchCallItem,
EasyInputMessage,
InputMessageItem,
+ LocalShellCallOutputItem,
+ OutputToolSearchServerToolItem,
+ OutputFileSearchServerToolItem,
+ OutputWebSearchServerToolItem,
+ CustomToolCallOutputItem,
OutputImageGenerationCallItem,
- OutputFileSearchCallItem,
- FunctionCallOutputItem,
+ OutputWebSearchCallItem,
OutputDatetimeItem,
- FunctionCallItem,
- OutputFunctionCallItem,
+ OutputMcpServerToolItem,
+ FunctionCallOutputItem,
+ LocalShellCallItem,
+ OutputSearchModelsServerToolItem,
+ ApplyPatchCallItem,
+ McpListToolsItem,
+ ApplyPatchCallOutputItem,
+ McpApprovalResponseItem,
+ OutputBrowserUseServerToolItem,
+ McpApprovalRequestItem,
+ OutputTextEditorServerToolItem,
+ OutputApplyPatchServerToolItem,
+ CustomToolCallItem,
InputsMessage,
- InputsReasoning,
+ OutputMemoryServerToolItem,
+ OutputCustomToolCallItem,
+ ShellCallItem,
+ ShellCallOutputItem,
+ OutputComputerCallItem,
+ OutputCodeInterpreterCallItem,
+ OutputImageGenerationServerToolItem,
+ OutputBashServerToolItem,
+ McpCallItem,
+ OutputFunctionCallItem,
+ FunctionCallItem,
+ OutputAdvisorServerToolItem,
+ OutputWebFetchServerToolItem,
ReasoningItem,
+ OutputCodeInterpreterServerToolItem,
+ InputsReasoning,
],
)
diff --git a/src/openrouter/components/itemreferenceitem.py b/src/openrouter/components/itemreferenceitem.py
new file mode 100644
index 0000000..b5a0bc1
--- /dev/null
+++ b/src/openrouter/components/itemreferenceitem.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ItemReferenceItemType = Literal["item_reference",]
+
+
+class ItemReferenceItemTypedDict(TypedDict):
+ r"""A reference to a previous response item by ID"""
+
+ id: str
+ type: ItemReferenceItemType
+
+
+class ItemReferenceItem(BaseModel):
+ r"""A reference to a previous response item by ID"""
+
+ id: str
+
+ type: ItemReferenceItemType
diff --git a/src/openrouter/components/listbyokkeysresponse.py b/src/openrouter/components/listbyokkeysresponse.py
new file mode 100644
index 0000000..3cbde84
--- /dev/null
+++ b/src/openrouter/components/listbyokkeysresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .byokkey import BYOKKey, BYOKKeyTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListBYOKKeysResponseTypedDict(TypedDict):
+ data: List[BYOKKeyTypedDict]
+ r"""List of BYOK credentials."""
+ total_count: int
+ r"""Total number of BYOK credentials matching the filters."""
+
+
+class ListBYOKKeysResponse(BaseModel):
+ data: List[BYOKKey]
+ r"""List of BYOK credentials."""
+
+ total_count: int
+ r"""Total number of BYOK credentials matching the filters."""
diff --git a/src/openrouter/components/listobservabilitydestinationsresponse.py b/src/openrouter/components/listobservabilitydestinationsresponse.py
new file mode 100644
index 0000000..181236d
--- /dev/null
+++ b/src/openrouter/components/listobservabilitydestinationsresponse.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilitydestination import (
+ ObservabilityDestination,
+ ObservabilityDestinationTypedDict,
+)
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListObservabilityDestinationsResponseTypedDict(TypedDict):
+ data: List[ObservabilityDestinationTypedDict]
+ r"""List of observability destinations."""
+ total_count: int
+ r"""Total number of destinations matching the filters."""
+
+
+class ListObservabilityDestinationsResponse(BaseModel):
+ data: List[ObservabilityDestination]
+ r"""List of observability destinations."""
+
+ total_count: int
+ r"""Total number of destinations matching the filters."""
diff --git a/src/openrouter/components/listpresetsresponse.py b/src/openrouter/components/listpresetsresponse.py
new file mode 100644
index 0000000..0b63915
--- /dev/null
+++ b/src/openrouter/components/listpresetsresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .preset import Preset, PresetTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListPresetsResponseTypedDict(TypedDict):
+ r"""A paginated list of presets."""
+
+ data: List[PresetTypedDict]
+ total_count: int
+
+
+class ListPresetsResponse(BaseModel):
+ r"""A paginated list of presets."""
+
+ data: List[Preset]
+
+ total_count: int
diff --git a/src/openrouter/components/listpresetversionsresponse.py b/src/openrouter/components/listpresetversionsresponse.py
new file mode 100644
index 0000000..d75ab3b
--- /dev/null
+++ b/src/openrouter/components/listpresetversionsresponse.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .presetdesignatedversion import (
+ PresetDesignatedVersion,
+ PresetDesignatedVersionTypedDict,
+)
+from openrouter.types import BaseModel, Nullable
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListPresetVersionsResponseTypedDict(TypedDict):
+ r"""A paginated list of preset versions."""
+
+ data: List[Nullable[PresetDesignatedVersionTypedDict]]
+ total_count: int
+
+
+class ListPresetVersionsResponse(BaseModel):
+ r"""A paginated list of preset versions."""
+
+ data: List[Nullable[PresetDesignatedVersion]]
+
+ total_count: int
diff --git a/src/openrouter/components/listworkspacesresponse.py b/src/openrouter/components/listworkspacesresponse.py
new file mode 100644
index 0000000..b70d4bb
--- /dev/null
+++ b/src/openrouter/components/listworkspacesresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .workspace import Workspace, WorkspaceTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListWorkspacesResponseTypedDict(TypedDict):
+ data: List[WorkspaceTypedDict]
+ r"""List of workspaces"""
+ total_count: int
+ r"""Total number of workspaces"""
+
+
+class ListWorkspacesResponse(BaseModel):
+ data: List[Workspace]
+ r"""List of workspaces"""
+
+ total_count: int
+ r"""Total number of workspaces"""
diff --git a/src/openrouter/components/localshellcallitem.py b/src/openrouter/components/localshellcallitem.py
new file mode 100644
index 0000000..00560d6
--- /dev/null
+++ b/src/openrouter/components/localshellcallitem.py
@@ -0,0 +1,99 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Dict, List, Literal
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+TypeExec = Literal["exec",]
+
+
+class LocalShellCallItemActionTypedDict(TypedDict):
+ command: List[str]
+ env: Dict[str, str]
+ type: TypeExec
+ timeout_ms: NotRequired[Nullable[int]]
+ user: NotRequired[Nullable[str]]
+ working_directory: NotRequired[Nullable[str]]
+
+
+class LocalShellCallItemAction(BaseModel):
+ command: List[str]
+
+ env: Dict[str, str]
+
+ type: TypeExec
+
+ timeout_ms: OptionalNullable[int] = UNSET
+
+ user: OptionalNullable[str] = UNSET
+
+ working_directory: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["timeout_ms", "user", "working_directory"]
+ nullable_fields = ["timeout_ms", "user", "working_directory"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+TypeLocalShellCall = Literal["local_shell_call",]
+
+
+class LocalShellCallItemTypedDict(TypedDict):
+ r"""A local shell command execution call"""
+
+ action: LocalShellCallItemActionTypedDict
+ call_id: str
+ id: str
+ status: ToolCallStatus
+ type: TypeLocalShellCall
+
+
+class LocalShellCallItem(BaseModel):
+ r"""A local shell command execution call"""
+
+ action: LocalShellCallItemAction
+
+ call_id: str
+
+ id: str
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: TypeLocalShellCall
diff --git a/src/openrouter/components/textconfig.py b/src/openrouter/components/localshellcalloutputitem.py
similarity index 60%
rename from src/openrouter/components/textconfig.py
rename to src/openrouter/components/localshellcalloutputitem.py
index cf8fa53..c1fc179 100644
--- a/src/openrouter/components/textconfig.py
+++ b/src/openrouter/components/localshellcalloutputitem.py
@@ -1,7 +1,6 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .formats import Formats, FormatsTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -11,45 +10,52 @@ from openrouter.types import (
UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
-import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
-from typing import Literal, Optional, Union
+from typing import Literal, Union
from typing_extensions import Annotated, NotRequired, TypedDict
-TextConfigVerbosity = Union[
+LocalShellCallOutputItemStatus = Union[
Literal[
- "high",
- "low",
- "medium",
+ "in_progress",
+ "completed",
+ "incomplete",
],
UnrecognizedStr,
]
-class TextConfigTypedDict(TypedDict):
- r"""Text output configuration including format and verbosity"""
-
- format_: NotRequired[FormatsTypedDict]
- r"""Text response format configuration"""
- verbosity: NotRequired[Nullable[TextConfigVerbosity]]
+LocalShellCallOutputItemType = Literal["local_shell_call_output",]
-class TextConfig(BaseModel):
- r"""Text output configuration including format and verbosity"""
+class LocalShellCallOutputItemTypedDict(TypedDict):
+ r"""Output from a local shell command execution"""
- format_: Annotated[Optional[Formats], pydantic.Field(alias="format")] = None
- r"""Text response format configuration"""
+ id: str
+ output: str
+ type: LocalShellCallOutputItemType
+ status: NotRequired[Nullable[LocalShellCallOutputItemStatus]]
- verbosity: Annotated[
- OptionalNullable[TextConfigVerbosity], PlainValidator(validate_open_enum(False))
+
+class LocalShellCallOutputItem(BaseModel):
+ r"""Output from a local shell command execution"""
+
+ id: str
+
+ output: str
+
+ type: LocalShellCallOutputItemType
+
+ status: Annotated[
+ OptionalNullable[LocalShellCallOutputItemStatus],
+ PlainValidator(validate_open_enum(False)),
] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["format", "verbosity"]
- nullable_fields = ["verbosity"]
+ optional_fields = ["status"]
+ nullable_fields = ["status"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/mcpapprovalrequestitem.py b/src/openrouter/components/mcpapprovalrequestitem.py
new file mode 100644
index 0000000..3c56ace
--- /dev/null
+++ b/src/openrouter/components/mcpapprovalrequestitem.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+McpApprovalRequestItemType = Literal["mcp_approval_request",]
+
+
+class McpApprovalRequestItemTypedDict(TypedDict):
+ r"""Request for approval to execute an MCP tool"""
+
+ arguments: str
+ id: str
+ name: str
+ server_label: str
+ type: McpApprovalRequestItemType
+
+
+class McpApprovalRequestItem(BaseModel):
+ r"""Request for approval to execute an MCP tool"""
+
+ arguments: str
+
+ id: str
+
+ name: str
+
+ server_label: str
+
+ type: McpApprovalRequestItemType
diff --git a/src/openrouter/components/mcpapprovalresponseitem.py b/src/openrouter/components/mcpapprovalresponseitem.py
new file mode 100644
index 0000000..3231df9
--- /dev/null
+++ b/src/openrouter/components/mcpapprovalresponseitem.py
@@ -0,0 +1,70 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import NotRequired, TypedDict
+
+
+McpApprovalResponseItemType = Literal["mcp_approval_response",]
+
+
+class McpApprovalResponseItemTypedDict(TypedDict):
+ r"""User response to an MCP tool approval request"""
+
+ approval_request_id: str
+ approve: bool
+ type: McpApprovalResponseItemType
+ id: NotRequired[Nullable[str]]
+ reason: NotRequired[Nullable[str]]
+
+
+class McpApprovalResponseItem(BaseModel):
+ r"""User response to an MCP tool approval request"""
+
+ approval_request_id: str
+
+ approve: bool
+
+ type: McpApprovalResponseItemType
+
+ id: OptionalNullable[str] = UNSET
+
+ reason: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id", "reason"]
+ nullable_fields = ["id", "reason"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/mcpcallitem.py b/src/openrouter/components/mcpcallitem.py
new file mode 100644
index 0000000..d593dd4
--- /dev/null
+++ b/src/openrouter/components/mcpcallitem.py
@@ -0,0 +1,76 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Literal
+from typing_extensions import NotRequired, TypedDict
+
+
+McpCallItemType = Literal["mcp_call",]
+
+
+class McpCallItemTypedDict(TypedDict):
+ r"""An MCP tool call with its output or error"""
+
+ arguments: str
+ id: str
+ name: str
+ server_label: str
+ type: McpCallItemType
+ error: NotRequired[Nullable[str]]
+ output: NotRequired[Nullable[str]]
+
+
+class McpCallItem(BaseModel):
+ r"""An MCP tool call with its output or error"""
+
+ arguments: str
+
+ id: str
+
+ name: str
+
+ server_label: str
+
+ type: McpCallItemType
+
+ error: OptionalNullable[str] = UNSET
+
+ output: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["error", "output"]
+ nullable_fields = ["error", "output"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/mcplisttoolsitem.py b/src/openrouter/components/mcplisttoolsitem.py
new file mode 100644
index 0000000..305621b
--- /dev/null
+++ b/src/openrouter/components/mcplisttoolsitem.py
@@ -0,0 +1,117 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Any, Dict, List, Literal
+from typing_extensions import NotRequired, TypedDict
+
+
+class McpListToolsItemToolTypedDict(TypedDict):
+ input_schema: Dict[str, Nullable[Any]]
+ name: str
+ annotations: NotRequired[Nullable[Any]]
+ description: NotRequired[Nullable[str]]
+
+
+class McpListToolsItemTool(BaseModel):
+ input_schema: Dict[str, Nullable[Any]]
+
+ name: str
+
+ annotations: OptionalNullable[Any] = UNSET
+
+ description: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["annotations", "description"]
+ nullable_fields = ["annotations", "description"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+McpListToolsItemType = Literal["mcp_list_tools",]
+
+
+class McpListToolsItemTypedDict(TypedDict):
+ r"""List of available MCP tools from a server"""
+
+ id: str
+ server_label: str
+ tools: List[McpListToolsItemToolTypedDict]
+ type: McpListToolsItemType
+ error: NotRequired[Nullable[str]]
+
+
+class McpListToolsItem(BaseModel):
+ r"""List of available MCP tools from a server"""
+
+ id: str
+
+ server_label: str
+
+ tools: List[McpListToolsItemTool]
+
+ type: McpListToolsItemType
+
+ error: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["error"]
+ nullable_fields = ["error"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/messagesadvisortoolresultblock.py b/src/openrouter/components/messagesadvisortoolresultblock.py
new file mode 100644
index 0000000..d52ac13
--- /dev/null
+++ b/src/openrouter/components/messagesadvisortoolresultblock.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable
+from typing import Any, Dict, Literal
+from typing_extensions import TypedDict
+
+
+MessagesAdvisorToolResultBlockType = Literal["advisor_tool_result",]
+
+
+class MessagesAdvisorToolResultBlockTypedDict(TypedDict):
+ r"""Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block Anthropic returns in assistant content when the `advisor_20260301` tool runs."""
+
+ content: Dict[str, Nullable[Any]]
+ tool_use_id: str
+ type: MessagesAdvisorToolResultBlockType
+
+
+class MessagesAdvisorToolResultBlock(BaseModel):
+ r"""Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block Anthropic returns in assistant content when the `advisor_20260301` tool runs."""
+
+ content: Dict[str, Nullable[Any]]
+
+ tool_use_id: str
+
+ type: MessagesAdvisorToolResultBlockType
diff --git a/src/openrouter/components/messagesmessageparam.py b/src/openrouter/components/messagesmessageparam.py
new file mode 100644
index 0000000..2eb70ca
--- /dev/null
+++ b/src/openrouter/components/messagesmessageparam.py
@@ -0,0 +1,447 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .anthropicdocumentblockparam import (
+ AnthropicDocumentBlockParam,
+ AnthropicDocumentBlockParamTypedDict,
+)
+from .anthropicimageblockparam import (
+ AnthropicImageBlockParam,
+ AnthropicImageBlockParamTypedDict,
+)
+from .anthropicsearchresultblockparam import (
+ AnthropicSearchResultBlockParam,
+ AnthropicSearchResultBlockParamTypedDict,
+)
+from .anthropictextblockparam import (
+ AnthropicTextBlockParam,
+ AnthropicTextBlockParamTypedDict,
+)
+from .anthropicwebsearchresultblockparam import (
+ AnthropicWebSearchResultBlockParam,
+ AnthropicWebSearchResultBlockParamTypedDict,
+)
+from .messagesadvisortoolresultblock import (
+ MessagesAdvisorToolResultBlock,
+ MessagesAdvisorToolResultBlockTypedDict,
+)
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import get_discriminator, validate_open_enum
+from pydantic import Discriminator, Tag, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+MessagesMessageParamTypeCompaction = Literal["compaction",]
+
+
+class ContentCompactionTypedDict(TypedDict):
+ content: Nullable[str]
+ type: MessagesMessageParamTypeCompaction
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+class ContentCompaction(BaseModel):
+ content: Nullable[str]
+
+ type: MessagesMessageParamTypeCompaction
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["cache_control"]
+ nullable_fields = ["content"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+ErrorCode = Union[
+ Literal[
+ "invalid_tool_input",
+ "unavailable",
+ "max_uses_exceeded",
+ "too_many_requests",
+ "query_too_long",
+ ],
+ UnrecognizedStr,
+]
+
+
+TypeWebSearchToolResultError = Literal["web_search_tool_result_error",]
+
+
+class ContentWebSearchToolResultErrorTypedDict(TypedDict):
+ error_code: ErrorCode
+ type: TypeWebSearchToolResultError
+
+
+class ContentWebSearchToolResultError(BaseModel):
+ error_code: Annotated[ErrorCode, PlainValidator(validate_open_enum(False))]
+
+ type: TypeWebSearchToolResultError
+
+
+MessagesMessageParamContentUnion3TypedDict = TypeAliasType(
+ "MessagesMessageParamContentUnion3TypedDict",
+ Union[
+ ContentWebSearchToolResultErrorTypedDict,
+ List[AnthropicWebSearchResultBlockParamTypedDict],
+ ],
+)
+
+
+MessagesMessageParamContentUnion3 = TypeAliasType(
+ "MessagesMessageParamContentUnion3",
+ Union[ContentWebSearchToolResultError, List[AnthropicWebSearchResultBlockParam]],
+)
+
+
+TypeWebSearchToolResult = Literal["web_search_tool_result",]
+
+
+class ContentWebSearchToolResultTypedDict(TypedDict):
+ content: MessagesMessageParamContentUnion3TypedDict
+ tool_use_id: str
+ type: TypeWebSearchToolResult
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+class ContentWebSearchToolResult(BaseModel):
+ content: MessagesMessageParamContentUnion3
+
+ tool_use_id: str
+
+ type: TypeWebSearchToolResult
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+TypeServerToolUse = Literal["server_tool_use",]
+
+
+class ContentServerToolUseTypedDict(TypedDict):
+ id: str
+ name: str
+ type: TypeServerToolUse
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ input: NotRequired[Nullable[Any]]
+
+
+class ContentServerToolUse(BaseModel):
+ id: str
+
+ name: str
+
+ type: TypeServerToolUse
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ input: OptionalNullable[Any] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["cache_control", "input"]
+ nullable_fields = ["input"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+TypeRedactedThinking = Literal["redacted_thinking",]
+
+
+class ContentRedactedThinkingTypedDict(TypedDict):
+ data: str
+ type: TypeRedactedThinking
+
+
+class ContentRedactedThinking(BaseModel):
+ data: str
+
+ type: TypeRedactedThinking
+
+
+TypeThinking = Literal["thinking",]
+
+
+class ContentThinkingTypedDict(TypedDict):
+ signature: str
+ thinking: str
+ type: TypeThinking
+
+
+class ContentThinking(BaseModel):
+ signature: str
+
+ thinking: str
+
+ type: TypeThinking
+
+
+TypeToolReference = Literal["tool_reference",]
+
+
+class ContentToolReferenceTypedDict(TypedDict):
+ tool_name: str
+ type: TypeToolReference
+
+
+class ContentToolReference(BaseModel):
+ tool_name: str
+
+ type: TypeToolReference
+
+
+MessagesMessageParamContentUnion1TypedDict = TypeAliasType(
+ "MessagesMessageParamContentUnion1TypedDict",
+ Union[
+ ContentToolReferenceTypedDict,
+ AnthropicImageBlockParamTypedDict,
+ AnthropicTextBlockParamTypedDict,
+ AnthropicSearchResultBlockParamTypedDict,
+ AnthropicDocumentBlockParamTypedDict,
+ ],
+)
+
+
+MessagesMessageParamContentUnion1 = Annotated[
+ Union[
+ Annotated[AnthropicTextBlockParam, Tag("text")],
+ Annotated[AnthropicImageBlockParam, Tag("image")],
+ Annotated[ContentToolReference, Tag("tool_reference")],
+ Annotated[AnthropicSearchResultBlockParam, Tag("search_result")],
+ Annotated[AnthropicDocumentBlockParam, Tag("document")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+MessagesMessageParamContentUnion2TypedDict = TypeAliasType(
+ "MessagesMessageParamContentUnion2TypedDict",
+ Union[str, List[MessagesMessageParamContentUnion1TypedDict]],
+)
+
+
+MessagesMessageParamContentUnion2 = TypeAliasType(
+ "MessagesMessageParamContentUnion2",
+ Union[str, List[MessagesMessageParamContentUnion1]],
+)
+
+
+TypeToolResult = Literal["tool_result",]
+
+
+class ContentToolResultTypedDict(TypedDict):
+ tool_use_id: str
+ type: TypeToolResult
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ content: NotRequired[MessagesMessageParamContentUnion2TypedDict]
+ is_error: NotRequired[bool]
+
+
+class ContentToolResult(BaseModel):
+ tool_use_id: str
+
+ type: TypeToolResult
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ content: Optional[MessagesMessageParamContentUnion2] = None
+
+ is_error: Optional[bool] = None
+
+
+TypeToolUse = Literal["tool_use",]
+
+
+class ContentToolUseTypedDict(TypedDict):
+ id: str
+ name: str
+ type: TypeToolUse
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ input: NotRequired[Nullable[Any]]
+
+
+class ContentToolUse(BaseModel):
+ id: str
+
+ name: str
+
+ type: TypeToolUse
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ input: OptionalNullable[Any] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["cache_control", "input"]
+ nullable_fields = ["input"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+MessagesMessageParamContentUnion4TypedDict = TypeAliasType(
+ "MessagesMessageParamContentUnion4TypedDict",
+ Union[
+ ContentRedactedThinkingTypedDict,
+ AnthropicImageBlockParamTypedDict,
+ ContentThinkingTypedDict,
+ ContentCompactionTypedDict,
+ MessagesAdvisorToolResultBlockTypedDict,
+ AnthropicTextBlockParamTypedDict,
+ ContentWebSearchToolResultTypedDict,
+ ContentToolUseTypedDict,
+ ContentToolResultTypedDict,
+ ContentServerToolUseTypedDict,
+ AnthropicDocumentBlockParamTypedDict,
+ AnthropicSearchResultBlockParamTypedDict,
+ ],
+)
+
+
+MessagesMessageParamContentUnion4 = Annotated[
+ Union[
+ Annotated[AnthropicTextBlockParam, Tag("text")],
+ Annotated[AnthropicImageBlockParam, Tag("image")],
+ Annotated[AnthropicDocumentBlockParam, Tag("document")],
+ Annotated[ContentToolUse, Tag("tool_use")],
+ Annotated[ContentToolResult, Tag("tool_result")],
+ Annotated[ContentThinking, Tag("thinking")],
+ Annotated[ContentRedactedThinking, Tag("redacted_thinking")],
+ Annotated[ContentServerToolUse, Tag("server_tool_use")],
+ Annotated[ContentWebSearchToolResult, Tag("web_search_tool_result")],
+ Annotated[AnthropicSearchResultBlockParam, Tag("search_result")],
+ Annotated[ContentCompaction, Tag("compaction")],
+ Annotated[MessagesAdvisorToolResultBlock, Tag("advisor_tool_result")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+MessagesMessageParamContentUnion5TypedDict = TypeAliasType(
+ "MessagesMessageParamContentUnion5TypedDict",
+ Union[str, List[MessagesMessageParamContentUnion4TypedDict]],
+)
+
+
+MessagesMessageParamContentUnion5 = TypeAliasType(
+ "MessagesMessageParamContentUnion5",
+ Union[str, List[MessagesMessageParamContentUnion4]],
+)
+
+
+MessagesMessageParamRole = Union[
+ Literal[
+ "user",
+ "assistant",
+ "system",
+ ],
+ UnrecognizedStr,
+]
+
+
+class MessagesMessageParamTypedDict(TypedDict):
+ r"""Anthropic message with OpenRouter extensions"""
+
+ content: MessagesMessageParamContentUnion5TypedDict
+ role: MessagesMessageParamRole
+
+
+class MessagesMessageParam(BaseModel):
+ r"""Anthropic message with OpenRouter extensions"""
+
+ content: MessagesMessageParamContentUnion5
+
+ role: Annotated[MessagesMessageParamRole, PlainValidator(validate_open_enum(False))]
diff --git a/src/openrouter/components/messagesoutputconfig.py b/src/openrouter/components/messagesoutputconfig.py
new file mode 100644
index 0000000..a5410bd
--- /dev/null
+++ b/src/openrouter/components/messagesoutputconfig.py
@@ -0,0 +1,158 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, Literal, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+MessagesOutputConfigEffort = Union[
+ Literal[
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max",
+ ],
+ UnrecognizedStr,
+]
+r"""How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`."""
+
+
+MessagesOutputConfigTypeJSONSchema = Literal["json_schema",]
+
+
+class MessagesOutputConfigFormatTypedDict(TypedDict):
+ r"""A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)."""
+
+ schema_: Dict[str, Nullable[Any]]
+ type: MessagesOutputConfigTypeJSONSchema
+
+
+class MessagesOutputConfigFormat(BaseModel):
+ r"""A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)."""
+
+ schema_: Annotated[Dict[str, Nullable[Any]], pydantic.Field(alias="schema")]
+
+ type: MessagesOutputConfigTypeJSONSchema
+
+
+TypeTokens = Literal["tokens",]
+
+
+class TaskBudgetTypedDict(TypedDict):
+ r"""Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap."""
+
+ total: int
+ type: TypeTokens
+ remaining: NotRequired[Nullable[int]]
+
+
+class TaskBudget(BaseModel):
+ r"""Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap."""
+
+ total: int
+
+ type: TypeTokens
+
+ remaining: OptionalNullable[int] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["remaining"]
+ nullable_fields = ["remaining"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class MessagesOutputConfigTypedDict(TypedDict):
+ r"""Configuration for controlling output behavior. Supports the effort parameter and structured output format."""
+
+ effort: NotRequired[Nullable[MessagesOutputConfigEffort]]
+ r"""How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`."""
+ format_: NotRequired[Nullable[MessagesOutputConfigFormatTypedDict]]
+ r"""A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)."""
+ task_budget: NotRequired[Nullable[TaskBudgetTypedDict]]
+ r"""Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap."""
+
+
+class MessagesOutputConfig(BaseModel):
+ r"""Configuration for controlling output behavior. Supports the effort parameter and structured output format."""
+
+ effort: Annotated[
+ OptionalNullable[MessagesOutputConfigEffort],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
+ r"""How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`."""
+
+ format_: Annotated[
+ OptionalNullable[MessagesOutputConfigFormat], pydantic.Field(alias="format")
+ ] = UNSET
+ r"""A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)."""
+
+ task_budget: OptionalNullable[TaskBudget] = UNSET
+ r"""Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["effort", "format", "task_budget"]
+ nullable_fields = ["effort", "format", "task_budget"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/messagesrequest.py b/src/openrouter/components/messagesrequest.py
new file mode 100644
index 0000000..fc1f1db
--- /dev/null
+++ b/src/openrouter/components/messagesrequest.py
@@ -0,0 +1,1194 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropicallowedcallers import AnthropicAllowedCallers
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .anthropiccachecontrolttl import AnthropicCacheControlTTL
+from .anthropicinputtokensclearatleast import (
+ AnthropicInputTokensClearAtLeast,
+ AnthropicInputTokensClearAtLeastTypedDict,
+)
+from .anthropicinputtokenstrigger import (
+ AnthropicInputTokensTrigger,
+ AnthropicInputTokensTriggerTypedDict,
+)
+from .anthropictextblockparam import (
+ AnthropicTextBlockParam,
+ AnthropicTextBlockParamTypedDict,
+)
+from .anthropicthinkingdisplay import AnthropicThinkingDisplay
+from .anthropicthinkingturns import (
+ AnthropicThinkingTurns,
+ AnthropicThinkingTurnsTypedDict,
+)
+from .anthropictooluseskeep import AnthropicToolUsesKeep, AnthropicToolUsesKeepTypedDict
+from .anthropictoolusestrigger import (
+ AnthropicToolUsesTrigger,
+ AnthropicToolUsesTriggerTypedDict,
+)
+from .anthropicwebsearchtooluserlocation import (
+ AnthropicWebSearchToolUserLocation,
+ AnthropicWebSearchToolUserLocationTypedDict,
+)
+from .autorouterplugin import AutoRouterPlugin, AutoRouterPluginTypedDict
+from .bashservertool import BashServerTool, BashServerToolTypedDict
+from .chatsearchmodelsservertool import (
+ ChatSearchModelsServerTool,
+ ChatSearchModelsServerToolTypedDict,
+)
+from .contextcompressionplugin import (
+ ContextCompressionPlugin,
+ ContextCompressionPluginTypedDict,
+)
+from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict
+from .fileparserplugin import FileParserPlugin, FileParserPluginTypedDict
+from .fusionplugin import FusionPlugin, FusionPluginTypedDict
+from .imagegenerationservertool_openrouter import (
+ ImageGenerationServerToolOpenRouter,
+ ImageGenerationServerToolOpenRouterTypedDict,
+)
+from .messagesmessageparam import MessagesMessageParam, MessagesMessageParamTypedDict
+from .messagesoutputconfig import MessagesOutputConfig, MessagesOutputConfigTypedDict
+from .moderationplugin import ModerationPlugin, ModerationPluginTypedDict
+from .openrouterwebsearchservertool import (
+ OpenRouterWebSearchServerTool,
+ OpenRouterWebSearchServerToolTypedDict,
+)
+from .paretorouterplugin import ParetoRouterPlugin, ParetoRouterPluginTypedDict
+from .providerpreferences import ProviderPreferences, ProviderPreferencesTypedDict
+from .responsehealingplugin import ResponseHealingPlugin, ResponseHealingPluginTypedDict
+from .stopservertoolswhencondition import (
+ StopServerToolsWhenCondition,
+ StopServerToolsWhenConditionTypedDict,
+)
+from .traceconfig import TraceConfig, TraceConfigTypedDict
+from .webfetchplugin import WebFetchPlugin, WebFetchPluginTypedDict
+from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict
+from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import get_discriminator, validate_open_enum
+import pydantic
+from pydantic import ConfigDict, Discriminator, Tag, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+EditTypeInputTokens = Literal["input_tokens",]
+
+
+class TriggerInputTokensTypedDict(TypedDict):
+ type: EditTypeInputTokens
+ value: int
+
+
+class TriggerInputTokens(BaseModel):
+ type: EditTypeInputTokens
+
+ value: int
+
+
+TypeCompact20260112 = Literal["compact_20260112",]
+
+
+class EditCompact20260112TypedDict(TypedDict):
+ type: TypeCompact20260112
+ instructions: NotRequired[Nullable[str]]
+ pause_after_compaction: NotRequired[bool]
+ trigger: NotRequired[Nullable[TriggerInputTokensTypedDict]]
+
+
+class EditCompact20260112(BaseModel):
+ type: TypeCompact20260112
+
+ instructions: OptionalNullable[str] = UNSET
+
+ pause_after_compaction: Optional[bool] = None
+
+ trigger: OptionalNullable[TriggerInputTokens] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["instructions", "pause_after_compaction", "trigger"]
+ nullable_fields = ["instructions", "trigger"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+KeepEnum = Literal["all",]
+
+
+KeepType = Literal["all",]
+
+
+class KeepAllTypedDict(TypedDict):
+ type: KeepType
+
+
+class KeepAll(BaseModel):
+ type: KeepType
+
+
+KeepTypedDict = TypeAliasType(
+ "KeepTypedDict", Union[KeepAllTypedDict, AnthropicThinkingTurnsTypedDict, KeepEnum]
+)
+
+
+Keep = TypeAliasType("Keep", Union[KeepAll, AnthropicThinkingTurns, KeepEnum])
+
+
+TypeClearThinking20251015 = Literal["clear_thinking_20251015",]
+
+
+class EditClearThinking20251015TypedDict(TypedDict):
+ type: TypeClearThinking20251015
+ keep: NotRequired[KeepTypedDict]
+
+
+class EditClearThinking20251015(BaseModel):
+ type: TypeClearThinking20251015
+
+ keep: Optional[Keep] = None
+
+
+ClearToolInputsTypedDict = TypeAliasType(
+ "ClearToolInputsTypedDict", Union[bool, List[str], Any]
+)
+
+
+ClearToolInputs = TypeAliasType("ClearToolInputs", Union[bool, List[str], Any])
+
+
+TriggerTypedDict = TypeAliasType(
+ "TriggerTypedDict",
+ Union[AnthropicInputTokensTriggerTypedDict, AnthropicToolUsesTriggerTypedDict],
+)
+
+
+Trigger = Annotated[
+ Union[
+ Annotated[AnthropicInputTokensTrigger, Tag("input_tokens")],
+ Annotated[AnthropicToolUsesTrigger, Tag("tool_uses")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+TypeClearToolUses20250919 = Literal["clear_tool_uses_20250919",]
+
+
+class EditClearToolUses20250919TypedDict(TypedDict):
+ type: TypeClearToolUses20250919
+ clear_at_least: NotRequired[Nullable[AnthropicInputTokensClearAtLeastTypedDict]]
+ clear_tool_inputs: NotRequired[Nullable[ClearToolInputsTypedDict]]
+ exclude_tools: NotRequired[Nullable[List[str]]]
+ keep: NotRequired[AnthropicToolUsesKeepTypedDict]
+ trigger: NotRequired[TriggerTypedDict]
+
+
+class EditClearToolUses20250919(BaseModel):
+ type: TypeClearToolUses20250919
+
+ clear_at_least: OptionalNullable[AnthropicInputTokensClearAtLeast] = UNSET
+
+ clear_tool_inputs: OptionalNullable[ClearToolInputs] = UNSET
+
+ exclude_tools: OptionalNullable[List[str]] = UNSET
+
+ keep: Optional[AnthropicToolUsesKeep] = None
+
+ trigger: Optional[Trigger] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "clear_at_least",
+ "clear_tool_inputs",
+ "exclude_tools",
+ "keep",
+ "trigger",
+ ]
+ nullable_fields = ["clear_at_least", "clear_tool_inputs", "exclude_tools"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+EditTypedDict = TypeAliasType(
+ "EditTypedDict",
+ Union[
+ EditClearThinking20251015TypedDict,
+ EditCompact20260112TypedDict,
+ EditClearToolUses20250919TypedDict,
+ ],
+)
+
+
+Edit = Annotated[
+ Union[
+ Annotated[EditClearToolUses20250919, Tag("clear_tool_uses_20250919")],
+ Annotated[EditClearThinking20251015, Tag("clear_thinking_20251015")],
+ Annotated[EditCompact20260112, Tag("compact_20260112")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+class ContextManagementTypedDict(TypedDict):
+ edits: NotRequired[List[EditTypedDict]]
+
+
+class ContextManagement(BaseModel):
+ edits: Optional[List[Edit]] = None
+
+
+class MetadataTypedDict(TypedDict):
+ user_id: NotRequired[Nullable[str]]
+
+
+class Metadata(BaseModel):
+ user_id: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["user_id"]
+ nullable_fields = ["user_id"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+MessagesRequestPluginTypedDict = TypeAliasType(
+ "MessagesRequestPluginTypedDict",
+ Union[
+ ModerationPluginTypedDict,
+ ResponseHealingPluginTypedDict,
+ FileParserPluginTypedDict,
+ ContextCompressionPluginTypedDict,
+ ParetoRouterPluginTypedDict,
+ AutoRouterPluginTypedDict,
+ WebFetchPluginTypedDict,
+ FusionPluginTypedDict,
+ WebSearchPluginTypedDict,
+ ],
+)
+
+
+MessagesRequestPlugin = Annotated[
+ Union[
+ Annotated[AutoRouterPlugin, Tag("auto-router")],
+ Annotated[ContextCompressionPlugin, Tag("context-compression")],
+ Annotated[FileParserPlugin, Tag("file-parser")],
+ Annotated[FusionPlugin, Tag("fusion")],
+ Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ParetoRouterPlugin, Tag("pareto-router")],
+ Annotated[ResponseHealingPlugin, Tag("response-healing")],
+ Annotated[WebSearchPlugin, Tag("web")],
+ Annotated[WebFetchPlugin, Tag("web-fetch")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "id", "id")),
+]
+
+
+Speed = Union[
+ Literal[
+ "fast",
+ "standard",
+ ],
+ UnrecognizedStr,
+]
+r"""Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted."""
+
+
+SystemTypedDict = TypeAliasType(
+ "SystemTypedDict", Union[str, List[AnthropicTextBlockParamTypedDict]]
+)
+
+
+System = TypeAliasType("System", Union[str, List[AnthropicTextBlockParam]])
+
+
+TypeAdaptive = Literal["adaptive",]
+
+
+class ThinkingAdaptiveTypedDict(TypedDict):
+ type: TypeAdaptive
+ display: NotRequired[Nullable[AnthropicThinkingDisplay]]
+
+
+class ThinkingAdaptive(BaseModel):
+ type: TypeAdaptive
+
+ display: Annotated[
+ OptionalNullable[AnthropicThinkingDisplay],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["display"]
+ nullable_fields = ["display"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+TypeDisabled = Literal["disabled",]
+
+
+class ThinkingDisabledTypedDict(TypedDict):
+ type: TypeDisabled
+
+
+class ThinkingDisabled(BaseModel):
+ type: TypeDisabled
+
+
+TypeEnabled = Literal["enabled",]
+
+
+class ThinkingEnabledTypedDict(TypedDict):
+ budget_tokens: int
+ type: TypeEnabled
+ display: NotRequired[Nullable[AnthropicThinkingDisplay]]
+
+
+class ThinkingEnabled(BaseModel):
+ budget_tokens: int
+
+ type: TypeEnabled
+
+ display: Annotated[
+ OptionalNullable[AnthropicThinkingDisplay],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["display"]
+ nullable_fields = ["display"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+ThinkingTypedDict = TypeAliasType(
+ "ThinkingTypedDict",
+ Union[
+ ThinkingDisabledTypedDict, ThinkingAdaptiveTypedDict, ThinkingEnabledTypedDict
+ ],
+)
+
+
+Thinking = Annotated[
+ Union[
+ Annotated[ThinkingEnabled, Tag("enabled")],
+ Annotated[ThinkingDisabled, Tag("disabled")],
+ Annotated[ThinkingAdaptive, Tag("adaptive")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+TypeTool = Literal["tool",]
+
+
+class ToolChoiceToolTypedDict(TypedDict):
+ name: str
+ type: TypeTool
+ disable_parallel_tool_use: NotRequired[bool]
+
+
+class ToolChoiceTool(BaseModel):
+ name: str
+
+ type: TypeTool
+
+ disable_parallel_tool_use: Optional[bool] = None
+
+
+TypeNone = Literal["none",]
+
+
+class ToolChoiceNoneTypedDict(TypedDict):
+ type: TypeNone
+
+
+class ToolChoiceNone(BaseModel):
+ type: TypeNone
+
+
+TypeAny = Literal["any",]
+
+
+class ToolChoiceAnyTypedDict(TypedDict):
+ type: TypeAny
+ disable_parallel_tool_use: NotRequired[bool]
+
+
+class ToolChoiceAny(BaseModel):
+ type: TypeAny
+
+ disable_parallel_tool_use: Optional[bool] = None
+
+
+ToolChoiceTypeAuto = Literal["auto",]
+
+
+class ToolChoiceAutoTypedDict(TypedDict):
+ type: ToolChoiceTypeAuto
+ disable_parallel_tool_use: NotRequired[bool]
+
+
+class ToolChoiceAuto(BaseModel):
+ type: ToolChoiceTypeAuto
+
+ disable_parallel_tool_use: Optional[bool] = None
+
+
+ToolChoiceTypedDict = TypeAliasType(
+ "ToolChoiceTypedDict",
+ Union[
+ ToolChoiceNoneTypedDict,
+ ToolChoiceAutoTypedDict,
+ ToolChoiceAnyTypedDict,
+ ToolChoiceToolTypedDict,
+ ],
+)
+
+
+ToolChoice = Annotated[
+ Union[
+ Annotated[ToolChoiceAuto, Tag("auto")],
+ Annotated[ToolChoiceAny, Tag("any")],
+ Annotated[ToolChoiceNone, Tag("none")],
+ Annotated[ToolChoiceTool, Tag("tool")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+class MessagesRequestToolTypedDict(TypedDict):
+ type: str
+
+
+class MessagesRequestTool(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
+ )
+ __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
+
+ type: str
+
+ @property
+ def additional_properties(self):
+ return self.__pydantic_extra__
+
+ @additional_properties.setter
+ def additional_properties(self, value):
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
+
+
+ToolTypeEphemeral = Literal["ephemeral",]
+
+
+class CachingTypedDict(TypedDict):
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ type: ToolTypeEphemeral
+ ttl: NotRequired[AnthropicCacheControlTTL]
+
+
+class Caching(BaseModel):
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ type: ToolTypeEphemeral
+
+ ttl: Annotated[
+ Optional[AnthropicCacheControlTTL], PlainValidator(validate_open_enum(False))
+ ] = None
+
+
+NameAdvisor = Literal["advisor",]
+
+
+TypeAdvisor20260301 = Literal["advisor_20260301",]
+
+
+class ToolAdvisor20260301TypedDict(TypedDict):
+ model: str
+ name: NameAdvisor
+ type: TypeAdvisor20260301
+ allowed_callers: NotRequired[List[AnthropicAllowedCallers]]
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ caching: NotRequired[Nullable[CachingTypedDict]]
+ defer_loading: NotRequired[bool]
+ max_uses: NotRequired[int]
+
+
+class ToolAdvisor20260301(BaseModel):
+ model: str
+
+ name: NameAdvisor
+
+ type: TypeAdvisor20260301
+
+ allowed_callers: Optional[
+ List[
+ Annotated[
+ AnthropicAllowedCallers, PlainValidator(validate_open_enum(False))
+ ]
+ ]
+ ] = None
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ caching: OptionalNullable[Caching] = UNSET
+
+ defer_loading: Optional[bool] = None
+
+ max_uses: Optional[int] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_callers",
+ "cache_control",
+ "caching",
+ "defer_loading",
+ "max_uses",
+ ]
+ nullable_fields = ["caching"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+NameWebSearch2 = Literal["web_search",]
+
+
+TypeWebSearch20260209 = Literal["web_search_20260209",]
+
+
+class ToolWebSearch20260209TypedDict(TypedDict):
+ name: NameWebSearch2
+ type: TypeWebSearch20260209
+ allowed_callers: NotRequired[List[AnthropicAllowedCallers]]
+ allowed_domains: NotRequired[Nullable[List[str]]]
+ blocked_domains: NotRequired[Nullable[List[str]]]
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ max_uses: NotRequired[Nullable[int]]
+ user_location: NotRequired[Nullable[AnthropicWebSearchToolUserLocationTypedDict]]
+
+
+class ToolWebSearch20260209(BaseModel):
+ name: NameWebSearch2
+
+ type: TypeWebSearch20260209
+
+ allowed_callers: Optional[
+ List[
+ Annotated[
+ AnthropicAllowedCallers, PlainValidator(validate_open_enum(False))
+ ]
+ ]
+ ] = None
+
+ allowed_domains: OptionalNullable[List[str]] = UNSET
+
+ blocked_domains: OptionalNullable[List[str]] = UNSET
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ max_uses: OptionalNullable[int] = UNSET
+
+ user_location: OptionalNullable[AnthropicWebSearchToolUserLocation] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_callers",
+ "allowed_domains",
+ "blocked_domains",
+ "cache_control",
+ "max_uses",
+ "user_location",
+ ]
+ nullable_fields = [
+ "allowed_domains",
+ "blocked_domains",
+ "max_uses",
+ "user_location",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+NameWebSearch1 = Literal["web_search",]
+
+
+TypeWebSearch20250305 = Literal["web_search_20250305",]
+
+
+class ToolWebSearch20250305TypedDict(TypedDict):
+ name: NameWebSearch1
+ type: TypeWebSearch20250305
+ allowed_domains: NotRequired[Nullable[List[str]]]
+ blocked_domains: NotRequired[Nullable[List[str]]]
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ max_uses: NotRequired[Nullable[int]]
+ user_location: NotRequired[Nullable[AnthropicWebSearchToolUserLocationTypedDict]]
+
+
+class ToolWebSearch20250305(BaseModel):
+ name: NameWebSearch1
+
+ type: TypeWebSearch20250305
+
+ allowed_domains: OptionalNullable[List[str]] = UNSET
+
+ blocked_domains: OptionalNullable[List[str]] = UNSET
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ max_uses: OptionalNullable[int] = UNSET
+
+ user_location: OptionalNullable[AnthropicWebSearchToolUserLocation] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_domains",
+ "blocked_domains",
+ "cache_control",
+ "max_uses",
+ "user_location",
+ ]
+ nullable_fields = [
+ "allowed_domains",
+ "blocked_domains",
+ "max_uses",
+ "user_location",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+NameStrReplaceEditor = Literal["str_replace_editor",]
+
+
+TypeTextEditor20250124 = Literal["text_editor_20250124",]
+
+
+class ToolTextEditor20250124TypedDict(TypedDict):
+ name: NameStrReplaceEditor
+ type: TypeTextEditor20250124
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+class ToolTextEditor20250124(BaseModel):
+ name: NameStrReplaceEditor
+
+ type: TypeTextEditor20250124
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+NameBash = Literal["bash",]
+
+
+TypeBash20250124 = Literal["bash_20250124",]
+
+
+class ToolBash20250124TypedDict(TypedDict):
+ name: NameBash
+ type: TypeBash20250124
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+class ToolBash20250124(BaseModel):
+ name: NameBash
+
+ type: TypeBash20250124
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+
+class InputSchemaTypedDict(TypedDict):
+ properties: NotRequired[Nullable[Any]]
+ required: NotRequired[Nullable[List[str]]]
+ type: NotRequired[str]
+
+
+class InputSchema(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
+ )
+ __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
+
+ properties: OptionalNullable[Any] = UNSET
+
+ required: OptionalNullable[List[str]] = UNSET
+
+ type: Optional[str] = "object"
+
+ @property
+ def additional_properties(self):
+ return self.__pydantic_extra__
+
+ @additional_properties.setter
+ def additional_properties(self, value):
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["properties", "required", "type"]
+ nullable_fields = ["properties", "required"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ for k, v in serialized.items():
+ m[k] = v
+
+ return m
+
+
+ToolTypeCustom = Literal["custom",]
+
+
+class ToolCustomTypedDict(TypedDict):
+ input_schema: InputSchemaTypedDict
+ name: str
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ description: NotRequired[str]
+ type: NotRequired[ToolTypeCustom]
+
+
+class ToolCustom(BaseModel):
+ input_schema: InputSchema
+
+ name: str
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ description: Optional[str] = None
+
+ type: Optional[ToolTypeCustom] = None
+
+
+MessagesRequestToolUnionTypedDict = TypeAliasType(
+ "MessagesRequestToolUnionTypedDict",
+ Union[
+ ChatSearchModelsServerToolTypedDict,
+ BashServerToolTypedDict,
+ DatetimeServerToolTypedDict,
+ ImageGenerationServerToolOpenRouterTypedDict,
+ WebFetchServerToolTypedDict,
+ OpenRouterWebSearchServerToolTypedDict,
+ MessagesRequestToolTypedDict,
+ ToolBash20250124TypedDict,
+ ToolTextEditor20250124TypedDict,
+ ToolCustomTypedDict,
+ ToolWebSearch20250305TypedDict,
+ ToolWebSearch20260209TypedDict,
+ ToolAdvisor20260301TypedDict,
+ ],
+)
+
+
+MessagesRequestToolUnion = TypeAliasType(
+ "MessagesRequestToolUnion",
+ Union[
+ ChatSearchModelsServerTool,
+ BashServerTool,
+ DatetimeServerTool,
+ ImageGenerationServerToolOpenRouter,
+ WebFetchServerTool,
+ OpenRouterWebSearchServerTool,
+ MessagesRequestTool,
+ ToolBash20250124,
+ ToolTextEditor20250124,
+ ToolCustom,
+ ToolWebSearch20250305,
+ ToolWebSearch20260209,
+ ToolAdvisor20260301,
+ ],
+)
+
+
+class MessagesRequestTypedDict(TypedDict):
+ r"""Request schema for Anthropic Messages API endpoint"""
+
+ messages: Nullable[List[MessagesMessageParamTypedDict]]
+ model: str
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+ context_management: NotRequired[Nullable[ContextManagementTypedDict]]
+ max_tokens: NotRequired[int]
+ metadata: NotRequired[MetadataTypedDict]
+ models: NotRequired[List[str]]
+ output_config: NotRequired[MessagesOutputConfigTypedDict]
+ r"""Configuration for controlling output behavior. Supports the effort parameter and structured output format."""
+ plugins: NotRequired[List[MessagesRequestPluginTypedDict]]
+ r"""Plugins you want to enable for this request, including their settings."""
+ provider: NotRequired[Nullable[ProviderPreferencesTypedDict]]
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
+ service_tier: NotRequired[str]
+ session_id: NotRequired[str]
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+ speed: NotRequired[Nullable[Speed]]
+ stop_sequences: NotRequired[List[str]]
+ stop_server_tools_when: NotRequired[List[StopServerToolsWhenConditionTypedDict]]
+ r"""Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`."""
+ stream: NotRequired[bool]
+ system: NotRequired[SystemTypedDict]
+ temperature: NotRequired[float]
+ thinking: NotRequired[ThinkingTypedDict]
+ tool_choice: NotRequired[ToolChoiceTypedDict]
+ tools: NotRequired[List[MessagesRequestToolUnionTypedDict]]
+ top_k: NotRequired[int]
+ top_p: NotRequired[float]
+ trace: NotRequired[TraceConfigTypedDict]
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+ user: NotRequired[str]
+ r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."""
+
+
+class MessagesRequest(BaseModel):
+ r"""Request schema for Anthropic Messages API endpoint"""
+
+ messages: Nullable[List[MessagesMessageParam]]
+
+ model: str
+
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ context_management: OptionalNullable[ContextManagement] = UNSET
+
+ max_tokens: Optional[int] = None
+
+ metadata: Optional[Metadata] = None
+
+ models: Optional[List[str]] = None
+
+ output_config: Optional[MessagesOutputConfig] = None
+ r"""Configuration for controlling output behavior. Supports the effort parameter and structured output format."""
+
+ plugins: Optional[List[MessagesRequestPlugin]] = None
+ r"""Plugins you want to enable for this request, including their settings."""
+
+ provider: OptionalNullable[ProviderPreferences] = UNSET
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
+
+ service_tier: Optional[str] = None
+
+ session_id: Optional[str] = None
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+
+ speed: Annotated[
+ OptionalNullable[Speed], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+
+ stop_sequences: Optional[List[str]] = None
+
+ stop_server_tools_when: Optional[List[StopServerToolsWhenCondition]] = None
+ r"""Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`."""
+
+ stream: Optional[bool] = None
+
+ system: Optional[System] = None
+
+ temperature: Optional[float] = None
+
+ thinking: Optional[Thinking] = None
+
+ tool_choice: Optional[ToolChoice] = None
+
+ tools: Optional[List[MessagesRequestToolUnion]] = None
+
+ top_k: Optional[int] = None
+
+ top_p: Optional[float] = None
+
+ trace: Optional[TraceConfig] = None
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+
+ user: Optional[str] = None
+ r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "cache_control",
+ "context_management",
+ "max_tokens",
+ "metadata",
+ "models",
+ "output_config",
+ "plugins",
+ "provider",
+ "service_tier",
+ "session_id",
+ "speed",
+ "stop_sequences",
+ "stop_server_tools_when",
+ "stream",
+ "system",
+ "temperature",
+ "thinking",
+ "tool_choice",
+ "tools",
+ "top_k",
+ "top_p",
+ "trace",
+ "user",
+ ]
+ nullable_fields = ["context_management", "messages", "provider", "speed"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/metadatalevel.py b/src/openrouter/components/metadatalevel.py
new file mode 100644
index 0000000..1257b38
--- /dev/null
+++ b/src/openrouter/components/metadatalevel.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+MetadataLevel = Union[
+ Literal[
+ "disabled",
+ "enabled",
+ ],
+ UnrecognizedStr,
+]
+r"""Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`."""
diff --git a/src/openrouter/components/model.py b/src/openrouter/components/model.py
index 14dc4b9..53fc430 100644
--- a/src/openrouter/components/model.py
+++ b/src/openrouter/components/model.py
@@ -47,6 +47,8 @@ class ModelTypedDict(TypedDict):
r"""Pricing information for the model"""
supported_parameters: List[Parameter]
r"""List of supported parameters for this model"""
+ supported_voices: Nullable[List[str]]
+ r"""List of supported voice identifiers for TTS models. Null for non-TTS models."""
top_provider: TopProviderInfoTypedDict
r"""Information about the top provider for this model"""
description: NotRequired[str]
@@ -97,6 +99,9 @@ class Model(BaseModel):
]
r"""List of supported parameters for this model"""
+ supported_voices: Nullable[List[str]]
+ r"""List of supported voice identifiers for TTS models. Null for non-TTS models."""
+
top_provider: TopProviderInfo
r"""Information about the top provider for this model"""
@@ -127,6 +132,7 @@ class Model(BaseModel):
"hugging_face_id",
"knowledge_cutoff",
"per_request_limits",
+ "supported_voices",
]
null_default_fields = []
diff --git a/src/openrouter/components/modelscountresponse.py b/src/openrouter/components/modelscountresponse.py
index 86bb27c..8d68ee4 100644
--- a/src/openrouter/components/modelscountresponse.py
+++ b/src/openrouter/components/modelscountresponse.py
@@ -5,14 +5,14 @@ from openrouter.types import BaseModel
from typing_extensions import TypedDict
-class DataTypedDict(TypedDict):
+class ModelsCountResponseDataTypedDict(TypedDict):
r"""Model count data"""
count: int
r"""Total number of available models"""
-class Data(BaseModel):
+class ModelsCountResponseData(BaseModel):
r"""Model count data"""
count: int
@@ -22,12 +22,12 @@ class Data(BaseModel):
class ModelsCountResponseTypedDict(TypedDict):
r"""Model count data"""
- data: DataTypedDict
+ data: ModelsCountResponseDataTypedDict
r"""Model count data"""
class ModelsCountResponse(BaseModel):
r"""Model count data"""
- data: Data
+ data: ModelsCountResponseData
r"""Model count data"""
diff --git a/src/openrouter/components/multimodalmedia.py b/src/openrouter/components/multimodalmedia.py
new file mode 100644
index 0000000..2cd306c
--- /dev/null
+++ b/src/openrouter/components/multimodalmedia.py
@@ -0,0 +1,18 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class MultimodalMediaTypedDict(TypedDict):
+ data: str
+ format_: NotRequired[str]
+
+
+class MultimodalMedia(BaseModel):
+ data: str
+
+ format_: Annotated[Optional[str], pydantic.Field(alias="format")] = None
diff --git a/src/openrouter/components/observabilityarizedestination.py b/src/openrouter/components/observabilityarizedestination.py
new file mode 100644
index 0000000..142a548
--- /dev/null
+++ b/src/openrouter/components/observabilityarizedestination.py
@@ -0,0 +1,130 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityArizeDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ model_id: str
+ space_key: str
+ base_url: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityArizeDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ model_id: Annotated[str, pydantic.Field(alias="modelId")]
+
+ space_key: Annotated[str, pydantic.Field(alias="spaceKey")]
+
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = (
+ "https://otlp.arize.com"
+ )
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityArizeDestinationType = Literal["arize",]
+
+
+class ObservabilityArizeDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityArizeDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityArizeDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityArizeDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityArizeDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityArizeDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitybraintrustdestination.py b/src/openrouter/components/observabilitybraintrustdestination.py
new file mode 100644
index 0000000..7980758
--- /dev/null
+++ b/src/openrouter/components/observabilitybraintrustdestination.py
@@ -0,0 +1,127 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityBraintrustDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ project_id: str
+ base_url: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityBraintrustDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ project_id: Annotated[str, pydantic.Field(alias="projectId")]
+
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = (
+ "https://api.braintrust.dev"
+ )
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityBraintrustDestinationType = Literal["braintrust",]
+
+
+class ObservabilityBraintrustDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityBraintrustDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityBraintrustDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityBraintrustDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityBraintrustDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityBraintrustDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilityclickhousedestination.py b/src/openrouter/components/observabilityclickhousedestination.py
new file mode 100644
index 0000000..7a65ddb
--- /dev/null
+++ b/src/openrouter/components/observabilityclickhousedestination.py
@@ -0,0 +1,132 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class ObservabilityClickhouseDestinationConfigTypedDict(TypedDict):
+ database: str
+ host: str
+ password: str
+ username: str
+ r"""If you have not set a specific username in ClickHouse, simply type in 'default' below."""
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+ table: NotRequired[str]
+
+
+class ObservabilityClickhouseDestinationConfig(BaseModel):
+ database: str
+
+ host: str
+
+ password: str
+
+ username: str
+ r"""If you have not set a specific username in ClickHouse, simply type in 'default' below."""
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+ table: Optional[str] = "OPENROUTER_TRACES"
+
+
+ObservabilityClickhouseDestinationType = Literal["clickhouse",]
+
+
+class ObservabilityClickhouseDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityClickhouseDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityClickhouseDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityClickhouseDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityClickhouseDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityClickhouseDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitydatadogdestination.py b/src/openrouter/components/observabilitydatadogdestination.py
new file mode 100644
index 0000000..8043ffc
--- /dev/null
+++ b/src/openrouter/components/observabilitydatadogdestination.py
@@ -0,0 +1,131 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityDatadogDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ r"""Datadog API key must have LLM Observability permissions. Create at:"""
+ ml_app: str
+ r"""Name to identify your application in Datadog LLM Observability"""
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+ url: NotRequired[str]
+ r"""Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu)"""
+
+
+class ObservabilityDatadogDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+ r"""Datadog API key must have LLM Observability permissions. Create at:"""
+
+ ml_app: Annotated[str, pydantic.Field(alias="mlApp")]
+ r"""Name to identify your application in Datadog LLM Observability"""
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+ url: Optional[str] = "https://api.us5.datadoghq.com"
+ r"""Datadog API URL for your region (e.g., https://api.datadoghq.com, https://api.us3.datadoghq.com, https://api.datadoghq.eu)"""
+
+
+ObservabilityDatadogDestinationType = Literal["datadog",]
+
+
+class ObservabilityDatadogDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityDatadogDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityDatadogDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityDatadogDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityDatadogDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityDatadogDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitydestination.py b/src/openrouter/components/observabilitydestination.py
new file mode 100644
index 0000000..340a94c
--- /dev/null
+++ b/src/openrouter/components/observabilitydestination.py
@@ -0,0 +1,123 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityarizedestination import (
+ ObservabilityArizeDestination,
+ ObservabilityArizeDestinationTypedDict,
+)
+from .observabilitybraintrustdestination import (
+ ObservabilityBraintrustDestination,
+ ObservabilityBraintrustDestinationTypedDict,
+)
+from .observabilityclickhousedestination import (
+ ObservabilityClickhouseDestination,
+ ObservabilityClickhouseDestinationTypedDict,
+)
+from .observabilitydatadogdestination import (
+ ObservabilityDatadogDestination,
+ ObservabilityDatadogDestinationTypedDict,
+)
+from .observabilitygrafanadestination import (
+ ObservabilityGrafanaDestination,
+ ObservabilityGrafanaDestinationTypedDict,
+)
+from .observabilitylangfusedestination import (
+ ObservabilityLangfuseDestination,
+ ObservabilityLangfuseDestinationTypedDict,
+)
+from .observabilitylangsmithdestination import (
+ ObservabilityLangsmithDestination,
+ ObservabilityLangsmithDestinationTypedDict,
+)
+from .observabilitynewrelicdestination import (
+ ObservabilityNewrelicDestination,
+ ObservabilityNewrelicDestinationTypedDict,
+)
+from .observabilityopikdestination import (
+ ObservabilityOpikDestination,
+ ObservabilityOpikDestinationTypedDict,
+)
+from .observabilityotelcollectordestination import (
+ ObservabilityOtelCollectorDestination,
+ ObservabilityOtelCollectorDestinationTypedDict,
+)
+from .observabilityposthogdestination import (
+ ObservabilityPosthogDestination,
+ ObservabilityPosthogDestinationTypedDict,
+)
+from .observabilityrampdestination import (
+ ObservabilityRampDestination,
+ ObservabilityRampDestinationTypedDict,
+)
+from .observabilitys3destination import (
+ ObservabilityS3Destination,
+ ObservabilityS3DestinationTypedDict,
+)
+from .observabilitysentrydestination import (
+ ObservabilitySentryDestination,
+ ObservabilitySentryDestinationTypedDict,
+)
+from .observabilitysnowflakedestination import (
+ ObservabilitySnowflakeDestination,
+ ObservabilitySnowflakeDestinationTypedDict,
+)
+from .observabilityweavedestination import (
+ ObservabilityWeaveDestination,
+ ObservabilityWeaveDestinationTypedDict,
+)
+from .observabilitywebhookdestination import (
+ ObservabilityWebhookDestination,
+ ObservabilityWebhookDestinationTypedDict,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
+
+
+ObservabilityDestinationTypedDict = TypeAliasType(
+ "ObservabilityDestinationTypedDict",
+ Union[
+ ObservabilityArizeDestinationTypedDict,
+ ObservabilityBraintrustDestinationTypedDict,
+ ObservabilityClickhouseDestinationTypedDict,
+ ObservabilityDatadogDestinationTypedDict,
+ ObservabilityGrafanaDestinationTypedDict,
+ ObservabilityLangfuseDestinationTypedDict,
+ ObservabilityLangsmithDestinationTypedDict,
+ ObservabilityNewrelicDestinationTypedDict,
+ ObservabilityOpikDestinationTypedDict,
+ ObservabilityOtelCollectorDestinationTypedDict,
+ ObservabilityPosthogDestinationTypedDict,
+ ObservabilityRampDestinationTypedDict,
+ ObservabilityS3DestinationTypedDict,
+ ObservabilitySentryDestinationTypedDict,
+ ObservabilitySnowflakeDestinationTypedDict,
+ ObservabilityWeaveDestinationTypedDict,
+ ObservabilityWebhookDestinationTypedDict,
+ ],
+)
+
+
+ObservabilityDestination = Annotated[
+ Union[
+ Annotated[ObservabilityArizeDestination, Tag("arize")],
+ Annotated[ObservabilityBraintrustDestination, Tag("braintrust")],
+ Annotated[ObservabilityClickhouseDestination, Tag("clickhouse")],
+ Annotated[ObservabilityDatadogDestination, Tag("datadog")],
+ Annotated[ObservabilityGrafanaDestination, Tag("grafana")],
+ Annotated[ObservabilityLangfuseDestination, Tag("langfuse")],
+ Annotated[ObservabilityLangsmithDestination, Tag("langsmith")],
+ Annotated[ObservabilityNewrelicDestination, Tag("newrelic")],
+ Annotated[ObservabilityOpikDestination, Tag("opik")],
+ Annotated[ObservabilityOtelCollectorDestination, Tag("otel-collector")],
+ Annotated[ObservabilityPosthogDestination, Tag("posthog")],
+ Annotated[ObservabilityRampDestination, Tag("ramp")],
+ Annotated[ObservabilityS3Destination, Tag("s3")],
+ Annotated[ObservabilitySentryDestination, Tag("sentry")],
+ Annotated[ObservabilitySnowflakeDestination, Tag("snowflake")],
+ Annotated[ObservabilityWeaveDestination, Tag("weave")],
+ Annotated[ObservabilityWebhookDestination, Tag("webhook")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
diff --git a/src/openrouter/components/observabilityfilterrulesconfig.py b/src/openrouter/components/observabilityfilterrulesconfig.py
new file mode 100644
index 0000000..25fc9cf
--- /dev/null
+++ b/src/openrouter/components/observabilityfilterrulesconfig.py
@@ -0,0 +1,106 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+Logic = Union[
+ Literal[
+ "and",
+ "or",
+ ],
+ UnrecognizedStr,
+]
+
+
+FieldT = Union[
+ Literal[
+ "model",
+ "provider",
+ "session_id",
+ "user_id",
+ "api_key_name",
+ "finish_reason",
+ "input",
+ "output",
+ "total_cost",
+ "total_tokens",
+ "prompt_tokens",
+ "completion_tokens",
+ ],
+ UnrecognizedStr,
+]
+
+
+Operator = Union[
+ Literal[
+ "equals",
+ "not_equals",
+ "contains",
+ "not_contains",
+ "regex",
+ "starts_with",
+ "ends_with",
+ "gt",
+ "lt",
+ "gte",
+ "lte",
+ "exists",
+ "not_exists",
+ ],
+ UnrecognizedStr,
+]
+
+
+ObservabilityFilterRulesConfigValueTypedDict = TypeAliasType(
+ "ObservabilityFilterRulesConfigValueTypedDict", Union[str, float]
+)
+
+
+ObservabilityFilterRulesConfigValue = TypeAliasType(
+ "ObservabilityFilterRulesConfigValue", Union[str, float]
+)
+
+
+class RuleTypedDict(TypedDict):
+ field: FieldT
+ operator: Operator
+ value: NotRequired[ObservabilityFilterRulesConfigValueTypedDict]
+
+
+class Rule(BaseModel):
+ field: Annotated[FieldT, PlainValidator(validate_open_enum(False))]
+
+ operator: Annotated[Operator, PlainValidator(validate_open_enum(False))]
+
+ value: Optional[ObservabilityFilterRulesConfigValue] = None
+
+
+class GroupTypedDict(TypedDict):
+ rules: List[RuleTypedDict]
+ logic: NotRequired[Logic]
+
+
+class Group(BaseModel):
+ rules: List[Rule]
+
+ logic: Annotated[Optional[Logic], PlainValidator(validate_open_enum(False))] = "and"
+
+
+class ObservabilityFilterRulesConfigTypedDict(TypedDict):
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ groups: List[GroupTypedDict]
+ enabled: NotRequired[bool]
+
+
+class ObservabilityFilterRulesConfig(BaseModel):
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ groups: List[Group]
+
+ enabled: Optional[bool] = True
diff --git a/src/openrouter/components/observabilitygrafanadestination.py b/src/openrouter/components/observabilitygrafanadestination.py
new file mode 100644
index 0000000..184ba8b
--- /dev/null
+++ b/src/openrouter/components/observabilitygrafanadestination.py
@@ -0,0 +1,127 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityGrafanaDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ instance_id: str
+ base_url: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityGrafanaDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ instance_id: Annotated[str, pydantic.Field(alias="instanceId")]
+
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = (
+ "https://otlp-gateway-prod-us-west-0.grafana.net"
+ )
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityGrafanaDestinationType = Literal["grafana",]
+
+
+class ObservabilityGrafanaDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityGrafanaDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityGrafanaDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityGrafanaDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityGrafanaDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityGrafanaDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitylangfusedestination.py b/src/openrouter/components/observabilitylangfusedestination.py
new file mode 100644
index 0000000..a2ceb50
--- /dev/null
+++ b/src/openrouter/components/observabilitylangfusedestination.py
@@ -0,0 +1,127 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityLangfuseDestinationConfigTypedDict(TypedDict):
+ public_key: str
+ secret_key: str
+ base_url: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityLangfuseDestinationConfig(BaseModel):
+ public_key: Annotated[str, pydantic.Field(alias="publicKey")]
+
+ secret_key: Annotated[str, pydantic.Field(alias="secretKey")]
+
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = (
+ "https://us.cloud.langfuse.com"
+ )
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityLangfuseDestinationType = Literal["langfuse",]
+
+
+class ObservabilityLangfuseDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityLangfuseDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityLangfuseDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityLangfuseDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityLangfuseDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityLangfuseDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitylangsmithdestination.py b/src/openrouter/components/observabilitylangsmithdestination.py
new file mode 100644
index 0000000..cbde970
--- /dev/null
+++ b/src/openrouter/components/observabilitylangsmithdestination.py
@@ -0,0 +1,132 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityLangsmithDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ endpoint: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+ project: NotRequired[str]
+ r"""The name for this project, such as pr-openrouter-demo. Defaults to \"main\" if not set."""
+ workspace_id: NotRequired[str]
+ r"""Required for org-scoped API keys. Find this in your LangSmith workspace settings."""
+
+
+class ObservabilityLangsmithDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ endpoint: Optional[str] = "https://api.smith.langchain.com"
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+ project: Optional[str] = "main"
+ r"""The name for this project, such as pr-openrouter-demo. Defaults to \"main\" if not set."""
+
+ workspace_id: Annotated[Optional[str], pydantic.Field(alias="workspaceId")] = None
+ r"""Required for org-scoped API keys. Find this in your LangSmith workspace settings."""
+
+
+ObservabilityLangsmithDestinationType = Literal["langsmith",]
+
+
+class ObservabilityLangsmithDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityLangsmithDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityLangsmithDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityLangsmithDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityLangsmithDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityLangsmithDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitynewrelicdestination.py b/src/openrouter/components/observabilitynewrelicdestination.py
new file mode 100644
index 0000000..b0560ca
--- /dev/null
+++ b/src/openrouter/components/observabilitynewrelicdestination.py
@@ -0,0 +1,135 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+Region = Union[
+ Literal[
+ "us",
+ "eu",
+ ],
+ UnrecognizedStr,
+]
+
+
+class ObservabilityNewrelicDestinationConfigTypedDict(TypedDict):
+ license_key: str
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+ region: NotRequired[Region]
+
+
+class ObservabilityNewrelicDestinationConfig(BaseModel):
+ license_key: Annotated[str, pydantic.Field(alias="licenseKey")]
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+ region: Annotated[Optional[Region], PlainValidator(validate_open_enum(False))] = (
+ "us"
+ )
+
+
+ObservabilityNewrelicDestinationType = Literal["newrelic",]
+
+
+class ObservabilityNewrelicDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityNewrelicDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityNewrelicDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityNewrelicDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityNewrelicDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityNewrelicDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilityopikdestination.py b/src/openrouter/components/observabilityopikdestination.py
new file mode 100644
index 0000000..eaf453b
--- /dev/null
+++ b/src/openrouter/components/observabilityopikdestination.py
@@ -0,0 +1,125 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityOpikDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ project_name: str
+ workspace: str
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityOpikDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ project_name: Annotated[str, pydantic.Field(alias="projectName")]
+
+ workspace: str
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityOpikDestinationType = Literal["opik",]
+
+
+class ObservabilityOpikDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityOpikDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityOpikDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityOpikDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityOpikDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityOpikDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilityotelcollectordestination.py b/src/openrouter/components/observabilityotelcollectordestination.py
new file mode 100644
index 0000000..f58eeb0
--- /dev/null
+++ b/src/openrouter/components/observabilityotelcollectordestination.py
@@ -0,0 +1,118 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class ObservabilityOtelCollectorDestinationConfigTypedDict(TypedDict):
+ endpoint: str
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers as a JSON object. For Axiom, use {\"Authorization\": \"Bearer xaat-xxx\", \"X-Axiom-Dataset\": \"your-dataset\"}"""
+
+
+class ObservabilityOtelCollectorDestinationConfig(BaseModel):
+ endpoint: str
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers as a JSON object. For Axiom, use {\"Authorization\": \"Bearer xaat-xxx\", \"X-Axiom-Dataset\": \"your-dataset\"}"""
+
+
+ObservabilityOtelCollectorDestinationType = Literal["otel-collector",]
+
+
+class ObservabilityOtelCollectorDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityOtelCollectorDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityOtelCollectorDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityOtelCollectorDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityOtelCollectorDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityOtelCollectorDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilityposthogdestination.py b/src/openrouter/components/observabilityposthogdestination.py
new file mode 100644
index 0000000..abee5d8
--- /dev/null
+++ b/src/openrouter/components/observabilityposthogdestination.py
@@ -0,0 +1,122 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityPosthogDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ endpoint: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityPosthogDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ endpoint: Optional[str] = "https://us.i.posthog.com"
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityPosthogDestinationType = Literal["posthog",]
+
+
+class ObservabilityPosthogDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityPosthogDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityPosthogDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityPosthogDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityPosthogDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityPosthogDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilityrampdestination.py b/src/openrouter/components/observabilityrampdestination.py
new file mode 100644
index 0000000..f8e119c
--- /dev/null
+++ b/src/openrouter/components/observabilityrampdestination.py
@@ -0,0 +1,126 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityRampDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ r"""Generate this in your Ramp integration settings."""
+ base_url: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to Ramp."""
+
+
+class ObservabilityRampDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+ r"""Generate this in your Ramp integration settings."""
+
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = (
+ "https://api.ramp.com/developer/v1/ai-usage/openrouter"
+ )
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to Ramp."""
+
+
+ObservabilityRampDestinationType = Literal["ramp",]
+
+
+class ObservabilityRampDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityRampDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityRampDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityRampDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityRampDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityRampDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitys3destination.py b/src/openrouter/components/observabilitys3destination.py
new file mode 100644
index 0000000..96ea2a8
--- /dev/null
+++ b/src/openrouter/components/observabilitys3destination.py
@@ -0,0 +1,146 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityS3DestinationConfigTypedDict(TypedDict):
+ access_key_id: str
+ bucket_name: str
+ secret_access_key: str
+ endpoint: NotRequired[str]
+ r"""Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3."""
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+ path_template: NotRequired[str]
+ r"""Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}"""
+ prefix: NotRequired[str]
+ region: NotRequired[str]
+ session_token: NotRequired[str]
+
+
+class ObservabilityS3DestinationConfig(BaseModel):
+ access_key_id: Annotated[str, pydantic.Field(alias="accessKeyId")]
+
+ bucket_name: Annotated[str, pydantic.Field(alias="bucketName")]
+
+ secret_access_key: Annotated[str, pydantic.Field(alias="secretAccessKey")]
+
+ endpoint: Optional[str] = None
+ r"""Only for S3-compatible services like Cloudflare R2 (https://account-id.r2.cloudflarestorage.com) or MinIO. Leave blank for standard AWS S3."""
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+ path_template: Annotated[Optional[str], pydantic.Field(alias="pathTemplate")] = (
+ "{prefix}/{date}"
+ )
+ r"""Template for S3 object path. The filename ({traceId}-{timestamp}.json) is automatically appended. Available variables: {prefix}, {date}, {year}, {month}, {day}, {apiKeyName}"""
+
+ prefix: Optional[str] = "openrouter-traces"
+
+ region: Optional[str] = None
+
+ session_token: Annotated[Optional[str], pydantic.Field(alias="sessionToken")] = None
+
+
+ObservabilityS3DestinationType = Literal["s3",]
+
+
+class ObservabilityS3DestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityS3DestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityS3DestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityS3Destination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityS3DestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityS3DestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitysentrydestination.py b/src/openrouter/components/observabilitysentrydestination.py
new file mode 100644
index 0000000..77f86c7
--- /dev/null
+++ b/src/openrouter/components/observabilitysentrydestination.py
@@ -0,0 +1,122 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilitySentryDestinationConfigTypedDict(TypedDict):
+ dsn: str
+ otlp_endpoint: str
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilitySentryDestinationConfig(BaseModel):
+ dsn: str
+
+ otlp_endpoint: Annotated[str, pydantic.Field(alias="otlpEndpoint")]
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilitySentryDestinationType = Literal["sentry",]
+
+
+class ObservabilitySentryDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilitySentryDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilitySentryDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilitySentryDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilitySentryDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilitySentryDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitysnowflakedestination.py b/src/openrouter/components/observabilitysnowflakedestination.py
new file mode 100644
index 0000000..e6552f7
--- /dev/null
+++ b/src/openrouter/components/observabilitysnowflakedestination.py
@@ -0,0 +1,134 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilitySnowflakeDestinationConfigTypedDict(TypedDict):
+ account: str
+ token: str
+ database: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+ schema_: NotRequired[str]
+ table: NotRequired[str]
+ warehouse: NotRequired[str]
+
+
+class ObservabilitySnowflakeDestinationConfig(BaseModel):
+ account: str
+
+ token: str
+
+ database: Optional[str] = "SNOWFLAKE_LEARNING_DB"
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+ schema_: Annotated[Optional[str], pydantic.Field(alias="schema")] = "PUBLIC"
+
+ table: Optional[str] = "OPENROUTER_TRACES"
+
+ warehouse: Optional[str] = "COMPUTE_WH"
+
+
+ObservabilitySnowflakeDestinationType = Literal["snowflake",]
+
+
+class ObservabilitySnowflakeDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilitySnowflakeDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilitySnowflakeDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilitySnowflakeDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilitySnowflakeDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilitySnowflakeDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilityweavedestination.py b/src/openrouter/components/observabilityweavedestination.py
new file mode 100644
index 0000000..8474c7c
--- /dev/null
+++ b/src/openrouter/components/observabilityweavedestination.py
@@ -0,0 +1,130 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ObservabilityWeaveDestinationConfigTypedDict(TypedDict):
+ api_key: str
+ entity: str
+ project: str
+ base_url: NotRequired[str]
+ headers: NotRequired[Dict[str, str]]
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+class ObservabilityWeaveDestinationConfig(BaseModel):
+ api_key: Annotated[str, pydantic.Field(alias="apiKey")]
+
+ entity: str
+
+ project: str
+
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = (
+ "https://trace.wandb.ai"
+ )
+
+ headers: Optional[Dict[str, str]] = None
+ r"""Custom HTTP headers to include in requests to this destination."""
+
+
+ObservabilityWeaveDestinationType = Literal["weave",]
+
+
+class ObservabilityWeaveDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityWeaveDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityWeaveDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityWeaveDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityWeaveDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityWeaveDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/observabilitywebhookdestination.py b/src/openrouter/components/observabilitywebhookdestination.py
new file mode 100644
index 0000000..3eced6d
--- /dev/null
+++ b/src/openrouter/components/observabilitywebhookdestination.py
@@ -0,0 +1,132 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+Method = Union[
+ Literal[
+ "POST",
+ "PUT",
+ ],
+ UnrecognizedStr,
+]
+
+
+class ObservabilityWebhookDestinationConfigTypedDict(TypedDict):
+ url: str
+ headers: NotRequired[Dict[str, str]]
+ method: NotRequired[Method]
+
+
+class ObservabilityWebhookDestinationConfig(BaseModel):
+ url: str
+
+ headers: Optional[Dict[str, str]] = None
+
+ method: Annotated[Optional[Method], PlainValidator(validate_open_enum(False))] = (
+ "POST"
+ )
+
+
+ObservabilityWebhookDestinationType = Literal["webhook",]
+
+
+class ObservabilityWebhookDestinationTypedDict(TypedDict):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+ config: ObservabilityWebhookDestinationConfigTypedDict
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+ filter_rules: Nullable[ObservabilityFilterRulesConfigTypedDict]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+ id: str
+ r"""Stable public identifier for this destination."""
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+ type: ObservabilityWebhookDestinationType
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+
+class ObservabilityWebhookDestination(BaseModel):
+ api_key_hashes: Nullable[List[str]]
+ r"""Optional allowlist of OpenRouter API key hashes (`api_keys.hash`) whose traffic is forwarded to this destination. `null` means all keys."""
+
+ config: ObservabilityWebhookDestinationConfig
+
+ created_at: str
+ r"""ISO timestamp of when the destination was created."""
+
+ enabled: bool
+ r"""Whether this destination is currently enabled."""
+
+ filter_rules: Nullable[ObservabilityFilterRulesConfig]
+ r"""Optional structured filter rules controlling which events are forwarded."""
+
+ id: str
+ r"""Stable public identifier for this destination."""
+
+ name: Nullable[str]
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: bool
+ r"""When true, request/response bodies are not forwarded to this destination — only metadata."""
+
+ sampling_rate: float
+ r"""Sampling rate for events sent to this destination, between 0.0001 and 1 (1 = 100%)."""
+
+ type: ObservabilityWebhookDestinationType
+
+ updated_at: str
+ r"""ISO timestamp of when the destination was last updated."""
+
+ workspace_id: str
+ r"""ID of the workspace this destination belongs to."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["api_key_hashes", "filter_rules", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/openairesponsecustomtoolcall.py b/src/openrouter/components/openairesponsecustomtoolcall.py
new file mode 100644
index 0000000..a7c4d28
--- /dev/null
+++ b/src/openrouter/components/openairesponsecustomtoolcall.py
@@ -0,0 +1,34 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+OpenAIResponseCustomToolCallType = Literal["custom_tool_call",]
+
+
+class OpenAIResponseCustomToolCallTypedDict(TypedDict):
+ call_id: str
+ input: str
+ name: str
+ type: OpenAIResponseCustomToolCallType
+ id: NotRequired[str]
+ namespace: NotRequired[str]
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
+
+
+class OpenAIResponseCustomToolCall(BaseModel):
+ call_id: str
+
+ input: str
+
+ name: str
+
+ type: OpenAIResponseCustomToolCallType
+
+ id: Optional[str] = None
+
+ namespace: Optional[str] = None
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
diff --git a/src/openrouter/components/openairesponsecustomtoolcalloutput.py b/src/openrouter/components/openairesponsecustomtoolcalloutput.py
new file mode 100644
index 0000000..1fdfc55
--- /dev/null
+++ b/src/openrouter/components/openairesponsecustomtoolcalloutput.py
@@ -0,0 +1,59 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .inputfile import InputFile, InputFileTypedDict
+from .inputimage import InputImage, InputImageTypedDict
+from .inputtext import InputText, InputTextTypedDict
+from openrouter.types import BaseModel
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+OpenAIResponseCustomToolCallOutputOutput1TypedDict = TypeAliasType(
+ "OpenAIResponseCustomToolCallOutputOutput1TypedDict",
+ Union[InputTextTypedDict, InputImageTypedDict, InputFileTypedDict],
+)
+
+
+OpenAIResponseCustomToolCallOutputOutput1 = Annotated[
+ Union[
+ Annotated[InputFile, Tag("input_file")],
+ Annotated[InputImage, Tag("input_image")],
+ Annotated[InputText, Tag("input_text")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+OpenAIResponseCustomToolCallOutputOutput2TypedDict = TypeAliasType(
+ "OpenAIResponseCustomToolCallOutputOutput2TypedDict",
+ Union[str, List[OpenAIResponseCustomToolCallOutputOutput1TypedDict]],
+)
+
+
+OpenAIResponseCustomToolCallOutputOutput2 = TypeAliasType(
+ "OpenAIResponseCustomToolCallOutputOutput2",
+ Union[str, List[OpenAIResponseCustomToolCallOutputOutput1]],
+)
+
+
+OpenAIResponseCustomToolCallOutputType = Literal["custom_tool_call_output",]
+
+
+class OpenAIResponseCustomToolCallOutputTypedDict(TypedDict):
+ call_id: str
+ output: OpenAIResponseCustomToolCallOutputOutput2TypedDict
+ type: OpenAIResponseCustomToolCallOutputType
+ id: NotRequired[str]
+
+
+class OpenAIResponseCustomToolCallOutput(BaseModel):
+ call_id: str
+
+ output: OpenAIResponseCustomToolCallOutputOutput2
+
+ type: OpenAIResponseCustomToolCallOutputType
+
+ id: Optional[str] = None
diff --git a/src/openrouter/components/openairesponsefunctiontoolcall.py b/src/openrouter/components/openairesponsefunctiontoolcall.py
index f3a4cf7..2c0fa25 100644
--- a/src/openrouter/components/openairesponsefunctiontoolcall.py
+++ b/src/openrouter/components/openairesponsefunctiontoolcall.py
@@ -18,6 +18,8 @@ class OpenAIResponseFunctionToolCallTypedDict(TypedDict):
name: str
type: OpenAIResponseFunctionToolCallType
id: NotRequired[str]
+ namespace: NotRequired[str]
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
status: NotRequired[ToolCallStatus]
@@ -32,6 +34,9 @@ class OpenAIResponseFunctionToolCall(BaseModel):
id: Optional[str] = None
+ namespace: Optional[str] = None
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
+
status: Annotated[
Optional[ToolCallStatus], PlainValidator(validate_open_enum(False))
] = None
diff --git a/src/openrouter/components/openairesponsestoolchoice_union.py b/src/openrouter/components/openairesponsestoolchoice_union.py
index cca8c5f..edcd5ae 100644
--- a/src/openrouter/components/openairesponsestoolchoice_union.py
+++ b/src/openrouter/components/openairesponsestoolchoice_union.py
@@ -7,6 +7,28 @@ from typing import Literal, Union
from typing_extensions import TypeAliasType, TypedDict
+OpenAIResponsesToolChoiceTypeShell = Literal["shell",]
+
+
+class OpenAIResponsesToolChoiceShellTypedDict(TypedDict):
+ type: OpenAIResponsesToolChoiceTypeShell
+
+
+class OpenAIResponsesToolChoiceShell(BaseModel):
+ type: OpenAIResponsesToolChoiceTypeShell
+
+
+OpenAIResponsesToolChoiceTypeApplyPatch = Literal["apply_patch",]
+
+
+class OpenAIResponsesToolChoiceApplyPatchTypedDict(TypedDict):
+ type: OpenAIResponsesToolChoiceTypeApplyPatch
+
+
+class OpenAIResponsesToolChoiceApplyPatch(BaseModel):
+ type: OpenAIResponsesToolChoiceTypeApplyPatch
+
+
OpenAIResponsesToolChoiceTypeWebSearchPreview = Literal["web_search_preview",]
@@ -68,6 +90,8 @@ OpenAIResponsesToolChoiceUnionTypedDict = TypeAliasType(
"OpenAIResponsesToolChoiceUnionTypedDict",
Union[
OpenAIResponsesToolChoiceTypedDict,
+ OpenAIResponsesToolChoiceApplyPatchTypedDict,
+ OpenAIResponsesToolChoiceShellTypedDict,
OpenAIResponsesToolChoiceFunctionTypedDict,
ToolChoiceAllowedTypedDict,
OpenAIResponsesToolChoiceAuto,
@@ -81,6 +105,8 @@ OpenAIResponsesToolChoiceUnion = TypeAliasType(
"OpenAIResponsesToolChoiceUnion",
Union[
OpenAIResponsesToolChoice,
+ OpenAIResponsesToolChoiceApplyPatch,
+ OpenAIResponsesToolChoiceShell,
OpenAIResponsesToolChoiceFunction,
ToolChoiceAllowed,
OpenAIResponsesToolChoiceAuto,
diff --git a/src/openrouter/components/openresponsesresult.py b/src/openrouter/components/openresponsesresult.py
index fa04955..60eaf9f 100644
--- a/src/openrouter/components/openresponsesresult.py
+++ b/src/openrouter/components/openresponsesresult.py
@@ -27,6 +27,7 @@ from .openairesponsestoolchoice_union import (
OpenAIResponsesToolChoiceUnion,
OpenAIResponsesToolChoiceUnionTypedDict,
)
+from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict
from .outputitems import OutputItems, OutputItemsTypedDict
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
@@ -39,7 +40,7 @@ from .preview_websearchservertool import (
from .responseserrorfield import ResponsesErrorField, ResponsesErrorFieldTypedDict
from .shellservertool import ShellServerTool, ShellServerToolTypedDict
from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict
-from .textconfig import TextConfig, TextConfigTypedDict
+from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict
from .truncation import Truncation
from .usage import Usage, UsageTypedDict
from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict
@@ -195,13 +196,14 @@ class OpenResponsesResultTypedDict(TypedDict):
safety_identifier: NotRequired[Nullable[str]]
service_tier: NotRequired[Nullable[str]]
store: NotRequired[bool]
- text: NotRequired[TextConfigTypedDict]
+ text: NotRequired[TextExtendedConfigTypedDict]
r"""Text output configuration including format and verbosity"""
top_logprobs: NotRequired[int]
truncation: NotRequired[Nullable[Truncation]]
usage: NotRequired[Nullable[UsageTypedDict]]
r"""Token usage information for the response"""
user: NotRequired[Nullable[str]]
+ openrouter_metadata: NotRequired[OpenRouterMetadataTypedDict]
class OpenResponsesResult(BaseModel):
@@ -269,7 +271,7 @@ class OpenResponsesResult(BaseModel):
store: Optional[bool] = None
- text: Optional[TextConfig] = None
+ text: Optional[TextExtendedConfig] = None
r"""Text output configuration including format and verbosity"""
top_logprobs: Optional[int] = None
@@ -283,6 +285,8 @@ class OpenResponsesResult(BaseModel):
user: OptionalNullable[str] = UNSET
+ openrouter_metadata: Optional[OpenRouterMetadata] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
@@ -302,6 +306,7 @@ class OpenResponsesResult(BaseModel):
"truncation",
"usage",
"user",
+ "openrouter_metadata",
]
nullable_fields = [
"background",
diff --git a/src/openrouter/components/openroutermetadata.py b/src/openrouter/components/openroutermetadata.py
new file mode 100644
index 0000000..bc1d7f3
--- /dev/null
+++ b/src/openrouter/components/openroutermetadata.py
@@ -0,0 +1,79 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .endpointsmetadata import EndpointsMetadata, EndpointsMetadataTypedDict
+from .pipelinestage import PipelineStage, PipelineStageTypedDict
+from .routerattempt import RouterAttempt, RouterAttemptTypedDict
+from .routerparams import RouterParams, RouterParamsTypedDict
+from .routingstrategy import RoutingStrategy
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class OpenRouterMetadataTypedDict(TypedDict):
+ attempt: int
+ endpoints: EndpointsMetadataTypedDict
+ is_byok: bool
+ region: Nullable[str]
+ requested: str
+ strategy: RoutingStrategy
+ summary: str
+ attempts: NotRequired[List[RouterAttemptTypedDict]]
+ params: NotRequired[RouterParamsTypedDict]
+ pipeline: NotRequired[List[PipelineStageTypedDict]]
+
+
+class OpenRouterMetadata(BaseModel):
+ attempt: int
+
+ endpoints: EndpointsMetadata
+
+ is_byok: bool
+
+ region: Nullable[str]
+
+ requested: str
+
+ strategy: Annotated[RoutingStrategy, PlainValidator(validate_open_enum(False))]
+
+ summary: str
+
+ attempts: Optional[List[RouterAttempt]] = None
+
+ params: Optional[RouterParams] = None
+
+ pipeline: Optional[List[PipelineStage]] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["attempts", "params", "pipeline"]
+ nullable_fields = ["region"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/outputadvisorservertoolitem.py b/src/openrouter/components/outputadvisorservertoolitem.py
new file mode 100644
index 0000000..0387112
--- /dev/null
+++ b/src/openrouter/components/outputadvisorservertoolitem.py
@@ -0,0 +1,55 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputAdvisorServerToolItemType = Literal["openrouter:advisor",]
+
+
+class OutputAdvisorServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:advisor server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputAdvisorServerToolItemType
+ advice: NotRequired[str]
+ r"""The advisor model's response (the advice text returned to the executor)."""
+ error: NotRequired[str]
+ r"""Error message when the advisor call did not produce advice."""
+ id: NotRequired[str]
+ instance_name: NotRequired[str]
+ r"""Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."""
+ model: NotRequired[str]
+ r"""Slug of the advisor model that was consulted."""
+ prompt: NotRequired[str]
+ r"""The prompt the executor sent to the advisor."""
+
+
+class OutputAdvisorServerToolItem(BaseModel):
+ r"""An openrouter:advisor server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputAdvisorServerToolItemType
+
+ advice: Optional[str] = None
+ r"""The advisor model's response (the advice text returned to the executor)."""
+
+ error: Optional[str] = None
+ r"""Error message when the advisor call did not produce advice."""
+
+ id: Optional[str] = None
+
+ instance_name: Optional[str] = None
+ r"""Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance."""
+
+ model: Optional[str] = None
+ r"""Slug of the advisor model that was consulted."""
+
+ prompt: Optional[str] = None
+ r"""The prompt the executor sent to the advisor."""
diff --git a/src/openrouter/components/outputapplypatchcallitem.py b/src/openrouter/components/outputapplypatchcallitem.py
new file mode 100644
index 0000000..14c0201
--- /dev/null
+++ b/src/openrouter/components/outputapplypatchcallitem.py
@@ -0,0 +1,44 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .applypatchcalloperation import (
+ ApplyPatchCallOperation,
+ ApplyPatchCallOperationTypedDict,
+)
+from .applypatchcallstatus import ApplyPatchCallStatus
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal
+from typing_extensions import Annotated, TypedDict
+
+
+OutputApplyPatchCallItemType = Literal["apply_patch_call",]
+
+
+class OutputApplyPatchCallItemTypedDict(TypedDict):
+ r"""A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."""
+
+ call_id: str
+ id: str
+ operation: ApplyPatchCallOperationTypedDict
+ r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
+ status: ApplyPatchCallStatus
+ r"""Lifecycle state of an `apply_patch_call` output item."""
+ type: OutputApplyPatchCallItemType
+
+
+class OutputApplyPatchCallItem(BaseModel):
+ r"""A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand."""
+
+ call_id: str
+
+ id: str
+
+ operation: ApplyPatchCallOperation
+ r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
+
+ status: Annotated[ApplyPatchCallStatus, PlainValidator(validate_open_enum(False))]
+ r"""Lifecycle state of an `apply_patch_call` output item."""
+
+ type: OutputApplyPatchCallItemType
diff --git a/src/openrouter/components/outputapplypatchservertoolitem.py b/src/openrouter/components/outputapplypatchservertoolitem.py
index 5b2be1e..96d4dac 100644
--- a/src/openrouter/components/outputapplypatchservertoolitem.py
+++ b/src/openrouter/components/outputapplypatchservertoolitem.py
@@ -1,10 +1,13 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .applypatchcalloperation import (
+ ApplyPatchCallOperation,
+ ApplyPatchCallOperationTypedDict,
+)
from .toolcallstatus import ToolCallStatus
from openrouter.types import BaseModel
from openrouter.utils import validate_open_enum
-import pydantic
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -14,24 +17,26 @@ OutputApplyPatchServerToolItemType = Literal["openrouter:apply_patch",]
class OutputApplyPatchServerToolItemTypedDict(TypedDict):
- r"""An openrouter:apply_patch server tool output item"""
+ r"""An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn."""
status: ToolCallStatus
type: OutputApplyPatchServerToolItemType
- file_path: NotRequired[str]
+ call_id: NotRequired[str]
id: NotRequired[str]
- patch: NotRequired[str]
+ operation: NotRequired[ApplyPatchCallOperationTypedDict]
+ r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
class OutputApplyPatchServerToolItem(BaseModel):
- r"""An openrouter:apply_patch server tool output item"""
+ r"""An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn."""
status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
type: OutputApplyPatchServerToolItemType
- file_path: Annotated[Optional[str], pydantic.Field(alias="filePath")] = None
+ call_id: Optional[str] = None
id: Optional[str] = None
- patch: Optional[str] = None
+ operation: Optional[ApplyPatchCallOperation] = None
+ r"""The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it."""
diff --git a/src/openrouter/components/outputcodeinterpretercallitem.py b/src/openrouter/components/outputcodeinterpretercallitem.py
index a2363f9..e322182 100644
--- a/src/openrouter/components/outputcodeinterpretercallitem.py
+++ b/src/openrouter/components/outputcodeinterpretercallitem.py
@@ -24,16 +24,16 @@ class OutputLogs(BaseModel):
type: TypeLogs
-TypeImage = Literal["image",]
+OutputCodeInterpreterCallItemTypeImage = Literal["image",]
class OutputImageTypedDict(TypedDict):
- type: TypeImage
+ type: OutputCodeInterpreterCallItemTypeImage
url: str
class OutputImage(BaseModel):
- type: TypeImage
+ type: OutputCodeInterpreterCallItemTypeImage
url: str
diff --git a/src/openrouter/components/outputcustomtoolcallitem.py b/src/openrouter/components/outputcustomtoolcallitem.py
new file mode 100644
index 0000000..5c3049d
--- /dev/null
+++ b/src/openrouter/components/outputcustomtoolcallitem.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+OutputCustomToolCallItemType = Literal["custom_tool_call",]
+
+
+class OutputCustomToolCallItemTypedDict(TypedDict):
+ r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments."""
+
+ call_id: str
+ input: str
+ name: str
+ type: OutputCustomToolCallItemType
+ id: NotRequired[str]
+ namespace: NotRequired[str]
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
+
+
+class OutputCustomToolCallItem(BaseModel):
+ r"""A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments."""
+
+ call_id: str
+
+ input: str
+
+ name: str
+
+ type: OutputCustomToolCallItemType
+
+ id: Optional[str] = None
+
+ namespace: Optional[str] = None
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
diff --git a/src/openrouter/components/outputfunctioncallitem.py b/src/openrouter/components/outputfunctioncallitem.py
index 9df0afe..dcfc7a8 100644
--- a/src/openrouter/components/outputfunctioncallitem.py
+++ b/src/openrouter/components/outputfunctioncallitem.py
@@ -44,6 +44,8 @@ class OutputFunctionCallItemTypedDict(TypedDict):
name: str
type: OutputFunctionCallItemType
id: NotRequired[str]
+ namespace: NotRequired[str]
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
status: NotRequired[OutputFunctionCallItemStatusUnionTypedDict]
@@ -58,4 +60,7 @@ class OutputFunctionCallItem(BaseModel):
id: Optional[str] = None
+ namespace: Optional[str] = None
+ r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
+
status: Optional[OutputFunctionCallItemStatusUnion] = None
diff --git a/src/openrouter/components/outputfusionservertoolitem.py b/src/openrouter/components/outputfusionservertoolitem.py
new file mode 100644
index 0000000..0ad5d34
--- /dev/null
+++ b/src/openrouter/components/outputfusionservertoolitem.py
@@ -0,0 +1,87 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .fusionanalysisresult import FusionAnalysisResult, FusionAnalysisResultTypedDict
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class FailedModelTypedDict(TypedDict):
+ error: str
+ r"""Error message describing why the model failed."""
+ model: str
+ r"""Slug of the analysis model that failed."""
+ status_code: NotRequired[int]
+ r"""HTTP status code from the upstream response, when available (e.g. 402, 429)."""
+
+
+class FailedModel(BaseModel):
+ error: str
+ r"""Error message describing why the model failed."""
+
+ model: str
+ r"""Slug of the analysis model that failed."""
+
+ status_code: Optional[int] = None
+ r"""HTTP status code from the upstream response, when available (e.g. 402, 429)."""
+
+
+class ResponseTypedDict(TypedDict):
+ model: str
+ content: NotRequired[str]
+
+
+class Response(BaseModel):
+ model: str
+
+ content: Optional[str] = None
+
+
+OutputFusionServerToolItemType = Literal["openrouter:fusion",]
+
+
+class OutputFusionServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:fusion server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputFusionServerToolItemType
+ analysis: NotRequired[FusionAnalysisResultTypedDict]
+ r"""Structured analysis produced by the fusion judge model."""
+ error: NotRequired[str]
+ r"""Error message when the fusion run did not produce an analysis result."""
+ failed_models: NotRequired[List[FailedModelTypedDict]]
+ r"""Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel."""
+ failure_reason: NotRequired[str]
+ r"""Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."""
+ id: NotRequired[str]
+ responses: NotRequired[List[ResponseTypedDict]]
+ r"""Analysis models that produced a response in this fusion run, with each model's full panel content."""
+
+
+class OutputFusionServerToolItem(BaseModel):
+ r"""An openrouter:fusion server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputFusionServerToolItemType
+
+ analysis: Optional[FusionAnalysisResult] = None
+ r"""Structured analysis produced by the fusion judge model."""
+
+ error: Optional[str] = None
+ r"""Error message when the fusion run did not produce an analysis result."""
+
+ failed_models: Optional[List[FailedModel]] = None
+ r"""Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel."""
+
+ failure_reason: Optional[str] = None
+ r"""Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion."""
+
+ id: Optional[str] = None
+
+ responses: Optional[List[Response]] = None
+ r"""Analysis models that produced a response in this fusion run, with each model's full panel content."""
diff --git a/src/openrouter/components/outputimagegenerationservertoolitem.py b/src/openrouter/components/outputimagegenerationservertoolitem.py
index e91756b..a94bd09 100644
--- a/src/openrouter/components/outputimagegenerationservertoolitem.py
+++ b/src/openrouter/components/outputimagegenerationservertoolitem.py
@@ -2,9 +2,16 @@
from __future__ import annotations
from .toolcallstatus import ToolCallStatus
-from openrouter.types import BaseModel
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
from openrouter.utils import validate_open_enum
import pydantic
+from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -21,6 +28,8 @@ class OutputImageGenerationServerToolItemTypedDict(TypedDict):
id: NotRequired[str]
image_b64: NotRequired[str]
image_url: NotRequired[str]
+ result: NotRequired[Nullable[str]]
+ r"""The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"""
revised_prompt: NotRequired[str]
@@ -37,6 +46,39 @@ class OutputImageGenerationServerToolItem(BaseModel):
image_url: Annotated[Optional[str], pydantic.Field(alias="imageUrl")] = None
+ result: OptionalNullable[str] = UNSET
+ r"""The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format"""
+
revised_prompt: Annotated[Optional[str], pydantic.Field(alias="revisedPrompt")] = (
None
)
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id", "imageB64", "imageUrl", "result", "revisedPrompt"]
+ nullable_fields = ["result"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/outputitems.py b/src/openrouter/components/outputitems.py
index 4457f80..8eff2c7 100644
--- a/src/openrouter/components/outputitems.py
+++ b/src/openrouter/components/outputitems.py
@@ -1,6 +1,14 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .outputadvisorservertoolitem import (
+ OutputAdvisorServerToolItem,
+ OutputAdvisorServerToolItemTypedDict,
+)
+from .outputapplypatchcallitem import (
+ OutputApplyPatchCallItem,
+ OutputApplyPatchCallItemTypedDict,
+)
from .outputapplypatchservertoolitem import (
OutputApplyPatchServerToolItem,
OutputApplyPatchServerToolItemTypedDict,
@@ -25,6 +33,10 @@ from .outputcomputercallitem import (
OutputComputerCallItem,
OutputComputerCallItemTypedDict,
)
+from .outputcustomtoolcallitem import (
+ OutputCustomToolCallItem,
+ OutputCustomToolCallItemTypedDict,
+)
from .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict
from .outputfilesearchcallitem import (
OutputFileSearchCallItem,
@@ -38,6 +50,10 @@ from .outputfunctioncallitem import (
OutputFunctionCallItem,
OutputFunctionCallItemTypedDict,
)
+from .outputfusionservertoolitem import (
+ OutputFusionServerToolItem,
+ OutputFusionServerToolItemTypedDict,
+)
from .outputimagegenerationcallitem import (
OutputImageGenerationCallItem,
OutputImageGenerationCallItemTypedDict,
@@ -56,6 +72,15 @@ from .outputmemoryservertoolitem import (
)
from .outputmessageitem import OutputMessageItem, OutputMessageItemTypedDict
from .outputreasoningitem import OutputReasoningItem, OutputReasoningItemTypedDict
+from .outputsearchmodelsservertoolitem import (
+ OutputSearchModelsServerToolItem,
+ OutputSearchModelsServerToolItemTypedDict,
+)
+from .outputshellcallitem import OutputShellCallItem, OutputShellCallItemTypedDict
+from .outputshellcalloutputitem import (
+ OutputShellCallOutputItem,
+ OutputShellCallOutputItemTypedDict,
+)
from .outputtexteditorservertoolitem import (
OutputTextEditorServerToolItem,
OutputTextEditorServerToolItemTypedDict,
@@ -85,27 +110,34 @@ from typing_extensions import Annotated, TypeAliasType
OutputItemsTypedDict = TypeAliasType(
"OutputItemsTypedDict",
Union[
- OutputWebSearchServerToolItemTypedDict,
OutputToolSearchServerToolItemTypedDict,
+ OutputWebSearchServerToolItemTypedDict,
OutputFileSearchServerToolItemTypedDict,
OutputWebSearchCallItemTypedDict,
OutputFileSearchCallItemTypedDict,
OutputImageGenerationCallItemTypedDict,
- OutputTextEditorServerToolItemTypedDict,
OutputApplyPatchServerToolItemTypedDict,
+ OutputTextEditorServerToolItemTypedDict,
+ OutputSearchModelsServerToolItemTypedDict,
OutputDatetimeItemTypedDict,
+ OutputApplyPatchCallItemTypedDict,
OutputMcpServerToolItemTypedDict,
+ OutputShellCallItemTypedDict,
OutputBrowserUseServerToolItemTypedDict,
+ OutputComputerCallItemTypedDict,
+ OutputCodeInterpreterCallItemTypedDict,
+ OutputCustomToolCallItemTypedDict,
+ OutputMemoryServerToolItemTypedDict,
+ OutputMessageItemTypedDict,
+ OutputShellCallOutputItemTypedDict,
+ OutputBashServerToolItemTypedDict,
OutputFunctionCallItemTypedDict,
OutputImageGenerationServerToolItemTypedDict,
- OutputMessageItemTypedDict,
- OutputComputerCallItemTypedDict,
OutputWebFetchServerToolItemTypedDict,
- OutputMemoryServerToolItemTypedDict,
- OutputCodeInterpreterCallItemTypedDict,
- OutputBashServerToolItemTypedDict,
OutputCodeInterpreterServerToolItemTypedDict,
OutputReasoningItemTypedDict,
+ OutputFusionServerToolItemTypedDict,
+ OutputAdvisorServerToolItemTypedDict,
],
)
r"""An output item from the response"""
@@ -113,12 +145,15 @@ r"""An output item from the response"""
OutputItems = Annotated[
Union[
+ Annotated[OutputApplyPatchCallItem, Tag("apply_patch_call")],
Annotated[OutputCodeInterpreterCallItem, Tag("code_interpreter_call")],
Annotated[OutputComputerCallItem, Tag("computer_call")],
+ Annotated[OutputCustomToolCallItem, Tag("custom_tool_call")],
Annotated[OutputFileSearchCallItem, Tag("file_search_call")],
Annotated[OutputFunctionCallItem, Tag("function_call")],
Annotated[OutputImageGenerationCallItem, Tag("image_generation_call")],
Annotated[OutputMessageItem, Tag("message")],
+ Annotated[OutputAdvisorServerToolItem, Tag("openrouter:advisor")],
Annotated[OutputApplyPatchServerToolItem, Tag("openrouter:apply_patch")],
Annotated[OutputBashServerToolItem, Tag("openrouter:bash")],
Annotated[OutputBrowserUseServerToolItem, Tag("openrouter:browser_use")],
@@ -126,7 +161,12 @@ OutputItems = Annotated[
OutputCodeInterpreterServerToolItem, Tag("openrouter:code_interpreter")
],
Annotated[OutputDatetimeItem, Tag("openrouter:datetime")],
+ Annotated[
+ OutputSearchModelsServerToolItem,
+ Tag("openrouter:experimental__search_models"),
+ ],
Annotated[OutputFileSearchServerToolItem, Tag("openrouter:file_search")],
+ Annotated[OutputFusionServerToolItem, Tag("openrouter:fusion")],
Annotated[
OutputImageGenerationServerToolItem, Tag("openrouter:image_generation")
],
@@ -137,6 +177,8 @@ OutputItems = Annotated[
Annotated[OutputWebFetchServerToolItem, Tag("openrouter:web_fetch")],
Annotated[OutputWebSearchServerToolItem, Tag("openrouter:web_search")],
Annotated[OutputReasoningItem, Tag("reasoning")],
+ Annotated[OutputShellCallItem, Tag("shell_call")],
+ Annotated[OutputShellCallOutputItem, Tag("shell_call_output")],
Annotated[OutputWebSearchCallItem, Tag("web_search_call")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
diff --git a/src/openrouter/components/outputmodality.py b/src/openrouter/components/outputmodality.py
index c926bb6..08bfb22 100644
--- a/src/openrouter/components/outputmodality.py
+++ b/src/openrouter/components/outputmodality.py
@@ -13,6 +13,8 @@ OutputModality = Union[
"audio",
"video",
"rerank",
+ "speech",
+ "transcription",
],
UnrecognizedStr,
]
diff --git a/src/openrouter/components/outputsearchmodelsservertoolitem.py b/src/openrouter/components/outputsearchmodelsservertoolitem.py
new file mode 100644
index 0000000..f94949d
--- /dev/null
+++ b/src/openrouter/components/outputsearchmodelsservertoolitem.py
@@ -0,0 +1,40 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputSearchModelsServerToolItemType = Literal[
+ "openrouter:experimental__search_models",
+]
+
+
+class OutputSearchModelsServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:experimental__search_models server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputSearchModelsServerToolItemType
+ arguments: NotRequired[str]
+ r"""The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"""
+ id: NotRequired[str]
+ query: NotRequired[str]
+
+
+class OutputSearchModelsServerToolItem(BaseModel):
+ r"""An openrouter:experimental__search_models server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputSearchModelsServerToolItemType
+
+ arguments: Optional[str] = None
+ r"""The JSON arguments submitted to the search tool (e.g. {\"query\":\"Claude\"})"""
+
+ id: Optional[str] = None
+
+ query: Optional[str] = None
diff --git a/src/openrouter/components/outputshellcallitem.py b/src/openrouter/components/outputshellcallitem.py
new file mode 100644
index 0000000..d2ecd9f
--- /dev/null
+++ b/src/openrouter/components/outputshellcallitem.py
@@ -0,0 +1,83 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .shellcallstatus import ShellCallStatus
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class OutputShellCallItemActionTypedDict(TypedDict):
+ commands: List[str]
+ max_output_length: Nullable[int]
+ timeout_ms: Nullable[int]
+
+
+class OutputShellCallItemAction(BaseModel):
+ commands: List[str]
+
+ max_output_length: Nullable[int]
+
+ timeout_ms: Nullable[int]
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["max_output_length", "timeout_ms"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+OutputShellCallItemType = Literal["shell_call",]
+
+
+class OutputShellCallItemTypedDict(TypedDict):
+ r"""A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."""
+
+ call_id: str
+ id: str
+ status: ShellCallStatus
+ r"""Status of a shell call or its output."""
+ type: OutputShellCallItemType
+ action: NotRequired[OutputShellCallItemActionTypedDict]
+
+
+class OutputShellCallItem(BaseModel):
+ r"""A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool."""
+
+ call_id: str
+
+ id: str
+
+ status: Annotated[ShellCallStatus, PlainValidator(validate_open_enum(False))]
+ r"""Status of a shell call or its output."""
+
+ type: OutputShellCallItemType
+
+ action: Optional[OutputShellCallItemAction] = None
diff --git a/src/openrouter/components/outputshellcalloutputitem.py b/src/openrouter/components/outputshellcalloutputitem.py
new file mode 100644
index 0000000..fca6bbd
--- /dev/null
+++ b/src/openrouter/components/outputshellcalloutputitem.py
@@ -0,0 +1,130 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .shellcallstatus import ShellCallStatus
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import get_discriminator, validate_open_enum
+from pydantic import Discriminator, Tag, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+TypeTimeout = Literal["timeout",]
+
+
+class OutcomeTimeoutTypedDict(TypedDict):
+ type: TypeTimeout
+
+
+class OutcomeTimeout(BaseModel):
+ type: TypeTimeout
+
+
+TypeExit = Literal["exit",]
+
+
+class OutcomeExitTypedDict(TypedDict):
+ exit_code: int
+ type: TypeExit
+
+
+class OutcomeExit(BaseModel):
+ exit_code: int
+
+ type: TypeExit
+
+
+OutcomeTypedDict = TypeAliasType(
+ "OutcomeTypedDict", Union[OutcomeTimeoutTypedDict, OutcomeExitTypedDict]
+)
+
+
+Outcome = Annotated[
+ Union[
+ Annotated[OutcomeExit, Tag("exit")], Annotated[OutcomeTimeout, Tag("timeout")]
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+class OutputShellCallOutputItemOutputTypedDict(TypedDict):
+ outcome: OutcomeTypedDict
+ stderr: str
+ stdout: str
+
+
+class OutputShellCallOutputItemOutput(BaseModel):
+ outcome: Outcome
+
+ stderr: str
+
+ stdout: str
+
+
+OutputShellCallOutputItemTypeShellCallOutput = Literal["shell_call_output",]
+
+
+class OutputShellCallOutputItemTypedDict(TypedDict):
+ r"""A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."""
+
+ call_id: str
+ id: str
+ output: List[OutputShellCallOutputItemOutputTypedDict]
+ status: ShellCallStatus
+ r"""Status of a shell call or its output."""
+ type: OutputShellCallOutputItemTypeShellCallOutput
+ max_output_length: NotRequired[Nullable[int]]
+
+
+class OutputShellCallOutputItem(BaseModel):
+ r"""A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome."""
+
+ call_id: str
+
+ id: str
+
+ output: List[OutputShellCallOutputItemOutput]
+
+ status: Annotated[ShellCallStatus, PlainValidator(validate_open_enum(False))]
+ r"""Status of a shell call or its output."""
+
+ type: OutputShellCallOutputItemTypeShellCallOutput
+
+ max_output_length: OptionalNullable[int] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["max_output_length"]
+ nullable_fields = ["max_output_length"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/outputwebfetchservertoolitem.py b/src/openrouter/components/outputwebfetchservertoolitem.py
index f443472..71c97ae 100644
--- a/src/openrouter/components/outputwebfetchservertoolitem.py
+++ b/src/openrouter/components/outputwebfetchservertoolitem.py
@@ -4,6 +4,7 @@ from __future__ import annotations
from .toolcallstatus import ToolCallStatus
from openrouter.types import BaseModel
from openrouter.utils import validate_open_enum
+import pydantic
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -18,6 +19,10 @@ class OutputWebFetchServerToolItemTypedDict(TypedDict):
status: ToolCallStatus
type: OutputWebFetchServerToolItemType
content: NotRequired[str]
+ error: NotRequired[str]
+ r"""The error message if the fetch failed."""
+ http_status: NotRequired[int]
+ r"""The HTTP status code returned by the upstream URL fetch."""
id: NotRequired[str]
title: NotRequired[str]
url: NotRequired[str]
@@ -32,6 +37,12 @@ class OutputWebFetchServerToolItem(BaseModel):
content: Optional[str] = None
+ error: Optional[str] = None
+ r"""The error message if the fetch failed."""
+
+ http_status: Annotated[Optional[int], pydantic.Field(alias="httpStatus")] = None
+ r"""The HTTP status code returned by the upstream URL fetch."""
+
id: Optional[str] = None
title: Optional[str] = None
diff --git a/src/openrouter/components/outputwebsearchcallitem.py b/src/openrouter/components/outputwebsearchcallitem.py
index 706303d..63fe113 100644
--- a/src/openrouter/components/outputwebsearchcallitem.py
+++ b/src/openrouter/components/outputwebsearchcallitem.py
@@ -78,20 +78,20 @@ class ActionOpenPage(BaseModel):
return m
-TypeSearch = Literal["search",]
+ActionTypeSearch = Literal["search",]
-class ActionSearchTypedDict(TypedDict):
+class OutputWebSearchCallItemActionSearchTypedDict(TypedDict):
query: str
- type: TypeSearch
+ type: ActionTypeSearch
queries: NotRequired[List[str]]
sources: NotRequired[List[WebSearchSourceTypedDict]]
-class ActionSearch(BaseModel):
+class OutputWebSearchCallItemActionSearch(BaseModel):
query: str
- type: TypeSearch
+ type: ActionTypeSearch
queries: Optional[List[str]] = None
@@ -100,13 +100,17 @@ class ActionSearch(BaseModel):
ActionTypedDict = TypeAliasType(
"ActionTypedDict",
- Union[ActionOpenPageTypedDict, ActionFindInPageTypedDict, ActionSearchTypedDict],
+ Union[
+ ActionOpenPageTypedDict,
+ ActionFindInPageTypedDict,
+ OutputWebSearchCallItemActionSearchTypedDict,
+ ],
)
Action = Annotated[
Union[
- Annotated[ActionSearch, Tag("search")],
+ Annotated[OutputWebSearchCallItemActionSearch, Tag("search")],
Annotated[ActionOpenPage, Tag("open_page")],
Annotated[ActionFindInPage, Tag("find_in_page")],
],
@@ -118,17 +122,17 @@ TypeWebSearchCall = Literal["web_search_call",]
class OutputWebSearchCallItemTypedDict(TypedDict):
- action: ActionTypedDict
id: str
status: WebSearchStatus
type: TypeWebSearchCall
+ action: NotRequired[ActionTypedDict]
class OutputWebSearchCallItem(BaseModel):
- action: Action
-
id: str
status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))]
type: TypeWebSearchCall
+
+ action: Optional[Action] = None
diff --git a/src/openrouter/components/outputwebsearchservertoolitem.py b/src/openrouter/components/outputwebsearchservertoolitem.py
index 304cab5..7d63fc5 100644
--- a/src/openrouter/components/outputwebsearchservertoolitem.py
+++ b/src/openrouter/components/outputwebsearchservertoolitem.py
@@ -5,18 +5,55 @@ from .toolcallstatus import ToolCallStatus
from openrouter.types import BaseModel
from openrouter.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
-from typing import Literal, Optional
+from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
-OutputWebSearchServerToolItemType = Literal["openrouter:web_search",]
+OutputWebSearchServerToolItemTypeURL = Literal["url",]
+
+
+class OutputWebSearchServerToolItemSourceTypedDict(TypedDict):
+ type: OutputWebSearchServerToolItemTypeURL
+ url: str
+
+
+class OutputWebSearchServerToolItemSource(BaseModel):
+ type: OutputWebSearchServerToolItemTypeURL
+
+ url: str
+
+
+OutputWebSearchServerToolItemTypeSearch = Literal["search",]
+
+
+class OutputWebSearchServerToolItemActionTypedDict(TypedDict):
+ r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider."""
+
+ query: str
+ type: OutputWebSearchServerToolItemTypeSearch
+ sources: NotRequired[List[OutputWebSearchServerToolItemSourceTypedDict]]
+
+
+class OutputWebSearchServerToolItemAction(BaseModel):
+ r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider."""
+
+ query: str
+
+ type: OutputWebSearchServerToolItemTypeSearch
+
+ sources: Optional[List[OutputWebSearchServerToolItemSource]] = None
+
+
+OutputWebSearchServerToolItemTypeOpenrouterWebSearch = Literal["openrouter:web_search",]
class OutputWebSearchServerToolItemTypedDict(TypedDict):
r"""An openrouter:web_search server tool output item"""
status: ToolCallStatus
- type: OutputWebSearchServerToolItemType
+ type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch
+ action: NotRequired[OutputWebSearchServerToolItemActionTypedDict]
+ r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider."""
id: NotRequired[str]
@@ -25,6 +62,9 @@ class OutputWebSearchServerToolItem(BaseModel):
status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
- type: OutputWebSearchServerToolItemType
+ type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch
+
+ action: Optional[OutputWebSearchServerToolItemAction] = None
+ r"""The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider."""
id: Optional[str] = None
diff --git a/src/openrouter/components/paretorouterplugin.py b/src/openrouter/components/paretorouterplugin.py
new file mode 100644
index 0000000..6b12a70
--- /dev/null
+++ b/src/openrouter/components/paretorouterplugin.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+ParetoRouterPluginID = Literal["pareto-router",]
+
+
+class ParetoRouterPluginTypedDict(TypedDict):
+ id: ParetoRouterPluginID
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the pareto-router plugin for this request. Defaults to true."""
+ min_coding_score: NotRequired[float]
+ r"""Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier."""
+
+
+class ParetoRouterPlugin(BaseModel):
+ id: ParetoRouterPluginID
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the pareto-router plugin for this request. Defaults to true."""
+
+ min_coding_score: Optional[float] = None
+ r"""Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier."""
diff --git a/src/openrouter/components/pipelinestage.py b/src/openrouter/components/pipelinestage.py
new file mode 100644
index 0000000..a5a763d
--- /dev/null
+++ b/src/openrouter/components/pipelinestage.py
@@ -0,0 +1,80 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pipelinestagetype import PipelineStageType
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class PipelineStageTypedDict(TypedDict):
+ name: str
+ type: PipelineStageType
+ r"""Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it."""
+ cost_usd: NotRequired[Nullable[float]]
+ data: NotRequired[Dict[str, Nullable[Any]]]
+ guardrail_id: NotRequired[str]
+ guardrail_scope: NotRequired[str]
+ summary: NotRequired[str]
+
+
+class PipelineStage(BaseModel):
+ name: str
+
+ type: Annotated[PipelineStageType, PlainValidator(validate_open_enum(False))]
+ r"""Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it."""
+
+ cost_usd: OptionalNullable[float] = UNSET
+
+ data: Optional[Dict[str, Nullable[Any]]] = None
+
+ guardrail_id: Optional[str] = None
+
+ guardrail_scope: Optional[str] = None
+
+ summary: Optional[str] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "cost_usd",
+ "data",
+ "guardrail_id",
+ "guardrail_scope",
+ "summary",
+ ]
+ nullable_fields = ["cost_usd"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/pipelinestagetype.py b/src/openrouter/components/pipelinestagetype.py
new file mode 100644
index 0000000..1cc72ac
--- /dev/null
+++ b/src/openrouter/components/pipelinestagetype.py
@@ -0,0 +1,18 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+PipelineStageType = Union[
+ Literal[
+ "guardrail",
+ "plugin",
+ "server_tools",
+ "response_healing",
+ "context_compression",
+ ],
+ UnrecognizedStr,
+]
+r"""Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it."""
diff --git a/src/openrouter/components/preset.py b/src/openrouter/components/preset.py
new file mode 100644
index 0000000..f1a974c
--- /dev/null
+++ b/src/openrouter/components/preset.py
@@ -0,0 +1,89 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .presetstatus import PresetStatus
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing_extensions import Annotated, TypedDict
+
+
+class PresetTypedDict(TypedDict):
+ r"""A preset without version details."""
+
+ created_at: str
+ creator_user_id: Nullable[str]
+ description: Nullable[str]
+ designated_version_id: Nullable[str]
+ id: str
+ name: str
+ slug: str
+ status: PresetStatus
+ r"""The status of a preset."""
+ status_updated_at: Nullable[str]
+ updated_at: str
+ workspace_id: Nullable[str]
+
+
+class Preset(BaseModel):
+ r"""A preset without version details."""
+
+ created_at: str
+
+ creator_user_id: Nullable[str]
+
+ description: Nullable[str]
+
+ designated_version_id: Nullable[str]
+
+ id: str
+
+ name: str
+
+ slug: str
+
+ status: Annotated[PresetStatus, PlainValidator(validate_open_enum(False))]
+ r"""The status of a preset."""
+
+ status_updated_at: Nullable[str]
+
+ updated_at: str
+
+ workspace_id: Nullable[str]
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = [
+ "creator_user_id",
+ "description",
+ "designated_version_id",
+ "status_updated_at",
+ "workspace_id",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/presetdesignatedversion.py b/src/openrouter/components/presetdesignatedversion.py
new file mode 100644
index 0000000..620f08f
--- /dev/null
+++ b/src/openrouter/components/presetdesignatedversion.py
@@ -0,0 +1,70 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Any, Dict
+from typing_extensions import TypedDict
+
+
+class PresetDesignatedVersionTypedDict(TypedDict):
+ r"""A specific version of a preset, containing config and optional system prompt."""
+
+ config: Dict[str, Nullable[Any]]
+ created_at: str
+ creator_id: str
+ id: str
+ preset_id: str
+ system_prompt: Nullable[str]
+ updated_at: str
+ version: int
+
+
+class PresetDesignatedVersion(BaseModel):
+ r"""A specific version of a preset, containing config and optional system prompt."""
+
+ config: Dict[str, Nullable[Any]]
+
+ created_at: str
+
+ creator_id: str
+
+ id: str
+
+ preset_id: str
+
+ system_prompt: Nullable[str]
+
+ updated_at: str
+
+ version: int
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["system_prompt"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/presetstatus.py b/src/openrouter/components/presetstatus.py
new file mode 100644
index 0000000..ded8bd3
--- /dev/null
+++ b/src/openrouter/components/presetstatus.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+PresetStatus = Union[
+ Literal[
+ "active",
+ "disabled",
+ "archived",
+ ],
+ UnrecognizedStr,
+]
+r"""The status of a preset."""
diff --git a/src/openrouter/components/presetwithdesignatedversion.py b/src/openrouter/components/presetwithdesignatedversion.py
new file mode 100644
index 0000000..cb5c910
--- /dev/null
+++ b/src/openrouter/components/presetwithdesignatedversion.py
@@ -0,0 +1,99 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .presetdesignatedversion import (
+ PresetDesignatedVersion,
+ PresetDesignatedVersionTypedDict,
+)
+from .presetstatus import PresetStatus
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing_extensions import Annotated, TypedDict
+
+
+class PresetWithDesignatedVersionTypedDict(TypedDict):
+ r"""A preset with its currently designated version."""
+
+ created_at: str
+ creator_user_id: Nullable[str]
+ description: Nullable[str]
+ designated_version_id: Nullable[str]
+ id: str
+ name: str
+ slug: str
+ status: PresetStatus
+ r"""The status of a preset."""
+ status_updated_at: Nullable[str]
+ updated_at: str
+ workspace_id: Nullable[str]
+ designated_version: Nullable[PresetDesignatedVersionTypedDict]
+ r"""A specific version of a preset, containing config and optional system prompt."""
+
+
+class PresetWithDesignatedVersion(BaseModel):
+ r"""A preset with its currently designated version."""
+
+ created_at: str
+
+ creator_user_id: Nullable[str]
+
+ description: Nullable[str]
+
+ designated_version_id: Nullable[str]
+
+ id: str
+
+ name: str
+
+ slug: str
+
+ status: Annotated[PresetStatus, PlainValidator(validate_open_enum(False))]
+ r"""The status of a preset."""
+
+ status_updated_at: Nullable[str]
+
+ updated_at: str
+
+ workspace_id: Nullable[str]
+
+ designated_version: Nullable[PresetDesignatedVersion]
+ r"""A specific version of a preset, containing config and optional system prompt."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = [
+ "creator_user_id",
+ "description",
+ "designated_version_id",
+ "status_updated_at",
+ "workspace_id",
+ "designated_version",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/promptinjectionscanscope.py b/src/openrouter/components/promptinjectionscanscope.py
new file mode 100644
index 0000000..170ae25
--- /dev/null
+++ b/src/openrouter/components/promptinjectionscanscope.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+PromptInjectionScanScope = Union[
+ Literal[
+ "user_only",
+ "all_messages",
+ ],
+ UnrecognizedStr,
+]
+r"""Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages."""
diff --git a/src/openrouter/components/providername.py b/src/openrouter/components/providername.py
index 7764a12..bcf5ebc 100644
--- a/src/openrouter/components/providername.py
+++ b/src/openrouter/components/providername.py
@@ -12,6 +12,7 @@ ProviderName = Union[
"AionLabs",
"Alibaba",
"Ambient",
+ "Baidu",
"Amazon Bedrock",
"Amazon Nova",
"Anthropic",
@@ -28,10 +29,14 @@ ProviderName = Union[
"Clarifai",
"Cloudflare",
"Cohere",
+ "Crucible",
"Crusoe",
+ "Darkbloom",
+ "Decart",
"DeepInfra",
"DeepSeek",
"DekaLLM",
+ "DigitalOcean",
"Featherless",
"Fireworks",
"Friendli",
@@ -39,7 +44,6 @@ ProviderName = Union[
"Google",
"Google AI Studio",
"Groq",
- "Hyperbolic",
"Inception",
"Inceptron",
"InferenceNet",
@@ -58,12 +62,15 @@ ProviderName = Union[
"Morph",
"NCompass",
"Nebius",
+ "Nex AGI",
"NextBit",
"Novita",
"Nvidia",
"OpenAI",
"OpenInference",
"Parasail",
+ "Poolside",
+ "Perceptron",
"Perplexity",
"Phala",
"Recraft",
@@ -80,6 +87,7 @@ ProviderName = Union[
"Together",
"Upstage",
"Venice",
+ "Wafer",
"WandB",
"Xiaomi",
"xAI",
diff --git a/src/openrouter/components/provideroptions.py b/src/openrouter/components/provideroptions.py
new file mode 100644
index 0000000..bed74b0
--- /dev/null
+++ b/src/openrouter/components/provideroptions.py
@@ -0,0 +1,405 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable
+import pydantic
+from typing import Any, Dict, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ProviderOptionsTypedDict(TypedDict):
+ r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
+
+ oneai: NotRequired[Dict[str, Nullable[Any]]]
+ ai21: NotRequired[Dict[str, Nullable[Any]]]
+ aion_labs: NotRequired[Dict[str, Nullable[Any]]]
+ akashml: NotRequired[Dict[str, Nullable[Any]]]
+ alibaba: NotRequired[Dict[str, Nullable[Any]]]
+ amazon_bedrock: NotRequired[Dict[str, Nullable[Any]]]
+ amazon_nova: NotRequired[Dict[str, Nullable[Any]]]
+ ambient: NotRequired[Dict[str, Nullable[Any]]]
+ anthropic: NotRequired[Dict[str, Nullable[Any]]]
+ anyscale: NotRequired[Dict[str, Nullable[Any]]]
+ arcee_ai: NotRequired[Dict[str, Nullable[Any]]]
+ atlas_cloud: NotRequired[Dict[str, Nullable[Any]]]
+ atoma: NotRequired[Dict[str, Nullable[Any]]]
+ avian: NotRequired[Dict[str, Nullable[Any]]]
+ azure: NotRequired[Dict[str, Nullable[Any]]]
+ baidu: NotRequired[Dict[str, Nullable[Any]]]
+ baseten: NotRequired[Dict[str, Nullable[Any]]]
+ black_forest_labs: NotRequired[Dict[str, Nullable[Any]]]
+ byteplus: NotRequired[Dict[str, Nullable[Any]]]
+ centml: NotRequired[Dict[str, Nullable[Any]]]
+ cerebras: NotRequired[Dict[str, Nullable[Any]]]
+ chutes: NotRequired[Dict[str, Nullable[Any]]]
+ cirrascale: NotRequired[Dict[str, Nullable[Any]]]
+ clarifai: NotRequired[Dict[str, Nullable[Any]]]
+ cloudflare: NotRequired[Dict[str, Nullable[Any]]]
+ cohere: NotRequired[Dict[str, Nullable[Any]]]
+ crofai: NotRequired[Dict[str, Nullable[Any]]]
+ crucible: NotRequired[Dict[str, Nullable[Any]]]
+ crusoe: NotRequired[Dict[str, Nullable[Any]]]
+ darkbloom: NotRequired[Dict[str, Nullable[Any]]]
+ decart: NotRequired[Dict[str, Nullable[Any]]]
+ deepinfra: NotRequired[Dict[str, Nullable[Any]]]
+ deepseek: NotRequired[Dict[str, Nullable[Any]]]
+ dekallm: NotRequired[Dict[str, Nullable[Any]]]
+ digitalocean: NotRequired[Dict[str, Nullable[Any]]]
+ enfer: NotRequired[Dict[str, Nullable[Any]]]
+ fake_provider: NotRequired[Dict[str, Nullable[Any]]]
+ featherless: NotRequired[Dict[str, Nullable[Any]]]
+ fireworks: NotRequired[Dict[str, Nullable[Any]]]
+ friendli: NotRequired[Dict[str, Nullable[Any]]]
+ gmicloud: NotRequired[Dict[str, Nullable[Any]]]
+ google_ai_studio: NotRequired[Dict[str, Nullable[Any]]]
+ google_vertex: NotRequired[Dict[str, Nullable[Any]]]
+ gopomelo: NotRequired[Dict[str, Nullable[Any]]]
+ groq: NotRequired[Dict[str, Nullable[Any]]]
+ huggingface: NotRequired[Dict[str, Nullable[Any]]]
+ hyperbolic: NotRequired[Dict[str, Nullable[Any]]]
+ hyperbolic_quantized: NotRequired[Dict[str, Nullable[Any]]]
+ inception: NotRequired[Dict[str, Nullable[Any]]]
+ inceptron: NotRequired[Dict[str, Nullable[Any]]]
+ inference_net: NotRequired[Dict[str, Nullable[Any]]]
+ infermatic: NotRequired[Dict[str, Nullable[Any]]]
+ inflection: NotRequired[Dict[str, Nullable[Any]]]
+ inocloud: NotRequired[Dict[str, Nullable[Any]]]
+ io_net: NotRequired[Dict[str, Nullable[Any]]]
+ ionstream: NotRequired[Dict[str, Nullable[Any]]]
+ klusterai: NotRequired[Dict[str, Nullable[Any]]]
+ lambda_: NotRequired[Dict[str, Nullable[Any]]]
+ lepton: NotRequired[Dict[str, Nullable[Any]]]
+ liquid: NotRequired[Dict[str, Nullable[Any]]]
+ lynn: NotRequired[Dict[str, Nullable[Any]]]
+ lynn_private: NotRequired[Dict[str, Nullable[Any]]]
+ mancer: NotRequired[Dict[str, Nullable[Any]]]
+ mancer_old: NotRequired[Dict[str, Nullable[Any]]]
+ mara: NotRequired[Dict[str, Nullable[Any]]]
+ meta: NotRequired[Dict[str, Nullable[Any]]]
+ minimax: NotRequired[Dict[str, Nullable[Any]]]
+ mistral: NotRequired[Dict[str, Nullable[Any]]]
+ modal: NotRequired[Dict[str, Nullable[Any]]]
+ modelrun: NotRequired[Dict[str, Nullable[Any]]]
+ modular: NotRequired[Dict[str, Nullable[Any]]]
+ moonshotai: NotRequired[Dict[str, Nullable[Any]]]
+ morph: NotRequired[Dict[str, Nullable[Any]]]
+ ncompass: NotRequired[Dict[str, Nullable[Any]]]
+ nebius: NotRequired[Dict[str, Nullable[Any]]]
+ nex_agi: NotRequired[Dict[str, Nullable[Any]]]
+ nextbit: NotRequired[Dict[str, Nullable[Any]]]
+ nineteen: NotRequired[Dict[str, Nullable[Any]]]
+ novita: NotRequired[Dict[str, Nullable[Any]]]
+ nvidia: NotRequired[Dict[str, Nullable[Any]]]
+ octoai: NotRequired[Dict[str, Nullable[Any]]]
+ open_inference: NotRequired[Dict[str, Nullable[Any]]]
+ openai: NotRequired[Dict[str, Nullable[Any]]]
+ parasail: NotRequired[Dict[str, Nullable[Any]]]
+ perceptron: NotRequired[Dict[str, Nullable[Any]]]
+ perplexity: NotRequired[Dict[str, Nullable[Any]]]
+ phala: NotRequired[Dict[str, Nullable[Any]]]
+ poolside: NotRequired[Dict[str, Nullable[Any]]]
+ recraft: NotRequired[Dict[str, Nullable[Any]]]
+ recursal: NotRequired[Dict[str, Nullable[Any]]]
+ reflection: NotRequired[Dict[str, Nullable[Any]]]
+ reka: NotRequired[Dict[str, Nullable[Any]]]
+ relace: NotRequired[Dict[str, Nullable[Any]]]
+ replicate: NotRequired[Dict[str, Nullable[Any]]]
+ sambanova: NotRequired[Dict[str, Nullable[Any]]]
+ sambanova_cloaked: NotRequired[Dict[str, Nullable[Any]]]
+ seed: NotRequired[Dict[str, Nullable[Any]]]
+ sf_compute: NotRequired[Dict[str, Nullable[Any]]]
+ siliconflow: NotRequired[Dict[str, Nullable[Any]]]
+ sourceful: NotRequired[Dict[str, Nullable[Any]]]
+ stealth: NotRequired[Dict[str, Nullable[Any]]]
+ stepfun: NotRequired[Dict[str, Nullable[Any]]]
+ streamlake: NotRequired[Dict[str, Nullable[Any]]]
+ switchpoint: NotRequired[Dict[str, Nullable[Any]]]
+ targon: NotRequired[Dict[str, Nullable[Any]]]
+ together: NotRequired[Dict[str, Nullable[Any]]]
+ together_lite: NotRequired[Dict[str, Nullable[Any]]]
+ ubicloud: NotRequired[Dict[str, Nullable[Any]]]
+ upstage: NotRequired[Dict[str, Nullable[Any]]]
+ venice: NotRequired[Dict[str, Nullable[Any]]]
+ wafer: NotRequired[Dict[str, Nullable[Any]]]
+ wandb: NotRequired[Dict[str, Nullable[Any]]]
+ xai: NotRequired[Dict[str, Nullable[Any]]]
+ xiaomi: NotRequired[Dict[str, Nullable[Any]]]
+ z_ai: NotRequired[Dict[str, Nullable[Any]]]
+
+
+class ProviderOptions(BaseModel):
+ r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
+
+ oneai: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="01ai")
+ ] = None
+
+ ai21: Optional[Dict[str, Nullable[Any]]] = None
+
+ aion_labs: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="aion-labs")
+ ] = None
+
+ akashml: Optional[Dict[str, Nullable[Any]]] = None
+
+ alibaba: Optional[Dict[str, Nullable[Any]]] = None
+
+ amazon_bedrock: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="amazon-bedrock")
+ ] = None
+
+ amazon_nova: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="amazon-nova")
+ ] = None
+
+ ambient: Optional[Dict[str, Nullable[Any]]] = None
+
+ anthropic: Optional[Dict[str, Nullable[Any]]] = None
+
+ anyscale: Optional[Dict[str, Nullable[Any]]] = None
+
+ arcee_ai: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="arcee-ai")
+ ] = None
+
+ atlas_cloud: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="atlas-cloud")
+ ] = None
+
+ atoma: Optional[Dict[str, Nullable[Any]]] = None
+
+ avian: Optional[Dict[str, Nullable[Any]]] = None
+
+ azure: Optional[Dict[str, Nullable[Any]]] = None
+
+ baidu: Optional[Dict[str, Nullable[Any]]] = None
+
+ baseten: Optional[Dict[str, Nullable[Any]]] = None
+
+ black_forest_labs: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="black-forest-labs")
+ ] = None
+
+ byteplus: Optional[Dict[str, Nullable[Any]]] = None
+
+ centml: Optional[Dict[str, Nullable[Any]]] = None
+
+ cerebras: Optional[Dict[str, Nullable[Any]]] = None
+
+ chutes: Optional[Dict[str, Nullable[Any]]] = None
+
+ cirrascale: Optional[Dict[str, Nullable[Any]]] = None
+
+ clarifai: Optional[Dict[str, Nullable[Any]]] = None
+
+ cloudflare: Optional[Dict[str, Nullable[Any]]] = None
+
+ cohere: Optional[Dict[str, Nullable[Any]]] = None
+
+ crofai: Optional[Dict[str, Nullable[Any]]] = None
+
+ crucible: Optional[Dict[str, Nullable[Any]]] = None
+
+ crusoe: Optional[Dict[str, Nullable[Any]]] = None
+
+ darkbloom: Optional[Dict[str, Nullable[Any]]] = None
+
+ decart: Optional[Dict[str, Nullable[Any]]] = None
+
+ deepinfra: Optional[Dict[str, Nullable[Any]]] = None
+
+ deepseek: Optional[Dict[str, Nullable[Any]]] = None
+
+ dekallm: Optional[Dict[str, Nullable[Any]]] = None
+
+ digitalocean: Optional[Dict[str, Nullable[Any]]] = None
+
+ enfer: Optional[Dict[str, Nullable[Any]]] = None
+
+ fake_provider: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="fake-provider")
+ ] = None
+
+ featherless: Optional[Dict[str, Nullable[Any]]] = None
+
+ fireworks: Optional[Dict[str, Nullable[Any]]] = None
+
+ friendli: Optional[Dict[str, Nullable[Any]]] = None
+
+ gmicloud: Optional[Dict[str, Nullable[Any]]] = None
+
+ google_ai_studio: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="google-ai-studio")
+ ] = None
+
+ google_vertex: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="google-vertex")
+ ] = None
+
+ gopomelo: Optional[Dict[str, Nullable[Any]]] = None
+
+ groq: Optional[Dict[str, Nullable[Any]]] = None
+
+ huggingface: Optional[Dict[str, Nullable[Any]]] = None
+
+ hyperbolic: Optional[Dict[str, Nullable[Any]]] = None
+
+ hyperbolic_quantized: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="hyperbolic-quantized")
+ ] = None
+
+ inception: Optional[Dict[str, Nullable[Any]]] = None
+
+ inceptron: Optional[Dict[str, Nullable[Any]]] = None
+
+ inference_net: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="inference-net")
+ ] = None
+
+ infermatic: Optional[Dict[str, Nullable[Any]]] = None
+
+ inflection: Optional[Dict[str, Nullable[Any]]] = None
+
+ inocloud: Optional[Dict[str, Nullable[Any]]] = None
+
+ io_net: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="io-net")
+ ] = None
+
+ ionstream: Optional[Dict[str, Nullable[Any]]] = None
+
+ klusterai: Optional[Dict[str, Nullable[Any]]] = None
+
+ lambda_: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="lambda")
+ ] = None
+
+ lepton: Optional[Dict[str, Nullable[Any]]] = None
+
+ liquid: Optional[Dict[str, Nullable[Any]]] = None
+
+ lynn: Optional[Dict[str, Nullable[Any]]] = None
+
+ lynn_private: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="lynn-private")
+ ] = None
+
+ mancer: Optional[Dict[str, Nullable[Any]]] = None
+
+ mancer_old: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="mancer-old")
+ ] = None
+
+ mara: Optional[Dict[str, Nullable[Any]]] = None
+
+ meta: Optional[Dict[str, Nullable[Any]]] = None
+
+ minimax: Optional[Dict[str, Nullable[Any]]] = None
+
+ mistral: Optional[Dict[str, Nullable[Any]]] = None
+
+ modal: Optional[Dict[str, Nullable[Any]]] = None
+
+ modelrun: Optional[Dict[str, Nullable[Any]]] = None
+
+ modular: Optional[Dict[str, Nullable[Any]]] = None
+
+ moonshotai: Optional[Dict[str, Nullable[Any]]] = None
+
+ morph: Optional[Dict[str, Nullable[Any]]] = None
+
+ ncompass: Optional[Dict[str, Nullable[Any]]] = None
+
+ nebius: Optional[Dict[str, Nullable[Any]]] = None
+
+ nex_agi: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="nex-agi")
+ ] = None
+
+ nextbit: Optional[Dict[str, Nullable[Any]]] = None
+
+ nineteen: Optional[Dict[str, Nullable[Any]]] = None
+
+ novita: Optional[Dict[str, Nullable[Any]]] = None
+
+ nvidia: Optional[Dict[str, Nullable[Any]]] = None
+
+ octoai: Optional[Dict[str, Nullable[Any]]] = None
+
+ open_inference: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="open-inference")
+ ] = None
+
+ openai: Optional[Dict[str, Nullable[Any]]] = None
+
+ parasail: Optional[Dict[str, Nullable[Any]]] = None
+
+ perceptron: Optional[Dict[str, Nullable[Any]]] = None
+
+ perplexity: Optional[Dict[str, Nullable[Any]]] = None
+
+ phala: Optional[Dict[str, Nullable[Any]]] = None
+
+ poolside: Optional[Dict[str, Nullable[Any]]] = None
+
+ recraft: Optional[Dict[str, Nullable[Any]]] = None
+
+ recursal: Optional[Dict[str, Nullable[Any]]] = None
+
+ reflection: Optional[Dict[str, Nullable[Any]]] = None
+
+ reka: Optional[Dict[str, Nullable[Any]]] = None
+
+ relace: Optional[Dict[str, Nullable[Any]]] = None
+
+ replicate: Optional[Dict[str, Nullable[Any]]] = None
+
+ sambanova: Optional[Dict[str, Nullable[Any]]] = None
+
+ sambanova_cloaked: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="sambanova-cloaked")
+ ] = None
+
+ seed: Optional[Dict[str, Nullable[Any]]] = None
+
+ sf_compute: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="sf-compute")
+ ] = None
+
+ siliconflow: Optional[Dict[str, Nullable[Any]]] = None
+
+ sourceful: Optional[Dict[str, Nullable[Any]]] = None
+
+ stealth: Optional[Dict[str, Nullable[Any]]] = None
+
+ stepfun: Optional[Dict[str, Nullable[Any]]] = None
+
+ streamlake: Optional[Dict[str, Nullable[Any]]] = None
+
+ switchpoint: Optional[Dict[str, Nullable[Any]]] = None
+
+ targon: Optional[Dict[str, Nullable[Any]]] = None
+
+ together: Optional[Dict[str, Nullable[Any]]] = None
+
+ together_lite: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="together-lite")
+ ] = None
+
+ ubicloud: Optional[Dict[str, Nullable[Any]]] = None
+
+ upstage: Optional[Dict[str, Nullable[Any]]] = None
+
+ venice: Optional[Dict[str, Nullable[Any]]] = None
+
+ wafer: Optional[Dict[str, Nullable[Any]]] = None
+
+ wandb: Optional[Dict[str, Nullable[Any]]] = None
+
+ xai: Optional[Dict[str, Nullable[Any]]] = None
+
+ xiaomi: Optional[Dict[str, Nullable[Any]]] = None
+
+ z_ai: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="z-ai")
+ ] = None
diff --git a/src/openrouter/components/providerresponse.py b/src/openrouter/components/providerresponse.py
index 4856eee..be63eef 100644
--- a/src/openrouter/components/providerresponse.py
+++ b/src/openrouter/components/providerresponse.py
@@ -18,6 +18,7 @@ ProviderResponseProviderName = Union[
"Enfer",
"GoPomelo",
"HuggingFace",
+ "Hyperbolic",
"Hyperbolic 2",
"InoCloud",
"Kluster",
@@ -44,6 +45,7 @@ ProviderResponseProviderName = Union[
"AionLabs",
"Alibaba",
"Ambient",
+ "Baidu",
"Amazon Bedrock",
"Amazon Nova",
"Anthropic",
@@ -60,10 +62,14 @@ ProviderResponseProviderName = Union[
"Clarifai",
"Cloudflare",
"Cohere",
+ "Crucible",
"Crusoe",
+ "Darkbloom",
+ "Decart",
"DeepInfra",
"DeepSeek",
"DekaLLM",
+ "DigitalOcean",
"Featherless",
"Fireworks",
"Friendli",
@@ -71,7 +77,6 @@ ProviderResponseProviderName = Union[
"Google",
"Google AI Studio",
"Groq",
- "Hyperbolic",
"Inception",
"Inceptron",
"InferenceNet",
@@ -90,12 +95,15 @@ ProviderResponseProviderName = Union[
"Morph",
"NCompass",
"Nebius",
+ "Nex AGI",
"NextBit",
"Novita",
"Nvidia",
"OpenAI",
"OpenInference",
"Parasail",
+ "Poolside",
+ "Perceptron",
"Perplexity",
"Phala",
"Recraft",
@@ -112,6 +120,7 @@ ProviderResponseProviderName = Union[
"Together",
"Upstage",
"Venice",
+ "Wafer",
"WandB",
"Xiaomi",
"xAI",
@@ -126,7 +135,7 @@ r"""Name of the provider"""
class ProviderResponseTypedDict(TypedDict):
r"""Details of a provider response for a generation attempt"""
- status: Nullable[float]
+ status: Nullable[int]
r"""HTTP status code from the provider"""
endpoint_id: NotRequired[str]
r"""Internal endpoint identifier"""
@@ -145,7 +154,7 @@ class ProviderResponseTypedDict(TypedDict):
class ProviderResponse(BaseModel):
r"""Details of a provider response for a generation attempt"""
- status: Nullable[float]
+ status: Nullable[int]
r"""HTTP status code from the provider"""
endpoint_id: Optional[str] = None
diff --git a/src/openrouter/components/rankingsdailyitem.py b/src/openrouter/components/rankingsdailyitem.py
new file mode 100644
index 0000000..7325fa4
--- /dev/null
+++ b/src/openrouter/components/rankingsdailyitem.py
@@ -0,0 +1,26 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+import pydantic
+from typing_extensions import Annotated, TypedDict
+
+
+class RankingsDailyItemTypedDict(TypedDict):
+ date_: str
+ r"""UTC calendar date the row is aggregated over (YYYY-MM-DD)."""
+ model_permaslug: str
+ r"""Model variant permaslug (e.g. `openai/gpt-4o-2024-05-13`, `openai/gpt-4o-2024-05-13:free`). Non-default variants include a `:variant` suffix and are ranked as their own entry. The reserved value `other` denotes the aggregated row covering every model outside the daily top 50 for that date — always sorted last within its date."""
+ total_tokens: str
+ r"""Sum of `prompt_tokens + completion_tokens` for the day, returned as a decimal string so 64-bit values are not truncated."""
+
+
+class RankingsDailyItem(BaseModel):
+ date_: Annotated[str, pydantic.Field(alias="date")]
+ r"""UTC calendar date the row is aggregated over (YYYY-MM-DD)."""
+
+ model_permaslug: str
+ r"""Model variant permaslug (e.g. `openai/gpt-4o-2024-05-13`, `openai/gpt-4o-2024-05-13:free`). Non-default variants include a `:variant` suffix and are ranked as their own entry. The reserved value `other` denotes the aggregated row covering every model outside the daily top 50 for that date — always sorted last within its date."""
+
+ total_tokens: str
+ r"""Sum of `prompt_tokens + completion_tokens` for the day, returned as a decimal string so 64-bit values are not truncated."""
diff --git a/src/openrouter/components/rankingsdailymeta.py b/src/openrouter/components/rankingsdailymeta.py
new file mode 100644
index 0000000..df1ae5d
--- /dev/null
+++ b/src/openrouter/components/rankingsdailymeta.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+Version = Literal["v1",]
+r"""Dataset version. Field names and grain are stable for the life of `v1`."""
+
+
+class RankingsDailyMetaTypedDict(TypedDict):
+ as_of: str
+ r"""ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events."""
+ end_date: str
+ r"""Resolved end of the date window (UTC, inclusive)."""
+ start_date: str
+ r"""Resolved start of the date window (UTC, inclusive)."""
+ version: Version
+ r"""Dataset version. Field names and grain are stable for the life of `v1`."""
+
+
+class RankingsDailyMeta(BaseModel):
+ as_of: str
+ r"""ISO-8601 timestamp of when the response was generated. Reflects data-freshness because the underlying materialized view continuously ingests upstream events."""
+
+ end_date: str
+ r"""Resolved end of the date window (UTC, inclusive)."""
+
+ start_date: str
+ r"""Resolved start of the date window (UTC, inclusive)."""
+
+ version: Version
+ r"""Dataset version. Field names and grain are stable for the life of `v1`."""
diff --git a/src/openrouter/components/rankingsdailyresponse.py b/src/openrouter/components/rankingsdailyresponse.py
new file mode 100644
index 0000000..9adc8e6
--- /dev/null
+++ b/src/openrouter/components/rankingsdailyresponse.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .rankingsdailyitem import RankingsDailyItem, RankingsDailyItemTypedDict
+from .rankingsdailymeta import RankingsDailyMeta, RankingsDailyMetaTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class RankingsDailyResponseTypedDict(TypedDict):
+ data: List[RankingsDailyItemTypedDict]
+ r"""Up to 51 rows per day — the top 50 public models by `total_tokens` for each UTC calendar date in the window, plus one aggregated `other` row summing every model outside that top 50 (omitted when the long tail is empty). Rows are sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date. Ties between real models break alphabetically on `model_permaslug` so the order is stable across requests."""
+ meta: RankingsDailyMetaTypedDict
+
+
+class RankingsDailyResponse(BaseModel):
+ data: List[RankingsDailyItem]
+ r"""Up to 51 rows per day — the top 50 public models by `total_tokens` for each UTC calendar date in the window, plus one aggregated `other` row summing every model outside that top 50 (omitted when the long tail is empty). Rows are sorted by `date` ascending, then by `total_tokens` descending, with `other` pinned last within its date. Ties between real models break alphabetically on `model_permaslug` so the order is stable across requests."""
+
+ meta: RankingsDailyMeta
diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py
index 357c19a..6f285c2 100644
--- a/src/openrouter/components/responsesrequest.py
+++ b/src/openrouter/components/responsesrequest.py
@@ -1,8 +1,21 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .advisorservertool_openrouter import (
+ AdvisorServerToolOpenRouter,
+ AdvisorServerToolOpenRouterTypedDict,
+)
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
from .applypatchservertool import ApplyPatchServerTool, ApplyPatchServerToolTypedDict
+from .applypatchservertool_openrouter import (
+ ApplyPatchServerToolOpenRouter,
+ ApplyPatchServerToolOpenRouterTypedDict,
+)
from .autorouterplugin import AutoRouterPlugin, AutoRouterPluginTypedDict
+from .bashservertool import BashServerTool, BashServerToolTypedDict
from .chatsearchmodelsservertool import (
ChatSearchModelsServerTool,
ChatSearchModelsServerToolTypedDict,
@@ -21,6 +34,11 @@ from .customtool import CustomTool, CustomToolTypedDict
from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict
from .fileparserplugin import FileParserPlugin, FileParserPluginTypedDict
from .filesearchservertool import FileSearchServerTool, FileSearchServerToolTypedDict
+from .fusionplugin import FusionPlugin, FusionPluginTypedDict
+from .fusionservertool_openrouter import (
+ FusionServerToolOpenRouter,
+ FusionServerToolOpenRouterTypedDict,
+)
from .imageconfig import ImageConfig, ImageConfigTypedDict
from .imagegenerationservertool import (
ImageGenerationServerTool,
@@ -43,6 +61,7 @@ from .openairesponsestoolchoice_union import (
)
from .openairesponsestruncation import OpenAIResponsesTruncation
from .outputmodalityenum import OutputModalityEnum
+from .paretorouterplugin import ParetoRouterPlugin, ParetoRouterPluginTypedDict
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
Preview20250311WebSearchServerToolTypedDict,
@@ -56,9 +75,19 @@ from .reasoningconfig import ReasoningConfig, ReasoningConfigTypedDict
from .responsehealingplugin import ResponseHealingPlugin, ResponseHealingPluginTypedDict
from .responseincludesenum import ResponseIncludesEnum
from .shellservertool import ShellServerTool, ShellServerToolTypedDict
+from .shellservertool_openrouter import (
+ ShellServerToolOpenRouter,
+ ShellServerToolOpenRouterTypedDict,
+)
+from .stopservertoolswhencondition import (
+ StopServerToolsWhenCondition,
+ StopServerToolsWhenConditionTypedDict,
+)
from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict
from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict
from .traceconfig import TraceConfig, TraceConfigTypedDict
+from .webfetchplugin import WebFetchPlugin, WebFetchPluginTypedDict
+from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict
from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict
from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict
from .websearchservertool_openrouter import (
@@ -86,9 +115,12 @@ ResponsesRequestPluginTypedDict = TypeAliasType(
Union[
ModerationPluginTypedDict,
ResponseHealingPluginTypedDict,
- AutoRouterPluginTypedDict,
FileParserPluginTypedDict,
ContextCompressionPluginTypedDict,
+ ParetoRouterPluginTypedDict,
+ AutoRouterPluginTypedDict,
+ WebFetchPluginTypedDict,
+ FusionPluginTypedDict,
WebSearchPluginTypedDict,
],
)
@@ -99,9 +131,12 @@ ResponsesRequestPlugin = Annotated[
Annotated[AutoRouterPlugin, Tag("auto-router")],
Annotated[ContextCompressionPlugin, Tag("context-compression")],
Annotated[FileParserPlugin, Tag("file-parser")],
+ Annotated[FusionPlugin, Tag("fusion")],
Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ParetoRouterPlugin, Tag("pareto-router")],
Annotated[ResponseHealingPlugin, Tag("response-healing")],
Annotated[WebSearchPlugin, Tag("web")],
+ Annotated[WebFetchPlugin, Tag("web-fetch")],
],
Discriminator(lambda m: get_discriminator(m, "id", "id")),
]
@@ -179,22 +214,28 @@ class ResponsesRequestToolFunction(BaseModel):
ResponsesRequestToolUnionTypedDict = TypeAliasType(
"ResponsesRequestToolUnionTypedDict",
Union[
- ApplyPatchServerToolTypedDict,
CodexLocalShellToolTypedDict,
+ ApplyPatchServerToolTypedDict,
ShellServerToolTypedDict,
- WebSearchServerToolOpenRouterTypedDict,
ChatSearchModelsServerToolTypedDict,
- ImageGenerationServerToolOpenRouterTypedDict,
+ WebFetchServerToolTypedDict,
+ ShellServerToolOpenRouterTypedDict,
+ BashServerToolTypedDict,
CodeInterpreterServerToolTypedDict,
+ ApplyPatchServerToolOpenRouterTypedDict,
+ WebSearchServerToolOpenRouterTypedDict,
+ ImageGenerationServerToolOpenRouterTypedDict,
+ FusionServerToolOpenRouterTypedDict,
DatetimeServerToolTypedDict,
- ComputerUseServerToolTypedDict,
+ AdvisorServerToolOpenRouterTypedDict,
CustomToolTypedDict,
+ ComputerUseServerToolTypedDict,
ResponsesRequestToolFunctionTypedDict,
FileSearchServerToolTypedDict,
- WebSearchServerToolTypedDict,
- LegacyWebSearchServerToolTypedDict,
- Preview20250311WebSearchServerToolTypedDict,
PreviewWebSearchServerToolTypedDict,
+ Preview20250311WebSearchServerToolTypedDict,
+ LegacyWebSearchServerToolTypedDict,
+ WebSearchServerToolTypedDict,
McpServerToolTypedDict,
ImageGenerationServerToolTypedDict,
],
@@ -219,14 +260,20 @@ ResponsesRequestToolUnion = Annotated[
Annotated[ShellServerTool, Tag("shell")],
Annotated[ApplyPatchServerTool, Tag("apply_patch")],
Annotated[CustomTool, Tag("custom")],
+ Annotated[AdvisorServerToolOpenRouter, Tag("openrouter:advisor")],
Annotated[DatetimeServerTool, Tag("openrouter:datetime")],
+ Annotated[FusionServerToolOpenRouter, Tag("openrouter:fusion")],
Annotated[
ImageGenerationServerToolOpenRouter, Tag("openrouter:image_generation")
],
Annotated[
ChatSearchModelsServerTool, Tag("openrouter:experimental__search_models")
],
+ Annotated[WebFetchServerTool, Tag("openrouter:web_fetch")],
Annotated[WebSearchServerToolOpenRouter, Tag("openrouter:web_search")],
+ Annotated[ApplyPatchServerToolOpenRouter, Tag("openrouter:apply_patch")],
+ Annotated[BashServerTool, Tag("openrouter:bash")],
+ Annotated[ShellServerToolOpenRouter, Tag("openrouter:shell")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
@@ -236,6 +283,8 @@ class ResponsesRequestTypedDict(TypedDict):
r"""Request schema for Responses endpoint"""
background: NotRequired[Nullable[bool]]
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
frequency_penalty: NotRequired[Nullable[float]]
image_config: NotRequired[Dict[str, ImageConfigTypedDict]]
r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."""
@@ -265,7 +314,9 @@ class ResponsesRequestTypedDict(TypedDict):
safety_identifier: NotRequired[Nullable[str]]
service_tier: NotRequired[Nullable[ResponsesRequestServiceTier]]
session_id: NotRequired[str]
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+ stop_server_tools_when: NotRequired[List[StopServerToolsWhenConditionTypedDict]]
+ r"""Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`."""
store: Literal[False]
stream: NotRequired[bool]
temperature: NotRequired[Nullable[float]]
@@ -288,6 +339,9 @@ class ResponsesRequest(BaseModel):
background: OptionalNullable[bool] = UNSET
+ cache_control: Optional[AnthropicCacheControlDirective] = None
+ r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
frequency_penalty: OptionalNullable[float] = UNSET
image_config: Optional[Dict[str, ImageConfig]] = None
@@ -345,7 +399,10 @@ class ResponsesRequest(BaseModel):
] = "auto"
session_id: Optional[str] = None
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+
+ stop_server_tools_when: Optional[List[StopServerToolsWhenCondition]] = None
+ r"""Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`."""
STORE: Annotated[
Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))],
@@ -384,6 +441,7 @@ class ResponsesRequest(BaseModel):
def serialize_model(self, handler):
optional_fields = [
"background",
+ "cache_control",
"frequency_penalty",
"image_config",
"include",
@@ -406,6 +464,7 @@ class ResponsesRequest(BaseModel):
"safety_identifier",
"service_tier",
"session_id",
+ "stop_server_tools_when",
"store",
"stream",
"temperature",
diff --git a/src/openrouter/components/responsesstreamingresponse.py b/src/openrouter/components/responsesstreamingresponse.py
new file mode 100644
index 0000000..f42e733
--- /dev/null
+++ b/src/openrouter/components/responsesstreamingresponse.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .streamevents import StreamEvents, StreamEventsTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class ResponsesStreamingResponseTypedDict(TypedDict):
+ data: StreamEventsTypedDict
+ r"""Union of all possible event types emitted during response streaming"""
+
+
+class ResponsesStreamingResponse(BaseModel):
+ data: StreamEvents
+ r"""Union of all possible event types emitted during response streaming"""
diff --git a/src/openrouter/components/routerattempt.py b/src/openrouter/components/routerattempt.py
new file mode 100644
index 0000000..d47bd37
--- /dev/null
+++ b/src/openrouter/components/routerattempt.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class RouterAttemptTypedDict(TypedDict):
+ model: str
+ provider: str
+ status: int
+
+
+class RouterAttempt(BaseModel):
+ model: str
+
+ provider: str
+
+ status: int
diff --git a/src/openrouter/components/routerparams.py b/src/openrouter/components/routerparams.py
new file mode 100644
index 0000000..ae952a3
--- /dev/null
+++ b/src/openrouter/components/routerparams.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable
+import pydantic
+from pydantic import ConfigDict
+from typing import Any, Dict, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class RouterParamsTypedDict(TypedDict):
+ quality_floor: NotRequired[float]
+ throughput_floor: NotRequired[float]
+ version_group: NotRequired[str]
+
+
+class RouterParams(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
+ )
+ __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
+
+ quality_floor: Optional[float] = None
+
+ throughput_floor: Optional[float] = None
+
+ version_group: Optional[str] = None
+
+ @property
+ def additional_properties(self):
+ return self.__pydantic_extra__
+
+ @additional_properties.setter
+ def additional_properties(self, value):
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
diff --git a/src/openrouter/components/routingstrategy.py b/src/openrouter/components/routingstrategy.py
new file mode 100644
index 0000000..2f0e24f
--- /dev/null
+++ b/src/openrouter/components/routingstrategy.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+RoutingStrategy = Union[
+ Literal[
+ "direct",
+ "auto",
+ "free",
+ "latest",
+ "alias",
+ "fallback",
+ "pareto",
+ "bodybuilder",
+ "fusion",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/searchqualitylevel.py b/src/openrouter/components/searchqualitylevel.py
index 36eba03..27deefd 100644
--- a/src/openrouter/components/searchqualitylevel.py
+++ b/src/openrouter/components/searchqualitylevel.py
@@ -13,4 +13,4 @@ SearchQualityLevel = Union[
],
UnrecognizedStr,
]
-r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search."""
+r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
diff --git a/src/openrouter/components/shellcallitem.py b/src/openrouter/components/shellcallitem.py
new file mode 100644
index 0000000..892539b
--- /dev/null
+++ b/src/openrouter/components/shellcallitem.py
@@ -0,0 +1,132 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, List, Literal, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ShellCallItemActionTypedDict(TypedDict):
+ commands: List[str]
+ max_output_length: NotRequired[Nullable[int]]
+ timeout_ms: NotRequired[Nullable[int]]
+
+
+class ShellCallItemAction(BaseModel):
+ commands: List[str]
+
+ max_output_length: OptionalNullable[int] = UNSET
+
+ timeout_ms: OptionalNullable[int] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["max_output_length", "timeout_ms"]
+ nullable_fields = ["max_output_length", "timeout_ms"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+ShellCallItemStatus = Union[
+ Literal[
+ "in_progress",
+ "completed",
+ "incomplete",
+ ],
+ UnrecognizedStr,
+]
+
+
+ShellCallItemType = Literal["shell_call",]
+
+
+class ShellCallItemTypedDict(TypedDict):
+ r"""A shell command execution call (newer variant)"""
+
+ action: ShellCallItemActionTypedDict
+ call_id: str
+ type: ShellCallItemType
+ environment: NotRequired[Nullable[Any]]
+ id: NotRequired[Nullable[str]]
+ status: NotRequired[Nullable[ShellCallItemStatus]]
+
+
+class ShellCallItem(BaseModel):
+ r"""A shell command execution call (newer variant)"""
+
+ action: ShellCallItemAction
+
+ call_id: str
+
+ type: ShellCallItemType
+
+ environment: OptionalNullable[Any] = UNSET
+
+ id: OptionalNullable[str] = UNSET
+
+ status: Annotated[
+ OptionalNullable[ShellCallItemStatus], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["environment", "id", "status"]
+ nullable_fields = ["environment", "id", "status"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/shellcalloutputitem.py b/src/openrouter/components/shellcalloutputitem.py
new file mode 100644
index 0000000..fb4b300
--- /dev/null
+++ b/src/openrouter/components/shellcalloutputitem.py
@@ -0,0 +1,150 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+import pydantic
+from pydantic import ConfigDict, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, List, Literal, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ShellCallOutputItemOutputTypedDict(TypedDict):
+ type: str
+ content: NotRequired[Nullable[str]]
+ exit_code: NotRequired[Nullable[int]]
+
+
+class ShellCallOutputItemOutput(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
+ )
+ __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
+
+ type: str
+
+ content: OptionalNullable[str] = UNSET
+
+ exit_code: OptionalNullable[int] = UNSET
+
+ @property
+ def additional_properties(self):
+ return self.__pydantic_extra__
+
+ @additional_properties.setter
+ def additional_properties(self, value):
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["content", "exit_code"]
+ nullable_fields = ["content", "exit_code"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ for k, v in serialized.items():
+ m[k] = v
+
+ return m
+
+
+ShellCallOutputItemStatus = Union[
+ Literal[
+ "in_progress",
+ "completed",
+ "incomplete",
+ ],
+ UnrecognizedStr,
+]
+
+
+ShellCallOutputItemType = Literal["shell_call_output",]
+
+
+class ShellCallOutputItemTypedDict(TypedDict):
+ r"""Output from a shell command execution (newer variant)"""
+
+ call_id: str
+ output: List[ShellCallOutputItemOutputTypedDict]
+ type: ShellCallOutputItemType
+ id: NotRequired[Nullable[str]]
+ max_output_length: NotRequired[Nullable[int]]
+ status: NotRequired[Nullable[ShellCallOutputItemStatus]]
+
+
+class ShellCallOutputItem(BaseModel):
+ r"""Output from a shell command execution (newer variant)"""
+
+ call_id: str
+
+ output: List[ShellCallOutputItemOutput]
+
+ type: ShellCallOutputItemType
+
+ id: OptionalNullable[str] = UNSET
+
+ max_output_length: OptionalNullable[int] = UNSET
+
+ status: Annotated[
+ OptionalNullable[ShellCallOutputItemStatus],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id", "max_output_length", "status"]
+ nullable_fields = ["id", "max_output_length", "status"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/shellcallstatus.py b/src/openrouter/components/shellcallstatus.py
new file mode 100644
index 0000000..d73f76d
--- /dev/null
+++ b/src/openrouter/components/shellcallstatus.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ShellCallStatus = Union[
+ Literal[
+ "in_progress",
+ "completed",
+ "incomplete",
+ ],
+ UnrecognizedStr,
+]
+r"""Status of a shell call or its output."""
diff --git a/src/openrouter/components/shellservertool_openrouter.py b/src/openrouter/components/shellservertool_openrouter.py
new file mode 100644
index 0000000..304313b
--- /dev/null
+++ b/src/openrouter/components/shellservertool_openrouter.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .shellservertoolconfig import ShellServerToolConfig, ShellServerToolConfigTypedDict
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+ShellServerToolOpenRouterType = Literal["openrouter:shell",]
+
+
+class ShellServerToolOpenRouterTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool)"""
+
+ type: ShellServerToolOpenRouterType
+ parameters: NotRequired[ShellServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:shell server tool"""
+
+
+class ShellServerToolOpenRouter(BaseModel):
+ r"""OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool)"""
+
+ type: ShellServerToolOpenRouterType
+
+ parameters: Optional[ShellServerToolConfig] = None
+ r"""Configuration for the openrouter:shell server tool"""
diff --git a/src/openrouter/components/shellservertoolconfig.py b/src/openrouter/components/shellservertoolconfig.py
new file mode 100644
index 0000000..3568309
--- /dev/null
+++ b/src/openrouter/components/shellservertoolconfig.py
@@ -0,0 +1,39 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .shellservertoolengine import ShellServerToolEngine
+from .shellservertoolenvironment import (
+ ShellServerToolEnvironment,
+ ShellServerToolEnvironmentTypedDict,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ShellServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:shell server tool"""
+
+ engine: NotRequired[ShellServerToolEngine]
+ r"""Which shell engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox."""
+ environment: NotRequired[ShellServerToolEnvironmentTypedDict]
+ r"""Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not."""
+ sleep_after_seconds: NotRequired[int]
+ r"""How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days)."""
+
+
+class ShellServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:shell server tool"""
+
+ engine: Annotated[
+ Optional[ShellServerToolEngine], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which shell engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox."""
+
+ environment: Optional[ShellServerToolEnvironment] = None
+ r"""Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not."""
+
+ sleep_after_seconds: Optional[int] = None
+ r"""How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days)."""
diff --git a/src/openrouter/components/shellservertoolengine.py b/src/openrouter/components/shellservertoolengine.py
new file mode 100644
index 0000000..9f6e0f7
--- /dev/null
+++ b/src/openrouter/components/shellservertoolengine.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+ShellServerToolEngine = Union[
+ Literal[
+ "auto",
+ "openrouter",
+ ],
+ UnrecognizedStr,
+]
+r"""Which shell engine to use. \"openrouter\" runs commands server-side in the OpenRouter sandbox. \"auto\" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox."""
diff --git a/src/openrouter/components/shellservertoolenvironment.py b/src/openrouter/components/shellservertoolenvironment.py
new file mode 100644
index 0000000..418953b
--- /dev/null
+++ b/src/openrouter/components/shellservertoolenvironment.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .containerautoenvironment import (
+ ContainerAutoEnvironment,
+ ContainerAutoEnvironmentTypedDict,
+)
+from .containerreferenceenvironment import (
+ ContainerReferenceEnvironment,
+ ContainerReferenceEnvironmentTypedDict,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
+
+
+ShellServerToolEnvironmentTypedDict = TypeAliasType(
+ "ShellServerToolEnvironmentTypedDict",
+ Union[ContainerAutoEnvironmentTypedDict, ContainerReferenceEnvironmentTypedDict],
+)
+r"""Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not."""
+
+
+ShellServerToolEnvironment = Annotated[
+ Union[
+ Annotated[ContainerAutoEnvironment, Tag("container_auto")],
+ Annotated[ContainerReferenceEnvironment, Tag("container_reference")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+r"""Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not."""
diff --git a/src/openrouter/components/speechrequest.py b/src/openrouter/components/speechrequest.py
new file mode 100644
index 0000000..aebab1a
--- /dev/null
+++ b/src/openrouter/components/speechrequest.py
@@ -0,0 +1,74 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .provideroptions import ProviderOptions, ProviderOptionsTypedDict
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class SpeechRequestProviderTypedDict(TypedDict):
+ r"""Provider-specific passthrough configuration"""
+
+ options: NotRequired[ProviderOptionsTypedDict]
+ r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
+
+
+class SpeechRequestProvider(BaseModel):
+ r"""Provider-specific passthrough configuration"""
+
+ options: Optional[ProviderOptions] = None
+ r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
+
+
+ResponseFormatEnum = Union[
+ Literal[
+ "mp3",
+ "pcm",
+ ],
+ UnrecognizedStr,
+]
+r"""Audio output format"""
+
+
+class SpeechRequestTypedDict(TypedDict):
+ r"""Text-to-speech request input"""
+
+ input: str
+ r"""Text to synthesize"""
+ model: str
+ r"""TTS model identifier"""
+ voice: str
+ r"""Voice identifier (provider-specific)."""
+ provider: NotRequired[SpeechRequestProviderTypedDict]
+ r"""Provider-specific passthrough configuration"""
+ response_format: NotRequired[ResponseFormatEnum]
+ r"""Audio output format"""
+ speed: NotRequired[float]
+ r"""Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers."""
+
+
+class SpeechRequest(BaseModel):
+ r"""Text-to-speech request input"""
+
+ input: str
+ r"""Text to synthesize"""
+
+ model: str
+ r"""TTS model identifier"""
+
+ voice: str
+ r"""Voice identifier (provider-specific)."""
+
+ provider: Optional[SpeechRequestProvider] = None
+ r"""Provider-specific passthrough configuration"""
+
+ response_format: Annotated[
+ Optional[ResponseFormatEnum], PlainValidator(validate_open_enum(False))
+ ] = "pcm"
+ r"""Audio output format"""
+
+ speed: Optional[float] = None
+ r"""Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers."""
diff --git a/src/openrouter/components/stopservertoolswhencondition.py b/src/openrouter/components/stopservertoolswhencondition.py
new file mode 100644
index 0000000..f849efe
--- /dev/null
+++ b/src/openrouter/components/stopservertoolswhencondition.py
@@ -0,0 +1,53 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .stopservertoolswhenfinishreasonis import (
+ StopServerToolsWhenFinishReasonIs,
+ StopServerToolsWhenFinishReasonIsTypedDict,
+)
+from .stopservertoolswhenhastoolcall import (
+ StopServerToolsWhenHasToolCall,
+ StopServerToolsWhenHasToolCallTypedDict,
+)
+from .stopservertoolswhenmaxcost import (
+ StopServerToolsWhenMaxCost,
+ StopServerToolsWhenMaxCostTypedDict,
+)
+from .stopservertoolswhenmaxtokensused import (
+ StopServerToolsWhenMaxTokensUsed,
+ StopServerToolsWhenMaxTokensUsedTypedDict,
+)
+from .stopservertoolswhenstepcountis import (
+ StopServerToolsWhenStepCountIs,
+ StopServerToolsWhenStepCountIsTypedDict,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
+
+
+StopServerToolsWhenConditionTypedDict = TypeAliasType(
+ "StopServerToolsWhenConditionTypedDict",
+ Union[
+ StopServerToolsWhenStepCountIsTypedDict,
+ StopServerToolsWhenHasToolCallTypedDict,
+ StopServerToolsWhenMaxTokensUsedTypedDict,
+ StopServerToolsWhenMaxCostTypedDict,
+ StopServerToolsWhenFinishReasonIsTypedDict,
+ ],
+)
+r"""A single condition that, when met, halts the server-tool agent loop."""
+
+
+StopServerToolsWhenCondition = Annotated[
+ Union[
+ Annotated[StopServerToolsWhenFinishReasonIs, Tag("finish_reason_is")],
+ Annotated[StopServerToolsWhenHasToolCall, Tag("has_tool_call")],
+ Annotated[StopServerToolsWhenMaxCost, Tag("max_cost")],
+ Annotated[StopServerToolsWhenMaxTokensUsed, Tag("max_tokens_used")],
+ Annotated[StopServerToolsWhenStepCountIs, Tag("step_count_is")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+r"""A single condition that, when met, halts the server-tool agent loop."""
diff --git a/src/openrouter/components/stopservertoolswhenfinishreasonis.py b/src/openrouter/components/stopservertoolswhenfinishreasonis.py
new file mode 100644
index 0000000..0a8dce7
--- /dev/null
+++ b/src/openrouter/components/stopservertoolswhenfinishreasonis.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StopServerToolsWhenFinishReasonIsType = Literal["finish_reason_is",]
+
+
+class StopServerToolsWhenFinishReasonIsTypedDict(TypedDict):
+ r"""Stop when the upstream model emits this finish reason (e.g. `length`)."""
+
+ reason: str
+ type: StopServerToolsWhenFinishReasonIsType
+
+
+class StopServerToolsWhenFinishReasonIs(BaseModel):
+ r"""Stop when the upstream model emits this finish reason (e.g. `length`)."""
+
+ reason: str
+
+ type: StopServerToolsWhenFinishReasonIsType
diff --git a/src/openrouter/components/stopservertoolswhenhastoolcall.py b/src/openrouter/components/stopservertoolswhenhastoolcall.py
new file mode 100644
index 0000000..881bbcd
--- /dev/null
+++ b/src/openrouter/components/stopservertoolswhenhastoolcall.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StopServerToolsWhenHasToolCallType = Literal["has_tool_call",]
+
+
+class StopServerToolsWhenHasToolCallTypedDict(TypedDict):
+ r"""Stop after a tool with this name has been called."""
+
+ tool_name: str
+ type: StopServerToolsWhenHasToolCallType
+
+
+class StopServerToolsWhenHasToolCall(BaseModel):
+ r"""Stop after a tool with this name has been called."""
+
+ tool_name: str
+
+ type: StopServerToolsWhenHasToolCallType
diff --git a/src/openrouter/components/stopservertoolswhenmaxcost.py b/src/openrouter/components/stopservertoolswhenmaxcost.py
new file mode 100644
index 0000000..58b2014
--- /dev/null
+++ b/src/openrouter/components/stopservertoolswhenmaxcost.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StopServerToolsWhenMaxCostType = Literal["max_cost",]
+
+
+class StopServerToolsWhenMaxCostTypedDict(TypedDict):
+ r"""Stop once cumulative cost across the loop exceeds this dollar threshold."""
+
+ max_cost_in_dollars: float
+ type: StopServerToolsWhenMaxCostType
+
+
+class StopServerToolsWhenMaxCost(BaseModel):
+ r"""Stop once cumulative cost across the loop exceeds this dollar threshold."""
+
+ max_cost_in_dollars: float
+
+ type: StopServerToolsWhenMaxCostType
diff --git a/src/openrouter/components/stopservertoolswhenmaxtokensused.py b/src/openrouter/components/stopservertoolswhenmaxtokensused.py
new file mode 100644
index 0000000..09cc67e
--- /dev/null
+++ b/src/openrouter/components/stopservertoolswhenmaxtokensused.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StopServerToolsWhenMaxTokensUsedType = Literal["max_tokens_used",]
+
+
+class StopServerToolsWhenMaxTokensUsedTypedDict(TypedDict):
+ r"""Stop once cumulative token usage across the loop exceeds this threshold."""
+
+ max_tokens: int
+ type: StopServerToolsWhenMaxTokensUsedType
+
+
+class StopServerToolsWhenMaxTokensUsed(BaseModel):
+ r"""Stop once cumulative token usage across the loop exceeds this threshold."""
+
+ max_tokens: int
+
+ type: StopServerToolsWhenMaxTokensUsedType
diff --git a/src/openrouter/components/stopservertoolswhenstepcountis.py b/src/openrouter/components/stopservertoolswhenstepcountis.py
new file mode 100644
index 0000000..85c82e9
--- /dev/null
+++ b/src/openrouter/components/stopservertoolswhenstepcountis.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StopServerToolsWhenStepCountIsType = Literal["step_count_is",]
+
+
+class StopServerToolsWhenStepCountIsTypedDict(TypedDict):
+ r"""Stop after the agent loop has executed this many steps."""
+
+ step_count: int
+ type: StopServerToolsWhenStepCountIsType
+
+
+class StopServerToolsWhenStepCountIs(BaseModel):
+ r"""Stop after the agent loop has executed this many steps."""
+
+ step_count: int
+
+ type: StopServerToolsWhenStepCountIsType
diff --git a/src/openrouter/components/streamevents.py b/src/openrouter/components/streamevents.py
index c663877..b1e1e14 100644
--- a/src/openrouter/components/streamevents.py
+++ b/src/openrouter/components/streamevents.py
@@ -2,8 +2,24 @@
from __future__ import annotations
from .annotationaddedevent import AnnotationAddedEvent, AnnotationAddedEventTypedDict
+from .applypatchcalloperationdiffdeltaevent import (
+ ApplyPatchCallOperationDiffDeltaEvent,
+ ApplyPatchCallOperationDiffDeltaEventTypedDict,
+)
+from .applypatchcalloperationdiffdoneevent import (
+ ApplyPatchCallOperationDiffDoneEvent,
+ ApplyPatchCallOperationDiffDoneEventTypedDict,
+)
from .contentpartaddedevent import ContentPartAddedEvent, ContentPartAddedEventTypedDict
from .contentpartdoneevent import ContentPartDoneEvent, ContentPartDoneEventTypedDict
+from .customtoolcallinputdeltaevent import (
+ CustomToolCallInputDeltaEvent,
+ CustomToolCallInputDeltaEventTypedDict,
+)
+from .customtoolcallinputdoneevent import (
+ CustomToolCallInputDoneEvent,
+ CustomToolCallInputDoneEventTypedDict,
+)
from .errorevent import ErrorEvent, ErrorEventTypedDict
from .functioncallargsdeltaevent import (
FunctionCallArgsDeltaEvent,
@@ -13,6 +29,42 @@ from .functioncallargsdoneevent import (
FunctionCallArgsDoneEvent,
FunctionCallArgsDoneEventTypedDict,
)
+from .fusioncallanalysiscompletedevent import (
+ FusionCallAnalysisCompletedEvent,
+ FusionCallAnalysisCompletedEventTypedDict,
+)
+from .fusioncallanalysisinprogressevent import (
+ FusionCallAnalysisInProgressEvent,
+ FusionCallAnalysisInProgressEventTypedDict,
+)
+from .fusioncallcompletedevent import (
+ FusionCallCompletedEvent,
+ FusionCallCompletedEventTypedDict,
+)
+from .fusioncallinprogressevent import (
+ FusionCallInProgressEvent,
+ FusionCallInProgressEventTypedDict,
+)
+from .fusioncallpaneladdedevent import (
+ FusionCallPanelAddedEvent,
+ FusionCallPanelAddedEventTypedDict,
+)
+from .fusioncallpanelcompletedevent import (
+ FusionCallPanelCompletedEvent,
+ FusionCallPanelCompletedEventTypedDict,
+)
+from .fusioncallpaneldeltaevent import (
+ FusionCallPanelDeltaEvent,
+ FusionCallPanelDeltaEventTypedDict,
+)
+from .fusioncallpanelfailedevent import (
+ FusionCallPanelFailedEvent,
+ FusionCallPanelFailedEventTypedDict,
+)
+from .fusioncallpanelreasoningdeltaevent import (
+ FusionCallPanelReasoningDeltaEvent,
+ FusionCallPanelReasoningDeltaEventTypedDict,
+)
from .imagegencallcompletedevent import (
ImageGenCallCompletedEvent,
ImageGenCallCompletedEventTypedDict,
@@ -105,28 +157,41 @@ StreamEventsTypedDict = TypeAliasType(
StreamEventsResponseCompletedTypedDict,
StreamEventsResponseIncompleteTypedDict,
StreamEventsResponseFailedTypedDict,
- StreamEventsResponseOutputItemAddedTypedDict,
- StreamEventsResponseOutputItemDoneTypedDict,
+ FusionCallInProgressEventTypedDict,
WebSearchCallCompletedEventTypedDict,
- WebSearchCallSearchingEventTypedDict,
- WebSearchCallInProgressEventTypedDict,
+ StreamEventsResponseOutputItemDoneTypedDict,
+ FusionCallCompletedEventTypedDict,
+ ImageGenCallInProgressEventTypedDict,
+ StreamEventsResponseOutputItemAddedTypedDict,
ImageGenCallCompletedEventTypedDict,
ImageGenCallGeneratingEventTypedDict,
- ImageGenCallInProgressEventTypedDict,
+ WebSearchCallInProgressEventTypedDict,
+ WebSearchCallSearchingEventTypedDict,
+ FusionCallAnalysisInProgressEventTypedDict,
+ CustomToolCallInputDoneEventTypedDict,
+ CustomToolCallInputDeltaEventTypedDict,
FunctionCallArgsDeltaEventTypedDict,
+ ApplyPatchCallOperationDiffDeltaEventTypedDict,
ErrorEventTypedDict,
- ReasoningSummaryTextDeltaEventTypedDict,
- ReasoningSummaryTextDoneEventTypedDict,
- ReasoningDeltaEventTypedDict,
- ReasoningDoneEventTypedDict,
- ReasoningSummaryPartAddedEventTypedDict,
+ ApplyPatchCallOperationDiffDoneEventTypedDict,
+ FusionCallPanelAddedEventTypedDict,
+ FusionCallAnalysisCompletedEventTypedDict,
ReasoningSummaryPartDoneEventTypedDict,
- ContentPartAddedEventTypedDict,
- FunctionCallArgsDoneEventTypedDict,
RefusalDoneEventTypedDict,
- RefusalDeltaEventTypedDict,
+ ReasoningSummaryTextDoneEventTypedDict,
+ ReasoningSummaryTextDeltaEventTypedDict,
+ ReasoningSummaryPartAddedEventTypedDict,
+ ReasoningDoneEventTypedDict,
+ ReasoningDeltaEventTypedDict,
+ FunctionCallArgsDoneEventTypedDict,
+ ContentPartAddedEventTypedDict,
ImageGenCallPartialImageEventTypedDict,
+ RefusalDeltaEventTypedDict,
ContentPartDoneEventTypedDict,
+ FusionCallPanelDeltaEventTypedDict,
+ FusionCallPanelReasoningDeltaEventTypedDict,
+ FusionCallPanelCompletedEventTypedDict,
+ FusionCallPanelFailedEventTypedDict,
TextDeltaEventTypedDict,
TextDoneEventTypedDict,
AnnotationAddedEventTypedDict,
@@ -138,10 +203,24 @@ r"""Union of all possible event types emitted during response streaming"""
StreamEvents = Annotated[
Union[
Annotated[ErrorEvent, Tag("error")],
+ Annotated[
+ ApplyPatchCallOperationDiffDeltaEvent,
+ Tag("response.apply_patch_call_operation_diff.delta"),
+ ],
+ Annotated[
+ ApplyPatchCallOperationDiffDoneEvent,
+ Tag("response.apply_patch_call_operation_diff.done"),
+ ],
Annotated[StreamEventsResponseCompleted, Tag("response.completed")],
Annotated[ContentPartAddedEvent, Tag("response.content_part.added")],
Annotated[ContentPartDoneEvent, Tag("response.content_part.done")],
Annotated[OpenResponsesCreatedEvent, Tag("response.created")],
+ Annotated[
+ CustomToolCallInputDeltaEvent, Tag("response.custom_tool_call_input.delta")
+ ],
+ Annotated[
+ CustomToolCallInputDoneEvent, Tag("response.custom_tool_call_input.done")
+ ],
Annotated[StreamEventsResponseFailed, Tag("response.failed")],
Annotated[
FunctionCallArgsDeltaEvent, Tag("response.function_call_arguments.delta")
@@ -149,6 +228,26 @@ StreamEvents = Annotated[
Annotated[
FunctionCallArgsDoneEvent, Tag("response.function_call_arguments.done")
],
+ Annotated[
+ FusionCallAnalysisCompletedEvent,
+ Tag("response.fusion_call.analysis.completed"),
+ ],
+ Annotated[
+ FusionCallAnalysisInProgressEvent,
+ Tag("response.fusion_call.analysis.in_progress"),
+ ],
+ Annotated[FusionCallCompletedEvent, Tag("response.fusion_call.completed")],
+ Annotated[FusionCallInProgressEvent, Tag("response.fusion_call.in_progress")],
+ Annotated[FusionCallPanelAddedEvent, Tag("response.fusion_call.panel.added")],
+ Annotated[
+ FusionCallPanelCompletedEvent, Tag("response.fusion_call.panel.completed")
+ ],
+ Annotated[FusionCallPanelDeltaEvent, Tag("response.fusion_call.panel.delta")],
+ Annotated[FusionCallPanelFailedEvent, Tag("response.fusion_call.panel.failed")],
+ Annotated[
+ FusionCallPanelReasoningDeltaEvent,
+ Tag("response.fusion_call.panel.reasoning.delta"),
+ ],
Annotated[
ImageGenCallCompletedEvent, Tag("response.image_generation_call.completed")
],
diff --git a/src/openrouter/components/sttinputaudio.py b/src/openrouter/components/sttinputaudio.py
new file mode 100644
index 0000000..d1b15b4
--- /dev/null
+++ b/src/openrouter/components/sttinputaudio.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+import pydantic
+from typing_extensions import Annotated, TypedDict
+
+
+class STTInputAudioTypedDict(TypedDict):
+ r"""Base64-encoded audio to transcribe"""
+
+ data: str
+ r"""Base64-encoded audio data (raw bytes, not a data URI)"""
+ format_: str
+ r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider."""
+
+
+class STTInputAudio(BaseModel):
+ r"""Base64-encoded audio to transcribe"""
+
+ data: str
+ r"""Base64-encoded audio data (raw bytes, not a data URI)"""
+
+ format_: Annotated[str, pydantic.Field(alias="format")]
+ r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, webm, aac). Supported formats vary by provider."""
diff --git a/src/openrouter/components/sttrequest.py b/src/openrouter/components/sttrequest.py
new file mode 100644
index 0000000..5ea932b
--- /dev/null
+++ b/src/openrouter/components/sttrequest.py
@@ -0,0 +1,56 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .provideroptions import ProviderOptions, ProviderOptionsTypedDict
+from .sttinputaudio import STTInputAudio, STTInputAudioTypedDict
+from openrouter.types import BaseModel
+from typing import Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class STTRequestProviderTypedDict(TypedDict):
+ r"""Provider-specific passthrough configuration"""
+
+ options: NotRequired[ProviderOptionsTypedDict]
+ r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
+
+
+class STTRequestProvider(BaseModel):
+ r"""Provider-specific passthrough configuration"""
+
+ options: Optional[ProviderOptions] = None
+ r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
+
+
+class STTRequestTypedDict(TypedDict):
+ r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio."""
+
+ input_audio: STTInputAudioTypedDict
+ r"""Base64-encoded audio to transcribe"""
+ model: str
+ r"""STT model identifier"""
+ language: NotRequired[str]
+ r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."""
+ provider: NotRequired[STTRequestProviderTypedDict]
+ r"""Provider-specific passthrough configuration"""
+ temperature: NotRequired[float]
+ r"""Sampling temperature for transcription"""
+
+
+class STTRequest(BaseModel):
+ r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio."""
+
+ input_audio: STTInputAudio
+ r"""Base64-encoded audio to transcribe"""
+
+ model: str
+ r"""STT model identifier"""
+
+ language: Optional[str] = None
+ r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."""
+
+ provider: Optional[STTRequestProvider] = None
+ r"""Provider-specific passthrough configuration"""
+
+ temperature: Optional[float] = None
+ r"""Sampling temperature for transcription"""
diff --git a/src/openrouter/components/sttresponse.py b/src/openrouter/components/sttresponse.py
new file mode 100644
index 0000000..d50a8c4
--- /dev/null
+++ b/src/openrouter/components/sttresponse.py
@@ -0,0 +1,26 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .sttusage import STTUsage, STTUsageTypedDict
+from openrouter.types import BaseModel
+from typing import Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class STTResponseTypedDict(TypedDict):
+ r"""STT response containing transcribed text and optional usage statistics"""
+
+ text: str
+ r"""The transcribed text"""
+ usage: NotRequired[STTUsageTypedDict]
+ r"""Aggregated usage statistics for the request"""
+
+
+class STTResponse(BaseModel):
+ r"""STT response containing transcribed text and optional usage statistics"""
+
+ text: str
+ r"""The transcribed text"""
+
+ usage: Optional[STTUsage] = None
+ r"""Aggregated usage statistics for the request"""
diff --git a/src/openrouter/components/sttusage.py b/src/openrouter/components/sttusage.py
new file mode 100644
index 0000000..c7661d1
--- /dev/null
+++ b/src/openrouter/components/sttusage.py
@@ -0,0 +1,40 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class STTUsageTypedDict(TypedDict):
+ r"""Aggregated usage statistics for the request"""
+
+ cost: NotRequired[float]
+ r"""Total cost of the request in USD"""
+ input_tokens: NotRequired[int]
+ r"""Number of input tokens billed for this request"""
+ output_tokens: NotRequired[int]
+ r"""Number of output tokens generated"""
+ seconds: NotRequired[float]
+ r"""Duration of the input audio in seconds"""
+ total_tokens: NotRequired[int]
+ r"""Total number of tokens used (input + output)"""
+
+
+class STTUsage(BaseModel):
+ r"""Aggregated usage statistics for the request"""
+
+ cost: Optional[float] = None
+ r"""Total cost of the request in USD"""
+
+ input_tokens: Optional[int] = None
+ r"""Number of input tokens billed for this request"""
+
+ output_tokens: Optional[int] = None
+ r"""Number of output tokens generated"""
+
+ seconds: Optional[float] = None
+ r"""Duration of the input audio in seconds"""
+
+ total_tokens: Optional[int] = None
+ r"""Total number of tokens used (input + output)"""
diff --git a/src/openrouter/components/textextendedconfig.py b/src/openrouter/components/textextendedconfig.py
index ee561b1..89224c7 100644
--- a/src/openrouter/components/textextendedconfig.py
+++ b/src/openrouter/components/textextendedconfig.py
@@ -18,11 +18,13 @@ from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
-TextExtendedConfigVerbosity = Union[
+Verbosity = Union[
Literal[
- "high",
"low",
"medium",
+ "high",
+ "xhigh",
+ "max",
],
UnrecognizedStr,
]
@@ -33,7 +35,7 @@ class TextExtendedConfigTypedDict(TypedDict):
format_: NotRequired[FormatsTypedDict]
r"""Text response format configuration"""
- verbosity: NotRequired[Nullable[TextExtendedConfigVerbosity]]
+ verbosity: NotRequired[Nullable[Verbosity]]
class TextExtendedConfig(BaseModel):
@@ -43,8 +45,7 @@ class TextExtendedConfig(BaseModel):
r"""Text response format configuration"""
verbosity: Annotated[
- OptionalNullable[TextExtendedConfigVerbosity],
- PlainValidator(validate_open_enum(False)),
+ OptionalNullable[Verbosity], PlainValidator(validate_open_enum(False))
] = UNSET
@model_serializer(mode="wrap")
diff --git a/src/openrouter/components/updatebyokkeyrequest.py b/src/openrouter/components/updatebyokkeyrequest.py
new file mode 100644
index 0000000..9fa7cf6
--- /dev/null
+++ b/src/openrouter/components/updatebyokkeyrequest.py
@@ -0,0 +1,85 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import List, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class UpdateBYOKKeyRequestTypedDict(TypedDict):
+ allowed_models: NotRequired[Nullable[List[str]]]
+ r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
+ allowed_user_ids: NotRequired[Nullable[List[str]]]
+ r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction."""
+ disabled: NotRequired[bool]
+ r"""Whether this credential is disabled."""
+ is_fallback: NotRequired[bool]
+ r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."""
+ key: NotRequired[str]
+ r"""A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses."""
+ name: NotRequired[Nullable[str]]
+ r"""Optional human-readable name for the credential."""
+
+
+class UpdateBYOKKeyRequest(BaseModel):
+ allowed_models: OptionalNullable[List[str]] = UNSET
+ r"""Optional allowlist of model slugs this credential may be used for. `null` means no restriction."""
+
+ allowed_user_ids: OptionalNullable[List[str]] = UNSET
+ r"""Optional allowlist of user IDs that may use this credential. `null` means no restriction."""
+
+ disabled: Optional[bool] = None
+ r"""Whether this credential is disabled."""
+
+ is_fallback: Optional[bool] = None
+ r"""Whether this credential is treated as a fallback — used only after non-fallback keys for the same provider have been tried."""
+
+ key: Optional[str] = None
+ r"""A new raw provider API key to rotate the credential in-place. The previous key material is overwritten and the masked label is regenerated. Encrypted at rest and never returned in API responses."""
+
+ name: OptionalNullable[str] = UNSET
+ r"""Optional human-readable name for the credential."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_models",
+ "allowed_user_ids",
+ "disabled",
+ "is_fallback",
+ "key",
+ "name",
+ ]
+ nullable_fields = ["allowed_models", "allowed_user_ids", "name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/updatebyokkeyresponse.py b/src/openrouter/components/updatebyokkeyresponse.py
new file mode 100644
index 0000000..a366469
--- /dev/null
+++ b/src/openrouter/components/updatebyokkeyresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .byokkey import BYOKKey, BYOKKeyTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class UpdateBYOKKeyResponseTypedDict(TypedDict):
+ data: BYOKKeyTypedDict
+
+
+class UpdateBYOKKeyResponse(BaseModel):
+ data: BYOKKey
diff --git a/src/openrouter/components/updateguardrailrequest.py b/src/openrouter/components/updateguardrailrequest.py
index c400077..ec5240a 100644
--- a/src/openrouter/components/updateguardrailrequest.py
+++ b/src/openrouter/components/updateguardrailrequest.py
@@ -1,6 +1,11 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .contentfilterbuiltinentryinput import (
+ ContentFilterBuiltinEntryInput,
+ ContentFilterBuiltinEntryInputTypedDict,
+)
+from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .guardrailinterval import GuardrailInterval
from openrouter.types import (
BaseModel,
@@ -10,6 +15,7 @@ from openrouter.types import (
UNSET_SENTINEL,
)
from openrouter.utils import validate_open_enum
+import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Optional
@@ -21,10 +27,24 @@ class UpdateGuardrailRequestTypedDict(TypedDict):
r"""Array of model identifiers (slug or canonical_slug accepted)"""
allowed_providers: NotRequired[Nullable[List[str]]]
r"""New list of allowed provider IDs"""
+ content_filter_builtins: NotRequired[
+ Nullable[List[ContentFilterBuiltinEntryInputTypedDict]]
+ ]
+ r"""Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only."""
+ content_filters: NotRequired[Nullable[List[ContentFilterEntryTypedDict]]]
+ r"""Custom regex content filters to apply. Set to null to remove."""
description: NotRequired[Nullable[str]]
r"""New description for the guardrail"""
enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+ enforce_zdr_anthropic: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_google: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_openai: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
+ enforce_zdr_other: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
ignored_models: NotRequired[Nullable[List[str]]]
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
ignored_providers: NotRequired[Nullable[List[str]]]
@@ -44,11 +64,36 @@ class UpdateGuardrailRequest(BaseModel):
allowed_providers: OptionalNullable[List[str]] = UNSET
r"""New list of allowed provider IDs"""
+ content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntryInput]] = (
+ UNSET
+ )
+ r"""Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only."""
+
+ content_filters: OptionalNullable[List[ContentFilterEntry]] = UNSET
+ r"""Custom regex content filters to apply. Set to null to remove."""
+
description: OptionalNullable[str] = UNSET
r"""New description for the guardrail"""
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
+ enforce_zdr: Annotated[
+ OptionalNullable[bool],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
+ ),
+ ] = UNSET
+ r"""Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request."""
+
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_google: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided."""
+
+ enforce_zdr_other: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided."""
ignored_models: OptionalNullable[List[str]] = UNSET
r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
@@ -72,8 +117,14 @@ class UpdateGuardrailRequest(BaseModel):
optional_fields = [
"allowed_models",
"allowed_providers",
+ "content_filter_builtins",
+ "content_filters",
"description",
"enforce_zdr",
+ "enforce_zdr_anthropic",
+ "enforce_zdr_google",
+ "enforce_zdr_openai",
+ "enforce_zdr_other",
"ignored_models",
"ignored_providers",
"limit_usd",
@@ -83,8 +134,14 @@ class UpdateGuardrailRequest(BaseModel):
nullable_fields = [
"allowed_models",
"allowed_providers",
+ "content_filter_builtins",
+ "content_filters",
"description",
"enforce_zdr",
+ "enforce_zdr_anthropic",
+ "enforce_zdr_google",
+ "enforce_zdr_openai",
+ "enforce_zdr_other",
"ignored_models",
"ignored_providers",
"limit_usd",
diff --git a/src/openrouter/components/updateobservabilitydestinationrequest.py b/src/openrouter/components/updateobservabilitydestinationrequest.py
new file mode 100644
index 0000000..1709ecf
--- /dev/null
+++ b/src/openrouter/components/updateobservabilitydestinationrequest.py
@@ -0,0 +1,93 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilityfilterrulesconfig import (
+ ObservabilityFilterRulesConfig,
+ ObservabilityFilterRulesConfigTypedDict,
+)
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Any, Dict, List, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class UpdateObservabilityDestinationRequestTypedDict(TypedDict):
+ api_key_hashes: NotRequired[Nullable[List[str]]]
+ r"""Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided."""
+ config: NotRequired[Dict[str, Nullable[Any]]]
+ r"""Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value."""
+ enabled: NotRequired[bool]
+ r"""Whether the destination is enabled."""
+ filter_rules: NotRequired[Nullable[ObservabilityFilterRulesConfigTypedDict]]
+ name: NotRequired[str]
+ r"""Human-readable name for the destination."""
+ privacy_mode: NotRequired[bool]
+ r"""When true, request/response bodies are not forwarded — only metadata."""
+ sampling_rate: NotRequired[float]
+ r"""Sampling rate between 0.0001 and 1 (1 = 100%)."""
+
+
+class UpdateObservabilityDestinationRequest(BaseModel):
+ api_key_hashes: OptionalNullable[List[str]] = UNSET
+ r"""Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided."""
+
+ config: Optional[Dict[str, Nullable[Any]]] = None
+ r"""Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value."""
+
+ enabled: Optional[bool] = None
+ r"""Whether the destination is enabled."""
+
+ filter_rules: OptionalNullable[ObservabilityFilterRulesConfig] = UNSET
+
+ name: Optional[str] = None
+ r"""Human-readable name for the destination."""
+
+ privacy_mode: Optional[bool] = None
+ r"""When true, request/response bodies are not forwarded — only metadata."""
+
+ sampling_rate: Optional[float] = None
+ r"""Sampling rate between 0.0001 and 1 (1 = 100%)."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "api_key_hashes",
+ "config",
+ "enabled",
+ "filter_rules",
+ "name",
+ "privacy_mode",
+ "sampling_rate",
+ ]
+ nullable_fields = ["api_key_hashes", "filter_rules"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/updateobservabilitydestinationresponse.py b/src/openrouter/components/updateobservabilitydestinationresponse.py
new file mode 100644
index 0000000..95abc42
--- /dev/null
+++ b/src/openrouter/components/updateobservabilitydestinationresponse.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .observabilitydestination import (
+ ObservabilityDestination,
+ ObservabilityDestinationTypedDict,
+)
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class UpdateObservabilityDestinationResponseTypedDict(TypedDict):
+ data: ObservabilityDestinationTypedDict
+
+
+class UpdateObservabilityDestinationResponse(BaseModel):
+ data: ObservabilityDestination
diff --git a/src/openrouter/components/updateworkspacerequest.py b/src/openrouter/components/updateworkspacerequest.py
new file mode 100644
index 0000000..8271be1
--- /dev/null
+++ b/src/openrouter/components/updateworkspacerequest.py
@@ -0,0 +1,121 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import List, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class UpdateWorkspaceRequestTypedDict(TypedDict):
+ default_image_model: NotRequired[Nullable[str]]
+ r"""Default image model for this workspace"""
+ default_provider_sort: NotRequired[Nullable[str]]
+ r"""Default provider sort preference (price, throughput, latency, exacto)"""
+ default_text_model: NotRequired[Nullable[str]]
+ r"""Default text model for this workspace"""
+ description: NotRequired[Nullable[str]]
+ r"""New description for the workspace"""
+ io_logging_api_key_ids: NotRequired[Nullable[List[int]]]
+ r"""Optional array of API key IDs to filter I/O logging"""
+ io_logging_sampling_rate: NotRequired[float]
+ r"""Sampling rate for I/O logging (0.0001-1)"""
+ is_data_discount_logging_enabled: NotRequired[bool]
+ r"""Whether data discount logging is enabled"""
+ is_observability_broadcast_enabled: NotRequired[bool]
+ r"""Whether broadcast is enabled"""
+ is_observability_io_logging_enabled: NotRequired[bool]
+ r"""Whether private logging is enabled"""
+ name: NotRequired[str]
+ r"""New name for the workspace"""
+ slug: NotRequired[str]
+ r"""New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)"""
+
+
+class UpdateWorkspaceRequest(BaseModel):
+ default_image_model: OptionalNullable[str] = UNSET
+ r"""Default image model for this workspace"""
+
+ default_provider_sort: OptionalNullable[str] = UNSET
+ r"""Default provider sort preference (price, throughput, latency, exacto)"""
+
+ default_text_model: OptionalNullable[str] = UNSET
+ r"""Default text model for this workspace"""
+
+ description: OptionalNullable[str] = UNSET
+ r"""New description for the workspace"""
+
+ io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET
+ r"""Optional array of API key IDs to filter I/O logging"""
+
+ io_logging_sampling_rate: Optional[float] = None
+ r"""Sampling rate for I/O logging (0.0001-1)"""
+
+ is_data_discount_logging_enabled: Optional[bool] = None
+ r"""Whether data discount logging is enabled"""
+
+ is_observability_broadcast_enabled: Optional[bool] = None
+ r"""Whether broadcast is enabled"""
+
+ is_observability_io_logging_enabled: Optional[bool] = None
+ r"""Whether private logging is enabled"""
+
+ name: Optional[str] = None
+ r"""New name for the workspace"""
+
+ slug: Optional[str] = None
+ r"""New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "default_image_model",
+ "default_provider_sort",
+ "default_text_model",
+ "description",
+ "io_logging_api_key_ids",
+ "io_logging_sampling_rate",
+ "is_data_discount_logging_enabled",
+ "is_observability_broadcast_enabled",
+ "is_observability_io_logging_enabled",
+ "name",
+ "slug",
+ ]
+ nullable_fields = [
+ "default_image_model",
+ "default_provider_sort",
+ "default_text_model",
+ "description",
+ "io_logging_api_key_ids",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/updateworkspaceresponse.py b/src/openrouter/components/updateworkspaceresponse.py
new file mode 100644
index 0000000..35d7ad3
--- /dev/null
+++ b/src/openrouter/components/updateworkspaceresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .workspace import Workspace, WorkspaceTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class UpdateWorkspaceResponseTypedDict(TypedDict):
+ data: WorkspaceTypedDict
+
+
+class UpdateWorkspaceResponse(BaseModel):
+ data: Workspace
diff --git a/src/openrouter/components/usage.py b/src/openrouter/components/usage.py
index 3ff415b..b140a02 100644
--- a/src/openrouter/components/usage.py
+++ b/src/openrouter/components/usage.py
@@ -29,13 +29,13 @@ class OutputTokensDetails(BaseModel):
reasoning_tokens: int
-class CostDetailsTypedDict(TypedDict):
+class UsageCostDetailsTypedDict(TypedDict):
upstream_inference_input_cost: float
upstream_inference_output_cost: float
upstream_inference_cost: NotRequired[Nullable[float]]
-class CostDetails(BaseModel):
+class UsageCostDetails(BaseModel):
upstream_inference_input_cost: float
upstream_inference_output_cost: float
@@ -83,7 +83,7 @@ class UsageTypedDict(TypedDict):
total_tokens: int
cost: NotRequired[Nullable[float]]
r"""Cost of the completion"""
- cost_details: NotRequired[CostDetailsTypedDict]
+ cost_details: NotRequired[UsageCostDetailsTypedDict]
is_byok: NotRequired[bool]
r"""Whether a request was made using a Bring Your Own Key configuration"""
@@ -104,7 +104,7 @@ class Usage(BaseModel):
cost: OptionalNullable[float] = UNSET
r"""Cost of the completion"""
- cost_details: Optional[CostDetails] = None
+ cost_details: Optional[UsageCostDetails] = None
is_byok: Optional[bool] = None
r"""Whether a request was made using a Bring Your Own Key configuration"""
diff --git a/src/openrouter/components/videogenerationrequest.py b/src/openrouter/components/videogenerationrequest.py
index db54f12..76da465 100644
--- a/src/openrouter/components/videogenerationrequest.py
+++ b/src/openrouter/components/videogenerationrequest.py
@@ -1,8 +1,8 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .contentpartimage import ContentPartImage, ContentPartImageTypedDict
from .frameimage import FrameImage, FrameImageTypedDict
+from .inputreference import InputReference, InputReferenceTypedDict
from openrouter.types import BaseModel, Nullable, UnrecognizedStr
from openrouter.utils import validate_open_enum
import pydantic
@@ -18,6 +18,8 @@ AspectRatio = Union[
"1:1",
"4:3",
"3:4",
+ "3:2",
+ "2:3",
"21:9",
"9:21",
],
@@ -44,6 +46,7 @@ class OptionsTypedDict(TypedDict):
atoma: NotRequired[Dict[str, Nullable[Any]]]
avian: NotRequired[Dict[str, Nullable[Any]]]
azure: NotRequired[Dict[str, Nullable[Any]]]
+ baidu: NotRequired[Dict[str, Nullable[Any]]]
baseten: NotRequired[Dict[str, Nullable[Any]]]
black_forest_labs: NotRequired[Dict[str, Nullable[Any]]]
byteplus: NotRequired[Dict[str, Nullable[Any]]]
@@ -55,10 +58,14 @@ class OptionsTypedDict(TypedDict):
cloudflare: NotRequired[Dict[str, Nullable[Any]]]
cohere: NotRequired[Dict[str, Nullable[Any]]]
crofai: NotRequired[Dict[str, Nullable[Any]]]
+ crucible: NotRequired[Dict[str, Nullable[Any]]]
crusoe: NotRequired[Dict[str, Nullable[Any]]]
+ darkbloom: NotRequired[Dict[str, Nullable[Any]]]
+ decart: NotRequired[Dict[str, Nullable[Any]]]
deepinfra: NotRequired[Dict[str, Nullable[Any]]]
deepseek: NotRequired[Dict[str, Nullable[Any]]]
dekallm: NotRequired[Dict[str, Nullable[Any]]]
+ digitalocean: NotRequired[Dict[str, Nullable[Any]]]
enfer: NotRequired[Dict[str, Nullable[Any]]]
fake_provider: NotRequired[Dict[str, Nullable[Any]]]
featherless: NotRequired[Dict[str, Nullable[Any]]]
@@ -99,6 +106,7 @@ class OptionsTypedDict(TypedDict):
morph: NotRequired[Dict[str, Nullable[Any]]]
ncompass: NotRequired[Dict[str, Nullable[Any]]]
nebius: NotRequired[Dict[str, Nullable[Any]]]
+ nex_agi: NotRequired[Dict[str, Nullable[Any]]]
nextbit: NotRequired[Dict[str, Nullable[Any]]]
nineteen: NotRequired[Dict[str, Nullable[Any]]]
novita: NotRequired[Dict[str, Nullable[Any]]]
@@ -107,8 +115,10 @@ class OptionsTypedDict(TypedDict):
open_inference: NotRequired[Dict[str, Nullable[Any]]]
openai: NotRequired[Dict[str, Nullable[Any]]]
parasail: NotRequired[Dict[str, Nullable[Any]]]
+ perceptron: NotRequired[Dict[str, Nullable[Any]]]
perplexity: NotRequired[Dict[str, Nullable[Any]]]
phala: NotRequired[Dict[str, Nullable[Any]]]
+ poolside: NotRequired[Dict[str, Nullable[Any]]]
recraft: NotRequired[Dict[str, Nullable[Any]]]
recursal: NotRequired[Dict[str, Nullable[Any]]]
reflection: NotRequired[Dict[str, Nullable[Any]]]
@@ -131,6 +141,7 @@ class OptionsTypedDict(TypedDict):
ubicloud: NotRequired[Dict[str, Nullable[Any]]]
upstage: NotRequired[Dict[str, Nullable[Any]]]
venice: NotRequired[Dict[str, Nullable[Any]]]
+ wafer: NotRequired[Dict[str, Nullable[Any]]]
wandb: NotRequired[Dict[str, Nullable[Any]]]
xai: NotRequired[Dict[str, Nullable[Any]]]
xiaomi: NotRequired[Dict[str, Nullable[Any]]]
@@ -182,6 +193,8 @@ class Options(BaseModel):
azure: Optional[Dict[str, Nullable[Any]]] = None
+ baidu: Optional[Dict[str, Nullable[Any]]] = None
+
baseten: Optional[Dict[str, Nullable[Any]]] = None
black_forest_labs: Annotated[
@@ -206,14 +219,22 @@ class Options(BaseModel):
crofai: Optional[Dict[str, Nullable[Any]]] = None
+ crucible: Optional[Dict[str, Nullable[Any]]] = None
+
crusoe: Optional[Dict[str, Nullable[Any]]] = None
+ darkbloom: Optional[Dict[str, Nullable[Any]]] = None
+
+ decart: Optional[Dict[str, Nullable[Any]]] = None
+
deepinfra: Optional[Dict[str, Nullable[Any]]] = None
deepseek: Optional[Dict[str, Nullable[Any]]] = None
dekallm: Optional[Dict[str, Nullable[Any]]] = None
+ digitalocean: Optional[Dict[str, Nullable[Any]]] = None
+
enfer: Optional[Dict[str, Nullable[Any]]] = None
fake_provider: Annotated[
@@ -312,6 +333,10 @@ class Options(BaseModel):
nebius: Optional[Dict[str, Nullable[Any]]] = None
+ nex_agi: Annotated[
+ Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="nex-agi")
+ ] = None
+
nextbit: Optional[Dict[str, Nullable[Any]]] = None
nineteen: Optional[Dict[str, Nullable[Any]]] = None
@@ -330,10 +355,14 @@ class Options(BaseModel):
parasail: Optional[Dict[str, Nullable[Any]]] = None
+ perceptron: Optional[Dict[str, Nullable[Any]]] = None
+
perplexity: Optional[Dict[str, Nullable[Any]]] = None
phala: Optional[Dict[str, Nullable[Any]]] = None
+ poolside: Optional[Dict[str, Nullable[Any]]] = None
+
recraft: Optional[Dict[str, Nullable[Any]]] = None
recursal: Optional[Dict[str, Nullable[Any]]] = None
@@ -384,6 +413,8 @@ class Options(BaseModel):
venice: Optional[Dict[str, Nullable[Any]]] = None
+ wafer: Optional[Dict[str, Nullable[Any]]] = None
+
wandb: Optional[Dict[str, Nullable[Any]]] = None
xai: Optional[Dict[str, Nullable[Any]]] = None
@@ -395,18 +426,16 @@ class Options(BaseModel):
] = None
-class ProviderTypedDict(TypedDict):
+class VideoGenerationRequestProviderTypedDict(TypedDict):
r"""Provider-specific passthrough configuration"""
options: NotRequired[OptionsTypedDict]
- r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
-class Provider(BaseModel):
+class VideoGenerationRequestProvider(BaseModel):
r"""Provider-specific passthrough configuration"""
options: Optional[Options] = None
- r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
Resolution = Union[
@@ -428,15 +457,17 @@ class VideoGenerationRequestTypedDict(TypedDict):
prompt: str
aspect_ratio: NotRequired[AspectRatio]
r"""Aspect ratio of the generated video"""
+ callback_url: NotRequired[str]
+ r"""URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS."""
duration: NotRequired[int]
r"""Duration of the generated video in seconds"""
frame_images: NotRequired[List[FrameImageTypedDict]]
r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
generate_audio: NotRequired[bool]
r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
- input_references: NotRequired[List[ContentPartImageTypedDict]]
- r"""Reference images to guide video generation"""
- provider: NotRequired[ProviderTypedDict]
+ input_references: NotRequired[List[InputReferenceTypedDict]]
+ r"""Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest."""
+ provider: NotRequired[VideoGenerationRequestProviderTypedDict]
r"""Provider-specific passthrough configuration"""
resolution: NotRequired[Resolution]
r"""Resolution of the generated video"""
@@ -456,6 +487,9 @@ class VideoGenerationRequest(BaseModel):
] = None
r"""Aspect ratio of the generated video"""
+ callback_url: Optional[str] = None
+ r"""URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS."""
+
duration: Optional[int] = None
r"""Duration of the generated video in seconds"""
@@ -465,10 +499,10 @@ class VideoGenerationRequest(BaseModel):
generate_audio: Optional[bool] = None
r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
- input_references: Optional[List[ContentPartImage]] = None
- r"""Reference images to guide video generation"""
+ input_references: Optional[List[InputReference]] = None
+ r"""Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest."""
- provider: Optional[Provider] = None
+ provider: Optional[VideoGenerationRequestProvider] = None
r"""Provider-specific passthrough configuration"""
resolution: Annotated[
diff --git a/src/openrouter/components/videomodel.py b/src/openrouter/components/videomodel.py
index f313821..04170e1 100644
--- a/src/openrouter/components/videomodel.py
+++ b/src/openrouter/components/videomodel.py
@@ -23,6 +23,8 @@ SupportedAspectRatio = Union[
"1:1",
"4:3",
"3:4",
+ "3:2",
+ "2:3",
"21:9",
"9:21",
],
@@ -56,30 +58,38 @@ SupportedSize = Union[
Literal[
"480x480",
"480x640",
+ "480x720",
"480x854",
"480x1120",
"640x480",
+ "720x480",
"720x720",
"720x960",
+ "720x1080",
"720x1280",
"720x1680",
"854x480",
"960x720",
+ "1080x720",
"1080x1080",
"1080x1440",
+ "1080x1620",
"1080x1920",
"1080x2520",
"1120x480",
"1280x720",
"1440x1080",
+ "1620x1080",
"1680x720",
"1920x1080",
"2160x2160",
"2160x2880",
+ "2160x3240",
"2160x3840",
"2160x5040",
"2520x1080",
"2880x2160",
+ "3240x2160",
"3840x2160",
"5040x2160",
],
diff --git a/src/openrouter/components/webfetchengineenum.py b/src/openrouter/components/webfetchengineenum.py
new file mode 100644
index 0000000..e4f9ca1
--- /dev/null
+++ b/src/openrouter/components/webfetchengineenum.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+WebFetchEngineEnum = Union[
+ Literal[
+ "auto",
+ "native",
+ "openrouter",
+ "exa",
+ "parallel",
+ "firecrawl",
+ ],
+ UnrecognizedStr,
+]
+r"""Which fetch engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in fetch. \"exa\" uses Exa Contents API. \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK). \"parallel\" uses the Parallel extract API."""
diff --git a/src/openrouter/components/webfetchplugin.py b/src/openrouter/components/webfetchplugin.py
new file mode 100644
index 0000000..51bb7ff
--- /dev/null
+++ b/src/openrouter/components/webfetchplugin.py
@@ -0,0 +1,37 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import List, Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+WebFetchPluginID = Literal["web-fetch",]
+
+
+class WebFetchPluginTypedDict(TypedDict):
+ id: WebFetchPluginID
+ allowed_domains: NotRequired[List[str]]
+ r"""Only fetch from these domains."""
+ blocked_domains: NotRequired[List[str]]
+ r"""Never fetch from these domains."""
+ max_content_tokens: NotRequired[int]
+ r"""Maximum content length in approximate tokens. Content exceeding this limit is truncated."""
+ max_uses: NotRequired[int]
+ r"""Maximum number of web fetches per request. Once exceeded, the tool returns an error."""
+
+
+class WebFetchPlugin(BaseModel):
+ id: WebFetchPluginID
+
+ allowed_domains: Optional[List[str]] = None
+ r"""Only fetch from these domains."""
+
+ blocked_domains: Optional[List[str]] = None
+ r"""Never fetch from these domains."""
+
+ max_content_tokens: Optional[int] = None
+ r"""Maximum content length in approximate tokens. Content exceeding this limit is truncated."""
+
+ max_uses: Optional[int] = None
+ r"""Maximum number of web fetches per request. Once exceeded, the tool returns an error."""
diff --git a/src/openrouter/components/webfetchservertool.py b/src/openrouter/components/webfetchservertool.py
new file mode 100644
index 0000000..cbd34b3
--- /dev/null
+++ b/src/openrouter/components/webfetchservertool.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .webfetchservertoolconfig import (
+ WebFetchServerToolConfig,
+ WebFetchServerToolConfigTypedDict,
+)
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+WebFetchServerToolType = Literal["openrouter:web_fetch",]
+
+
+class WebFetchServerToolTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)"""
+
+ type: WebFetchServerToolType
+ parameters: NotRequired[WebFetchServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:web_fetch server tool"""
+
+
+class WebFetchServerTool(BaseModel):
+ r"""OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)"""
+
+ type: WebFetchServerToolType
+
+ parameters: Optional[WebFetchServerToolConfig] = None
+ r"""Configuration for the openrouter:web_fetch server tool"""
diff --git a/src/openrouter/components/webfetchservertoolconfig.py b/src/openrouter/components/webfetchservertoolconfig.py
new file mode 100644
index 0000000..9b8cc5c
--- /dev/null
+++ b/src/openrouter/components/webfetchservertoolconfig.py
@@ -0,0 +1,45 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .webfetchengineenum import WebFetchEngineEnum
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class WebFetchServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:web_fetch server tool"""
+
+ allowed_domains: NotRequired[List[str]]
+ r"""Only fetch from these domains."""
+ blocked_domains: NotRequired[List[str]]
+ r"""Never fetch from these domains."""
+ engine: NotRequired[WebFetchEngineEnum]
+ r"""Which fetch engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in fetch. \"exa\" uses Exa Contents API. \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK). \"parallel\" uses the Parallel extract API."""
+ max_content_tokens: NotRequired[int]
+ r"""Maximum content length in approximate tokens. Content exceeding this limit is truncated."""
+ max_uses: NotRequired[int]
+ r"""Maximum number of web fetches per request. Once exceeded, the tool returns an error."""
+
+
+class WebFetchServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:web_fetch server tool"""
+
+ allowed_domains: Optional[List[str]] = None
+ r"""Only fetch from these domains."""
+
+ blocked_domains: Optional[List[str]] = None
+ r"""Never fetch from these domains."""
+
+ engine: Annotated[
+ Optional[WebFetchEngineEnum], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which fetch engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in fetch. \"exa\" uses Exa Contents API. \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK). \"parallel\" uses the Parallel extract API."""
+
+ max_content_tokens: Optional[int] = None
+ r"""Maximum content length in approximate tokens. Content exceeding this limit is truncated."""
+
+ max_uses: Optional[int] = None
+ r"""Maximum number of web fetches per request. Once exceeded, the tool returns an error."""
diff --git a/src/openrouter/components/websearchconfig.py b/src/openrouter/components/websearchconfig.py
index dfe9115..6db24ab 100644
--- a/src/openrouter/components/websearchconfig.py
+++ b/src/openrouter/components/websearchconfig.py
@@ -16,24 +16,26 @@ from typing_extensions import Annotated, NotRequired, TypedDict
class WebSearchConfigTypedDict(TypedDict):
allowed_domains: NotRequired[List[str]]
- r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity."""
+ r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains."""
engine: NotRequired[WebSearchEngineEnum]
r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API."""
excluded_domains: NotRequired[List[str]]
- r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity."""
+ r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains."""
+ max_characters: NotRequired[int]
+ r"""Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel)."""
max_results: NotRequired[int]
r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search."""
max_total_results: NotRequired[int]
- r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops."""
+ r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified."""
search_context_size: NotRequired[SearchQualityLevel]
- r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search."""
+ r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
user_location: NotRequired[WebSearchUserLocationServerToolTypedDict]
r"""Approximate user location for location-biased results."""
class WebSearchConfig(BaseModel):
allowed_domains: Optional[List[str]] = None
- r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity."""
+ r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains."""
engine: Annotated[
Optional[WebSearchEngineEnum], PlainValidator(validate_open_enum(False))
@@ -41,18 +43,21 @@ class WebSearchConfig(BaseModel):
r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API."""
excluded_domains: Optional[List[str]] = None
- r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity."""
+ r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains."""
+
+ max_characters: Optional[int] = None
+ r"""Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel)."""
max_results: Optional[int] = None
r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search."""
max_total_results: Optional[int] = None
- r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops."""
+ r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified."""
search_context_size: Annotated[
Optional[SearchQualityLevel], PlainValidator(validate_open_enum(False))
] = None
- r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search."""
+ r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
user_location: Optional[WebSearchUserLocationServerTool] = None
r"""Approximate user location for location-biased results."""
diff --git a/src/openrouter/components/websearchengineenum.py b/src/openrouter/components/websearchengineenum.py
index e98eed2..90a22b9 100644
--- a/src/openrouter/components/websearchengineenum.py
+++ b/src/openrouter/components/websearchengineenum.py
@@ -10,8 +10,8 @@ WebSearchEngineEnum = Union[
"auto",
"native",
"exa",
- "firecrawl",
"parallel",
+ "firecrawl",
],
UnrecognizedStr,
]
diff --git a/src/openrouter/components/websearchplugin.py b/src/openrouter/components/websearchplugin.py
index 93c8f70..3c8e46d 100644
--- a/src/openrouter/components/websearchplugin.py
+++ b/src/openrouter/components/websearchplugin.py
@@ -2,8 +2,15 @@
from __future__ import annotations
from .websearchengine import WebSearchEngine
-from openrouter.types import BaseModel
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -12,6 +19,63 @@ from typing_extensions import Annotated, NotRequired, TypedDict
WebSearchPluginID = Literal["web",]
+WebSearchPluginType = Literal["approximate",]
+
+
+class UserLocationTypedDict(TypedDict):
+ r"""Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic)."""
+
+ type: WebSearchPluginType
+ city: NotRequired[Nullable[str]]
+ country: NotRequired[Nullable[str]]
+ region: NotRequired[Nullable[str]]
+ timezone: NotRequired[Nullable[str]]
+
+
+class UserLocation(BaseModel):
+ r"""Approximate user location for location-biased search results. Passed through to native providers that support it (e.g. Anthropic)."""
+
+ type: WebSearchPluginType
+
+ city: OptionalNullable[str] = UNSET
+
+ country: OptionalNullable[str] = UNSET
+
+ region: OptionalNullable[str] = UNSET
+
+ timezone: OptionalNullable[str] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["city", "country", "region", "timezone"]
+ nullable_fields = ["city", "country", "region", "timezone"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
class WebSearchPluginTypedDict(TypedDict):
id: WebSearchPluginID
enabled: NotRequired[bool]
@@ -23,7 +87,10 @@ class WebSearchPluginTypedDict(TypedDict):
include_domains: NotRequired[List[str]]
r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
max_results: NotRequired[int]
+ max_uses: NotRequired[int]
+ r"""Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic)."""
search_prompt: NotRequired[str]
+ user_location: NotRequired[Nullable[UserLocationTypedDict]]
class WebSearchPlugin(BaseModel):
@@ -45,4 +112,48 @@ class WebSearchPlugin(BaseModel):
max_results: Optional[int] = None
+ max_uses: Optional[int] = None
+ r"""Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic)."""
+
search_prompt: Optional[str] = None
+
+ user_location: OptionalNullable[UserLocation] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "enabled",
+ "engine",
+ "exclude_domains",
+ "include_domains",
+ "max_results",
+ "max_uses",
+ "search_prompt",
+ "user_location",
+ ]
+ nullable_fields = ["user_location"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/websearchservertool_openrouter.py b/src/openrouter/components/websearchservertool_openrouter.py
index 29b8262..c5717ed 100644
--- a/src/openrouter/components/websearchservertool_openrouter.py
+++ b/src/openrouter/components/websearchservertool_openrouter.py
@@ -1,26 +1,15 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .websearchservertoolconfig import (
+ WebSearchServerToolConfig,
+ WebSearchServerToolConfigTypedDict,
+)
from openrouter.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict
-class ParametersTypedDict(TypedDict):
- max_results: NotRequired[int]
- r"""Maximum number of search results to return per search call. Defaults to 5."""
- max_total_results: NotRequired[int]
- r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results."""
-
-
-class Parameters(BaseModel):
- max_results: Optional[int] = None
- r"""Maximum number of search results to return per search call. Defaults to 5."""
-
- max_total_results: Optional[int] = None
- r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results."""
-
-
WebSearchServerToolOpenRouterType = Literal["openrouter:web_search",]
@@ -28,7 +17,8 @@ class WebSearchServerToolOpenRouterTypedDict(TypedDict):
r"""OpenRouter built-in server tool: searches the web for current information"""
type: WebSearchServerToolOpenRouterType
- parameters: NotRequired[ParametersTypedDict]
+ parameters: NotRequired[WebSearchServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:web_search server tool"""
class WebSearchServerToolOpenRouter(BaseModel):
@@ -36,4 +26,5 @@ class WebSearchServerToolOpenRouter(BaseModel):
type: WebSearchServerToolOpenRouterType
- parameters: Optional[Parameters] = None
+ parameters: Optional[WebSearchServerToolConfig] = None
+ r"""Configuration for the openrouter:web_search server tool"""
diff --git a/src/openrouter/components/websearchservertoolconfig.py b/src/openrouter/components/websearchservertoolconfig.py
new file mode 100644
index 0000000..e5aeae2
--- /dev/null
+++ b/src/openrouter/components/websearchservertoolconfig.py
@@ -0,0 +1,67 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .searchqualitylevel import SearchQualityLevel
+from .websearchengineenum import WebSearchEngineEnum
+from .websearchuserlocationservertool import (
+ WebSearchUserLocationServerTool,
+ WebSearchUserLocationServerToolTypedDict,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class WebSearchServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:web_search server tool"""
+
+ allowed_domains: NotRequired[List[str]]
+ r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains."""
+ engine: NotRequired[WebSearchEngineEnum]
+ r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API."""
+ excluded_domains: NotRequired[List[str]]
+ r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains."""
+ max_characters: NotRequired[int]
+ r"""Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel)."""
+ max_results: NotRequired[int]
+ r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search."""
+ max_total_results: NotRequired[int]
+ r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified."""
+ search_context_size: NotRequired[SearchQualityLevel]
+ r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
+ user_location: NotRequired[WebSearchUserLocationServerToolTypedDict]
+ r"""Approximate user location for location-biased results."""
+
+
+class WebSearchServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:web_search server tool"""
+
+ allowed_domains: Optional[List[str]] = None
+ r"""Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains."""
+
+ engine: Annotated[
+ Optional[WebSearchEngineEnum], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API."""
+
+ excluded_domains: Optional[List[str]] = None
+ r"""Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains."""
+
+ max_characters: Optional[int] = None
+ r"""Exact maximum number of characters of content per search result. Applies to the Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence for both engines. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel)."""
+
+ max_results: Optional[int] = None
+ r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search."""
+
+ max_total_results: Optional[int] = None
+ r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified."""
+
+ search_context_size: Annotated[
+ Optional[SearchQualityLevel], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. Overridden by `max_characters` when both are set."""
+
+ user_location: Optional[WebSearchUserLocationServerTool] = None
+ r"""Approximate user location for location-biased results."""
diff --git a/src/openrouter/components/websearchuserlocationservertool.py b/src/openrouter/components/websearchuserlocationservertool.py
index a716b87..bf4bb70 100644
--- a/src/openrouter/components/websearchuserlocationservertool.py
+++ b/src/openrouter/components/websearchuserlocationservertool.py
@@ -1,7 +1,14 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict
@@ -12,22 +19,52 @@ WebSearchUserLocationServerToolType = Literal["approximate",]
class WebSearchUserLocationServerToolTypedDict(TypedDict):
r"""Approximate user location for location-biased results."""
- city: NotRequired[str]
- country: NotRequired[str]
- region: NotRequired[str]
- timezone: NotRequired[str]
+ city: NotRequired[Nullable[str]]
+ country: NotRequired[Nullable[str]]
+ region: NotRequired[Nullable[str]]
+ timezone: NotRequired[Nullable[str]]
type: NotRequired[WebSearchUserLocationServerToolType]
class WebSearchUserLocationServerTool(BaseModel):
r"""Approximate user location for location-biased results."""
- city: Optional[str] = None
+ city: OptionalNullable[str] = UNSET
- country: Optional[str] = None
+ country: OptionalNullable[str] = UNSET
- region: Optional[str] = None
+ region: OptionalNullable[str] = UNSET
- timezone: Optional[str] = None
+ timezone: OptionalNullable[str] = UNSET
type: Optional[WebSearchUserLocationServerToolType] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["city", "country", "region", "timezone", "type"]
+ nullable_fields = ["city", "country", "region", "timezone"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/workspace.py b/src/openrouter/components/workspace.py
new file mode 100644
index 0000000..583db0c
--- /dev/null
+++ b/src/openrouter/components/workspace.py
@@ -0,0 +1,125 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import List
+from typing_extensions import TypedDict
+
+
+class WorkspaceTypedDict(TypedDict):
+ created_at: str
+ r"""ISO 8601 timestamp of when the workspace was created"""
+ created_by: Nullable[str]
+ r"""User ID of the workspace creator"""
+ default_image_model: Nullable[str]
+ r"""Default image model for this workspace"""
+ default_provider_sort: Nullable[str]
+ r"""Default provider sort preference (price, throughput, latency, exacto)"""
+ default_text_model: Nullable[str]
+ r"""Default text model for this workspace"""
+ description: Nullable[str]
+ r"""Description of the workspace"""
+ id: str
+ r"""Unique identifier for the workspace"""
+ io_logging_api_key_ids: Nullable[List[int]]
+ r"""Optional array of API key IDs to filter I/O logging. Null means all keys are logged."""
+ io_logging_sampling_rate: float
+ r"""Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged."""
+ is_data_discount_logging_enabled: bool
+ r"""Whether data discount logging is enabled for this workspace"""
+ is_observability_broadcast_enabled: bool
+ r"""Whether broadcast is enabled for this workspace"""
+ is_observability_io_logging_enabled: bool
+ r"""Whether private logging is enabled for this workspace"""
+ name: str
+ r"""Name of the workspace"""
+ slug: str
+ r"""URL-friendly slug for the workspace"""
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the workspace was last updated"""
+
+
+class Workspace(BaseModel):
+ created_at: str
+ r"""ISO 8601 timestamp of when the workspace was created"""
+
+ created_by: Nullable[str]
+ r"""User ID of the workspace creator"""
+
+ default_image_model: Nullable[str]
+ r"""Default image model for this workspace"""
+
+ default_provider_sort: Nullable[str]
+ r"""Default provider sort preference (price, throughput, latency, exacto)"""
+
+ default_text_model: Nullable[str]
+ r"""Default text model for this workspace"""
+
+ description: Nullable[str]
+ r"""Description of the workspace"""
+
+ id: str
+ r"""Unique identifier for the workspace"""
+
+ io_logging_api_key_ids: Nullable[List[int]]
+ r"""Optional array of API key IDs to filter I/O logging. Null means all keys are logged."""
+
+ io_logging_sampling_rate: float
+ r"""Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged."""
+
+ is_data_discount_logging_enabled: bool
+ r"""Whether data discount logging is enabled for this workspace"""
+
+ is_observability_broadcast_enabled: bool
+ r"""Whether broadcast is enabled for this workspace"""
+
+ is_observability_io_logging_enabled: bool
+ r"""Whether private logging is enabled for this workspace"""
+
+ name: str
+ r"""Name of the workspace"""
+
+ slug: str
+ r"""URL-friendly slug for the workspace"""
+
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the workspace was last updated"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = [
+ "created_by",
+ "default_image_model",
+ "default_provider_sort",
+ "default_text_model",
+ "description",
+ "io_logging_api_key_ids",
+ "updated_at",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/workspacemember.py b/src/openrouter/components/workspacemember.py
new file mode 100644
index 0000000..9ece878
--- /dev/null
+++ b/src/openrouter/components/workspacemember.py
@@ -0,0 +1,48 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Union
+from typing_extensions import Annotated, TypedDict
+
+
+WorkspaceMemberRole = Union[
+ Literal[
+ "admin",
+ "member",
+ ],
+ UnrecognizedStr,
+]
+r"""Role of the member in the workspace"""
+
+
+class WorkspaceMemberTypedDict(TypedDict):
+ created_at: str
+ r"""ISO 8601 timestamp of when the membership was created"""
+ id: str
+ r"""Unique identifier for the workspace membership"""
+ role: WorkspaceMemberRole
+ r"""Role of the member in the workspace"""
+ user_id: str
+ r"""Clerk user ID of the member"""
+ workspace_id: str
+ r"""ID of the workspace"""
+
+
+class WorkspaceMember(BaseModel):
+ created_at: str
+ r"""ISO 8601 timestamp of when the membership was created"""
+
+ id: str
+ r"""Unique identifier for the workspace membership"""
+
+ role: Annotated[WorkspaceMemberRole, PlainValidator(validate_open_enum(False))]
+ r"""Role of the member in the workspace"""
+
+ user_id: str
+ r"""Clerk user ID of the member"""
+
+ workspace_id: str
+ r"""ID of the workspace"""
diff --git a/src/openrouter/datasets.py b/src/openrouter/datasets.py
new file mode 100644
index 0000000..c483912
--- /dev/null
+++ b/src/openrouter/datasets.py
@@ -0,0 +1,731 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from jsonpath import JSONPath
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union
+
+
+class Datasets(BaseSDK):
+ r"""Datasets endpoints"""
+
+ def get_app_rankings(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ category: Optional[operations.GetAppRankingsCategory] = None,
+ subcategory: Optional[operations.Subcategory] = None,
+ sort: Optional[operations.GetAppRankingsSort] = "popular",
+ start_date: Optional[str] = None,
+ end_date: Optional[str] = None,
+ limit: Optional[int] = 50,
+ offset: Optional[int] = 0,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.GetAppRankingsResponse]:
+ r"""Top apps by token usage
+
+ Returns the top public apps on OpenRouter ranked by token usage inside the requested
+ date window, matching the public apps marketplace on openrouter.ai/apps. Token totals
+ are `prompt_tokens + completion_tokens`; hidden and private apps are excluded and
+ traffic from related app aliases is merged into the canonical visible app.
+
+ `sort=popular` (default) ranks by total token volume inside the window.
+ `sort=trending` ranks by absolute excess token growth: window volume minus the average
+ volume of the three equal-length periods immediately preceding the window. Apps with
+ no excess growth are omitted, so `trending` may return fewer than `limit` rows.
+
+ Filter with `category` (marketplace category group, e.g. `coding`) or `subcategory`
+ (e.g. `cli-agent`). Ranks are re-numbered 1..N after filtering. Page with `offset` —
+ `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+
+ Authenticate with any valid OpenRouter API key (same key used for inference).
+ Rate-limited to 30 requests/minute per key and 500 requests/day per account.
+
+ When republishing or quoting this dataset, OpenRouter must be cited as:
+ \"Source: OpenRouter (openrouter.ai/apps), as of {as_of}.\"
+
+ Token counts come from each upstream provider's own tokenizer, so a token attributed
+ to one app is not directly comparable to a token attributed to another app whose
+ traffic flows through a different provider.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param category: Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
+ :param subcategory: Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
+ :param sort: `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
+ :param start_date: Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ :param end_date: End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ :param limit: Maximum number of apps to return (1-100). Defaults to 50.
+ :param offset: Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetAppRankingsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ category=category,
+ subcategory=subcategory,
+ sort=sort,
+ start_date=start_date,
+ end_date=end_date,
+ limit=limit,
+ offset=offset,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/datasets/app-rankings",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetAppRankingsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getAppRankings",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "429", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Optional[operations.GetAppRankingsResponse]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return None
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return None
+ limit = request.limit if not request.limit is None else 50
+ if len(results[0]) < limit:
+ return None
+ next_offset = offset + len(results[0])
+
+ return self.get_app_rankings(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ category=category,
+ subcategory=subcategory,
+ sort=sort,
+ start_date=start_date,
+ end_date=end_date,
+ limit=limit,
+ offset=next_offset,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.GetAppRankingsResponse(
+ result=unmarshal_json_response(
+ components.AppRankingsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_app_rankings_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ category: Optional[operations.GetAppRankingsCategory] = None,
+ subcategory: Optional[operations.Subcategory] = None,
+ sort: Optional[operations.GetAppRankingsSort] = "popular",
+ start_date: Optional[str] = None,
+ end_date: Optional[str] = None,
+ limit: Optional[int] = 50,
+ offset: Optional[int] = 0,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.GetAppRankingsResponse]:
+ r"""Top apps by token usage
+
+ Returns the top public apps on OpenRouter ranked by token usage inside the requested
+ date window, matching the public apps marketplace on openrouter.ai/apps. Token totals
+ are `prompt_tokens + completion_tokens`; hidden and private apps are excluded and
+ traffic from related app aliases is merged into the canonical visible app.
+
+ `sort=popular` (default) ranks by total token volume inside the window.
+ `sort=trending` ranks by absolute excess token growth: window volume minus the average
+ volume of the three equal-length periods immediately preceding the window. Apps with
+ no excess growth are omitted, so `trending` may return fewer than `limit` rows.
+
+ Filter with `category` (marketplace category group, e.g. `coding`) or `subcategory`
+ (e.g. `cli-agent`). Ranks are re-numbered 1..N after filtering. Page with `offset` —
+ `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+
+ Authenticate with any valid OpenRouter API key (same key used for inference).
+ Rate-limited to 30 requests/minute per key and 500 requests/day per account.
+
+ When republishing or quoting this dataset, OpenRouter must be cited as:
+ \"Source: OpenRouter (openrouter.ai/apps), as of {as_of}.\"
+
+ Token counts come from each upstream provider's own tokenizer, so a token attributed
+ to one app is not directly comparable to a token attributed to another app whose
+ traffic flows through a different provider.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param category: Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
+ :param subcategory: Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
+ :param sort: `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
+ :param start_date: Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ :param end_date: End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ :param limit: Maximum number of apps to return (1-100). Defaults to 50.
+ :param offset: Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetAppRankingsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ category=category,
+ subcategory=subcategory,
+ sort=sort,
+ start_date=start_date,
+ end_date=end_date,
+ limit=limit,
+ offset=offset,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/datasets/app-rankings",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetAppRankingsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getAppRankings",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "429", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Awaitable[Optional[operations.GetAppRankingsResponse]]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ async def empty_result():
+ return None
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return empty_result()
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return empty_result()
+ limit = request.limit if not request.limit is None else 50
+ if len(results[0]) < limit:
+ return empty_result()
+ next_offset = offset + len(results[0])
+
+ return self.get_app_rankings_async(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ category=category,
+ subcategory=subcategory,
+ sort=sort,
+ start_date=start_date,
+ end_date=end_date,
+ limit=limit,
+ offset=next_offset,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.GetAppRankingsResponse(
+ result=unmarshal_json_response(
+ components.AppRankingsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get_rankings_daily(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ start_date: Optional[str] = None,
+ end_date: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.RankingsDailyResponse:
+ r"""Daily token totals for top 50 models
+
+ Returns the top 50 public models per day by total token usage on OpenRouter, plus a
+ single aggregated `other` row per day that sums every model outside that top 50.
+ Token totals are `prompt_tokens + completion_tokens`, matching the public rankings
+ chart on openrouter.ai/rankings.
+
+ Each row is a distinct `(date, model_permaslug)` pair. The `other` row uses the
+ reserved permaslug `other` and is always returned last within its date, so callers
+ can compute `top-50 traffic / total daily traffic` without a second request.
+
+ Authenticate with any valid OpenRouter API key (same key used for inference).
+ Rate-limited to 30 requests/minute per key and 500 requests/day per account.
+
+ When republishing or quoting this dataset, OpenRouter must be cited as:
+ \"Source: OpenRouter (openrouter.ai/rankings), as of {as_of}.\"
+
+ Token counts come from each upstream provider's own tokenizer (Anthropic counts
+ are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
+ a token in one row is not directly comparable to a token in another row from a
+ different provider.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param start_date: Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ :param end_date: End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetRankingsDailyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ start_date=start_date,
+ end_date=end_date,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/datasets/rankings-daily",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetRankingsDailyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getRankingsDaily",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "429", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.RankingsDailyResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_rankings_daily_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ start_date: Optional[str] = None,
+ end_date: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.RankingsDailyResponse:
+ r"""Daily token totals for top 50 models
+
+ Returns the top 50 public models per day by total token usage on OpenRouter, plus a
+ single aggregated `other` row per day that sums every model outside that top 50.
+ Token totals are `prompt_tokens + completion_tokens`, matching the public rankings
+ chart on openrouter.ai/rankings.
+
+ Each row is a distinct `(date, model_permaslug)` pair. The `other` row uses the
+ reserved permaslug `other` and is always returned last within its date, so callers
+ can compute `top-50 traffic / total daily traffic` without a second request.
+
+ Authenticate with any valid OpenRouter API key (same key used for inference).
+ Rate-limited to 30 requests/minute per key and 500 requests/day per account.
+
+ When republishing or quoting this dataset, OpenRouter must be cited as:
+ \"Source: OpenRouter (openrouter.ai/rankings), as of {as_of}.\"
+
+ Token counts come from each upstream provider's own tokenizer (Anthropic counts
+ are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so
+ a token in one row is not directly comparable to a token in another row from a
+ different provider.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param start_date: Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
+ :param end_date: End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetRankingsDailyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ start_date=start_date,
+ end_date=end_date,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/datasets/rankings-daily",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetRankingsDailyGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getRankingsDaily",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "429", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.RankingsDailyResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/errors/badgatewayresponse_error.py b/src/openrouter/errors/badgatewayresponse_error.py
index b2138fd..28ce1d4 100644
--- a/src/openrouter/errors/badgatewayresponse_error.py
+++ b/src/openrouter/errors/badgatewayresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
badgatewayresponseerrordata as components_badgatewayresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class BadGatewayResponseErrorData(BaseModel):
error: components_badgatewayresponseerrordata.BadGatewayResponseErrorData
r"""Error data for BadGatewayResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/badrequestresponse_error.py b/src/openrouter/errors/badrequestresponse_error.py
index eb34f26..514a272 100644
--- a/src/openrouter/errors/badrequestresponse_error.py
+++ b/src/openrouter/errors/badrequestresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
badrequestresponseerrordata as components_badrequestresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class BadRequestResponseErrorData(BaseModel):
error: components_badrequestresponseerrordata.BadRequestResponseErrorData
r"""Error data for BadRequestResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/conflictresponse_error.py b/src/openrouter/errors/conflictresponse_error.py
index 4c23784..434f65c 100644
--- a/src/openrouter/errors/conflictresponse_error.py
+++ b/src/openrouter/errors/conflictresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
conflictresponseerrordata as components_conflictresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class ConflictResponseErrorData(BaseModel):
error: components_conflictresponseerrordata.ConflictResponseErrorData
r"""Error data for ConflictResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/edgenetworktimeoutresponse_error.py b/src/openrouter/errors/edgenetworktimeoutresponse_error.py
index c2881a5..4ba05c4 100644
--- a/src/openrouter/errors/edgenetworktimeoutresponse_error.py
+++ b/src/openrouter/errors/edgenetworktimeoutresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
edgenetworktimeoutresponseerrordata as components_edgenetworktimeoutresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class EdgeNetworkTimeoutResponseErrorData(BaseModel):
error: components_edgenetworktimeoutresponseerrordata.EdgeNetworkTimeoutResponseErrorData
r"""Error data for EdgeNetworkTimeoutResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/forbiddenresponse_error.py b/src/openrouter/errors/forbiddenresponse_error.py
index f9fd3e5..f6bd181 100644
--- a/src/openrouter/errors/forbiddenresponse_error.py
+++ b/src/openrouter/errors/forbiddenresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
forbiddenresponseerrordata as components_forbiddenresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class ForbiddenResponseErrorData(BaseModel):
error: components_forbiddenresponseerrordata.ForbiddenResponseErrorData
r"""Error data for ForbiddenResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/internalserverresponse_error.py b/src/openrouter/errors/internalserverresponse_error.py
index 2d8be82..207c80c 100644
--- a/src/openrouter/errors/internalserverresponse_error.py
+++ b/src/openrouter/errors/internalserverresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
internalserverresponseerrordata as components_internalserverresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class InternalServerResponseErrorData(BaseModel):
error: components_internalserverresponseerrordata.InternalServerResponseErrorData
r"""Error data for InternalServerResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/notfoundresponse_error.py b/src/openrouter/errors/notfoundresponse_error.py
index 99c3f9f..a79ff3c 100644
--- a/src/openrouter/errors/notfoundresponse_error.py
+++ b/src/openrouter/errors/notfoundresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
notfoundresponseerrordata as components_notfoundresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class NotFoundResponseErrorData(BaseModel):
error: components_notfoundresponseerrordata.NotFoundResponseErrorData
r"""Error data for NotFoundResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/payloadtoolargeresponse_error.py b/src/openrouter/errors/payloadtoolargeresponse_error.py
index 8b9daa2..2f11814 100644
--- a/src/openrouter/errors/payloadtoolargeresponse_error.py
+++ b/src/openrouter/errors/payloadtoolargeresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
payloadtoolargeresponseerrordata as components_payloadtoolargeresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class PayloadTooLargeResponseErrorData(BaseModel):
error: components_payloadtoolargeresponseerrordata.PayloadTooLargeResponseErrorData
r"""Error data for PayloadTooLargeResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/paymentrequiredresponse_error.py b/src/openrouter/errors/paymentrequiredresponse_error.py
index fe3b3c2..1bd7e6b 100644
--- a/src/openrouter/errors/paymentrequiredresponse_error.py
+++ b/src/openrouter/errors/paymentrequiredresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
paymentrequiredresponseerrordata as components_paymentrequiredresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class PaymentRequiredResponseErrorData(BaseModel):
error: components_paymentrequiredresponseerrordata.PaymentRequiredResponseErrorData
r"""Error data for PaymentRequiredResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/provideroverloadedresponse_error.py b/src/openrouter/errors/provideroverloadedresponse_error.py
index bdb7061..4594e43 100644
--- a/src/openrouter/errors/provideroverloadedresponse_error.py
+++ b/src/openrouter/errors/provideroverloadedresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
provideroverloadedresponseerrordata as components_provideroverloadedresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class ProviderOverloadedResponseErrorData(BaseModel):
error: components_provideroverloadedresponseerrordata.ProviderOverloadedResponseErrorData
r"""Error data for ProviderOverloadedResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/requesttimeoutresponse_error.py b/src/openrouter/errors/requesttimeoutresponse_error.py
index 4937892..eb403d9 100644
--- a/src/openrouter/errors/requesttimeoutresponse_error.py
+++ b/src/openrouter/errors/requesttimeoutresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
requesttimeoutresponseerrordata as components_requesttimeoutresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class RequestTimeoutResponseErrorData(BaseModel):
error: components_requesttimeoutresponseerrordata.RequestTimeoutResponseErrorData
r"""Error data for RequestTimeoutResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/serviceunavailableresponse_error.py b/src/openrouter/errors/serviceunavailableresponse_error.py
index b94cfc2..0c9c74b 100644
--- a/src/openrouter/errors/serviceunavailableresponse_error.py
+++ b/src/openrouter/errors/serviceunavailableresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
serviceunavailableresponseerrordata as components_serviceunavailableresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class ServiceUnavailableResponseErrorData(BaseModel):
error: components_serviceunavailableresponseerrordata.ServiceUnavailableResponseErrorData
r"""Error data for ServiceUnavailableResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/toomanyrequestsresponse_error.py b/src/openrouter/errors/toomanyrequestsresponse_error.py
index bdf7914..fbbad16 100644
--- a/src/openrouter/errors/toomanyrequestsresponse_error.py
+++ b/src/openrouter/errors/toomanyrequestsresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
toomanyrequestsresponseerrordata as components_toomanyrequestsresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class TooManyRequestsResponseErrorData(BaseModel):
error: components_toomanyrequestsresponseerrordata.TooManyRequestsResponseErrorData
r"""Error data for TooManyRequestsResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/unauthorizedresponse_error.py b/src/openrouter/errors/unauthorizedresponse_error.py
index 7f9c5a6..f70ea1c 100644
--- a/src/openrouter/errors/unauthorizedresponse_error.py
+++ b/src/openrouter/errors/unauthorizedresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
unauthorizedresponseerrordata as components_unauthorizedresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class UnauthorizedResponseErrorData(BaseModel):
error: components_unauthorizedresponseerrordata.UnauthorizedResponseErrorData
r"""Error data for UnauthorizedResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/errors/unprocessableentityresponse_error.py b/src/openrouter/errors/unprocessableentityresponse_error.py
index 7304f75..d858f3b 100644
--- a/src/openrouter/errors/unprocessableentityresponse_error.py
+++ b/src/openrouter/errors/unprocessableentityresponse_error.py
@@ -7,13 +7,14 @@ from openrouter.components import (
unprocessableentityresponseerrordata as components_unprocessableentityresponseerrordata,
)
from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET
+from typing import Any, Dict, Optional
class UnprocessableEntityResponseErrorData(BaseModel):
error: components_unprocessableentityresponseerrordata.UnprocessableEntityResponseErrorData
r"""Error data for UnprocessableEntityResponse"""
+ openrouter_metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
user_id: OptionalNullable[str] = UNSET
diff --git a/src/openrouter/generations.py b/src/openrouter/generations.py
index fddcce7..409e169 100644
--- a/src/openrouter/generations.py
+++ b/src/openrouter/generations.py
@@ -23,7 +23,7 @@ class Generations(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetGenerationResponse:
+ ) -> components.GenerationResponse:
r"""Get request & usage metadata for a generation
:param id: The generation ID
@@ -118,7 +118,7 @@ class Generations(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.GetGenerationResponse, http_res)
+ return unmarshal_json_response(components.GenerationResponse, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
@@ -183,7 +183,7 @@ class Generations(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetGenerationResponse:
+ ) -> components.GenerationResponse:
r"""Get request & usage metadata for a generation
:param id: The generation ID
@@ -278,7 +278,7 @@ class Generations(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.GetGenerationResponse, http_res)
+ return unmarshal_json_response(components.GenerationResponse, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
@@ -331,3 +331,327 @@ class Generations(BaseSDK):
)
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def list_generation_content(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GenerationContentResponse:
+ r"""Get stored prompt and completion content for a generation
+
+ :param id: The generation ID
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListGenerationContentRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/generation/content",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListGenerationContentGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listGenerationContent",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "502",
+ "524",
+ "529",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.GenerationContentResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "502", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadGatewayResponseErrorData, http_res
+ )
+ raise errors.BadGatewayResponseError(response_data, http_res)
+ if utils.match_response(http_res, "524", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.EdgeNetworkTimeoutResponseErrorData, http_res
+ )
+ raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res)
+ if utils.match_response(http_res, "529", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ProviderOverloadedResponseErrorData, http_res
+ )
+ raise errors.ProviderOverloadedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_generation_content_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GenerationContentResponse:
+ r"""Get stored prompt and completion content for a generation
+
+ :param id: The generation ID
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListGenerationContentRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/generation/content",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListGenerationContentGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listGenerationContent",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "502",
+ "524",
+ "529",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.GenerationContentResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "502", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadGatewayResponseErrorData, http_res
+ )
+ raise errors.BadGatewayResponseError(response_data, http_res)
+ if utils.match_response(http_res, "524", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.EdgeNetworkTimeoutResponseErrorData, http_res
+ )
+ raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res)
+ if utils.match_response(http_res, "529", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ProviderOverloadedResponseErrorData, http_res
+ )
+ raise errors.ProviderOverloadedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/guardrails.py b/src/openrouter/guardrails.py
index 7d1038d..beb82bf 100644
--- a/src/openrouter/guardrails.py
+++ b/src/openrouter/guardrails.py
@@ -21,6 +21,7 @@ class Guardrails(BaseSDK):
x_open_router_categories: Optional[str] = None,
offset: Optional[int] = None,
limit: Optional[int] = None,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -39,6 +40,7 @@ class Guardrails(BaseSDK):
:param offset: Number of records to skip for pagination
:param limit: Maximum number of records to return (max 100)
+ :param workspace_id: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -60,6 +62,7 @@ class Guardrails(BaseSDK):
x_open_router_categories=x_open_router_categories,
offset=offset,
limit=limit,
+ workspace_id=workspace_id,
)
req = self._build_request(
@@ -132,6 +135,7 @@ class Guardrails(BaseSDK):
x_open_router_categories=x_open_router_categories,
offset=next_offset,
limit=limit,
+ workspace_id=workspace_id,
retries=retries,
)
@@ -174,6 +178,7 @@ class Guardrails(BaseSDK):
x_open_router_categories: Optional[str] = None,
offset: Optional[int] = None,
limit: Optional[int] = None,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -192,6 +197,7 @@ class Guardrails(BaseSDK):
:param offset: Number of records to skip for pagination
:param limit: Maximum number of records to return (max 100)
+ :param workspace_id: Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -213,6 +219,7 @@ class Guardrails(BaseSDK):
x_open_router_categories=x_open_router_categories,
offset=offset,
limit=limit,
+ workspace_id=workspace_id,
)
req = self._build_request_async(
@@ -288,6 +295,7 @@ class Guardrails(BaseSDK):
x_open_router_categories=x_open_router_categories,
offset=next_offset,
limit=limit,
+ workspace_id=workspace_id,
retries=retries,
)
@@ -331,12 +339,29 @@ class Guardrails(BaseSDK):
x_open_router_categories: Optional[str] = None,
allowed_models: OptionalNullable[List[str]] = UNSET,
allowed_providers: OptionalNullable[List[str]] = UNSET,
+ content_filter_builtins: OptionalNullable[
+ Union[
+ List[components.ContentFilterBuiltinEntryInput],
+ List[components.ContentFilterBuiltinEntryInputTypedDict],
+ ]
+ ] = UNSET,
+ content_filters: OptionalNullable[
+ Union[
+ List[components.ContentFilterEntry],
+ List[components.ContentFilterEntryTypedDict],
+ ]
+ ] = UNSET,
description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET,
+ enforce_zdr_google: OptionalNullable[bool] = UNSET,
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET,
+ enforce_zdr_other: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[List[str]] = UNSET,
ignored_providers: OptionalNullable[List[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -356,12 +381,19 @@ class Guardrails(BaseSDK):
:param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
:param allowed_providers: List of allowed provider IDs
+ :param content_filter_builtins: Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
+ :param content_filters: Custom regex content filters to apply to request messages
:param description: Description of the guardrail
- :param enforce_zdr: Whether to enforce zero data retention
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: Spending limit in USD
:param reset_interval: Interval at which the limit resets (daily, weekly, monthly)
+ :param workspace_id: The workspace to create the guardrail in. Defaults to the default workspace if not provided.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -384,13 +416,26 @@ class Guardrails(BaseSDK):
create_guardrail_request=components.CreateGuardrailRequest(
allowed_models=allowed_models,
allowed_providers=allowed_providers,
+ content_filter_builtins=utils.get_pydantic_model(
+ content_filter_builtins,
+ OptionalNullable[List[components.ContentFilterBuiltinEntryInput]],
+ ),
+ content_filters=utils.get_pydantic_model(
+ content_filters,
+ OptionalNullable[List[components.ContentFilterEntry]],
+ ),
description=description,
enforce_zdr=enforce_zdr,
+ enforce_zdr_anthropic=enforce_zdr_anthropic,
+ enforce_zdr_google=enforce_zdr_google,
+ enforce_zdr_openai=enforce_zdr_openai,
+ enforce_zdr_other=enforce_zdr_other,
ignored_models=ignored_models,
ignored_providers=ignored_providers,
limit_usd=limit_usd,
name=name,
reset_interval=reset_interval,
+ workspace_id=workspace_id,
),
)
@@ -446,7 +491,7 @@ class Guardrails(BaseSDK):
),
),
request=req,
- error_status_codes=["400", "401", "4XX", "500", "5XX"],
+ error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
retry_config=retry_config,
)
@@ -463,6 +508,11 @@ class Guardrails(BaseSDK):
errors.UnauthorizedResponseErrorData, http_res
)
raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
if utils.match_response(http_res, "500", "application/json"):
response_data = unmarshal_json_response(
errors.InternalServerResponseErrorData, http_res
@@ -490,12 +540,29 @@ class Guardrails(BaseSDK):
x_open_router_categories: Optional[str] = None,
allowed_models: OptionalNullable[List[str]] = UNSET,
allowed_providers: OptionalNullable[List[str]] = UNSET,
+ content_filter_builtins: OptionalNullable[
+ Union[
+ List[components.ContentFilterBuiltinEntryInput],
+ List[components.ContentFilterBuiltinEntryInputTypedDict],
+ ]
+ ] = UNSET,
+ content_filters: OptionalNullable[
+ Union[
+ List[components.ContentFilterEntry],
+ List[components.ContentFilterEntryTypedDict],
+ ]
+ ] = UNSET,
description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET,
+ enforce_zdr_google: OptionalNullable[bool] = UNSET,
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET,
+ enforce_zdr_other: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[List[str]] = UNSET,
ignored_providers: OptionalNullable[List[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET,
+ workspace_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -515,12 +582,19 @@ class Guardrails(BaseSDK):
:param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
:param allowed_providers: List of allowed provider IDs
+ :param content_filter_builtins: Builtin content filters to apply. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
+ :param content_filters: Custom regex content filters to apply to request messages
:param description: Description of the guardrail
- :param enforce_zdr: Whether to enforce zero data retention
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: Spending limit in USD
:param reset_interval: Interval at which the limit resets (daily, weekly, monthly)
+ :param workspace_id: The workspace to create the guardrail in. Defaults to the default workspace if not provided.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -543,13 +617,26 @@ class Guardrails(BaseSDK):
create_guardrail_request=components.CreateGuardrailRequest(
allowed_models=allowed_models,
allowed_providers=allowed_providers,
+ content_filter_builtins=utils.get_pydantic_model(
+ content_filter_builtins,
+ OptionalNullable[List[components.ContentFilterBuiltinEntryInput]],
+ ),
+ content_filters=utils.get_pydantic_model(
+ content_filters,
+ OptionalNullable[List[components.ContentFilterEntry]],
+ ),
description=description,
enforce_zdr=enforce_zdr,
+ enforce_zdr_anthropic=enforce_zdr_anthropic,
+ enforce_zdr_google=enforce_zdr_google,
+ enforce_zdr_openai=enforce_zdr_openai,
+ enforce_zdr_other=enforce_zdr_other,
ignored_models=ignored_models,
ignored_providers=ignored_providers,
limit_usd=limit_usd,
name=name,
reset_interval=reset_interval,
+ workspace_id=workspace_id,
),
)
@@ -605,7 +692,7 @@ class Guardrails(BaseSDK):
),
),
request=req,
- error_status_codes=["400", "401", "4XX", "500", "5XX"],
+ error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
retry_config=retry_config,
)
@@ -622,6 +709,11 @@ class Guardrails(BaseSDK):
errors.UnauthorizedResponseErrorData, http_res
)
raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
if utils.match_response(http_res, "500", "application/json"):
response_data = unmarshal_json_response(
errors.InternalServerResponseErrorData, http_res
@@ -1153,8 +1245,24 @@ class Guardrails(BaseSDK):
x_open_router_categories: Optional[str] = None,
allowed_models: OptionalNullable[List[str]] = UNSET,
allowed_providers: OptionalNullable[List[str]] = UNSET,
+ content_filter_builtins: OptionalNullable[
+ Union[
+ List[components.ContentFilterBuiltinEntryInput],
+ List[components.ContentFilterBuiltinEntryInputTypedDict],
+ ]
+ ] = UNSET,
+ content_filters: OptionalNullable[
+ Union[
+ List[components.ContentFilterEntry],
+ List[components.ContentFilterEntryTypedDict],
+ ]
+ ] = UNSET,
description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET,
+ enforce_zdr_google: OptionalNullable[bool] = UNSET,
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET,
+ enforce_zdr_other: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[List[str]] = UNSET,
ignored_providers: OptionalNullable[List[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
@@ -1179,8 +1287,14 @@ class Guardrails(BaseSDK):
:param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
:param allowed_providers: New list of allowed provider IDs
+ :param content_filter_builtins: Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
+ :param content_filters: Custom regex content filters to apply. Set to null to remove.
:param description: New description for the guardrail
- :param enforce_zdr: Whether to enforce zero data retention
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: New spending limit in USD
@@ -1209,8 +1323,20 @@ class Guardrails(BaseSDK):
update_guardrail_request=components.UpdateGuardrailRequest(
allowed_models=allowed_models,
allowed_providers=allowed_providers,
+ content_filter_builtins=utils.get_pydantic_model(
+ content_filter_builtins,
+ OptionalNullable[List[components.ContentFilterBuiltinEntryInput]],
+ ),
+ content_filters=utils.get_pydantic_model(
+ content_filters,
+ OptionalNullable[List[components.ContentFilterEntry]],
+ ),
description=description,
enforce_zdr=enforce_zdr,
+ enforce_zdr_anthropic=enforce_zdr_anthropic,
+ enforce_zdr_google=enforce_zdr_google,
+ enforce_zdr_openai=enforce_zdr_openai,
+ enforce_zdr_other=enforce_zdr_other,
ignored_models=ignored_models,
ignored_providers=ignored_providers,
limit_usd=limit_usd,
@@ -1320,8 +1446,24 @@ class Guardrails(BaseSDK):
x_open_router_categories: Optional[str] = None,
allowed_models: OptionalNullable[List[str]] = UNSET,
allowed_providers: OptionalNullable[List[str]] = UNSET,
+ content_filter_builtins: OptionalNullable[
+ Union[
+ List[components.ContentFilterBuiltinEntryInput],
+ List[components.ContentFilterBuiltinEntryInputTypedDict],
+ ]
+ ] = UNSET,
+ content_filters: OptionalNullable[
+ Union[
+ List[components.ContentFilterEntry],
+ List[components.ContentFilterEntryTypedDict],
+ ]
+ ] = UNSET,
description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ enforce_zdr_anthropic: OptionalNullable[bool] = UNSET,
+ enforce_zdr_google: OptionalNullable[bool] = UNSET,
+ enforce_zdr_openai: OptionalNullable[bool] = UNSET,
+ enforce_zdr_other: OptionalNullable[bool] = UNSET,
ignored_models: OptionalNullable[List[str]] = UNSET,
ignored_providers: OptionalNullable[List[str]] = UNSET,
limit_usd: OptionalNullable[float] = UNSET,
@@ -1346,8 +1488,14 @@ class Guardrails(BaseSDK):
:param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
:param allowed_providers: New list of allowed provider IDs
+ :param content_filter_builtins: Builtin content filters to apply. Set to null to remove. The \"flag\" action is only supported for \"regex-prompt-injection\"; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept \"block\" or \"redact\" only.
+ :param content_filters: Custom regex content filters to apply. Set to null to remove.
:param description: New description for the guardrail
- :param enforce_zdr: Whether to enforce zero data retention
+ :param enforce_zdr: Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
+ :param enforce_zdr_anthropic: Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_google: Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_openai: Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
+ :param enforce_zdr_other: Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.
:param ignored_models: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
:param ignored_providers: List of provider IDs to exclude from routing
:param limit_usd: New spending limit in USD
@@ -1376,8 +1524,20 @@ class Guardrails(BaseSDK):
update_guardrail_request=components.UpdateGuardrailRequest(
allowed_models=allowed_models,
allowed_providers=allowed_providers,
+ content_filter_builtins=utils.get_pydantic_model(
+ content_filter_builtins,
+ OptionalNullable[List[components.ContentFilterBuiltinEntryInput]],
+ ),
+ content_filters=utils.get_pydantic_model(
+ content_filters,
+ OptionalNullable[List[components.ContentFilterEntry]],
+ ),
description=description,
enforce_zdr=enforce_zdr,
+ enforce_zdr_anthropic=enforce_zdr_anthropic,
+ enforce_zdr_google=enforce_zdr_google,
+ enforce_zdr_openai=enforce_zdr_openai,
+ enforce_zdr_other=enforce_zdr_other,
ignored_models=ignored_models,
ignored_providers=ignored_providers,
limit_usd=limit_usd,
diff --git a/src/openrouter/models_.py b/src/openrouter/models_.py
index a0963ae..b1f9143 100644
--- a/src/openrouter/models_.py
+++ b/src/openrouter/models_.py
@@ -18,9 +18,10 @@ class Models(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- category: Optional[operations.Category] = None,
+ category: Optional[operations.GetModelsCategory] = None,
supported_parameters: Optional[str] = None,
output_modalities: Optional[str] = None,
+ sort: Optional[operations.GetModelsSort] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -38,6 +39,7 @@ class Models(BaseSDK):
:param category: Filter models by use case category
:param supported_parameters: Filter models by supported parameter (comma-separated)
:param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
+ :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -60,6 +62,7 @@ class Models(BaseSDK):
category=category,
supported_parameters=supported_parameters,
output_modalities=output_modalities,
+ sort=sort,
)
req = self._build_request(
@@ -143,9 +146,10 @@ class Models(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- category: Optional[operations.Category] = None,
+ category: Optional[operations.GetModelsCategory] = None,
supported_parameters: Optional[str] = None,
output_modalities: Optional[str] = None,
+ sort: Optional[operations.GetModelsSort] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -163,6 +167,7 @@ class Models(BaseSDK):
:param category: Filter models by use case category
:param supported_parameters: Filter models by supported parameter (comma-separated)
:param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
+ :param sort: Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -185,6 +190,7 @@ class Models(BaseSDK):
category=category,
supported_parameters=supported_parameters,
output_modalities=output_modalities,
+ sort=sort,
)
req = self._build_request_async(
diff --git a/src/openrouter/observability.py b/src/openrouter/observability.py
new file mode 100644
index 0000000..37ee42a
--- /dev/null
+++ b/src/openrouter/observability.py
@@ -0,0 +1,1555 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from jsonpath import JSONPath
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import Nullable, OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union
+
+
+class Observability(BaseSDK):
+ r"""Observability endpoints"""
+
+ def list(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ workspace_id: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListObservabilityDestinationsResponse]:
+ r"""List observability destinations
+
+ List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListObservabilityDestinationsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/observability/destinations",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListObservabilityDestinationsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listObservabilityDestinations",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Optional[operations.ListObservabilityDestinationsResponse]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return None
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return None
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return None
+ next_offset = offset + len(results[0])
+
+ return self.list(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListObservabilityDestinationsResponse(
+ result=unmarshal_json_response(
+ components.ListObservabilityDestinationsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ workspace_id: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListObservabilityDestinationsResponse]:
+ r"""List observability destinations
+
+ List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param workspace_id: Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListObservabilityDestinationsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/observability/destinations",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListObservabilityDestinationsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listObservabilityDestinations",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> (
+ Awaitable[Optional[operations.ListObservabilityDestinationsResponse]]
+ ):
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ async def empty_result():
+ return None
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return empty_result()
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return empty_result()
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return empty_result()
+ next_offset = offset + len(results[0])
+
+ return self.list_async(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ workspace_id=workspace_id,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListObservabilityDestinationsResponse(
+ result=unmarshal_json_response(
+ components.ListObservabilityDestinationsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def create(
+ self,
+ *,
+ config: Dict[str, Nullable[Any]],
+ name: str,
+ type_: components.CreateObservabilityDestinationRequestType,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ api_key_hashes: OptionalNullable[List[str]] = UNSET,
+ enabled: Optional[bool] = True,
+ filter_rules: OptionalNullable[
+ Union[
+ components.ObservabilityFilterRulesConfig,
+ components.ObservabilityFilterRulesConfigTypedDict,
+ ]
+ ] = UNSET,
+ privacy_mode: Optional[bool] = False,
+ sampling_rate: Optional[float] = None,
+ workspace_id: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreateObservabilityDestinationResponse:
+ r"""Create an observability destination
+
+ Create a new observability destination. A maximum of 5 destinations per type is allowed. 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.
+
+ :param config: Provider-specific configuration. The shape depends on `type` and is validated server-side.
+ :param name: Human-readable name for the destination.
+ :param type: The destination type. Only stable destination types are accepted.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided.
+ :param enabled: Whether this destination should be enabled immediately.
+ :param filter_rules: Optional structured filter rules controlling which events are forwarded.
+ :param privacy_mode: When true, request/response bodies are not forwarded — only metadata.
+ :param sampling_rate: Sampling rate between 0.0001 and 1 (1 = 100%).
+ :param workspace_id: Optional workspace ID. Defaults to the authenticated entity's default workspace.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ create_observability_destination_request=components.CreateObservabilityDestinationRequest(
+ api_key_hashes=api_key_hashes,
+ config=config,
+ enabled=enabled,
+ filter_rules=utils.get_pydantic_model(
+ filter_rules,
+ OptionalNullable[components.ObservabilityFilterRulesConfig],
+ ),
+ name=name,
+ privacy_mode=privacy_mode,
+ sampling_rate=sampling_rate,
+ type=type_,
+ workspace_id=workspace_id,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/observability/destinations",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_observability_destination_request,
+ False,
+ False,
+ "json",
+ components.CreateObservabilityDestinationRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "201", "application/json"):
+ return unmarshal_json_response(
+ components.CreateObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_async(
+ self,
+ *,
+ config: Dict[str, Nullable[Any]],
+ name: str,
+ type_: components.CreateObservabilityDestinationRequestType,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ api_key_hashes: OptionalNullable[List[str]] = UNSET,
+ enabled: Optional[bool] = True,
+ filter_rules: OptionalNullable[
+ Union[
+ components.ObservabilityFilterRulesConfig,
+ components.ObservabilityFilterRulesConfigTypedDict,
+ ]
+ ] = UNSET,
+ privacy_mode: Optional[bool] = False,
+ sampling_rate: Optional[float] = None,
+ workspace_id: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreateObservabilityDestinationResponse:
+ r"""Create an observability destination
+
+ Create a new observability destination. A maximum of 5 destinations per type is allowed. 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.
+
+ :param config: Provider-specific configuration. The shape depends on `type` and is validated server-side.
+ :param name: Human-readable name for the destination.
+ :param type: The destination type. Only stable destination types are accepted.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided.
+ :param enabled: Whether this destination should be enabled immediately.
+ :param filter_rules: Optional structured filter rules controlling which events are forwarded.
+ :param privacy_mode: When true, request/response bodies are not forwarded — only metadata.
+ :param sampling_rate: Sampling rate between 0.0001 and 1 (1 = 100%).
+ :param workspace_id: Optional workspace ID. Defaults to the authenticated entity's default workspace.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ create_observability_destination_request=components.CreateObservabilityDestinationRequest(
+ api_key_hashes=api_key_hashes,
+ config=config,
+ enabled=enabled,
+ filter_rules=utils.get_pydantic_model(
+ filter_rules,
+ OptionalNullable[components.ObservabilityFilterRulesConfig],
+ ),
+ name=name,
+ privacy_mode=privacy_mode,
+ sampling_rate=sampling_rate,
+ type=type_,
+ workspace_id=workspace_id,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/observability/destinations",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_observability_destination_request,
+ False,
+ False,
+ "json",
+ components.CreateObservabilityDestinationRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "201", "application/json"):
+ return unmarshal_json_response(
+ components.CreateObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def delete(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.DeleteObservabilityDestinationResponse:
+ r"""Delete an observability destination
+
+ Delete an existing observability destination. This performs a soft delete. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The destination ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.DeleteObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="DELETE",
+ path="/observability/destinations/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.DeleteObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="deleteObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.DeleteObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def delete_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.DeleteObservabilityDestinationResponse:
+ r"""Delete an observability destination
+
+ Delete an existing observability destination. This performs a soft delete. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The destination ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.DeleteObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="DELETE",
+ path="/observability/destinations/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.DeleteObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="deleteObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.DeleteObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetObservabilityDestinationResponse:
+ r"""Get an observability destination
+
+ Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The destination ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/observability/destinations/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.GetObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetObservabilityDestinationResponse:
+ r"""Get an observability destination
+
+ Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The destination ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/observability/destinations/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.GetObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def update(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ api_key_hashes: OptionalNullable[List[str]] = UNSET,
+ config: Optional[Dict[str, Nullable[Any]]] = None,
+ enabled: Optional[bool] = None,
+ filter_rules: OptionalNullable[
+ Union[
+ components.ObservabilityFilterRulesConfig,
+ components.ObservabilityFilterRulesConfigTypedDict,
+ ]
+ ] = UNSET,
+ name: Optional[str] = None,
+ privacy_mode: Optional[bool] = None,
+ sampling_rate: Optional[float] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.UpdateObservabilityDestinationResponse:
+ r"""Update an observability destination
+
+ Update an existing observability destination. Only the fields provided in the request body are updated. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The destination ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided.
+ :param config: Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value.
+ :param enabled: Whether the destination is enabled.
+ :param filter_rules:
+ :param name: Human-readable name for the destination.
+ :param privacy_mode: When true, request/response bodies are not forwarded — only metadata.
+ :param sampling_rate: Sampling rate between 0.0001 and 1 (1 = 100%).
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.UpdateObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ update_observability_destination_request=components.UpdateObservabilityDestinationRequest(
+ api_key_hashes=api_key_hashes,
+ config=config,
+ enabled=enabled,
+ filter_rules=utils.get_pydantic_model(
+ filter_rules,
+ OptionalNullable[components.ObservabilityFilterRulesConfig],
+ ),
+ name=name,
+ privacy_mode=privacy_mode,
+ sampling_rate=sampling_rate,
+ ),
+ )
+
+ req = self._build_request(
+ method="PATCH",
+ path="/observability/destinations/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.UpdateObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.update_observability_destination_request,
+ False,
+ False,
+ "json",
+ components.UpdateObservabilityDestinationRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="updateObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.UpdateObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def update_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ api_key_hashes: OptionalNullable[List[str]] = UNSET,
+ config: Optional[Dict[str, Nullable[Any]]] = None,
+ enabled: Optional[bool] = None,
+ filter_rules: OptionalNullable[
+ Union[
+ components.ObservabilityFilterRulesConfig,
+ components.ObservabilityFilterRulesConfigTypedDict,
+ ]
+ ] = UNSET,
+ name: Optional[str] = None,
+ privacy_mode: Optional[bool] = None,
+ sampling_rate: Optional[float] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.UpdateObservabilityDestinationResponse:
+ r"""Update an observability destination
+
+ Update an existing observability destination. Only the fields provided in the request body are updated. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The destination ID (UUID).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param api_key_hashes: Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided.
+ :param config: Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value.
+ :param enabled: Whether the destination is enabled.
+ :param filter_rules:
+ :param name: Human-readable name for the destination.
+ :param privacy_mode: When true, request/response bodies are not forwarded — only metadata.
+ :param sampling_rate: Sampling rate between 0.0001 and 1 (1 = 100%).
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.UpdateObservabilityDestinationRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ update_observability_destination_request=components.UpdateObservabilityDestinationRequest(
+ api_key_hashes=api_key_hashes,
+ config=config,
+ enabled=enabled,
+ filter_rules=utils.get_pydantic_model(
+ filter_rules,
+ OptionalNullable[components.ObservabilityFilterRulesConfig],
+ ),
+ name=name,
+ privacy_mode=privacy_mode,
+ sampling_rate=sampling_rate,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="PATCH",
+ path="/observability/destinations/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.UpdateObservabilityDestinationGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.update_observability_destination_request,
+ False,
+ False,
+ "json",
+ components.UpdateObservabilityDestinationRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="updateObservabilityDestination",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.UpdateObservabilityDestinationResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/operations/__init__.py b/src/openrouter/operations/__init__.py
index 8c2b319..7c6acb8 100644
--- a/src/openrouter/operations/__init__.py
+++ b/src/openrouter/operations/__init__.py
@@ -6,6 +6,12 @@ import builtins
import sys
if TYPE_CHECKING:
+ from .bulkaddworkspacemembers import (
+ BulkAddWorkspaceMembersGlobals,
+ BulkAddWorkspaceMembersGlobalsTypedDict,
+ BulkAddWorkspaceMembersRequest,
+ BulkAddWorkspaceMembersRequestTypedDict,
+ )
from .bulkassignkeystoguardrail import (
BulkAssignKeysToGuardrailGlobals,
BulkAssignKeysToGuardrailGlobalsTypedDict,
@@ -18,6 +24,12 @@ if TYPE_CHECKING:
BulkAssignMembersToGuardrailRequest,
BulkAssignMembersToGuardrailRequestTypedDict,
)
+ from .bulkremoveworkspacemembers import (
+ BulkRemoveWorkspaceMembersGlobals,
+ BulkRemoveWorkspaceMembersGlobalsTypedDict,
+ BulkRemoveWorkspaceMembersRequest,
+ BulkRemoveWorkspaceMembersRequestTypedDict,
+ )
from .bulkunassignkeysfromguardrail import (
BulkUnassignKeysFromGuardrailGlobals,
BulkUnassignKeysFromGuardrailGlobalsTypedDict,
@@ -30,6 +42,18 @@ if TYPE_CHECKING:
BulkUnassignMembersFromGuardrailRequest,
BulkUnassignMembersFromGuardrailRequestTypedDict,
)
+ from .createaudiospeech import (
+ CreateAudioSpeechGlobals,
+ CreateAudioSpeechGlobalsTypedDict,
+ CreateAudioSpeechRequest,
+ CreateAudioSpeechRequestTypedDict,
+ )
+ from .createaudiotranscriptions import (
+ CreateAudioTranscriptionsGlobals,
+ CreateAudioTranscriptionsGlobalsTypedDict,
+ CreateAudioTranscriptionsRequest,
+ CreateAudioTranscriptionsRequestTypedDict,
+ )
from .createauthkeyscode import (
CreateAuthKeysCodeCodeChallengeMethod,
CreateAuthKeysCodeData,
@@ -44,6 +68,12 @@ if TYPE_CHECKING:
CreateAuthKeysCodeResponseTypedDict,
UsageLimitType,
)
+ from .createbyokkey import (
+ CreateBYOKKeyGlobals,
+ CreateBYOKKeyGlobalsTypedDict,
+ CreateBYOKKeyRequest,
+ CreateBYOKKeyRequestTypedDict,
+ )
from .createembeddings import (
Content,
ContentImageURL,
@@ -76,6 +106,8 @@ if TYPE_CHECKING:
InputUnionTypedDict,
Object,
ObjectEmbedding,
+ PromptTokensDetails,
+ PromptTokensDetailsTypedDict,
TypeImageURL,
TypeText,
)
@@ -98,6 +130,30 @@ if TYPE_CHECKING:
CreateKeysResponse,
CreateKeysResponseTypedDict,
)
+ from .createobservabilitydestination import (
+ CreateObservabilityDestinationGlobals,
+ CreateObservabilityDestinationGlobalsTypedDict,
+ CreateObservabilityDestinationRequest,
+ CreateObservabilityDestinationRequestTypedDict,
+ )
+ from .createpresetschatcompletions import (
+ CreatePresetsChatCompletionsGlobals,
+ CreatePresetsChatCompletionsGlobalsTypedDict,
+ CreatePresetsChatCompletionsRequest,
+ CreatePresetsChatCompletionsRequestTypedDict,
+ )
+ from .createpresetsmessages import (
+ CreatePresetsMessagesGlobals,
+ CreatePresetsMessagesGlobalsTypedDict,
+ CreatePresetsMessagesRequest,
+ CreatePresetsMessagesRequestTypedDict,
+ )
+ from .createpresetsresponses import (
+ CreatePresetsResponsesGlobals,
+ CreatePresetsResponsesGlobalsTypedDict,
+ CreatePresetsResponsesRequest,
+ CreatePresetsResponsesRequestTypedDict,
+ )
from .creatererank import (
CreateRerankGlobals,
CreateRerankGlobalsTypedDict,
@@ -112,6 +168,10 @@ if TYPE_CHECKING:
CreateRerankUsage,
CreateRerankUsageTypedDict,
Document,
+ DocumentRequest,
+ DocumentRequestTypedDict,
+ DocumentResponse,
+ DocumentResponseTypedDict,
DocumentTypedDict,
Result,
ResultTypedDict,
@@ -122,8 +182,6 @@ if TYPE_CHECKING:
CreateResponsesRequest,
CreateResponsesRequestTypedDict,
CreateResponsesResponse,
- CreateResponsesResponseBody,
- CreateResponsesResponseBodyTypedDict,
CreateResponsesResponseTypedDict,
)
from .createvideos import (
@@ -132,6 +190,18 @@ if TYPE_CHECKING:
CreateVideosRequest,
CreateVideosRequestTypedDict,
)
+ from .createworkspace import (
+ CreateWorkspaceGlobals,
+ CreateWorkspaceGlobalsTypedDict,
+ CreateWorkspaceRequest,
+ CreateWorkspaceRequestTypedDict,
+ )
+ from .deletebyokkey import (
+ DeleteBYOKKeyGlobals,
+ DeleteBYOKKeyGlobalsTypedDict,
+ DeleteBYOKKeyRequest,
+ DeleteBYOKKeyRequestTypedDict,
+ )
from .deleteguardrail import (
DeleteGuardrailGlobals,
DeleteGuardrailGlobalsTypedDict,
@@ -146,6 +216,18 @@ if TYPE_CHECKING:
DeleteKeysResponse,
DeleteKeysResponseTypedDict,
)
+ from .deleteobservabilitydestination import (
+ DeleteObservabilityDestinationGlobals,
+ DeleteObservabilityDestinationGlobalsTypedDict,
+ DeleteObservabilityDestinationRequest,
+ DeleteObservabilityDestinationRequestTypedDict,
+ )
+ from .deleteworkspace import (
+ DeleteWorkspaceGlobals,
+ DeleteWorkspaceGlobalsTypedDict,
+ DeleteWorkspaceRequest,
+ DeleteWorkspaceRequestTypedDict,
+ )
from .exchangeauthcodeforapikey import (
ExchangeAuthCodeForAPIKeyCodeChallengeMethod,
ExchangeAuthCodeForAPIKeyGlobals,
@@ -157,6 +239,45 @@ if TYPE_CHECKING:
ExchangeAuthCodeForAPIKeyResponse,
ExchangeAuthCodeForAPIKeyResponseTypedDict,
)
+ from .getanalyticsmeta import (
+ Dimension,
+ DimensionTypedDict,
+ DisplayFormat,
+ GetAnalyticsMetaData,
+ GetAnalyticsMetaDataTypedDict,
+ GetAnalyticsMetaGlobals,
+ GetAnalyticsMetaGlobalsTypedDict,
+ GetAnalyticsMetaRequest,
+ GetAnalyticsMetaRequestTypedDict,
+ GetAnalyticsMetaResponse,
+ GetAnalyticsMetaResponseTypedDict,
+ Granularity,
+ GranularityName,
+ GranularityTypedDict,
+ Metric,
+ MetricTypedDict,
+ Operator,
+ OperatorName,
+ OperatorTypedDict,
+ ValueType,
+ )
+ from .getapprankings import (
+ GetAppRankingsCategory,
+ GetAppRankingsGlobals,
+ GetAppRankingsGlobalsTypedDict,
+ GetAppRankingsRequest,
+ GetAppRankingsRequestTypedDict,
+ GetAppRankingsResponse,
+ GetAppRankingsResponseTypedDict,
+ GetAppRankingsSort,
+ Subcategory,
+ )
+ from .getbyokkey import (
+ GetBYOKKeyGlobals,
+ GetBYOKKeyGlobalsTypedDict,
+ GetBYOKKeyRequest,
+ GetBYOKKeyRequestTypedDict,
+ )
from .getcredits import (
GetCreditsData,
GetCreditsDataTypedDict,
@@ -180,15 +301,10 @@ if TYPE_CHECKING:
RateLimitTypedDict,
)
from .getgeneration import (
- APIType,
- GetGenerationData,
- GetGenerationDataTypedDict,
GetGenerationGlobals,
GetGenerationGlobalsTypedDict,
GetGenerationRequest,
GetGenerationRequestTypedDict,
- GetGenerationResponse,
- GetGenerationResponseTypedDict,
)
from .getguardrail import (
GetGuardrailGlobals,
@@ -207,11 +323,36 @@ if TYPE_CHECKING:
GetKeyResponseTypedDict,
)
from .getmodels import (
- Category,
+ GetModelsCategory,
GetModelsGlobals,
GetModelsGlobalsTypedDict,
GetModelsRequest,
GetModelsRequestTypedDict,
+ GetModelsSort,
+ )
+ from .getobservabilitydestination import (
+ GetObservabilityDestinationGlobals,
+ GetObservabilityDestinationGlobalsTypedDict,
+ GetObservabilityDestinationRequest,
+ GetObservabilityDestinationRequestTypedDict,
+ )
+ from .getpreset import (
+ GetPresetGlobals,
+ GetPresetGlobalsTypedDict,
+ GetPresetRequest,
+ GetPresetRequestTypedDict,
+ )
+ from .getpresetversion import (
+ GetPresetVersionGlobals,
+ GetPresetVersionGlobalsTypedDict,
+ GetPresetVersionRequest,
+ GetPresetVersionRequestTypedDict,
+ )
+ from .getrankingsdaily import (
+ GetRankingsDailyGlobals,
+ GetRankingsDailyGlobalsTypedDict,
+ GetRankingsDailyRequest,
+ GetRankingsDailyRequestTypedDict,
)
from .getuseractivity import (
GetUserActivityGlobals,
@@ -225,6 +366,12 @@ if TYPE_CHECKING:
GetVideosRequest,
GetVideosRequestTypedDict,
)
+ from .getworkspace import (
+ GetWorkspaceGlobals,
+ GetWorkspaceGlobalsTypedDict,
+ GetWorkspaceRequest,
+ GetWorkspaceRequestTypedDict,
+ )
from .list import (
ListData,
ListDataTypedDict,
@@ -235,6 +382,15 @@ if TYPE_CHECKING:
ListResponse,
ListResponseTypedDict,
)
+ from .listbyokkeys import (
+ ListBYOKKeysGlobals,
+ ListBYOKKeysGlobalsTypedDict,
+ ListBYOKKeysRequest,
+ ListBYOKKeysRequestTypedDict,
+ ListBYOKKeysResponse,
+ ListBYOKKeysResponseTypedDict,
+ Provider,
+ )
from .listembeddingsmodels import (
ListEmbeddingsModelsGlobals,
ListEmbeddingsModelsGlobalsTypedDict,
@@ -257,6 +413,12 @@ if TYPE_CHECKING:
ListEndpointsZdrResponse,
ListEndpointsZdrResponseTypedDict,
)
+ from .listgenerationcontent import (
+ ListGenerationContentGlobals,
+ ListGenerationContentGlobalsTypedDict,
+ ListGenerationContentRequest,
+ ListGenerationContentRequestTypedDict,
+ )
from .listguardrailkeyassignments import (
ListGuardrailKeyAssignmentsGlobals,
ListGuardrailKeyAssignmentsGlobalsTypedDict,
@@ -311,6 +473,14 @@ if TYPE_CHECKING:
ListModelsUserSecurity,
ListModelsUserSecurityTypedDict,
)
+ from .listobservabilitydestinations import (
+ ListObservabilityDestinationsGlobals,
+ ListObservabilityDestinationsGlobalsTypedDict,
+ ListObservabilityDestinationsRequest,
+ ListObservabilityDestinationsRequestTypedDict,
+ ListObservabilityDestinationsResponse,
+ ListObservabilityDestinationsResponseTypedDict,
+ )
from .listorganizationmembers import (
ListOrganizationMembersData,
ListOrganizationMembersDataTypedDict,
@@ -324,6 +494,22 @@ if TYPE_CHECKING:
ListOrganizationMembersResponseTypedDict,
Role,
)
+ from .listpresets import (
+ ListPresetsGlobals,
+ ListPresetsGlobalsTypedDict,
+ ListPresetsRequest,
+ ListPresetsRequestTypedDict,
+ ListPresetsResponse,
+ ListPresetsResponseTypedDict,
+ )
+ from .listpresetversions import (
+ ListPresetVersionsGlobals,
+ ListPresetVersionsGlobalsTypedDict,
+ ListPresetVersionsRequest,
+ ListPresetVersionsRequestTypedDict,
+ ListPresetVersionsResponse,
+ ListPresetVersionsResponseTypedDict,
+ )
from .listproviders import (
Datacenter,
Headquarters,
@@ -348,16 +534,55 @@ if TYPE_CHECKING:
ListVideosModelsRequest,
ListVideosModelsRequestTypedDict,
)
+ from .listworkspaces import (
+ ListWorkspacesGlobals,
+ ListWorkspacesGlobalsTypedDict,
+ ListWorkspacesRequest,
+ ListWorkspacesRequestTypedDict,
+ ListWorkspacesResponse,
+ ListWorkspacesResponseTypedDict,
+ )
+ from .queryanalytics import (
+ Direction,
+ Filter,
+ FilterTypedDict,
+ Metadata,
+ MetadataTypedDict,
+ OrderBy,
+ OrderByTypedDict,
+ QueryAnalyticsData1,
+ QueryAnalyticsData1TypedDict,
+ QueryAnalyticsData2,
+ QueryAnalyticsData2TypedDict,
+ QueryAnalyticsGlobals,
+ QueryAnalyticsGlobalsTypedDict,
+ QueryAnalyticsRequest,
+ QueryAnalyticsRequestBody,
+ QueryAnalyticsRequestBodyTypedDict,
+ QueryAnalyticsRequestTypedDict,
+ QueryAnalyticsResponse,
+ QueryAnalyticsResponseTypedDict,
+ TimeRange,
+ TimeRangeTypedDict,
+ Value1,
+ Value1TypedDict,
+ Value2,
+ Value2TypedDict,
+ )
from .sendchatcompletionrequest import (
SendChatCompletionRequestGlobals,
SendChatCompletionRequestGlobalsTypedDict,
SendChatCompletionRequestRequest,
SendChatCompletionRequestRequestTypedDict,
SendChatCompletionRequestResponse,
- SendChatCompletionRequestResponseBody,
- SendChatCompletionRequestResponseBodyTypedDict,
SendChatCompletionRequestResponseTypedDict,
)
+ from .updatebyokkey import (
+ UpdateBYOKKeyGlobals,
+ UpdateBYOKKeyGlobalsTypedDict,
+ UpdateBYOKKeyRequest,
+ UpdateBYOKKeyRequestTypedDict,
+ )
from .updateguardrail import (
UpdateGuardrailGlobals,
UpdateGuardrailGlobalsTypedDict,
@@ -377,9 +602,24 @@ if TYPE_CHECKING:
UpdateKeysResponse,
UpdateKeysResponseTypedDict,
)
+ from .updateobservabilitydestination import (
+ UpdateObservabilityDestinationGlobals,
+ UpdateObservabilityDestinationGlobalsTypedDict,
+ UpdateObservabilityDestinationRequest,
+ UpdateObservabilityDestinationRequestTypedDict,
+ )
+ from .updateworkspace import (
+ UpdateWorkspaceGlobals,
+ UpdateWorkspaceGlobalsTypedDict,
+ UpdateWorkspaceRequest,
+ UpdateWorkspaceRequestTypedDict,
+ )
__all__ = [
- "APIType",
+ "BulkAddWorkspaceMembersGlobals",
+ "BulkAddWorkspaceMembersGlobalsTypedDict",
+ "BulkAddWorkspaceMembersRequest",
+ "BulkAddWorkspaceMembersRequestTypedDict",
"BulkAssignKeysToGuardrailGlobals",
"BulkAssignKeysToGuardrailGlobalsTypedDict",
"BulkAssignKeysToGuardrailRequest",
@@ -388,6 +628,10 @@ __all__ = [
"BulkAssignMembersToGuardrailGlobalsTypedDict",
"BulkAssignMembersToGuardrailRequest",
"BulkAssignMembersToGuardrailRequestTypedDict",
+ "BulkRemoveWorkspaceMembersGlobals",
+ "BulkRemoveWorkspaceMembersGlobalsTypedDict",
+ "BulkRemoveWorkspaceMembersRequest",
+ "BulkRemoveWorkspaceMembersRequestTypedDict",
"BulkUnassignKeysFromGuardrailGlobals",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict",
"BulkUnassignKeysFromGuardrailRequest",
@@ -396,13 +640,20 @@ __all__ = [
"BulkUnassignMembersFromGuardrailGlobalsTypedDict",
"BulkUnassignMembersFromGuardrailRequest",
"BulkUnassignMembersFromGuardrailRequestTypedDict",
- "Category",
"Content",
"ContentImageURL",
"ContentImageURLTypedDict",
"ContentText",
"ContentTextTypedDict",
"ContentTypedDict",
+ "CreateAudioSpeechGlobals",
+ "CreateAudioSpeechGlobalsTypedDict",
+ "CreateAudioSpeechRequest",
+ "CreateAudioSpeechRequestTypedDict",
+ "CreateAudioTranscriptionsGlobals",
+ "CreateAudioTranscriptionsGlobalsTypedDict",
+ "CreateAudioTranscriptionsRequest",
+ "CreateAudioTranscriptionsRequestTypedDict",
"CreateAuthKeysCodeCodeChallengeMethod",
"CreateAuthKeysCodeData",
"CreateAuthKeysCodeDataTypedDict",
@@ -414,6 +665,10 @@ __all__ = [
"CreateAuthKeysCodeRequestTypedDict",
"CreateAuthKeysCodeResponse",
"CreateAuthKeysCodeResponseTypedDict",
+ "CreateBYOKKeyGlobals",
+ "CreateBYOKKeyGlobalsTypedDict",
+ "CreateBYOKKeyRequest",
+ "CreateBYOKKeyRequestTypedDict",
"CreateEmbeddingsData",
"CreateEmbeddingsDataTypedDict",
"CreateEmbeddingsGlobals",
@@ -443,6 +698,22 @@ __all__ = [
"CreateKeysRequestTypedDict",
"CreateKeysResponse",
"CreateKeysResponseTypedDict",
+ "CreateObservabilityDestinationGlobals",
+ "CreateObservabilityDestinationGlobalsTypedDict",
+ "CreateObservabilityDestinationRequest",
+ "CreateObservabilityDestinationRequestTypedDict",
+ "CreatePresetsChatCompletionsGlobals",
+ "CreatePresetsChatCompletionsGlobalsTypedDict",
+ "CreatePresetsChatCompletionsRequest",
+ "CreatePresetsChatCompletionsRequestTypedDict",
+ "CreatePresetsMessagesGlobals",
+ "CreatePresetsMessagesGlobalsTypedDict",
+ "CreatePresetsMessagesRequest",
+ "CreatePresetsMessagesRequestTypedDict",
+ "CreatePresetsResponsesGlobals",
+ "CreatePresetsResponsesGlobalsTypedDict",
+ "CreatePresetsResponsesRequest",
+ "CreatePresetsResponsesRequestTypedDict",
"CreateRerankGlobals",
"CreateRerankGlobalsTypedDict",
"CreateRerankRequest",
@@ -460,14 +731,20 @@ __all__ = [
"CreateResponsesRequest",
"CreateResponsesRequestTypedDict",
"CreateResponsesResponse",
- "CreateResponsesResponseBody",
- "CreateResponsesResponseBodyTypedDict",
"CreateResponsesResponseTypedDict",
"CreateVideosGlobals",
"CreateVideosGlobalsTypedDict",
"CreateVideosRequest",
"CreateVideosRequestTypedDict",
+ "CreateWorkspaceGlobals",
+ "CreateWorkspaceGlobalsTypedDict",
+ "CreateWorkspaceRequest",
+ "CreateWorkspaceRequestTypedDict",
"Datacenter",
+ "DeleteBYOKKeyGlobals",
+ "DeleteBYOKKeyGlobalsTypedDict",
+ "DeleteBYOKKeyRequest",
+ "DeleteBYOKKeyRequestTypedDict",
"DeleteGuardrailGlobals",
"DeleteGuardrailGlobalsTypedDict",
"DeleteGuardrailRequest",
@@ -478,7 +755,23 @@ __all__ = [
"DeleteKeysRequestTypedDict",
"DeleteKeysResponse",
"DeleteKeysResponseTypedDict",
+ "DeleteObservabilityDestinationGlobals",
+ "DeleteObservabilityDestinationGlobalsTypedDict",
+ "DeleteObservabilityDestinationRequest",
+ "DeleteObservabilityDestinationRequestTypedDict",
+ "DeleteWorkspaceGlobals",
+ "DeleteWorkspaceGlobalsTypedDict",
+ "DeleteWorkspaceRequest",
+ "DeleteWorkspaceRequestTypedDict",
+ "Dimension",
+ "DimensionTypedDict",
+ "Direction",
+ "DisplayFormat",
"Document",
+ "DocumentRequest",
+ "DocumentRequestTypedDict",
+ "DocumentResponse",
+ "DocumentResponseTypedDict",
"DocumentTypedDict",
"Embedding",
"EmbeddingTypedDict",
@@ -492,6 +785,28 @@ __all__ = [
"ExchangeAuthCodeForAPIKeyRequestTypedDict",
"ExchangeAuthCodeForAPIKeyResponse",
"ExchangeAuthCodeForAPIKeyResponseTypedDict",
+ "Filter",
+ "FilterTypedDict",
+ "GetAnalyticsMetaData",
+ "GetAnalyticsMetaDataTypedDict",
+ "GetAnalyticsMetaGlobals",
+ "GetAnalyticsMetaGlobalsTypedDict",
+ "GetAnalyticsMetaRequest",
+ "GetAnalyticsMetaRequestTypedDict",
+ "GetAnalyticsMetaResponse",
+ "GetAnalyticsMetaResponseTypedDict",
+ "GetAppRankingsCategory",
+ "GetAppRankingsGlobals",
+ "GetAppRankingsGlobalsTypedDict",
+ "GetAppRankingsRequest",
+ "GetAppRankingsRequestTypedDict",
+ "GetAppRankingsResponse",
+ "GetAppRankingsResponseTypedDict",
+ "GetAppRankingsSort",
+ "GetBYOKKeyGlobals",
+ "GetBYOKKeyGlobalsTypedDict",
+ "GetBYOKKeyRequest",
+ "GetBYOKKeyRequestTypedDict",
"GetCreditsData",
"GetCreditsDataTypedDict",
"GetCreditsGlobals",
@@ -508,14 +823,10 @@ __all__ = [
"GetCurrentKeyRequestTypedDict",
"GetCurrentKeyResponse",
"GetCurrentKeyResponseTypedDict",
- "GetGenerationData",
- "GetGenerationDataTypedDict",
"GetGenerationGlobals",
"GetGenerationGlobalsTypedDict",
"GetGenerationRequest",
"GetGenerationRequestTypedDict",
- "GetGenerationResponse",
- "GetGenerationResponseTypedDict",
"GetGuardrailGlobals",
"GetGuardrailGlobalsTypedDict",
"GetGuardrailRequest",
@@ -528,10 +839,28 @@ __all__ = [
"GetKeyRequestTypedDict",
"GetKeyResponse",
"GetKeyResponseTypedDict",
+ "GetModelsCategory",
"GetModelsGlobals",
"GetModelsGlobalsTypedDict",
"GetModelsRequest",
"GetModelsRequestTypedDict",
+ "GetModelsSort",
+ "GetObservabilityDestinationGlobals",
+ "GetObservabilityDestinationGlobalsTypedDict",
+ "GetObservabilityDestinationRequest",
+ "GetObservabilityDestinationRequestTypedDict",
+ "GetPresetGlobals",
+ "GetPresetGlobalsTypedDict",
+ "GetPresetRequest",
+ "GetPresetRequestTypedDict",
+ "GetPresetVersionGlobals",
+ "GetPresetVersionGlobalsTypedDict",
+ "GetPresetVersionRequest",
+ "GetPresetVersionRequestTypedDict",
+ "GetRankingsDailyGlobals",
+ "GetRankingsDailyGlobalsTypedDict",
+ "GetRankingsDailyRequest",
+ "GetRankingsDailyRequestTypedDict",
"GetUserActivityGlobals",
"GetUserActivityGlobalsTypedDict",
"GetUserActivityRequest",
@@ -540,6 +869,13 @@ __all__ = [
"GetVideosGlobalsTypedDict",
"GetVideosRequest",
"GetVideosRequestTypedDict",
+ "GetWorkspaceGlobals",
+ "GetWorkspaceGlobalsTypedDict",
+ "GetWorkspaceRequest",
+ "GetWorkspaceRequestTypedDict",
+ "Granularity",
+ "GranularityName",
+ "GranularityTypedDict",
"Headquarters",
"ImageURL",
"ImageURLTypedDict",
@@ -547,6 +883,12 @@ __all__ = [
"InputTypedDict",
"InputUnion",
"InputUnionTypedDict",
+ "ListBYOKKeysGlobals",
+ "ListBYOKKeysGlobalsTypedDict",
+ "ListBYOKKeysRequest",
+ "ListBYOKKeysRequestTypedDict",
+ "ListBYOKKeysResponse",
+ "ListBYOKKeysResponseTypedDict",
"ListData",
"ListDataTypedDict",
"ListEmbeddingsModelsGlobals",
@@ -565,6 +907,10 @@ __all__ = [
"ListEndpointsZdrRequestTypedDict",
"ListEndpointsZdrResponse",
"ListEndpointsZdrResponseTypedDict",
+ "ListGenerationContentGlobals",
+ "ListGenerationContentGlobalsTypedDict",
+ "ListGenerationContentRequest",
+ "ListGenerationContentRequestTypedDict",
"ListGlobals",
"ListGlobalsTypedDict",
"ListGuardrailKeyAssignmentsGlobals",
@@ -607,6 +953,12 @@ __all__ = [
"ListModelsUserRequestTypedDict",
"ListModelsUserSecurity",
"ListModelsUserSecurityTypedDict",
+ "ListObservabilityDestinationsGlobals",
+ "ListObservabilityDestinationsGlobalsTypedDict",
+ "ListObservabilityDestinationsRequest",
+ "ListObservabilityDestinationsRequestTypedDict",
+ "ListObservabilityDestinationsResponse",
+ "ListObservabilityDestinationsResponseTypedDict",
"ListOrganizationMembersData",
"ListOrganizationMembersDataTypedDict",
"ListOrganizationMembersGlobals",
@@ -617,6 +969,18 @@ __all__ = [
"ListOrganizationMembersResponseBody",
"ListOrganizationMembersResponseBodyTypedDict",
"ListOrganizationMembersResponseTypedDict",
+ "ListPresetVersionsGlobals",
+ "ListPresetVersionsGlobalsTypedDict",
+ "ListPresetVersionsRequest",
+ "ListPresetVersionsRequestTypedDict",
+ "ListPresetVersionsResponse",
+ "ListPresetVersionsResponseTypedDict",
+ "ListPresetsGlobals",
+ "ListPresetsGlobalsTypedDict",
+ "ListPresetsRequest",
+ "ListPresetsRequestTypedDict",
+ "ListPresetsResponse",
+ "ListPresetsResponseTypedDict",
"ListProvidersData",
"ListProvidersDataTypedDict",
"ListProvidersGlobals",
@@ -637,8 +1001,38 @@ __all__ = [
"ListVideosModelsGlobalsTypedDict",
"ListVideosModelsRequest",
"ListVideosModelsRequestTypedDict",
+ "ListWorkspacesGlobals",
+ "ListWorkspacesGlobalsTypedDict",
+ "ListWorkspacesRequest",
+ "ListWorkspacesRequestTypedDict",
+ "ListWorkspacesResponse",
+ "ListWorkspacesResponseTypedDict",
+ "Metadata",
+ "MetadataTypedDict",
+ "Metric",
+ "MetricTypedDict",
"Object",
"ObjectEmbedding",
+ "Operator",
+ "OperatorName",
+ "OperatorTypedDict",
+ "OrderBy",
+ "OrderByTypedDict",
+ "PromptTokensDetails",
+ "PromptTokensDetailsTypedDict",
+ "Provider",
+ "QueryAnalyticsData1",
+ "QueryAnalyticsData1TypedDict",
+ "QueryAnalyticsData2",
+ "QueryAnalyticsData2TypedDict",
+ "QueryAnalyticsGlobals",
+ "QueryAnalyticsGlobalsTypedDict",
+ "QueryAnalyticsRequest",
+ "QueryAnalyticsRequestBody",
+ "QueryAnalyticsRequestBodyTypedDict",
+ "QueryAnalyticsRequestTypedDict",
+ "QueryAnalyticsResponse",
+ "QueryAnalyticsResponseTypedDict",
"RateLimit",
"RateLimitTypedDict",
"Result",
@@ -649,11 +1043,16 @@ __all__ = [
"SendChatCompletionRequestRequest",
"SendChatCompletionRequestRequestTypedDict",
"SendChatCompletionRequestResponse",
- "SendChatCompletionRequestResponseBody",
- "SendChatCompletionRequestResponseBodyTypedDict",
"SendChatCompletionRequestResponseTypedDict",
+ "Subcategory",
+ "TimeRange",
+ "TimeRangeTypedDict",
"TypeImageURL",
"TypeText",
+ "UpdateBYOKKeyGlobals",
+ "UpdateBYOKKeyGlobalsTypedDict",
+ "UpdateBYOKKeyRequest",
+ "UpdateBYOKKeyRequestTypedDict",
"UpdateGuardrailGlobals",
"UpdateGuardrailGlobalsTypedDict",
"UpdateGuardrailRequest",
@@ -669,10 +1068,27 @@ __all__ = [
"UpdateKeysRequestTypedDict",
"UpdateKeysResponse",
"UpdateKeysResponseTypedDict",
+ "UpdateObservabilityDestinationGlobals",
+ "UpdateObservabilityDestinationGlobalsTypedDict",
+ "UpdateObservabilityDestinationRequest",
+ "UpdateObservabilityDestinationRequestTypedDict",
+ "UpdateWorkspaceGlobals",
+ "UpdateWorkspaceGlobalsTypedDict",
+ "UpdateWorkspaceRequest",
+ "UpdateWorkspaceRequestTypedDict",
"UsageLimitType",
+ "Value1",
+ "Value1TypedDict",
+ "Value2",
+ "Value2TypedDict",
+ "ValueType",
]
_dynamic_imports: dict[str, str] = {
+ "BulkAddWorkspaceMembersGlobals": ".bulkaddworkspacemembers",
+ "BulkAddWorkspaceMembersGlobalsTypedDict": ".bulkaddworkspacemembers",
+ "BulkAddWorkspaceMembersRequest": ".bulkaddworkspacemembers",
+ "BulkAddWorkspaceMembersRequestTypedDict": ".bulkaddworkspacemembers",
"BulkAssignKeysToGuardrailGlobals": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailGlobalsTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequest": ".bulkassignkeystoguardrail",
@@ -681,6 +1097,10 @@ _dynamic_imports: dict[str, str] = {
"BulkAssignMembersToGuardrailGlobalsTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequest": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequestTypedDict": ".bulkassignmemberstoguardrail",
+ "BulkRemoveWorkspaceMembersGlobals": ".bulkremoveworkspacemembers",
+ "BulkRemoveWorkspaceMembersGlobalsTypedDict": ".bulkremoveworkspacemembers",
+ "BulkRemoveWorkspaceMembersRequest": ".bulkremoveworkspacemembers",
+ "BulkRemoveWorkspaceMembersRequestTypedDict": ".bulkremoveworkspacemembers",
"BulkUnassignKeysFromGuardrailGlobals": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequest": ".bulkunassignkeysfromguardrail",
@@ -689,6 +1109,14 @@ _dynamic_imports: dict[str, str] = {
"BulkUnassignMembersFromGuardrailGlobalsTypedDict": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequest": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequestTypedDict": ".bulkunassignmembersfromguardrail",
+ "CreateAudioSpeechGlobals": ".createaudiospeech",
+ "CreateAudioSpeechGlobalsTypedDict": ".createaudiospeech",
+ "CreateAudioSpeechRequest": ".createaudiospeech",
+ "CreateAudioSpeechRequestTypedDict": ".createaudiospeech",
+ "CreateAudioTranscriptionsGlobals": ".createaudiotranscriptions",
+ "CreateAudioTranscriptionsGlobalsTypedDict": ".createaudiotranscriptions",
+ "CreateAudioTranscriptionsRequest": ".createaudiotranscriptions",
+ "CreateAudioTranscriptionsRequestTypedDict": ".createaudiotranscriptions",
"CreateAuthKeysCodeCodeChallengeMethod": ".createauthkeyscode",
"CreateAuthKeysCodeData": ".createauthkeyscode",
"CreateAuthKeysCodeDataTypedDict": ".createauthkeyscode",
@@ -701,6 +1129,10 @@ _dynamic_imports: dict[str, str] = {
"CreateAuthKeysCodeResponse": ".createauthkeyscode",
"CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
"UsageLimitType": ".createauthkeyscode",
+ "CreateBYOKKeyGlobals": ".createbyokkey",
+ "CreateBYOKKeyGlobalsTypedDict": ".createbyokkey",
+ "CreateBYOKKeyRequest": ".createbyokkey",
+ "CreateBYOKKeyRequestTypedDict": ".createbyokkey",
"Content": ".createembeddings",
"ContentImageURL": ".createembeddings",
"ContentImageURLTypedDict": ".createembeddings",
@@ -732,6 +1164,8 @@ _dynamic_imports: dict[str, str] = {
"InputUnionTypedDict": ".createembeddings",
"Object": ".createembeddings",
"ObjectEmbedding": ".createembeddings",
+ "PromptTokensDetails": ".createembeddings",
+ "PromptTokensDetailsTypedDict": ".createembeddings",
"TypeImageURL": ".createembeddings",
"TypeText": ".createembeddings",
"CreateGuardrailGlobals": ".createguardrail",
@@ -749,6 +1183,22 @@ _dynamic_imports: dict[str, str] = {
"CreateKeysRequestTypedDict": ".createkeys",
"CreateKeysResponse": ".createkeys",
"CreateKeysResponseTypedDict": ".createkeys",
+ "CreateObservabilityDestinationGlobals": ".createobservabilitydestination",
+ "CreateObservabilityDestinationGlobalsTypedDict": ".createobservabilitydestination",
+ "CreateObservabilityDestinationRequest": ".createobservabilitydestination",
+ "CreateObservabilityDestinationRequestTypedDict": ".createobservabilitydestination",
+ "CreatePresetsChatCompletionsGlobals": ".createpresetschatcompletions",
+ "CreatePresetsChatCompletionsGlobalsTypedDict": ".createpresetschatcompletions",
+ "CreatePresetsChatCompletionsRequest": ".createpresetschatcompletions",
+ "CreatePresetsChatCompletionsRequestTypedDict": ".createpresetschatcompletions",
+ "CreatePresetsMessagesGlobals": ".createpresetsmessages",
+ "CreatePresetsMessagesGlobalsTypedDict": ".createpresetsmessages",
+ "CreatePresetsMessagesRequest": ".createpresetsmessages",
+ "CreatePresetsMessagesRequestTypedDict": ".createpresetsmessages",
+ "CreatePresetsResponsesGlobals": ".createpresetsresponses",
+ "CreatePresetsResponsesGlobalsTypedDict": ".createpresetsresponses",
+ "CreatePresetsResponsesRequest": ".createpresetsresponses",
+ "CreatePresetsResponsesRequestTypedDict": ".createpresetsresponses",
"CreateRerankGlobals": ".creatererank",
"CreateRerankGlobalsTypedDict": ".creatererank",
"CreateRerankRequest": ".creatererank",
@@ -762,6 +1212,10 @@ _dynamic_imports: dict[str, str] = {
"CreateRerankUsage": ".creatererank",
"CreateRerankUsageTypedDict": ".creatererank",
"Document": ".creatererank",
+ "DocumentRequest": ".creatererank",
+ "DocumentRequestTypedDict": ".creatererank",
+ "DocumentResponse": ".creatererank",
+ "DocumentResponseTypedDict": ".creatererank",
"DocumentTypedDict": ".creatererank",
"Result": ".creatererank",
"ResultTypedDict": ".creatererank",
@@ -770,13 +1224,19 @@ _dynamic_imports: dict[str, str] = {
"CreateResponsesRequest": ".createresponses",
"CreateResponsesRequestTypedDict": ".createresponses",
"CreateResponsesResponse": ".createresponses",
- "CreateResponsesResponseBody": ".createresponses",
- "CreateResponsesResponseBodyTypedDict": ".createresponses",
"CreateResponsesResponseTypedDict": ".createresponses",
"CreateVideosGlobals": ".createvideos",
"CreateVideosGlobalsTypedDict": ".createvideos",
"CreateVideosRequest": ".createvideos",
"CreateVideosRequestTypedDict": ".createvideos",
+ "CreateWorkspaceGlobals": ".createworkspace",
+ "CreateWorkspaceGlobalsTypedDict": ".createworkspace",
+ "CreateWorkspaceRequest": ".createworkspace",
+ "CreateWorkspaceRequestTypedDict": ".createworkspace",
+ "DeleteBYOKKeyGlobals": ".deletebyokkey",
+ "DeleteBYOKKeyGlobalsTypedDict": ".deletebyokkey",
+ "DeleteBYOKKeyRequest": ".deletebyokkey",
+ "DeleteBYOKKeyRequestTypedDict": ".deletebyokkey",
"DeleteGuardrailGlobals": ".deleteguardrail",
"DeleteGuardrailGlobalsTypedDict": ".deleteguardrail",
"DeleteGuardrailRequest": ".deleteguardrail",
@@ -787,6 +1247,14 @@ _dynamic_imports: dict[str, str] = {
"DeleteKeysRequestTypedDict": ".deletekeys",
"DeleteKeysResponse": ".deletekeys",
"DeleteKeysResponseTypedDict": ".deletekeys",
+ "DeleteObservabilityDestinationGlobals": ".deleteobservabilitydestination",
+ "DeleteObservabilityDestinationGlobalsTypedDict": ".deleteobservabilitydestination",
+ "DeleteObservabilityDestinationRequest": ".deleteobservabilitydestination",
+ "DeleteObservabilityDestinationRequestTypedDict": ".deleteobservabilitydestination",
+ "DeleteWorkspaceGlobals": ".deleteworkspace",
+ "DeleteWorkspaceGlobalsTypedDict": ".deleteworkspace",
+ "DeleteWorkspaceRequest": ".deleteworkspace",
+ "DeleteWorkspaceRequestTypedDict": ".deleteworkspace",
"ExchangeAuthCodeForAPIKeyCodeChallengeMethod": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyGlobals": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyGlobalsTypedDict": ".exchangeauthcodeforapikey",
@@ -796,6 +1264,39 @@ _dynamic_imports: dict[str, str] = {
"ExchangeAuthCodeForAPIKeyRequestTypedDict": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyResponse": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyResponseTypedDict": ".exchangeauthcodeforapikey",
+ "Dimension": ".getanalyticsmeta",
+ "DimensionTypedDict": ".getanalyticsmeta",
+ "DisplayFormat": ".getanalyticsmeta",
+ "GetAnalyticsMetaData": ".getanalyticsmeta",
+ "GetAnalyticsMetaDataTypedDict": ".getanalyticsmeta",
+ "GetAnalyticsMetaGlobals": ".getanalyticsmeta",
+ "GetAnalyticsMetaGlobalsTypedDict": ".getanalyticsmeta",
+ "GetAnalyticsMetaRequest": ".getanalyticsmeta",
+ "GetAnalyticsMetaRequestTypedDict": ".getanalyticsmeta",
+ "GetAnalyticsMetaResponse": ".getanalyticsmeta",
+ "GetAnalyticsMetaResponseTypedDict": ".getanalyticsmeta",
+ "Granularity": ".getanalyticsmeta",
+ "GranularityName": ".getanalyticsmeta",
+ "GranularityTypedDict": ".getanalyticsmeta",
+ "Metric": ".getanalyticsmeta",
+ "MetricTypedDict": ".getanalyticsmeta",
+ "Operator": ".getanalyticsmeta",
+ "OperatorName": ".getanalyticsmeta",
+ "OperatorTypedDict": ".getanalyticsmeta",
+ "ValueType": ".getanalyticsmeta",
+ "GetAppRankingsCategory": ".getapprankings",
+ "GetAppRankingsGlobals": ".getapprankings",
+ "GetAppRankingsGlobalsTypedDict": ".getapprankings",
+ "GetAppRankingsRequest": ".getapprankings",
+ "GetAppRankingsRequestTypedDict": ".getapprankings",
+ "GetAppRankingsResponse": ".getapprankings",
+ "GetAppRankingsResponseTypedDict": ".getapprankings",
+ "GetAppRankingsSort": ".getapprankings",
+ "Subcategory": ".getapprankings",
+ "GetBYOKKeyGlobals": ".getbyokkey",
+ "GetBYOKKeyGlobalsTypedDict": ".getbyokkey",
+ "GetBYOKKeyRequest": ".getbyokkey",
+ "GetBYOKKeyRequestTypedDict": ".getbyokkey",
"GetCreditsData": ".getcredits",
"GetCreditsDataTypedDict": ".getcredits",
"GetCreditsGlobals": ".getcredits",
@@ -814,15 +1315,10 @@ _dynamic_imports: dict[str, str] = {
"GetCurrentKeyResponseTypedDict": ".getcurrentkey",
"RateLimit": ".getcurrentkey",
"RateLimitTypedDict": ".getcurrentkey",
- "APIType": ".getgeneration",
- "GetGenerationData": ".getgeneration",
- "GetGenerationDataTypedDict": ".getgeneration",
"GetGenerationGlobals": ".getgeneration",
"GetGenerationGlobalsTypedDict": ".getgeneration",
"GetGenerationRequest": ".getgeneration",
"GetGenerationRequestTypedDict": ".getgeneration",
- "GetGenerationResponse": ".getgeneration",
- "GetGenerationResponseTypedDict": ".getgeneration",
"GetGuardrailGlobals": ".getguardrail",
"GetGuardrailGlobalsTypedDict": ".getguardrail",
"GetGuardrailRequest": ".getguardrail",
@@ -835,11 +1331,28 @@ _dynamic_imports: dict[str, str] = {
"GetKeyRequestTypedDict": ".getkey",
"GetKeyResponse": ".getkey",
"GetKeyResponseTypedDict": ".getkey",
- "Category": ".getmodels",
+ "GetModelsCategory": ".getmodels",
"GetModelsGlobals": ".getmodels",
"GetModelsGlobalsTypedDict": ".getmodels",
"GetModelsRequest": ".getmodels",
"GetModelsRequestTypedDict": ".getmodels",
+ "GetModelsSort": ".getmodels",
+ "GetObservabilityDestinationGlobals": ".getobservabilitydestination",
+ "GetObservabilityDestinationGlobalsTypedDict": ".getobservabilitydestination",
+ "GetObservabilityDestinationRequest": ".getobservabilitydestination",
+ "GetObservabilityDestinationRequestTypedDict": ".getobservabilitydestination",
+ "GetPresetGlobals": ".getpreset",
+ "GetPresetGlobalsTypedDict": ".getpreset",
+ "GetPresetRequest": ".getpreset",
+ "GetPresetRequestTypedDict": ".getpreset",
+ "GetPresetVersionGlobals": ".getpresetversion",
+ "GetPresetVersionGlobalsTypedDict": ".getpresetversion",
+ "GetPresetVersionRequest": ".getpresetversion",
+ "GetPresetVersionRequestTypedDict": ".getpresetversion",
+ "GetRankingsDailyGlobals": ".getrankingsdaily",
+ "GetRankingsDailyGlobalsTypedDict": ".getrankingsdaily",
+ "GetRankingsDailyRequest": ".getrankingsdaily",
+ "GetRankingsDailyRequestTypedDict": ".getrankingsdaily",
"GetUserActivityGlobals": ".getuseractivity",
"GetUserActivityGlobalsTypedDict": ".getuseractivity",
"GetUserActivityRequest": ".getuseractivity",
@@ -848,6 +1361,10 @@ _dynamic_imports: dict[str, str] = {
"GetVideosGlobalsTypedDict": ".getvideos",
"GetVideosRequest": ".getvideos",
"GetVideosRequestTypedDict": ".getvideos",
+ "GetWorkspaceGlobals": ".getworkspace",
+ "GetWorkspaceGlobalsTypedDict": ".getworkspace",
+ "GetWorkspaceRequest": ".getworkspace",
+ "GetWorkspaceRequestTypedDict": ".getworkspace",
"ListData": ".list",
"ListDataTypedDict": ".list",
"ListGlobals": ".list",
@@ -856,6 +1373,13 @@ _dynamic_imports: dict[str, str] = {
"ListRequestTypedDict": ".list",
"ListResponse": ".list",
"ListResponseTypedDict": ".list",
+ "ListBYOKKeysGlobals": ".listbyokkeys",
+ "ListBYOKKeysGlobalsTypedDict": ".listbyokkeys",
+ "ListBYOKKeysRequest": ".listbyokkeys",
+ "ListBYOKKeysRequestTypedDict": ".listbyokkeys",
+ "ListBYOKKeysResponse": ".listbyokkeys",
+ "ListBYOKKeysResponseTypedDict": ".listbyokkeys",
+ "Provider": ".listbyokkeys",
"ListEmbeddingsModelsGlobals": ".listembeddingsmodels",
"ListEmbeddingsModelsGlobalsTypedDict": ".listembeddingsmodels",
"ListEmbeddingsModelsRequest": ".listembeddingsmodels",
@@ -872,6 +1396,10 @@ _dynamic_imports: dict[str, str] = {
"ListEndpointsZdrRequestTypedDict": ".listendpointszdr",
"ListEndpointsZdrResponse": ".listendpointszdr",
"ListEndpointsZdrResponseTypedDict": ".listendpointszdr",
+ "ListGenerationContentGlobals": ".listgenerationcontent",
+ "ListGenerationContentGlobalsTypedDict": ".listgenerationcontent",
+ "ListGenerationContentRequest": ".listgenerationcontent",
+ "ListGenerationContentRequestTypedDict": ".listgenerationcontent",
"ListGuardrailKeyAssignmentsGlobals": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsGlobalsTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsRequest": ".listguardrailkeyassignments",
@@ -912,6 +1440,12 @@ _dynamic_imports: dict[str, str] = {
"ListModelsUserRequestTypedDict": ".listmodelsuser",
"ListModelsUserSecurity": ".listmodelsuser",
"ListModelsUserSecurityTypedDict": ".listmodelsuser",
+ "ListObservabilityDestinationsGlobals": ".listobservabilitydestinations",
+ "ListObservabilityDestinationsGlobalsTypedDict": ".listobservabilitydestinations",
+ "ListObservabilityDestinationsRequest": ".listobservabilitydestinations",
+ "ListObservabilityDestinationsRequestTypedDict": ".listobservabilitydestinations",
+ "ListObservabilityDestinationsResponse": ".listobservabilitydestinations",
+ "ListObservabilityDestinationsResponseTypedDict": ".listobservabilitydestinations",
"ListOrganizationMembersData": ".listorganizationmembers",
"ListOrganizationMembersDataTypedDict": ".listorganizationmembers",
"ListOrganizationMembersGlobals": ".listorganizationmembers",
@@ -923,6 +1457,18 @@ _dynamic_imports: dict[str, str] = {
"ListOrganizationMembersResponseBodyTypedDict": ".listorganizationmembers",
"ListOrganizationMembersResponseTypedDict": ".listorganizationmembers",
"Role": ".listorganizationmembers",
+ "ListPresetsGlobals": ".listpresets",
+ "ListPresetsGlobalsTypedDict": ".listpresets",
+ "ListPresetsRequest": ".listpresets",
+ "ListPresetsRequestTypedDict": ".listpresets",
+ "ListPresetsResponse": ".listpresets",
+ "ListPresetsResponseTypedDict": ".listpresets",
+ "ListPresetVersionsGlobals": ".listpresetversions",
+ "ListPresetVersionsGlobalsTypedDict": ".listpresetversions",
+ "ListPresetVersionsRequest": ".listpresetversions",
+ "ListPresetVersionsRequestTypedDict": ".listpresetversions",
+ "ListPresetVersionsResponse": ".listpresetversions",
+ "ListPresetVersionsResponseTypedDict": ".listpresetversions",
"Datacenter": ".listproviders",
"Headquarters": ".listproviders",
"ListProvidersData": ".listproviders",
@@ -941,14 +1487,47 @@ _dynamic_imports: dict[str, str] = {
"ListVideosModelsGlobalsTypedDict": ".listvideosmodels",
"ListVideosModelsRequest": ".listvideosmodels",
"ListVideosModelsRequestTypedDict": ".listvideosmodels",
+ "ListWorkspacesGlobals": ".listworkspaces",
+ "ListWorkspacesGlobalsTypedDict": ".listworkspaces",
+ "ListWorkspacesRequest": ".listworkspaces",
+ "ListWorkspacesRequestTypedDict": ".listworkspaces",
+ "ListWorkspacesResponse": ".listworkspaces",
+ "ListWorkspacesResponseTypedDict": ".listworkspaces",
+ "Direction": ".queryanalytics",
+ "Filter": ".queryanalytics",
+ "FilterTypedDict": ".queryanalytics",
+ "Metadata": ".queryanalytics",
+ "MetadataTypedDict": ".queryanalytics",
+ "OrderBy": ".queryanalytics",
+ "OrderByTypedDict": ".queryanalytics",
+ "QueryAnalyticsData1": ".queryanalytics",
+ "QueryAnalyticsData1TypedDict": ".queryanalytics",
+ "QueryAnalyticsData2": ".queryanalytics",
+ "QueryAnalyticsData2TypedDict": ".queryanalytics",
+ "QueryAnalyticsGlobals": ".queryanalytics",
+ "QueryAnalyticsGlobalsTypedDict": ".queryanalytics",
+ "QueryAnalyticsRequest": ".queryanalytics",
+ "QueryAnalyticsRequestBody": ".queryanalytics",
+ "QueryAnalyticsRequestBodyTypedDict": ".queryanalytics",
+ "QueryAnalyticsRequestTypedDict": ".queryanalytics",
+ "QueryAnalyticsResponse": ".queryanalytics",
+ "QueryAnalyticsResponseTypedDict": ".queryanalytics",
+ "TimeRange": ".queryanalytics",
+ "TimeRangeTypedDict": ".queryanalytics",
+ "Value1": ".queryanalytics",
+ "Value1TypedDict": ".queryanalytics",
+ "Value2": ".queryanalytics",
+ "Value2TypedDict": ".queryanalytics",
"SendChatCompletionRequestGlobals": ".sendchatcompletionrequest",
"SendChatCompletionRequestGlobalsTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequest": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequestTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponse": ".sendchatcompletionrequest",
- "SendChatCompletionRequestResponseBody": ".sendchatcompletionrequest",
- "SendChatCompletionRequestResponseBodyTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest",
+ "UpdateBYOKKeyGlobals": ".updatebyokkey",
+ "UpdateBYOKKeyGlobalsTypedDict": ".updatebyokkey",
+ "UpdateBYOKKeyRequest": ".updatebyokkey",
+ "UpdateBYOKKeyRequestTypedDict": ".updatebyokkey",
"UpdateGuardrailGlobals": ".updateguardrail",
"UpdateGuardrailGlobalsTypedDict": ".updateguardrail",
"UpdateGuardrailRequest": ".updateguardrail",
@@ -964,6 +1543,14 @@ _dynamic_imports: dict[str, str] = {
"UpdateKeysRequestTypedDict": ".updatekeys",
"UpdateKeysResponse": ".updatekeys",
"UpdateKeysResponseTypedDict": ".updatekeys",
+ "UpdateObservabilityDestinationGlobals": ".updateobservabilitydestination",
+ "UpdateObservabilityDestinationGlobalsTypedDict": ".updateobservabilitydestination",
+ "UpdateObservabilityDestinationRequest": ".updateobservabilitydestination",
+ "UpdateObservabilityDestinationRequestTypedDict": ".updateobservabilitydestination",
+ "UpdateWorkspaceGlobals": ".updateworkspace",
+ "UpdateWorkspaceGlobalsTypedDict": ".updateworkspace",
+ "UpdateWorkspaceRequest": ".updateworkspace",
+ "UpdateWorkspaceRequestTypedDict": ".updateworkspace",
}
diff --git a/src/openrouter/operations/bulkaddworkspacemembers.py b/src/openrouter/operations/bulkaddworkspacemembers.py
new file mode 100644
index 0000000..32dcfea
--- /dev/null
+++ b/src/openrouter/operations/bulkaddworkspacemembers.py
@@ -0,0 +1,121 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ bulkaddworkspacemembersrequest as components_bulkaddworkspacemembersrequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class BulkAddWorkspaceMembersGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class BulkAddWorkspaceMembersGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class BulkAddWorkspaceMembersRequestTypedDict(TypedDict):
+ id: str
+ r"""The workspace ID (UUID) or slug"""
+ bulk_add_workspace_members_request: components_bulkaddworkspacemembersrequest.BulkAddWorkspaceMembersRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class BulkAddWorkspaceMembersRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The workspace ID (UUID) or slug"""
+
+ bulk_add_workspace_members_request: Annotated[
+ components_bulkaddworkspacemembersrequest.BulkAddWorkspaceMembersRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/bulkremoveworkspacemembers.py b/src/openrouter/operations/bulkremoveworkspacemembers.py
new file mode 100644
index 0000000..fe0ebfd
--- /dev/null
+++ b/src/openrouter/operations/bulkremoveworkspacemembers.py
@@ -0,0 +1,121 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ bulkremoveworkspacemembersrequest as components_bulkremoveworkspacemembersrequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class BulkRemoveWorkspaceMembersGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class BulkRemoveWorkspaceMembersGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class BulkRemoveWorkspaceMembersRequestTypedDict(TypedDict):
+ id: str
+ r"""The workspace ID (UUID) or slug"""
+ bulk_remove_workspace_members_request: components_bulkremoveworkspacemembersrequest.BulkRemoveWorkspaceMembersRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class BulkRemoveWorkspaceMembersRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The workspace ID (UUID) or slug"""
+
+ bulk_remove_workspace_members_request: Annotated[
+ components_bulkremoveworkspacemembersrequest.BulkRemoveWorkspaceMembersRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createaudiospeech.py b/src/openrouter/operations/createaudiospeech.py
new file mode 100644
index 0000000..dae7b28
--- /dev/null
+++ b/src/openrouter/operations/createaudiospeech.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import speechrequest as components_speechrequest
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateAudioSpeechGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateAudioSpeechGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateAudioSpeechRequestTypedDict(TypedDict):
+ speech_request: components_speechrequest.SpeechRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateAudioSpeechRequest(BaseModel):
+ speech_request: Annotated[
+ components_speechrequest.SpeechRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createaudiotranscriptions.py b/src/openrouter/operations/createaudiotranscriptions.py
new file mode 100644
index 0000000..0144114
--- /dev/null
+++ b/src/openrouter/operations/createaudiotranscriptions.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import sttrequest as components_sttrequest
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateAudioTranscriptionsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateAudioTranscriptionsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateAudioTranscriptionsRequestTypedDict(TypedDict):
+ stt_request: components_sttrequest.STTRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateAudioTranscriptionsRequest(BaseModel):
+ stt_request: Annotated[
+ components_sttrequest.STTRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createbyokkey.py b/src/openrouter/operations/createbyokkey.py
new file mode 100644
index 0000000..523d24e
--- /dev/null
+++ b/src/openrouter/operations/createbyokkey.py
@@ -0,0 +1,111 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ createbyokkeyrequest as components_createbyokkeyrequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateBYOKKeyGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateBYOKKeyGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateBYOKKeyRequestTypedDict(TypedDict):
+ create_byok_key_request: (
+ components_createbyokkeyrequest.CreateBYOKKeyRequestTypedDict
+ )
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateBYOKKeyRequest(BaseModel):
+ create_byok_key_request: Annotated[
+ components_createbyokkeyrequest.CreateBYOKKeyRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createembeddings.py b/src/openrouter/operations/createembeddings.py
index 3872d32..4cc4c5c 100644
--- a/src/openrouter/operations/createembeddings.py
+++ b/src/openrouter/operations/createembeddings.py
@@ -1,7 +1,12 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.components import providerpreferences as components_providerpreferences
+from openrouter.components import (
+ contentpartinputaudio as components_contentpartinputaudio,
+ contentpartinputfile as components_contentpartinputfile,
+ contentpartinputvideo as components_contentpartinputvideo,
+ providerpreferences as components_providerpreferences,
+)
from openrouter.types import (
BaseModel,
Nullable,
@@ -117,7 +122,14 @@ class ContentText(BaseModel):
ContentTypedDict = TypeAliasType(
- "ContentTypedDict", Union[ContentTextTypedDict, ContentImageURLTypedDict]
+ "ContentTypedDict",
+ Union[
+ ContentTextTypedDict,
+ ContentImageURLTypedDict,
+ components_contentpartinputaudio.ContentPartInputAudioTypedDict,
+ components_contentpartinputvideo.ContentPartInputVideoTypedDict,
+ components_contentpartinputfile.ContentPartInputFileTypedDict,
+ ],
)
@@ -125,6 +137,15 @@ Content = Annotated[
Union[
Annotated[ContentText, Tag("text")],
Annotated[ContentImageURL, Tag("image_url")],
+ Annotated[
+ components_contentpartinputaudio.ContentPartInputAudio, Tag("input_audio")
+ ],
+ Annotated[
+ components_contentpartinputvideo.ContentPartInputVideo, Tag("input_video")
+ ],
+ Annotated[
+ components_contentpartinputfile.ContentPartInputFile, Tag("input_file")
+ ],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
@@ -323,6 +344,40 @@ class CreateEmbeddingsData(BaseModel):
Object = Literal["list",]
+class PromptTokensDetailsTypedDict(TypedDict):
+ r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
+
+ audio_tokens: NotRequired[int]
+ r"""Number of audio tokens in the input"""
+ file_tokens: NotRequired[int]
+ r"""Number of file/document tokens in the input"""
+ image_tokens: NotRequired[int]
+ r"""Number of image tokens in the input"""
+ text_tokens: NotRequired[int]
+ r"""Number of text tokens in the input"""
+ video_tokens: NotRequired[int]
+ r"""Number of video tokens in the input"""
+
+
+class PromptTokensDetails(BaseModel):
+ r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
+
+ audio_tokens: Optional[int] = None
+ r"""Number of audio tokens in the input"""
+
+ file_tokens: Optional[int] = None
+ r"""Number of file/document tokens in the input"""
+
+ image_tokens: Optional[int] = None
+ r"""Number of image tokens in the input"""
+
+ text_tokens: Optional[int] = None
+ r"""Number of text tokens in the input"""
+
+ video_tokens: Optional[int] = None
+ r"""Number of video tokens in the input"""
+
+
class CreateEmbeddingsUsageTypedDict(TypedDict):
r"""Token usage statistics"""
@@ -332,6 +387,8 @@ class CreateEmbeddingsUsageTypedDict(TypedDict):
r"""Total number of tokens used"""
cost: NotRequired[float]
r"""Cost of the request in credits"""
+ prompt_tokens_details: NotRequired[PromptTokensDetailsTypedDict]
+ r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
class CreateEmbeddingsUsage(BaseModel):
@@ -346,6 +403,9 @@ class CreateEmbeddingsUsage(BaseModel):
cost: Optional[float] = None
r"""Cost of the request in credits"""
+ prompt_tokens_details: Optional[PromptTokensDetails] = None
+ r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
+
class CreateEmbeddingsResponseBodyTypedDict(TypedDict):
r"""Embeddings response containing embedding vectors"""
diff --git a/src/openrouter/operations/createkeys.py b/src/openrouter/operations/createkeys.py
index 5ed218d..6d18cf7 100644
--- a/src/openrouter/operations/createkeys.py
+++ b/src/openrouter/operations/createkeys.py
@@ -93,6 +93,8 @@ class CreateKeysRequestBodyTypedDict(TypedDict):
r"""Optional spending limit for the API key in USD"""
limit_reset: NotRequired[Nullable[CreateKeysLimitReset]]
r"""Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday."""
+ workspace_id: NotRequired[str]
+ r"""The workspace to create the API key in. Defaults to the default workspace if not provided."""
class CreateKeysRequestBody(BaseModel):
@@ -117,6 +119,9 @@ class CreateKeysRequestBody(BaseModel):
] = UNSET
r"""Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday."""
+ workspace_id: Optional[str] = None
+ r"""The workspace to create the API key in. Defaults to the default workspace if not provided."""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
@@ -125,6 +130,7 @@ class CreateKeysRequestBody(BaseModel):
"include_byok_in_limit",
"limit",
"limit_reset",
+ "workspace_id",
]
nullable_fields = ["creator_user_id", "expires_at", "limit", "limit_reset"]
null_default_fields = []
@@ -247,6 +253,8 @@ class CreateKeysDataTypedDict(TypedDict):
r"""OpenRouter credit usage (in USD) for the current UTC month"""
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -311,6 +319,9 @@ class CreateKeysData(BaseModel):
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
+
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
diff --git a/src/openrouter/operations/createobservabilitydestination.py b/src/openrouter/operations/createobservabilitydestination.py
new file mode 100644
index 0000000..3f22b57
--- /dev/null
+++ b/src/openrouter/operations/createobservabilitydestination.py
@@ -0,0 +1,109 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ createobservabilitydestinationrequest as components_createobservabilitydestinationrequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateObservabilityDestinationGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateObservabilityDestinationGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateObservabilityDestinationRequestTypedDict(TypedDict):
+ create_observability_destination_request: components_createobservabilitydestinationrequest.CreateObservabilityDestinationRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateObservabilityDestinationRequest(BaseModel):
+ create_observability_destination_request: Annotated[
+ components_createobservabilitydestinationrequest.CreateObservabilityDestinationRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createpresetschatcompletions.py b/src/openrouter/operations/createpresetschatcompletions.py
new file mode 100644
index 0000000..e1ae37e
--- /dev/null
+++ b/src/openrouter/operations/createpresetschatcompletions.py
@@ -0,0 +1,119 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import chatrequest as components_chatrequest
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreatePresetsChatCompletionsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsChatCompletionsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsChatCompletionsRequestTypedDict(TypedDict):
+ slug: str
+ r"""URL-safe slug identifying the preset. Created if it does not exist."""
+ chat_request: components_chatrequest.ChatRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsChatCompletionsRequest(BaseModel):
+ slug: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""URL-safe slug identifying the preset. Created if it does not exist."""
+
+ chat_request: Annotated[
+ components_chatrequest.ChatRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createpresetsmessages.py b/src/openrouter/operations/createpresetsmessages.py
new file mode 100644
index 0000000..0b7172f
--- /dev/null
+++ b/src/openrouter/operations/createpresetsmessages.py
@@ -0,0 +1,119 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import messagesrequest as components_messagesrequest
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreatePresetsMessagesGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsMessagesGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsMessagesRequestTypedDict(TypedDict):
+ slug: str
+ r"""URL-safe slug identifying the preset. Created if it does not exist."""
+ messages_request: components_messagesrequest.MessagesRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsMessagesRequest(BaseModel):
+ slug: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""URL-safe slug identifying the preset. Created if it does not exist."""
+
+ messages_request: Annotated[
+ components_messagesrequest.MessagesRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/createpresetsresponses.py b/src/openrouter/operations/createpresetsresponses.py
new file mode 100644
index 0000000..7dce093
--- /dev/null
+++ b/src/openrouter/operations/createpresetsresponses.py
@@ -0,0 +1,119 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import responsesrequest as components_responsesrequest
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreatePresetsResponsesGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsResponsesGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsResponsesRequestTypedDict(TypedDict):
+ slug: str
+ r"""URL-safe slug identifying the preset. Created if it does not exist."""
+ responses_request: components_responsesrequest.ResponsesRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreatePresetsResponsesRequest(BaseModel):
+ slug: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""URL-safe slug identifying the preset. Created if it does not exist."""
+
+ responses_request: Annotated[
+ components_responsesrequest.ResponsesRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/creatererank.py b/src/openrouter/operations/creatererank.py
index 68f500a..3e701dc 100644
--- a/src/openrouter/operations/creatererank.py
+++ b/src/openrouter/operations/creatererank.py
@@ -62,11 +62,40 @@ class CreateRerankGlobals(BaseModel):
"""
+class DocumentRequestTypedDict(TypedDict):
+ r"""A structured document with optional text and/or image content. At least one of `text` or `image` must be provided."""
+
+ image: NotRequired[str]
+ r"""An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...)."""
+ text: NotRequired[str]
+ r"""The document text"""
+
+
+class DocumentRequest(BaseModel):
+ r"""A structured document with optional text and/or image content. At least one of `text` or `image` must be provided."""
+
+ image: Optional[str] = None
+ r"""An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...)."""
+
+ text: Optional[str] = None
+ r"""The document text"""
+
+
+DocumentTypedDict = TypeAliasType(
+ "DocumentTypedDict", Union[DocumentRequestTypedDict, str]
+)
+r"""A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`."""
+
+
+Document = TypeAliasType("Document", Union[DocumentRequest, str])
+r"""A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`."""
+
+
class CreateRerankRequestBodyTypedDict(TypedDict):
r"""Rerank request input"""
- documents: List[str]
- r"""The list of documents to rerank"""
+ documents: List[DocumentTypedDict]
+ r"""The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models."""
model: str
r"""The rerank model to use"""
query: str
@@ -81,8 +110,8 @@ class CreateRerankRequestBodyTypedDict(TypedDict):
class CreateRerankRequestBody(BaseModel):
r"""Rerank request input"""
- documents: List[str]
- r"""The list of documents to rerank"""
+ documents: List[Document]
+ r"""The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models."""
model: str
r"""The rerank model to use"""
@@ -180,25 +209,30 @@ class CreateRerankRequest(BaseModel):
"""
-class DocumentTypedDict(TypedDict):
- r"""The document object containing the original text"""
+class DocumentResponseTypedDict(TypedDict):
+ r"""The document object echoing the original input (text and/or image)"""
- text: str
+ image: NotRequired[str]
+ r"""The image (URL or data URI) from the original document"""
+ text: NotRequired[str]
r"""The document text"""
-class Document(BaseModel):
- r"""The document object containing the original text"""
+class DocumentResponse(BaseModel):
+ r"""The document object echoing the original input (text and/or image)"""
- text: str
+ image: Optional[str] = None
+ r"""The image (URL or data URI) from the original document"""
+
+ text: Optional[str] = None
r"""The document text"""
class ResultTypedDict(TypedDict):
r"""A single rerank result"""
- document: DocumentTypedDict
- r"""The document object containing the original text"""
+ document: DocumentResponseTypedDict
+ r"""The document object echoing the original input (text and/or image)"""
index: int
r"""Index of the document in the original input list"""
relevance_score: float
@@ -208,8 +242,8 @@ class ResultTypedDict(TypedDict):
class Result(BaseModel):
r"""A single rerank result"""
- document: Document
- r"""The document object containing the original text"""
+ document: DocumentResponse
+ r"""The document object echoing the original input (text and/or image)"""
index: int
r"""Index of the document in the original input list"""
diff --git a/src/openrouter/operations/createresponses.py b/src/openrouter/operations/createresponses.py
index e92bbc2..8f95daa 100644
--- a/src/openrouter/operations/createresponses.py
+++ b/src/openrouter/operations/createresponses.py
@@ -2,6 +2,7 @@
from __future__ import annotations
from openrouter.components import (
+ metadatalevel as components_metadatalevel,
openresponsesresult as components_openresponsesresult,
responsesrequest as components_responsesrequest,
streamevents as components_streamevents,
@@ -12,8 +13,10 @@ from openrouter.utils import (
HeaderMetadata,
RequestMetadata,
eventstreaming,
+ validate_open_enum,
)
import pydantic
+from pydantic.functional_validators import PlainValidator
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
@@ -79,6 +82,8 @@ class CreateResponsesRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
+ x_open_router_metadata: NotRequired[components_metadatalevel.MetadataLevel]
+ r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
class CreateResponsesRequest(BaseModel):
@@ -115,19 +120,15 @@ class CreateResponsesRequest(BaseModel):
"""
-
-class CreateResponsesResponseBodyTypedDict(TypedDict):
- r"""Successful response"""
-
- data: components_streamevents.StreamEventsTypedDict
- r"""Union of all possible event types emitted during response streaming"""
-
-
-class CreateResponsesResponseBody(BaseModel):
- r"""Successful response"""
-
- data: components_streamevents.StreamEvents
- r"""Union of all possible event types emitted during response streaming"""
+ x_open_router_metadata: Annotated[
+ Annotated[
+ Optional[components_metadatalevel.MetadataLevel],
+ PlainValidator(validate_open_enum(False)),
+ ],
+ pydantic.Field(alias="X-OpenRouter-Metadata"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
CreateResponsesResponseTypedDict = TypeAliasType(
diff --git a/src/openrouter/operations/createworkspace.py b/src/openrouter/operations/createworkspace.py
new file mode 100644
index 0000000..1757be8
--- /dev/null
+++ b/src/openrouter/operations/createworkspace.py
@@ -0,0 +1,111 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ createworkspacerequest as components_createworkspacerequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateWorkspaceGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateWorkspaceGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateWorkspaceRequestTypedDict(TypedDict):
+ create_workspace_request: (
+ components_createworkspacerequest.CreateWorkspaceRequestTypedDict
+ )
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class CreateWorkspaceRequest(BaseModel):
+ create_workspace_request: Annotated[
+ components_createworkspacerequest.CreateWorkspaceRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/deletebyokkey.py b/src/openrouter/operations/deletebyokkey.py
new file mode 100644
index 0000000..08c3b34
--- /dev/null
+++ b/src/openrouter/operations/deletebyokkey.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class DeleteBYOKKeyGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteBYOKKeyGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteBYOKKeyRequestTypedDict(TypedDict):
+ id: str
+ r"""The BYOK credential ID (UUID)."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteBYOKKeyRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The BYOK credential ID (UUID)."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/deleteobservabilitydestination.py b/src/openrouter/operations/deleteobservabilitydestination.py
new file mode 100644
index 0000000..865b4d1
--- /dev/null
+++ b/src/openrouter/operations/deleteobservabilitydestination.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class DeleteObservabilityDestinationGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteObservabilityDestinationGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteObservabilityDestinationRequestTypedDict(TypedDict):
+ id: str
+ r"""The destination ID (UUID)."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteObservabilityDestinationRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The destination ID (UUID)."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/deleteworkspace.py b/src/openrouter/operations/deleteworkspace.py
new file mode 100644
index 0000000..fbfef88
--- /dev/null
+++ b/src/openrouter/operations/deleteworkspace.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class DeleteWorkspaceGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteWorkspaceGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteWorkspaceRequestTypedDict(TypedDict):
+ id: str
+ r"""The workspace ID (UUID) or slug"""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DeleteWorkspaceRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The workspace ID (UUID) or slug"""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/getanalyticsmeta.py b/src/openrouter/operations/getanalyticsmeta.py
new file mode 100644
index 0000000..bdec790
--- /dev/null
+++ b/src/openrouter/operations/getanalyticsmeta.py
@@ -0,0 +1,252 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import FieldMetadata, HeaderMetadata, validate_open_enum
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetAnalyticsMetaGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetAnalyticsMetaGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetAnalyticsMetaRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetAnalyticsMetaRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DimensionTypedDict(TypedDict):
+ display_label: str
+ r"""Human-readable label"""
+ name: str
+ r"""Dimension identifier used in query requests"""
+
+
+class Dimension(BaseModel):
+ display_label: str
+ r"""Human-readable label"""
+
+ name: str
+ r"""Dimension identifier used in query requests"""
+
+
+GranularityName = Union[
+ Literal[
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ ],
+ UnrecognizedStr,
+]
+r"""Granularity identifier"""
+
+
+class GranularityTypedDict(TypedDict):
+ display_label: str
+ r"""Human-readable label"""
+ name: GranularityName
+ r"""Granularity identifier"""
+
+
+class Granularity(BaseModel):
+ display_label: str
+ r"""Human-readable label"""
+
+ name: Annotated[GranularityName, PlainValidator(validate_open_enum(False))]
+ r"""Granularity identifier"""
+
+
+DisplayFormat = Union[
+ Literal[
+ "number",
+ "currency",
+ "percent",
+ "latency",
+ "throughput",
+ ],
+ UnrecognizedStr,
+]
+r"""How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"""
+
+
+class MetricTypedDict(TypedDict):
+ display_format: DisplayFormat
+ r"""How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"""
+ display_label: str
+ r"""Human-readable label"""
+ is_rate: bool
+ r"""Whether this metric is a rate/ratio (averaged, not summed)"""
+ name: str
+ r"""Metric identifier used in query requests"""
+
+
+class Metric(BaseModel):
+ display_format: Annotated[DisplayFormat, PlainValidator(validate_open_enum(False))]
+ r"""How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"""
+
+ display_label: str
+ r"""Human-readable label"""
+
+ is_rate: bool
+ r"""Whether this metric is a rate/ratio (averaged, not summed)"""
+
+ name: str
+ r"""Metric identifier used in query requests"""
+
+
+OperatorName = Union[
+ Literal[
+ "eq",
+ "neq",
+ "in",
+ "not_in",
+ "gt",
+ "gte",
+ "lt",
+ "lte",
+ ],
+ UnrecognizedStr,
+]
+r"""Operator identifier used in filter definitions"""
+
+
+ValueType = Union[
+ Literal[
+ "scalar",
+ "array",
+ ],
+ UnrecognizedStr,
+]
+r"""Whether the operator expects a single value or an array"""
+
+
+class OperatorTypedDict(TypedDict):
+ name: OperatorName
+ r"""Operator identifier used in filter definitions"""
+ value_type: ValueType
+ r"""Whether the operator expects a single value or an array"""
+
+
+class Operator(BaseModel):
+ name: Annotated[OperatorName, PlainValidator(validate_open_enum(False))]
+ r"""Operator identifier used in filter definitions"""
+
+ value_type: Annotated[ValueType, PlainValidator(validate_open_enum(False))]
+ r"""Whether the operator expects a single value or an array"""
+
+
+class GetAnalyticsMetaDataTypedDict(TypedDict):
+ dimensions: List[DimensionTypedDict]
+ granularities: List[GranularityTypedDict]
+ metrics: List[MetricTypedDict]
+ operators: List[OperatorTypedDict]
+
+
+class GetAnalyticsMetaData(BaseModel):
+ dimensions: List[Dimension]
+
+ granularities: List[Granularity]
+
+ metrics: List[Metric]
+
+ operators: List[Operator]
+
+
+class GetAnalyticsMetaResponseTypedDict(TypedDict):
+ r"""Returns analytics query metadata"""
+
+ data: GetAnalyticsMetaDataTypedDict
+
+
+class GetAnalyticsMetaResponse(BaseModel):
+ r"""Returns analytics query metadata"""
+
+ data: GetAnalyticsMetaData
diff --git a/src/openrouter/operations/getapprankings.py b/src/openrouter/operations/getapprankings.py
new file mode 100644
index 0000000..d19ef64
--- /dev/null
+++ b/src/openrouter/operations/getapprankings.py
@@ -0,0 +1,225 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import apprankingsresponse as components_apprankingsresponse
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ QueryParamMetadata,
+ validate_open_enum,
+)
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Awaitable, Callable, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetAppRankingsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetAppRankingsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+GetAppRankingsCategory = Union[
+ Literal[
+ "coding",
+ "creative",
+ "productivity",
+ "entertainment",
+ ],
+ UnrecognizedStr,
+]
+r"""Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group."""
+
+
+Subcategory = Union[
+ Literal[
+ "cli-agent",
+ "ide-extension",
+ "cloud-agent",
+ "programming-app",
+ "native-app-builder",
+ "creative-writing",
+ "video-gen",
+ "image-gen",
+ "audio-gen",
+ "roleplay",
+ "game",
+ "writing-assistant",
+ "general-chat",
+ "personal-agent",
+ "legal",
+ ],
+ UnrecognizedStr,
+]
+r"""Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent."""
+
+
+GetAppRankingsSort = Union[
+ Literal[
+ "popular",
+ "trending",
+ ],
+ UnrecognizedStr,
+]
+r"""`popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results."""
+
+
+class GetAppRankingsRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ category: NotRequired[GetAppRankingsCategory]
+ r"""Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group."""
+ subcategory: NotRequired[Subcategory]
+ r"""Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent."""
+ sort: NotRequired[GetAppRankingsSort]
+ r"""`popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results."""
+ start_date: NotRequired[str]
+ r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
+ end_date: NotRequired[str]
+ r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
+ limit: NotRequired[int]
+ r"""Maximum number of apps to return (1-100). Defaults to 50."""
+ offset: NotRequired[int]
+ r"""Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`."""
+
+
+class GetAppRankingsRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ category: Annotated[
+ Annotated[
+ Optional[GetAppRankingsCategory], PlainValidator(validate_open_enum(False))
+ ],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group."""
+
+ subcategory: Annotated[
+ Annotated[Optional[Subcategory], PlainValidator(validate_open_enum(False))],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent."""
+
+ sort: Annotated[
+ Annotated[
+ Optional[GetAppRankingsSort], PlainValidator(validate_open_enum(False))
+ ],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = "popular"
+ r"""`popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results."""
+
+ start_date: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
+
+ end_date: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
+
+ limit: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 50
+ r"""Maximum number of apps to return (1-100). Defaults to 50."""
+
+ offset: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 0
+ r"""Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`."""
+
+
+class GetAppRankingsResponseTypedDict(TypedDict):
+ result: components_apprankingsresponse.AppRankingsResponseTypedDict
+
+
+class GetAppRankingsResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[GetAppRankingsResponse]],
+ Callable[[], Awaitable[Optional[GetAppRankingsResponse]]],
+ ]
+
+ result: components_apprankingsresponse.AppRankingsResponse
diff --git a/src/openrouter/operations/getbyokkey.py b/src/openrouter/operations/getbyokkey.py
new file mode 100644
index 0000000..04945fd
--- /dev/null
+++ b/src/openrouter/operations/getbyokkey.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetBYOKKeyGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetBYOKKeyGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetBYOKKeyRequestTypedDict(TypedDict):
+ id: str
+ r"""The BYOK credential ID (UUID)."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetBYOKKeyRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The BYOK credential ID (UUID)."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/getgeneration.py b/src/openrouter/operations/getgeneration.py
index 94dfcb7..bf21d05 100644
--- a/src/openrouter/operations/getgeneration.py
+++ b/src/openrouter/operations/getgeneration.py
@@ -1,25 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.components import providerresponse as components_providerresponse
-from openrouter.types import (
- BaseModel,
- Nullable,
- OptionalNullable,
- UNSET,
- UNSET_SENTINEL,
- UnrecognizedStr,
-)
-from openrouter.utils import (
- FieldMetadata,
- HeaderMetadata,
- QueryParamMetadata,
- validate_open_enum,
-)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
-from pydantic import model_serializer
-from pydantic.functional_validators import PlainValidator
-from typing import List, Literal, Optional, Union
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -120,292 +105,3 @@ class GetGenerationRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-APIType = Union[
- Literal[
- "completions",
- "embeddings",
- "rerank",
- "video",
- ],
- UnrecognizedStr,
-]
-r"""Type of API used for the generation"""
-
-
-class GetGenerationDataTypedDict(TypedDict):
- r"""Generation data"""
-
- api_type: Nullable[APIType]
- r"""Type of API used for the generation"""
- app_id: Nullable[int]
- r"""ID of the app that made the request"""
- cache_discount: Nullable[float]
- r"""Discount applied due to caching"""
- cancelled: Nullable[bool]
- r"""Whether the generation was cancelled"""
- created_at: str
- r"""ISO 8601 timestamp of when the generation was created"""
- external_user: Nullable[str]
- r"""External user identifier"""
- finish_reason: Nullable[str]
- r"""Reason the generation finished"""
- generation_time: Nullable[float]
- r"""Time taken for generation in milliseconds"""
- http_referer: Nullable[str]
- r"""Referer header from the request"""
- id: str
- r"""Unique identifier for the generation"""
- is_byok: bool
- r"""Whether this used bring-your-own-key"""
- latency: Nullable[float]
- r"""Total latency in milliseconds"""
- model: str
- r"""Model used for the generation"""
- moderation_latency: Nullable[float]
- r"""Moderation latency in milliseconds"""
- native_finish_reason: Nullable[str]
- r"""Native finish reason as reported by provider"""
- native_tokens_cached: Nullable[int]
- r"""Native cached tokens as reported by provider"""
- native_tokens_completion: Nullable[int]
- r"""Native completion tokens as reported by provider"""
- native_tokens_completion_images: Nullable[int]
- r"""Native completion image tokens as reported by provider"""
- native_tokens_prompt: Nullable[int]
- r"""Native prompt tokens as reported by provider"""
- native_tokens_reasoning: Nullable[int]
- r"""Native reasoning tokens as reported by provider"""
- num_input_audio_prompt: Nullable[int]
- r"""Number of audio inputs in the prompt"""
- num_media_completion: Nullable[int]
- r"""Number of media items in the completion"""
- num_media_prompt: Nullable[int]
- r"""Number of media items in the prompt"""
- num_search_results: Nullable[int]
- r"""Number of search results included"""
- origin: str
- r"""Origin URL of the request"""
- provider_name: Nullable[str]
- r"""Name of the provider that served the request"""
- provider_responses: Nullable[
- List[components_providerresponse.ProviderResponseTypedDict]
- ]
- r"""List of provider responses for this generation, including fallback attempts"""
- router: Nullable[str]
- r"""Router used for the request (e.g., openrouter/auto)"""
- streamed: Nullable[bool]
- r"""Whether the response was streamed"""
- tokens_completion: Nullable[int]
- r"""Number of tokens in the completion"""
- tokens_prompt: Nullable[int]
- r"""Number of tokens in the prompt"""
- total_cost: float
- r"""Total cost of the generation in USD"""
- upstream_id: Nullable[str]
- r"""Upstream provider's identifier for this generation"""
- upstream_inference_cost: Nullable[float]
- r"""Cost charged by the upstream provider"""
- usage: float
- r"""Usage amount in USD"""
- user_agent: Nullable[str]
- r"""User-Agent header from the request"""
- request_id: NotRequired[Nullable[str]]
- r"""Unique identifier grouping all generations from a single API request"""
- session_id: NotRequired[Nullable[str]]
- r"""Session identifier grouping multiple generations in the same session"""
-
-
-class GetGenerationData(BaseModel):
- r"""Generation data"""
-
- api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))]
- r"""Type of API used for the generation"""
-
- app_id: Nullable[int]
- r"""ID of the app that made the request"""
-
- cache_discount: Nullable[float]
- r"""Discount applied due to caching"""
-
- cancelled: Nullable[bool]
- r"""Whether the generation was cancelled"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the generation was created"""
-
- external_user: Nullable[str]
- r"""External user identifier"""
-
- finish_reason: Nullable[str]
- r"""Reason the generation finished"""
-
- generation_time: Nullable[float]
- r"""Time taken for generation in milliseconds"""
-
- http_referer: Nullable[str]
- r"""Referer header from the request"""
-
- id: str
- r"""Unique identifier for the generation"""
-
- is_byok: bool
- r"""Whether this used bring-your-own-key"""
-
- latency: Nullable[float]
- r"""Total latency in milliseconds"""
-
- model: str
- r"""Model used for the generation"""
-
- moderation_latency: Nullable[float]
- r"""Moderation latency in milliseconds"""
-
- native_finish_reason: Nullable[str]
- r"""Native finish reason as reported by provider"""
-
- native_tokens_cached: Nullable[int]
- r"""Native cached tokens as reported by provider"""
-
- native_tokens_completion: Nullable[int]
- r"""Native completion tokens as reported by provider"""
-
- native_tokens_completion_images: Nullable[int]
- r"""Native completion image tokens as reported by provider"""
-
- native_tokens_prompt: Nullable[int]
- r"""Native prompt tokens as reported by provider"""
-
- native_tokens_reasoning: Nullable[int]
- r"""Native reasoning tokens as reported by provider"""
-
- num_input_audio_prompt: Nullable[int]
- r"""Number of audio inputs in the prompt"""
-
- num_media_completion: Nullable[int]
- r"""Number of media items in the completion"""
-
- num_media_prompt: Nullable[int]
- r"""Number of media items in the prompt"""
-
- num_search_results: Nullable[int]
- r"""Number of search results included"""
-
- origin: str
- r"""Origin URL of the request"""
-
- provider_name: Nullable[str]
- r"""Name of the provider that served the request"""
-
- provider_responses: Nullable[List[components_providerresponse.ProviderResponse]]
- r"""List of provider responses for this generation, including fallback attempts"""
-
- router: Nullable[str]
- r"""Router used for the request (e.g., openrouter/auto)"""
-
- streamed: Nullable[bool]
- r"""Whether the response was streamed"""
-
- tokens_completion: Nullable[int]
- r"""Number of tokens in the completion"""
-
- tokens_prompt: Nullable[int]
- r"""Number of tokens in the prompt"""
-
- total_cost: float
- r"""Total cost of the generation in USD"""
-
- upstream_id: Nullable[str]
- r"""Upstream provider's identifier for this generation"""
-
- upstream_inference_cost: Nullable[float]
- r"""Cost charged by the upstream provider"""
-
- usage: float
- r"""Usage amount in USD"""
-
- user_agent: Nullable[str]
- r"""User-Agent header from the request"""
-
- request_id: OptionalNullable[str] = UNSET
- r"""Unique identifier grouping all generations from a single API request"""
-
- session_id: OptionalNullable[str] = UNSET
- r"""Session identifier grouping multiple generations in the same session"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["request_id", "session_id"]
- nullable_fields = [
- "api_type",
- "app_id",
- "cache_discount",
- "cancelled",
- "external_user",
- "finish_reason",
- "generation_time",
- "http_referer",
- "latency",
- "moderation_latency",
- "native_finish_reason",
- "native_tokens_cached",
- "native_tokens_completion",
- "native_tokens_completion_images",
- "native_tokens_prompt",
- "native_tokens_reasoning",
- "num_input_audio_prompt",
- "num_media_completion",
- "num_media_prompt",
- "num_search_results",
- "provider_name",
- "provider_responses",
- "request_id",
- "router",
- "session_id",
- "streamed",
- "tokens_completion",
- "tokens_prompt",
- "upstream_id",
- "upstream_inference_cost",
- "user_agent",
- ]
- null_default_fields = []
-
- serialized = handler(self)
-
- m = {}
-
- for n, f in type(self).model_fields.items():
- k = f.alias or n
- val = serialized.get(k)
- serialized.pop(k, None)
-
- optional_nullable = k in optional_fields and k in nullable_fields
- is_set = (
- self.__pydantic_fields_set__.intersection({n})
- or k in null_default_fields
- ) # pylint: disable=no-member
-
- if val is not None and val != UNSET_SENTINEL:
- m[k] = val
- elif val != UNSET_SENTINEL and (
- not k in optional_fields or (optional_nullable and is_set)
- ):
- m[k] = val
-
- return m
-
-
-class GetGenerationResponseTypedDict(TypedDict):
- r"""Generation response"""
-
- data: GetGenerationDataTypedDict
- r"""Generation data"""
-
-
-class GetGenerationResponse(BaseModel):
- r"""Generation response"""
-
- data: GetGenerationData
- r"""Generation data"""
diff --git a/src/openrouter/operations/getkey.py b/src/openrouter/operations/getkey.py
index ec3948b..d2370a9 100644
--- a/src/openrouter/operations/getkey.py
+++ b/src/openrouter/operations/getkey.py
@@ -156,6 +156,8 @@ class GetKeyDataTypedDict(TypedDict):
r"""OpenRouter credit usage (in USD) for the current UTC month"""
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -220,6 +222,9 @@ class GetKeyData(BaseModel):
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
+
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
diff --git a/src/openrouter/operations/getmodels.py b/src/openrouter/operations/getmodels.py
index 4f37b3b..288c859 100644
--- a/src/openrouter/operations/getmodels.py
+++ b/src/openrouter/operations/getmodels.py
@@ -60,7 +60,7 @@ class GetModelsGlobals(BaseModel):
"""
-Category = Union[
+GetModelsCategory = Union[
Literal[
"programming",
"roleplay",
@@ -80,6 +80,22 @@ Category = Union[
r"""Filter models by use case category"""
+GetModelsSort = Union[
+ Literal[
+ "most-popular",
+ "newest",
+ "top-weekly",
+ "pricing-low-to-high",
+ "pricing-high-to-low",
+ "context-high-to-low",
+ "throughput-high-to-low",
+ "latency-low-to-high",
+ ],
+ UnrecognizedStr,
+]
+r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved."""
+
+
class GetModelsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -94,12 +110,14 @@ class GetModelsRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- category: NotRequired[Category]
+ category: NotRequired[GetModelsCategory]
r"""Filter models by use case category"""
supported_parameters: NotRequired[str]
r"""Filter models by supported parameter (comma-separated)"""
output_modalities: NotRequired[str]
r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."""
+ sort: NotRequired[GetModelsSort]
+ r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved."""
class GetModelsRequest(BaseModel):
@@ -132,7 +150,9 @@ class GetModelsRequest(BaseModel):
"""
category: Annotated[
- Annotated[Optional[Category], PlainValidator(validate_open_enum(False))],
+ Annotated[
+ Optional[GetModelsCategory], PlainValidator(validate_open_enum(False))
+ ],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Filter models by use case category"""
@@ -148,3 +168,9 @@ class GetModelsRequest(BaseModel):
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."""
+
+ sort: Annotated[
+ Annotated[Optional[GetModelsSort], PlainValidator(validate_open_enum(False))],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved."""
diff --git a/src/openrouter/operations/getobservabilitydestination.py b/src/openrouter/operations/getobservabilitydestination.py
new file mode 100644
index 0000000..3a79bcb
--- /dev/null
+++ b/src/openrouter/operations/getobservabilitydestination.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetObservabilityDestinationGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetObservabilityDestinationGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetObservabilityDestinationRequestTypedDict(TypedDict):
+ id: str
+ r"""The destination ID (UUID)."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetObservabilityDestinationRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The destination ID (UUID)."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/getpreset.py b/src/openrouter/operations/getpreset.py
new file mode 100644
index 0000000..d088913
--- /dev/null
+++ b/src/openrouter/operations/getpreset.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetPresetGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetPresetGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetPresetRequestTypedDict(TypedDict):
+ slug: str
+ r"""URL-safe slug identifying the preset."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetPresetRequest(BaseModel):
+ slug: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""URL-safe slug identifying the preset."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/getpresetversion.py b/src/openrouter/operations/getpresetversion.py
new file mode 100644
index 0000000..b76d22d
--- /dev/null
+++ b/src/openrouter/operations/getpresetversion.py
@@ -0,0 +1,114 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetPresetVersionGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetPresetVersionGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetPresetVersionRequestTypedDict(TypedDict):
+ slug: str
+ r"""URL-safe slug identifying the preset."""
+ version: str
+ r"""Version number of the preset."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetPresetVersionRequest(BaseModel):
+ slug: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""URL-safe slug identifying the preset."""
+
+ version: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""Version number of the preset."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/getrankingsdaily.py b/src/openrouter/operations/getrankingsdaily.py
new file mode 100644
index 0000000..2e3cf71
--- /dev/null
+++ b/src/openrouter/operations/getrankingsdaily.py
@@ -0,0 +1,116 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetRankingsDailyGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetRankingsDailyGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetRankingsDailyRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ start_date: NotRequired[str]
+ r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
+ end_date: NotRequired[str]
+ r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
+
+
+class GetRankingsDailyRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ start_date: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
+
+ end_date: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
diff --git a/src/openrouter/operations/getworkspace.py b/src/openrouter/operations/getworkspace.py
new file mode 100644
index 0000000..f4d279e
--- /dev/null
+++ b/src/openrouter/operations/getworkspace.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GetWorkspaceGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetWorkspaceGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetWorkspaceRequestTypedDict(TypedDict):
+ id: str
+ r"""The workspace ID (UUID) or slug"""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class GetWorkspaceRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The workspace ID (UUID) or slug"""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/list.py b/src/openrouter/operations/list.py
index e1d703c..bf9965a 100644
--- a/src/openrouter/operations/list.py
+++ b/src/openrouter/operations/list.py
@@ -80,6 +80,8 @@ class ListRequestTypedDict(TypedDict):
r"""Whether to include disabled API keys in the response"""
offset: NotRequired[int]
r"""Number of API keys to skip for pagination"""
+ workspace_id: NotRequired[str]
+ r"""Filter API keys by workspace ID. By default, keys in the default workspace are returned."""
class ListRequest(BaseModel):
@@ -123,6 +125,12 @@ class ListRequest(BaseModel):
] = None
r"""Number of API keys to skip for pagination"""
+ workspace_id: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Filter API keys by workspace ID. By default, keys in the default workspace are returned."""
+
class ListDataTypedDict(TypedDict):
byok_usage: float
@@ -163,6 +171,8 @@ class ListDataTypedDict(TypedDict):
r"""OpenRouter credit usage (in USD) for the current UTC month"""
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -225,6 +235,9 @@ class ListData(BaseModel):
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
+
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
diff --git a/src/openrouter/operations/listbyokkeys.py b/src/openrouter/operations/listbyokkeys.py
new file mode 100644
index 0000000..4b17f29
--- /dev/null
+++ b/src/openrouter/operations/listbyokkeys.py
@@ -0,0 +1,245 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ listbyokkeysresponse as components_listbyokkeysresponse,
+)
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ QueryParamMetadata,
+ validate_open_enum,
+)
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Awaitable, Callable, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListBYOKKeysGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListBYOKKeysGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+Provider = Union[
+ Literal[
+ "ai21",
+ "aion-labs",
+ "akashml",
+ "alibaba",
+ "amazon-bedrock",
+ "amazon-nova",
+ "ambient",
+ "anthropic",
+ "arcee-ai",
+ "atlas-cloud",
+ "avian",
+ "azure",
+ "baidu",
+ "baseten",
+ "black-forest-labs",
+ "byteplus",
+ "cerebras",
+ "chutes",
+ "cirrascale",
+ "clarifai",
+ "cloudflare",
+ "cohere",
+ "crusoe",
+ "darkbloom",
+ "decart",
+ "deepinfra",
+ "deepseek",
+ "dekallm",
+ "digitalocean",
+ "featherless",
+ "fireworks",
+ "friendli",
+ "gmicloud",
+ "google-ai-studio",
+ "google-vertex",
+ "groq",
+ "inception",
+ "inceptron",
+ "inference-net",
+ "infermatic",
+ "inflection",
+ "io-net",
+ "ionstream",
+ "liquid",
+ "mancer",
+ "mara",
+ "minimax",
+ "mistral",
+ "modelrun",
+ "modular",
+ "moonshotai",
+ "morph",
+ "ncompass",
+ "nebius",
+ "nex-agi",
+ "nextbit",
+ "novita",
+ "nvidia",
+ "open-inference",
+ "openai",
+ "parasail",
+ "perceptron",
+ "perplexity",
+ "phala",
+ "poolside",
+ "recraft",
+ "reka",
+ "relace",
+ "sambanova",
+ "seed",
+ "siliconflow",
+ "sourceful",
+ "stepfun",
+ "streamlake",
+ "switchpoint",
+ "together",
+ "upstage",
+ "venice",
+ "wafer",
+ "wandb",
+ "xai",
+ "xiaomi",
+ "z-ai",
+ ],
+ UnrecognizedStr,
+]
+r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+
+
+class ListBYOKKeysRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ offset: NotRequired[int]
+ r"""Number of records to skip for pagination"""
+ limit: NotRequired[int]
+ r"""Maximum number of records to return (max 100)"""
+ workspace_id: NotRequired[str]
+ r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
+ provider: NotRequired[Provider]
+ r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+
+
+class ListBYOKKeysRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ offset: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Number of records to skip for pagination"""
+
+ limit: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Maximum number of records to return (max 100)"""
+
+ workspace_id: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
+
+ provider: Annotated[
+ Annotated[Optional[Provider], PlainValidator(validate_open_enum(False))],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
+
+
+class ListBYOKKeysResponseTypedDict(TypedDict):
+ result: components_listbyokkeysresponse.ListBYOKKeysResponseTypedDict
+
+
+class ListBYOKKeysResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[ListBYOKKeysResponse]],
+ Callable[[], Awaitable[Optional[ListBYOKKeysResponse]]],
+ ]
+
+ result: components_listbyokkeysresponse.ListBYOKKeysResponse
diff --git a/src/openrouter/operations/listgenerationcontent.py b/src/openrouter/operations/listgenerationcontent.py
new file mode 100644
index 0000000..8d19500
--- /dev/null
+++ b/src/openrouter/operations/listgenerationcontent.py
@@ -0,0 +1,107 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListGenerationContentGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListGenerationContentGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListGenerationContentRequestTypedDict(TypedDict):
+ id: str
+ r"""The generation ID"""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListGenerationContentRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
+ ]
+ r"""The generation ID"""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/listguardrails.py b/src/openrouter/operations/listguardrails.py
index 8345e0e..f91db9e 100644
--- a/src/openrouter/operations/listguardrails.py
+++ b/src/openrouter/operations/listguardrails.py
@@ -75,6 +75,8 @@ class ListGuardrailsRequestTypedDict(TypedDict):
r"""Number of records to skip for pagination"""
limit: NotRequired[int]
r"""Maximum number of records to return (max 100)"""
+ workspace_id: NotRequired[str]
+ r"""Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned."""
class ListGuardrailsRequest(BaseModel):
@@ -118,6 +120,12 @@ class ListGuardrailsRequest(BaseModel):
] = None
r"""Maximum number of records to return (max 100)"""
+ workspace_id: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned."""
+
class ListGuardrailsResponseTypedDict(TypedDict):
result: components_listguardrailsresponse.ListGuardrailsResponseTypedDict
diff --git a/src/openrouter/operations/listobservabilitydestinations.py b/src/openrouter/operations/listobservabilitydestinations.py
new file mode 100644
index 0000000..02233af
--- /dev/null
+++ b/src/openrouter/operations/listobservabilitydestinations.py
@@ -0,0 +1,140 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ listobservabilitydestinationsresponse as components_listobservabilitydestinationsresponse,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
+import pydantic
+from typing import Awaitable, Callable, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListObservabilityDestinationsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListObservabilityDestinationsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListObservabilityDestinationsRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ offset: NotRequired[int]
+ r"""Number of records to skip for pagination"""
+ limit: NotRequired[int]
+ r"""Maximum number of records to return (max 100)"""
+ workspace_id: NotRequired[str]
+ r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
+
+
+class ListObservabilityDestinationsRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ offset: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Number of records to skip for pagination"""
+
+ limit: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Maximum number of records to return (max 100)"""
+
+ workspace_id: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
+
+
+class ListObservabilityDestinationsResponseTypedDict(TypedDict):
+ result: components_listobservabilitydestinationsresponse.ListObservabilityDestinationsResponseTypedDict
+
+
+class ListObservabilityDestinationsResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[ListObservabilityDestinationsResponse]],
+ Callable[[], Awaitable[Optional[ListObservabilityDestinationsResponse]]],
+ ]
+
+ result: components_listobservabilitydestinationsresponse.ListObservabilityDestinationsResponse
diff --git a/src/openrouter/operations/listpresets.py b/src/openrouter/operations/listpresets.py
new file mode 100644
index 0000000..faa98f1
--- /dev/null
+++ b/src/openrouter/operations/listpresets.py
@@ -0,0 +1,130 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import listpresetsresponse as components_listpresetsresponse
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
+import pydantic
+from typing import Awaitable, Callable, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListPresetsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListPresetsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListPresetsRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ offset: NotRequired[int]
+ r"""Number of records to skip for pagination"""
+ limit: NotRequired[int]
+ r"""Maximum number of records to return (max 100)"""
+
+
+class ListPresetsRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ offset: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Number of records to skip for pagination"""
+
+ limit: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Maximum number of records to return (max 100)"""
+
+
+class ListPresetsResponseTypedDict(TypedDict):
+ result: components_listpresetsresponse.ListPresetsResponseTypedDict
+
+
+class ListPresetsResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[ListPresetsResponse]],
+ Callable[[], Awaitable[Optional[ListPresetsResponse]]],
+ ]
+
+ result: components_listpresetsresponse.ListPresetsResponse
diff --git a/src/openrouter/operations/listpresetversions.py b/src/openrouter/operations/listpresetversions.py
new file mode 100644
index 0000000..48185b7
--- /dev/null
+++ b/src/openrouter/operations/listpresetversions.py
@@ -0,0 +1,144 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ listpresetversionsresponse as components_listpresetversionsresponse,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ QueryParamMetadata,
+)
+import pydantic
+from typing import Awaitable, Callable, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListPresetVersionsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListPresetVersionsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListPresetVersionsRequestTypedDict(TypedDict):
+ slug: str
+ r"""URL-safe slug identifying the preset."""
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ offset: NotRequired[int]
+ r"""Number of records to skip for pagination"""
+ limit: NotRequired[int]
+ r"""Maximum number of records to return (max 100)"""
+
+
+class ListPresetVersionsRequest(BaseModel):
+ slug: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""URL-safe slug identifying the preset."""
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ offset: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Number of records to skip for pagination"""
+
+ limit: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Maximum number of records to return (max 100)"""
+
+
+class ListPresetVersionsResponseTypedDict(TypedDict):
+ result: components_listpresetversionsresponse.ListPresetVersionsResponseTypedDict
+
+
+class ListPresetVersionsResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[ListPresetVersionsResponse]],
+ Callable[[], Awaitable[Optional[ListPresetVersionsResponse]]],
+ ]
+
+ result: components_listpresetversionsresponse.ListPresetVersionsResponse
diff --git a/src/openrouter/operations/listworkspaces.py b/src/openrouter/operations/listworkspaces.py
new file mode 100644
index 0000000..236dc18
--- /dev/null
+++ b/src/openrouter/operations/listworkspaces.py
@@ -0,0 +1,132 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ listworkspacesresponse as components_listworkspacesresponse,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
+import pydantic
+from typing import Awaitable, Callable, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListWorkspacesGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListWorkspacesGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class ListWorkspacesRequestTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+ offset: NotRequired[int]
+ r"""Number of records to skip for pagination"""
+ limit: NotRequired[int]
+ r"""Maximum number of records to return (max 100)"""
+
+
+class ListWorkspacesRequest(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+ offset: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Number of records to skip for pagination"""
+
+ limit: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Maximum number of records to return (max 100)"""
+
+
+class ListWorkspacesResponseTypedDict(TypedDict):
+ result: components_listworkspacesresponse.ListWorkspacesResponseTypedDict
+
+
+class ListWorkspacesResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[ListWorkspacesResponse]],
+ Callable[[], Awaitable[Optional[ListWorkspacesResponse]]],
+ ]
+
+ result: components_listworkspacesresponse.ListWorkspacesResponse
diff --git a/src/openrouter/operations/queryanalytics.py b/src/openrouter/operations/queryanalytics.py
new file mode 100644
index 0000000..fe4a010
--- /dev/null
+++ b/src/openrouter/operations/queryanalytics.py
@@ -0,0 +1,265 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from datetime import datetime
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ RequestMetadata,
+ validate_open_enum,
+)
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+class QueryAnalyticsGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class QueryAnalyticsGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+Value2TypedDict = TypeAliasType("Value2TypedDict", Union[str, float])
+
+
+Value2 = TypeAliasType("Value2", Union[str, float])
+
+
+Value1TypedDict = TypeAliasType(
+ "Value1TypedDict", Union[str, float, List[Value2TypedDict]]
+)
+r"""Filter value (scalar or array depending on operator)"""
+
+
+Value1 = TypeAliasType("Value1", Union[str, float, List[Value2]])
+r"""Filter value (scalar or array depending on operator)"""
+
+
+class FilterTypedDict(TypedDict):
+ field: str
+ r"""Dimension to filter on"""
+ operator: str
+ r"""Filter operator"""
+ value: Value1TypedDict
+ r"""Filter value (scalar or array depending on operator)"""
+
+
+class Filter(BaseModel):
+ field: str
+ r"""Dimension to filter on"""
+
+ operator: str
+ r"""Filter operator"""
+
+ value: Value1
+ r"""Filter value (scalar or array depending on operator)"""
+
+
+Direction = Union[
+ Literal[
+ "asc",
+ "desc",
+ ],
+ UnrecognizedStr,
+]
+
+
+class OrderByTypedDict(TypedDict):
+ direction: Direction
+ field: str
+ r"""Field to order by"""
+
+
+class OrderBy(BaseModel):
+ direction: Annotated[Direction, PlainValidator(validate_open_enum(False))]
+
+ field: str
+ r"""Field to order by"""
+
+
+class TimeRangeTypedDict(TypedDict):
+ end: datetime
+ start: datetime
+
+
+class TimeRange(BaseModel):
+ end: datetime
+
+ start: datetime
+
+
+class QueryAnalyticsRequestBodyTypedDict(TypedDict):
+ metrics: List[str]
+ dimensions: NotRequired[List[str]]
+ filters: NotRequired[List[FilterTypedDict]]
+ granularity: NotRequired[str]
+ r"""Time granularity"""
+ group_limit: NotRequired[int]
+ r"""Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified."""
+ limit: NotRequired[int]
+ r"""Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations."""
+ order_by: NotRequired[OrderByTypedDict]
+ time_range: NotRequired[TimeRangeTypedDict]
+
+
+class QueryAnalyticsRequestBody(BaseModel):
+ metrics: List[str]
+
+ dimensions: Optional[List[str]] = None
+
+ filters: Optional[List[Filter]] = None
+
+ granularity: Optional[str] = None
+ r"""Time granularity"""
+
+ group_limit: Optional[int] = None
+ r"""Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified."""
+
+ limit: Optional[int] = None
+ r"""Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations."""
+
+ order_by: Optional[OrderBy] = None
+
+ time_range: Optional[TimeRange] = None
+
+
+class QueryAnalyticsRequestTypedDict(TypedDict):
+ request_body: QueryAnalyticsRequestBodyTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class QueryAnalyticsRequest(BaseModel):
+ request_body: Annotated[
+ QueryAnalyticsRequestBody,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class QueryAnalyticsData1TypedDict(TypedDict):
+ r"""A row of analytics data with metric/dimension values"""
+
+
+class QueryAnalyticsData1(BaseModel):
+ r"""A row of analytics data with metric/dimension values"""
+
+
+class MetadataTypedDict(TypedDict):
+ query_time_ms: float
+ row_count: int
+ truncated: bool
+
+
+class Metadata(BaseModel):
+ query_time_ms: float
+
+ row_count: int
+
+ truncated: bool
+
+
+class QueryAnalyticsData2TypedDict(TypedDict):
+ data: List[QueryAnalyticsData1TypedDict]
+ metadata: MetadataTypedDict
+ cached_at: NotRequired[float]
+
+
+class QueryAnalyticsData2(BaseModel):
+ data: List[QueryAnalyticsData1]
+
+ metadata: Metadata
+
+ cached_at: Annotated[Optional[float], pydantic.Field(alias="cachedAt")] = None
+
+
+class QueryAnalyticsResponseTypedDict(TypedDict):
+ r"""Analytics query results"""
+
+ data: QueryAnalyticsData2TypedDict
+
+
+class QueryAnalyticsResponse(BaseModel):
+ r"""Analytics query results"""
+
+ data: QueryAnalyticsData2
diff --git a/src/openrouter/operations/sendchatcompletionrequest.py b/src/openrouter/operations/sendchatcompletionrequest.py
index ef5ccb0..cb1c3b3 100644
--- a/src/openrouter/operations/sendchatcompletionrequest.py
+++ b/src/openrouter/operations/sendchatcompletionrequest.py
@@ -5,6 +5,7 @@ from openrouter.components import (
chatrequest as components_chatrequest,
chatresult as components_chatresult,
chatstreamchunk as components_chatstreamchunk,
+ metadatalevel as components_metadatalevel,
)
from openrouter.types import BaseModel
from openrouter.utils import (
@@ -12,8 +13,10 @@ from openrouter.utils import (
HeaderMetadata,
RequestMetadata,
eventstreaming,
+ validate_open_enum,
)
import pydantic
+from pydantic.functional_validators import PlainValidator
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
@@ -79,6 +82,8 @@ class SendChatCompletionRequestRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
+ x_open_router_metadata: NotRequired[components_metadatalevel.MetadataLevel]
+ r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
class SendChatCompletionRequestRequest(BaseModel):
@@ -115,19 +120,15 @@ class SendChatCompletionRequestRequest(BaseModel):
"""
-
-class SendChatCompletionRequestResponseBodyTypedDict(TypedDict):
- r"""Successful chat completion response"""
-
- data: components_chatstreamchunk.ChatStreamChunkTypedDict
- r"""Streaming chat completion chunk"""
-
-
-class SendChatCompletionRequestResponseBody(BaseModel):
- r"""Successful chat completion response"""
-
- data: components_chatstreamchunk.ChatStreamChunk
- r"""Streaming chat completion chunk"""
+ x_open_router_metadata: Annotated[
+ Annotated[
+ Optional[components_metadatalevel.MetadataLevel],
+ PlainValidator(validate_open_enum(False)),
+ ],
+ pydantic.Field(alias="X-OpenRouter-Metadata"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
SendChatCompletionRequestResponseTypedDict = TypeAliasType(
diff --git a/src/openrouter/operations/updatebyokkey.py b/src/openrouter/operations/updatebyokkey.py
new file mode 100644
index 0000000..1bf28a9
--- /dev/null
+++ b/src/openrouter/operations/updatebyokkey.py
@@ -0,0 +1,123 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ updatebyokkeyrequest as components_updatebyokkeyrequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class UpdateBYOKKeyGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateBYOKKeyGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateBYOKKeyRequestTypedDict(TypedDict):
+ id: str
+ r"""The BYOK credential ID (UUID)."""
+ update_byok_key_request: (
+ components_updatebyokkeyrequest.UpdateBYOKKeyRequestTypedDict
+ )
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateBYOKKeyRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The BYOK credential ID (UUID)."""
+
+ update_byok_key_request: Annotated[
+ components_updatebyokkeyrequest.UpdateBYOKKeyRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/updatekeys.py b/src/openrouter/operations/updatekeys.py
index a8d2f86..8ea2365 100644
--- a/src/openrouter/operations/updatekeys.py
+++ b/src/openrouter/operations/updatekeys.py
@@ -250,6 +250,8 @@ class UpdateKeysDataTypedDict(TypedDict):
r"""OpenRouter credit usage (in USD) for the current UTC month"""
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -314,6 +316,9 @@ class UpdateKeysData(BaseModel):
usage_weekly: float
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
+ workspace_id: str
+ r"""The workspace ID this API key belongs to."""
+
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
diff --git a/src/openrouter/operations/updateobservabilitydestination.py b/src/openrouter/operations/updateobservabilitydestination.py
new file mode 100644
index 0000000..749f0f7
--- /dev/null
+++ b/src/openrouter/operations/updateobservabilitydestination.py
@@ -0,0 +1,121 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ updateobservabilitydestinationrequest as components_updateobservabilitydestinationrequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class UpdateObservabilityDestinationGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateObservabilityDestinationGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateObservabilityDestinationRequestTypedDict(TypedDict):
+ id: str
+ r"""The destination ID (UUID)."""
+ update_observability_destination_request: components_updateobservabilitydestinationrequest.UpdateObservabilityDestinationRequestTypedDict
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateObservabilityDestinationRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The destination ID (UUID)."""
+
+ update_observability_destination_request: Annotated[
+ components_updateobservabilitydestinationrequest.UpdateObservabilityDestinationRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/operations/updateworkspace.py b/src/openrouter/operations/updateworkspace.py
new file mode 100644
index 0000000..4ab7929
--- /dev/null
+++ b/src/openrouter/operations/updateworkspace.py
@@ -0,0 +1,123 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ updateworkspacerequest as components_updateworkspacerequest,
+)
+from openrouter.types import BaseModel
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class UpdateWorkspaceGlobalsTypedDict(TypedDict):
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateWorkspaceGlobals(BaseModel):
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateWorkspaceRequestTypedDict(TypedDict):
+ id: str
+ r"""The workspace ID (UUID) or slug"""
+ update_workspace_request: (
+ components_updateworkspacerequest.UpdateWorkspaceRequestTypedDict
+ )
+ http_referer: NotRequired[str]
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+ x_open_router_title: NotRequired[str]
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+ x_open_router_categories: NotRequired[str]
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class UpdateWorkspaceRequest(BaseModel):
+ id: Annotated[
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
+ ]
+ r"""The workspace ID (UUID) or slug"""
+
+ update_workspace_request: Annotated[
+ components_updateworkspacerequest.UpdateWorkspaceRequest,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
diff --git a/src/openrouter/presets.py b/src/openrouter/presets.py
new file mode 100644
index 0000000..ab9e6ba
--- /dev/null
+++ b/src/openrouter/presets.py
@@ -0,0 +1,3080 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from jsonpath import JSONPath
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import Nullable, OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union
+
+
+class Presets(BaseSDK):
+ r"""Presets endpoints"""
+
+ def list(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListPresetsResponse]:
+ r"""List presets
+
+ Lists all presets for the authenticated user, ordered by most recently updated first.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListPresetsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/presets",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListPresetsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listPresets",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Optional[operations.ListPresetsResponse]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return None
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return None
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return None
+ next_offset = offset + len(results[0])
+
+ return self.list(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListPresetsResponse(
+ result=unmarshal_json_response(
+ components.ListPresetsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListPresetsResponse]:
+ r"""List presets
+
+ Lists all presets for the authenticated user, ordered by most recently updated first.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListPresetsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/presets",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListPresetsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listPresets",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Awaitable[Optional[operations.ListPresetsResponse]]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ async def empty_result():
+ return None
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return empty_result()
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return empty_result()
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return empty_result()
+ next_offset = offset + len(results[0])
+
+ return self.list_async(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListPresetsResponse(
+ result=unmarshal_json_response(
+ components.ListPresetsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get(
+ self,
+ *,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetPresetResponse:
+ r"""Get a preset
+
+ Retrieves a preset by its slug with its currently designated version inline.
+
+ :param slug: URL-safe slug identifying the preset.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetPresetRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/presets/{slug}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetPresetGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getPreset",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.GetPresetResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_async(
+ self,
+ *,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetPresetResponse:
+ r"""Get a preset
+
+ Retrieves a preset by its slug with its currently designated version inline.
+
+ :param slug: URL-safe slug identifying the preset.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetPresetRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/presets/{slug}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetPresetGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getPreset",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.GetPresetResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def create_presets_chat_completions(
+ self,
+ *,
+ slug: str,
+ messages: Union[
+ List[components.ChatMessages], List[components.ChatMessagesTypedDict]
+ ],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: OptionalNullable[float] = UNSET,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ImageConfig],
+ Dict[str, components.ImageConfigTypedDict],
+ ]
+ ] = None,
+ logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
+ logprobs: OptionalNullable[bool] = UNSET,
+ max_completion_tokens: OptionalNullable[int] = UNSET,
+ max_tokens: OptionalNullable[int] = UNSET,
+ metadata: Optional[Dict[str, str]] = None,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: OptionalNullable[float] = UNSET,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ reasoning: Optional[
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
+ ] = None,
+ response_format: Optional[
+ Union[components.ResponseFormat, components.ResponseFormatTypedDict]
+ ] = None,
+ seed: OptionalNullable[int] = UNSET,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
+ stop: OptionalNullable[
+ Union[components.Stop, components.StopTypedDict]
+ ] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
+ stream: Optional[bool] = False,
+ stream_options: OptionalNullable[
+ Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
+ ] = UNSET,
+ temperature: OptionalNullable[float] = UNSET,
+ tool_choice: Optional[
+ Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
+ ] = None,
+ tools: Optional[
+ Union[
+ List[components.ChatFunctionTool],
+ List[components.ChatFunctionToolTypedDict],
+ ]
+ ] = None,
+ top_logprobs: OptionalNullable[int] = UNSET,
+ top_p: OptionalNullable[float] = UNSET,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ user: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreatePresetFromInferenceResponse:
+ r"""Create a preset from a chat-completions request body
+
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+
+ :param slug: URL-safe slug identifying the preset. Created if it does not exist.
+ :param messages: List of messages for the conversation
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ :param debug: Debug options for inspecting request transformations (streaming only)
+ :param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
+ :param logit_bias: Token logit bias adjustments
+ :param logprobs: Return log probabilities
+ :param max_completion_tokens: Maximum tokens in completion
+ :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
+ :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
+ :param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration options for reasoning models
+ :param response_format: Response format configuration
+ :param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ :param stream: Enable streaming response
+ :param stream_options: Streaming configuration options
+ :param temperature: Sampling temperature (0-2)
+ :param tool_choice: Tool choice configuration
+ :param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
+ :param top_p: Nucleus sampling parameter (0-1)
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreatePresetsChatCompletionsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ chat_request=components.ChatRequest(
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
+ debug=utils.get_pydantic_model(
+ debug, Optional[components.ChatDebugOptions]
+ ),
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ logit_bias=logit_bias,
+ logprobs=logprobs,
+ max_completion_tokens=max_completion_tokens,
+ max_tokens=max_tokens,
+ messages=utils.get_pydantic_model(
+ messages, List[components.ChatMessages]
+ ),
+ metadata=metadata,
+ modalities=modalities,
+ model=model,
+ models=models,
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ChatRequestPlugin]]
+ ),
+ presence_penalty=presence_penalty,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ reasoning=utils.get_pydantic_model(
+ reasoning, Optional[components.ChatRequestReasoning]
+ ),
+ response_format=utils.get_pydantic_model(
+ response_format, Optional[components.ResponseFormat]
+ ),
+ seed=seed,
+ service_tier=service_tier,
+ session_id=session_id,
+ stop=stop,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
+ stream=stream,
+ stream_options=utils.get_pydantic_model(
+ stream_options, OptionalNullable[components.ChatStreamOptions]
+ ),
+ temperature=temperature,
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.ChatToolChoice]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.ChatFunctionTool]]
+ ),
+ top_logprobs=top_logprobs,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ user=user,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/presets/{slug}/chat/completions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreatePresetsChatCompletionsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.chat_request, False, False, "json", components.ChatRequest
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createPresetsChatCompletions",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.CreatePresetFromInferenceResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_presets_chat_completions_async(
+ self,
+ *,
+ slug: str,
+ messages: Union[
+ List[components.ChatMessages], List[components.ChatMessagesTypedDict]
+ ],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: OptionalNullable[float] = UNSET,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ImageConfig],
+ Dict[str, components.ImageConfigTypedDict],
+ ]
+ ] = None,
+ logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
+ logprobs: OptionalNullable[bool] = UNSET,
+ max_completion_tokens: OptionalNullable[int] = UNSET,
+ max_tokens: OptionalNullable[int] = UNSET,
+ metadata: Optional[Dict[str, str]] = None,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: OptionalNullable[float] = UNSET,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ reasoning: Optional[
+ Union[
+ components.ChatRequestReasoning,
+ components.ChatRequestReasoningTypedDict,
+ ]
+ ] = None,
+ response_format: Optional[
+ Union[components.ResponseFormat, components.ResponseFormatTypedDict]
+ ] = None,
+ seed: OptionalNullable[int] = UNSET,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
+ stop: OptionalNullable[
+ Union[components.Stop, components.StopTypedDict]
+ ] = UNSET,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
+ stream: Optional[bool] = False,
+ stream_options: OptionalNullable[
+ Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
+ ] = UNSET,
+ temperature: OptionalNullable[float] = UNSET,
+ tool_choice: Optional[
+ Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
+ ] = None,
+ tools: Optional[
+ Union[
+ List[components.ChatFunctionTool],
+ List[components.ChatFunctionToolTypedDict],
+ ]
+ ] = None,
+ top_logprobs: OptionalNullable[int] = UNSET,
+ top_p: OptionalNullable[float] = UNSET,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ user: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreatePresetFromInferenceResponse:
+ r"""Create a preset from a chat-completions request body
+
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+
+ :param slug: URL-safe slug identifying the preset. Created if it does not exist.
+ :param messages: List of messages for the conversation
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ :param debug: Debug options for inspecting request transformations (streaming only)
+ :param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
+ :param logit_bias: Token logit bias adjustments
+ :param logprobs: Return log probabilities
+ :param max_completion_tokens: Maximum tokens in completion
+ :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
+ :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
+ :param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration options for reasoning models
+ :param response_format: Response format configuration
+ :param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop: Stop sequences (up to 4)
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ :param stream: Enable streaming response
+ :param stream_options: Streaming configuration options
+ :param temperature: Sampling temperature (0-2)
+ :param tool_choice: Tool choice configuration
+ :param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
+ :param top_p: Nucleus sampling parameter (0-1)
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreatePresetsChatCompletionsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ chat_request=components.ChatRequest(
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
+ debug=utils.get_pydantic_model(
+ debug, Optional[components.ChatDebugOptions]
+ ),
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ logit_bias=logit_bias,
+ logprobs=logprobs,
+ max_completion_tokens=max_completion_tokens,
+ max_tokens=max_tokens,
+ messages=utils.get_pydantic_model(
+ messages, List[components.ChatMessages]
+ ),
+ metadata=metadata,
+ modalities=modalities,
+ model=model,
+ models=models,
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ChatRequestPlugin]]
+ ),
+ presence_penalty=presence_penalty,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ reasoning=utils.get_pydantic_model(
+ reasoning, Optional[components.ChatRequestReasoning]
+ ),
+ response_format=utils.get_pydantic_model(
+ response_format, Optional[components.ResponseFormat]
+ ),
+ seed=seed,
+ service_tier=service_tier,
+ session_id=session_id,
+ stop=stop,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
+ stream=stream,
+ stream_options=utils.get_pydantic_model(
+ stream_options, OptionalNullable[components.ChatStreamOptions]
+ ),
+ temperature=temperature,
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.ChatToolChoice]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.ChatFunctionTool]]
+ ),
+ top_logprobs=top_logprobs,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ user=user,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/presets/{slug}/chat/completions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreatePresetsChatCompletionsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.chat_request, False, False, "json", components.ChatRequest
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createPresetsChatCompletions",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.CreatePresetFromInferenceResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def create_presets_messages(
+ self,
+ *,
+ slug: str,
+ messages: Nullable[
+ Union[
+ List[components.MessagesMessageParam],
+ List[components.MessagesMessageParamTypedDict],
+ ]
+ ],
+ model: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
+ context_management: OptionalNullable[
+ Union[components.ContextManagement, components.ContextManagementTypedDict]
+ ] = UNSET,
+ max_tokens: Optional[int] = None,
+ metadata: Optional[
+ Union[components.Metadata, components.MetadataTypedDict]
+ ] = None,
+ models: Optional[List[str]] = None,
+ output_config: Optional[
+ Union[
+ components.MessagesOutputConfig,
+ components.MessagesOutputConfigTypedDict,
+ ]
+ ] = None,
+ plugins: Optional[
+ Union[
+ List[components.MessagesRequestPlugin],
+ List[components.MessagesRequestPluginTypedDict],
+ ]
+ ] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ service_tier: Optional[str] = None,
+ session_id: Optional[str] = None,
+ speed: OptionalNullable[components.Speed] = UNSET,
+ stop_sequences: Optional[List[str]] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
+ stream: Optional[bool] = None,
+ system: Optional[Union[components.System, components.SystemTypedDict]] = None,
+ temperature: Optional[float] = None,
+ thinking: Optional[
+ Union[components.Thinking, components.ThinkingTypedDict]
+ ] = None,
+ tool_choice: Optional[
+ Union[components.ToolChoice, components.ToolChoiceTypedDict]
+ ] = None,
+ tools: Optional[
+ Union[
+ List[components.MessagesRequestToolUnion],
+ List[components.MessagesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ user: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreatePresetFromInferenceResponse:
+ r"""Create a preset from a messages request body
+
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+
+ :param slug: URL-safe slug identifying the preset. Created if it does not exist.
+ :param messages:
+ :param model:
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ :param context_management:
+ :param max_tokens:
+ :param metadata:
+ :param models:
+ :param output_config: Configuration for controlling output behavior. Supports the effort parameter and structured output format.
+ :param plugins: Plugins you want to enable for this request, including their settings.
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param service_tier:
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param speed:
+ :param stop_sequences:
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ :param stream:
+ :param system:
+ :param temperature:
+ :param thinking:
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_p:
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreatePresetsMessagesRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ messages_request=components.MessagesRequest(
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
+ context_management=utils.get_pydantic_model(
+ context_management, OptionalNullable[components.ContextManagement]
+ ),
+ max_tokens=max_tokens,
+ messages=utils.get_pydantic_model(
+ messages, Nullable[List[components.MessagesMessageParam]]
+ ),
+ metadata=utils.get_pydantic_model(
+ metadata, Optional[components.Metadata]
+ ),
+ model=model,
+ models=models,
+ output_config=utils.get_pydantic_model(
+ output_config, Optional[components.MessagesOutputConfig]
+ ),
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.MessagesRequestPlugin]]
+ ),
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ service_tier=service_tier,
+ session_id=session_id,
+ speed=speed,
+ stop_sequences=stop_sequences,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
+ stream=stream,
+ system=utils.get_pydantic_model(system, Optional[components.System]),
+ temperature=temperature,
+ thinking=utils.get_pydantic_model(
+ thinking, Optional[components.Thinking]
+ ),
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.ToolChoice]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.MessagesRequestToolUnion]]
+ ),
+ top_k=top_k,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ user=user,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/presets/{slug}/messages",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreatePresetsMessagesGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.messages_request,
+ False,
+ False,
+ "json",
+ components.MessagesRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createPresetsMessages",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.CreatePresetFromInferenceResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_presets_messages_async(
+ self,
+ *,
+ slug: str,
+ messages: Nullable[
+ Union[
+ List[components.MessagesMessageParam],
+ List[components.MessagesMessageParamTypedDict],
+ ]
+ ],
+ model: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
+ context_management: OptionalNullable[
+ Union[components.ContextManagement, components.ContextManagementTypedDict]
+ ] = UNSET,
+ max_tokens: Optional[int] = None,
+ metadata: Optional[
+ Union[components.Metadata, components.MetadataTypedDict]
+ ] = None,
+ models: Optional[List[str]] = None,
+ output_config: Optional[
+ Union[
+ components.MessagesOutputConfig,
+ components.MessagesOutputConfigTypedDict,
+ ]
+ ] = None,
+ plugins: Optional[
+ Union[
+ List[components.MessagesRequestPlugin],
+ List[components.MessagesRequestPluginTypedDict],
+ ]
+ ] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ service_tier: Optional[str] = None,
+ session_id: Optional[str] = None,
+ speed: OptionalNullable[components.Speed] = UNSET,
+ stop_sequences: Optional[List[str]] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
+ stream: Optional[bool] = None,
+ system: Optional[Union[components.System, components.SystemTypedDict]] = None,
+ temperature: Optional[float] = None,
+ thinking: Optional[
+ Union[components.Thinking, components.ThinkingTypedDict]
+ ] = None,
+ tool_choice: Optional[
+ Union[components.ToolChoice, components.ToolChoiceTypedDict]
+ ] = None,
+ tools: Optional[
+ Union[
+ List[components.MessagesRequestToolUnion],
+ List[components.MessagesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ user: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreatePresetFromInferenceResponse:
+ r"""Create a preset from a messages request body
+
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+
+ :param slug: URL-safe slug identifying the preset. Created if it does not exist.
+ :param messages:
+ :param model:
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ :param context_management:
+ :param max_tokens:
+ :param metadata:
+ :param models:
+ :param output_config: Configuration for controlling output behavior. Supports the effort parameter and structured output format.
+ :param plugins: Plugins you want to enable for this request, including their settings.
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param service_tier:
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param speed:
+ :param stop_sequences:
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ :param stream:
+ :param system:
+ :param temperature:
+ :param thinking:
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_p:
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreatePresetsMessagesRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ messages_request=components.MessagesRequest(
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
+ context_management=utils.get_pydantic_model(
+ context_management, OptionalNullable[components.ContextManagement]
+ ),
+ max_tokens=max_tokens,
+ messages=utils.get_pydantic_model(
+ messages, Nullable[List[components.MessagesMessageParam]]
+ ),
+ metadata=utils.get_pydantic_model(
+ metadata, Optional[components.Metadata]
+ ),
+ model=model,
+ models=models,
+ output_config=utils.get_pydantic_model(
+ output_config, Optional[components.MessagesOutputConfig]
+ ),
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.MessagesRequestPlugin]]
+ ),
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ service_tier=service_tier,
+ session_id=session_id,
+ speed=speed,
+ stop_sequences=stop_sequences,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
+ stream=stream,
+ system=utils.get_pydantic_model(system, Optional[components.System]),
+ temperature=temperature,
+ thinking=utils.get_pydantic_model(
+ thinking, Optional[components.Thinking]
+ ),
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.ToolChoice]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.MessagesRequestToolUnion]]
+ ),
+ top_k=top_k,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ user=user,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/presets/{slug}/messages",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreatePresetsMessagesGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.messages_request,
+ False,
+ False,
+ "json",
+ components.MessagesRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createPresetsMessages",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.CreatePresetFromInferenceResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def create_presets_responses(
+ self,
+ *,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
+ frequency_penalty: OptionalNullable[float] = UNSET,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ImageConfig],
+ Dict[str, components.ImageConfigTypedDict],
+ ]
+ ] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: OptionalNullable[int] = UNSET,
+ max_tool_calls: OptionalNullable[int] = UNSET,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
+ modalities: Optional[List[components.OutputModalityEnum]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: OptionalNullable[float] = UNSET,
+ previous_response_id: OptionalNullable[str] = UNSET,
+ prompt: OptionalNullable[
+ Union[
+ components.StoredPromptTemplate,
+ components.StoredPromptTemplateTypedDict,
+ ]
+ ] = UNSET,
+ prompt_cache_key: OptionalNullable[str] = UNSET,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
+ session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
+ stream: Optional[bool] = False,
+ temperature: OptionalNullable[float] = UNSET,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
+ Union[
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
+ ]
+ ] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: OptionalNullable[int] = UNSET,
+ top_p: OptionalNullable[float] = UNSET,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreatePresetFromInferenceResponse:
+ r"""Create a preset from a responses request body
+
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+
+ :param slug: URL-safe slug identifying the preset. Created if it does not exist.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
+ :param include:
+ :param input: Input for a response request - can be a string or array of items
+ :param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
+ :param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
+ :param model:
+ :param models:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
+ :param presence_penalty:
+ :param previous_response_id:
+ :param prompt:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
+ :param safety_identifier:
+ :param service_tier:
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreatePresetsResponsesRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ responses_request=components.ResponsesRequest(
+ background=background,
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ include=include,
+ input=utils.get_pydantic_model(input, Optional[components.InputsUnion]),
+ instructions=instructions,
+ max_output_tokens=max_output_tokens,
+ max_tool_calls=max_tool_calls,
+ metadata=metadata,
+ modalities=modalities,
+ model=model,
+ models=models,
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ResponsesRequestPlugin]]
+ ),
+ presence_penalty=presence_penalty,
+ previous_response_id=previous_response_id,
+ prompt=utils.get_pydantic_model(
+ prompt, OptionalNullable[components.StoredPromptTemplate]
+ ),
+ prompt_cache_key=prompt_cache_key,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ reasoning=utils.get_pydantic_model(
+ reasoning, OptionalNullable[components.ReasoningConfig]
+ ),
+ safety_identifier=safety_identifier,
+ service_tier=service_tier,
+ session_id=session_id,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
+ stream=stream,
+ temperature=temperature,
+ text=utils.get_pydantic_model(
+ text, Optional[components.TextExtendedConfig]
+ ),
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.ResponsesRequestToolUnion]]
+ ),
+ top_k=top_k,
+ top_logprobs=top_logprobs,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ truncation=truncation,
+ user=user,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/presets/{slug}/responses",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreatePresetsResponsesGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.responses_request,
+ False,
+ False,
+ "json",
+ components.ResponsesRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createPresetsResponses",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.CreatePresetFromInferenceResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_presets_responses_async(
+ self,
+ *,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
+ frequency_penalty: OptionalNullable[float] = UNSET,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ImageConfig],
+ Dict[str, components.ImageConfigTypedDict],
+ ]
+ ] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: OptionalNullable[int] = UNSET,
+ max_tool_calls: OptionalNullable[int] = UNSET,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
+ modalities: Optional[List[components.OutputModalityEnum]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: OptionalNullable[float] = UNSET,
+ previous_response_id: OptionalNullable[str] = UNSET,
+ prompt: OptionalNullable[
+ Union[
+ components.StoredPromptTemplate,
+ components.StoredPromptTemplateTypedDict,
+ ]
+ ] = UNSET,
+ prompt_cache_key: OptionalNullable[str] = UNSET,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
+ session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
+ stream: Optional[bool] = False,
+ temperature: OptionalNullable[float] = UNSET,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
+ Union[
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
+ ]
+ ] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: OptionalNullable[int] = UNSET,
+ top_p: OptionalNullable[float] = UNSET,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreatePresetFromInferenceResponse:
+ r"""Create a preset from a responses request body
+
+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
+
+ :param slug: URL-safe slug identifying the preset. Created if it does not exist.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
+ :param include:
+ :param input: Input for a response request - can be a string or array of items
+ :param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
+ :param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
+ :param model:
+ :param models:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
+ :param presence_penalty:
+ :param previous_response_id:
+ :param prompt:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
+ :param safety_identifier:
+ :param service_tier:
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreatePresetsResponsesRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ responses_request=components.ResponsesRequest(
+ background=background,
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ include=include,
+ input=utils.get_pydantic_model(input, Optional[components.InputsUnion]),
+ instructions=instructions,
+ max_output_tokens=max_output_tokens,
+ max_tool_calls=max_tool_calls,
+ metadata=metadata,
+ modalities=modalities,
+ model=model,
+ models=models,
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ResponsesRequestPlugin]]
+ ),
+ presence_penalty=presence_penalty,
+ previous_response_id=previous_response_id,
+ prompt=utils.get_pydantic_model(
+ prompt, OptionalNullable[components.StoredPromptTemplate]
+ ),
+ prompt_cache_key=prompt_cache_key,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ reasoning=utils.get_pydantic_model(
+ reasoning, OptionalNullable[components.ReasoningConfig]
+ ),
+ safety_identifier=safety_identifier,
+ service_tier=service_tier,
+ session_id=session_id,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
+ stream=stream,
+ temperature=temperature,
+ text=utils.get_pydantic_model(
+ text, Optional[components.TextExtendedConfig]
+ ),
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.ResponsesRequestToolUnion]]
+ ),
+ top_k=top_k,
+ top_logprobs=top_logprobs,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ truncation=truncation,
+ user=user,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/presets/{slug}/responses",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreatePresetsResponsesGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.responses_request,
+ False,
+ False,
+ "json",
+ components.ResponsesRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createPresetsResponses",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.CreatePresetFromInferenceResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "409", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ConflictResponseErrorData, http_res
+ )
+ raise errors.ConflictResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def list_versions(
+ self,
+ *,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListPresetVersionsResponse]:
+ r"""List versions of a preset
+
+ Lists all versions of a preset, ordered by version number ascending (oldest first).
+
+ :param slug: URL-safe slug identifying the preset.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListPresetVersionsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/presets/{slug}/versions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListPresetVersionsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listPresetVersions",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Optional[operations.ListPresetVersionsResponse]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return None
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return None
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return None
+ next_offset = offset + len(results[0])
+
+ return self.list_versions(
+ slug=slug,
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListPresetVersionsResponse(
+ result=unmarshal_json_response(
+ components.ListPresetVersionsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_versions_async(
+ self,
+ *,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListPresetVersionsResponse]:
+ r"""List versions of a preset
+
+ Lists all versions of a preset, ordered by version number ascending (oldest first).
+
+ :param slug: URL-safe slug identifying the preset.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListPresetVersionsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/presets/{slug}/versions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListPresetVersionsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listPresetVersions",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Awaitable[Optional[operations.ListPresetVersionsResponse]]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ async def empty_result():
+ return None
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return empty_result()
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return empty_result()
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return empty_result()
+ next_offset = offset + len(results[0])
+
+ return self.list_versions_async(
+ slug=slug,
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListPresetVersionsResponse(
+ result=unmarshal_json_response(
+ components.ListPresetVersionsResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get_version(
+ self,
+ *,
+ slug: str,
+ version: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetPresetVersionResponse:
+ r"""Get a specific version of a preset
+
+ Retrieves a specific version of a preset by its slug and version number.
+
+ :param slug: URL-safe slug identifying the preset.
+ :param version: Version number of the preset.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetPresetVersionRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ version=version,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/presets/{slug}/versions/{version}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetPresetVersionGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getPresetVersion",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.GetPresetVersionResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_version_async(
+ self,
+ *,
+ slug: str,
+ version: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetPresetVersionResponse:
+ r"""Get a specific version of a preset
+
+ Retrieves a specific version of a preset by its slug and version number.
+
+ :param slug: URL-safe slug identifying the preset.
+ :param version: Version number of the preset.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetPresetVersionRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ slug=slug,
+ version=version,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/presets/{slug}/versions/{version}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetPresetVersionGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getPresetVersion",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.GetPresetVersionResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/rerank.py b/src/openrouter/rerank.py
index e8fdd1d..96401a2 100644
--- a/src/openrouter/rerank.py
+++ b/src/openrouter/rerank.py
@@ -21,7 +21,7 @@ class Rerank(BaseSDK):
def rerank(
self,
*,
- documents: List[str],
+ documents: Union[List[operations.Document], List[operations.DocumentTypedDict]],
model: str,
query: str,
http_referer: Optional[str] = None,
@@ -43,7 +43,7 @@ class Rerank(BaseSDK):
Submits a rerank request to the rerank router
- :param documents: The list of documents to rerank
+ :param documents: The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models.
:param model: The rerank model to use
:param query: The search query to rerank documents against
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -76,7 +76,9 @@ class Rerank(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
request_body=operations.CreateRerankRequestBody(
- documents=documents,
+ documents=utils.get_pydantic_model(
+ documents, List[operations.Document]
+ ),
model=model,
provider=utils.get_pydantic_model(
provider, OptionalNullable[components.ProviderPreferences]
@@ -230,7 +232,7 @@ class Rerank(BaseSDK):
async def rerank_async(
self,
*,
- documents: List[str],
+ documents: Union[List[operations.Document], List[operations.DocumentTypedDict]],
model: str,
query: str,
http_referer: Optional[str] = None,
@@ -252,7 +254,7 @@ class Rerank(BaseSDK):
Submits a rerank request to the rerank router
- :param documents: The list of documents to rerank
+ :param documents: The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models.
:param model: The rerank model to use
:param query: The search query to rerank documents against
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -285,7 +287,9 @@ class Rerank(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
request_body=operations.CreateRerankRequestBody(
- documents=documents,
+ documents=utils.get_pydantic_model(
+ documents, List[operations.Document]
+ ),
model=model,
provider=utils.get_pydantic_model(
provider, OptionalNullable[components.ProviderPreferences]
diff --git a/src/openrouter/responses.py b/src/openrouter/responses.py
index 4844bc0..944aff9 100644
--- a/src/openrouter/responses.py
+++ b/src/openrouter/responses.py
@@ -25,7 +25,14 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
Union[
@@ -71,6 +78,12 @@ class Responses(BaseSDK):
safety_identifier: OptionalNullable[str] = UNSET,
service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Union[Literal[False], None] = None,
temperature: OptionalNullable[float] = UNSET,
text: Optional[
@@ -112,7 +125,9 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
:param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param frequency_penalty:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param include:
@@ -134,7 +149,8 @@ class Responses(BaseSDK):
:param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream:
:param temperature:
:param text: Text output configuration including format and verbosity
@@ -160,7 +176,14 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
Union[
@@ -206,6 +229,12 @@ class Responses(BaseSDK):
safety_identifier: OptionalNullable[str] = UNSET,
service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Literal[True],
temperature: OptionalNullable[float] = UNSET,
text: Optional[
@@ -247,7 +276,9 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
:param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param frequency_penalty:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param include:
@@ -269,7 +300,8 @@ class Responses(BaseSDK):
:param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream:
:param temperature:
:param text: Text output configuration including format and verbosity
@@ -294,7 +326,14 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
Union[
@@ -340,6 +379,12 @@ class Responses(BaseSDK):
safety_identifier: OptionalNullable[str] = UNSET,
service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Optional[bool] = False,
temperature: OptionalNullable[float] = UNSET,
text: Optional[
@@ -381,7 +426,9 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
:param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param frequency_penalty:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param include:
@@ -403,7 +450,8 @@ class Responses(BaseSDK):
:param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream:
:param temperature:
:param text: Text output configuration including format and verbosity
@@ -435,8 +483,12 @@ class Responses(BaseSDK):
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_metadata=x_open_router_metadata,
responses_request=components.ResponsesRequest(
background=background,
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
frequency_penalty=frequency_penalty,
image_config=image_config,
include=include,
@@ -467,6 +519,10 @@ class Responses(BaseSDK):
safety_identifier=safety_identifier,
service_tier=service_tier,
session_id=session_id,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
stream=stream,
temperature=temperature,
text=utils.get_pydantic_model(
@@ -543,6 +599,7 @@ class Responses(BaseSDK):
"400",
"401",
"402",
+ "403",
"404",
"408",
"413",
@@ -570,7 +627,7 @@ class Responses(BaseSDK):
return eventstreaming.EventStream(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.CreateResponsesResponseBody
+ raw, components.ResponsesStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -597,6 +654,12 @@ class Responses(BaseSDK):
raise errors.PaymentRequiredResponseError(
response_data, http_res, http_res_text
)
+ if utils.match_response(http_res, "403", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res, http_res_text)
if utils.match_response(http_res, "404", "application/json"):
http_res_text = utils.stream_to_text(http_res)
response_data = unmarshal_json_response(
@@ -696,7 +759,14 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
Union[
@@ -742,6 +812,12 @@ class Responses(BaseSDK):
safety_identifier: OptionalNullable[str] = UNSET,
service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Union[Literal[False], None] = None,
temperature: OptionalNullable[float] = UNSET,
text: Optional[
@@ -783,7 +859,9 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
:param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param frequency_penalty:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param include:
@@ -805,7 +883,8 @@ class Responses(BaseSDK):
:param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream:
:param temperature:
:param text: Text output configuration including format and verbosity
@@ -831,7 +910,14 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
Union[
@@ -877,6 +963,12 @@ class Responses(BaseSDK):
safety_identifier: OptionalNullable[str] = UNSET,
service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Literal[True],
temperature: OptionalNullable[float] = UNSET,
text: Optional[
@@ -918,7 +1010,9 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
:param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param frequency_penalty:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param include:
@@ -940,7 +1034,8 @@ class Responses(BaseSDK):
:param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream:
:param temperature:
:param text: Text output configuration including format and verbosity
@@ -965,7 +1060,14 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
+ cache_control: Optional[
+ Union[
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
+ ]
+ ] = None,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
Union[
@@ -1011,6 +1113,12 @@ class Responses(BaseSDK):
safety_identifier: OptionalNullable[str] = UNSET,
service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
+ stop_server_tools_when: Optional[
+ Union[
+ List[components.StopServerToolsWhenCondition],
+ List[components.StopServerToolsWhenConditionTypedDict],
+ ]
+ ] = None,
stream: Optional[bool] = False,
temperature: OptionalNullable[float] = UNSET,
text: Optional[
@@ -1052,7 +1160,9 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
:param background:
+ :param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
:param frequency_penalty:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param include:
@@ -1074,7 +1184,8 @@ class Responses(BaseSDK):
:param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stop_server_tools_when: Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
:param stream:
:param temperature:
:param text: Text output configuration including format and verbosity
@@ -1106,8 +1217,12 @@ class Responses(BaseSDK):
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_metadata=x_open_router_metadata,
responses_request=components.ResponsesRequest(
background=background,
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
+ ),
frequency_penalty=frequency_penalty,
image_config=image_config,
include=include,
@@ -1138,6 +1253,10 @@ class Responses(BaseSDK):
safety_identifier=safety_identifier,
service_tier=service_tier,
session_id=session_id,
+ stop_server_tools_when=utils.get_pydantic_model(
+ stop_server_tools_when,
+ Optional[List[components.StopServerToolsWhenCondition]],
+ ),
stream=stream,
temperature=temperature,
text=utils.get_pydantic_model(
@@ -1214,6 +1333,7 @@ class Responses(BaseSDK):
"400",
"401",
"402",
+ "403",
"404",
"408",
"413",
@@ -1241,7 +1361,7 @@ class Responses(BaseSDK):
return eventstreaming.EventStreamAsync(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.CreateResponsesResponseBody
+ raw, components.ResponsesStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -1268,6 +1388,12 @@ class Responses(BaseSDK):
raise errors.PaymentRequiredResponseError(
response_data, http_res, http_res_text
)
+ if utils.match_response(http_res, "403", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res, http_res_text)
if utils.match_response(http_res, "404", "application/json"):
http_res_text = await utils.stream_to_text_async(http_res)
response_data = unmarshal_json_response(
diff --git a/src/openrouter/sdk.py b/src/openrouter/sdk.py
index 43d1636..ec179e1 100644
--- a/src/openrouter/sdk.py
+++ b/src/openrouter/sdk.py
@@ -19,18 +19,25 @@ if TYPE_CHECKING:
from openrouter.analytics import Analytics
from openrouter.api_keys import APIKeys
from openrouter.beta import Beta
+ from openrouter.byok import Byok
from openrouter.chat import Chat
from openrouter.credits import Credits
+ from openrouter.datasets import Datasets
from openrouter.embeddings import Embeddings
from openrouter.endpoints import Endpoints
from openrouter.generations import Generations
from openrouter.guardrails import Guardrails
from openrouter.models_ import Models
from openrouter.oauth import OAuth
+ from openrouter.observability import Observability
from openrouter.organization import Organization
+ from openrouter.presets import Presets
from openrouter.providers import Providers
from openrouter.rerank import Rerank
+ from openrouter.stt import Stt
+ from openrouter.tts import Tts
from openrouter.video_generation import VideoGeneration
+ from openrouter.workspaces import Workspaces
class OpenRouter(BaseSDK):
@@ -40,11 +47,20 @@ class OpenRouter(BaseSDK):
analytics: "Analytics"
r"""Analytics and usage endpoints"""
+ beta: "Beta"
+ tts: "Tts"
+ r"""Text-to-speech endpoints"""
+ stt: "Stt"
+ r"""Speech-to-text endpoints"""
o_auth: "OAuth"
r"""OAuth authentication endpoints"""
+ byok: "Byok"
+ r"""BYOK endpoints"""
chat: "Chat"
credits: "Credits"
r"""Credit management endpoints"""
+ datasets: "Datasets"
+ r"""Datasets endpoints"""
embeddings: "Embeddings"
r"""Text embedding endpoints"""
endpoints: "Endpoints"
@@ -57,31 +73,43 @@ class OpenRouter(BaseSDK):
r"""API key management endpoints"""
models: "Models"
r"""Model information endpoints"""
+ observability: "Observability"
+ r"""Observability endpoints"""
organization: "Organization"
r"""Organization endpoints"""
+ presets: "Presets"
+ r"""Presets endpoints"""
providers: "Providers"
r"""Provider information endpoints"""
rerank: "Rerank"
r"""Rerank endpoints"""
- beta: "Beta"
video_generation: "VideoGeneration"
r"""Video Generation endpoints"""
+ workspaces: "Workspaces"
+ r"""Workspaces endpoints"""
_sub_sdk_map = {
"analytics": ("openrouter.analytics", "Analytics"),
+ "beta": ("openrouter.beta", "Beta"),
+ "tts": ("openrouter.tts", "Tts"),
+ "stt": ("openrouter.stt", "Stt"),
"o_auth": ("openrouter.oauth", "OAuth"),
+ "byok": ("openrouter.byok", "Byok"),
"chat": ("openrouter.chat", "Chat"),
"credits": ("openrouter.credits", "Credits"),
+ "datasets": ("openrouter.datasets", "Datasets"),
"embeddings": ("openrouter.embeddings", "Embeddings"),
"endpoints": ("openrouter.endpoints", "Endpoints"),
"generations": ("openrouter.generations", "Generations"),
"guardrails": ("openrouter.guardrails", "Guardrails"),
"api_keys": ("openrouter.api_keys", "APIKeys"),
"models": ("openrouter.models_", "Models"),
+ "observability": ("openrouter.observability", "Observability"),
"organization": ("openrouter.organization", "Organization"),
+ "presets": ("openrouter.presets", "Presets"),
"providers": ("openrouter.providers", "Providers"),
"rerank": ("openrouter.rerank", "Rerank"),
- "beta": ("openrouter.beta", "Beta"),
"video_generation": ("openrouter.video_generation", "VideoGeneration"),
+ "workspaces": ("openrouter.workspaces", "Workspaces"),
}
def __init__(
diff --git a/src/openrouter/stt.py b/src/openrouter/stt.py
new file mode 100644
index 0000000..3b12f69
--- /dev/null
+++ b/src/openrouter/stt.py
@@ -0,0 +1,407 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Mapping, Optional, Union
+
+
+class Stt(BaseSDK):
+ r"""Speech-to-text endpoints"""
+
+ def create_transcription(
+ self,
+ *,
+ input_audio: Union[components.STTInputAudio, components.STTInputAudioTypedDict],
+ model: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ language: Optional[str] = None,
+ provider: Optional[
+ Union[components.STTRequestProvider, components.STTRequestProviderTypedDict]
+ ] = None,
+ temperature: Optional[float] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.STTResponse:
+ r"""Create transcription
+
+ Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
+
+ :param input_audio: Base64-encoded audio to transcribe
+ :param model: STT model identifier
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param language: ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted.
+ :param provider: Provider-specific passthrough configuration
+ :param temperature: Sampling temperature for transcription
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateAudioTranscriptionsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ stt_request=components.STTRequest(
+ input_audio=utils.get_pydantic_model(
+ input_audio, components.STTInputAudio
+ ),
+ language=language,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, Optional[components.STTRequestProvider]
+ ),
+ temperature=temperature,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/audio/transcriptions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateAudioTranscriptionsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.stt_request, False, False, "json", components.STTRequest
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createAudioTranscriptions",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "502",
+ "503",
+ "524",
+ "529",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.STTResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "402", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.PaymentRequiredResponseErrorData, http_res
+ )
+ raise errors.PaymentRequiredResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "502", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadGatewayResponseErrorData, http_res
+ )
+ raise errors.BadGatewayResponseError(response_data, http_res)
+ if utils.match_response(http_res, "503", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ServiceUnavailableResponseErrorData, http_res
+ )
+ raise errors.ServiceUnavailableResponseError(response_data, http_res)
+ if utils.match_response(http_res, "524", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.EdgeNetworkTimeoutResponseErrorData, http_res
+ )
+ raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res)
+ if utils.match_response(http_res, "529", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ProviderOverloadedResponseErrorData, http_res
+ )
+ raise errors.ProviderOverloadedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_transcription_async(
+ self,
+ *,
+ input_audio: Union[components.STTInputAudio, components.STTInputAudioTypedDict],
+ model: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ language: Optional[str] = None,
+ provider: Optional[
+ Union[components.STTRequestProvider, components.STTRequestProviderTypedDict]
+ ] = None,
+ temperature: Optional[float] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.STTResponse:
+ r"""Create transcription
+
+ Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
+
+ :param input_audio: Base64-encoded audio to transcribe
+ :param model: STT model identifier
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param language: ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted.
+ :param provider: Provider-specific passthrough configuration
+ :param temperature: Sampling temperature for transcription
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateAudioTranscriptionsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ stt_request=components.STTRequest(
+ input_audio=utils.get_pydantic_model(
+ input_audio, components.STTInputAudio
+ ),
+ language=language,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, Optional[components.STTRequestProvider]
+ ),
+ temperature=temperature,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/audio/transcriptions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateAudioTranscriptionsGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.stt_request, False, False, "json", components.STTRequest
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createAudioTranscriptions",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "502",
+ "503",
+ "524",
+ "529",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.STTResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "402", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.PaymentRequiredResponseErrorData, http_res
+ )
+ raise errors.PaymentRequiredResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "429", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res
+ )
+ raise errors.TooManyRequestsResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "502", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadGatewayResponseErrorData, http_res
+ )
+ raise errors.BadGatewayResponseError(response_data, http_res)
+ if utils.match_response(http_res, "503", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ServiceUnavailableResponseErrorData, http_res
+ )
+ raise errors.ServiceUnavailableResponseError(response_data, http_res)
+ if utils.match_response(http_res, "524", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.EdgeNetworkTimeoutResponseErrorData, http_res
+ )
+ raise errors.EdgeNetworkTimeoutResponseError(response_data, http_res)
+ if utils.match_response(http_res, "529", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ProviderOverloadedResponseErrorData, http_res
+ )
+ raise errors.ProviderOverloadedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/tts.py b/src/openrouter/tts.py
new file mode 100644
index 0000000..66886a4
--- /dev/null
+++ b/src/openrouter/tts.py
@@ -0,0 +1,472 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+import httpx
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Mapping, Optional, Union
+
+
+class Tts(BaseSDK):
+ r"""Text-to-speech endpoints"""
+
+ def create_speech(
+ self,
+ *,
+ input: str,
+ model: str,
+ voice: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ provider: Optional[
+ Union[
+ components.SpeechRequestProvider,
+ components.SpeechRequestProviderTypedDict,
+ ]
+ ] = None,
+ response_format: Optional[components.ResponseFormatEnum] = "pcm",
+ speed: Optional[float] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> httpx.Response:
+ r"""Create speech
+
+ Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
+
+ :param input: Text to synthesize
+ :param model: TTS model identifier
+ :param voice: Voice identifier (provider-specific).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param provider: Provider-specific passthrough configuration
+ :param response_format: Audio output format
+ :param speed: Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateAudioSpeechRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ speech_request=components.SpeechRequest(
+ input=input,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, Optional[components.SpeechRequestProvider]
+ ),
+ response_format=response_format,
+ speed=speed,
+ voice=voice,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/audio/speech",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="audio/*",
+ http_headers=http_headers,
+ _globals=operations.CreateAudioSpeechGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.speech_request, False, False, "json", components.SpeechRequest
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createAudioSpeech",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "502",
+ "503",
+ "524",
+ "529",
+ "5XX",
+ ],
+ stream=True,
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "audio/*"):
+ return http_res
+ if utils.match_response(http_res, "400", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res, http_res_text
+ )
+ raise errors.BadRequestResponseError(response_data, http_res, http_res_text)
+ if utils.match_response(http_res, "401", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res, http_res_text
+ )
+ raise errors.UnauthorizedResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "402", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.PaymentRequiredResponseErrorData, http_res, http_res_text
+ )
+ raise errors.PaymentRequiredResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "404", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res, http_res_text
+ )
+ raise errors.NotFoundResponseError(response_data, http_res, http_res_text)
+ if utils.match_response(http_res, "429", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res, http_res_text
+ )
+ raise errors.TooManyRequestsResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "500", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res, http_res_text
+ )
+ raise errors.InternalServerResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "502", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.BadGatewayResponseErrorData, http_res, http_res_text
+ )
+ raise errors.BadGatewayResponseError(response_data, http_res, http_res_text)
+ if utils.match_response(http_res, "503", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.ServiceUnavailableResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ServiceUnavailableResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "524", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.EdgeNetworkTimeoutResponseErrorData, http_res, http_res_text
+ )
+ raise errors.EdgeNetworkTimeoutResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "529", "application/json"):
+ http_res_text = utils.stream_to_text(http_res)
+ response_data = unmarshal_json_response(
+ errors.ProviderOverloadedResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ProviderOverloadedResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "Unexpected response received", http_res, http_res_text
+ )
+
+ async def create_speech_async(
+ self,
+ *,
+ input: str,
+ model: str,
+ voice: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ provider: Optional[
+ Union[
+ components.SpeechRequestProvider,
+ components.SpeechRequestProviderTypedDict,
+ ]
+ ] = None,
+ response_format: Optional[components.ResponseFormatEnum] = "pcm",
+ speed: Optional[float] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> httpx.Response:
+ r"""Create speech
+
+ Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
+
+ :param input: Text to synthesize
+ :param model: TTS model identifier
+ :param voice: Voice identifier (provider-specific).
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param provider: Provider-specific passthrough configuration
+ :param response_format: Audio output format
+ :param speed: Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateAudioSpeechRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ speech_request=components.SpeechRequest(
+ input=input,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, Optional[components.SpeechRequestProvider]
+ ),
+ response_format=response_format,
+ speed=speed,
+ voice=voice,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/audio/speech",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="audio/*",
+ http_headers=http_headers,
+ _globals=operations.CreateAudioSpeechGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.speech_request, False, False, "json", components.SpeechRequest
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createAudioSpeech",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "502",
+ "503",
+ "524",
+ "529",
+ "5XX",
+ ],
+ stream=True,
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "audio/*"):
+ return http_res
+ if utils.match_response(http_res, "400", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res, http_res_text
+ )
+ raise errors.BadRequestResponseError(response_data, http_res, http_res_text)
+ if utils.match_response(http_res, "401", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res, http_res_text
+ )
+ raise errors.UnauthorizedResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "402", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.PaymentRequiredResponseErrorData, http_res, http_res_text
+ )
+ raise errors.PaymentRequiredResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "404", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res, http_res_text
+ )
+ raise errors.NotFoundResponseError(response_data, http_res, http_res_text)
+ if utils.match_response(http_res, "429", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.TooManyRequestsResponseErrorData, http_res, http_res_text
+ )
+ raise errors.TooManyRequestsResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "500", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res, http_res_text
+ )
+ raise errors.InternalServerResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "502", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.BadGatewayResponseErrorData, http_res, http_res_text
+ )
+ raise errors.BadGatewayResponseError(response_data, http_res, http_res_text)
+ if utils.match_response(http_res, "503", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.ServiceUnavailableResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ServiceUnavailableResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "524", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.EdgeNetworkTimeoutResponseErrorData, http_res, http_res_text
+ )
+ raise errors.EdgeNetworkTimeoutResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "529", "application/json"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ response_data = unmarshal_json_response(
+ errors.ProviderOverloadedResponseErrorData, http_res, http_res_text
+ )
+ raise errors.ProviderOverloadedResponseError(
+ response_data, http_res, http_res_text
+ )
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "Unexpected response received", http_res, http_res_text
+ )
diff --git a/src/openrouter/video_generation.py b/src/openrouter/video_generation.py
index 238bbcc..30f265d 100644
--- a/src/openrouter/video_generation.py
+++ b/src/openrouter/video_generation.py
@@ -22,6 +22,7 @@ class VideoGeneration(BaseSDK):
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
aspect_ratio: Optional[components.AspectRatio] = None,
+ callback_url: Optional[str] = None,
duration: Optional[int] = None,
frame_images: Optional[
Union[List[components.FrameImage], List[components.FrameImageTypedDict]]
@@ -29,12 +30,15 @@ class VideoGeneration(BaseSDK):
generate_audio: Optional[bool] = None,
input_references: Optional[
Union[
- List[components.ContentPartImage],
- List[components.ContentPartImageTypedDict],
+ List[components.InputReference],
+ List[components.InputReferenceTypedDict],
]
] = None,
provider: Optional[
- Union[components.Provider, components.ProviderTypedDict]
+ Union[
+ components.VideoGenerationRequestProvider,
+ components.VideoGenerationRequestProviderTypedDict,
+ ]
] = None,
resolution: Optional[components.Resolution] = None,
seed: Optional[int] = None,
@@ -58,10 +62,11 @@ class VideoGeneration(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param aspect_ratio: Aspect ratio of the generated video
+ :param callback_url: URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
:param duration: Duration of the generated video in seconds
:param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
:param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
- :param input_references: Reference images to guide video generation
+ :param input_references: Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
:param provider: Provider-specific passthrough configuration
:param resolution: Resolution of the generated video
:param seed: If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
@@ -87,18 +92,19 @@ class VideoGeneration(BaseSDK):
x_open_router_categories=x_open_router_categories,
video_generation_request=components.VideoGenerationRequest(
aspect_ratio=aspect_ratio,
+ callback_url=callback_url,
duration=duration,
frame_images=utils.get_pydantic_model(
frame_images, Optional[List[components.FrameImage]]
),
generate_audio=generate_audio,
input_references=utils.get_pydantic_model(
- input_references, Optional[List[components.ContentPartImage]]
+ input_references, Optional[List[components.InputReference]]
),
model=model,
prompt=prompt,
provider=utils.get_pydantic_model(
- provider, Optional[components.Provider]
+ provider, Optional[components.VideoGenerationRequestProvider]
),
resolution=resolution,
seed=seed,
@@ -217,6 +223,7 @@ class VideoGeneration(BaseSDK):
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
aspect_ratio: Optional[components.AspectRatio] = None,
+ callback_url: Optional[str] = None,
duration: Optional[int] = None,
frame_images: Optional[
Union[List[components.FrameImage], List[components.FrameImageTypedDict]]
@@ -224,12 +231,15 @@ class VideoGeneration(BaseSDK):
generate_audio: Optional[bool] = None,
input_references: Optional[
Union[
- List[components.ContentPartImage],
- List[components.ContentPartImageTypedDict],
+ List[components.InputReference],
+ List[components.InputReferenceTypedDict],
]
] = None,
provider: Optional[
- Union[components.Provider, components.ProviderTypedDict]
+ Union[
+ components.VideoGenerationRequestProvider,
+ components.VideoGenerationRequestProviderTypedDict,
+ ]
] = None,
resolution: Optional[components.Resolution] = None,
seed: Optional[int] = None,
@@ -253,10 +263,11 @@ class VideoGeneration(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param aspect_ratio: Aspect ratio of the generated video
+ :param callback_url: URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.
:param duration: Duration of the generated video in seconds
:param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
:param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
- :param input_references: Reference images to guide video generation
+ :param input_references: Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
:param provider: Provider-specific passthrough configuration
:param resolution: Resolution of the generated video
:param seed: If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
@@ -282,18 +293,19 @@ class VideoGeneration(BaseSDK):
x_open_router_categories=x_open_router_categories,
video_generation_request=components.VideoGenerationRequest(
aspect_ratio=aspect_ratio,
+ callback_url=callback_url,
duration=duration,
frame_images=utils.get_pydantic_model(
frame_images, Optional[List[components.FrameImage]]
),
generate_audio=generate_audio,
input_references=utils.get_pydantic_model(
- input_references, Optional[List[components.ContentPartImage]]
+ input_references, Optional[List[components.InputReference]]
),
model=model,
prompt=prompt,
provider=utils.get_pydantic_model(
- provider, Optional[components.Provider]
+ provider, Optional[components.VideoGenerationRequestProvider]
),
resolution=resolution,
seed=seed,
diff --git a/src/openrouter/workspaces.py b/src/openrouter/workspaces.py
new file mode 100644
index 0000000..1330688
--- /dev/null
+++ b/src/openrouter/workspaces.py
@@ -0,0 +1,2143 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from jsonpath import JSONPath
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union
+
+
+class Workspaces(BaseSDK):
+ r"""Workspaces endpoints"""
+
+ def list(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListWorkspacesResponse]:
+ r"""List workspaces
+
+ List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListWorkspacesRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/workspaces",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListWorkspacesGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listWorkspaces",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Optional[operations.ListWorkspacesResponse]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return None
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return None
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return None
+ next_offset = offset + len(results[0])
+
+ return self.list(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListWorkspacesResponse(
+ result=unmarshal_json_response(
+ components.ListWorkspacesResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListWorkspacesResponse]:
+ r"""List workspaces
+
+ List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param offset: Number of records to skip for pagination
+ :param limit: Maximum number of records to return (max 100)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.ListWorkspacesRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/workspaces",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.ListWorkspacesGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="listWorkspaces",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ def next_func() -> Awaitable[Optional[operations.ListWorkspacesResponse]]:
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
+
+ async def empty_result():
+ return None
+
+ offset = request.offset if not request.offset is None else 0
+
+ if not http_res.text:
+ return empty_result()
+ results = JSONPath("$.data").parse(body)
+ if len(results) == 0 or len(results[0]) == 0:
+ return empty_result()
+ limit = request.limit if not request.limit is None else 0
+ if len(results[0]) < limit:
+ return empty_result()
+ next_offset = offset + len(results[0])
+
+ return self.list_async(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ offset=next_offset,
+ limit=limit,
+ retries=retries,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return operations.ListWorkspacesResponse(
+ result=unmarshal_json_response(
+ components.ListWorkspacesResponse, http_res
+ ),
+ next=next_func,
+ )
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def create(
+ self,
+ *,
+ name: str,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ default_image_model: OptionalNullable[str] = UNSET,
+ default_provider_sort: OptionalNullable[str] = UNSET,
+ default_text_model: OptionalNullable[str] = UNSET,
+ description: OptionalNullable[str] = UNSET,
+ io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET,
+ io_logging_sampling_rate: Optional[float] = None,
+ is_data_discount_logging_enabled: Optional[bool] = None,
+ is_observability_broadcast_enabled: Optional[bool] = None,
+ is_observability_io_logging_enabled: Optional[bool] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreateWorkspaceResponse:
+ r"""Create a workspace
+
+ Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param name: Name for the new workspace
+ :param slug: URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param default_image_model: Default image model for this workspace
+ :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto)
+ :param default_text_model: Default text model for this workspace
+ :param description: Description of the workspace
+ :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging
+ :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1)
+ :param is_data_discount_logging_enabled: Whether data discount logging is enabled
+ :param is_observability_broadcast_enabled: Whether broadcast is enabled
+ :param is_observability_io_logging_enabled: Whether private logging is enabled
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ create_workspace_request=components.CreateWorkspaceRequest(
+ default_image_model=default_image_model,
+ default_provider_sort=default_provider_sort,
+ default_text_model=default_text_model,
+ description=description,
+ io_logging_api_key_ids=io_logging_api_key_ids,
+ io_logging_sampling_rate=io_logging_sampling_rate,
+ is_data_discount_logging_enabled=is_data_discount_logging_enabled,
+ is_observability_broadcast_enabled=is_observability_broadcast_enabled,
+ is_observability_io_logging_enabled=is_observability_io_logging_enabled,
+ name=name,
+ slug=slug,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/workspaces",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_workspace_request,
+ False,
+ False,
+ "json",
+ components.CreateWorkspaceRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "201", "application/json"):
+ return unmarshal_json_response(components.CreateWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def create_async(
+ self,
+ *,
+ name: str,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ default_image_model: OptionalNullable[str] = UNSET,
+ default_provider_sort: OptionalNullable[str] = UNSET,
+ default_text_model: OptionalNullable[str] = UNSET,
+ description: OptionalNullable[str] = UNSET,
+ io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET,
+ io_logging_sampling_rate: Optional[float] = None,
+ is_data_discount_logging_enabled: Optional[bool] = None,
+ is_observability_broadcast_enabled: Optional[bool] = None,
+ is_observability_io_logging_enabled: Optional[bool] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.CreateWorkspaceResponse:
+ r"""Create a workspace
+
+ Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param name: Name for the new workspace
+ :param slug: URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param default_image_model: Default image model for this workspace
+ :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto)
+ :param default_text_model: Default text model for this workspace
+ :param description: Description of the workspace
+ :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging
+ :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1)
+ :param is_data_discount_logging_enabled: Whether data discount logging is enabled
+ :param is_observability_broadcast_enabled: Whether broadcast is enabled
+ :param is_observability_io_logging_enabled: Whether private logging is enabled
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.CreateWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ create_workspace_request=components.CreateWorkspaceRequest(
+ default_image_model=default_image_model,
+ default_provider_sort=default_provider_sort,
+ default_text_model=default_text_model,
+ description=description,
+ io_logging_api_key_ids=io_logging_api_key_ids,
+ io_logging_sampling_rate=io_logging_sampling_rate,
+ is_data_discount_logging_enabled=is_data_discount_logging_enabled,
+ is_observability_broadcast_enabled=is_observability_broadcast_enabled,
+ is_observability_io_logging_enabled=is_observability_io_logging_enabled,
+ name=name,
+ slug=slug,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/workspaces",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.CreateWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_workspace_request,
+ False,
+ False,
+ "json",
+ components.CreateWorkspaceRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="createWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "201", "application/json"):
+ return unmarshal_json_response(components.CreateWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def delete(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> 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.
+
+ :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.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.DeleteWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="DELETE",
+ path="/workspaces/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.DeleteWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="deleteWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.DeleteWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def delete_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> 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.
+
+ :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.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.DeleteWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="DELETE",
+ path="/workspaces/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.DeleteWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="deleteWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.DeleteWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetWorkspaceResponse:
+ r"""Get a workspace
+
+ Get a single workspace by ID or slug. [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.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/workspaces/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.GetWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.GetWorkspaceResponse:
+ r"""Get a workspace
+
+ Get a single workspace by ID or slug. [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.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.GetWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/workspaces/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.GetWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="getWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.GetWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def update(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ default_image_model: OptionalNullable[str] = UNSET,
+ default_provider_sort: OptionalNullable[str] = UNSET,
+ default_text_model: OptionalNullable[str] = UNSET,
+ description: OptionalNullable[str] = UNSET,
+ io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET,
+ io_logging_sampling_rate: Optional[float] = None,
+ is_data_discount_logging_enabled: Optional[bool] = None,
+ is_observability_broadcast_enabled: Optional[bool] = None,
+ is_observability_io_logging_enabled: Optional[bool] = None,
+ name: Optional[str] = None,
+ slug: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.UpdateWorkspaceResponse:
+ r"""Update a workspace
+
+ Update an existing workspace by ID or slug. [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.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param default_image_model: Default image model for this workspace
+ :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto)
+ :param default_text_model: Default text model for this workspace
+ :param description: New description for the workspace
+ :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging
+ :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1)
+ :param is_data_discount_logging_enabled: Whether data discount logging is enabled
+ :param is_observability_broadcast_enabled: Whether broadcast is enabled
+ :param is_observability_io_logging_enabled: Whether private logging is enabled
+ :param name: New name for the workspace
+ :param slug: New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.UpdateWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ update_workspace_request=components.UpdateWorkspaceRequest(
+ default_image_model=default_image_model,
+ default_provider_sort=default_provider_sort,
+ default_text_model=default_text_model,
+ description=description,
+ io_logging_api_key_ids=io_logging_api_key_ids,
+ io_logging_sampling_rate=io_logging_sampling_rate,
+ is_data_discount_logging_enabled=is_data_discount_logging_enabled,
+ is_observability_broadcast_enabled=is_observability_broadcast_enabled,
+ is_observability_io_logging_enabled=is_observability_io_logging_enabled,
+ name=name,
+ slug=slug,
+ ),
+ )
+
+ req = self._build_request(
+ method="PATCH",
+ path="/workspaces/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.UpdateWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.update_workspace_request,
+ False,
+ False,
+ "json",
+ components.UpdateWorkspaceRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="updateWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.UpdateWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def update_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ default_image_model: OptionalNullable[str] = UNSET,
+ default_provider_sort: OptionalNullable[str] = UNSET,
+ default_text_model: OptionalNullable[str] = UNSET,
+ description: OptionalNullable[str] = UNSET,
+ io_logging_api_key_ids: OptionalNullable[List[int]] = UNSET,
+ io_logging_sampling_rate: Optional[float] = None,
+ is_data_discount_logging_enabled: Optional[bool] = None,
+ is_observability_broadcast_enabled: Optional[bool] = None,
+ is_observability_io_logging_enabled: Optional[bool] = None,
+ name: Optional[str] = None,
+ slug: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.UpdateWorkspaceResponse:
+ r"""Update a workspace
+
+ Update an existing workspace by ID or slug. [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.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param default_image_model: Default image model for this workspace
+ :param default_provider_sort: Default provider sort preference (price, throughput, latency, exacto)
+ :param default_text_model: Default text model for this workspace
+ :param description: New description for the workspace
+ :param io_logging_api_key_ids: Optional array of API key IDs to filter I/O logging
+ :param io_logging_sampling_rate: Sampling rate for I/O logging (0.0001-1)
+ :param is_data_discount_logging_enabled: Whether data discount logging is enabled
+ :param is_observability_broadcast_enabled: Whether broadcast is enabled
+ :param is_observability_io_logging_enabled: Whether private logging is enabled
+ :param name: New name for the workspace
+ :param slug: New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.UpdateWorkspaceRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ update_workspace_request=components.UpdateWorkspaceRequest(
+ default_image_model=default_image_model,
+ default_provider_sort=default_provider_sort,
+ default_text_model=default_text_model,
+ description=description,
+ io_logging_api_key_ids=io_logging_api_key_ids,
+ io_logging_sampling_rate=io_logging_sampling_rate,
+ is_data_discount_logging_enabled=is_data_discount_logging_enabled,
+ is_observability_broadcast_enabled=is_observability_broadcast_enabled,
+ is_observability_io_logging_enabled=is_observability_io_logging_enabled,
+ name=name,
+ slug=slug,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="PATCH",
+ path="/workspaces/{id}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.UpdateWorkspaceGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.update_workspace_request,
+ False,
+ False,
+ "json",
+ components.UpdateWorkspaceRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="updateWorkspace",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(components.UpdateWorkspaceResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def bulk_add_members(
+ self,
+ *,
+ id: str,
+ user_ids: List[str],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.BulkAddWorkspaceMembersResponse:
+ r"""Bulk add members to a workspace
+
+ Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The workspace ID (UUID) or slug
+ :param user_ids: List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.BulkAddWorkspaceMembersRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ bulk_add_workspace_members_request=components.BulkAddWorkspaceMembersRequest(
+ user_ids=user_ids,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/workspaces/{id}/members/add",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.BulkAddWorkspaceMembersGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bulk_add_workspace_members_request,
+ False,
+ False,
+ "json",
+ components.BulkAddWorkspaceMembersRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="bulkAddWorkspaceMembers",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.BulkAddWorkspaceMembersResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def bulk_add_members_async(
+ self,
+ *,
+ id: str,
+ user_ids: List[str],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.BulkAddWorkspaceMembersResponse:
+ r"""Bulk add members to a workspace
+
+ Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The workspace ID (UUID) or slug
+ :param user_ids: List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.BulkAddWorkspaceMembersRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ bulk_add_workspace_members_request=components.BulkAddWorkspaceMembersRequest(
+ user_ids=user_ids,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/workspaces/{id}/members/add",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.BulkAddWorkspaceMembersGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bulk_add_workspace_members_request,
+ False,
+ False,
+ "json",
+ components.BulkAddWorkspaceMembersRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="bulkAddWorkspaceMembers",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.BulkAddWorkspaceMembersResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def bulk_remove_members(
+ self,
+ *,
+ id: str,
+ user_ids: List[str],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.BulkRemoveWorkspaceMembersResponse:
+ r"""Bulk remove members from a workspace
+
+ Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The workspace ID (UUID) or slug
+ :param user_ids: List of user IDs to remove from the workspace
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.BulkRemoveWorkspaceMembersRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ bulk_remove_workspace_members_request=components.BulkRemoveWorkspaceMembersRequest(
+ user_ids=user_ids,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/workspaces/{id}/members/remove",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.BulkRemoveWorkspaceMembersGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bulk_remove_workspace_members_request,
+ False,
+ False,
+ "json",
+ components.BulkRemoveWorkspaceMembersRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="bulkRemoveWorkspaceMembers",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.BulkRemoveWorkspaceMembersResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def bulk_remove_members_async(
+ self,
+ *,
+ id: str,
+ user_ids: List[str],
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.BulkRemoveWorkspaceMembersResponse:
+ r"""Bulk remove members from a workspace
+
+ Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The workspace ID (UUID) or slug
+ :param user_ids: List of user IDs to remove from the workspace
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ :param http_headers: Additional headers to set or replace on requests.
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+ else:
+ base_url = self._get_url(base_url, url_variables)
+
+ request = operations.BulkRemoveWorkspaceMembersRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ bulk_remove_workspace_members_request=components.BulkRemoveWorkspaceMembersRequest(
+ user_ids=user_ids,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/workspaces/{id}/members/remove",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ http_headers=http_headers,
+ _globals=operations.BulkRemoveWorkspaceMembersGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bulk_remove_workspace_members_request,
+ False,
+ False,
+ "json",
+ components.BulkRemoveWorkspaceMembersRequest,
+ ),
+ allow_empty_value=None,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ config=self.sdk_configuration,
+ base_url=base_url or "",
+ operation_id="bulkRemoveWorkspaceMembers",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.BulkRemoveWorkspaceMembersResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "403", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.ForbiddenResponseErrorData, http_res
+ )
+ raise errors.ForbiddenResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/uv.lock b/uv.lock
index f7af3d4..72f33e0 100644
--- a/uv.lock
+++ b/uv.lock
@@ -220,7 +220,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "0.9.1"
+version = "0.9.2"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },