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 8f932cd..9a8b3eb 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: a5a26ceea3717a2997eaa993ed7bcccf
docVersion: 1.0.0
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: 8bbe77fe-07fe-495a-a74a-c18b514e1366
+ pristine_commit_hash: 29e91dd2347d037ff61778019fc7e7b5fe3e9af8
+ pristine_tree_hash: b709cc7d5cec3b5986840068cb24ee4219ca63a7
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
@@ -132,6 +134,10 @@ trackedFiles:
id: 980004cae93f
last_write_checksum: sha1:6f66927f536c351dcfbb940672511bd8a6fdd1a0
pristine_git_object: 32e8fd42002d9379fa207d0867b428c443a63a42
+ docs/components/apitype.md:
+ id: "0e0508573603"
+ last_write_checksum: sha1:197a0eb64a2c9d6a631e2d8353df6fba49ee6247
+ pristine_git_object: e1ca91596a1831fbc0a9161699db3c5bbc10f2fc
docs/components/applypatchservertool.md:
id: 924a4805520a
last_write_checksum: sha1:f87ee16357b393e199bf0a4ba74e02130f1f243b
@@ -228,6 +234,14 @@ trackedFiles:
id: c161e7a17271
last_write_checksum: sha1:4f3c5e5dda570bb87ec7e2deff31e2372f36b833
pristine_git_object: 031166f6d79ea3ef1781e95468197271da98738f
+ 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 +258,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
@@ -414,8 +436,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:b8ef7854c248c31c45327f7ce1fa6ae729d574db
+ pristine_git_object: 373d51769162ca4c578d67c34a672f9b564d0cd9
docs/components/chatfunctiontoolfunction.md:
id: 0de29ccfd817
last_write_checksum: sha1:0a25d1c9b64f1da2513e9153682848cf41f324b2
@@ -458,16 +480,16 @@ trackedFiles:
pristine_git_object: 617ce2091e37323ba91ec47c7e1a6ccff420a710
docs/components/chatrequestplugin.md:
id: 24a908f99472
- last_write_checksum: sha1:872a0f5dec13b33dac3aba3616a1b45ce5352feb
- pristine_git_object: 3fcb3f49302af9c7394c00f4946576c5e3ebdabd
+ last_write_checksum: sha1:538a99bb1e80b20be3d701a5f93f43d6d393fe63
+ pristine_git_object: 9b69aa5af1a7e56c08251d08bc8401f93bf00683
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
@@ -486,8 +508,8 @@ trackedFiles:
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 +522,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
@@ -582,8 +608,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,8 +624,8 @@ trackedFiles:
pristine_git_object: 95203396fad26d48c76b23f3481b6167291500e5
docs/components/chatwebsearchshorthand.md:
id: 97a5522cf188
- last_write_checksum: sha1:3058010c14073b6e201adb7400622a012abfea4e
- pristine_git_object: 638c8a94151ac17091347e705f6eb35399b70d98
+ last_write_checksum: sha1:f4b1cabd403350f288ec54ff0e52aff9079588e0
+ pristine_git_object: a5acdabb48653e8916b143b164ffd04c923f8269
docs/components/chatwebsearchshorthandtype.md:
id: ec8d82e4169d
last_write_checksum: sha1:11a35b858e9630405ffdde10c89e60ed33fbed45
@@ -664,6 +690,26 @@ trackedFiles:
id: beda1b89c7a4
last_write_checksum: sha1:f513446b0c8b1cb3a34ed6721bd716536ffbae47
pristine_git_object: 9be5b3ce474de60fa8116325313e5a8d9ebe188d
+ 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:9599772b86c05e215f6429d2ea1d6b34b6791404
+ pristine_git_object: 967a11eaa79582e3746e94eaa25ff141450c0c58
+ 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
@@ -714,24 +760,28 @@ trackedFiles:
pristine_git_object: 4922c8b3bb952f712fcc0cf414dd5b505ed2c4a4
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/createguardrailrequest.md:
id: 5144188aed43
- last_write_checksum: sha1:78119c6dd8cc0b40009afb1da489638ac35f16b6
- pristine_git_object: 77b840640f4d30cf4513745df984d3a950b76c12
+ last_write_checksum: sha1:49210742169a42201632331501ed175211f975c0
+ pristine_git_object: fcd333e9826e41052899cad74cbcea2532c9b4c6
docs/components/createguardrailresponse.md:
id: 94a5ed00d7b9
- last_write_checksum: sha1:bad318ece1219797a8db60631961006554b38cda
- pristine_git_object: bf3c2f7a4c16ba60ecac1fef7a733cfe6c9efb3b
+ last_write_checksum: sha1:75752f40a309176f17c99306a16ac0d197968190
+ pristine_git_object: ff2c8ad048f37007a5c7ae9c19df14dd430a310a
+ docs/components/createworkspacerequest.md:
+ id: c81e27cca23b
+ last_write_checksum: sha1:6e5de80db8ee24f55deae73cdebc4d86a71702d5
+ pristine_git_object: 4cba0551ddd374bc7e1194e7093a877b4a3894d4
+ 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
docs/components/datacollection.md:
id: cacd95d2ebf9
last_write_checksum: sha1:1d9eb4c12467860d5ef9edceb6456a4b9d6de643
@@ -756,6 +806,10 @@ trackedFiles:
id: 78770374c8ed
last_write_checksum: sha1:1ceae5a23d706b158b011b234d968a0fd495d2fc
pristine_git_object: 7e0a483e6690842ba12d2a9349a9e2f0c79df8c9
+ 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
@@ -824,6 +878,14 @@ trackedFiles:
id: 7038976c6de5
last_write_checksum: sha1:fa890164de181096fd8c1c3b208c2c783c193b2f
pristine_git_object: b23f0fb57a0dead83ce5f3bb69a809bc1e1fbf00
+ 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
@@ -978,8 +1040,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
@@ -1012,14 +1074,38 @@ trackedFiles:
id: 88a512c5f9ce
last_write_checksum: sha1:611201e2dbd2c8fe1c501b5365bc06367bc5370c
pristine_git_object: 2f4629220306ced5674a9ef70dbcbce1f908b93a
+ 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:9dd999978ce9f10c80454237a3456b8d7e5c0422
+ pristine_git_object: ca853a46aa5a900b45382bb0daac5e7e04352376
docs/components/getguardrailresponse.md:
id: eac79c96805c
- last_write_checksum: sha1:da1d99fad316a21e9db253b30bbf9d590062fc59
- pristine_git_object: d7de0f8ddb4847ec9c60c25f3d46ab408aac707d
+ last_write_checksum: sha1:300933194b67a56550e1c7b55f99dc10850646d1
+ pristine_git_object: 37baa9239d2dd410ebe7eee4441b4ae349af07e2
+ docs/components/getworkspaceresponse.md:
+ id: b65ac2b42215
+ last_write_checksum: sha1:f4bd96439e0ae998bb2712b603f3a94638e398ff
+ pristine_git_object: 96104ecd0f4117d4004ba5b2f7c488988ca40f2a
docs/components/guardrail.md:
id: ce84902d4cc2
- last_write_checksum: sha1:bf7a0be7e156abadc6adf0d426c40bf7c088bcd0
- pristine_git_object: 994b02604a9be6a0e9705b182621e9a2df085864
+ last_write_checksum: sha1:af56476430e7005d35cd8f50984b79a39aaeae56
+ pristine_git_object: cf0dc2d44ec2df68ad8ece0bdf9724fad0031c9f
docs/components/guardrailinterval.md:
id: 79efeedcb880
last_write_checksum: sha1:3c071c14943c7b26474847eee46925ae884a8a6b
@@ -1070,16 +1156,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 +1182,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
@@ -1258,8 +1352,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:53e884572725541be9c31969cbf9263d1a7be61c
+ pristine_git_object: a2080d73d89f3044d5ebc55b2ee5a67645e2bb5e
docs/components/inputtext.md:
id: cf4503b3219c
last_write_checksum: sha1:af646125dfffda8cb71e15c602fcd4823b85f3ab
@@ -1272,6 +1366,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
@@ -1324,6 +1422,10 @@ trackedFiles:
id: b34008c23794
last_write_checksum: sha1:a80fc686dfb13c7179c1a49808ca9d10fbca0cec
pristine_git_object: 16092238affd61950df82d45bc46ae0be98df7b3
+ docs/components/listworkspacesresponse.md:
+ id: 8cc6fbfc9dfb
+ last_write_checksum: sha1:ad9f94ea6eafd3cbd5d2c2dca61b3ac6f0403a1f
+ pristine_git_object: c4b9ff0e4cc402706ad28c35f75189aa2478470a
docs/components/logprob.md:
id: 351b5c050527
last_write_checksum: sha1:fce93846d1c33a013a40764c5e00e6191982bdbf
@@ -1348,6 +1450,10 @@ trackedFiles:
id: 6b23dc8e3b8d
last_write_checksum: sha1:af1899a519c3c3b50871014b17b50153050b59e8
pristine_git_object: 39f5ae21785874af1f2ef0000e9fcecc000ec8fd
+ docs/components/metadatalevel.md:
+ id: 9f671abd00b9
+ last_write_checksum: sha1:6238f82ab3af2fe7bf4a1e3945d5612e59afcde3
+ pristine_git_object: febc8ad20cad1050527f99760668d7e0770da391
docs/components/modality.md:
id: c06a1698adc6
last_write_checksum: sha1:9bbac55e2cb009dfd90e129cf3abd35dcab6d2ac
@@ -1362,8 +1468,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 +1492,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
@@ -1422,8 +1532,8 @@ trackedFiles:
pristine_git_object: a62341bd1e17c836ec7539bd7d8e494a1a5184dc
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
@@ -1550,8 +1660,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 +1678,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
@@ -1578,8 +1692,8 @@ trackedFiles:
pristine_git_object: 947a0b4decad7398ad4ddd0ff70a3a8cf95c5e87
docs/components/options.md:
id: d57f3108a48d
- last_write_checksum: sha1:33aba904de1c5bbbb772a34eaf56daa859a81143
- pristine_git_object: e695cb694be73ef388c6039ef8803a6ce146e500
+ last_write_checksum: sha1:32e7523d723da0e7f8701072e08cbdb848d66ea4
+ pristine_git_object: 37678c8b28f00d00845ef16bd8f3ec08021b6825
docs/components/order.md:
id: 16e6ae6962e7
last_write_checksum: sha1:a060705e562a2f3fc024c4fd8aa80604535b0bc1
@@ -1666,8 +1780,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
@@ -1702,8 +1816,8 @@ 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
@@ -1722,8 +1836,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:58d753ef954e4e8d45c7d74a14257fac307eaf3d
+ pristine_git_object: 146c12f4dd9b8583c2a7874d80362b9182b1bb1b
docs/components/outputlogs.md:
id: 0821eefe9546
last_write_checksum: sha1:1ff4592093bd2fe28038cc8db28bee6a35025c96
@@ -1834,8 +1948,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 +1978,14 @@ 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/outputtexteditorservertoolitem.md:
id: 6c114519044a
last_write_checksum: sha1:7b90b5ce30ff6df03376e337e266dbdadfa751c0
@@ -1886,8 +2008,8 @@ 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
@@ -1896,22 +2018,42 @@ trackedFiles:
id: 7d5a537f4c7c
last_write_checksum: sha1:7b1b7592236a4bfcba7eeae5d67d86579c86679d
pristine_git_object: 8b512f47e3ea22da48a6ef9c9f2a664ca80b9751
+ 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:e1230e257231a76100eee042a3945a314cb178df
+ pristine_git_object: 8557c96482d7733dc86ca9ac847cf90650867b61
+ 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/partition.md:
id: cc74439b2251
last_write_checksum: sha1:de88a6dedcd65f73fca2bd1913f7cbfd0d62a4ba
@@ -1960,6 +2102,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
@@ -2000,14 +2150,14 @@ trackedFiles:
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:40a8892dc7444eed9a9bb21aa4e6d284e07c3b39
+ pristine_git_object: e0cbabe201ff59dbf79ce5c354da537b9cc33c69
+ docs/components/provideroptions.md:
+ id: 48594a6d2d81
+ last_write_checksum: sha1:fc96de0665e248a1ee271980bc4943ea1e6d5ecb
+ pristine_git_object: 9e5a32a90381196a8bafdcbb9f46b3b3cf95bd72
docs/components/provideroverloadedresponseerrordata.md:
id: c2a8cc4ec6df
last_write_checksum: sha1:1d206d00dc0d91b5ceec470579c6ce345cc23d29
@@ -2022,8 +2172,8 @@ trackedFiles:
pristine_git_object: 9dca4ee9d4a9ec0a46ce21fb3823f05e8e119334
docs/components/providerresponseprovidername.md:
id: 800bab487911
- last_write_checksum: sha1:befe2d2077d8abc969729b09ce4aba6a2b14bb37
- pristine_git_object: 73838c84a7682a4b6903b0ab3383b6514ca6951e
+ last_write_checksum: sha1:544fb648b28710b2d8a23e3893c13cc4240aa3aa
+ pristine_git_object: 3f6ac671cb45a589232ad0c104d7e5a6dbf71d8b
docs/components/providersort.md:
id: 290449b1880f
last_write_checksum: sha1:f15d65e5c226a222c3bfc0b9f55dd9ca0443d415
@@ -2244,6 +2394,10 @@ trackedFiles:
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
@@ -2278,8 +2432,8 @@ trackedFiles:
pristine_git_object: fa27d12757cb1759f2d445125705def9e13a57b9
docs/components/responsesrequestplugin.md:
id: 20da7be12bb9
- last_write_checksum: sha1:14dbd6cd32c51d333548f2c43772c43540dc97fd
- pristine_git_object: 39234e56fbc2e0bc654e55a7811fca1169ded5da
+ last_write_checksum: sha1:a743d9108f994a7ff4c01e96e9048ec4e1d3e99c
+ pristine_git_object: d7c9512bf08ec8f5e491960fac30866228dc5d69
docs/components/responsesrequestservicetier.md:
id: 79d0f5c6bdbe
last_write_checksum: sha1:759cbf960f90a2680f905be11049e8f88cf6ecda
@@ -2290,12 +2444,28 @@ trackedFiles:
pristine_git_object: 98ae0961e2afdbf95cdc71e2eee23c9c06972889
docs/components/responsesrequesttoolunion.md:
id: d6a807777d03
- last_write_checksum: sha1:31403e31e2adebdf6ed12d7c2ddc24637826381e
- pristine_git_object: 944ee6cc07e0e55107e75679efeaf3fa65e0a1d7
+ last_write_checksum: sha1:dc62812bc7609748f804d85e431aebcbf6df700a
+ pristine_git_object: cd7293375ea730cca4fd28461c2266787f9e2aba
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:16ba4867fadf7b8c1b9b81a88de58f86bff59776
+ pristine_git_object: f8f7679d54952c3476d24b54e1eaff0b8056b1f7
docs/components/searchcontextsizeenum.md:
id: ba037b375d32
last_write_checksum: sha1:1802fbb5223f07b0db2e7503e12f59647b3608f9
@@ -2306,8 +2476,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:90dea358785b675667f739970aaf2d4cf1c958bc
+ pristine_git_object: f9eaa018221809ae46078c14c4ca501f8aa5cdd3
docs/components/security.md:
id: beee40001fda
last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf
@@ -2332,6 +2502,18 @@ trackedFiles:
id: 063e11fe2d35
last_write_checksum: sha1:c8046f6bc1c8c61e823f49c846fe7ee6af3d0cdc
pristine_git_object: 4b07bd1be51b737783b69c8b3d71725fd4484a25
+ docs/components/source.md:
+ id: feb017a05936
+ last_write_checksum: sha1:a48ca75c018f33451db625fb286fdf61a85d9f6d
+ pristine_git_object: 2ef36bd52d476406de7bbd31f9b95a9b3a96339c
+ 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/stop.md:
id: 0d74a157c3ba
last_write_checksum: sha1:f1b797e3188274e4411a26f0934c1d455bd85bbb
@@ -2392,6 +2574,26 @@ 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
@@ -2412,14 +2614,6 @@ trackedFiles:
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/textdeltaevent.md:
id: 339fe3591c0d
last_write_checksum: sha1:97aed7ba0e23221806738f4ed7819f8aec0db957
@@ -2438,12 +2632,8 @@ 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/tokenizer.md:
id: f1ad3417d8d1
last_write_checksum: sha1:4223f630f7d880b9288fb654f67817560fb2dbd8
@@ -2512,10 +2702,6 @@ trackedFiles:
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/typewebsearchcall.md:
id: d4647ca78da9
last_write_checksum: sha1:0abbaba9c6c9a3722f755516331a80d5a1e7aac6
@@ -2530,12 +2716,20 @@ trackedFiles:
pristine_git_object: 9ccd3c05cd75915c70aa542bb16e2a8f77bb91cd
docs/components/updateguardrailrequest.md:
id: 5a0fb143eaab
- last_write_checksum: sha1:76435a23043cc77dfcfd7aab0be4cfbc6de6a7e5
- pristine_git_object: 36829dd7af525b1289daa3a84c583689dc5ae125
+ last_write_checksum: sha1:9fd90077f6903aaf6ff0babf74071b08fb3ea1c0
+ pristine_git_object: b296a3465801e0443cd851b50e8a2ef5dd5b537c
docs/components/updateguardrailresponse.md:
id: 311d3e7a185a
- last_write_checksum: sha1:240e2fc38ee1954caf6afb473cd9d85030b28285
- pristine_git_object: d88f7735cfa90be90763bbcfc7cbf1b8e12d7cf4
+ last_write_checksum: sha1:6ef9cb86d732775c44ec679c6ece9e73b1bfdd4b
+ pristine_git_object: 5a0e4a701bf5b815db84cc352c7e7ec7565c4013
+ docs/components/updateworkspacerequest.md:
+ id: 0fa61bf22fc1
+ last_write_checksum: sha1:fe8d686883a7721d6eec31c84d0d78f07e3d6332
+ pristine_git_object: a37417cf559284935bdab22521b77dd7b83391fe
+ 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,8 +2740,16 @@ trackedFiles:
pristine_git_object: 2b6e38f54f447f8fc794d3c35c1a0bc690cc4d2e
docs/components/usage.md:
id: 15e3eea02540
- last_write_checksum: sha1:f012bc7dd75b18e1aeea794c46f3ea666911d339
- pristine_git_object: a7798add67edd29c8712284fb383a59183932157
+ 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/value1.md:
id: a13f75759dc0
last_write_checksum: sha1:0c7d94ae129961ad32dbc85fdc0958596316939b
@@ -2560,10 +2762,18 @@ trackedFiles:
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/videogenerationrequest.md:
id: cacead3ac9fe
- last_write_checksum: sha1:e9f69f5b244d468fbf3ecdd1872671fca4b4fc9b
- pristine_git_object: 437ac8fd1a297aebc6dd9369947b80d85530cb92
+ last_write_checksum: sha1:e7a7cd87b9a363efeac77c451b6dab3f4de99701
+ pristine_git_object: 225e625379917b545417eab3bb2b83abd012001a
+ 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 +2794,22 @@ trackedFiles:
id: 6a46f08aab47
last_write_checksum: sha1:63812cb97f0ba13e4e9e0e524fb82edccecca061
pristine_git_object: 45a68af199ccff5747b446511dd9fc1c550a4d34
+ docs/components/webfetchengineenum.md:
+ id: 7e88b8695736
+ last_write_checksum: sha1:aa027062e0dfd9b2e8746f06979394b4f0857ec6
+ pristine_git_object: acda6507de669a89a698226275a143c0e6f38776
+ 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:46e6da0ee904c6ea8e1e96aa95ee30b3024058c8
+ pristine_git_object: ad158564b71e6f1e69c77b59ddda078979995b87
+ 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 +2836,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:682b927e41eb9ce3ed28f76572d4cc035bf13a5c
+ pristine_git_object: 2b739819c429e7fd9212eccf8dbc3166d4507efb
docs/components/websearchdomainfilter.md:
id: 47d067b8286d
last_write_checksum: sha1:bc0207fdf5478614ee90906ce70c42e57506378d
@@ -2626,20 +2852,28 @@ trackedFiles:
pristine_git_object: 915b4ef64620b4cbf4ef4595cd1780a414bbfac1
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:2bee718447f3d29a868f02052ee2d3ff4f13e53d
+ pristine_git_object: ebe17f40e699c1bfaa062247d834a010cada04cc
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 +2900,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 +2910,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 +2990,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 +3014,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
@@ -2796,6 +3054,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
@@ -2846,20 +3120,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 +3148,12 @@ 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/creatererankglobals.md:
id: 46c967a0d2ba
last_write_checksum: sha1:9dffe3342695ec66163cb83423f441d527d4e561
@@ -2910,16 +3184,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:da900b92e73c387f01fa9621a2a080dcf23f8a7f
+ pristine_git_object: 0552d2555951ced289860da4b822da0fa697336e
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,6 +3198,14 @@ 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
@@ -2952,6 +3230,14 @@ trackedFiles:
id: 843ae03c4c33
last_write_checksum: sha1:3e34ea65b5397e4d1203306e4a08f12023ebfba2
pristine_git_object: cc7cddbdde6e0f31ddbec25b8a01e7ece0b8e04c
+ 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/document.md:
id: 640b715eb2a4
last_write_checksum: sha1:18b3bcf786efa0cf41dd10ba4c3a3a58c65cd134
@@ -3016,10 +3302,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 +3310,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 +3320,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,8 +3332,8 @@ 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/getmodelsglobals.md:
id: 61588f3029c8
last_write_checksum: sha1:f1565d45f3d06f070a8bc5ebe53d6205656b4b3b
@@ -3080,6 +3358,14 @@ 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/headquarters.md:
id: 3ccf7adf2542
last_write_checksum: sha1:24ca86fa6e2ebabf4cb034f6e368901e5041ccc7
@@ -3098,8 +3384,8 @@ trackedFiles:
pristine_git_object: 655cca3c9dde2904f47187955063ed1def505e47
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 +3418,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 +3460,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:36a74026db582e180dddba706a029930c7d29fbe
+ pristine_git_object: a45543ba017778d4e258f274bc8e434c99627d8c
docs/operations/listkeyassignmentsglobals.md:
id: eb16fba53032
last_write_checksum: sha1:823375a0dc84574748befda39821c790b469a6b4
@@ -3254,8 +3548,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 +3570,18 @@ 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/object.md:
id: baee3544844d
last_write_checksum: sha1:2fba5ecf3f93c90460a972666d6acdfb597cafad
@@ -3284,6 +3590,10 @@ trackedFiles:
id: 7a144a9c7a29
last_write_checksum: sha1:5f009bd24fd951128cdc546a6a5c937ab0426387
pristine_git_object: 4f8c20dd33dceafda3362119a1cfb1e5133810d1
+ docs/operations/prompttokensdetails.md:
+ id: 4e204e79631e
+ last_write_checksum: sha1:ef933f99c0536defe9d256dffa169b8752d3acc6
+ pristine_git_object: ed43c6c17061267e697480a5276ae5ae5e89145f
docs/operations/ratelimit.md:
id: 55ccfab9dcb0
last_write_checksum: sha1:ba383320e312bc87bd156a5d338f3d973376ec02
@@ -3302,16 +3612,12 @@ trackedFiles:
pristine_git_object: 3256c024465d68f376df1e9498da94ce756bf320
docs/operations/sendchatcompletionrequestrequest.md:
id: "220604035185"
- last_write_checksum: sha1:55f1470ef51551503f7ad08489329bd1b81e4c4f
- pristine_git_object: f0a096f40d2d0e187d2cd3884aa957d863913ef5
+ last_write_checksum: sha1:a8b6f060509a6b87ed4de6795b418ecc19242d7c
+ pristine_git_object: c274edbbcae2d719b26fb8fa2019283fb547e26c
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/typeimageurl.md:
id: 433d2dc21947
last_write_checksum: sha1:24b83d5212d95f5e5ee95d1b9e47059613126ea1
@@ -3330,8 +3636,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,8 +3656,16 @@ 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/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
@@ -3362,12 +3676,12 @@ trackedFiles:
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/chat/README.md:
id: 393193527c2c
- last_write_checksum: sha1:74076b3d74207ac98f47e323bd2badbeeb604e3f
- pristine_git_object: 03d623c9d94c1d1c85cfacaa292055df0fa04ca7
+ last_write_checksum: sha1:782a6b4254922bdf4919f013527747be7e9ad7d8
+ pristine_git_object: c7a3e24a922aec2cb088c31d58ed596d197a7ad3
docs/sdks/credits/README.md:
id: 81608135c0ff
last_write_checksum: sha1:abca02bc25760be47f80100a7cce6bb711202aef
@@ -3382,12 +3696,12 @@ 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:9295e39486b2994cf33c93053d59ad9452e7021a
+ pristine_git_object: 9f57cd5aa9e23f1c2fef0955357f6eefc3dbf239
docs/sdks/models/README.md:
id: b35bdf4bc7ed
last_write_checksum: sha1:ac628dd17b528a4772ef0797c4c47906faf8dc40
@@ -3410,24 +3724,40 @@ trackedFiles:
pristine_git_object: 3bda1a6f6fccc91a04e52d373727cac8861e1a26
docs/sdks/responses/README.md:
id: e717bad14f63
- last_write_checksum: sha1:02f29159f69cbc264437745e1d7cd54ed7e30ced
- pristine_git_object: a38d2b1b819d977c739f6a7b6f55344514c5447c
+ last_write_checksum: sha1:2b8d9ed96d55b3c6e3a81ef853026ee67dca1a97
+ pristine_git_object: 814702a75ca7d2ff882c08d9253b641ebd684883
+ 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:7030c679c78c2ccd41072cbfebf3d293e328a1a0
+ pristine_git_object: 32d40ea41f61fbdf542ec9073cb3e9c3295f83eb
+ docs/sdks/workspaces/README.md:
+ id: 1f5b051a6380
+ last_write_checksum: sha1:93a67b4c7ee64b2a1fe18b71f8dfd8b3cc2bbb45
+ pristine_git_object: bc903b4694170892cbd7165e6cbc82e5d93865c0
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,16 +3776,16 @@ 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
@@ -3466,12 +3796,12 @@ trackedFiles:
pristine_git_object: 5e7c70d1f15e0699b4b4099322ef2217f66b4696
src/openrouter/chat.py:
id: 723fdce15c1d
- last_write_checksum: sha1:5bce19b139e225e62bb28fd2143bd6fc28b4f9cd
- pristine_git_object: bfa078ebbbff63f2c80860abf718fc57abcac2bd
+ last_write_checksum: sha1:64e674b1723ec292b5e0d6dfeed871bf74da68bf
+ pristine_git_object: d5eae65f4ad5500e3f3b6fb7714d0525c4089b66
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:fba957e705a1e6222a64cdd71111390c6e14826e
- pristine_git_object: e41de295792aaaea529e94d6c70c3ee111266202
+ last_write_checksum: sha1:f601f4427e657d49b12aae05067c331927926f39
+ pristine_git_object: f57d572a3e527ac25ac756652abd5f4bfe5bd8ee
src/openrouter/components/activityitem.py:
id: 3bbe7d35f459
last_write_checksum: sha1:32b873ba5c0a9dbf5f0cf32c0217ce17395ae69e
@@ -3510,12 +3840,20 @@ 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:53f0496e016a3c27c0fb564e37781387d9ea41a3
+ pristine_git_object: c79f022f10653ab455d5fb10e1808ab79f6a3813
src/openrouter/components/basereasoningconfig.py:
id: 8bd09a7e873a
last_write_checksum: sha1:c7c812629a7fc46f8064bc874b77424b30df9226
pristine_git_object: 22bd982575db23648faceab9dbedf75fa1f1cb38
+ 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 +3870,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
@@ -3626,8 +3972,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:1cdb5bb801463ed6c42bc59c91ca288a56061002
+ pristine_git_object: 90b069fea5bb0c35c4920e60af9541db9ec57d10
src/openrouter/components/chatjsonschemaconfig.py:
id: d2278e414fab
last_write_checksum: sha1:69efa91d33e4767058c2d377814b820bb5104ab4
@@ -3646,12 +3992,12 @@ 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:df3375b316ed3e5c072a30bc35c6a6e03924aaa3
+ pristine_git_object: dc5ca5d5d75954f8ec30e36050f21f2ebf4c5e67
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
@@ -3662,12 +4008,16 @@ trackedFiles:
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
@@ -3702,16 +4052,16 @@ trackedFiles:
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:b90c09a8995aedbc3936283112f1194b069469cc
+ pristine_git_object: 682e656b79f553e5f008fe16055bb5ae0eb10bb4
src/openrouter/components/codeinterpreterservertool.py:
id: a72c520afbf9
last_write_checksum: sha1:f6123d9808c530e0b042e0a30fbb1a11a82096e6
@@ -3732,6 +4082,26 @@ trackedFiles:
id: 212cdf3bcdda
last_write_checksum: sha1:ee91dc17cf80f2aa72eb976fdf60ad4c094ca45b
pristine_git_object: fdbfb1678062f33794f10f032a13f127c35a7db7
+ 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:76292695a607b71154cfe859ad01ad4959e4540b
+ pristine_git_object: 57eada206839f285ad5f0b0e04126a46fa6f898e
+ 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
@@ -3752,14 +4122,26 @@ 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/createguardrailrequest.py:
id: 34d69149fb33
- last_write_checksum: sha1:8ee78165a84f16ed848fc6ce3ac7898df7d1a60c
- pristine_git_object: c6dd6d6088287c6f1cf8adc4841ba5756e59031e
+ last_write_checksum: sha1:6aca9a68db9d0dfe3ff797a1f929477db7d066a9
+ pristine_git_object: b748423b59b1ec9a9f63adecfc0fb15696742ef2
src/openrouter/components/createguardrailresponse.py:
id: b4e1bdf1de5b
last_write_checksum: sha1:ae20a5e7425510c240e5697d847b1cae65940bd6
pristine_git_object: d6c4a4dc73222668daddc2a1788d314ff30e8fe6
+ src/openrouter/components/createworkspacerequest.py:
+ id: 3785d9b207c2
+ last_write_checksum: sha1:6b44314c7dc38894f46e68004eb74c06961c224f
+ pristine_git_object: 1b4eba03fc9ee5d3f790702406f34fb02c9c33f3
+ 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
@@ -3780,6 +4162,10 @@ trackedFiles:
id: c3ac908331ef
last_write_checksum: sha1:8984f78ae6a2b3ee8b16d7f0018622ba725c1583
pristine_git_object: f31843cfe4e36f3f6371837221b6966fabaa563a
+ 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
@@ -3788,6 +4174,14 @@ trackedFiles:
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
@@ -3846,20 +4240,36 @@ 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
+ 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:dde2c2b760dc39136db768fc66e02d0c7b436103
+ pristine_git_object: 99a84fb233d965ea2523620da8daf1447945d683
src/openrouter/components/getguardrailresponse.py:
id: 6f9054fab3d9
last_write_checksum: sha1:f20a0be686991d8f7ed0eb884612586052efc5c1
pristine_git_object: 6cdeb99e76ab6ad2e22b13164efbdb68cf8f328d
+ 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 +4304,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
@@ -3930,8 +4340,8 @@ trackedFiles:
pristine_git_object: 3b0c560bc9298bd40e2cdf1933ed0d5b98bb919b
src/openrouter/components/inputs_union.py:
id: 17d6239cb6a7
- last_write_checksum: sha1:6b4ed04db14f3afdc0d62b9cc36da363101c4f8e
- pristine_git_object: 723f035840411ada143c5a48fa8372a9bb098d24
+ last_write_checksum: sha1:9ac4b30f8e354c03b1af7456eda0122283e967d9
+ pristine_git_object: ff29a0404293dc973ae248bbaba85daa24e7a050
src/openrouter/components/inputtext.py:
id: a995ae96be99
last_write_checksum: sha1:0e30dbfa1813d3e69e0ccd2511f50080cce0fb6e
@@ -3976,6 +4386,10 @@ trackedFiles:
id: 78ca80afcc6f
last_write_checksum: sha1:3edda0c8ff111abaf5332475d89a87e84f4f5d78
pristine_git_object: 1497ba3814f2f058c1332d8bcf92a2e2bbed0fe5
+ src/openrouter/components/listworkspacesresponse.py:
+ id: 0c5f98eddbf5
+ last_write_checksum: sha1:53b10630a44ccc43fa86a34e9a3f5a64f08488c4
+ pristine_git_object: b70d4bbc7e84bc0f9ae3beedb8784bbc46aae9c0
src/openrouter/components/mcpservertool.py:
id: bb8aeb03a111
last_write_checksum: sha1:014b01dd6253437640d2b3fbd084cfddb2399073
@@ -3984,10 +4398,14 @@ trackedFiles:
id: c11eba01a3db
last_write_checksum: sha1:db9d3c5dcd61a231f7c93bc92a5adce4a4811ad6
pristine_git_object: bf257605d2a5dc41234cb9fcfdda939948b26388
+ 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 +4420,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
@@ -4018,8 +4436,8 @@ trackedFiles:
pristine_git_object: 5b8ca0ce252ca2fc909770c5c338793b05877a91
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
@@ -4058,8 +4476,12 @@ 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
@@ -4102,24 +4524,24 @@ 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/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:67f848a25fe552a682a00ae0450e3584738a79b4
+ pristine_git_object: ed75b5cc9ff313bc960d166a4c29575fb64b9a93
src/openrouter/components/outputmcpservertoolitem.py:
id: bb8c2536a58e
last_write_checksum: sha1:6cbe556b2268af0142d982007b273cc43b7605c7
@@ -4138,8 +4560,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 +4570,10 @@ 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/outputtexteditorservertoolitem.py:
id: 2a5dc9318fe6
last_write_checksum: sha1:75ce53e78b352b0427acfb5310b2500ee76351dd
@@ -4158,20 +4584,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:5076cc7374513eb9f6c5ab596386082e3e9bcb7c
+ pristine_git_object: c0c8f1bef699e051a66e9a95c8d8f9dacef97332
src/openrouter/components/outputwebsearchservertoolitem.py:
id: b1fcca0b3fd3
- last_write_checksum: sha1:c82e5ab1c16b409708c4997fcaf45d8abaa1e1b9
- pristine_git_object: 304cab51826d39b91964917148f886f8bb681149
+ last_write_checksum: sha1:7302bea52916eeb4a52915c02538e3c301076aa7
+ pristine_git_object: cdb04856a32b6dc9b6d24291f8d9cf7b6b245b82
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 +4634,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
@@ -4226,8 +4664,12 @@ trackedFiles:
pristine_git_object: 72dd15242d7d35b2b493f90d0cdebf6f8a51d684
src/openrouter/components/providername.py:
id: fcc722fa2fce
- last_write_checksum: sha1:5f1b8a8471ab3d11bd0d18927a9cd9c747bababe
- pristine_git_object: 7764a12512827640f3c32a22b199b09cd890b57f
+ last_write_checksum: sha1:eef1e4aa639c29db9fab5294bc12c8260286eef4
+ pristine_git_object: b3602ca152cd255a9dcbdc53cab7a59a50930e65
+ src/openrouter/components/provideroptions.py:
+ id: 73dde6c8f359
+ last_write_checksum: sha1:4e2751d73d0b0a740dff95892e5a9670e617d906
+ pristine_git_object: 7482c8db775494216817248ea190909ca6b4f939
src/openrouter/components/provideroverloadedresponseerrordata.py:
id: 5b693682570e
last_write_checksum: sha1:41a977452d58b52cb9d4b3a85f4b7970529352d5
@@ -4238,8 +4680,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:ff0cd94e8e0477217b9e72462e254cfb3451fdeb
+ pristine_git_object: c827fcd8c5fcea3972a9ce603a94f11011554bb3
src/openrouter/components/providersort.py:
id: 348e382bf494
last_write_checksum: sha1:57551507f95cd2e16ef995e1c13f859fd0726152
@@ -4358,8 +4800,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:1b222de150deb4d821280b05b0519d8fbb2ac7b1
+ pristine_git_object: 6b45ef739d27e54e25f348cc15856fdab5c7f6c0
+ 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:f8742706898691459596b12007afca9cff6de78c
+ pristine_git_object: aef5b61a7af54f6a75a8813576f5d757d8657c18
src/openrouter/components/searchcontextsizeenum.py:
id: c246413c0bd7
last_write_checksum: sha1:863a664a9f17def86180b0407c8233c263acfae7
@@ -4370,8 +4828,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:f5bc828dd145a830760ad6f23bbd9cae18664610
+ pristine_git_object: b5ed4f137aee1626a8ddb8c4b5f763d8ba13be21
src/openrouter/components/security.py:
id: ae2ca334218a
last_write_checksum: sha1:e6bfa94172df4c823ed9dd83b9b2614e6890d462
@@ -4384,6 +4842,10 @@ trackedFiles:
id: ac0e4bd3caa3
last_write_checksum: sha1:06f390a37d82c115be033bcfceb3e99b30e1fc92
pristine_git_object: 7e26325a31eb3ed1dbd4323a0e61afc1f6bd885f
+ src/openrouter/components/speechrequest.py:
+ id: 2a9400167112
+ last_write_checksum: sha1:62da67e554f2325d459f2a353472823058d3ff69
+ pristine_git_object: aebab1a4f975b5a3e3434fc3865cc99e090b9114
src/openrouter/components/storedprompttemplate.py:
id: 6be99e870ecd
last_write_checksum: sha1:6b7d17641d9e2b52010962cb586e32f99254db79
@@ -4420,10 +4882,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 +4908,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
@@ -4470,24 +4944,32 @@ trackedFiles:
pristine_git_object: 1c70ab3d8b23363543675abe5d3b3566aea113e7
src/openrouter/components/updateguardrailrequest.py:
id: 6a557cd822a0
- last_write_checksum: sha1:c9a41a90ad1eee466855137101ae02def9c7e553
- pristine_git_object: c4000777114116a421b2e2f51675497ea89263ce
+ last_write_checksum: sha1:9e4c43b07414596da3287cbf23359527d10f1abb
+ pristine_git_object: c082fddd1c94c00aa23bb0dcd33ffdfc76456620
src/openrouter/components/updateguardrailresponse.py:
id: 7b068d26ce31
last_write_checksum: sha1:2b63cbb90747f07f775d9a22e80f74c67221fea8
pristine_git_object: df833960211cc7ed2a2a42fddbeafda0092e1c0c
+ src/openrouter/components/updateworkspacerequest.py:
+ id: 78d86b3b0a63
+ last_write_checksum: sha1:8a22a277474692df7a4e0b81c29d3f97c4cd9253
+ pristine_git_object: 7a1fdb6e07362f240220e9977d1ffa8d6f3774c4
+ 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:7143c5a71f9dd841279bceba858886c17dbb9f82
+ pristine_git_object: d7b2323e87b1af8e9e99b631544cd4ecbb223a74
src/openrouter/components/videogenerationresponse.py:
id: 541f1321b072
last_write_checksum: sha1:051ace67776106616ec4c8e55cf2df9a99855d0f
@@ -4504,6 +4986,18 @@ trackedFiles:
id: 2e9d1ce2cf19
last_write_checksum: sha1:b94977aa6941f7cf15c889f1b7cc69b50cd35856
pristine_git_object: 796e741c43389a96f2ed44d3b5d862475a8af2cc
+ src/openrouter/components/webfetchengineenum.py:
+ id: 47c172c99604
+ last_write_checksum: sha1:ae47c404187cb452b589aa72e38460eb115aef65
+ pristine_git_object: 7573a926fc6e591bfb9132e47a3a3a777a1c3321
+ 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:cfb18dd27b811a4dd1d00d9e1f2ece25bc0f2e39
+ pristine_git_object: b65fd215b5910d6227f042faad7516825af3060f
src/openrouter/components/websearchcallcompletedevent.py:
id: a5818af2b521
last_write_checksum: sha1:538a39bf773415567086a28ff2cde66fd37ea763
@@ -4518,8 +5012,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:4720327ee869a59ce713ced1499d070e40af7c55
+ pristine_git_object: 0e1562300ee809cdd9f224bb68344832e17a23bf
src/openrouter/components/websearchdomainfilter.py:
id: 4a7307ed2ba6
last_write_checksum: sha1:043839dada28f82b33f70534895e98e7ee6ce7f5
@@ -4534,16 +5028,20 @@ trackedFiles:
pristine_git_object: e98eed23d754ed438624c041a7f433522e0e001d
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:f2fa289e231f3e7e81106b9244e9744867198357
+ pristine_git_object: de31d59fa813b9c65af03a0b116504f5a242823a
src/openrouter/components/websearchsource.py:
id: a1fe81b68a7b
last_write_checksum: sha1:fa30e5813682231d742fb6861f0fe92f655c8e81
@@ -4558,8 +5056,16 @@ 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
@@ -4578,36 +5084,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 +5124,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:659f1e3422d790b6206a9e30aedb5982246dc85c
+ pristine_git_object: a4fc1c1df9fe00afdaf809f49186c79d476274bf
src/openrouter/httpclient.py:
id: e9311185443d
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
@@ -4686,8 +5192,12 @@ trackedFiles:
pristine_git_object: ef6eb9aa10d9b067d96dad78a1d34f939c1091e8
src/openrouter/operations/__init__.py:
id: 9afcea1e7161
- last_write_checksum: sha1:ec3ab8fd0729912259f86a370453dd311f440953
- pristine_git_object: 8c2b3198136aec28d1b51abc1b12386429039561
+ last_write_checksum: sha1:2298cc73e9fed4c12e0a66aaefbaa7989844ebd5
+ pristine_git_object: 380edd828db14c82d638f1eee87ff29a319c27a4
+ 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 +5206,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 +5218,46 @@ 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/createembeddings.py:
id: fe1160a960e9
- last_write_checksum: sha1:7c43b2de3e40ec1fcbac46f4bc89ae6fbf5eb95d
- pristine_git_object: 3872d32380bd3ae8cb9cdb6d7420a4e32464596f
+ last_write_checksum: sha1:e152bffcd6eee6a8787f529b2e5b29786e3c7f09
+ pristine_git_object: e0efba7b495001313dcc86a7e725269eb636b92a
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/creatererank.py:
id: 99b5d368a168
last_write_checksum: sha1:86b7c32d7b0bb77f16b9926384c47774e9e25c6a
pristine_git_object: 68f500af519207c91a5bb34c7006ec5f8d8b3f46
src/openrouter/operations/createresponses.py:
id: afb834172b62
- last_write_checksum: sha1:55f5ba6a2eafc9d0519fa5aa072a1c22e42ed5f2
- pristine_git_object: e92bbc2995c3a3769c9cc45b0a6b6b690e67d02c
+ last_write_checksum: sha1:8a0b6954abbb070c51fd860a33b04d8629f65d95
+ pristine_git_object: db9db18e8b602f14e74496979ef07b7ee13d4362
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/deleteguardrail.py:
id: 1fbdb98bbb85
last_write_checksum: sha1:e245a5061592daf839d38caace9cc38abbce879d
@@ -4740,6 +5266,10 @@ trackedFiles:
id: 0bd72d53b0a0
last_write_checksum: sha1:de3ec2a557ba007482a9d7ecaecef00cb6ead537
pristine_git_object: 51d48818bce022ab5e9514ea48429e3aca75e997
+ 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
@@ -4754,16 +5284,16 @@ 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
@@ -4776,10 +5306,14 @@ 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/listembeddingsmodels.py:
id: bf749a1f23d6
last_write_checksum: sha1:654a4e7e7b486f1d321eeb11ef7a7fa928e501a6
@@ -4792,6 +5326,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 +5340,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
@@ -4836,18 +5374,26 @@ 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/sendchatcompletionrequest.py:
id: d9fee71bb577
- last_write_checksum: sha1:35f707844223de94c0ddcb0d7d67abb50dc0fa26
- pristine_git_object: ef5ccb09584600a7c8dc99c2f02a5d7f1c65f10e
+ last_write_checksum: sha1:57e7ddb6651a3d5822d26e86f6be6342b111d1ff
+ pristine_git_object: a5d2f9646f7014e86aca63be2213fbd0bce3c0b1
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/updateworkspace.py:
+ id: 2e9960985cbc
+ last_write_checksum: sha1:88c11ee7a31bc5e2267981d882a01a2a71aafe55
+ pristine_git_object: 4ab7929896a5dede1fa4cf9ce6acfaedd99160aa
src/openrouter/organization.py:
id: 6f4c63c416e8
last_write_checksum: sha1:4ca00158cd6a4971e7a4cf6da1ef084da25630d9
@@ -4866,16 +5412,24 @@ trackedFiles:
pristine_git_object: e8fdd1dd0911b8cfb465e577d22079644733f687
src/openrouter/responses.py:
id: f2108fb635e1
- last_write_checksum: sha1:0904d495ee9d0e8e08bd2000406c9f147acb730e
- pristine_git_object: 4844bc0a635f0d4450e617c4a66810ff9e55890e
+ last_write_checksum: sha1:ed38523bbd47d009155ae3987d2e7b5307f69384
+ pristine_git_object: 6d76ae522c93f8b3e13058b82b017bed610f1ae8
src/openrouter/sdk.py:
id: ee9846c4c9c5
- last_write_checksum: sha1:af0469095dac69b5b92dd0f717ecf193a9c353e2
- pristine_git_object: 43d1636646e181c09eaa9a42cae71c53d8ee9f1e
+ last_write_checksum: sha1:af4b38ecad05ca9ffc474d8f4a8381af4e2b53ec
+ pristine_git_object: 4fa565c5c89e0747955263d6fcc85c93635c5cd6
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 +5508,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:b9477e48508be439c722b8cee18acdb2ec17fd2c
+ pristine_git_object: d079f5acd00637da4f874c3c9ed116fc5c6b131e
+ src/openrouter/workspaces.py:
+ id: cd6c533b1802
+ last_write_checksum: sha1:d201c9c40b46717ab847c16a7db110887337bf01
+ pristine_git_object: a1caa1445a283728fc5130458e50628b97b47a31
examples:
createResponses:
speakeasy-default-create-responses:
@@ -5038,6 +5596,8 @@ 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"}}
getCredits:
speakeasy-default-get-credits:
responses:
@@ -5086,7 +5646,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 +5658,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", "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/", "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 +5688,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 +5697,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 +5735,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 +5748,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 +5757,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 +5768,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 +5802,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 +5824,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 +5835,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 +5851,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 +5867,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":
@@ -5573,4 +6137,199 @@ examples:
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"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"}}
+ 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"}}
+ 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.beta.responses.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\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.o_auth.create_auth_code()`: `error.openrouter_metadata` **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.guardrails.bulk_assign_keys()`: `error.openrouter_metadata` **Added**\n* `open_router.guardrails.list_guardrail_key_assignments()`: `error.openrouter_metadata` **Added**\n* `open_router.generations.list_generation_content()`: **Added**\n* `open_router.credits.get_credits()`: `error.openrouter_metadata` **Added**\n* `open_router.embeddings.generate()`: \n * `response.usage.prompt_tokens_details` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.embeddings.list_models()`: \n * `response.data.[].supported_voices` **Added**\n * `error.openrouter_metadata` **Added**\n* `open_router.endpoints.list_zdr_endpoints()`: `error.openrouter_metadata` **Added**\n* `open_router.endpoints.list()`: `error.openrouter_metadata` **Added**\n* `open_router.generations.get_generation()`: \n * `response.data` **Changed**\n * `error.openrouter_metadata` **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.workspaces.list()`: **Added**\n* `open_router.tts.create_speech()`: **Added**\n* `open_router.o_auth.exchange_auth_code_for_api_key()`: `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 * `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.rerank.rerank()`: `error.openrouter_metadata` **Added**\n* `open_router.stt.create_transcription()`: **Added**\n* `open_router.video_generation.generate()`: \n * `request` **Changed**\n * `error.openrouter_metadata` **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..654ecf9 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -1489,6 +1489,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
@@ -2045,6 +2054,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 +2093,11 @@ components:
properties:
error:
$ref: '#/components/schemas/BadRequestResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -2378,7 +2397,7 @@ components:
example:
container: null
content:
- - citations: null
+ - citations: []
text: Hello!
type: text
id: msg_01XFDUDYJgAACzvnptvVoYEL
@@ -2983,6 +3002,48 @@ components:
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 +3102,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:
@@ -3547,6 +3638,7 @@ components:
- $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)
@@ -3783,6 +3875,7 @@ components:
context-compression: '#/components/schemas/ContextCompressionPlugin'
file-parser: '#/components/schemas/FileParserPlugin'
moderation: '#/components/schemas/ModerationPlugin'
+ pareto-router: '#/components/schemas/ParetoRouterPlugin'
response-healing: '#/components/schemas/ResponseHealingPlugin'
web: '#/components/schemas/WebSearchPlugin'
propertyName: id
@@ -3793,6 +3886,7 @@ components:
- $ref: '#/components/schemas/FileParserPlugin'
- $ref: '#/components/schemas/ResponseHealingPlugin'
- $ref: '#/components/schemas/ContextCompressionPlugin'
+ - $ref: '#/components/schemas/ParetoRouterPlugin'
type: array
presence_penalty:
description: Presence penalty (-2.0 to 2.0)
@@ -3963,6 +4057,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
@@ -4077,6 +4173,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 +4233,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:
@@ -4378,6 +4495,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 +4530,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 +4601,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,7 +4609,7 @@ 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
@@ -4727,6 +4860,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 +4890,82 @@ components:
- code
- message
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: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ properties:
+ action:
+ $ref: '#/components/schemas/ContentFilterBuiltinAction'
+ label:
+ description: Optional label used in redaction placeholders (e.g. "[PROMPT_INJECTION]")
+ example: '[PROMPT_INJECTION]'
+ maxLength: 100
+ type: string
+ 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'
@@ -4839,6 +5053,28 @@ 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
CreatedEvent:
description: Event emitted when a response is created
example:
@@ -4882,8 +5118,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 +5155,26 @@ components:
minItems: 1
nullable: true
type: array
+ content_filter_builtins:
+ description: >-
+ Builtin content filters to apply. Use slug "regex-prompt-injection" with action "block", "flag", or "redact" to enable heuristic prompt injection detection.
+ example:
+ - action: block
+ slug: regex-prompt-injection
+ items:
+ $ref: '#/components/schemas/ContentFilterBuiltinEntry'
+ 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 +5182,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 +5241,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 +5257,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ 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 +5276,7 @@ components:
name: My New Guardrail
reset_interval: monthly
updated_at: null
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
properties:
data:
allOf:
@@ -4984,6 +5285,103 @@ components:
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 and hyphens only)
+ example: production
+ maxLength: 50
+ minLength: 1
+ pattern: ^[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:
@@ -5104,6 +5502,18 @@ components:
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 +5596,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 +5626,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 +5857,11 @@ components:
properties:
error:
$ref: '#/components/schemas/ForbiddenResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -5631,42 +6086,459 @@ components:
- name
- parameters
type: object
- GetGuardrailResponse:
+ GenerationContentData:
+ description: Stored prompt and completion content
example:
- 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'
+ 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:
- allOf:
- - $ref: '#/components/schemas/Guardrail'
- - description: The guardrail
- required:
- - data
- type: object
- GoneResponse:
- description: Gone - Endpoint has been permanently removed or deprecated
- example:
- error:
- code: 410
+ 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
+ - 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_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
+ 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
+ - router
+ - provider_responses
+ - user_agent
+ - http_referer
+ type: object
+ required:
+ - data
+ type: object
+ GetGuardrailResponse:
+ example:
+ data:
+ allowed_models: null
+ allowed_providers:
+ - openai
+ - anthropic
+ - google
+ content_filter_builtins:
+ - action: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ 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
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/Guardrail'
+ - description: The guardrail
+ 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:
+ error:
+ code: 410
message: >-
The Coinbase APIs used by this endpoint have been deprecated, so the Coinbase Commerce credits API has been removed. Use the web credits purchase flow instead.
properties:
error:
$ref: '#/components/schemas/GoneResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -5700,9 +6572,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ 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 +6591,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 +6613,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: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ 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 +6644,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 +6709,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)
@@ -5965,12 +6896,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:
@@ -6260,8 +7191,22 @@ components:
- $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'
type: array
description: Input for a response request - can be a string or array of items
example:
@@ -6339,6 +7284,11 @@ components:
properties:
error:
$ref: '#/components/schemas/InternalServerResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -6584,9 +7534,18 @@ components:
- openai
- anthropic
- google
+ content_filter_builtins:
+ - action: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ 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 +7553,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 +7618,39 @@ components:
- 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
McpServerTool:
description: MCP (Model Context Protocol) tool configuration
example:
@@ -7255,11 +8248,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 +8277,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
@@ -7423,6 +8440,7 @@ components:
context-compression: '#/components/schemas/ContextCompressionPlugin'
file-parser: '#/components/schemas/FileParserPlugin'
moderation: '#/components/schemas/ModerationPlugin'
+ pareto-router: '#/components/schemas/ParetoRouterPlugin'
response-healing: '#/components/schemas/ResponseHealingPlugin'
web: '#/components/schemas/WebSearchPlugin'
propertyName: id
@@ -7433,6 +8451,7 @@ components:
- $ref: '#/components/schemas/FileParserPlugin'
- $ref: '#/components/schemas/ResponseHealingPlugin'
- $ref: '#/components/schemas/ContextCompressionPlugin'
+ - $ref: '#/components/schemas/ParetoRouterPlugin'
type: array
provider:
$ref: '#/components/schemas/ProviderPreferences'
@@ -7475,6 +8494,8 @@ components:
- properties:
budget_tokens:
type: integer
+ display:
+ $ref: '#/components/schemas/AnthropicThinkingDisplay'
type:
enum:
- enabled
@@ -7492,6 +8513,8 @@ components:
- type
type: object
- properties:
+ display:
+ $ref: '#/components/schemas/AnthropicThinkingDisplay'
type:
enum:
- adaptive
@@ -7677,7 +8700,16 @@ components:
- $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,7 +8731,26 @@ components:
allOf:
- $ref: '#/components/schemas/BaseMessagesResult'
- properties:
- provider:
+ 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:
allOf:
@@ -7710,22 +8761,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:
@@ -7752,7 +8788,7 @@ components:
example:
container: null
content:
- - citations: null
+ - citations: []
text: Hello! I'm doing well, thank you for asking.
type: text
id: msg_01XFDUDYJgAACzvnptvVoYEL
@@ -7835,6 +8871,7 @@ components:
- AionLabs
- Alibaba
- Ambient
+ - Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
@@ -7881,12 +8918,15 @@ components:
- Morph
- NCompass
- Nebius
+ - Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
+ - Poolside
+ - Perceptron
- Perplexity
- Phala
- Recraft
@@ -7969,6 +9009,8 @@ components:
example:
type: message_stop
properties:
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
type:
enum:
- message_stop
@@ -8004,6 +9046,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 +9104,7 @@ components:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -8096,6 +9165,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 +9186,7 @@ components:
- per_request_limits
- supported_parameters
- default_parameters
+ - supported_voices
- links
type: object
ModelArchitecture:
@@ -8273,6 +9350,7 @@ components:
- max_tokens
- frequency_penalty
- presence_penalty
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -8315,6 +9393,7 @@ components:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -8342,6 +9421,11 @@ components:
properties:
error:
$ref: '#/components/schemas/NotFoundResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
user_id:
nullable: true
type: string
@@ -8384,6 +9468,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:
@@ -8854,6 +9941,8 @@ components:
allOf:
- $ref: '#/components/schemas/BaseResponsesResult'
- properties:
+ openrouter_metadata:
+ $ref: '#/components/schemas/OpenRouterMetadata'
output:
items:
$ref: '#/components/schemas/OutputItems'
@@ -8861,6 +9950,8 @@ components:
service_tier:
nullable: true
type: string
+ text:
+ $ref: '#/components/schemas/TextExtendedConfig'
usage:
$ref: '#/components/schemas/Usage'
type: object
@@ -8914,6 +10005,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:
@@ -9248,6 +10388,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 +10398,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:
@@ -9403,6 +10548,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:
@@ -9504,6 +10652,7 @@ components:
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:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
@@ -9545,6 +10694,7 @@ components:
- $ref: '#/components/schemas/OutputToolSearchServerToolItem'
- $ref: '#/components/schemas/OutputMemoryServerToolItem'
- $ref: '#/components/schemas/OutputMcpServerToolItem'
+ - $ref: '#/components/schemas/OutputSearchModelsServerToolItem'
OutputItemWebSearchCall:
example:
action:
@@ -9748,6 +10898,8 @@ components:
- audio
- video
- rerank
+ - speech
+ - transcription
example: text
type: string
x-speakeasy-unknown-values: allow
@@ -9788,6 +10940,32 @@ 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
OutputTextEditorServerToolItem:
description: An openrouter:text_editor server tool output item
example:
@@ -9844,6 +11022,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 +11031,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 +11065,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 +11142,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 +11175,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 +11214,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 +11375,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
@@ -10228,6 +11526,7 @@ components:
- AionLabs
- Alibaba
- Ambient
+ - Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
@@ -10274,12 +11573,15 @@ components:
- Morph
- NCompass
- Nebius
+ - Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
+ - Poolside
+ - Perceptron
- Perplexity
- Phala
- Recraft
@@ -10304,2536 +11606,2958 @@ components:
example: OpenAI
type: string
x-speakeasy-unknown-values: allow
- ProviderOverloadedResponse:
- description: Provider Overloaded - Provider is temporarily overloaded
- example:
- error:
- code: 529
- message: Provider returned error
- properties:
- error:
- $ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
- user_id:
- nullable: true
- type: string
- required:
- - error
- type: object
- ProviderOverloadedResponseErrorData:
- description: Error data for ProviderOverloadedResponse
+ ProviderOptions:
+ description: >-
+ Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
example:
- code: 529
- message: Provider returned error
+ openai:
+ max_tokens: 1000
properties:
- code:
- type: integer
- message:
- type: string
- metadata:
+ 01ai:
additionalProperties:
nullable: true
- nullable: true
type: object
- required:
- - code
- - message
- type: object
- ProviderPreferences:
- additionalProperties: false
- description: When multiple model providers are available, optionally indicate your routing preference.
- example:
- allow_fallbacks: true
- nullable: true
- properties:
- allow_fallbacks:
- description: >
- Whether to allow backup providers to serve requests
-
- - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
-
- - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
-
- nullable: true
- type: boolean
- data_collection:
- description: >-
- Data collection setting. If no available model provider meets the requirement, your request will return an error.
-
- - allow: (default) allow providers which store user data non-transiently and may train on it
-
-
- - deny: use only providers which do not collect user data.
- enum:
- - deny
- - allow
- - null
- example: allow
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- enforce_distillable_text:
- description: >-
- Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
- example: true
- nullable: true
- type: boolean
- ignore:
- description: >-
- List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
- example:
- - openai
- - anthropic
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- nullable: true
- type: array
- max_price:
- description: >-
- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
- properties:
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per audio unit
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per million completion tokens
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per image
- prompt:
- $ref: '#/components/schemas/BigNumberUnion'
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per request
+ ai21:
+ additionalProperties:
+ nullable: true
type: object
- only:
- description: >-
- List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
- example:
- - openai
- - anthropic
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- nullable: true
- type: array
- order:
- description: >-
- An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
- example:
- - openai
- - anthropic
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- nullable: true
- type: array
- preferred_max_latency:
- $ref: '#/components/schemas/PreferredMaxLatency'
- preferred_min_throughput:
- $ref: '#/components/schemas/PreferredMinThroughput'
- quantizations:
- description: A list of quantization levels to filter the provider by.
- items:
- $ref: '#/components/schemas/Quantization'
- nullable: true
- type: array
- require_parameters:
- description: >-
- Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
- nullable: true
- type: boolean
- sort:
- anyOf:
- - $ref: '#/components/schemas/ProviderSort'
- - $ref: '#/components/schemas/ProviderSortConfig'
- - nullable: true
- description: >-
- The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
- example: price
- zdr:
- description: >-
- Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
- example: true
- nullable: true
- type: boolean
- type: object
- ProviderResponse:
- description: Details of a provider response for a generation attempt
- example:
- endpoint_id: ep_abc123
- id: chatcmpl-abc123
- is_byok: false
- latency: 1200
- model_permaslug: openai/gpt-4
- provider_name: OpenAI
- status: 200
- properties:
- endpoint_id:
- description: Internal endpoint identifier
- example: ep_abc123
- type: string
- id:
- description: Upstream provider response identifier
- example: chatcmpl-abc123
- type: string
- is_byok:
- description: Whether the request used a bring-your-own-key
- example: false
- type: boolean
- latency:
- description: Response latency in milliseconds
- example: 1200
- type: number
- model_permaslug:
- description: Canonical model slug
- example: openai/gpt-4
- type: string
- provider_name:
- description: Name of the provider
- enum:
- - AnyScale
- - Atoma
- - Cent-ML
- - CrofAI
- - Enfer
- - GoPomelo
- - HuggingFace
- - Hyperbolic 2
- - InoCloud
- - Kluster
- - Lambda
- - Lepton
- - Lynn 2
- - Lynn
- - Mancer
- - Meta
- - Modal
- - Nineteen
- - OctoAI
- - Recursal
- - Reflection
- - Replicate
- - SambaNova 2
- - SF Compute
- - Targon
- - Together 2
- - Ubicloud
- - 01.AI
- - AkashML
- - AI21
- - AionLabs
- - Alibaba
- - Ambient
- - Amazon Bedrock
- - Amazon Nova
- - Anthropic
- - Arcee AI
- - AtlasCloud
- - Avian
- - Azure
- - BaseTen
- - BytePlus
- - Black Forest Labs
- - Cerebras
- - Chutes
- - Cirrascale
- - Clarifai
- - Cloudflare
- - Cohere
- - Crusoe
- - DeepInfra
- - DeepSeek
- - DekaLLM
- - Featherless
- - Fireworks
- - Friendli
- - GMICloud
- - Google
- - Google AI Studio
- - Groq
- - Hyperbolic
- - Inception
- - Inceptron
- - InferenceNet
- - Ionstream
- - Infermatic
- - Io Net
- - Inflection
- - Liquid
- - Mara
- - Mancer 2
- - Minimax
- - ModelRun
- - Mistral
- - Modular
- - Moonshot AI
- - Morph
- - NCompass
- - Nebius
- - NextBit
- - Novita
- - Nvidia
- - OpenAI
- - OpenInference
- - Parasail
- - Perplexity
- - Phala
- - Recraft
- - Reka
- - Relace
- - SambaNova
- - Seed
- - SiliconFlow
- - Sourceful
- - StepFun
- - Stealth
- - StreamLake
- - Switchpoint
- - Together
- - Upstage
- - Venice
- - WandB
- - Xiaomi
- - xAI
- - Z.AI
- - FakeProvider
- example: OpenAI
- type: string
- x-speakeasy-unknown-values: allow
- status:
- description: HTTP status code from the provider
- example: 200
- nullable: true
- type: number
- required:
- - status
- type: object
- ProviderSort:
- description: The provider sorting strategy (price, throughput, latency)
- enum:
- - price
- - throughput
- - latency
- - exacto
- example: price
- type: string
- x-speakeasy-unknown-values: allow
- ProviderSortConfig:
- description: The provider sorting strategy (price, throughput, latency)
- example:
- by: price
- partition: model
- properties:
- by:
- description: The provider sorting strategy (price, throughput, latency)
- enum:
- - price
- - throughput
- - latency
- - exacto
- - null
- example: price
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- partition:
- description: >-
- Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
- enum:
- - model
- - none
- - null
- example: model
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- type: object
- PublicEndpoint:
- description: Information about a specific model endpoint
- example:
- context_length: 8192
- latency_last_30m:
- p50: 0.25
- p75: 0.35
- p90: 0.48
- p99: 0.85
- max_completion_tokens: 4096
- max_prompt_tokens: 8192
- model_id: openai/gpt-4
- model_name: GPT-4
- name: 'OpenAI: GPT-4'
- pricing:
- completion: '0.00006'
- image: '0'
- prompt: '0.00003'
- request: '0'
- provider_name: OpenAI
- quantization: fp16
- status: 0
- supported_parameters:
- - temperature
- - top_p
- - max_tokens
- supports_implicit_caching: true
- tag: openai
- throughput_last_30m:
- p50: 45.2
- p75: 38.5
- p90: 28.3
- p99: 15.1
- uptime_last_1d: 99.8
- uptime_last_30m: 99.5
- uptime_last_5m: 100
- properties:
- context_length:
- type: integer
- latency_last_30m:
- $ref: '#/components/schemas/PercentileStats'
- max_completion_tokens:
- nullable: true
- type: integer
- max_prompt_tokens:
- nullable: true
- type: integer
- model_id:
- description: The unique identifier for the model (permaslug)
- example: openai/gpt-4
- type: string
- model_name:
- type: string
- name:
- type: string
- pricing:
- properties:
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- audio_output:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- discount:
- type: number
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- image_output:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- image_token:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- input_audio_cache:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- input_cache_read:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- input_cache_write:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- internal_reasoning:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- prompt:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- web_search:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- required:
- - prompt
- - completion
+ aion-labs:
+ additionalProperties:
+ nullable: true
type: object
- provider_name:
- $ref: '#/components/schemas/ProviderName'
- quantization:
- allOf:
- - $ref: '#/components/schemas/Quantization'
- - nullable: true
- status:
- $ref: '#/components/schemas/EndpointStatus'
- supported_parameters:
- items:
- $ref: '#/components/schemas/Parameter'
- type: array
- supports_implicit_caching:
- type: boolean
- tag:
- type: string
- throughput_last_30m:
- allOf:
- - $ref: '#/components/schemas/PercentileStats'
- - description: >-
- Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
- uptime_last_1d:
- description: >-
- Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data.
- format: double
- nullable: true
- type: number
- uptime_last_30m:
- format: double
- nullable: true
- type: number
- uptime_last_5m:
- description: >-
- Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data.
- format: double
- nullable: true
- type: number
- required:
- - name
- - model_id
- - model_name
- - context_length
- - pricing
- - provider_name
- - tag
- - quantization
- - max_completion_tokens
- - max_prompt_tokens
- - supported_parameters
- - uptime_last_30m
- - uptime_last_5m
- - uptime_last_1d
- - supports_implicit_caching
- - latency_last_30m
- - throughput_last_30m
- type: object
- PublicPricing:
- description: Pricing information for the model
- example:
- completion: '0.00006'
- image: '0'
- prompt: '0.00003'
- request: '0'
- properties:
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- audio_output:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- discount:
- type: number
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- image_output:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- image_token:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- input_audio_cache:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- input_cache_read:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- input_cache_write:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- internal_reasoning:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- prompt:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- web_search:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- required:
- - prompt
- - completion
- type: object
- Quantization:
- enum:
- - int4
- - int8
- - fp4
- - fp6
- - fp8
- - fp16
- - bf16
- - fp32
- - unknown
- example: fp16
- type: string
- x-speakeasy-unknown-values: allow
- ReasoningConfig:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningConfig'
- - nullable: true
- properties:
- enabled:
- nullable: true
- type: boolean
- max_tokens:
- nullable: true
- type: integer
+ akashml:
+ additionalProperties:
+ nullable: true
type: object
- description: Configuration for reasoning mode in the response
- example:
- enabled: true
- summary: auto
- ReasoningDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningDeltaEvent'
- - properties: {}
+ alibaba:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when reasoning text delta is streamed
- example:
- content_index: 0
- delta: First, we need
- item_id: item-1
- output_index: 0
- sequence_number: 4
- type: response.reasoning_text.delta
- ReasoningDetailEncrypted:
- description: Reasoning detail encrypted schema
- example:
- data: encrypted data
- type: reasoning.encrypted
- properties:
- data:
- type: string
- format:
- $ref: '#/components/schemas/ReasoningFormat'
- id:
- nullable: true
- type: string
- index:
- type: integer
- type:
- enum:
- - reasoning.encrypted
- type: string
- required:
- - type
- - data
- type: object
- ReasoningDetailSummary:
- description: Reasoning detail summary schema
- example:
- summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
- type: reasoning.summary
- properties:
- format:
- $ref: '#/components/schemas/ReasoningFormat'
- id:
- nullable: true
- type: string
- index:
- type: integer
- summary:
- type: string
- type:
- enum:
- - reasoning.summary
- type: string
- required:
- - type
- - summary
- type: object
- ReasoningDetailText:
- description: Reasoning detail text schema
- example:
- signature: signature
- text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
- type: reasoning.text
- properties:
- format:
- $ref: '#/components/schemas/ReasoningFormat'
- id:
- nullable: true
- type: string
- index:
- type: integer
- signature:
- nullable: true
- type: string
- text:
- nullable: true
- type: string
- type:
- enum:
- - reasoning.text
- type: string
- required:
- - type
- type: object
- ReasoningDetailUnion:
- description: Reasoning detail union schema
- discriminator:
- mapping:
- reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
- reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
- reasoning.text: '#/components/schemas/ReasoningDetailText'
- propertyName: type
- example:
- summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
- type: reasoning.summary
- oneOf:
- - $ref: '#/components/schemas/ReasoningDetailSummary'
- - $ref: '#/components/schemas/ReasoningDetailEncrypted'
- - $ref: '#/components/schemas/ReasoningDetailText'
- ReasoningDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningDoneEvent'
- - properties: {}
+ amazon-bedrock:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when reasoning text streaming is complete
- example:
- content_index: 0
- item_id: item-1
- output_index: 0
- sequence_number: 6
- text: First, we need to identify the key components and then combine them logically.
- type: response.reasoning_text.done
- ReasoningEffort:
- enum:
- - xhigh
- - high
- - medium
- - low
- - minimal
- - none
- - null
- example: medium
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- ReasoningFormat:
- enum:
- - unknown
- - openai-responses-v1
- - azure-openai-responses-v1
- - xai-responses-v1
- - anthropic-claude-v1
- - google-gemini-v1
- - null
- example: unknown
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- ReasoningItem:
- allOf:
- - $ref: '#/components/schemas/OutputItemReasoning'
- - properties:
- content:
- items:
- $ref: '#/components/schemas/ReasoningTextContent'
- nullable: true
- type: array
- format:
- $ref: '#/components/schemas/ReasoningFormat'
- signature:
- nullable: true
- type: string
+ amazon-nova:
+ additionalProperties:
+ nullable: true
type: object
- description: Reasoning output item with signature and format extensions
- example:
- id: reasoning-abc123
- summary:
- - text: Step by step analysis
- type: summary_text
- type: reasoning
- ReasoningSummaryPartAddedEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent'
- - properties: {}
+ ambient:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a reasoning summary part is added
- example:
- item_id: item-1
- output_index: 0
- part:
- text: ''
- type: summary_text
- sequence_number: 3
- summary_index: 0
- type: response.reasoning_summary_part.added
- ReasoningSummaryPartDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent'
- - properties: {}
+ anthropic:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a reasoning summary part is complete
- example:
- item_id: item-1
- output_index: 0
- part:
- text: Analyzing the problem step by step to find the optimal solution.
- type: summary_text
- sequence_number: 7
- summary_index: 0
- type: response.reasoning_summary_part.done
- ReasoningSummaryText:
- example:
- text: Analyzed the problem using first principles
- type: summary_text
- properties:
- text:
- type: string
- type:
- enum:
- - summary_text
- type: string
- required:
- - type
- - text
- type: object
- ReasoningSummaryTextDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent'
- - properties: {}
+ anyscale:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when reasoning summary text delta is streamed
- example:
- delta: Analyzing
- item_id: item-1
- output_index: 0
- sequence_number: 4
- summary_index: 0
- type: response.reasoning_summary_text.delta
- ReasoningSummaryTextDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent'
- - properties: {}
+ arcee-ai:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when reasoning summary text streaming is complete
- example:
- item_id: item-1
- output_index: 0
- sequence_number: 6
- summary_index: 0
- text: Analyzing the problem step by step to find the optimal solution.
- type: response.reasoning_summary_text.done
- ReasoningSummaryVerbosity:
- enum:
- - auto
- - concise
- - detailed
- - null
- example: auto
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- ReasoningTextContent:
- example:
- text: Let me think step by step about this problem...
- type: reasoning_text
- properties:
- text:
- type: string
- type:
- enum:
- - reasoning_text
- type: string
- required:
- - type
- - text
- type: object
- RefusalDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseRefusalDeltaEvent'
- - properties: {}
+ atlas-cloud:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a refusal delta is streamed
- example:
- content_index: 0
- delta: I'm sorry
- item_id: item-1
- output_index: 0
- sequence_number: 4
- type: response.refusal.delta
- RefusalDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseRefusalDoneEvent'
- - properties: {}
+ atoma:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when refusal streaming is complete
- example:
- content_index: 0
- item_id: item-1
- output_index: 0
- refusal: I'm sorry, but I can't assist with that request.
- sequence_number: 6
- type: response.refusal.done
- RequestMetadata:
- additionalProperties:
- maxLength: 512
- type: string
- description: >-
- 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.
- example:
- session_id: abc-def-ghi
- user_id: '123'
- nullable: true
- type: object
- RequestTimeoutResponse:
- description: Request Timeout - Operation exceeded time limit
- example:
- error:
- code: 408
- message: Operation timed out. Please try again later.
- properties:
- error:
- $ref: '#/components/schemas/RequestTimeoutResponseErrorData'
- user_id:
- nullable: true
- type: string
- required:
- - error
- type: object
- RequestTimeoutResponseErrorData:
- description: Error data for RequestTimeoutResponse
- example:
- code: 408
- message: Operation timed out. Please try again later.
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
+ avian:
additionalProperties:
nullable: true
- nullable: true
type: object
- required:
- - code
- - message
- type: object
- ResponseHealingPlugin:
- example:
- enabled: true
- id: response-healing
- properties:
- enabled:
- description: Set to false to disable the response-healing plugin for this request. Defaults to true.
- type: boolean
- id:
- enum:
- - response-healing
- type: string
- required:
- - id
- type: object
- ResponseIncludesEnum:
- enum:
- - file_search_call.results
- - message.input_image.image_url
- - computer_call_output.output.image_url
- - reasoning.encrypted_content
- - code_interpreter_call.outputs
- example: file_search_call.results
- type: string
- x-speakeasy-unknown-values: allow
- ResponseOutputText:
- example:
- annotations:
- - end_index: 42
- start_index: 0
- title: Paris - Wikipedia
- type: url_citation
- url: https://en.wikipedia.org/wiki/Paris
- text: The capital of France is Paris.
- type: output_text
- properties:
- annotations:
- items:
- $ref: '#/components/schemas/OpenAIResponsesAnnotation'
- type: array
- logprobs:
- items:
- properties:
- bytes:
- items:
- type: integer
- type: array
- logprob:
- format: double
- type: number
- token:
- type: string
- top_logprobs:
- items:
- properties:
- bytes:
- items:
- type: integer
- type: array
- logprob:
- format: double
- type: number
- token:
- type: string
- required:
- - token
- - bytes
- - logprob
- type: object
- type: array
- required:
- - token
- - bytes
- - logprob
- - top_logprobs
- type: object
- type: array
- text:
- type: string
- type:
- enum:
- - output_text
- type: string
- required:
- - type
- - text
- type: object
- ResponsesErrorField:
- description: Error information returned from the API
- example:
- code: rate_limit_exceeded
- message: Rate limit exceeded. Please try again later.
- nullable: true
- properties:
- code:
- enum:
- - server_error
- - rate_limit_exceeded
- - invalid_prompt
- - vector_store_timeout
- - invalid_image
- - invalid_image_format
- - invalid_base64_image
- - invalid_image_url
- - image_too_large
- - image_too_small
- - image_parse_error
- - image_content_policy_violation
- - invalid_image_mode
- - image_file_too_large
- - unsupported_image_media_type
- - empty_image_file
- - failed_to_download_image
- - image_file_not_found
- type: string
- x-speakeasy-unknown-values: allow
- message:
- type: string
- required:
- - code
- - message
- type: object
- ResponsesRequest:
- description: Request schema for Responses endpoint
- example:
- 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
- properties:
- background:
- nullable: true
- type: boolean
- frequency_penalty:
- format: double
- nullable: true
- type: number
- image_config:
- $ref: '#/components/schemas/ImageConfig'
- include:
- items:
- $ref: '#/components/schemas/ResponseIncludesEnum'
- nullable: true
- type: array
- input:
- $ref: '#/components/schemas/Inputs'
- instructions:
- nullable: true
- type: string
- max_output_tokens:
- nullable: true
- type: integer
- max_tool_calls:
- nullable: true
- type: integer
- metadata:
- $ref: '#/components/schemas/RequestMetadata'
- modalities:
- description: Output modalities for the response. Supported values are "text" and "image".
- example:
- - text
- - image
- items:
- $ref: '#/components/schemas/OutputModalityEnum'
- type: array
- model:
- type: string
- models:
- items:
- type: string
- type: array
- parallel_tool_calls:
- nullable: true
- type: boolean
- plugins:
- description: Plugins you want to enable for this request, including their settings.
- items:
- discriminator:
- mapping:
- auto-router: '#/components/schemas/AutoRouterPlugin'
- context-compression: '#/components/schemas/ContextCompressionPlugin'
- file-parser: '#/components/schemas/FileParserPlugin'
- moderation: '#/components/schemas/ModerationPlugin'
- response-healing: '#/components/schemas/ResponseHealingPlugin'
- web: '#/components/schemas/WebSearchPlugin'
- propertyName: id
- oneOf:
- - $ref: '#/components/schemas/AutoRouterPlugin'
- - $ref: '#/components/schemas/ModerationPlugin'
- - $ref: '#/components/schemas/WebSearchPlugin'
- - $ref: '#/components/schemas/FileParserPlugin'
- - $ref: '#/components/schemas/ResponseHealingPlugin'
- - $ref: '#/components/schemas/ContextCompressionPlugin'
- type: array
- presence_penalty:
- format: double
- nullable: true
- type: number
- previous_response_id:
- nullable: true
- type: string
- prompt:
- $ref: '#/components/schemas/StoredPromptTemplate'
- prompt_cache_key:
- nullable: true
- type: string
- provider:
- $ref: '#/components/schemas/ProviderPreferences'
- reasoning:
- $ref: '#/components/schemas/ReasoningConfig'
- route:
- $ref: '#/components/schemas/DeprecatedRoute'
- safety_identifier:
- nullable: true
- type: string
- service_tier:
- default: auto
- enum:
- - auto
- - default
- - flex
- - priority
- - scale
- - null
- nullable: true
- 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.
- maxLength: 256
- type: string
- store:
- const: false
- default: false
- type: boolean
- stream:
- default: false
- type: boolean
- temperature:
- format: double
- nullable: true
- type: number
- text:
- $ref: '#/components/schemas/TextExtendedConfig'
- tool_choice:
- $ref: '#/components/schemas/OpenAIResponsesToolChoice'
- tools:
- items:
- anyOf:
- - allOf:
- - $ref: '#/components/schemas/FunctionTool'
- - properties: {}
- type: object
- description: Function tool definition
- example:
- description: Get the current weather in a location
- name: get_weather
- parameters:
- properties:
- location:
- description: The city and state
- type: string
- unit:
- enum:
- - celsius
- - fahrenheit
- type: string
- x-speakeasy-unknown-values: allow
- required:
- - location
- type: object
- type: function
- - $ref: '#/components/schemas/Preview_WebSearchServerTool'
- - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool'
- - $ref: '#/components/schemas/Legacy_WebSearchServerTool'
- - $ref: '#/components/schemas/WebSearchServerTool'
- - $ref: '#/components/schemas/FileSearchServerTool'
- - $ref: '#/components/schemas/ComputerUseServerTool'
- - $ref: '#/components/schemas/CodeInterpreterServerTool'
- - $ref: '#/components/schemas/McpServerTool'
- - $ref: '#/components/schemas/ImageGenerationServerTool'
- - $ref: '#/components/schemas/CodexLocalShellTool'
- - $ref: '#/components/schemas/ShellServerTool'
- - $ref: '#/components/schemas/ApplyPatchServerTool'
- - $ref: '#/components/schemas/CustomTool'
- - $ref: '#/components/schemas/DatetimeServerTool'
- - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- - $ref: '#/components/schemas/ChatSearchModelsServerTool'
- - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
- type: array
- top_k:
- type: integer
- top_logprobs:
- nullable: true
- type: integer
- top_p:
- format: double
- nullable: true
- type: number
- trace:
- $ref: '#/components/schemas/TraceConfig'
- truncation:
- $ref: '#/components/schemas/OpenAIResponsesTruncation'
- user:
- description: >-
- 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.
- maxLength: 256
- type: string
- type: object
- SearchContextSizeEnum:
- description: Size of the search context for web search tools
- enum:
- - low
- - medium
- - high
- example: medium
- type: string
- x-speakeasy-unknown-values: allow
- SearchModelsServerToolConfig:
- description: Configuration for the openrouter:experimental__search_models server tool
- example:
- max_results: 5
- properties:
- max_results:
- description: Maximum number of models to return. Defaults to 5, max 20.
- example: 5
- type: integer
- 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.
- enum:
- - low
- - medium
- - high
- example: medium
- type: string
- x-speakeasy-unknown-values: allow
- ServiceTier:
- enum:
- - auto
- - default
- - flex
- - priority
- - scale
- - null
- example: default
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- ServiceUnavailableResponse:
- description: Service Unavailable - Service temporarily unavailable
- example:
- error:
- code: 503
- message: Service temporarily unavailable
- properties:
- error:
- $ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
- user_id:
- nullable: true
- type: string
- required:
- - error
- type: object
- ServiceUnavailableResponseErrorData:
- description: Error data for ServiceUnavailableResponse
- example:
- code: 503
- message: Service temporarily unavailable
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
+ azure:
additionalProperties:
nullable: true
- nullable: true
type: object
- required:
- - code
- - message
- type: object
- ShellServerTool:
- description: Shell tool configuration
- example:
- type: shell
- properties:
- type:
- enum:
- - shell
- type: string
- required:
- - type
- type: object
- StoredPromptTemplate:
- example:
- id: prompt-abc123
- variables:
- name: John
- nullable: true
- properties:
- id:
- type: string
- variables:
+ baidu:
additionalProperties:
- anyOf:
- - type: string
- - $ref: '#/components/schemas/InputText'
- - $ref: '#/components/schemas/InputImage'
- - $ref: '#/components/schemas/InputFile'
- nullable: true
+ nullable: true
type: object
- required:
- - id
- type: object
- StreamEvents:
- description: Union of all possible event types emitted during response streaming
- discriminator:
- mapping:
- error: '#/components/schemas/ErrorEvent'
- 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.failed: '#/components/schemas/StreamEventsResponseFailed'
- response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent'
- response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent'
- 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'
- response.image_generation_call.partial_image: '#/components/schemas/ImageGenCallPartialImageEvent'
- response.in_progress: '#/components/schemas/OpenResponsesInProgressEvent'
- response.incomplete: '#/components/schemas/StreamEventsResponseIncomplete'
- response.output_item.added: '#/components/schemas/StreamEventsResponseOutputItemAdded'
- response.output_item.done: '#/components/schemas/StreamEventsResponseOutputItemDone'
- response.output_text.annotation.added: '#/components/schemas/AnnotationAddedEvent'
- response.output_text.delta: '#/components/schemas/TextDeltaEvent'
- response.output_text.done: '#/components/schemas/TextDoneEvent'
- response.reasoning_summary_part.added: '#/components/schemas/ReasoningSummaryPartAddedEvent'
- response.reasoning_summary_part.done: '#/components/schemas/ReasoningSummaryPartDoneEvent'
- response.reasoning_summary_text.delta: '#/components/schemas/ReasoningSummaryTextDeltaEvent'
- response.reasoning_summary_text.done: '#/components/schemas/ReasoningSummaryTextDoneEvent'
- response.reasoning_text.delta: '#/components/schemas/ReasoningDeltaEvent'
- response.reasoning_text.done: '#/components/schemas/ReasoningDoneEvent'
- response.refusal.delta: '#/components/schemas/RefusalDeltaEvent'
- response.refusal.done: '#/components/schemas/RefusalDoneEvent'
- response.web_search_call.completed: '#/components/schemas/WebSearchCallCompletedEvent'
- response.web_search_call.in_progress: '#/components/schemas/WebSearchCallInProgressEvent'
- response.web_search_call.searching: '#/components/schemas/WebSearchCallSearchingEvent'
- propertyName: type
- example:
- 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
- oneOf:
- - $ref: '#/components/schemas/OpenResponsesCreatedEvent'
- - $ref: '#/components/schemas/OpenResponsesInProgressEvent'
- - $ref: '#/components/schemas/StreamEventsResponseCompleted'
- - $ref: '#/components/schemas/StreamEventsResponseIncomplete'
- - $ref: '#/components/schemas/StreamEventsResponseFailed'
- - $ref: '#/components/schemas/ErrorEvent'
- - $ref: '#/components/schemas/StreamEventsResponseOutputItemAdded'
- - $ref: '#/components/schemas/StreamEventsResponseOutputItemDone'
- - $ref: '#/components/schemas/ContentPartAddedEvent'
- - $ref: '#/components/schemas/ContentPartDoneEvent'
- - $ref: '#/components/schemas/TextDeltaEvent'
- - $ref: '#/components/schemas/TextDoneEvent'
- - $ref: '#/components/schemas/RefusalDeltaEvent'
- - $ref: '#/components/schemas/RefusalDoneEvent'
- - $ref: '#/components/schemas/AnnotationAddedEvent'
- - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent'
- - $ref: '#/components/schemas/FunctionCallArgsDoneEvent'
- - $ref: '#/components/schemas/ReasoningDeltaEvent'
- - $ref: '#/components/schemas/ReasoningDoneEvent'
- - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent'
- - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent'
- - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent'
- - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent'
- - $ref: '#/components/schemas/ImageGenCallInProgressEvent'
- - $ref: '#/components/schemas/ImageGenCallGeneratingEvent'
- - $ref: '#/components/schemas/ImageGenCallPartialImageEvent'
- - $ref: '#/components/schemas/ImageGenCallCompletedEvent'
- - $ref: '#/components/schemas/WebSearchCallInProgressEvent'
- - $ref: '#/components/schemas/WebSearchCallSearchingEvent'
- - $ref: '#/components/schemas/WebSearchCallCompletedEvent'
- StreamEventsResponseCompleted:
- allOf:
- - $ref: '#/components/schemas/CompletedEvent'
- - properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
+ baseten:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a response has completed successfully
- example:
- 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: completed
- temperature: null
- tool_choice: auto
- tools: []
- top_p: null
- sequence_number: 10
- type: response.completed
- StreamEventsResponseFailed:
- allOf:
- - $ref: '#/components/schemas/FailedEvent'
- - properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
+ black-forest-labs:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a response has failed
- example:
- 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: failed
- temperature: null
- tool_choice: auto
- tools: []
- top_p: null
- sequence_number: 3
- type: response.failed
- StreamEventsResponseIncomplete:
- allOf:
- - $ref: '#/components/schemas/IncompleteEvent'
- - properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
+ byteplus:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a response is incomplete
- example:
- 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: incomplete
- temperature: null
- tool_choice: auto
- tools: []
- top_p: null
- sequence_number: 5
- type: response.incomplete
- StreamEventsResponseOutputItemAdded:
- allOf:
- - $ref: '#/components/schemas/OutputItemAddedEvent'
- - properties:
- item:
- $ref: '#/components/schemas/OutputItems'
+ centml:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a new output item is added to the response
- example:
- item:
- content: []
- id: item-1
- role: assistant
- status: in_progress
- type: message
- output_index: 0
- sequence_number: 2
- type: response.output_item.added
- StreamEventsResponseOutputItemDone:
- allOf:
- - $ref: '#/components/schemas/OutputItemDoneEvent'
- - properties:
- item:
- $ref: '#/components/schemas/OutputItems'
+ cerebras:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when an output item is complete
- example:
- item:
- content:
- - annotations: []
- text: Hello! How can I help you?
- type: output_text
- id: item-1
- role: assistant
- status: completed
- type: message
- output_index: 0
- sequence_number: 8
- type: response.output_item.done
- StreamLogprob:
- allOf:
- - $ref: '#/components/schemas/OpenResponsesLogProbs'
- - properties:
- top_logprobs:
- items:
- $ref: '#/components/schemas/StreamLogprobTopLogprob'
- type: array
+ chutes:
+ additionalProperties:
+ nullable: true
type: object
- description: Log probability information for a token
- example:
- bytes:
- - 72
- - 101
- - 108
- - 108
- - 111
- logprob: -0.5
- token: Hello
- top_logprobs: []
- StreamLogprobTopLogprob:
- allOf:
- - $ref: '#/components/schemas/OpenResponsesTopLogprobs'
- - properties: {}
+ cirrascale:
+ additionalProperties:
+ nullable: true
type: object
- description: Alternative token with its log probability
- example:
- bytes:
- - 72
- - 101
- - 108
- - 108
- - 111
- logprob: -0.5
- token: Hello
- TextConfig:
- description: Text output configuration including format and verbosity
- example:
- format:
- type: text
- verbosity: medium
- properties:
- format:
- $ref: '#/components/schemas/Formats'
- verbosity:
- enum:
- - high
- - low
- - medium
- - null
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- type: object
- TextDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseTextDeltaEvent'
- - properties:
- logprobs:
- items:
- $ref: '#/components/schemas/StreamLogprob'
- type: array
+ clarifai:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when a text delta is streamed
- example:
- content_index: 0
- delta: Hello
- item_id: item-1
- logprobs: []
- output_index: 0
- sequence_number: 4
- type: response.output_text.delta
- TextDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseTextDoneEvent'
- - properties:
- logprobs:
- items:
- $ref: '#/components/schemas/StreamLogprob'
- type: array
+ cloudflare:
+ additionalProperties:
+ nullable: true
type: object
- description: Event emitted when text streaming is complete
- example:
- content_index: 0
- item_id: item-1
- logprobs: []
- output_index: 0
- sequence_number: 6
- text: Hello! How can I help you?
- type: response.output_text.done
- TextExtendedConfig:
- allOf:
- - $ref: '#/components/schemas/TextConfig'
- - properties: {}
+ cohere:
+ additionalProperties:
+ nullable: true
type: object
- description: Text output configuration including format and verbosity
- example:
- format:
- type: text
- ToolCallStatus:
- enum:
- - in_progress
- - completed
- - incomplete
- example: completed
- type: string
- x-speakeasy-unknown-values: allow
- ToolChoiceAllowed:
- description: Constrains the model to a pre-defined set of allowed tools
- example:
- mode: auto
- tools:
- - name: get_weather
- type: function
- type: allowed_tools
- properties:
- mode:
- anyOf:
- - enum:
- - auto
- type: string
- - enum:
- - required
- type: string
- tools:
- items:
- additionalProperties:
- nullable: true
- type: object
- type: array
- type:
- enum:
- - allowed_tools
- type: string
- required:
- - type
- - mode
- - tools
- type: object
- TooManyRequestsResponse:
- description: Too Many Requests - Rate limit exceeded
- example:
- error:
- code: 429
- message: Rate limit exceeded
- properties:
- error:
- $ref: '#/components/schemas/TooManyRequestsResponseErrorData'
- user_id:
- nullable: true
- type: string
- required:
- - error
- type: object
- TooManyRequestsResponseErrorData:
- description: Error data for TooManyRequestsResponse
- example:
- code: 429
- message: Rate limit exceeded
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
+ crofai:
additionalProperties:
nullable: true
- nullable: true
type: object
- required:
- - code
- - message
- type: object
- TopProviderInfo:
- description: Information about the top provider for this model
- example:
- context_length: 8192
- is_moderated: true
- max_completion_tokens: 4096
- properties:
- context_length:
- description: Context length from the top provider
- example: 8192
- nullable: true
- type: integer
- is_moderated:
- description: Whether the top provider moderates content
- example: true
- type: boolean
- max_completion_tokens:
- description: Maximum completion tokens from the top provider
- example: 4096
- nullable: true
- type: integer
- required:
- - is_moderated
- type: object
- TraceConfig:
- additionalProperties:
- nullable: true
- description: >-
- 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.
- example:
- trace_id: trace-abc123
- trace_name: my-app-trace
- properties:
- generation_name:
- type: string
- parent_span_id:
- type: string
- span_name:
- type: string
- trace_id:
- type: string
- trace_name:
- type: string
- type: object
- Truncation:
- enum:
- - auto
- - disabled
- - null
- example: auto
- nullable: true
- type: string
- x-speakeasy-unknown-values: allow
- UnauthorizedResponse:
- description: Unauthorized - Authentication required or invalid credentials
- example:
- error:
- code: 401
- message: Missing Authentication header
- properties:
- error:
- $ref: '#/components/schemas/UnauthorizedResponseErrorData'
- user_id:
- nullable: true
- type: string
- required:
- - error
- type: object
- UnauthorizedResponseErrorData:
- description: Error data for UnauthorizedResponse
- example:
- code: 401
- message: Missing Authentication header
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
+ crusoe:
additionalProperties:
nullable: true
- nullable: true
type: object
- required:
- - code
- - message
- type: object
- UnprocessableEntityResponse:
- description: Unprocessable Entity - Semantic validation failure
- example:
- error:
- code: 422
- message: Invalid argument
- properties:
- error:
- $ref: '#/components/schemas/UnprocessableEntityResponseErrorData'
- user_id:
- nullable: true
- type: string
- required:
- - error
- type: object
- UnprocessableEntityResponseErrorData:
- description: Error data for UnprocessableEntityResponse
- example:
- code: 422
- message: Invalid argument
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
+ 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
+ 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
+ wandb:
+ additionalProperties:
+ nullable: true
+ type: object
+ xai:
+ additionalProperties:
+ nullable: true
+ type: object
+ xiaomi:
+ additionalProperties:
+ nullable: true
+ type: object
+ z-ai:
additionalProperties:
nullable: true
- nullable: true
type: object
- required:
- - code
- - message
type: object
- UpdateGuardrailRequest:
+ ProviderOverloadedResponse:
+ description: Provider Overloaded - Provider is temporarily overloaded
example:
- description: Updated description
- limit_usd: 75
- name: Updated Guardrail Name
- reset_interval: weekly
- properties:
- allowed_models:
- description: Array of model identifiers (slug or canonical_slug accepted)
+ error:
+ code: 529
+ message: Provider returned error
+ properties:
+ error:
+ $ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ ProviderOverloadedResponseErrorData:
+ description: Error data for ProviderOverloadedResponse
+ example:
+ code: 529
+ message: Provider returned error
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ ProviderPreferences:
+ additionalProperties: false
+ description: When multiple model providers are available, optionally indicate your routing preference.
+ example:
+ allow_fallbacks: true
+ nullable: true
+ properties:
+ allow_fallbacks:
+ description: >
+ Whether to allow backup providers to serve requests
+
+ - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
+
+ - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
+
+ nullable: true
+ type: boolean
+ data_collection:
+ description: >-
+ Data collection setting. If no available model provider meets the requirement, your request will return an error.
+
+ - allow: (default) allow providers which store user data non-transiently and may train on it
+
+
+ - deny: use only providers which do not collect user data.
+ enum:
+ - deny
+ - allow
+ - null
+ example: allow
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ enforce_distillable_text:
+ description: >-
+ Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
+ example: true
+ nullable: true
+ type: boolean
+ ignore:
+ description: >-
+ List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
example:
- - openai/gpt-5.2
+ - openai
+ - anthropic
items:
- type: string
- minItems: 1
+ anyOf:
+ - $ref: '#/components/schemas/ProviderName'
+ - type: string
nullable: true
type: array
- allowed_providers:
- description: New list of allowed provider IDs
+ max_price:
+ description: >-
+ The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
+ properties:
+ audio:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: Price per audio unit
+ completion:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: Price per million completion tokens
+ image:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: Price per image
+ prompt:
+ $ref: '#/components/schemas/BigNumberUnion'
+ request:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: Price per request
+ type: object
+ only:
+ description: >-
+ List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
example:
- openai
- anthropic
- - deepseek
items:
- type: string
- minItems: 1
+ anyOf:
+ - $ref: '#/components/schemas/ProviderName'
+ - type: string
nullable: true
type: array
- description:
- description: New description for the guardrail
- example: Updated description
- maxLength: 1000
- nullable: true
- type: string
- enforce_zdr:
- description: Whether to enforce zero data retention
- example: true
- nullable: true
- type: boolean
- ignored_models:
- description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
+ order:
+ description: >-
+ An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
example:
- - openai/gpt-4o-mini
+ - openai
+ - anthropic
items:
- type: string
- minItems: 1
+ anyOf:
+ - $ref: '#/components/schemas/ProviderName'
+ - type: string
nullable: true
type: array
- ignored_providers:
- description: List of provider IDs to exclude from routing
- example:
- - azure
+ preferred_max_latency:
+ $ref: '#/components/schemas/PreferredMaxLatency'
+ preferred_min_throughput:
+ $ref: '#/components/schemas/PreferredMinThroughput'
+ quantizations:
+ description: A list of quantization levels to filter the provider by.
items:
- type: string
- minItems: 1
+ $ref: '#/components/schemas/Quantization'
nullable: true
type: array
- limit_usd:
- description: New spending limit in USD
- example: 75
- format: double
+ require_parameters:
+ description: >-
+ Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
nullable: true
- type: number
- name:
- description: New name for the guardrail
- example: Updated Guardrail Name
- maxLength: 200
- minLength: 1
- type: string
- reset_interval:
- $ref: '#/components/schemas/GuardrailInterval'
- type: object
- UpdateGuardrailResponse:
- example:
- data:
- allowed_models: null
- allowed_providers:
- - openai
- created_at: '2025-08-24T10:30:00Z'
- description: Updated description
- enforce_zdr: true
- id: 550e8400-e29b-41d4-a716-446655440000
- ignored_models: null
- ignored_providers: null
- limit_usd: 75
- name: Updated Guardrail Name
- reset_interval: weekly
- updated_at: '2025-08-24T16:00:00Z'
- properties:
- data:
- allOf:
- - $ref: '#/components/schemas/Guardrail'
- - description: The updated guardrail
- required:
- - data
+ type: boolean
+ sort:
+ anyOf:
+ - $ref: '#/components/schemas/ProviderSort'
+ - $ref: '#/components/schemas/ProviderSortConfig'
+ - nullable: true
+ description: >-
+ The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
+ example: price
+ zdr:
+ description: >-
+ Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
+ example: true
+ nullable: true
+ type: boolean
type: object
- URLCitation:
+ ProviderResponse:
+ description: Details of a provider response for a generation attempt
example:
- end_index: 42
- start_index: 0
- title: OpenRouter Documentation
- type: url_citation
- url: https://openrouter.ai/docs
+ endpoint_id: ep_abc123
+ id: chatcmpl-abc123
+ is_byok: false
+ latency: 1200
+ model_permaslug: openai/gpt-4
+ provider_name: OpenAI
+ status: 200
properties:
- end_index:
- type: integer
- start_index:
- type: integer
- title:
+ endpoint_id:
+ description: Internal endpoint identifier
+ example: ep_abc123
type: string
- type:
- enum:
- - url_citation
+ id:
+ description: Upstream provider response identifier
+ example: chatcmpl-abc123
type: string
- url:
+ is_byok:
+ description: Whether the request used a bring-your-own-key
+ example: false
+ type: boolean
+ latency:
+ description: Response latency in milliseconds
+ example: 1200
+ type: number
+ model_permaslug:
+ description: Canonical model slug
+ example: openai/gpt-4
type: string
- required:
- - type
- - url
- - title
- - start_index
- - end_index
+ provider_name:
+ description: Name of the provider
+ enum:
+ - AnyScale
+ - Atoma
+ - Cent-ML
+ - CrofAI
+ - Enfer
+ - GoPomelo
+ - HuggingFace
+ - Hyperbolic 2
+ - InoCloud
+ - Kluster
+ - Lambda
+ - Lepton
+ - Lynn 2
+ - Lynn
+ - Mancer
+ - Meta
+ - Modal
+ - Nineteen
+ - OctoAI
+ - Recursal
+ - Reflection
+ - Replicate
+ - SambaNova 2
+ - SF Compute
+ - Targon
+ - Together 2
+ - Ubicloud
+ - 01.AI
+ - AkashML
+ - AI21
+ - AionLabs
+ - Alibaba
+ - Ambient
+ - Baidu
+ - Amazon Bedrock
+ - Amazon Nova
+ - Anthropic
+ - Arcee AI
+ - AtlasCloud
+ - Avian
+ - Azure
+ - BaseTen
+ - BytePlus
+ - Black Forest Labs
+ - Cerebras
+ - Chutes
+ - Cirrascale
+ - Clarifai
+ - Cloudflare
+ - Cohere
+ - Crusoe
+ - DeepInfra
+ - DeepSeek
+ - DekaLLM
+ - Featherless
+ - Fireworks
+ - Friendli
+ - GMICloud
+ - Google
+ - Google AI Studio
+ - Groq
+ - Hyperbolic
+ - Inception
+ - Inceptron
+ - InferenceNet
+ - Ionstream
+ - Infermatic
+ - Io Net
+ - Inflection
+ - Liquid
+ - Mara
+ - Mancer 2
+ - Minimax
+ - ModelRun
+ - Mistral
+ - Modular
+ - Moonshot AI
+ - Morph
+ - NCompass
+ - Nebius
+ - Nex AGI
+ - NextBit
+ - Novita
+ - Nvidia
+ - OpenAI
+ - OpenInference
+ - Parasail
+ - Poolside
+ - Perceptron
+ - Perplexity
+ - Phala
+ - Recraft
+ - Reka
+ - Relace
+ - SambaNova
+ - Seed
+ - SiliconFlow
+ - Sourceful
+ - StepFun
+ - Stealth
+ - StreamLake
+ - Switchpoint
+ - Together
+ - Upstage
+ - Venice
+ - WandB
+ - Xiaomi
+ - xAI
+ - Z.AI
+ - FakeProvider
+ example: OpenAI
+ type: string
+ x-speakeasy-unknown-values: allow
+ status:
+ description: HTTP status code from the provider
+ example: 200
+ nullable: true
+ type: number
+ required:
+ - status
type: object
- Usage:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesUsage'
- - nullable: true
- properties:
- cost:
- description: Cost of the completion
- format: double
- nullable: true
- type: number
- cost_details:
- properties:
- upstream_inference_cost:
- format: double
- nullable: true
- type: number
- upstream_inference_input_cost:
- format: double
- type: number
- upstream_inference_output_cost:
- format: double
- type: number
- required:
- - upstream_inference_input_cost
- - upstream_inference_output_cost
- type: object
- is_byok:
- description: Whether a request was made using a Bring Your Own Key configuration
- type: boolean
- type: object
- description: Token usage information for the response
- example:
- cost: 0.0012
- cost_details:
- upstream_inference_cost: null
- upstream_inference_input_cost: 0.0008
- upstream_inference_output_cost: 0.0004
- input_tokens: 10
- input_tokens_details:
- cached_tokens: 0
- output_tokens: 25
- output_tokens_details:
- reasoning_tokens: 0
- total_tokens: 35
- VideoGenerationRequest:
+ ProviderSort:
+ description: The provider sorting strategy (price, throughput, latency)
+ enum:
+ - price
+ - throughput
+ - latency
+ - exacto
+ example: price
+ type: string
+ x-speakeasy-unknown-values: allow
+ ProviderSortConfig:
+ description: The provider sorting strategy (price, throughput, latency)
example:
- aspect_ratio: '16:9'
- duration: 8
- model: google/veo-3.1
- prompt: A serene mountain landscape at sunset
- resolution: 720p
+ by: price
+ partition: model
properties:
- aspect_ratio:
- description: Aspect ratio of the generated video
+ by:
+ description: The provider sorting strategy (price, throughput, latency)
enum:
- - '16:9'
- - '9:16'
- - '1:1'
- - '4:3'
- - '3:4'
- - '21:9'
- - '9:21'
- example: '16:9'
+ - price
+ - throughput
+ - latency
+ - exacto
+ - null
+ example: price
+ nullable: true
type: string
x-speakeasy-unknown-values: allow
- duration:
- description: Duration of the generated video in seconds
- example: 8
- minimum: 1
- type: integer
- frame_images:
- description: >-
- 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.
- items:
- $ref: '#/components/schemas/FrameImage'
- type: array
- generate_audio:
+ partition:
description: >-
- Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
- example: true
- type: boolean
- input_references:
- description: Reference images to guide video generation
- items:
- $ref: '#/components/schemas/ContentPartImage'
- type: array
- model:
- type: string
- prompt:
+ Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
+ enum:
+ - model
+ - none
+ - null
+ example: model
+ nullable: true
type: string
- provider:
- 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
+ x-speakeasy-unknown-values: allow
+ type: object
+ PublicEndpoint:
+ description: Information about a specific model endpoint
+ example:
+ context_length: 8192
+ latency_last_30m:
+ p50: 0.25
+ p75: 0.35
+ p90: 0.48
+ p99: 0.85
+ max_completion_tokens: 4096
+ max_prompt_tokens: 8192
+ model_id: openai/gpt-4
+ model_name: GPT-4
+ name: 'OpenAI: GPT-4'
+ pricing:
+ completion: '0.00006'
+ image: '0'
+ prompt: '0.00003'
+ request: '0'
+ provider_name: OpenAI
+ quantization: fp16
+ status: 0
+ supported_parameters:
+ - temperature
+ - top_p
+ - max_tokens
+ supports_implicit_caching: true
+ tag: openai
+ throughput_last_30m:
+ p50: 45.2
+ p75: 38.5
+ p90: 28.3
+ p99: 15.1
+ uptime_last_1d: 99.8
+ uptime_last_30m: 99.5
+ uptime_last_5m: 100
+ properties:
+ context_length:
+ type: integer
+ latency_last_30m:
+ $ref: '#/components/schemas/PercentileStats'
+ max_completion_tokens:
+ nullable: true
+ type: integer
+ max_prompt_tokens:
+ nullable: true
+ type: integer
+ model_id:
+ description: The unique identifier for the model (permaslug)
+ example: openai/gpt-4
+ type: string
+ model_name:
+ type: string
+ name:
+ type: string
+ pricing:
+ properties:
+ audio:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ audio_output:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ completion:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ discount:
+ type: number
+ image:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ image_output:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ image_token:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ input_audio_cache:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ input_cache_read:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ input_cache_write:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ internal_reasoning:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ prompt:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ request:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ web_search:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ required:
+ - prompt
+ - completion
+ type: object
+ provider_name:
+ $ref: '#/components/schemas/ProviderName'
+ quantization:
+ allOf:
+ - $ref: '#/components/schemas/Quantization'
+ - nullable: true
+ status:
+ $ref: '#/components/schemas/EndpointStatus'
+ supported_parameters:
+ items:
+ $ref: '#/components/schemas/Parameter'
+ type: array
+ supports_implicit_caching:
+ type: boolean
+ tag:
+ type: string
+ throughput_last_30m:
+ allOf:
+ - $ref: '#/components/schemas/PercentileStats'
+ - description: >-
+ Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
+ uptime_last_1d:
+ description: >-
+ Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data.
+ format: double
+ nullable: true
+ type: number
+ uptime_last_30m:
+ format: double
+ nullable: true
+ type: number
+ uptime_last_5m:
+ description: >-
+ Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data.
+ format: double
+ nullable: true
+ type: number
+ required:
+ - name
+ - model_id
+ - model_name
+ - context_length
+ - pricing
+ - provider_name
+ - tag
+ - quantization
+ - max_completion_tokens
+ - max_prompt_tokens
+ - supported_parameters
+ - uptime_last_30m
+ - uptime_last_5m
+ - uptime_last_1d
+ - supports_implicit_caching
+ - latency_last_30m
+ - throughput_last_30m
+ type: object
+ PublicPricing:
+ description: Pricing information for the model
+ example:
+ completion: '0.00006'
+ image: '0'
+ prompt: '0.00003'
+ request: '0'
+ properties:
+ audio:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ audio_output:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ completion:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ discount:
+ type: number
+ image:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ image_output:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ image_token:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ input_audio_cache:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ input_cache_read:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ input_cache_write:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ internal_reasoning:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ prompt:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ request:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ web_search:
+ allOf:
+ - $ref: '#/components/schemas/BigNumberUnion'
+ - description: A number or string value representing a large number
+ required:
+ - prompt
+ - completion
+ type: object
+ Quantization:
+ enum:
+ - int4
+ - int8
+ - fp4
+ - fp6
+ - fp8
+ - fp16
+ - bf16
+ - fp32
+ - unknown
+ example: fp16
+ type: string
+ x-speakeasy-unknown-values: allow
+ ReasoningConfig:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningConfig'
+ - nullable: true
+ properties:
+ enabled:
+ nullable: true
+ type: boolean
+ max_tokens:
+ nullable: true
+ type: integer
+ type: object
+ description: Configuration for reasoning mode in the response
+ example:
+ enabled: true
+ summary: auto
+ ReasoningDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningDeltaEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when reasoning text delta is streamed
+ example:
+ content_index: 0
+ delta: First, we need
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ type: response.reasoning_text.delta
+ ReasoningDetailEncrypted:
+ description: Reasoning detail encrypted schema
+ example:
+ data: encrypted data
+ type: reasoning.encrypted
+ properties:
+ data:
+ type: string
+ format:
+ $ref: '#/components/schemas/ReasoningFormat'
+ id:
+ nullable: true
+ type: string
+ index:
+ type: integer
+ type:
+ enum:
+ - reasoning.encrypted
+ type: string
+ required:
+ - type
+ - data
+ type: object
+ ReasoningDetailSummary:
+ description: Reasoning detail summary schema
+ example:
+ summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
+ type: reasoning.summary
+ properties:
+ format:
+ $ref: '#/components/schemas/ReasoningFormat'
+ id:
+ nullable: true
+ type: string
+ index:
+ type: integer
+ summary:
+ type: string
+ type:
+ enum:
+ - reasoning.summary
+ type: string
+ required:
+ - type
+ - summary
+ type: object
+ ReasoningDetailText:
+ description: Reasoning detail text schema
+ example:
+ signature: signature
+ text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
+ type: reasoning.text
+ properties:
+ format:
+ $ref: '#/components/schemas/ReasoningFormat'
+ id:
+ nullable: true
+ type: string
+ index:
+ type: integer
+ signature:
+ nullable: true
+ type: string
+ text:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - reasoning.text
+ type: string
+ required:
+ - type
+ type: object
+ ReasoningDetailUnion:
+ description: Reasoning detail union schema
+ discriminator:
+ mapping:
+ reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
+ reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
+ reasoning.text: '#/components/schemas/ReasoningDetailText'
+ propertyName: type
+ example:
+ summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
+ type: reasoning.summary
+ oneOf:
+ - $ref: '#/components/schemas/ReasoningDetailSummary'
+ - $ref: '#/components/schemas/ReasoningDetailEncrypted'
+ - $ref: '#/components/schemas/ReasoningDetailText'
+ ReasoningDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningDoneEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when reasoning text streaming is complete
+ example:
+ content_index: 0
+ item_id: item-1
+ output_index: 0
+ sequence_number: 6
+ text: First, we need to identify the key components and then combine them logically.
+ type: response.reasoning_text.done
+ ReasoningEffort:
+ enum:
+ - xhigh
+ - high
+ - medium
+ - low
+ - minimal
+ - none
+ - null
+ example: medium
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ReasoningFormat:
+ enum:
+ - unknown
+ - openai-responses-v1
+ - azure-openai-responses-v1
+ - xai-responses-v1
+ - anthropic-claude-v1
+ - google-gemini-v1
+ - null
+ example: unknown
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ReasoningItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemReasoning'
+ - properties:
+ content:
+ items:
+ $ref: '#/components/schemas/ReasoningTextContent'
+ nullable: true
+ type: array
+ format:
+ $ref: '#/components/schemas/ReasoningFormat'
+ signature:
+ nullable: true
+ type: string
+ type: object
+ description: Reasoning output item with signature and format extensions
+ example:
+ id: reasoning-abc123
+ summary:
+ - text: Step by step analysis
+ type: summary_text
+ type: reasoning
+ ReasoningSummaryPartAddedEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when a reasoning summary part is added
+ example:
+ item_id: item-1
+ output_index: 0
+ part:
+ text: ''
+ type: summary_text
+ sequence_number: 3
+ summary_index: 0
+ type: response.reasoning_summary_part.added
+ ReasoningSummaryPartDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when a reasoning summary part is complete
+ example:
+ item_id: item-1
+ output_index: 0
+ part:
+ text: Analyzing the problem step by step to find the optimal solution.
+ type: summary_text
+ sequence_number: 7
+ summary_index: 0
+ type: response.reasoning_summary_part.done
+ ReasoningSummaryText:
+ example:
+ text: Analyzed the problem using first principles
+ type: summary_text
+ properties:
+ text:
+ type: string
+ type:
+ enum:
+ - summary_text
+ type: string
+ required:
+ - type
+ - text
+ type: object
+ ReasoningSummaryTextDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when reasoning summary text delta is streamed
+ example:
+ delta: Analyzing
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ summary_index: 0
+ type: response.reasoning_summary_text.delta
+ ReasoningSummaryTextDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when reasoning summary text streaming is complete
+ example:
+ item_id: item-1
+ output_index: 0
+ sequence_number: 6
+ summary_index: 0
+ text: Analyzing the problem step by step to find the optimal solution.
+ type: response.reasoning_summary_text.done
+ ReasoningSummaryVerbosity:
+ enum:
+ - auto
+ - concise
+ - detailed
+ - null
+ example: auto
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ReasoningTextContent:
+ example:
+ text: Let me think step by step about this problem...
+ type: reasoning_text
+ properties:
+ text:
+ type: string
+ type:
+ enum:
+ - reasoning_text
+ type: string
+ required:
+ - type
+ - text
+ type: object
+ RefusalDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseRefusalDeltaEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when a refusal delta is streamed
+ example:
+ content_index: 0
+ delta: I'm sorry
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ type: response.refusal.delta
+ RefusalDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseRefusalDoneEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when refusal streaming is complete
+ example:
+ content_index: 0
+ item_id: item-1
+ output_index: 0
+ refusal: I'm sorry, but I can't assist with that request.
+ sequence_number: 6
+ type: response.refusal.done
+ RequestMetadata:
+ additionalProperties:
+ maxLength: 512
+ type: string
+ description: >-
+ 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.
+ example:
+ session_id: abc-def-ghi
+ user_id: '123'
+ nullable: true
+ type: object
+ RequestTimeoutResponse:
+ description: Request Timeout - Operation exceeded time limit
+ example:
+ error:
+ code: 408
+ message: Operation timed out. Please try again later.
+ properties:
+ error:
+ $ref: '#/components/schemas/RequestTimeoutResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ RequestTimeoutResponseErrorData:
+ description: Error data for RequestTimeoutResponse
+ example:
+ code: 408
+ message: Operation timed out. Please try again later.
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ ResponseHealingPlugin:
+ example:
+ enabled: true
+ id: response-healing
+ properties:
+ enabled:
+ description: Set to false to disable the response-healing plugin for this request. Defaults to true.
+ type: boolean
+ id:
+ enum:
+ - response-healing
+ type: string
+ required:
+ - id
+ type: object
+ ResponseIncludesEnum:
+ enum:
+ - file_search_call.results
+ - message.input_image.image_url
+ - computer_call_output.output.image_url
+ - reasoning.encrypted_content
+ - code_interpreter_call.outputs
+ example: file_search_call.results
+ type: string
+ x-speakeasy-unknown-values: allow
+ ResponseOutputText:
+ example:
+ annotations:
+ - end_index: 42
+ start_index: 0
+ title: Paris - Wikipedia
+ type: url_citation
+ url: https://en.wikipedia.org/wiki/Paris
+ text: The capital of France is Paris.
+ type: output_text
+ properties:
+ annotations:
+ items:
+ $ref: '#/components/schemas/OpenAIResponsesAnnotation'
+ type: array
+ logprobs:
+ items:
+ properties:
+ bytes:
+ items:
+ type: integer
+ type: array
+ logprob:
+ format: double
+ type: number
+ token:
+ type: string
+ top_logprobs:
+ items:
+ properties:
+ bytes:
+ items:
+ type: integer
+ type: array
+ logprob:
+ format: double
+ type: number
+ token:
+ type: string
+ required:
+ - token
+ - bytes
+ - logprob
type: object
+ type: array
+ required:
+ - token
+ - bytes
+ - logprob
+ - top_logprobs
+ type: object
+ type: array
+ text:
+ type: string
+ type:
+ enum:
+ - output_text
+ type: string
+ required:
+ - type
+ - text
+ type: object
+ ResponsesErrorField:
+ description: Error information returned from the API
+ example:
+ code: rate_limit_exceeded
+ message: Rate limit exceeded. Please try again later.
+ nullable: true
+ properties:
+ code:
+ enum:
+ - server_error
+ - rate_limit_exceeded
+ - invalid_prompt
+ - vector_store_timeout
+ - invalid_image
+ - invalid_image_format
+ - invalid_base64_image
+ - invalid_image_url
+ - image_too_large
+ - image_too_small
+ - image_parse_error
+ - image_content_policy_violation
+ - invalid_image_mode
+ - image_file_too_large
+ - unsupported_image_media_type
+ - empty_image_file
+ - failed_to_download_image
+ - image_file_not_found
+ type: string
+ x-speakeasy-unknown-values: allow
+ message:
+ type: string
+ required:
+ - code
+ - message
+ type: object
+ ResponsesRequest:
+ description: Request schema for Responses endpoint
+ example:
+ 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
+ properties:
+ background:
+ nullable: true
+ type: boolean
+ frequency_penalty:
+ format: double
+ nullable: true
+ type: number
+ image_config:
+ $ref: '#/components/schemas/ImageConfig'
+ include:
+ items:
+ $ref: '#/components/schemas/ResponseIncludesEnum'
+ nullable: true
+ type: array
+ input:
+ $ref: '#/components/schemas/Inputs'
+ instructions:
+ nullable: true
+ type: string
+ max_output_tokens:
+ nullable: true
+ type: integer
+ max_tool_calls:
+ nullable: true
+ type: integer
+ metadata:
+ $ref: '#/components/schemas/RequestMetadata'
+ modalities:
+ description: Output modalities for the response. Supported values are "text" and "image".
+ example:
+ - text
+ - image
+ items:
+ $ref: '#/components/schemas/OutputModalityEnum'
+ type: array
+ model:
+ type: string
+ models:
+ items:
+ type: string
+ type: array
+ parallel_tool_calls:
+ nullable: true
+ type: boolean
+ plugins:
+ description: Plugins you want to enable for this request, including their settings.
+ items:
+ discriminator:
+ mapping:
+ auto-router: '#/components/schemas/AutoRouterPlugin'
+ context-compression: '#/components/schemas/ContextCompressionPlugin'
+ file-parser: '#/components/schemas/FileParserPlugin'
+ moderation: '#/components/schemas/ModerationPlugin'
+ pareto-router: '#/components/schemas/ParetoRouterPlugin'
+ response-healing: '#/components/schemas/ResponseHealingPlugin'
+ web: '#/components/schemas/WebSearchPlugin'
+ propertyName: id
+ oneOf:
+ - $ref: '#/components/schemas/AutoRouterPlugin'
+ - $ref: '#/components/schemas/ModerationPlugin'
+ - $ref: '#/components/schemas/WebSearchPlugin'
+ - $ref: '#/components/schemas/FileParserPlugin'
+ - $ref: '#/components/schemas/ResponseHealingPlugin'
+ - $ref: '#/components/schemas/ContextCompressionPlugin'
+ - $ref: '#/components/schemas/ParetoRouterPlugin'
+ type: array
+ presence_penalty:
+ format: double
+ nullable: true
+ type: number
+ previous_response_id:
+ nullable: true
+ type: string
+ prompt:
+ $ref: '#/components/schemas/StoredPromptTemplate'
+ prompt_cache_key:
+ nullable: true
+ type: string
+ provider:
+ $ref: '#/components/schemas/ProviderPreferences'
+ reasoning:
+ $ref: '#/components/schemas/ReasoningConfig'
+ route:
+ $ref: '#/components/schemas/DeprecatedRoute'
+ safety_identifier:
+ nullable: true
+ type: string
+ service_tier:
+ default: auto
+ enum:
+ - auto
+ - default
+ - flex
+ - priority
+ - scale
+ - null
+ nullable: true
+ 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.
+ maxLength: 256
+ type: string
+ store:
+ const: false
+ default: false
+ type: boolean
+ stream:
+ default: false
+ type: boolean
+ temperature:
+ format: double
+ nullable: true
+ type: number
+ text:
+ $ref: '#/components/schemas/TextExtendedConfig'
+ tool_choice:
+ $ref: '#/components/schemas/OpenAIResponsesToolChoice'
+ tools:
+ items:
+ anyOf:
+ - allOf:
+ - $ref: '#/components/schemas/FunctionTool'
+ - properties: {}
+ type: object
+ description: Function tool definition
+ example:
+ description: Get the current weather in a location
+ name: get_weather
+ parameters:
+ properties:
+ location:
+ description: The city and state
+ type: string
+ unit:
+ enum:
+ - celsius
+ - fahrenheit
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - location
+ type: object
+ type: function
+ - $ref: '#/components/schemas/Preview_WebSearchServerTool'
+ - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool'
+ - $ref: '#/components/schemas/Legacy_WebSearchServerTool'
+ - $ref: '#/components/schemas/WebSearchServerTool'
+ - $ref: '#/components/schemas/FileSearchServerTool'
+ - $ref: '#/components/schemas/ComputerUseServerTool'
+ - $ref: '#/components/schemas/CodeInterpreterServerTool'
+ - $ref: '#/components/schemas/McpServerTool'
+ - $ref: '#/components/schemas/ImageGenerationServerTool'
+ - $ref: '#/components/schemas/CodexLocalShellTool'
+ - $ref: '#/components/schemas/ShellServerTool'
+ - $ref: '#/components/schemas/ApplyPatchServerTool'
+ - $ref: '#/components/schemas/CustomTool'
+ - $ref: '#/components/schemas/DatetimeServerTool'
+ - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
+ - $ref: '#/components/schemas/ChatSearchModelsServerTool'
+ - $ref: '#/components/schemas/WebFetchServerTool'
+ - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
+ type: array
+ top_k:
+ type: integer
+ top_logprobs:
+ nullable: true
+ type: integer
+ top_p:
+ format: double
+ nullable: true
+ type: number
+ trace:
+ $ref: '#/components/schemas/TraceConfig'
+ truncation:
+ $ref: '#/components/schemas/OpenAIResponsesTruncation'
+ user:
+ description: >-
+ 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.
+ 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
+ example: direct
+ type: string
+ x-speakeasy-unknown-values: allow
+ SearchContextSizeEnum:
+ description: Size of the search context for web search tools
+ enum:
+ - low
+ - medium
+ - high
+ example: medium
+ type: string
+ x-speakeasy-unknown-values: allow
+ SearchModelsServerToolConfig:
+ description: Configuration for the openrouter:experimental__search_models server tool
+ example:
+ max_results: 5
+ properties:
+ max_results:
+ description: Maximum number of models to return. Defaults to 5, max 20.
+ example: 5
+ type: integer
+ type: object
+ SearchQualityLevel:
+ description: >-
+ How much context to retrieve per result. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl.
+ enum:
+ - low
+ - medium
+ - high
+ example: medium
+ type: string
+ x-speakeasy-unknown-values: allow
+ ServiceTier:
+ enum:
+ - auto
+ - default
+ - flex
+ - priority
+ - scale
+ - null
+ example: default
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ServiceUnavailableResponse:
+ description: Service Unavailable - Service temporarily unavailable
+ example:
+ error:
+ code: 503
+ message: Service temporarily unavailable
+ properties:
+ error:
+ $ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ ServiceUnavailableResponseErrorData:
+ description: Error data for ServiceUnavailableResponse
+ example:
+ code: 503
+ message: Service temporarily unavailable
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ ShellServerTool:
+ description: Shell tool configuration
+ example:
+ type: shell
+ properties:
+ type:
+ enum:
+ - shell
+ type: string
+ required:
+ - type
+ type: object
+ 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
+ StoredPromptTemplate:
+ example:
+ id: prompt-abc123
+ variables:
+ name: John
+ nullable: true
+ properties:
+ id:
+ type: string
+ variables:
+ additionalProperties:
+ anyOf:
+ - type: string
+ - $ref: '#/components/schemas/InputText'
+ - $ref: '#/components/schemas/InputImage'
+ - $ref: '#/components/schemas/InputFile'
+ nullable: true
+ type: object
+ required:
+ - id
+ type: object
+ StreamEvents:
+ description: Union of all possible event types emitted during response streaming
+ discriminator:
+ mapping:
+ error: '#/components/schemas/ErrorEvent'
+ 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.failed: '#/components/schemas/StreamEventsResponseFailed'
+ response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent'
+ response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent'
+ 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'
+ response.image_generation_call.partial_image: '#/components/schemas/ImageGenCallPartialImageEvent'
+ response.in_progress: '#/components/schemas/OpenResponsesInProgressEvent'
+ response.incomplete: '#/components/schemas/StreamEventsResponseIncomplete'
+ response.output_item.added: '#/components/schemas/StreamEventsResponseOutputItemAdded'
+ response.output_item.done: '#/components/schemas/StreamEventsResponseOutputItemDone'
+ response.output_text.annotation.added: '#/components/schemas/AnnotationAddedEvent'
+ response.output_text.delta: '#/components/schemas/TextDeltaEvent'
+ response.output_text.done: '#/components/schemas/TextDoneEvent'
+ response.reasoning_summary_part.added: '#/components/schemas/ReasoningSummaryPartAddedEvent'
+ response.reasoning_summary_part.done: '#/components/schemas/ReasoningSummaryPartDoneEvent'
+ response.reasoning_summary_text.delta: '#/components/schemas/ReasoningSummaryTextDeltaEvent'
+ response.reasoning_summary_text.done: '#/components/schemas/ReasoningSummaryTextDoneEvent'
+ response.reasoning_text.delta: '#/components/schemas/ReasoningDeltaEvent'
+ response.reasoning_text.done: '#/components/schemas/ReasoningDoneEvent'
+ response.refusal.delta: '#/components/schemas/RefusalDeltaEvent'
+ response.refusal.done: '#/components/schemas/RefusalDoneEvent'
+ response.web_search_call.completed: '#/components/schemas/WebSearchCallCompletedEvent'
+ response.web_search_call.in_progress: '#/components/schemas/WebSearchCallInProgressEvent'
+ response.web_search_call.searching: '#/components/schemas/WebSearchCallSearchingEvent'
+ propertyName: type
+ example:
+ 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
+ oneOf:
+ - $ref: '#/components/schemas/OpenResponsesCreatedEvent'
+ - $ref: '#/components/schemas/OpenResponsesInProgressEvent'
+ - $ref: '#/components/schemas/StreamEventsResponseCompleted'
+ - $ref: '#/components/schemas/StreamEventsResponseIncomplete'
+ - $ref: '#/components/schemas/StreamEventsResponseFailed'
+ - $ref: '#/components/schemas/ErrorEvent'
+ - $ref: '#/components/schemas/StreamEventsResponseOutputItemAdded'
+ - $ref: '#/components/schemas/StreamEventsResponseOutputItemDone'
+ - $ref: '#/components/schemas/ContentPartAddedEvent'
+ - $ref: '#/components/schemas/ContentPartDoneEvent'
+ - $ref: '#/components/schemas/TextDeltaEvent'
+ - $ref: '#/components/schemas/TextDoneEvent'
+ - $ref: '#/components/schemas/RefusalDeltaEvent'
+ - $ref: '#/components/schemas/RefusalDoneEvent'
+ - $ref: '#/components/schemas/AnnotationAddedEvent'
+ - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent'
+ - $ref: '#/components/schemas/FunctionCallArgsDoneEvent'
+ - $ref: '#/components/schemas/ReasoningDeltaEvent'
+ - $ref: '#/components/schemas/ReasoningDoneEvent'
+ - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent'
+ - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent'
+ - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent'
+ - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent'
+ - $ref: '#/components/schemas/ImageGenCallInProgressEvent'
+ - $ref: '#/components/schemas/ImageGenCallGeneratingEvent'
+ - $ref: '#/components/schemas/ImageGenCallPartialImageEvent'
+ - $ref: '#/components/schemas/ImageGenCallCompletedEvent'
+ - $ref: '#/components/schemas/WebSearchCallInProgressEvent'
+ - $ref: '#/components/schemas/WebSearchCallSearchingEvent'
+ - $ref: '#/components/schemas/WebSearchCallCompletedEvent'
+ StreamEventsResponseCompleted:
+ allOf:
+ - $ref: '#/components/schemas/CompletedEvent'
+ - properties:
+ response:
+ $ref: '#/components/schemas/OpenResponsesResult'
+ type: object
+ description: Event emitted when a response has completed successfully
+ example:
+ 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: completed
+ temperature: null
+ tool_choice: auto
+ tools: []
+ top_p: null
+ sequence_number: 10
+ type: response.completed
+ StreamEventsResponseFailed:
+ allOf:
+ - $ref: '#/components/schemas/FailedEvent'
+ - properties:
+ response:
+ $ref: '#/components/schemas/OpenResponsesResult'
+ type: object
+ description: Event emitted when a response has failed
+ example:
+ 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: failed
+ temperature: null
+ tool_choice: auto
+ tools: []
+ top_p: null
+ sequence_number: 3
+ type: response.failed
+ StreamEventsResponseIncomplete:
+ allOf:
+ - $ref: '#/components/schemas/IncompleteEvent'
+ - properties:
+ response:
+ $ref: '#/components/schemas/OpenResponsesResult'
+ type: object
+ description: Event emitted when a response is incomplete
+ example:
+ 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: incomplete
+ temperature: null
+ tool_choice: auto
+ tools: []
+ top_p: null
+ sequence_number: 5
+ type: response.incomplete
+ StreamEventsResponseOutputItemAdded:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemAddedEvent'
+ - properties:
+ item:
+ $ref: '#/components/schemas/OutputItems'
+ type: object
+ description: Event emitted when a new output item is added to the response
+ example:
+ item:
+ content: []
+ id: item-1
+ role: assistant
+ status: in_progress
+ type: message
+ output_index: 0
+ sequence_number: 2
+ type: response.output_item.added
+ StreamEventsResponseOutputItemDone:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemDoneEvent'
+ - properties:
+ item:
+ $ref: '#/components/schemas/OutputItems'
+ type: object
+ description: Event emitted when an output item is complete
+ example:
+ item:
+ content:
+ - annotations: []
+ text: Hello! How can I help you?
+ type: output_text
+ id: item-1
+ role: assistant
+ status: completed
+ type: message
+ output_index: 0
+ sequence_number: 8
+ type: response.output_item.done
+ StreamLogprob:
+ allOf:
+ - $ref: '#/components/schemas/OpenResponsesLogProbs'
+ - properties:
+ top_logprobs:
+ items:
+ $ref: '#/components/schemas/StreamLogprobTopLogprob'
+ type: array
+ type: object
+ description: Log probability information for a token
+ example:
+ bytes:
+ - 72
+ - 101
+ - 108
+ - 108
+ - 111
+ logprob: -0.5
+ token: Hello
+ top_logprobs: []
+ StreamLogprobTopLogprob:
+ allOf:
+ - $ref: '#/components/schemas/OpenResponsesTopLogprobs'
+ - properties: {}
+ type: object
+ description: Alternative token with its log probability
+ example:
+ bytes:
+ - 72
+ - 101
+ - 108
+ - 108
+ - 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:
+ format:
+ type: text
+ verbosity: medium
+ properties:
+ format:
+ $ref: '#/components/schemas/Formats'
+ verbosity:
+ enum:
+ - high
+ - low
+ - medium
+ - null
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ type: object
+ TextDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseTextDeltaEvent'
+ - properties:
+ logprobs:
+ items:
+ $ref: '#/components/schemas/StreamLogprob'
+ type: array
+ type: object
+ description: Event emitted when a text delta is streamed
+ example:
+ content_index: 0
+ delta: Hello
+ item_id: item-1
+ logprobs: []
+ output_index: 0
+ sequence_number: 4
+ type: response.output_text.delta
+ TextDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseTextDoneEvent'
+ - properties:
+ logprobs:
+ items:
+ $ref: '#/components/schemas/StreamLogprob'
+ type: array
+ type: object
+ description: Event emitted when text streaming is complete
+ example:
+ content_index: 0
+ item_id: item-1
+ logprobs: []
+ output_index: 0
+ sequence_number: 6
+ text: Hello! How can I help you?
+ type: response.output_text.done
+ TextExtendedConfig:
+ allOf:
+ - $ref: '#/components/schemas/TextConfig'
+ - 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:
+ format:
+ type: text
+ ToolCallStatus:
+ enum:
+ - in_progress
+ - completed
+ - incomplete
+ example: completed
+ type: string
+ x-speakeasy-unknown-values: allow
+ ToolChoiceAllowed:
+ description: Constrains the model to a pre-defined set of allowed tools
+ example:
+ mode: auto
+ tools:
+ - name: get_weather
+ type: function
+ type: allowed_tools
+ properties:
+ mode:
+ anyOf:
+ - enum:
+ - auto
+ type: string
+ - enum:
+ - required
+ type: string
+ tools:
+ items:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: array
+ type:
+ enum:
+ - allowed_tools
+ type: string
+ required:
+ - type
+ - mode
+ - tools
+ type: object
+ TooManyRequestsResponse:
+ description: Too Many Requests - Rate limit exceeded
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ properties:
+ error:
+ $ref: '#/components/schemas/TooManyRequestsResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ TooManyRequestsResponseErrorData:
+ description: Error data for TooManyRequestsResponse
+ example:
+ code: 429
+ message: Rate limit exceeded
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ TopProviderInfo:
+ description: Information about the top provider for this model
+ example:
+ context_length: 8192
+ is_moderated: true
+ max_completion_tokens: 4096
+ properties:
+ context_length:
+ description: Context length from the top provider
+ example: 8192
+ nullable: true
+ type: integer
+ is_moderated:
+ description: Whether the top provider moderates content
+ example: true
+ type: boolean
+ max_completion_tokens:
+ description: Maximum completion tokens from the top provider
+ example: 4096
+ nullable: true
+ type: integer
+ required:
+ - is_moderated
+ type: object
+ TraceConfig:
+ additionalProperties:
+ nullable: true
+ description: >-
+ 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.
+ example:
+ trace_id: trace-abc123
+ trace_name: my-app-trace
+ properties:
+ generation_name:
+ type: string
+ parent_span_id:
+ type: string
+ span_name:
+ type: string
+ trace_id:
+ type: string
+ trace_name:
+ type: string
+ type: object
+ Truncation:
+ enum:
+ - auto
+ - disabled
+ - null
+ example: auto
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ UnauthorizedResponse:
+ description: Unauthorized - Authentication required or invalid credentials
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ properties:
+ error:
+ $ref: '#/components/schemas/UnauthorizedResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ UnauthorizedResponseErrorData:
+ description: Error data for UnauthorizedResponse
+ example:
+ code: 401
+ message: Missing Authentication header
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ UnprocessableEntityResponse:
+ description: Unprocessable Entity - Semantic validation failure
+ example:
+ error:
+ code: 422
+ message: Invalid argument
+ properties:
+ error:
+ $ref: '#/components/schemas/UnprocessableEntityResponseErrorData'
+ openrouter_metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ UnprocessableEntityResponseErrorData:
+ description: Error data for UnprocessableEntityResponse
+ example:
+ code: 422
+ message: Invalid argument
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ UpdateGuardrailRequest:
+ example:
+ description: Updated description
+ limit_usd: 75
+ name: Updated Guardrail Name
+ reset_interval: weekly
+ properties:
+ allowed_models:
+ description: Array of model identifiers (slug or canonical_slug accepted)
+ example:
+ - openai/gpt-5.2
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ allowed_providers:
+ description: New list of allowed provider IDs
+ example:
+ - openai
+ - anthropic
+ - deepseek
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ content_filter_builtins:
+ description: >-
+ Builtin content filters to apply. Set to null to remove. Use slug "regex-prompt-injection" with action "block", "flag", or "redact" to enable heuristic prompt injection detection.
+ example:
+ - action: block
+ slug: regex-prompt-injection
+ items:
+ $ref: '#/components/schemas/ContentFilterBuiltinEntry'
+ 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
+ maxLength: 1000
+ nullable: true
+ type: string
+ enforce_zdr:
+ 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
+ ignored_models:
+ description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
+ example:
+ - openai/gpt-4o-mini
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ ignored_providers:
+ description: List of provider IDs to exclude from routing
+ example:
+ - azure
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ limit_usd:
+ description: New spending limit in USD
+ example: 75
+ format: double
+ nullable: true
+ type: number
+ name:
+ description: New name for the guardrail
+ example: Updated Guardrail Name
+ maxLength: 200
+ minLength: 1
+ type: string
+ reset_interval:
+ $ref: '#/components/schemas/GuardrailInterval'
+ type: object
+ UpdateGuardrailResponse:
+ example:
+ data:
+ allowed_models: null
+ allowed_providers:
+ - openai
+ content_filter_builtins:
+ - action: block
+ label: '[PROMPT_INJECTION]'
+ slug: regex-prompt-injection
+ content_filters: null
+ created_at: '2025-08-24T10:30:00Z'
+ description: Updated description
+ 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
+ limit_usd: 75
+ name: Updated Guardrail Name
+ reset_interval: weekly
+ updated_at: '2025-08-24T16:00:00Z'
+ workspace_id: 0df9e665-d932-5740-b2c7-b52af166bc11
+ properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/Guardrail'
+ - description: The updated guardrail
+ 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
+ example: updated-workspace
+ maxLength: 50
+ minLength: 1
+ pattern: ^[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
+ start_index: 0
+ title: OpenRouter Documentation
+ type: url_citation
+ url: https://openrouter.ai/docs
+ properties:
+ end_index:
+ type: integer
+ start_index:
+ type: integer
+ title:
+ type: string
+ type:
+ enum:
+ - url_citation
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - url
+ - title
+ - start_index
+ - end_index
+ type: object
+ Usage:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesUsage'
+ - nullable: true
+ properties:
+ cost:
+ description: Cost of the completion
+ format: double
+ nullable: true
+ type: number
+ cost_details:
+ properties:
+ upstream_inference_cost:
+ format: double
+ nullable: true
+ type: number
+ upstream_inference_input_cost:
+ format: double
+ type: number
+ upstream_inference_output_cost:
+ format: double
+ type: number
+ required:
+ - upstream_inference_input_cost
+ - upstream_inference_output_cost
type: object
+ is_byok:
+ description: Whether a request was made using a Bring Your Own Key configuration
+ type: boolean
+ type: object
+ description: Token usage information for the response
+ example:
+ cost: 0.0012
+ cost_details:
+ upstream_inference_cost: null
+ upstream_inference_input_cost: 0.0008
+ upstream_inference_output_cost: 0.0004
+ input_tokens: 10
+ input_tokens_details:
+ cached_tokens: 0
+ output_tokens: 25
+ output_tokens_details:
+ reasoning_tokens: 0
+ total_tokens: 35
+ VideoGenerationRequest:
+ example:
+ aspect_ratio: '16:9'
+ duration: 8
+ model: google/veo-3.1
+ prompt: A serene mountain landscape at sunset
+ resolution: 720p
+ properties:
+ aspect_ratio:
+ description: Aspect ratio of the generated video
+ enum:
+ - '16:9'
+ - '9:16'
+ - '1:1'
+ - '4:3'
+ - '3:4'
+ - '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
+ minimum: 1
+ type: integer
+ frame_images:
+ description: >-
+ 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.
+ items:
+ $ref: '#/components/schemas/FrameImage'
+ type: array
+ generate_audio:
+ description: >-
+ Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
+ example: true
+ type: boolean
+ input_references:
+ description: Reference images to guide video generation
+ items:
+ $ref: '#/components/schemas/ContentPartImage'
+ type: array
+ model:
+ type: string
+ prompt:
+ type: string
+ provider:
+ description: Provider-specific passthrough configuration
+ properties:
+ options:
+ allOf:
+ - $ref: '#/components/schemas/ProviderOptions'
+ - example:
+ google-vertex:
+ output_config:
+ effort: low
type: object
resolution:
description: Resolution of the generated video
@@ -13107,6 +14831,61 @@ 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 (supports BYOK). "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape (requires BYOK).
+ enum:
+ - auto
+ - native
+ - openrouter
+ - firecrawl
+ - exa
+ example: auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ 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 +14926,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,7 +14934,7 @@ 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
@@ -13252,8 +15031,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 +15090,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 +15098,41 @@ 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_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.
+ example: 20
+ type: integer
+ search_context_size:
+ $ref: '#/components/schemas/SearchQualityLevel'
+ user_location:
+ $ref: '#/components/schemas/WebSearchUserLocationServerTool'
+ type: object
WebSearchSource:
example:
type: url
@@ -13373,18 +15194,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
@@ -13445,21 +15417,246 @@ paths:
content:
application/json:
example:
- data:
- - byok_usage_inference: 0.012
- completion_tokens: 125
- date: '2025-08-24'
- endpoint_id: 550e8400-e29b-41d4-a716-446655440000
- model: openai/gpt-4.1
- model_permaslug: openai/gpt-4.1-2025-04-14
- prompt_tokens: 50
- provider_name: OpenAI
- reasoning_tokens: 25
- requests: 5
- usage: 0.015
+ data:
+ - byok_usage_inference: 0.012
+ completion_tokens: 125
+ date: '2025-08-24'
+ endpoint_id: 550e8400-e29b-41d4-a716-446655440000
+ model: openai/gpt-4.1
+ model_permaslug: openai/gpt-4.1-2025-04-14
+ prompt_tokens: 50
+ provider_name: OpenAI
+ reasoning_tokens: 25
+ requests: 5
+ usage: 0.015
+ schema:
+ $ref: '#/components/schemas/ActivityResponse'
+ description: Returns user activity data grouped by endpoint
+ '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: Get user activity grouped by endpoint
+ tags:
+ - 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/ActivityResponse'
- description: Returns user activity data grouped by endpoint
+ $ref: '#/components/schemas/STTResponse'
+ description: Transcription result
'400':
content:
application/json:
@@ -13480,16 +15677,16 @@ paths:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
- '403':
+ '402':
content:
application/json:
example:
error:
- code: 403
- message: Only management keys can perform this operation
+ code: 402
+ message: Insufficient credits. Add more using https://openrouter.ai/credits
schema:
- $ref: '#/components/schemas/ForbiddenResponse'
- description: Forbidden - Authentication successful but insufficient permissions
+ $ref: '#/components/schemas/PaymentRequiredResponse'
+ description: Payment Required - Insufficient credits or quota to complete request
'404':
content:
application/json:
@@ -13500,6 +15697,16 @@ paths:
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:
@@ -13510,9 +15717,51 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
- summary: Get user activity grouped by endpoint
+ '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:
- - Analytics
+ - STT
+ x-speakeasy-max-method-params: 1
+ x-speakeasy-name-override: createTranscription
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
@@ -13794,6 +16043,14 @@ paths:
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`.
+ example: enabled
+ in: header
+ name: X-OpenRouter-Experimental-Metadata
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetadataLevel'
requestBody:
content:
application/json:
@@ -13844,12 +16101,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 +16134,16 @@ paths:
schema:
$ref: '#/components/schemas/PaymentRequiredResponse'
description: Payment Required - Insufficient credits or quota to complete request
+ '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:
@@ -14295,6 +16557,25 @@ 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
+ 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 +16740,7 @@ paths:
prompt: '0.00000002'
request: '0'
supported_parameters: []
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: false
@@ -14618,15 +16900,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
@@ -14640,262 +16922,24 @@ paths:
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: 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: null
- 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
+ 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
+ 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
+ schema:
+ $ref: '#/components/schemas/GenerationResponse'
description: Returns the request metadata for this generation
'401':
content:
@@ -14984,6 +17028,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 +17170,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 +17200,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 +17254,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 +17279,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 +17291,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 +17315,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 +17434,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 +17507,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 +17519,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 +18527,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 +18562,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 +18586,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 +18612,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 +18712,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 +18736,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
type: array
required:
@@ -16628,6 +18839,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 +18874,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 +18899,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 +18925,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 +19025,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 +19049,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 +19080,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 +19232,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 +19256,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 +19281,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 +19381,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 +19405,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
required:
- data
@@ -17300,6 +19542,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 +19566,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 +19591,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 +19691,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 +19715,7 @@ paths:
- created_at
- updated_at
- creator_user_id
+ - workspace_id
type: object
required:
- data
@@ -17534,6 +19784,14 @@ 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`.
+ example: enabled
+ in: header
+ name: X-OpenRouter-Experimental-Metadata
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetadataLevel'
requestBody:
content:
application/json:
@@ -17574,15 +19832,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':
@@ -17762,6 +20012,7 @@ paths:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -18012,6 +20263,7 @@ paths:
- temperature
- top_p
- max_tokens
+ supported_voices: null
top_provider:
context_length: 8192
is_moderated: true
@@ -18780,15 +21032,625 @@ paths:
nullable: true
type: string
required:
- - name
- - slug
- - privacy_policy_url
+ - name
+ - slug
+ - privacy_policy_url
+ type: object
+ type: array
+ required:
+ - data
+ type: object
+ description: Returns a list of providers
+ '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 all providers
+ tags:
+ - Providers
+ x-speakeasy-name-override: list
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /rerank:
+ post:
+ description: Submits a rerank request to the rerank router
+ operationId: createRerank
+ requestBody:
+ content:
+ application/json:
+ schema:
+ description: Rerank request input
+ example:
+ 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?
+ top_n: 3
+ properties:
+ documents:
+ description: The list of documents to rerank
+ example:
+ - Paris is the capital of France.
+ - Berlin is the capital of Germany.
+ items:
+ type: string
+ type: array
+ model:
+ description: The rerank model to use
+ example: cohere/rerank-v3.5
+ type: string
+ provider:
+ allOf:
+ - $ref: '#/components/schemas/ProviderPreferences'
+ - description: Provider routing preferences for the request.
+ query:
+ description: The search query to rerank documents against
+ example: What is the capital of France?
+ type: string
+ top_n:
+ description: Number of most relevant documents to return
+ example: 3
+ minimum: 1
+ type: integer
+ required:
+ - model
+ - query
+ - documents
+ type: object
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ description: Rerank response containing ranked results
+ example:
+ id: gen-rerank-1234567890-abc
+ model: cohere/rerank-v3.5
+ results:
+ - document:
+ text: Paris is the capital of France.
+ index: 0
+ relevance_score: 0.98
+ usage:
+ search_units: 1
+ total_tokens: 150
+ properties:
+ id:
+ description: Unique identifier for the rerank response (ORID format)
+ example: gen-rerank-1234567890-abc
+ type: string
+ model:
+ description: The model used for reranking
+ example: cohere/rerank-v3.5
+ type: string
+ provider:
+ description: The provider that served the rerank request
+ example: Cohere
+ type: string
+ results:
+ description: List of rerank results sorted by relevance
+ example:
+ - document:
+ text: Paris is the capital of France.
+ index: 0
+ relevance_score: 0.98
+ items:
+ description: A single rerank result
+ example:
+ document:
+ text: Paris is the capital of France.
+ index: 0
+ relevance_score: 0.98
+ properties:
+ document:
+ description: The document object containing the original text
+ properties:
+ 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
+ example: 0
+ type: integer
+ relevance_score:
+ description: Relevance score of the document to the query
+ example: 0.98
+ format: double
+ type: number
+ required:
+ - index
+ - relevance_score
+ - document
type: object
type: array
+ usage:
+ description: Usage statistics
+ example:
+ search_units: 1
+ total_tokens: 150
+ properties:
+ cost:
+ description: Cost of the request in credits
+ example: 0.001
+ format: double
+ type: number
+ search_units:
+ description: Number of search units consumed (Cohere billing)
+ example: 1
+ type: integer
+ total_tokens:
+ description: Total number of tokens used
+ example: 150
+ type: integer
+ type: object
required:
- - data
+ - model
+ - results
type: object
- description: Returns a list of providers
+ text/event-stream:
+ example: 'data: [DONE]'
+ schema:
+ description: Not used for rerank - rerank does not support streaming
+ type: string
+ x-speakeasy-sse-sentinel: '[DONE]'
+ description: Rerank response
+ '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: Submit a rerank request
+ tags:
+ - Rerank
+ x-speakeasy-name-override: rerank
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /responses:
+ 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`.
+ example: enabled
+ in: header
+ name: X-OpenRouter-Experimental-Metadata
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetadataLevel'
+ requestBody:
+ content:
+ application/json:
+ example:
+ input: Tell me a joke
+ model: openai/gpt-4o
+ schema:
+ $ref: '#/components/schemas/ResponsesRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ created_at: 1700000000
+ id: resp_abc123
+ model: openai/gpt-4o
+ object: response
+ output:
+ - content:
+ - text: Why did the chicken cross the road? To get to the other side!
+ type: output_text
+ role: assistant
+ type: message
+ status: completed
+ usage:
+ completion_tokens: 20
+ prompt_tokens: 10
+ total_tokens: 30
+ schema:
+ $ref: '#/components/schemas/OpenResponsesResult'
+ text/event-stream:
+ example:
+ data:
+ delta: Hello
+ type: response.output_text.delta
+ schema:
+ $ref: '#/components/schemas/ResponsesStreamingResponse'
+ x-speakeasy-sse-sentinel: '[DONE]'
+ description: Successful response
+ '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
+ '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
+ '413':
+ content:
+ application/json:
+ example:
+ error:
+ code: 413
+ message: Request payload too large
+ schema:
+ $ref: '#/components/schemas/PayloadTooLargeResponse'
+ description: Payload Too Large - Request payload exceeds size limits
+ '422':
+ content:
+ application/json:
+ example:
+ error:
+ code: 422
+ message: Invalid argument
+ schema:
+ $ref: '#/components/schemas/UnprocessableEntityResponse'
+ description: Unprocessable Entity - Semantic validation failure
+ '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 a response
+ tags:
+ - beta.responses
+ x-speakeasy-name-override: send
+ x-speakeasy-stream-request-field: stream
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /videos:
+ post:
+ description: Submits a video generation request and returns a polling URL to check status
+ operationId: createVideos
+ requestBody:
+ content:
+ application/json:
+ example:
+ aspect_ratio: '16:9'
+ duration: 8
+ model: google/veo-3.1
+ prompt: A serene mountain landscape at sunset
+ resolution: 720p
+ schema:
+ $ref: '#/components/schemas/VideoGenerationRequest'
+ required: true
+ responses:
+ '202':
+ content:
+ application/json:
+ example:
+ generation_id: gen-xyz789
+ id: job-abc123
+ polling_url: /api/v1/videos/job-abc123
+ status: pending
+ schema:
+ $ref: '#/components/schemas/VideoGenerationResponse'
+ description: Video generation request accepted
+ '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
+ summary: Submit a video generation request
+ tags:
+ - Video Generation
+ x-speakeasy-name-override: generate
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /videos/{jobId}:
+ get:
+ description: Returns job status and content URLs when completed
+ operationId: getVideos
+ parameters:
+ - in: path
+ name: jobId
+ required: true
+ schema:
+ example: job-abc123
+ minLength: 1
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ generation_id: gen-xyz789
+ id: job-abc123
+ polling_url: /api/v1/videos/job-abc123
+ status: complete
+ unsigned_urls:
+ - https://storage.example.com/video.mp4
+ usage:
+ cost: 0.5
+ schema:
+ $ref: '#/components/schemas/VideoGenerationResponse'
+ description: Video generation status
+ '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:
@@ -18799,163 +21661,44 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
- summary: List all providers
+ summary: Poll video generation status
tags:
- - Providers
- x-speakeasy-name-override: list
+ - Video Generation
+ x-speakeasy-name-override: getGeneration
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
- /rerank:
- post:
- description: Submits a rerank request to the rerank router
- operationId: createRerank
- requestBody:
- content:
- application/json:
- schema:
- description: Rerank request input
- example:
- 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?
- top_n: 3
- properties:
- documents:
- description: The list of documents to rerank
- example:
- - Paris is the capital of France.
- - Berlin is the capital of Germany.
- items:
- type: string
- type: array
- model:
- description: The rerank model to use
- example: cohere/rerank-v3.5
- type: string
- provider:
- allOf:
- - $ref: '#/components/schemas/ProviderPreferences'
- - description: Provider routing preferences for the request.
- query:
- description: The search query to rerank documents against
- example: What is the capital of France?
- type: string
- top_n:
- description: Number of most relevant documents to return
- example: 3
- minimum: 1
- type: integer
- required:
- - model
- - query
- - documents
- type: object
- required: true
+ /videos/{jobId}/content:
+ get:
+ description: Streams the generated video content from the upstream provider
+ operationId: listVideosContent
+ parameters:
+ - in: path
+ name: jobId
+ required: true
+ schema:
+ example: job-abc123
+ minLength: 1
+ type: string
+ - in: query
+ name: index
+ required: false
+ schema:
+ default: 0
+ example: 0
+ minimum: 0
+ nullable: true
+ type: integer
responses:
'200':
content:
- application/json:
- schema:
- description: Rerank response containing ranked results
- example:
- id: gen-rerank-1234567890-abc
- model: cohere/rerank-v3.5
- results:
- - document:
- text: Paris is the capital of France.
- index: 0
- relevance_score: 0.98
- usage:
- search_units: 1
- total_tokens: 150
- properties:
- id:
- description: Unique identifier for the rerank response (ORID format)
- example: gen-rerank-1234567890-abc
- type: string
- model:
- description: The model used for reranking
- example: cohere/rerank-v3.5
- type: string
- provider:
- description: The provider that served the rerank request
- example: Cohere
- type: string
- results:
- description: List of rerank results sorted by relevance
- example:
- - document:
- text: Paris is the capital of France.
- index: 0
- relevance_score: 0.98
- items:
- description: A single rerank result
- example:
- document:
- text: Paris is the capital of France.
- index: 0
- relevance_score: 0.98
- properties:
- document:
- description: The document object containing the original text
- properties:
- 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
- example: 0
- type: integer
- relevance_score:
- description: Relevance score of the document to the query
- example: 0.98
- format: double
- type: number
- required:
- - index
- - relevance_score
- - document
- type: object
- type: array
- usage:
- description: Usage statistics
- example:
- search_units: 1
- total_tokens: 150
- properties:
- cost:
- description: Cost of the request in credits
- example: 0.001
- format: double
- type: number
- search_units:
- description: Number of search units consumed (Cohere billing)
- example: 1
- type: integer
- total_tokens:
- description: Total number of tokens used
- example: 150
- type: integer
- type: object
- required:
- - model
- - results
- type: object
- text/event-stream:
- example: 'data: [DONE]'
+ application/octet-stream:
+ example:
schema:
- description: Not used for rerank - rerank does not support streaming
+ format: binary
type: string
- x-speakeasy-sse-sentinel: '[DONE]'
- description: Rerank response
+ description: Video content stream
'400':
content:
application/json:
@@ -18976,16 +21719,6 @@ paths:
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:
@@ -18996,16 +21729,78 @@ paths:
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found - Resource does not exist
- '429':
+ '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
+ summary: Download generated video content
+ tags:
+ - Video Generation
+ x-speakeasy-name-override: getVideoContent
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /videos/models:
+ get:
+ description: Returns a list of all available video generation models and their properties
+ operationId: listVideosModels
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - allowed_passthrough_parameters: []
+ canonical_slug: google/veo-3.1
+ created: 1700000000
+ description: Google video generation model
+ generate_audio: true
+ id: google/veo-3.1
+ name: Veo 3.1
+ pricing_skus:
+ generate: '0.50'
+ seed: null
+ supported_aspect_ratios:
+ - '16:9'
+ supported_durations:
+ - 5
+ - 8
+ supported_frame_images:
+ - first_frame
+ - last_frame
+ supported_resolutions:
+ - 720p
+ supported_sizes: null
+ schema:
+ $ref: '#/components/schemas/VideoModelsListResponse'
+ description: Returns a list of video generation models
+ '400':
content:
application/json:
example:
error:
- code: 429
- message: Rate limit exceeded
+ code: 400
+ message: Invalid request parameters
schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- description: Too Many Requests - Rate limit exceeded
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
'500':
content:
application/json:
@@ -19016,103 +21811,140 @@ paths:
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':
+ summary: List all video generation models
+ tags:
+ - Video Generation
+ parameters:
+ - $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:
- error:
- code: 503
- message: Service temporarily unavailable
+ 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/ServiceUnavailableResponse'
- description: Service Unavailable - Service temporarily unavailable
- '524':
+ $ref: '#/components/schemas/ListWorkspacesResponse'
+ description: List of workspaces
+ '401':
content:
application/json:
example:
error:
- code: 524
- message: Request timed out. Please try again later.
+ code: 401
+ message: Missing Authentication header
schema:
- $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
- description: Infrastructure Timeout - Provider request timed out at edge network
- '529':
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
content:
application/json:
example:
error:
- code: 529
- message: Provider returned error
+ code: 500
+ message: Internal Server Error
schema:
- $ref: '#/components/schemas/ProviderOverloadedResponse'
- description: Provider Overloaded - Provider is temporarily overloaded
- summary: Submit a rerank request
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List workspaces
tags:
- - Rerank
- x-speakeasy-name-override: rerank
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /responses:
+ - 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: Creates a streaming or non-streaming response using OpenResponses API format
- operationId: createResponses
+ 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:
- input: Tell me a joke
- model: openai/gpt-4o
+ 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/ResponsesRequest'
+ $ref: '#/components/schemas/CreateWorkspaceRequest'
required: true
responses:
- '200':
+ '201':
content:
application/json:
- example:
- created_at: 1700000000
- id: resp_abc123
- model: openai/gpt-4o
- object: response
- output:
- - content:
- - text: Why did the chicken cross the road? To get to the other side!
- type: output_text
- role: assistant
- type: message
- status: completed
- usage:
- completion_tokens: 20
- prompt_tokens: 10
- total_tokens: 30
- schema:
- $ref: '#/components/schemas/OpenResponsesResult'
- text/event-stream:
example:
data:
- delta: Hello
- type: response.output_text.delta
+ 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:
- properties:
- data:
- $ref: '#/components/schemas/StreamEvents'
- required:
- - data
- type: object
- x-speakeasy-sse-sentinel: '[DONE]'
- description: Successful response
+ $ref: '#/components/schemas/CreateWorkspaceResponse'
+ description: Workspace created successfully
'400':
content:
application/json:
@@ -19133,66 +21965,98 @@ paths:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
- '402':
+ '403':
content:
application/json:
example:
error:
- code: 402
- message: Insufficient credits. Add more using https://openrouter.ai/credits
+ code: 403
+ message: Only management keys can perform this operation
schema:
- $ref: '#/components/schemas/PaymentRequiredResponse'
- description: Payment Required - Insufficient credits or quota to complete request
- '404':
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '500':
content:
application/json:
example:
error:
- code: 404
- message: Resource not found
+ code: 500
+ message: Internal Server Error
schema:
- $ref: '#/components/schemas/NotFoundResponse'
- description: Not Found - Resource does not exist
- '408':
+ $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: 408
- message: Operation timed out. Please try again later.
+ code: 400
+ message: Invalid request parameters
schema:
- $ref: '#/components/schemas/RequestTimeoutResponse'
- description: Request Timeout - Operation exceeded time limit
- '413':
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
content:
application/json:
example:
error:
- code: 413
- message: Request payload too large
+ code: 401
+ message: Missing Authentication header
schema:
- $ref: '#/components/schemas/PayloadTooLargeResponse'
- description: Payload Too Large - Request payload exceeds size limits
- '422':
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '403':
content:
application/json:
example:
error:
- code: 422
- message: Invalid argument
+ code: 403
+ message: Only management keys can perform this operation
schema:
- $ref: '#/components/schemas/UnprocessableEntityResponse'
- description: Unprocessable Entity - Semantic validation failure
- '429':
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
content:
application/json:
example:
error:
- code: 429
- message: Rate limit exceeded
+ code: 404
+ message: Resource not found
schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- description: Too Many Requests - Rate limit exceeded
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
'500':
content:
application/json:
@@ -19203,83 +22067,128 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
- '502':
+ 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:
- error:
- code: 502
- message: Provider returned error
+ 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/BadGatewayResponse'
- description: Bad Gateway - Provider/upstream API failure
- '503':
+ $ref: '#/components/schemas/GetWorkspaceResponse'
+ description: Workspace details
+ '401':
content:
application/json:
example:
error:
- code: 503
- message: Service temporarily unavailable
+ code: 401
+ message: Missing Authentication header
schema:
- $ref: '#/components/schemas/ServiceUnavailableResponse'
- description: Service Unavailable - Service temporarily unavailable
- '524':
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
content:
application/json:
example:
error:
- code: 524
- message: Request timed out. Please try again later.
+ code: 404
+ message: Resource not found
schema:
- $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
- description: Infrastructure Timeout - Provider request timed out at edge network
- '529':
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
content:
application/json:
example:
error:
- code: 529
- message: Provider returned error
+ code: 500
+ message: Internal Server Error
schema:
- $ref: '#/components/schemas/ProviderOverloadedResponse'
- description: Provider Overloaded - Provider is temporarily overloaded
- summary: Create a response
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Get a workspace
tags:
- - beta.responses
- x-speakeasy-name-override: send
- x-speakeasy-stream-request-field: stream
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /videos:
- post:
- description: Submits a video generation request and returns a polling URL to check status
- operationId: createVideos
+ - 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:
- aspect_ratio: '16:9'
- duration: 8
- model: google/veo-3.1
- prompt: A serene mountain landscape at sunset
- resolution: 720p
+ name: Updated Workspace
+ slug: updated-workspace
schema:
- $ref: '#/components/schemas/VideoGenerationRequest'
+ $ref: '#/components/schemas/UpdateWorkspaceRequest'
required: true
responses:
- '202':
+ '200':
content:
application/json:
example:
- generation_id: gen-xyz789
- id: job-abc123
- polling_url: /api/v1/videos/job-abc123
- status: pending
+ 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/VideoGenerationResponse'
- description: Video generation request accepted
+ $ref: '#/components/schemas/UpdateWorkspaceResponse'
+ description: Workspace updated successfully
'400':
content:
application/json:
@@ -19300,16 +22209,16 @@ paths:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
- '402':
+ '403':
content:
application/json:
example:
error:
- code: 402
- message: Insufficient credits. Add more using https://openrouter.ai/credits
+ code: 403
+ message: Only management keys can perform this operation
schema:
- $ref: '#/components/schemas/PaymentRequiredResponse'
- description: Payment Required - Insufficient credits or quota to complete request
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
'404':
content:
application/json:
@@ -19320,16 +22229,6 @@ paths:
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:
@@ -19340,42 +22239,64 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
- summary: Submit a video generation request
+ summary: Update a workspace
tags:
- - Video Generation
- x-speakeasy-name-override: generate
+ - Workspaces
+ x-speakeasy-name-override: update
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
- /videos/{jobId}:
- get:
- description: Returns job status and content URLs when completed
- operationId: getVideos
+ /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:
- - in: path
- name: jobId
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
required: true
schema:
- example: job-abc123
+ 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:
- generation_id: gen-xyz789
- id: job-abc123
- polling_url: /api/v1/videos/job-abc123
- status: complete
- unsigned_urls:
- - https://storage.example.com/video.mp4
- usage:
- cost: 0.5
+ 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/VideoGenerationResponse'
- description: Video generation status
+ $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:
@@ -19386,6 +22307,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
'404':
content:
application/json:
@@ -19406,44 +22337,48 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
- summary: Poll video generation status
+ summary: Bulk add members to a workspace
tags:
- - Video Generation
- x-speakeasy-name-override: getGeneration
+ - Workspaces
+ x-speakeasy-name-override: bulkAddMembers
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
- /videos/{jobId}/content:
- get:
- description: Streams the generated video content from the upstream provider
- operationId: listVideosContent
+ /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:
- - in: path
- name: jobId
+ - description: The workspace ID (UUID) or slug
+ in: path
+ name: id
required: true
schema:
- example: job-abc123
+ description: The workspace ID (UUID) or slug
+ example: production
minLength: 1
type: string
- - in: query
- name: index
- required: false
- schema:
- default: 0
- example: 0
- minimum: 0
- nullable: true
- type: integer
+ requestBody:
+ content:
+ application/json:
+ example:
+ user_ids:
+ - user_abc123
+ - user_def456
+ schema:
+ $ref: '#/components/schemas/BulkRemoveWorkspaceMembersRequest'
+ required: true
responses:
'200':
content:
- application/octet-stream:
- example:
+ application/json:
+ example:
+ removed_count: 2
schema:
- format: binary
- type: string
- description: Video content stream
+ $ref: '#/components/schemas/BulkRemoveWorkspaceMembersResponse'
+ description: Members removed successfully
'400':
content:
application/json:
@@ -19464,88 +22399,26 @@ paths:
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
- '502':
+ '403':
content:
application/json:
example:
error:
- code: 502
- message: Provider returned error
- schema:
- $ref: '#/components/schemas/BadGatewayResponse'
- description: Bad Gateway - Provider/upstream API failure
- summary: Download generated video content
- tags:
- - Video Generation
- x-speakeasy-name-override: getVideoContent
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /videos/models:
- get:
- description: Returns a list of all available video generation models and their properties
- operationId: listVideosModels
- responses:
- '200':
- content:
- application/json:
- example:
- data:
- - allowed_passthrough_parameters: []
- canonical_slug: google/veo-3.1
- created: 1700000000
- description: Google video generation model
- generate_audio: true
- id: google/veo-3.1
- name: Veo 3.1
- pricing_skus:
- generate: '0.50'
- seed: null
- supported_aspect_ratios:
- - '16:9'
- supported_durations:
- - 5
- - 8
- supported_frame_images:
- - first_frame
- - last_frame
- supported_resolutions:
- - 720p
- supported_sizes: null
+ code: 403
+ message: Only management keys can perform this operation
schema:
- $ref: '#/components/schemas/VideoModelsListResponse'
- description: Returns a list of video generation models
- '400':
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '404':
content:
application/json:
example:
error:
- code: 400
- message: Invalid request parameters
+ code: 404
+ message: Resource not found
schema:
- $ref: '#/components/schemas/BadRequestResponse'
- description: Bad Request - Invalid request parameters or malformed input
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
'500':
content:
application/json:
@@ -19556,9 +22429,10 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
- summary: List all video generation models
+ summary: Bulk remove members from a workspace
tags:
- - Video Generation
+ - Workspaces
+ x-speakeasy-name-override: bulkRemoveMembers
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
@@ -19598,11 +22472,18 @@ tags:
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.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 d4e0269..1b63248 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,19 +2,20 @@ speakeasyVersion: 1.680.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9
- sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f
+ sourceRevisionDigest: sha256:601025e3f80be8beff2ad5ab7ee5aa71c8cb3dc00ec87ad5b0f2c462f2bd4fe7
+ sourceBlobDigest: sha256:456cc8243e2f949e960cce46208db0a88453ff09154477c38c5f08c8060817d6
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:601025e3f80be8beff2ad5ab7ee5aa71c8cb3dc00ec87ad5b0f2c462f2bd4fe7
+ sourceBlobDigest: sha256:456cc8243e2f949e960cce46208db0a88453ff09154477c38c5f08c8060817d6
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:db86aed74d199f265e2e20442ef652dac0911c8a657ccb3e6614d56a26b8b44e
+ codeSamplesRevisionDigest: sha256:6b6724980d49d0863ff1aa3dd14e51b6b4799e88e5f470af5e4d86c84b3411ad
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
diff --git a/README-PYPI.md b/README-PYPI.md
index 5f7e784..35f11f1 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.guardrails.list()
+
+ while res is not None:
+ # Handle items
+
+ res = res.next()
+
+```
+
+
## Resource Management
diff --git a/RELEASES.md b/RELEASES.md
index 0d0d01f..c1d47d7 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-05-09 00:44:46
+### 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/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/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..e0cbabe 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 |
@@ -56,12 +57,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 |
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/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..0552d25 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_experimental_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`. | 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/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..a45543b 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": "block",
"label": "[PROMPT_INJECTION]",
"slug": "regex-prompt-injection"
}
],
"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..c274edb 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_experimental_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`. | 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..c7a3e24 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_experimental_metadata="enabled", max_tokens=150, model="openai/gpt-4", stream=False, temperature=0.7)
with res as event_stream:
for event in event_stream:
@@ -51,6 +51,7 @@ with OpenRouter(
| `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_experimental_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`. | enabled |
| `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 |
@@ -95,6 +96,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..9f57cd5 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.ContentFilterBuiltinEntry](../../components/contentfilterbuiltinentry.md)] | :heavy_minus_sign: | Builtin content filters to apply. Use slug "regex-prompt-injection" with action "block", "flag", or "redact" to enable heuristic prompt injection detection. | [
{
"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.ContentFilterBuiltinEntry](../../components/contentfilterbuiltinentry.md)] | :heavy_minus_sign: | Builtin content filters to apply. Set to null to remove. Use slug "regex-prompt-injection" with action "block", "flag", or "redact" to enable heuristic prompt injection detection. | [
{
"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/responses/README.md b/docs/sdks/responses/README.md
index a38d2b1..814702a 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_experimental_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:
@@ -43,6 +43,7 @@ with OpenRouter(
| `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_experimental_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`. | enabled |
| `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"
} |
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 @@ def list(
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 @@ def list(
: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 @@ def list(
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 @@ async def list_async(
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 @@ async def list_async(
: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 @@ async def list_async(
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 @@ def create(
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 @@ def create(
: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 @@ def create(
limit=limit,
limit_reset=limit_reset,
name=name,
+ workspace_id=workspace_id,
),
)
@@ -622,7 +631,7 @@ def create(
),
),
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 @@ def create(
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 @@ async def create_async(
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 @@ async def create_async(
: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 @@ async def create_async(
limit=limit,
limit_reset=limit_reset,
name=name,
+ workspace_id=workspace_id,
),
)
@@ -777,7 +794,7 @@ async def create_async(
),
),
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 @@ async def create_async(
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/chat.py b/src/openrouter/chat.py
index bfa078e..d5eae65 100644
--- a/src/openrouter/chat.py
+++ b/src/openrouter/chat.py
@@ -26,6 +26,7 @@ def send(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -112,6 +113,7 @@ def send(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param cache_control:
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
@@ -160,6 +162,7 @@ def send(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -246,6 +249,7 @@ def send(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param cache_control:
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
@@ -293,6 +297,7 @@ def send(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -379,6 +384,7 @@ def send(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param cache_control:
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
@@ -430,6 +436,7 @@ def send(
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_experimental_metadata=x_open_router_experimental_metadata,
chat_request=components.ChatRequest(
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -538,6 +545,7 @@ def send(
"400",
"401",
"402",
+ "403",
"404",
"408",
"413",
@@ -565,7 +573,7 @@ def send(
return eventstreaming.EventStream(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.SendChatCompletionRequestResponseBody
+ raw, components.ChatStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -592,6 +600,12 @@ def send(
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 +708,7 @@ async def send_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -780,6 +795,7 @@ async def send_async(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param cache_control:
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
@@ -828,6 +844,7 @@ async def send_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -914,6 +931,7 @@ async def send_async(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param cache_control:
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
@@ -961,6 +979,7 @@ async def send_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
cache_control: Optional[
Union[
components.AnthropicCacheControlDirective,
@@ -1047,6 +1066,7 @@ async def send_async(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param cache_control:
:param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
@@ -1098,6 +1118,7 @@ async def send_async(
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_experimental_metadata=x_open_router_experimental_metadata,
chat_request=components.ChatRequest(
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -1206,6 +1227,7 @@ async def send_async(
"400",
"401",
"402",
+ "403",
"404",
"408",
"413",
@@ -1233,7 +1255,7 @@ async def send_async(
return eventstreaming.EventStreamAsync(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.SendChatCompletionRequestResponseBody
+ raw, components.ChatStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -1260,6 +1282,12 @@ async def send_async(
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..f57d572 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -61,6 +61,14 @@
BaseInputsUnionTypedDict,
)
from .basereasoningconfig import BaseReasoningConfig, BaseReasoningConfigTypedDict
+ from .bulkaddworkspacemembersrequest import (
+ BulkAddWorkspaceMembersRequest,
+ BulkAddWorkspaceMembersRequestTypedDict,
+ )
+ from .bulkaddworkspacemembersresponse import (
+ BulkAddWorkspaceMembersResponse,
+ BulkAddWorkspaceMembersResponseTypedDict,
+ )
from .bulkassignkeysrequest import (
BulkAssignKeysRequest,
BulkAssignKeysRequestTypedDict,
@@ -77,6 +85,14 @@
BulkAssignMembersResponse,
BulkAssignMembersResponseTypedDict,
)
+ from .bulkremoveworkspacemembersrequest import (
+ BulkRemoveWorkspaceMembersRequest,
+ BulkRemoveWorkspaceMembersRequestTypedDict,
+ )
+ from .bulkremoveworkspacemembersresponse import (
+ BulkRemoveWorkspaceMembersResponse,
+ BulkRemoveWorkspaceMembersResponseTypedDict,
+ )
from .bulkunassignkeysrequest import (
BulkUnassignKeysRequest,
BulkUnassignKeysRequestTypedDict,
@@ -235,6 +251,10 @@
ChatStreamDeltaRole,
ChatStreamDeltaTypedDict,
)
+ from .chatstreamingresponse import (
+ ChatStreamingResponse,
+ ChatStreamingResponseTypedDict,
+ )
from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict
from .chatstreamtoolcall import (
ChatStreamToolCall,
@@ -329,6 +349,14 @@
ConflictResponseErrorData,
ConflictResponseErrorDataTypedDict,
)
+ from .contentfilteraction import ContentFilterAction
+ from .contentfilterbuiltinaction import ContentFilterBuiltinAction
+ from .contentfilterbuiltinentry import (
+ ContentFilterBuiltinEntry,
+ ContentFilterBuiltinEntryTypedDict,
+ )
+ from .contentfilterbuiltinslug import ContentFilterBuiltinSlug
+ from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .contentpartaddedevent import (
ContentPartAddedEvent,
ContentPartAddedEventPart,
@@ -356,6 +384,7 @@
ContextCompressionPluginID,
ContextCompressionPluginTypedDict,
)
+ from .costdetails import CostDetails, CostDetailsTypedDict
from .createguardrailrequest import (
CreateGuardrailRequest,
CreateGuardrailRequestTypedDict,
@@ -364,6 +393,14 @@
CreateGuardrailResponse,
CreateGuardrailResponseTypedDict,
)
+ from .createworkspacerequest import (
+ CreateWorkspaceRequest,
+ CreateWorkspaceRequestTypedDict,
+ )
+ from .createworkspaceresponse import (
+ CreateWorkspaceResponse,
+ CreateWorkspaceResponseTypedDict,
+ )
from .customtool import (
CustomTool,
CustomToolTypedDict,
@@ -392,6 +429,10 @@
DeleteGuardrailResponse,
DeleteGuardrailResponseTypedDict,
)
+ from .deleteworkspaceresponse import (
+ DeleteWorkspaceResponse,
+ DeleteWorkspaceResponseTypedDict,
+ )
from .easyinputmessage import (
EasyInputMessage,
EasyInputMessageContentInputImage,
@@ -419,6 +460,8 @@
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
@@ -502,10 +545,37 @@
OutputInputImage,
OutputInputImageTypedDict,
)
+ from .generationcontentdata import (
+ GenerationContentData,
+ GenerationContentDataOutput,
+ GenerationContentDataOutputTypedDict,
+ GenerationContentDataTypedDict,
+ Input1,
+ Input1TypedDict,
+ Input2,
+ Input2TypedDict,
+ InputUnion,
+ InputUnionTypedDict,
+ )
+ from .generationcontentresponse import (
+ GenerationContentResponse,
+ GenerationContentResponseTypedDict,
+ )
+ from .generationresponse import (
+ APIType,
+ GenerationResponse,
+ GenerationResponseData,
+ GenerationResponseDataTypedDict,
+ GenerationResponseTypedDict,
+ )
from .getguardrailresponse import (
GetGuardrailResponse,
GetGuardrailResponseTypedDict,
)
+ from .getworkspaceresponse import (
+ GetWorkspaceResponse,
+ GetWorkspaceResponseTypedDict,
+ )
from .guardrail import Guardrail, GuardrailTypedDict
from .guardrailinterval import GuardrailInterval
from .imageconfig import ImageConfig, ImageConfigTypedDict
@@ -658,6 +728,10 @@
ListMemberAssignmentsResponse,
ListMemberAssignmentsResponseTypedDict,
)
+ from .listworkspacesresponse import (
+ ListWorkspacesResponse,
+ ListWorkspacesResponseTypedDict,
+ )
from .mcpservertool import (
AllowedTools,
AllowedToolsTypedDict,
@@ -679,6 +753,7 @@
RequireApprovalUnionTypedDict,
)
from .memberassignment import MemberAssignment, MemberAssignmentTypedDict
+ from .metadatalevel import MetadataLevel
from .model import Model, ModelTypedDict
from .modelarchitecture import (
ModelArchitecture,
@@ -688,9 +763,9 @@
from .modelgroup import ModelGroup
from .modellinks import ModelLinks, ModelLinksTypedDict
from .modelscountresponse import (
- Data,
- DataTypedDict,
ModelsCountResponse,
+ ModelsCountResponseData,
+ ModelsCountResponseDataTypedDict,
ModelsCountResponseTypedDict,
)
from .modelslistresponse import ModelsListResponse, ModelsListResponseTypedDict
@@ -777,6 +852,7 @@
OpenResponsesResultType,
OpenResponsesResultTypedDict,
)
+ from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict
from .openrouterwebsearchservertool import (
OpenRouterWebSearchServerTool,
OpenRouterWebSearchServerToolType,
@@ -921,6 +997,11 @@
OutputReasoningItemType,
OutputReasoningItemTypedDict,
)
+ from .outputsearchmodelsservertoolitem import (
+ OutputSearchModelsServerToolItem,
+ OutputSearchModelsServerToolItemType,
+ OutputSearchModelsServerToolItemTypedDict,
+ )
from .outputtexteditorservertoolitem import (
Command,
OutputTextEditorServerToolItem,
@@ -943,22 +1024,33 @@
ActionFindInPageTypedDict,
ActionOpenPage,
ActionOpenPageTypedDict,
- ActionSearch,
- ActionSearchTypedDict,
+ ActionTypeSearch,
ActionTypedDict,
OutputWebSearchCallItem,
+ OutputWebSearchCallItemActionSearch,
+ OutputWebSearchCallItemActionSearchTypedDict,
OutputWebSearchCallItemTypedDict,
TypeFindInPage,
TypeOpenPage,
- TypeSearch,
TypeWebSearchCall,
)
from .outputwebsearchservertoolitem import (
OutputWebSearchServerToolItem,
- OutputWebSearchServerToolItemType,
+ OutputWebSearchServerToolItemAction,
+ OutputWebSearchServerToolItemActionTypedDict,
+ OutputWebSearchServerToolItemTypeOpenrouterWebSearch,
+ OutputWebSearchServerToolItemTypeSearch,
+ OutputWebSearchServerToolItemTypeURL,
OutputWebSearchServerToolItemTypedDict,
+ Source,
+ SourceTypedDict,
)
from .parameter import Parameter
+ from .paretorouterplugin import (
+ ParetoRouterPlugin,
+ ParetoRouterPluginID,
+ ParetoRouterPluginTypedDict,
+ )
from .payloadtoolargeresponseerrordata import (
PayloadTooLargeResponseErrorData,
PayloadTooLargeResponseErrorDataTypedDict,
@@ -984,6 +1076,8 @@
PercentileThroughputCutoffsTypedDict,
)
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
+ from .pipelinestage import PipelineStage, PipelineStageTypedDict
+ from .pipelinestagetype import PipelineStageType
from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
from .preferredminthroughput import (
PreferredMinThroughput,
@@ -1005,6 +1099,7 @@
PreviewWebSearchUserLocationTypedDict,
)
from .providername import ProviderName
+ from .provideroptions import ProviderOptions, ProviderOptionsTypedDict
from .provideroverloadedresponseerrordata import (
ProviderOverloadedResponseErrorData,
ProviderOverloadedResponseErrorDataTypedDict,
@@ -1164,6 +1259,13 @@
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,
@@ -1180,6 +1282,13 @@
ShellServerToolType,
ShellServerToolTypedDict,
)
+ from .speechrequest import (
+ ResponseFormatEnum,
+ SpeechRequest,
+ SpeechRequestProvider,
+ SpeechRequestProviderTypedDict,
+ SpeechRequestTypedDict,
+ )
from .storedprompttemplate import (
StoredPromptTemplate,
StoredPromptTemplateTypedDict,
@@ -1217,7 +1326,15 @@
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 +1344,7 @@
from .textextendedconfig import (
TextExtendedConfig,
TextExtendedConfigTypedDict,
- TextExtendedConfigVerbosity,
+ Verbosity,
)
from .toolcallstatus import ToolCallStatus
from .toolchoiceallowed import (
@@ -1262,25 +1379,33 @@
UpdateGuardrailResponse,
UpdateGuardrailResponseTypedDict,
)
+ 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 +1429,16 @@
VideoModelsListResponse,
VideoModelsListResponseTypedDict,
)
+ from .webfetchengineenum import WebFetchEngineEnum
+ from .webfetchservertool import (
+ WebFetchServerTool,
+ WebFetchServerToolType,
+ WebFetchServerToolTypedDict,
+ )
+ from .webfetchservertoolconfig import (
+ WebFetchServerToolConfig,
+ WebFetchServerToolConfigTypedDict,
+ )
from .websearchcallcompletedevent import (
WebSearchCallCompletedEvent,
WebSearchCallCompletedEventType,
@@ -1327,8 +1462,11 @@
from .websearchengine import WebSearchEngine
from .websearchengineenum import WebSearchEngineEnum
from .websearchplugin import (
+ UserLocation,
+ UserLocationTypedDict,
WebSearchPlugin,
WebSearchPluginID,
+ WebSearchPluginType,
WebSearchPluginTypedDict,
)
from .websearchservertool import (
@@ -1337,12 +1475,14 @@
WebSearchServerToolTypedDict,
)
from .websearchservertool_openrouter import (
- Parameters,
- ParametersTypedDict,
WebSearchServerToolOpenRouter,
WebSearchServerToolOpenRouterType,
WebSearchServerToolOpenRouterTypedDict,
)
+ from .websearchservertoolconfig import (
+ WebSearchServerToolConfig,
+ WebSearchServerToolConfigTypedDict,
+ )
from .websearchsource import (
WebSearchSource,
WebSearchSourceType,
@@ -1359,16 +1499,22 @@
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",
@@ -1424,6 +1570,10 @@
"BaseInputsUnionTypedDict",
"BaseReasoningConfig",
"BaseReasoningConfigTypedDict",
+ "BulkAddWorkspaceMembersRequest",
+ "BulkAddWorkspaceMembersRequestTypedDict",
+ "BulkAddWorkspaceMembersResponse",
+ "BulkAddWorkspaceMembersResponseTypedDict",
"BulkAssignKeysRequest",
"BulkAssignKeysRequestTypedDict",
"BulkAssignKeysResponse",
@@ -1432,6 +1582,10 @@
"BulkAssignMembersRequestTypedDict",
"BulkAssignMembersResponse",
"BulkAssignMembersResponseTypedDict",
+ "BulkRemoveWorkspaceMembersRequest",
+ "BulkRemoveWorkspaceMembersRequestTypedDict",
+ "BulkRemoveWorkspaceMembersResponse",
+ "BulkRemoveWorkspaceMembersResponseTypedDict",
"BulkUnassignKeysRequest",
"BulkUnassignKeysRequestTypedDict",
"BulkUnassignKeysResponse",
@@ -1544,6 +1698,8 @@
"ChatStreamToolCallFunctionTypedDict",
"ChatStreamToolCallType",
"ChatStreamToolCallTypedDict",
+ "ChatStreamingResponse",
+ "ChatStreamingResponseTypedDict",
"ChatSystemMessage",
"ChatSystemMessageContent",
"ChatSystemMessageContentTypedDict",
@@ -1603,6 +1759,13 @@
"ContainerAutoTypedDict",
"ContainerType",
"ContainerTypedDict",
+ "ContentFilterAction",
+ "ContentFilterBuiltinAction",
+ "ContentFilterBuiltinEntry",
+ "ContentFilterBuiltinEntryTypedDict",
+ "ContentFilterBuiltinSlug",
+ "ContentFilterEntry",
+ "ContentFilterEntryTypedDict",
"ContentPartAddedEvent",
"ContentPartAddedEventPart",
"ContentPartAddedEventPartTypedDict",
@@ -1628,11 +1791,13 @@
"CreateGuardrailRequestTypedDict",
"CreateGuardrailResponse",
"CreateGuardrailResponseTypedDict",
+ "CreateWorkspaceRequest",
+ "CreateWorkspaceRequestTypedDict",
+ "CreateWorkspaceResponse",
+ "CreateWorkspaceResponseTypedDict",
"CustomTool",
"CustomToolTypedDict",
- "Data",
"DataCollection",
- "DataTypedDict",
"DatetimeServerTool",
"DatetimeServerToolConfig",
"DatetimeServerToolConfigTypedDict",
@@ -1642,6 +1807,8 @@
"DefaultParametersTypedDict",
"DeleteGuardrailResponse",
"DeleteGuardrailResponseTypedDict",
+ "DeleteWorkspaceResponse",
+ "DeleteWorkspaceResponseTypedDict",
"EasyInputMessage",
"EasyInputMessageContentInputImage",
"EasyInputMessageContentInputImageTypedDict",
@@ -1666,7 +1833,11 @@
"EdgeNetworkTimeoutResponseErrorData",
"EdgeNetworkTimeoutResponseErrorDataTypedDict",
"Effort",
+ "EndpointInfo",
+ "EndpointInfoTypedDict",
"EndpointStatus",
+ "EndpointsMetadata",
+ "EndpointsMetadataTypedDict",
"Environment",
"Error",
"ErrorEvent",
@@ -1738,8 +1909,20 @@
"FunctionCallOutputItemStatus",
"FunctionCallOutputItemTypeFunctionCallOutput",
"FunctionCallOutputItemTypedDict",
+ "GenerationContentData",
+ "GenerationContentDataOutput",
+ "GenerationContentDataOutputTypedDict",
+ "GenerationContentDataTypedDict",
+ "GenerationContentResponse",
+ "GenerationContentResponseTypedDict",
+ "GenerationResponse",
+ "GenerationResponseData",
+ "GenerationResponseDataTypedDict",
+ "GenerationResponseTypedDict",
"GetGuardrailResponse",
"GetGuardrailResponseTypedDict",
+ "GetWorkspaceResponse",
+ "GetWorkspaceResponseTypedDict",
"Guardrail",
"GuardrailInterval",
"GuardrailTypedDict",
@@ -1772,6 +1955,10 @@
"ImageGenerationStatus",
"IncompleteDetails",
"IncompleteDetailsTypedDict",
+ "Input1",
+ "Input1TypedDict",
+ "Input2",
+ "Input2TypedDict",
"InputAudio",
"InputAudioInputAudio",
"InputAudioInputAudioTypedDict",
@@ -1807,6 +1994,8 @@
"InputTextTypedDict",
"InputTokensDetails",
"InputTokensDetailsTypedDict",
+ "InputUnion",
+ "InputUnionTypedDict",
"InputVideo",
"InputVideoType",
"InputVideoTypedDict",
@@ -1858,6 +2047,8 @@
"ListKeyAssignmentsResponseTypedDict",
"ListMemberAssignmentsResponse",
"ListMemberAssignmentsResponseTypedDict",
+ "ListWorkspacesResponse",
+ "ListWorkspacesResponseTypedDict",
"Logprob",
"LogprobTypedDict",
"MaxPrice",
@@ -1868,6 +2059,7 @@
"MemberAssignment",
"MemberAssignmentTypedDict",
"MemoryLimit",
+ "MetadataLevel",
"Modality",
"Mode",
"ModeAuto",
@@ -1883,6 +2075,8 @@
"ModelLinksTypedDict",
"ModelTypedDict",
"ModelsCountResponse",
+ "ModelsCountResponseData",
+ "ModelsCountResponseDataTypedDict",
"ModelsCountResponseTypedDict",
"ModelsListResponse",
"ModelsListResponseTypedDict",
@@ -1950,6 +2144,8 @@
"OpenResponsesResultToolUnionTypedDict",
"OpenResponsesResultType",
"OpenResponsesResultTypedDict",
+ "OpenRouterMetadata",
+ "OpenRouterMetadataTypedDict",
"OpenRouterWebSearchServerTool",
"OpenRouterWebSearchServerToolType",
"OpenRouterWebSearchServerToolTypedDict",
@@ -2058,6 +2254,9 @@
"OutputReasoningItemStatusUnionTypedDict",
"OutputReasoningItemType",
"OutputReasoningItemTypedDict",
+ "OutputSearchModelsServerToolItem",
+ "OutputSearchModelsServerToolItemType",
+ "OutputSearchModelsServerToolItemTypedDict",
"OutputTextEditorServerToolItem",
"OutputTextEditorServerToolItemType",
"OutputTextEditorServerToolItemTypedDict",
@@ -2070,9 +2269,15 @@
"OutputWebFetchServerToolItemType",
"OutputWebFetchServerToolItemTypedDict",
"OutputWebSearchCallItem",
+ "OutputWebSearchCallItemActionSearch",
+ "OutputWebSearchCallItemActionSearchTypedDict",
"OutputWebSearchCallItemTypedDict",
"OutputWebSearchServerToolItem",
- "OutputWebSearchServerToolItemType",
+ "OutputWebSearchServerToolItemAction",
+ "OutputWebSearchServerToolItemActionTypedDict",
+ "OutputWebSearchServerToolItemTypeOpenrouterWebSearch",
+ "OutputWebSearchServerToolItemTypeSearch",
+ "OutputWebSearchServerToolItemTypeURL",
"OutputWebSearchServerToolItemTypedDict",
"PDFParserEngine",
"PDFParserEngineEnum",
@@ -2081,8 +2286,9 @@
"PDFParserOptions",
"PDFParserOptionsTypedDict",
"Parameter",
- "Parameters",
- "ParametersTypedDict",
+ "ParetoRouterPlugin",
+ "ParetoRouterPluginID",
+ "ParetoRouterPluginTypedDict",
"Partition",
"PayloadTooLargeResponseErrorData",
"PayloadTooLargeResponseErrorDataTypedDict",
@@ -2098,6 +2304,9 @@
"PercentileStatsTypedDict",
"PercentileThroughputCutoffs",
"PercentileThroughputCutoffsTypedDict",
+ "PipelineStage",
+ "PipelineStageType",
+ "PipelineStageTypedDict",
"PreferredMaxLatency",
"PreferredMaxLatencyTypedDict",
"PreferredMinThroughput",
@@ -2115,8 +2324,9 @@
"PricingTypedDict",
"PromptTokensDetails",
"PromptTokensDetailsTypedDict",
- "Provider",
"ProviderName",
+ "ProviderOptions",
+ "ProviderOptionsTypedDict",
"ProviderOverloadedResponseErrorData",
"ProviderOverloadedResponseErrorDataTypedDict",
"ProviderPreferences",
@@ -2127,7 +2337,6 @@
"ProviderSort",
"ProviderSortConfig",
"ProviderSortConfigTypedDict",
- "ProviderTypedDict",
"PublicEndpoint",
"PublicEndpointQuantization",
"PublicEndpointTypedDict",
@@ -2205,6 +2414,7 @@
"RequireApprovalUnionTypedDict",
"Resolution",
"ResponseFormat",
+ "ResponseFormatEnum",
"ResponseFormatTypedDict",
"ResponseHealingPlugin",
"ResponseHealingPluginID",
@@ -2227,6 +2437,23 @@
"ResponsesRequestToolUnionTypedDict",
"ResponsesRequestType",
"ResponsesRequestTypedDict",
+ "ResponsesStreamingResponse",
+ "ResponsesStreamingResponseTypedDict",
+ "RouterAttempt",
+ "RouterAttemptTypedDict",
+ "RouterParams",
+ "RouterParamsTypedDict",
+ "RoutingStrategy",
+ "STTInputAudio",
+ "STTInputAudioTypedDict",
+ "STTRequest",
+ "STTRequestProvider",
+ "STTRequestProviderTypedDict",
+ "STTRequestTypedDict",
+ "STTResponse",
+ "STTResponseTypedDict",
+ "STTUsage",
+ "STTUsageTypedDict",
"SearchContextSizeEnum",
"SearchModelsServerToolConfig",
"SearchModelsServerToolConfigTypedDict",
@@ -2241,6 +2468,12 @@
"Size",
"Sort",
"SortTypedDict",
+ "Source",
+ "SourceTypedDict",
+ "SpeechRequest",
+ "SpeechRequestProvider",
+ "SpeechRequestProviderTypedDict",
+ "SpeechRequestTypedDict",
"Stop",
"StopTypedDict",
"StoredPromptTemplate",
@@ -2271,9 +2504,6 @@
"SupportedResolution",
"SupportedSize",
"Syntax",
- "TextConfig",
- "TextConfigTypedDict",
- "TextConfigVerbosity",
"TextDeltaEvent",
"TextDeltaEventType",
"TextDeltaEventTypedDict",
@@ -2282,7 +2512,6 @@
"TextDoneEventTypedDict",
"TextExtendedConfig",
"TextExtendedConfigTypedDict",
- "TextExtendedConfigVerbosity",
"Tokenizer",
"TooManyRequestsResponseErrorData",
"TooManyRequestsResponseErrorDataTypedDict",
@@ -2304,7 +2533,6 @@
"TypeImage",
"TypeLogs",
"TypeOpenPage",
- "TypeSearch",
"TypeTypedDict",
"TypeWebSearchCall",
"URLCitation",
@@ -2318,15 +2546,26 @@
"UpdateGuardrailRequestTypedDict",
"UpdateGuardrailResponse",
"UpdateGuardrailResponseTypedDict",
+ "UpdateWorkspaceRequest",
+ "UpdateWorkspaceRequestTypedDict",
+ "UpdateWorkspaceResponse",
+ "UpdateWorkspaceResponseTypedDict",
"Usage",
+ "UsageCostDetails",
+ "UsageCostDetailsTypedDict",
"UsageTypedDict",
+ "UserLocation",
+ "UserLocationTypedDict",
"Value1",
"Value1TypedDict",
"Value2",
"Value2TypedDict",
"Variables",
"VariablesTypedDict",
+ "Verbosity",
"VideoGenerationRequest",
+ "VideoGenerationRequestProvider",
+ "VideoGenerationRequestProviderTypedDict",
"VideoGenerationRequestTypedDict",
"VideoGenerationResponse",
"VideoGenerationResponseStatus",
@@ -2337,6 +2576,12 @@
"VideoModelTypedDict",
"VideoModelsListResponse",
"VideoModelsListResponseTypedDict",
+ "WebFetchEngineEnum",
+ "WebFetchServerTool",
+ "WebFetchServerToolConfig",
+ "WebFetchServerToolConfigTypedDict",
+ "WebFetchServerToolType",
+ "WebFetchServerToolTypedDict",
"WebSearchCallCompletedEvent",
"WebSearchCallCompletedEventType",
"WebSearchCallCompletedEventTypedDict",
@@ -2354,8 +2599,11 @@
"WebSearchEngineEnum",
"WebSearchPlugin",
"WebSearchPluginID",
+ "WebSearchPluginType",
"WebSearchPluginTypedDict",
"WebSearchServerTool",
+ "WebSearchServerToolConfig",
+ "WebSearchServerToolConfigTypedDict",
"WebSearchServerToolOpenRouter",
"WebSearchServerToolOpenRouterType",
"WebSearchServerToolOpenRouterTypedDict",
@@ -2371,6 +2619,11 @@
"WebSearchUserLocationServerToolTypedDict",
"WebSearchUserLocationType",
"WebSearchUserLocationTypedDict",
+ "Workspace",
+ "WorkspaceMember",
+ "WorkspaceMemberRole",
+ "WorkspaceMemberTypedDict",
+ "WorkspaceTypedDict",
]
_dynamic_imports: dict[str, str] = {
@@ -2418,6 +2671,10 @@
"BaseInputsUnionTypedDict": ".baseinputs_union",
"BaseReasoningConfig": ".basereasoningconfig",
"BaseReasoningConfigTypedDict": ".basereasoningconfig",
+ "BulkAddWorkspaceMembersRequest": ".bulkaddworkspacemembersrequest",
+ "BulkAddWorkspaceMembersRequestTypedDict": ".bulkaddworkspacemembersrequest",
+ "BulkAddWorkspaceMembersResponse": ".bulkaddworkspacemembersresponse",
+ "BulkAddWorkspaceMembersResponseTypedDict": ".bulkaddworkspacemembersresponse",
"BulkAssignKeysRequest": ".bulkassignkeysrequest",
"BulkAssignKeysRequestTypedDict": ".bulkassignkeysrequest",
"BulkAssignKeysResponse": ".bulkassignkeysresponse",
@@ -2426,6 +2683,10 @@
"BulkAssignMembersRequestTypedDict": ".bulkassignmembersrequest",
"BulkAssignMembersResponse": ".bulkassignmembersresponse",
"BulkAssignMembersResponseTypedDict": ".bulkassignmembersresponse",
+ "BulkRemoveWorkspaceMembersRequest": ".bulkremoveworkspacemembersrequest",
+ "BulkRemoveWorkspaceMembersRequestTypedDict": ".bulkremoveworkspacemembersrequest",
+ "BulkRemoveWorkspaceMembersResponse": ".bulkremoveworkspacemembersresponse",
+ "BulkRemoveWorkspaceMembersResponseTypedDict": ".bulkremoveworkspacemembersresponse",
"BulkUnassignKeysRequest": ".bulkunassignkeysrequest",
"BulkUnassignKeysRequestTypedDict": ".bulkunassignkeysrequest",
"BulkUnassignKeysResponse": ".bulkunassignkeysresponse",
@@ -2542,6 +2803,8 @@
"ChatStreamDelta": ".chatstreamdelta",
"ChatStreamDeltaRole": ".chatstreamdelta",
"ChatStreamDeltaTypedDict": ".chatstreamdelta",
+ "ChatStreamingResponse": ".chatstreamingresponse",
+ "ChatStreamingResponseTypedDict": ".chatstreamingresponse",
"ChatStreamOptions": ".chatstreamoptions",
"ChatStreamOptionsTypedDict": ".chatstreamoptions",
"ChatStreamToolCall": ".chatstreamtoolcall",
@@ -2610,6 +2873,13 @@
"Environment": ".computeruseservertool",
"ConflictResponseErrorData": ".conflictresponseerrordata",
"ConflictResponseErrorDataTypedDict": ".conflictresponseerrordata",
+ "ContentFilterAction": ".contentfilteraction",
+ "ContentFilterBuiltinAction": ".contentfilterbuiltinaction",
+ "ContentFilterBuiltinEntry": ".contentfilterbuiltinentry",
+ "ContentFilterBuiltinEntryTypedDict": ".contentfilterbuiltinentry",
+ "ContentFilterBuiltinSlug": ".contentfilterbuiltinslug",
+ "ContentFilterEntry": ".contentfilterentry",
+ "ContentFilterEntryTypedDict": ".contentfilterentry",
"ContentPartAddedEvent": ".contentpartaddedevent",
"ContentPartAddedEventPart": ".contentpartaddedevent",
"ContentPartAddedEventPartTypedDict": ".contentpartaddedevent",
@@ -2629,10 +2899,16 @@
"ContextCompressionPlugin": ".contextcompressionplugin",
"ContextCompressionPluginID": ".contextcompressionplugin",
"ContextCompressionPluginTypedDict": ".contextcompressionplugin",
+ "CostDetails": ".costdetails",
+ "CostDetailsTypedDict": ".costdetails",
"CreateGuardrailRequest": ".createguardrailrequest",
"CreateGuardrailRequestTypedDict": ".createguardrailrequest",
"CreateGuardrailResponse": ".createguardrailresponse",
"CreateGuardrailResponseTypedDict": ".createguardrailresponse",
+ "CreateWorkspaceRequest": ".createworkspacerequest",
+ "CreateWorkspaceRequestTypedDict": ".createworkspacerequest",
+ "CreateWorkspaceResponse": ".createworkspaceresponse",
+ "CreateWorkspaceResponseTypedDict": ".createworkspaceresponse",
"CustomTool": ".customtool",
"CustomToolTypedDict": ".customtool",
"Format": ".customtool",
@@ -2654,6 +2930,8 @@
"DefaultParametersTypedDict": ".defaultparameters",
"DeleteGuardrailResponse": ".deleteguardrailresponse",
"DeleteGuardrailResponseTypedDict": ".deleteguardrailresponse",
+ "DeleteWorkspaceResponse": ".deleteworkspaceresponse",
+ "DeleteWorkspaceResponseTypedDict": ".deleteworkspaceresponse",
"EasyInputMessage": ".easyinputmessage",
"EasyInputMessageContentInputImage": ".easyinputmessage",
"EasyInputMessageContentInputImageTypedDict": ".easyinputmessage",
@@ -2677,6 +2955,10 @@
"EasyInputMessageTypedDict": ".easyinputmessage",
"EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponseerrordata",
"EdgeNetworkTimeoutResponseErrorDataTypedDict": ".edgenetworktimeoutresponseerrordata",
+ "EndpointInfo": ".endpointinfo",
+ "EndpointInfoTypedDict": ".endpointinfo",
+ "EndpointsMetadata": ".endpointsmetadata",
+ "EndpointsMetadataTypedDict": ".endpointsmetadata",
"EndpointStatus": ".endpointstatus",
"ErrorEvent": ".errorevent",
"ErrorEventType": ".errorevent",
@@ -2745,8 +3027,27 @@
"FunctionCallOutputItemTypedDict": ".functioncalloutputitem",
"OutputInputImage": ".functioncalloutputitem",
"OutputInputImageTypedDict": ".functioncalloutputitem",
+ "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",
+ "GenerationResponse": ".generationresponse",
+ "GenerationResponseData": ".generationresponse",
+ "GenerationResponseDataTypedDict": ".generationresponse",
+ "GenerationResponseTypedDict": ".generationresponse",
"GetGuardrailResponse": ".getguardrailresponse",
"GetGuardrailResponseTypedDict": ".getguardrailresponse",
+ "GetWorkspaceResponse": ".getworkspaceresponse",
+ "GetWorkspaceResponseTypedDict": ".getworkspaceresponse",
"Guardrail": ".guardrail",
"GuardrailTypedDict": ".guardrail",
"GuardrailInterval": ".guardrailinterval",
@@ -2872,6 +3173,8 @@
"ListKeyAssignmentsResponseTypedDict": ".listkeyassignmentsresponse",
"ListMemberAssignmentsResponse": ".listmemberassignmentsresponse",
"ListMemberAssignmentsResponseTypedDict": ".listmemberassignmentsresponse",
+ "ListWorkspacesResponse": ".listworkspacesresponse",
+ "ListWorkspacesResponseTypedDict": ".listworkspacesresponse",
"AllowedTools": ".mcpservertool",
"AllowedToolsTypedDict": ".mcpservertool",
"AllowedToolsUnion": ".mcpservertool",
@@ -2892,6 +3195,7 @@
"RequireApprovalUnionTypedDict": ".mcpservertool",
"MemberAssignment": ".memberassignment",
"MemberAssignmentTypedDict": ".memberassignment",
+ "MetadataLevel": ".metadatalevel",
"Model": ".model",
"ModelTypedDict": ".model",
"ModelArchitecture": ".modelarchitecture",
@@ -2900,9 +3204,9 @@
"ModelGroup": ".modelgroup",
"ModelLinks": ".modellinks",
"ModelLinksTypedDict": ".modellinks",
- "Data": ".modelscountresponse",
- "DataTypedDict": ".modelscountresponse",
"ModelsCountResponse": ".modelscountresponse",
+ "ModelsCountResponseData": ".modelscountresponse",
+ "ModelsCountResponseDataTypedDict": ".modelscountresponse",
"ModelsCountResponseTypedDict": ".modelscountresponse",
"ModelsListResponse": ".modelslistresponse",
"ModelsListResponseTypedDict": ".modelslistresponse",
@@ -2967,6 +3271,8 @@
"OpenResponsesResultToolUnionTypedDict": ".openresponsesresult",
"OpenResponsesResultType": ".openresponsesresult",
"OpenResponsesResultTypedDict": ".openresponsesresult",
+ "OpenRouterMetadata": ".openroutermetadata",
+ "OpenRouterMetadataTypedDict": ".openroutermetadata",
"OpenRouterWebSearchServerTool": ".openrouterwebsearchservertool",
"OpenRouterWebSearchServerToolType": ".openrouterwebsearchservertool",
"OpenRouterWebSearchServerToolTypedDict": ".openrouterwebsearchservertool",
@@ -3074,6 +3380,9 @@
"OutputReasoningItemStatusUnionTypedDict": ".outputreasoningitem",
"OutputReasoningItemType": ".outputreasoningitem",
"OutputReasoningItemTypedDict": ".outputreasoningitem",
+ "OutputSearchModelsServerToolItem": ".outputsearchmodelsservertoolitem",
+ "OutputSearchModelsServerToolItemType": ".outputsearchmodelsservertoolitem",
+ "OutputSearchModelsServerToolItemTypedDict": ".outputsearchmodelsservertoolitem",
"Command": ".outputtexteditorservertoolitem",
"OutputTextEditorServerToolItem": ".outputtexteditorservertoolitem",
"OutputTextEditorServerToolItemType": ".outputtexteditorservertoolitem",
@@ -3089,19 +3398,28 @@
"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",
+ "OutputWebSearchServerToolItemTypeOpenrouterWebSearch": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemTypeSearch": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemTypeURL": ".outputwebsearchservertoolitem",
"OutputWebSearchServerToolItemTypedDict": ".outputwebsearchservertoolitem",
+ "Source": ".outputwebsearchservertoolitem",
+ "SourceTypedDict": ".outputwebsearchservertoolitem",
"Parameter": ".parameter",
+ "ParetoRouterPlugin": ".paretorouterplugin",
+ "ParetoRouterPluginID": ".paretorouterplugin",
+ "ParetoRouterPluginTypedDict": ".paretorouterplugin",
"PayloadTooLargeResponseErrorData": ".payloadtoolargeresponseerrordata",
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
"PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata",
@@ -3120,6 +3438,9 @@
"PercentileThroughputCutoffsTypedDict": ".percentilethroughputcutoffs",
"PerRequestLimits": ".perrequestlimits",
"PerRequestLimitsTypedDict": ".perrequestlimits",
+ "PipelineStage": ".pipelinestage",
+ "PipelineStageTypedDict": ".pipelinestage",
+ "PipelineStageType": ".pipelinestagetype",
"PreferredMaxLatency": ".preferredmaxlatency",
"PreferredMaxLatencyTypedDict": ".preferredmaxlatency",
"PreferredMinThroughput": ".preferredminthroughput",
@@ -3134,6 +3455,8 @@
"PreviewWebSearchUserLocationType": ".preview_websearchuserlocation",
"PreviewWebSearchUserLocationTypedDict": ".preview_websearchuserlocation",
"ProviderName": ".providername",
+ "ProviderOptions": ".provideroptions",
+ "ProviderOptionsTypedDict": ".provideroptions",
"ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata",
"ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata",
"DataCollection": ".providerpreferences",
@@ -3245,6 +3568,13 @@
"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",
@@ -3256,6 +3586,11 @@
"ShellServerTool": ".shellservertool",
"ShellServerToolType": ".shellservertool",
"ShellServerToolTypedDict": ".shellservertool",
+ "ResponseFormatEnum": ".speechrequest",
+ "SpeechRequest": ".speechrequest",
+ "SpeechRequestProvider": ".speechrequest",
+ "SpeechRequestProviderTypedDict": ".speechrequest",
+ "SpeechRequestTypedDict": ".speechrequest",
"StoredPromptTemplate": ".storedprompttemplate",
"StoredPromptTemplateTypedDict": ".storedprompttemplate",
"Variables": ".storedprompttemplate",
@@ -3281,9 +3616,16 @@
"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 +3634,7 @@
"TextDoneEventTypedDict": ".textdoneevent",
"TextExtendedConfig": ".textextendedconfig",
"TextExtendedConfigTypedDict": ".textextendedconfig",
- "TextExtendedConfigVerbosity": ".textextendedconfig",
+ "Verbosity": ".textextendedconfig",
"ToolCallStatus": ".toolcallstatus",
"Mode": ".toolchoiceallowed",
"ModeAuto": ".toolchoiceallowed",
@@ -3316,24 +3658,28 @@
"UpdateGuardrailRequestTypedDict": ".updateguardrailrequest",
"UpdateGuardrailResponse": ".updateguardrailresponse",
"UpdateGuardrailResponseTypedDict": ".updateguardrailresponse",
+ "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 +3694,12 @@
"VideoModelTypedDict": ".videomodel",
"VideoModelsListResponse": ".videomodelslistresponse",
"VideoModelsListResponseTypedDict": ".videomodelslistresponse",
+ "WebFetchEngineEnum": ".webfetchengineenum",
+ "WebFetchServerTool": ".webfetchservertool",
+ "WebFetchServerToolType": ".webfetchservertool",
+ "WebFetchServerToolTypedDict": ".webfetchservertool",
+ "WebFetchServerToolConfig": ".webfetchservertoolconfig",
+ "WebFetchServerToolConfigTypedDict": ".webfetchservertoolconfig",
"WebSearchCallCompletedEvent": ".websearchcallcompletedevent",
"WebSearchCallCompletedEventType": ".websearchcallcompletedevent",
"WebSearchCallCompletedEventTypedDict": ".websearchcallcompletedevent",
@@ -3363,17 +3715,20 @@
"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 +3739,11 @@
"WebSearchUserLocationServerTool": ".websearchuserlocationservertool",
"WebSearchUserLocationServerToolType": ".websearchuserlocationservertool",
"WebSearchUserLocationServerToolTypedDict": ".websearchuserlocationservertool",
+ "Workspace": ".workspace",
+ "WorkspaceTypedDict": ".workspace",
+ "WorkspaceMember": ".workspacemember",
+ "WorkspaceMemberRole": ".workspacemember",
+ "WorkspaceMemberTypedDict": ".workspacemember",
}
diff --git a/src/openrouter/components/baseinputs_union.py b/src/openrouter/components/baseinputs_union.py
index 7e50121..c79f022 100644
--- a/src/openrouter/components/baseinputs_union.py
+++ b/src/openrouter/components/baseinputs_union.py
@@ -173,8 +173,8 @@ def serialize_model(self, handler):
OpenAIResponseInputMessageItemTypedDict,
OutputItemImageGenerationCallTypedDict,
OpenAIResponseFunctionToolCallOutputTypedDict,
- OpenAIResponseFunctionToolCallTypedDict,
OutputMessageTypedDict,
+ OpenAIResponseFunctionToolCallTypedDict,
],
)
@@ -186,8 +186,8 @@ def serialize_model(self, handler):
OpenAIResponseInputMessageItem,
OutputItemImageGenerationCall,
OpenAIResponseFunctionToolCallOutput,
- OpenAIResponseFunctionToolCall,
OutputMessage,
+ OpenAIResponseFunctionToolCall,
],
)
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/chatfunctiontool.py b/src/openrouter/components/chatfunctiontool.py
index b0c0d43..90b069f 100644
--- a/src/openrouter/components/chatfunctiontool.py
+++ b/src/openrouter/components/chatfunctiontool.py
@@ -22,6 +22,7 @@
OpenRouterWebSearchServerTool,
OpenRouterWebSearchServerToolTypedDict,
)
+from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -121,6 +122,7 @@ class ChatFunctionToolFunction(BaseModel):
DatetimeServerToolTypedDict,
ImageGenerationServerToolOpenRouterTypedDict,
ChatSearchModelsServerToolTypedDict,
+ WebFetchServerToolTypedDict,
OpenRouterWebSearchServerToolTypedDict,
ChatFunctionToolFunctionTypedDict,
ChatWebSearchShorthandTypedDict,
@@ -139,6 +141,7 @@ class ChatFunctionToolFunction(BaseModel):
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..dc5ca5d 100644
--- a/src/openrouter/components/chatrequest.py
+++ b/src/openrouter/components/chatrequest.py
@@ -36,6 +36,7 @@
)
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 .traceconfig import TraceConfig, TraceConfigTypedDict
@@ -73,6 +74,7 @@
AutoRouterPluginTypedDict,
FileParserPluginTypedDict,
ContextCompressionPluginTypedDict,
+ ParetoRouterPluginTypedDict,
WebSearchPluginTypedDict,
],
)
@@ -84,6 +86,7 @@
Annotated[ContextCompressionPlugin, Tag("context-compression")],
Annotated[FileParserPlugin, Tag("file-parser")],
Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ParetoRouterPlugin, Tag("pareto-router")],
Annotated[ResponseHealingPlugin, Tag("response-healing")],
Annotated[WebSearchPlugin, Tag("web")],
],
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/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/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..682e656 100644
--- a/src/openrouter/components/chatwebsearchshorthand.py
+++ b/src/openrouter/components/chatwebsearchshorthand.py
@@ -31,18 +31,18 @@ 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_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."""
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. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
user_location: NotRequired[WebSearchUserLocationServerToolTypedDict]
r"""Approximate user location for location-biased results."""
@@ -55,7 +55,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,7 +63,7 @@ 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_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."""
@@ -76,7 +76,7 @@ class ChatWebSearchShorthand(BaseModel):
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. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
user_location: Optional[WebSearchUserLocationServerTool] = None
r"""Approximate user location for location-biased results."""
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..57eada2
--- /dev/null
+++ b/src/openrouter/components/contentfilterbuiltinentry.py
@@ -0,0 +1,36 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contentfilterbuiltinaction import ContentFilterBuiltinAction
+from .contentfilterbuiltinslug import ContentFilterBuiltinSlug
+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"""Optional label used in redaction placeholders (e.g. \"[PROMPT_INJECTION]\")"""
+
+
+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"""Optional label used in redaction placeholders (e.g. \"[PROMPT_INJECTION]\")"""
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/textconfig.py b/src/openrouter/components/contentfilterentry.py
similarity index 56%
rename from src/openrouter/components/textconfig.py
rename to src/openrouter/components/contentfilterentry.py
index cf8fa53..856522d 100644
--- a/src/openrouter/components/textconfig.py
+++ b/src/openrouter/components/contentfilterentry.py
@@ -1,55 +1,47 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .formats import Formats, FormatsTypedDict
+from .contentfilteraction import ContentFilterAction
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 Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
-TextConfigVerbosity = Union[
- Literal[
- "high",
- "low",
- "medium",
- ],
- UnrecognizedStr,
-]
+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 TextConfigTypedDict(TypedDict):
- r"""Text output configuration including format and verbosity"""
- format_: NotRequired[FormatsTypedDict]
- r"""Text response format configuration"""
- verbosity: NotRequired[Nullable[TextConfigVerbosity]]
+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"""
-class TextConfig(BaseModel):
- r"""Text output configuration including format and verbosity"""
+ pattern: str
+ r"""A regex pattern to match against request content"""
- format_: Annotated[Optional[Formats], pydantic.Field(alias="format")] = None
- r"""Text response format configuration"""
-
- verbosity: Annotated[
- OptionalNullable[TextConfigVerbosity], PlainValidator(validate_open_enum(False))
- ] = UNSET
+ 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 = ["format", "verbosity"]
- nullable_fields = ["verbosity"]
+ optional_fields = ["label"]
+ nullable_fields = ["label"]
null_default_fields = []
serialized = handler(self)
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/createguardrailrequest.py b/src/openrouter/components/createguardrailrequest.py
index c6dd6d6..b748423 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 .contentfilterbuiltinentry import (
+ ContentFilterBuiltinEntry,
+ ContentFilterBuiltinEntryTypedDict,
+)
+from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .guardrailinterval import GuardrailInterval
from openrouter.types import (
BaseModel,
@@ -10,9 +15,10 @@
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[ContentFilterBuiltinEntryTypedDict]]
+ ]
+ r"""Builtin content filters to apply. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection."""
+ 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,34 @@ class CreateGuardrailRequest(BaseModel):
allowed_providers: OptionalNullable[List[str]] = UNSET
r"""List of allowed provider IDs"""
+ content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntry]] = UNSET
+ r"""Builtin content filters to apply. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection."""
+
+ 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 +112,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/createworkspacerequest.py b/src/openrouter/components/createworkspacerequest.py
new file mode 100644
index 0000000..1b4eba0
--- /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 and hyphens only)"""
+ 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 and hyphens only)"""
+
+ 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/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/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/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/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..99a84fb
--- /dev/null
+++ b/src/openrouter/components/generationresponse.py
@@ -0,0 +1,330 @@
+"""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",
+ ],
+ UnrecognizedStr,
+]
+r"""Type of API used for the generation"""
+
+
+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"""
+ 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"""
+ 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"""
+
+ 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"""
+
+ 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",
+ "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/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 @@
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 @@ 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",
@@ -98,8 +152,14 @@ def serialize_model(self, handler):
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/inputs_union.py b/src/openrouter/components/inputs_union.py
index 723f035..ff29a04 100644
--- a/src/openrouter/components/inputs_union.py
+++ b/src/openrouter/components/inputs_union.py
@@ -12,11 +12,39 @@
OpenAIResponsesRefusalContent,
OpenAIResponsesRefusalContentTypedDict,
)
+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 .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict
from .outputfilesearchcallitem import (
OutputFileSearchCallItem,
OutputFileSearchCallItemTypedDict,
)
+from .outputfilesearchservertoolitem import (
+ OutputFileSearchServerToolItem,
+ OutputFileSearchServerToolItemTypedDict,
+)
from .outputfunctioncallitem import (
OutputFunctionCallItem,
OutputFunctionCallItemTypedDict,
@@ -25,6 +53,34 @@
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,
@@ -290,19 +346,33 @@ def serialize_model(self, handler):
InputsUnion1TypedDict = TypeAliasType(
"InputsUnion1TypedDict",
Union[
+ OutputFileSearchCallItemTypedDict,
+ OutputToolSearchServerToolItemTypedDict,
+ InputMessageItemTypedDict,
OutputWebSearchServerToolItemTypedDict,
OutputWebSearchCallItemTypedDict,
+ OutputFileSearchServerToolItemTypedDict,
EasyInputMessageTypedDict,
- InputMessageItemTypedDict,
OutputImageGenerationCallItemTypedDict,
- OutputFileSearchCallItemTypedDict,
FunctionCallOutputItemTypedDict,
+ OutputMcpServerToolItemTypedDict,
+ OutputApplyPatchServerToolItemTypedDict,
+ OutputTextEditorServerToolItemTypedDict,
+ OutputBrowserUseServerToolItemTypedDict,
OutputDatetimeItemTypedDict,
- FunctionCallItemTypedDict,
- OutputFunctionCallItemTypedDict,
+ OutputSearchModelsServerToolItemTypedDict,
+ OutputComputerCallItemTypedDict,
+ OutputCodeInterpreterCallItemTypedDict,
+ OutputMemoryServerToolItemTypedDict,
InputsMessageTypedDict,
- InputsReasoningTypedDict,
+ OutputImageGenerationServerToolItemTypedDict,
+ OutputBashServerToolItemTypedDict,
+ OutputFunctionCallItemTypedDict,
+ FunctionCallItemTypedDict,
+ OutputCodeInterpreterServerToolItemTypedDict,
ReasoningItemTypedDict,
+ OutputWebFetchServerToolItemTypedDict,
+ InputsReasoningTypedDict,
],
)
@@ -310,19 +380,33 @@ def serialize_model(self, handler):
InputsUnion1 = TypeAliasType(
"InputsUnion1",
Union[
+ OutputFileSearchCallItem,
+ OutputToolSearchServerToolItem,
+ InputMessageItem,
OutputWebSearchServerToolItem,
OutputWebSearchCallItem,
+ OutputFileSearchServerToolItem,
EasyInputMessage,
- InputMessageItem,
OutputImageGenerationCallItem,
- OutputFileSearchCallItem,
FunctionCallOutputItem,
+ OutputMcpServerToolItem,
+ OutputApplyPatchServerToolItem,
+ OutputTextEditorServerToolItem,
+ OutputBrowserUseServerToolItem,
OutputDatetimeItem,
- FunctionCallItem,
- OutputFunctionCallItem,
+ OutputSearchModelsServerToolItem,
+ OutputComputerCallItem,
+ OutputCodeInterpreterCallItem,
+ OutputMemoryServerToolItem,
InputsMessage,
- InputsReasoning,
+ OutputImageGenerationServerToolItem,
+ OutputBashServerToolItem,
+ OutputFunctionCallItem,
+ FunctionCallItem,
+ OutputCodeInterpreterServerToolItem,
ReasoningItem,
+ OutputWebFetchServerToolItem,
+ InputsReasoning,
],
)
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/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 @@ def serialize_model(self, handler):
"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 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/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/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 @@
OpenAIResponsesToolChoiceUnion,
OpenAIResponsesToolChoiceUnionTypedDict,
)
+from .openroutermetadata import OpenRouterMetadata, OpenRouterMetadataTypedDict
from .outputitems import OutputItems, OutputItemsTypedDict
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
@@ -39,7 +40,7 @@
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 @@ def serialize_model(self, handler):
"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/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/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..ed75b5c 100644
--- a/src/openrouter/components/outputitems.py
+++ b/src/openrouter/components/outputitems.py
@@ -56,6 +56,10 @@
)
from .outputmessageitem import OutputMessageItem, OutputMessageItemTypedDict
from .outputreasoningitem import OutputReasoningItem, OutputReasoningItemTypedDict
+from .outputsearchmodelsservertoolitem import (
+ OutputSearchModelsServerToolItem,
+ OutputSearchModelsServerToolItemTypedDict,
+)
from .outputtexteditorservertoolitem import (
OutputTextEditorServerToolItem,
OutputTextEditorServerToolItemTypedDict,
@@ -94,18 +98,19 @@
OutputTextEditorServerToolItemTypedDict,
OutputApplyPatchServerToolItemTypedDict,
OutputDatetimeItemTypedDict,
+ OutputSearchModelsServerToolItemTypedDict,
OutputMcpServerToolItemTypedDict,
OutputBrowserUseServerToolItemTypedDict,
- OutputFunctionCallItemTypedDict,
- OutputImageGenerationServerToolItemTypedDict,
OutputMessageItemTypedDict,
OutputComputerCallItemTypedDict,
- OutputWebFetchServerToolItemTypedDict,
OutputMemoryServerToolItemTypedDict,
OutputCodeInterpreterCallItemTypedDict,
+ OutputImageGenerationServerToolItemTypedDict,
+ OutputFunctionCallItemTypedDict,
OutputBashServerToolItemTypedDict,
- OutputCodeInterpreterServerToolItemTypedDict,
+ OutputWebFetchServerToolItemTypedDict,
OutputReasoningItemTypedDict,
+ OutputCodeInterpreterServerToolItemTypedDict,
],
)
r"""An output item from the response"""
@@ -126,6 +131,10 @@
OutputCodeInterpreterServerToolItem, Tag("openrouter:code_interpreter")
],
Annotated[OutputDatetimeItem, Tag("openrouter:datetime")],
+ Annotated[
+ OutputSearchModelsServerToolItem,
+ Tag("openrouter:experimental__search_models"),
+ ],
Annotated[OutputFileSearchServerToolItem, Tag("openrouter:file_search")],
Annotated[
OutputImageGenerationServerToolItem, Tag("openrouter:image_generation")
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 @@
"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/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 .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..c0c8f1b 100644
--- a/src/openrouter/components/outputwebsearchcallitem.py
+++ b/src/openrouter/components/outputwebsearchcallitem.py
@@ -78,20 +78,20 @@ def serialize_model(self, handler):
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")],
],
diff --git a/src/openrouter/components/outputwebsearchservertoolitem.py b/src/openrouter/components/outputwebsearchservertoolitem.py
index 304cab5..cdb0485 100644
--- a/src/openrouter/components/outputwebsearchservertoolitem.py
+++ b/src/openrouter/components/outputwebsearchservertoolitem.py
@@ -5,18 +5,55 @@
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 SourceTypedDict(TypedDict):
+ type: OutputWebSearchServerToolItemTypeURL
+ url: str
+
+
+class Source(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[SourceTypedDict]]
+
+
+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[Source]] = 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/providername.py b/src/openrouter/components/providername.py
index 7764a12..b3602ca 100644
--- a/src/openrouter/components/providername.py
+++ b/src/openrouter/components/providername.py
@@ -12,6 +12,7 @@
"AionLabs",
"Alibaba",
"Ambient",
+ "Baidu",
"Amazon Bedrock",
"Amazon Nova",
"Anthropic",
@@ -58,12 +59,15 @@
"Morph",
"NCompass",
"Nebius",
+ "Nex AGI",
"NextBit",
"Novita",
"Nvidia",
"OpenAI",
"OpenInference",
"Parasail",
+ "Poolside",
+ "Perceptron",
"Perplexity",
"Phala",
"Recraft",
diff --git a/src/openrouter/components/provideroptions.py b/src/openrouter/components/provideroptions.py
new file mode 100644
index 0000000..7482c8d
--- /dev/null
+++ b/src/openrouter/components/provideroptions.py
@@ -0,0 +1,390 @@
+"""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]]]
+ crusoe: NotRequired[Dict[str, Nullable[Any]]]
+ deepinfra: NotRequired[Dict[str, Nullable[Any]]]
+ deepseek: NotRequired[Dict[str, Nullable[Any]]]
+ dekallm: 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]]]
+ 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
+
+ crusoe: 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
+
+ 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
+
+ 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..c827fcd 100644
--- a/src/openrouter/components/providerresponse.py
+++ b/src/openrouter/components/providerresponse.py
@@ -44,6 +44,7 @@
"AionLabs",
"Alibaba",
"Ambient",
+ "Baidu",
"Amazon Bedrock",
"Amazon Nova",
"Anthropic",
@@ -90,12 +91,15 @@
"Morph",
"NCompass",
"Nebius",
+ "Nex AGI",
"NextBit",
"Novita",
"Nvidia",
"OpenAI",
"OpenInference",
"Parasail",
+ "Poolside",
+ "Perceptron",
"Perplexity",
"Phala",
"Recraft",
diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py
index 357c19a..6b45ef7 100644
--- a/src/openrouter/components/responsesrequest.py
+++ b/src/openrouter/components/responsesrequest.py
@@ -43,6 +43,7 @@
)
from .openairesponsestruncation import OpenAIResponsesTruncation
from .outputmodalityenum import OutputModalityEnum
+from .paretorouterplugin import ParetoRouterPlugin, ParetoRouterPluginTypedDict
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
Preview20250311WebSearchServerToolTypedDict,
@@ -59,6 +60,7 @@
from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict
from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict
from .traceconfig import TraceConfig, TraceConfigTypedDict
+from .webfetchservertool import WebFetchServerTool, WebFetchServerToolTypedDict
from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict
from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict
from .websearchservertool_openrouter import (
@@ -89,6 +91,7 @@
AutoRouterPluginTypedDict,
FileParserPluginTypedDict,
ContextCompressionPluginTypedDict,
+ ParetoRouterPluginTypedDict,
WebSearchPluginTypedDict,
],
)
@@ -100,6 +103,7 @@
Annotated[ContextCompressionPlugin, Tag("context-compression")],
Annotated[FileParserPlugin, Tag("file-parser")],
Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ParetoRouterPlugin, Tag("pareto-router")],
Annotated[ResponseHealingPlugin, Tag("response-healing")],
Annotated[WebSearchPlugin, Tag("web")],
],
@@ -179,14 +183,15 @@ def serialize_model(self, handler):
ResponsesRequestToolUnionTypedDict = TypeAliasType(
"ResponsesRequestToolUnionTypedDict",
Union[
- ApplyPatchServerToolTypedDict,
CodexLocalShellToolTypedDict,
+ ApplyPatchServerToolTypedDict,
ShellServerToolTypedDict,
- WebSearchServerToolOpenRouterTypedDict,
- ChatSearchModelsServerToolTypedDict,
- ImageGenerationServerToolOpenRouterTypedDict,
- CodeInterpreterServerToolTypedDict,
DatetimeServerToolTypedDict,
+ CodeInterpreterServerToolTypedDict,
+ ImageGenerationServerToolOpenRouterTypedDict,
+ ChatSearchModelsServerToolTypedDict,
+ WebFetchServerToolTypedDict,
+ WebSearchServerToolOpenRouterTypedDict,
ComputerUseServerToolTypedDict,
CustomToolTypedDict,
ResponsesRequestToolFunctionTypedDict,
@@ -226,6 +231,7 @@ def serialize_model(self, handler):
Annotated[
ChatSearchModelsServerTool, Tag("openrouter:experimental__search_models")
],
+ Annotated[WebFetchServerTool, Tag("openrouter:web_fetch")],
Annotated[WebSearchServerToolOpenRouter, Tag("openrouter:web_search")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
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..aef5b61
--- /dev/null
+++ b/src/openrouter/components/routingstrategy.py
@@ -0,0 +1,20 @@
+"""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",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/searchqualitylevel.py b/src/openrouter/components/searchqualitylevel.py
index 36eba03..b5ed4f1 100644
--- a/src/openrouter/components/searchqualitylevel.py
+++ b/src/openrouter/components/searchqualitylevel.py
@@ -13,4 +13,4 @@
],
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. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
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/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_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/updateguardrailrequest.py b/src/openrouter/components/updateguardrailrequest.py
index c400077..c082fdd 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 .contentfilterbuiltinentry import (
+ ContentFilterBuiltinEntry,
+ ContentFilterBuiltinEntryTypedDict,
+)
+from .contentfilterentry import ContentFilterEntry, ContentFilterEntryTypedDict
from .guardrailinterval import GuardrailInterval
from openrouter.types import (
BaseModel,
@@ -10,6 +15,7 @@
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[ContentFilterBuiltinEntryTypedDict]]
+ ]
+ r"""Builtin content filters to apply. Set to null to remove. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection."""
+ 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,34 @@ class UpdateGuardrailRequest(BaseModel):
allowed_providers: OptionalNullable[List[str]] = UNSET
r"""New list of allowed provider IDs"""
+ content_filter_builtins: OptionalNullable[List[ContentFilterBuiltinEntry]] = UNSET
+ r"""Builtin content filters to apply. Set to null to remove. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection."""
+
+ 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 +115,14 @@ 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",
@@ -83,8 +132,14 @@ def serialize_model(self, handler):
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/updateworkspacerequest.py b/src/openrouter/components/updateworkspacerequest.py
new file mode 100644
index 0000000..7a1fdb6
--- /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"""
+
+
+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"""
+
+ @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..d7b2323 100644
--- a/src/openrouter/components/videogenerationrequest.py
+++ b/src/openrouter/components/videogenerationrequest.py
@@ -44,6 +44,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]]]
@@ -99,6 +100,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 +109,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]]]
@@ -182,6 +186,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[
@@ -312,6 +318,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 +340,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
@@ -395,18 +409,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,6 +440,8 @@ 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]]
@@ -436,7 +450,7 @@ class VideoGenerationRequestTypedDict(TypedDict):
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]
+ provider: NotRequired[VideoGenerationRequestProviderTypedDict]
r"""Provider-specific passthrough configuration"""
resolution: NotRequired[Resolution]
r"""Resolution of the generated video"""
@@ -456,6 +470,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"""
@@ -468,7 +485,7 @@ class VideoGenerationRequest(BaseModel):
input_references: Optional[List[ContentPartImage]] = None
r"""Reference images to guide video generation"""
- provider: Optional[Provider] = None
+ provider: Optional[VideoGenerationRequestProvider] = None
r"""Provider-specific passthrough configuration"""
resolution: Annotated[
diff --git a/src/openrouter/components/webfetchengineenum.py b/src/openrouter/components/webfetchengineenum.py
new file mode 100644
index 0000000..7573a92
--- /dev/null
+++ b/src/openrouter/components/webfetchengineenum.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
+
+
+WebFetchEngineEnum = Union[
+ Literal[
+ "auto",
+ "native",
+ "openrouter",
+ "firecrawl",
+ "exa",
+ ],
+ 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 (supports BYOK). \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK)."""
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..b65fd21
--- /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 (supports BYOK). \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK)."""
+ 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 (supports BYOK). \"openrouter\" uses direct HTTP fetch. \"firecrawl\" uses Firecrawl scrape (requires BYOK)."""
+
+ 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..0e15623 100644
--- a/src/openrouter/components/websearchconfig.py
+++ b/src/openrouter/components/websearchconfig.py
@@ -16,24 +16,24 @@
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_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."""
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. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
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,7 +41,7 @@ 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_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."""
@@ -52,7 +52,7 @@ class WebSearchConfig(BaseModel):
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. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
user_location: Optional[WebSearchUserLocationServerTool] = None
r"""Approximate user location for location-biased results."""
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 @@
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..de31d59
--- /dev/null
+++ b/src/openrouter/components/websearchservertoolconfig.py
@@ -0,0 +1,62 @@
+"""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_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."""
+ search_context_size: NotRequired[SearchQualityLevel]
+ r"""How much context to retrieve per result. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
+ 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_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."""
+
+ 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). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl."""
+
+ 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 @@
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/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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@ def get_generation(
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 @@ def get_generation(
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 @@ async def get_generation_async(
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 @@ async def get_generation_async(
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 @@ async def get_generation_async(
)
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..a4fc1c1 100644
--- a/src/openrouter/guardrails.py
+++ b/src/openrouter/guardrails.py
@@ -21,6 +21,7 @@ def list(
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 @@ def list(
: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 @@ def list(
x_open_router_categories=x_open_router_categories,
offset=offset,
limit=limit,
+ workspace_id=workspace_id,
)
req = self._build_request(
@@ -132,6 +135,7 @@ def next_func() -> Optional[operations.ListGuardrailsResponse]:
x_open_router_categories=x_open_router_categories,
offset=next_offset,
limit=limit,
+ workspace_id=workspace_id,
retries=retries,
)
@@ -174,6 +178,7 @@ async def list_async(
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 @@ async def list_async(
: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 @@ async def list_async(
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 @@ async def empty_result():
x_open_router_categories=x_open_router_categories,
offset=next_offset,
limit=limit,
+ workspace_id=workspace_id,
retries=retries,
)
@@ -331,12 +339,29 @@ def create(
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.ContentFilterBuiltinEntry],
+ List[components.ContentFilterBuiltinEntryTypedDict],
+ ]
+ ] = 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 @@ def create(
: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. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection.
+ :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 @@ def create(
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.ContentFilterBuiltinEntry]],
+ ),
+ 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 @@ def create(
),
),
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 @@ def create(
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 @@ async def create_async(
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.ContentFilterBuiltinEntry],
+ List[components.ContentFilterBuiltinEntryTypedDict],
+ ]
+ ] = 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 @@ async def create_async(
: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. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection.
+ :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 @@ async def create_async(
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.ContentFilterBuiltinEntry]],
+ ),
+ 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 @@ async def create_async(
),
),
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 @@ async def create_async(
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 @@ def update(
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.ContentFilterBuiltinEntry],
+ List[components.ContentFilterBuiltinEntryTypedDict],
+ ]
+ ] = 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 @@ def update(
: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. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection.
+ :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 @@ def update(
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.ContentFilterBuiltinEntry]],
+ ),
+ 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 @@ async def update_async(
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.ContentFilterBuiltinEntry],
+ List[components.ContentFilterBuiltinEntryTypedDict],
+ ]
+ ] = 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 @@ async def update_async(
: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. Use slug \"regex-prompt-injection\" with action \"block\", \"flag\", or \"redact\" to enable heuristic prompt injection detection.
+ :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 @@ async def update_async(
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.ContentFilterBuiltinEntry]],
+ ),
+ 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/operations/__init__.py b/src/openrouter/operations/__init__.py
index 8c2b319..380edd8 100644
--- a/src/openrouter/operations/__init__.py
+++ b/src/openrouter/operations/__init__.py
@@ -6,6 +6,12 @@
import sys
if TYPE_CHECKING:
+ from .bulkaddworkspacemembers import (
+ BulkAddWorkspaceMembersGlobals,
+ BulkAddWorkspaceMembersGlobalsTypedDict,
+ BulkAddWorkspaceMembersRequest,
+ BulkAddWorkspaceMembersRequestTypedDict,
+ )
from .bulkassignkeystoguardrail import (
BulkAssignKeysToGuardrailGlobals,
BulkAssignKeysToGuardrailGlobalsTypedDict,
@@ -18,6 +24,12 @@
BulkAssignMembersToGuardrailRequest,
BulkAssignMembersToGuardrailRequestTypedDict,
)
+ from .bulkremoveworkspacemembers import (
+ BulkRemoveWorkspaceMembersGlobals,
+ BulkRemoveWorkspaceMembersGlobalsTypedDict,
+ BulkRemoveWorkspaceMembersRequest,
+ BulkRemoveWorkspaceMembersRequestTypedDict,
+ )
from .bulkunassignkeysfromguardrail import (
BulkUnassignKeysFromGuardrailGlobals,
BulkUnassignKeysFromGuardrailGlobalsTypedDict,
@@ -30,6 +42,18 @@
BulkUnassignMembersFromGuardrailRequest,
BulkUnassignMembersFromGuardrailRequestTypedDict,
)
+ from .createaudiospeech import (
+ CreateAudioSpeechGlobals,
+ CreateAudioSpeechGlobalsTypedDict,
+ CreateAudioSpeechRequest,
+ CreateAudioSpeechRequestTypedDict,
+ )
+ from .createaudiotranscriptions import (
+ CreateAudioTranscriptionsGlobals,
+ CreateAudioTranscriptionsGlobalsTypedDict,
+ CreateAudioTranscriptionsRequest,
+ CreateAudioTranscriptionsRequestTypedDict,
+ )
from .createauthkeyscode import (
CreateAuthKeysCodeCodeChallengeMethod,
CreateAuthKeysCodeData,
@@ -76,6 +100,8 @@
InputUnionTypedDict,
Object,
ObjectEmbedding,
+ PromptTokensDetails,
+ PromptTokensDetailsTypedDict,
TypeImageURL,
TypeText,
)
@@ -122,8 +148,6 @@
CreateResponsesRequest,
CreateResponsesRequestTypedDict,
CreateResponsesResponse,
- CreateResponsesResponseBody,
- CreateResponsesResponseBodyTypedDict,
CreateResponsesResponseTypedDict,
)
from .createvideos import (
@@ -132,6 +156,12 @@
CreateVideosRequest,
CreateVideosRequestTypedDict,
)
+ from .createworkspace import (
+ CreateWorkspaceGlobals,
+ CreateWorkspaceGlobalsTypedDict,
+ CreateWorkspaceRequest,
+ CreateWorkspaceRequestTypedDict,
+ )
from .deleteguardrail import (
DeleteGuardrailGlobals,
DeleteGuardrailGlobalsTypedDict,
@@ -146,6 +176,12 @@
DeleteKeysResponse,
DeleteKeysResponseTypedDict,
)
+ from .deleteworkspace import (
+ DeleteWorkspaceGlobals,
+ DeleteWorkspaceGlobalsTypedDict,
+ DeleteWorkspaceRequest,
+ DeleteWorkspaceRequestTypedDict,
+ )
from .exchangeauthcodeforapikey import (
ExchangeAuthCodeForAPIKeyCodeChallengeMethod,
ExchangeAuthCodeForAPIKeyGlobals,
@@ -180,15 +216,10 @@
RateLimitTypedDict,
)
from .getgeneration import (
- APIType,
- GetGenerationData,
- GetGenerationDataTypedDict,
GetGenerationGlobals,
GetGenerationGlobalsTypedDict,
GetGenerationRequest,
GetGenerationRequestTypedDict,
- GetGenerationResponse,
- GetGenerationResponseTypedDict,
)
from .getguardrail import (
GetGuardrailGlobals,
@@ -225,6 +256,12 @@
GetVideosRequest,
GetVideosRequestTypedDict,
)
+ from .getworkspace import (
+ GetWorkspaceGlobals,
+ GetWorkspaceGlobalsTypedDict,
+ GetWorkspaceRequest,
+ GetWorkspaceRequestTypedDict,
+ )
from .list import (
ListData,
ListDataTypedDict,
@@ -257,6 +294,12 @@
ListEndpointsZdrResponse,
ListEndpointsZdrResponseTypedDict,
)
+ from .listgenerationcontent import (
+ ListGenerationContentGlobals,
+ ListGenerationContentGlobalsTypedDict,
+ ListGenerationContentRequest,
+ ListGenerationContentRequestTypedDict,
+ )
from .listguardrailkeyassignments import (
ListGuardrailKeyAssignmentsGlobals,
ListGuardrailKeyAssignmentsGlobalsTypedDict,
@@ -348,14 +391,20 @@
ListVideosModelsRequest,
ListVideosModelsRequestTypedDict,
)
+ from .listworkspaces import (
+ ListWorkspacesGlobals,
+ ListWorkspacesGlobalsTypedDict,
+ ListWorkspacesRequest,
+ ListWorkspacesRequestTypedDict,
+ ListWorkspacesResponse,
+ ListWorkspacesResponseTypedDict,
+ )
from .sendchatcompletionrequest import (
SendChatCompletionRequestGlobals,
SendChatCompletionRequestGlobalsTypedDict,
SendChatCompletionRequestRequest,
SendChatCompletionRequestRequestTypedDict,
SendChatCompletionRequestResponse,
- SendChatCompletionRequestResponseBody,
- SendChatCompletionRequestResponseBodyTypedDict,
SendChatCompletionRequestResponseTypedDict,
)
from .updateguardrail import (
@@ -377,9 +426,18 @@
UpdateKeysResponse,
UpdateKeysResponseTypedDict,
)
+ from .updateworkspace import (
+ UpdateWorkspaceGlobals,
+ UpdateWorkspaceGlobalsTypedDict,
+ UpdateWorkspaceRequest,
+ UpdateWorkspaceRequestTypedDict,
+ )
__all__ = [
- "APIType",
+ "BulkAddWorkspaceMembersGlobals",
+ "BulkAddWorkspaceMembersGlobalsTypedDict",
+ "BulkAddWorkspaceMembersRequest",
+ "BulkAddWorkspaceMembersRequestTypedDict",
"BulkAssignKeysToGuardrailGlobals",
"BulkAssignKeysToGuardrailGlobalsTypedDict",
"BulkAssignKeysToGuardrailRequest",
@@ -388,6 +446,10 @@
"BulkAssignMembersToGuardrailGlobalsTypedDict",
"BulkAssignMembersToGuardrailRequest",
"BulkAssignMembersToGuardrailRequestTypedDict",
+ "BulkRemoveWorkspaceMembersGlobals",
+ "BulkRemoveWorkspaceMembersGlobalsTypedDict",
+ "BulkRemoveWorkspaceMembersRequest",
+ "BulkRemoveWorkspaceMembersRequestTypedDict",
"BulkUnassignKeysFromGuardrailGlobals",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict",
"BulkUnassignKeysFromGuardrailRequest",
@@ -403,6 +465,14 @@
"ContentText",
"ContentTextTypedDict",
"ContentTypedDict",
+ "CreateAudioSpeechGlobals",
+ "CreateAudioSpeechGlobalsTypedDict",
+ "CreateAudioSpeechRequest",
+ "CreateAudioSpeechRequestTypedDict",
+ "CreateAudioTranscriptionsGlobals",
+ "CreateAudioTranscriptionsGlobalsTypedDict",
+ "CreateAudioTranscriptionsRequest",
+ "CreateAudioTranscriptionsRequestTypedDict",
"CreateAuthKeysCodeCodeChallengeMethod",
"CreateAuthKeysCodeData",
"CreateAuthKeysCodeDataTypedDict",
@@ -460,13 +530,15 @@
"CreateResponsesRequest",
"CreateResponsesRequestTypedDict",
"CreateResponsesResponse",
- "CreateResponsesResponseBody",
- "CreateResponsesResponseBodyTypedDict",
"CreateResponsesResponseTypedDict",
"CreateVideosGlobals",
"CreateVideosGlobalsTypedDict",
"CreateVideosRequest",
"CreateVideosRequestTypedDict",
+ "CreateWorkspaceGlobals",
+ "CreateWorkspaceGlobalsTypedDict",
+ "CreateWorkspaceRequest",
+ "CreateWorkspaceRequestTypedDict",
"Datacenter",
"DeleteGuardrailGlobals",
"DeleteGuardrailGlobalsTypedDict",
@@ -478,6 +550,10 @@
"DeleteKeysRequestTypedDict",
"DeleteKeysResponse",
"DeleteKeysResponseTypedDict",
+ "DeleteWorkspaceGlobals",
+ "DeleteWorkspaceGlobalsTypedDict",
+ "DeleteWorkspaceRequest",
+ "DeleteWorkspaceRequestTypedDict",
"Document",
"DocumentTypedDict",
"Embedding",
@@ -508,14 +584,10 @@
"GetCurrentKeyRequestTypedDict",
"GetCurrentKeyResponse",
"GetCurrentKeyResponseTypedDict",
- "GetGenerationData",
- "GetGenerationDataTypedDict",
"GetGenerationGlobals",
"GetGenerationGlobalsTypedDict",
"GetGenerationRequest",
"GetGenerationRequestTypedDict",
- "GetGenerationResponse",
- "GetGenerationResponseTypedDict",
"GetGuardrailGlobals",
"GetGuardrailGlobalsTypedDict",
"GetGuardrailRequest",
@@ -540,6 +612,10 @@
"GetVideosGlobalsTypedDict",
"GetVideosRequest",
"GetVideosRequestTypedDict",
+ "GetWorkspaceGlobals",
+ "GetWorkspaceGlobalsTypedDict",
+ "GetWorkspaceRequest",
+ "GetWorkspaceRequestTypedDict",
"Headquarters",
"ImageURL",
"ImageURLTypedDict",
@@ -565,6 +641,10 @@
"ListEndpointsZdrRequestTypedDict",
"ListEndpointsZdrResponse",
"ListEndpointsZdrResponseTypedDict",
+ "ListGenerationContentGlobals",
+ "ListGenerationContentGlobalsTypedDict",
+ "ListGenerationContentRequest",
+ "ListGenerationContentRequestTypedDict",
"ListGlobals",
"ListGlobalsTypedDict",
"ListGuardrailKeyAssignmentsGlobals",
@@ -637,8 +717,16 @@
"ListVideosModelsGlobalsTypedDict",
"ListVideosModelsRequest",
"ListVideosModelsRequestTypedDict",
+ "ListWorkspacesGlobals",
+ "ListWorkspacesGlobalsTypedDict",
+ "ListWorkspacesRequest",
+ "ListWorkspacesRequestTypedDict",
+ "ListWorkspacesResponse",
+ "ListWorkspacesResponseTypedDict",
"Object",
"ObjectEmbedding",
+ "PromptTokensDetails",
+ "PromptTokensDetailsTypedDict",
"RateLimit",
"RateLimitTypedDict",
"Result",
@@ -649,8 +737,6 @@
"SendChatCompletionRequestRequest",
"SendChatCompletionRequestRequestTypedDict",
"SendChatCompletionRequestResponse",
- "SendChatCompletionRequestResponseBody",
- "SendChatCompletionRequestResponseBodyTypedDict",
"SendChatCompletionRequestResponseTypedDict",
"TypeImageURL",
"TypeText",
@@ -669,10 +755,18 @@
"UpdateKeysRequestTypedDict",
"UpdateKeysResponse",
"UpdateKeysResponseTypedDict",
+ "UpdateWorkspaceGlobals",
+ "UpdateWorkspaceGlobalsTypedDict",
+ "UpdateWorkspaceRequest",
+ "UpdateWorkspaceRequestTypedDict",
"UsageLimitType",
]
_dynamic_imports: dict[str, str] = {
+ "BulkAddWorkspaceMembersGlobals": ".bulkaddworkspacemembers",
+ "BulkAddWorkspaceMembersGlobalsTypedDict": ".bulkaddworkspacemembers",
+ "BulkAddWorkspaceMembersRequest": ".bulkaddworkspacemembers",
+ "BulkAddWorkspaceMembersRequestTypedDict": ".bulkaddworkspacemembers",
"BulkAssignKeysToGuardrailGlobals": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailGlobalsTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequest": ".bulkassignkeystoguardrail",
@@ -681,6 +775,10 @@
"BulkAssignMembersToGuardrailGlobalsTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequest": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequestTypedDict": ".bulkassignmemberstoguardrail",
+ "BulkRemoveWorkspaceMembersGlobals": ".bulkremoveworkspacemembers",
+ "BulkRemoveWorkspaceMembersGlobalsTypedDict": ".bulkremoveworkspacemembers",
+ "BulkRemoveWorkspaceMembersRequest": ".bulkremoveworkspacemembers",
+ "BulkRemoveWorkspaceMembersRequestTypedDict": ".bulkremoveworkspacemembers",
"BulkUnassignKeysFromGuardrailGlobals": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequest": ".bulkunassignkeysfromguardrail",
@@ -689,6 +787,14 @@
"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",
@@ -732,6 +838,8 @@
"InputUnionTypedDict": ".createembeddings",
"Object": ".createembeddings",
"ObjectEmbedding": ".createembeddings",
+ "PromptTokensDetails": ".createembeddings",
+ "PromptTokensDetailsTypedDict": ".createembeddings",
"TypeImageURL": ".createembeddings",
"TypeText": ".createembeddings",
"CreateGuardrailGlobals": ".createguardrail",
@@ -770,13 +878,15 @@
"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",
"DeleteGuardrailGlobals": ".deleteguardrail",
"DeleteGuardrailGlobalsTypedDict": ".deleteguardrail",
"DeleteGuardrailRequest": ".deleteguardrail",
@@ -787,6 +897,10 @@
"DeleteKeysRequestTypedDict": ".deletekeys",
"DeleteKeysResponse": ".deletekeys",
"DeleteKeysResponseTypedDict": ".deletekeys",
+ "DeleteWorkspaceGlobals": ".deleteworkspace",
+ "DeleteWorkspaceGlobalsTypedDict": ".deleteworkspace",
+ "DeleteWorkspaceRequest": ".deleteworkspace",
+ "DeleteWorkspaceRequestTypedDict": ".deleteworkspace",
"ExchangeAuthCodeForAPIKeyCodeChallengeMethod": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyGlobals": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyGlobalsTypedDict": ".exchangeauthcodeforapikey",
@@ -814,15 +928,10 @@
"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",
@@ -848,6 +957,10 @@
"GetVideosGlobalsTypedDict": ".getvideos",
"GetVideosRequest": ".getvideos",
"GetVideosRequestTypedDict": ".getvideos",
+ "GetWorkspaceGlobals": ".getworkspace",
+ "GetWorkspaceGlobalsTypedDict": ".getworkspace",
+ "GetWorkspaceRequest": ".getworkspace",
+ "GetWorkspaceRequestTypedDict": ".getworkspace",
"ListData": ".list",
"ListDataTypedDict": ".list",
"ListGlobals": ".list",
@@ -872,6 +985,10 @@
"ListEndpointsZdrRequestTypedDict": ".listendpointszdr",
"ListEndpointsZdrResponse": ".listendpointszdr",
"ListEndpointsZdrResponseTypedDict": ".listendpointszdr",
+ "ListGenerationContentGlobals": ".listgenerationcontent",
+ "ListGenerationContentGlobalsTypedDict": ".listgenerationcontent",
+ "ListGenerationContentRequest": ".listgenerationcontent",
+ "ListGenerationContentRequestTypedDict": ".listgenerationcontent",
"ListGuardrailKeyAssignmentsGlobals": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsGlobalsTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsRequest": ".listguardrailkeyassignments",
@@ -941,13 +1058,17 @@
"ListVideosModelsGlobalsTypedDict": ".listvideosmodels",
"ListVideosModelsRequest": ".listvideosmodels",
"ListVideosModelsRequestTypedDict": ".listvideosmodels",
+ "ListWorkspacesGlobals": ".listworkspaces",
+ "ListWorkspacesGlobalsTypedDict": ".listworkspaces",
+ "ListWorkspacesRequest": ".listworkspaces",
+ "ListWorkspacesRequestTypedDict": ".listworkspaces",
+ "ListWorkspacesResponse": ".listworkspaces",
+ "ListWorkspacesResponseTypedDict": ".listworkspaces",
"SendChatCompletionRequestGlobals": ".sendchatcompletionrequest",
"SendChatCompletionRequestGlobalsTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequest": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequestTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponse": ".sendchatcompletionrequest",
- "SendChatCompletionRequestResponseBody": ".sendchatcompletionrequest",
- "SendChatCompletionRequestResponseBodyTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest",
"UpdateGuardrailGlobals": ".updateguardrail",
"UpdateGuardrailGlobalsTypedDict": ".updateguardrail",
@@ -964,6 +1085,10 @@
"UpdateKeysRequestTypedDict": ".updatekeys",
"UpdateKeysResponse": ".updatekeys",
"UpdateKeysResponseTypedDict": ".updatekeys",
+ "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/createembeddings.py b/src/openrouter/operations/createembeddings.py
index 3872d32..e0efba7 100644
--- a/src/openrouter/operations/createembeddings.py
+++ b/src/openrouter/operations/createembeddings.py
@@ -323,6 +323,35 @@ 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"""
+ 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"""
+
+ 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 +361,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 +377,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 @@ def serialize_model(self, handler):
"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/createresponses.py b/src/openrouter/operations/createresponses.py
index e92bbc2..db9db18 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 @@
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,10 @@ class CreateResponsesRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
+ x_open_router_experimental_metadata: NotRequired[
+ components_metadatalevel.MetadataLevel
+ ]
+ r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`."""
class CreateResponsesRequest(BaseModel):
@@ -115,19 +122,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_experimental_metadata: Annotated[
+ Annotated[
+ Optional[components_metadatalevel.MetadataLevel],
+ PlainValidator(validate_open_enum(False)),
+ ],
+ pydantic.Field(alias="X-OpenRouter-Experimental-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`."""
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/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/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/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/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/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/sendchatcompletionrequest.py b/src/openrouter/operations/sendchatcompletionrequest.py
index ef5ccb0..a5d2f96 100644
--- a/src/openrouter/operations/sendchatcompletionrequest.py
+++ b/src/openrouter/operations/sendchatcompletionrequest.py
@@ -5,6 +5,7 @@
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 @@
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,10 @@ class SendChatCompletionRequestRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
+ x_open_router_experimental_metadata: NotRequired[
+ components_metadatalevel.MetadataLevel
+ ]
+ r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`."""
class SendChatCompletionRequestRequest(BaseModel):
@@ -115,19 +122,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_experimental_metadata: Annotated[
+ Annotated[
+ Optional[components_metadatalevel.MetadataLevel],
+ PlainValidator(validate_open_enum(False)),
+ ],
+ pydantic.Field(alias="X-OpenRouter-Experimental-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`."""
SendChatCompletionRequestResponseTypedDict = TypeAliasType(
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/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/responses.py b/src/openrouter/responses.py
index 4844bc0..6d76ae5 100644
--- a/src/openrouter/responses.py
+++ b/src/openrouter/responses.py
@@ -25,6 +25,7 @@ def send(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
@@ -112,6 +113,7 @@ def send(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param background:
: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.
@@ -160,6 +162,7 @@ def send(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
@@ -247,6 +250,7 @@ def send(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param background:
: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.
@@ -294,6 +298,7 @@ def send(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
@@ -381,6 +386,7 @@ def send(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param background:
: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.
@@ -435,6 +441,7 @@ def send(
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_experimental_metadata=x_open_router_experimental_metadata,
responses_request=components.ResponsesRequest(
background=background,
frequency_penalty=frequency_penalty,
@@ -570,7 +577,7 @@ def send(
return eventstreaming.EventStream(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.CreateResponsesResponseBody
+ raw, components.ResponsesStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
@@ -696,6 +703,7 @@ async def send_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
@@ -783,6 +791,7 @@ async def send_async(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param background:
: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.
@@ -831,6 +840,7 @@ async def send_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
@@ -918,6 +928,7 @@ async def send_async(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param background:
: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.
@@ -965,6 +976,7 @@ async def send_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ x_open_router_experimental_metadata: Optional[components.MetadataLevel] = None,
background: OptionalNullable[bool] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
image_config: Optional[
@@ -1052,6 +1064,7 @@ async def send_async(
: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_experimental_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.
:param background:
: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.
@@ -1106,6 +1119,7 @@ async def send_async(
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ x_open_router_experimental_metadata=x_open_router_experimental_metadata,
responses_request=components.ResponsesRequest(
background=background,
frequency_penalty=frequency_penalty,
@@ -1241,7 +1255,7 @@ async def send_async(
return eventstreaming.EventStreamAsync(
http_res,
lambda raw: utils.unmarshal_json(
- raw, operations.CreateResponsesResponseBody
+ raw, components.ResponsesStreamingResponse
).data,
sentinel="[DONE]",
client_ref=self,
diff --git a/src/openrouter/sdk.py b/src/openrouter/sdk.py
index 43d1636..4fa565c 100644
--- a/src/openrouter/sdk.py
+++ b/src/openrouter/sdk.py
@@ -30,7 +30,10 @@
from openrouter.organization import Organization
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,6 +43,10 @@ class OpenRouter(BaseSDK):
analytics: "Analytics"
r"""Analytics and usage endpoints"""
+ tts: "Tts"
+ r"""Text-to-speech endpoints"""
+ stt: "Stt"
+ r"""Speech-to-text endpoints"""
o_auth: "OAuth"
r"""OAuth authentication endpoints"""
chat: "Chat"
@@ -66,8 +73,12 @@ class OpenRouter(BaseSDK):
beta: "Beta"
video_generation: "VideoGeneration"
r"""Video Generation endpoints"""
+ workspaces: "Workspaces"
+ r"""Workspaces endpoints"""
_sub_sdk_map = {
"analytics": ("openrouter.analytics", "Analytics"),
+ "tts": ("openrouter.tts", "Tts"),
+ "stt": ("openrouter.stt", "Stt"),
"o_auth": ("openrouter.oauth", "OAuth"),
"chat": ("openrouter.chat", "Chat"),
"credits": ("openrouter.credits", "Credits"),
@@ -82,6 +93,7 @@ class OpenRouter(BaseSDK):
"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..d079f5a 100644
--- a/src/openrouter/video_generation.py
+++ b/src/openrouter/video_generation.py
@@ -22,6 +22,7 @@ def generate(
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]]
@@ -34,7 +35,10 @@ def generate(
]
] = None,
provider: Optional[
- Union[components.Provider, components.ProviderTypedDict]
+ Union[
+ components.VideoGenerationRequestProvider,
+ components.VideoGenerationRequestProviderTypedDict,
+ ]
] = None,
resolution: Optional[components.Resolution] = None,
seed: Optional[int] = None,
@@ -58,6 +62,7 @@ def generate(
: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.
@@ -87,6 +92,7 @@ def generate(
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]]
@@ -98,7 +104,7 @@ def generate(
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 @@ async def generate_async(
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]]
@@ -229,7 +236,10 @@ async def generate_async(
]
] = None,
provider: Optional[
- Union[components.Provider, components.ProviderTypedDict]
+ Union[
+ components.VideoGenerationRequestProvider,
+ components.VideoGenerationRequestProviderTypedDict,
+ ]
] = None,
resolution: Optional[components.Resolution] = None,
seed: Optional[int] = None,
@@ -253,6 +263,7 @@ async def generate_async(
: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.
@@ -282,6 +293,7 @@ async def generate_async(
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]]
@@ -293,7 +305,7 @@ async def generate_async(
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..a1caa14
--- /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 and hyphens only)
+ :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 and hyphens only)
+ :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
+ :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
+ :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" },