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 677cd89..4399181 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: 893ba77d8f0b95f17c64e730e742b555
+ docChecksum: 1807bf50cd11992cd56391054618d0d2
docVersion: 1.0.0
speakeasyVersion: 1.680.0
generationVersion: 2.788.4
- releaseVersion: 0.8.1
- configChecksum: 279b27abe296fa6bfe551f52239bab5f
+ releaseVersion: 0.9.0
+ configChecksum: 45f314c90efc3cbb8bc7916a985dd5bc
+ repoURL: https://github.com/OpenRouterTeam/python-sdk.git
+ installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 2c909214-6948-4db1-a5d8-a3102342af78
- pristine_commit_hash: 8ad096495e3922d56a78c6eaedba33335dbcbf61
- pristine_tree_hash: cba26443b885aefd901c33db387686b99ed1fd3a
+ generation_id: 1b1a22ef-25ef-48f3-a753-703b11780990
+ pristine_commit_hash: b0d508fd2c1f91da500ae3c72ea8979ae30331b1
+ pristine_tree_hash: bcf1b6863d6dfb01db01b192ea9555a5dcd70a29
features:
python:
acceptHeaders: 3.0.0
@@ -22,6 +24,7 @@ features:
defaultEnabledRetries: 0.2.0
deprecations: 3.0.2
devContainers: 3.0.0
+ downloadStreams: 1.0.1
enumUnions: 0.1.0
envVarSecurityUsage: 0.3.2
flatRequests: 1.0.1
@@ -38,6 +41,7 @@ features:
nameOverrides: 3.0.1
nullables: 1.0.1
openEnums: 1.0.1
+ pagination: 3.0.7
responseFormat: 1.0.1
retries: 3.0.3
sdkHooks: 1.2.0
@@ -48,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
@@ -68,44 +72,68 @@ trackedFiles:
pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae
USAGE.md:
id: 3aed33ce6e6f
- last_write_checksum: sha1:728fda97a79965b16763fbb5cff3995707cfa49b
- pristine_git_object: dfa6a258c2659706820dfd651346659b76006691
+ last_write_checksum: sha1:d70160e42e737f03bca79873bae8e91ae2b585d1
+ pristine_git_object: 9c1506b8f539140db04b239d7a84d8b599747932
docs/components/action.md:
id: 6b3978ee918f
last_write_checksum: sha1:7026f076ddcf89df8f64180c1f6c55b42e642083
pristine_git_object: 7e76bbedc5fe8e969ccce0ce12a07dd89e2d740b
+ docs/components/actionenum.md:
+ id: 608bbbe865bb
+ last_write_checksum: sha1:b7b7984fc2930c3a7be17c2f731e9ced7f8432c5
+ pristine_git_object: 80966ca1792422be02beb5f879d9f15e0ec9388b
docs/components/actionfindinpage.md:
id: 88f0962aff68
- last_write_checksum: sha1:1a2c33bd277a0df8eb86bc64abb81c4cfc4da9cc
- pristine_git_object: 7ddbd3d16c5c28b5ef7483e6170d2456ca14c090
+ last_write_checksum: sha1:6cb79624f6c2ecba637c70ba8a95904e43d598f6
+ pristine_git_object: e9eb5e8cbb42c0c7b6cdd00591453bc23a579d90
docs/components/actionopenpage.md:
id: 0956df8f10e4
last_write_checksum: sha1:88d726e5b59287d1ff171621cbf0d16ea9d5d9da
pristine_git_object: 0401058dca54568c8f2e686e4e82e0f40e0445cf
docs/components/actionsearch.md:
id: 8cee1325fe56
- last_write_checksum: sha1:4d60f45a3beaee68aedba2acc7609e793bf0d932
- pristine_git_object: fbb7847d08ad0f59ac5587a01ba88ae504da9d79
+ last_write_checksum: sha1:69b2b7b0c8f67d42c1db23642fd622af2d9f7c2b
+ pristine_git_object: 994ad66e550cb9478fe4419d05dba8024b752af7
docs/components/activityitem.md:
id: 3a8beda39814
- last_write_checksum: sha1:740ef40ee2491b99f8a0d1c7e78f48cbc2d8e134
- pristine_git_object: 570bc5289c4c5ed3debe6d45e44c7d2a341dbbc6
+ last_write_checksum: sha1:c91cff73639d4b52bea337fc8110c840684b247f
+ pristine_git_object: 9cbfb1a7ebd05af4ffa7a514dc1348ef4637efb1
+ docs/components/activityresponse.md:
+ id: b97e402ef453
+ last_write_checksum: sha1:8e2b1926246a5204656dc0e027ced41e5ab8509b
+ pristine_git_object: 3e901718f78569d175db37fb6bdbc84733dd8d61
docs/components/allowedtools.md:
id: b6010d1cddfb
- last_write_checksum: sha1:21004e414e39fe4ebe69734d3b8267fea2805b44
- pristine_git_object: f8ca32c5a355b4a3d7509a30d01fd055075488cf
+ last_write_checksum: sha1:db3b637b995692cfa85a489b704a63156138c8cd
+ pristine_git_object: 3dd69cca1b0896871de5a651e005d4675e74ec99
+ docs/components/allowedtoolsunion.md:
+ id: 751852518b1f
+ last_write_checksum: sha1:8ab3ad15765921302f2c9a9a02953069e7fdac9d
+ pristine_git_object: 1be45074b7fd2f1e42db30f70cb43874f6ff1afc
docs/components/always.md:
id: 60d5b0ff8f83
last_write_checksum: sha1:04684b9e3eea071da9938b3e1deed152f845a0e2
pristine_git_object: a7a7fd1155f474f4c45ce17e4d678ad2736153b2
docs/components/annotationaddedevent.md:
id: 7639957f7faf
- last_write_checksum: sha1:ceec0784caeee9e52686425593ae1c93a0ed6e53
- pristine_git_object: 6a02fd8e0f622848fcfb1034fa3c4c8ac386a070
+ last_write_checksum: sha1:fb9a7f6efa4a47ea2b1c6a48c55c087c21fa11e0
+ pristine_git_object: 6f92c1051f01c485787e89f13ad00c7ca0822ab8
docs/components/annotationaddedeventtype.md:
id: 11b3c6c877d0
last_write_checksum: sha1:4d8fae9c0de452c9ee796eeab63d242e4feb8497
pristine_git_object: 4840df7f7005389811fae7c8868ad8d6c1efcd18
+ docs/components/anthropiccachecontroldirective.md:
+ id: 3bdd9daf51d9
+ last_write_checksum: sha1:5fb9adeb019b713045bd59caa06950067644b0c5
+ pristine_git_object: 9dbc2830cb4cd675922e2070c34af86530597666
+ docs/components/anthropiccachecontroldirectivetype.md:
+ id: a20a54545fe3
+ last_write_checksum: sha1:467772e8b5b227b4e80b0600d3ed275aeb2ea210
+ pristine_git_object: a08e83446faeb323ccbeb06f7da8ceed71fa3c11
+ docs/components/anthropiccachecontrolttl.md:
+ id: 980004cae93f
+ last_write_checksum: sha1:6f66927f536c351dcfbb940672511bd8a6fdd1a0
+ pristine_git_object: 32e8fd42002d9379fa207d0867b428c443a63a42
docs/components/applypatchservertool.md:
id: 924a4805520a
last_write_checksum: sha1:f87ee16357b393e199bf0a4ba74e02130f1f243b
@@ -116,8 +144,20 @@ trackedFiles:
pristine_git_object: 60aec019e3cecb47bfd388f0e049af9956b6acc8
docs/components/architecture.md:
id: 40a5f2f0b4f3
- last_write_checksum: sha1:5234a3e282842878aed117ed3791d600d6f5e812
- pristine_git_object: f646f15601b53bb6908f4105b6c773c7752855d1
+ last_write_checksum: sha1:1edafecb76992fb1ef8201d9686a011a805431f2
+ pristine_git_object: 335e0104f7f12774a22886876bde455234e7ea9b
+ docs/components/aspectratio.md:
+ id: fc8c3ccdb468
+ last_write_checksum: sha1:e03bcf5c3643e7e49e4d02657727162d4c116b1f
+ pristine_git_object: bef16665425b5a80ba08db0f55a0aa90d33c5e43
+ docs/components/autorouterplugin.md:
+ id: ebc3c78144c1
+ last_write_checksum: sha1:dd7c45de7c791dfd33d9fd1a89adc12cd26f6608
+ pristine_git_object: b268d650c1272ab43b00f44d4703650bb6bb13a3
+ docs/components/autorouterpluginid.md:
+ id: a871b7b2af66
+ last_write_checksum: sha1:f9df41065f2d4eaf35a8d24a54a3824d17e12284
+ pristine_git_object: 350b1e9c7a237364a36740e7737db408de1fba50
docs/components/background.md:
id: d5d845f5b5f5
last_write_checksum: sha1:9221c224fd1b8e9c50e5eda1ed6fe78c47221f96
@@ -132,40 +172,16 @@ trackedFiles:
pristine_git_object: c36a56e67887463f6f0d3cb9ccf2a3080e6135d7
docs/components/baseinputscontent1.md:
id: fd111ee7994f
- last_write_checksum: sha1:179553080c11a6f3fd1a16b4518e23f723ab908a
- pristine_git_object: 9e4ef2ce4732ab9087a97d758a531800edcd634c
+ last_write_checksum: sha1:06ee5dcc9c33e964906b33ab02bf44de85b7c670
+ pristine_git_object: 857c7fa0790891fd854c6116abce0929e03c8039
docs/components/baseinputscontent2.md:
id: 5dec0fa82eb2
last_write_checksum: sha1:c7e158b4269d0ad5effc325530330773e5dac5fe
pristine_git_object: 3a50f11305760fd431ab50a1f7ff3d63057ff4dd
- docs/components/baseinputscontent3.md:
- id: 72010566fea7
- last_write_checksum: sha1:390e15e7cb9b35bb0844baae3b5974a16360df63
- pristine_git_object: 82b7f2279076989af6a5bdaadfced9cc528f92eb
- docs/components/baseinputsfunctioncall.md:
- id: 018a5dc1a6db
- last_write_checksum: sha1:d0e7d85d2eb9eee524543effe916f9002e8f9372
- pristine_git_object: 586017007a62f42b67ecde05ab36e4cb38f3461a
- docs/components/baseinputsfunctioncalloutput.md:
- id: 99b54ddb792a
- last_write_checksum: sha1:0c81aca42e763c626ebaf0c61a903f1259a98382
- pristine_git_object: 7902112b98e87dea1ea84e09a1ad3c7e0edf0570
- docs/components/baseinputsmessage1.md:
- id: ac9a6b11f779
- last_write_checksum: sha1:4027e18a15ab26fb4cdd15d7aecff6b56eaf2b1c
- pristine_git_object: 647fec64eb6508b81b800c1cc27ca5cf42e16440
- docs/components/baseinputsmessage2.md:
- id: 5835b8daefa4
- last_write_checksum: sha1:1088072f9cf6ef4c1d690a61d166cbd7ecc429fb
- pristine_git_object: 41bdc483c9a254715dcc90559e6fefd20cd7d9e7
- docs/components/baseinputsoutput1.md:
- id: 534f5092590e
- last_write_checksum: sha1:b9b7c7f6cf91110f40d7589216b9af0a8dac642e
- pristine_git_object: ef33b86f3246f0c693462f4f6a2d08e287af46cd
- docs/components/baseinputsoutput2.md:
- id: 34e745a5fd0d
- last_write_checksum: sha1:28f780924bbcf1e07b25f372df62ba7858cf1a78
- pristine_git_object: 5b9f38e9b60d616b323b0bc787a16f076a9d3880
+ docs/components/baseinputsmessage.md:
+ id: f6cc4cee483a
+ last_write_checksum: sha1:10e3d02668d65f254c848bfb8e9603db5f12ae0a
+ pristine_git_object: 132bedb83903245839c7780b0dbffbc399d87b01
docs/components/baseinputsphasecommentary.md:
id: fd174d25ec7e
last_write_checksum: sha1:2aad888ade690360b53ed260c4bfe8b6fea83b25
@@ -182,74 +198,74 @@ trackedFiles:
id: 3856d979d190
last_write_checksum: sha1:5cd5965071cffb1ffc1b642e671c38509aade865
pristine_git_object: b761d8327effaaad85ef1142cfa44ac02f1614b8
- docs/components/baseinputsroledeveloper1.md:
- id: 4af560b86e62
- last_write_checksum: sha1:4dfdadf0013455c1ac0c340b5b10ce0728e13a58
- pristine_git_object: 0525db8ec170217ad1feffb6e5553000f5e5cc14
- docs/components/baseinputsroledeveloper2.md:
- id: 5b865c6db5b9
- last_write_checksum: sha1:e7831e14552eabaac3f0629b5a62df73861dae2d
- pristine_git_object: f2af3d42836d60336533c48ed85a4d89fa5bd9b7
- docs/components/baseinputsrolesystem1.md:
- id: 4a750f0b5f56
- last_write_checksum: sha1:7d42710e4f9e0eecb04bb1d2c20a46968caf09b5
- pristine_git_object: 35cbac56d9c3be090ca24c4006d94241961743cd
- docs/components/baseinputsrolesystem2.md:
- id: 6f40703c1f5e
- last_write_checksum: sha1:f0fe769b49098a7613b8667d519bc04910c0edf6
- pristine_git_object: 7bebef9d04d1ca6625bec0464ef99458e1cc8d51
- docs/components/baseinputsroleunion1.md:
- id: 722714c37d5a
- last_write_checksum: sha1:f90223243f0c999ecc301ef7ad133482b99d3fb8
- pristine_git_object: 70c5d035f11631d2e62108b83e58c0e02cec8de0
- docs/components/baseinputsroleunion2.md:
- id: cb0c3c0a8915
- last_write_checksum: sha1:e568bf7c6897f3014d2bc59b2836a0bb5c326a0f
- pristine_git_object: 7b8a1eeee81a8e9d7bc38be88e7da0a7e1c9c965
- docs/components/baseinputsroleuser1.md:
- id: cf8fee985612
- last_write_checksum: sha1:4c0707761520efbae8440356d02e8819b76c6f1c
- pristine_git_object: e852eab35cf2f239218d21206d7c7eac2fd2b69d
- docs/components/baseinputsroleuser2.md:
- id: 9281bf01bfb5
- last_write_checksum: sha1:96314e1a966bc26887e8c9cc5c753b6a8eb6d36f
- pristine_git_object: 021e897af5dbc7236a6db06936c222084c210cbb
- docs/components/baseinputstypefunctioncall.md:
- id: 4c8e161f01c5
- last_write_checksum: sha1:0af13c5f3dc5b049a0769740726410687727df55
- pristine_git_object: 05c3b4b39de3674f263cd97091d5f7c90068284d
- docs/components/baseinputstypefunctioncalloutput.md:
- id: 0fb86dc33a95
- last_write_checksum: sha1:43a58a949a1c94751aa94207a5b750a88b105d24
- pristine_git_object: 6ecf6c2cee1440840c4db0e462266ec115251251
- docs/components/baseinputstypemessage1.md:
- id: c4f5fb69f7fd
- last_write_checksum: sha1:a2832bb6f3666db5326a5a69a8f2f05c2f0f21e2
- pristine_git_object: 5a4639fca575fa0c60c5d4175f6e2c64ae9406f4
- docs/components/baseinputstypemessage2.md:
- id: 9a694889303a
- last_write_checksum: sha1:55398d179622bd8f92558cc3db01af8fb87ded8d
- pristine_git_object: bbdc707584afb6bcd4ce1b2739b9ddd7e3ce2324
+ docs/components/baseinputsroledeveloper.md:
+ id: 6c6fdfa52ca0
+ last_write_checksum: sha1:0a37384391e1b01b871a7e949677e9669dd2ca70
+ pristine_git_object: b0343ac922881cbab9a12dfc13f25c9d4fb03ac2
+ docs/components/baseinputsrolesystem.md:
+ id: b72d6c1fdcb2
+ last_write_checksum: sha1:bad507026a59cd1249d12d743e1e3a32802dc290
+ pristine_git_object: 705081649384c7934924ba076f662972bb3c585f
+ docs/components/baseinputsroleunion.md:
+ id: f86db5bfaae1
+ last_write_checksum: sha1:0d8bdfdd670d40b3b27df27a1d583bccf8dea24a
+ pristine_git_object: e0bcefa062a8eb8a69115ff9d9132664dc266272
+ docs/components/baseinputsroleuser.md:
+ id: 1b2272afb28d
+ last_write_checksum: sha1:d847535256c934d2a0cf996bdefb40c37e6ec407
+ pristine_git_object: 323c14b40df675719ed15a22b0603c05de3c19c5
+ docs/components/baseinputstype.md:
+ id: db4b15943a1c
+ last_write_checksum: sha1:89b2a0462a9d5d4d177d62768229e2088dc88406
+ pristine_git_object: 3ede5b958cfa644256657638490affa94899d0b9
docs/components/baseinputsunion.md:
id: b93f8e6d22a2
last_write_checksum: sha1:d1699f886c2801cb4e96b6e1710c7415e6283589
pristine_git_object: 2d7597f6a1250fa1b35dc5853f25a0ce1cdfb286
docs/components/baseinputsunion1.md:
id: 3b291815d087
- last_write_checksum: sha1:3deb8670d031af53674840e7b2c23240c1ba9194
- pristine_git_object: 35fd8ee614341a129163d9443eea11d7dbeddc4c
+ last_write_checksum: sha1:395f8da0635022842bf2152f149506b56ed3a357
+ pristine_git_object: 4664a9aa60de0b185ed5bccab4ccf20dfd371fcf
docs/components/basereasoningconfig.md:
id: c161e7a17271
- last_write_checksum: sha1:8ad7ecc126941b046e74cde51a442f0694af044c
- pristine_git_object: b828082a59e81314881897276b663724c637f77c
+ last_write_checksum: sha1:4f3c5e5dda570bb87ec7e2deff31e2372f36b833
+ pristine_git_object: 031166f6d79ea3ef1781e95468197271da98738f
+ docs/components/bulkassignkeysrequest.md:
+ id: 66e9231f0c3c
+ last_write_checksum: sha1:7c4564346bbe9f2692053bb1d518972a9db5ad0e
+ pristine_git_object: dc3200c166b6953272e09ebda3f938eae4bb96a4
+ docs/components/bulkassignkeysresponse.md:
+ id: b27f665882ba
+ last_write_checksum: sha1:da6afebdf00235e49b1fc387209eb8b8b2f6d6e4
+ pristine_git_object: 37b82b9e69b9eeb3f3c00b981003b0616420b61a
+ docs/components/bulkassignmembersrequest.md:
+ id: 6cb19834162c
+ last_write_checksum: sha1:b66155e4a06bd57879d4431d5631e3d3cbd3f343
+ pristine_git_object: 9248f05c534c6b12831004e409d160a66021b8e8
+ docs/components/bulkassignmembersresponse.md:
+ id: 04b004029650
+ last_write_checksum: sha1:64d50ed55132163d6d6337f53e7a97f7fbbdacbd
+ pristine_git_object: 2d6897c459041c7d09ec0260ec7fe56efaa4584e
+ docs/components/bulkunassignkeysrequest.md:
+ id: 6d254be079fd
+ last_write_checksum: sha1:c61da3563e04a493e6b1b72e0f8e5f3f6f6075e8
+ pristine_git_object: ea9b9b2a75f9cfcdf15f61b6112e5dbebba26449
+ docs/components/bulkunassignkeysresponse.md:
+ id: edef516726d1
+ last_write_checksum: sha1:184f26fac34f1215c9db3fd5b7472f430fef5692
+ pristine_git_object: 5ed2cfdc8e2c73c6216a95dfbe56a03a7e647ce5
+ docs/components/bulkunassignmembersrequest.md:
+ id: 0f45518f8ff5
+ last_write_checksum: sha1:6c1c57a7a3b5b54c7e0d4abcc4ba94ea4cd918c2
+ pristine_git_object: 98e6c00fa67575f503236d92f26a9aa0024cab3c
+ docs/components/bulkunassignmembersresponse.md:
+ id: 77eb83663414
+ last_write_checksum: sha1:119b447d7ce2042404b3879a5445640d90e67cc2
+ pristine_git_object: b0ce35cdbca7e49ed6691f87c2481ad9060df225
docs/components/by.md:
id: 1bcedb5155b3
last_write_checksum: sha1:e71a7e5b233d761921f330ae499a73024aa4a0a5
pristine_git_object: 557c891217e953757e8385a4b54a50d4528ea91a
- docs/components/cachecontrol.md:
- id: 77f6aeeabc53
- last_write_checksum: sha1:e43f4beb0ce9189215ea930bd35771775bb8cb2c
- pristine_git_object: 07ddac012a71fbe21ac4b5ec94a63054a9cc8bb4
docs/components/chatassistantimages.md:
id: f1f776b0c4ae
last_write_checksum: sha1:05697e4bc0690cabd72965d01519102c149f6363
@@ -260,8 +276,8 @@ trackedFiles:
pristine_git_object: ef9412d5a9edda1a0d572a7204f643c57e95c1cb
docs/components/chatassistantmessage.md:
id: 873a0a8e5d40
- last_write_checksum: sha1:781ef36eb333fc16518fb9ad4ab0f12787c5c080
- pristine_git_object: 10e8b2cfcb9effe8128f67c94610aa3e7723fd1a
+ last_write_checksum: sha1:8197b175489cb3351551bff144a0caa89e32aadb
+ pristine_git_object: 3fe2de5bdaf311a915b0bccf9137e73c1d3b4d07
docs/components/chatassistantmessagecontent.md:
id: ae1f4d3d6315
last_write_checksum: sha1:0ad5b85eade6a1da7eb7360e87915672ac875c0c
@@ -272,16 +288,16 @@ trackedFiles:
pristine_git_object: 07389e76411f893ce1cdc65d5eabb2afb0131355
docs/components/chataudiooutput.md:
id: aba7fc0396f7
- last_write_checksum: sha1:bac65ae17cc8119caa6409bb1e7bc11a159e5041
- pristine_git_object: ac7cff58ed8a96f74774ce1df5fbda99edb45a0b
+ last_write_checksum: sha1:b5f27e597e7134983b98e14545fede46887941ab
+ pristine_git_object: e03643e858971e11e14cc707090beed5d15d6ba5
docs/components/chatchoice.md:
id: 5e50b0331a4d
- last_write_checksum: sha1:bdcb578e91cb10d60e9f83680db2f60cacd386ea
- pristine_git_object: 913b1ac51bd17bd4cd685c14fe54ec4b28be55b2
+ last_write_checksum: sha1:96e3532ccbb9cda1b65a1bad04f369aed44cb222
+ pristine_git_object: 6b070a2242dd4d7244870a516e08d3f14d121223
docs/components/chatcontentaudio.md:
id: 4a23b47cbaea
- last_write_checksum: sha1:676f208561f863596231f82801f4fb2cd5fd0f06
- pristine_git_object: 0720a1aa3f414cf2573c0899a71ac2b76d41acbb
+ last_write_checksum: sha1:29b487b16de9cea2c4c804ae1f44fafe9c9cd54c
+ pristine_git_object: 7e3a7178076f7ccbc618b84b7930bb73d3922a4b
docs/components/chatcontentaudioinputaudio.md:
id: 04ffe283799a
last_write_checksum: sha1:10a609317556d4a8845da27336ed885d17407ff4
@@ -292,60 +308,52 @@ trackedFiles:
pristine_git_object: 231efb3e968c2f996556140accea135db41e761b
docs/components/chatcontentcachecontrol.md:
id: f61f7d9f11ca
- last_write_checksum: sha1:bd9b84c088788bd5af66c01cac8f7432187c9eb0
- pristine_git_object: 3cffd63509fae0fbf94bf31824803b8f6c01303a
- docs/components/chatcontentcachecontrolttl.md:
- id: 994e611469c1
- last_write_checksum: sha1:c6bd25bd2e9807d32135cabfeac45f48ccc98bd1
- pristine_git_object: 735d6eab7abb0aca5db4092888b1020a4c8ecd78
+ last_write_checksum: sha1:56218bc22096b0f3996a30ed7eaa85e689e90795
+ pristine_git_object: ae26e674dab87ffa7258e439cadd9b30e8d67122
docs/components/chatcontentcachecontroltype.md:
id: 6c25585d34d7
last_write_checksum: sha1:b18c1e7bf7282bbd6c441d6a48e355c87396b9bc
pristine_git_object: a3776be07310a6e3b87f21d95c2c4701cf15422a
docs/components/chatcontentfile.md:
id: 80de41516310
- last_write_checksum: sha1:69c7ad37ab9e170dbb80afbfd9a776a86f5da738
- pristine_git_object: e6f101daa2c9ac93991d55a85adfcf4b50d4986a
+ last_write_checksum: sha1:8c396bb847ab8ad5508f1c87d3e572a6b9d8739c
+ pristine_git_object: ef68fec62398324b5b9a7446c520a09e786964b9
docs/components/chatcontentfiletype.md:
id: 7ae1de2bd191
last_write_checksum: sha1:65db830e9452261b3abfb55e0c0592babb3f8efa
pristine_git_object: c8f291f2fcb753680e87c704099b0c6b8a731000
docs/components/chatcontentimage.md:
id: 4c6bbbb8fa9e
- last_write_checksum: sha1:90c72bf6981ec47b67762e0f5ac10c1209322e59
- pristine_git_object: 8ac292bc0db951f122ae1623836c21acb2f95ca2
+ last_write_checksum: sha1:ca67df0dbc8d559d37e4319d1b4270e52ea4315e
+ pristine_git_object: 79909c48a34888496f9051cf33899ca1b9a7b4fc
docs/components/chatcontentimagedetail.md:
id: 3f26a1053cda
last_write_checksum: sha1:c074cafc4780c4bc7e6d4a053c886020a89c4e42
pristine_git_object: 9653ab78adb9b8b9ccfcd46d186d4f9c5a2ace85
docs/components/chatcontentimageimageurl.md:
id: 7c66172651cc
- last_write_checksum: sha1:618dc0fbb640e9701ec5e74214907d60c1dbd067
- pristine_git_object: 3759aeca622eea53883d3cfff02c3b8436f1ed29
+ last_write_checksum: sha1:f0382f65b65ec13b0747b9f7ca6aaf235c7d39d4
+ pristine_git_object: e1e9f886d59c9580dd2b0556b737508573ec03d4
docs/components/chatcontentimagetype.md:
id: b92a4757efe6
last_write_checksum: sha1:ce2d8002a22bf03477cbbd88c68fc4eace9b392b
pristine_git_object: 61eaf66e23031854c913dea6315deb99722b3098
docs/components/chatcontentitems.md:
id: 1629a00cba7c
- last_write_checksum: sha1:4b84f29c042bce1e08b567a03d64ff1bfbc79cb5
- pristine_git_object: 518eb027a3f8f57eaa7b160d840b794e442adc30
- docs/components/chatcontentitems1.md:
- id: e22f3b829177
- last_write_checksum: sha1:b55258ca3851cd35b1d183bfb1a91befd94685f5
- pristine_git_object: 0a3577c0698cafb95add4ba99cc88a2697aa9195
+ last_write_checksum: sha1:7ec4eb320950d35184011c923e033b93b674c7d3
+ pristine_git_object: 67154a8559b4f5a715c26c3b85a07bfe1a7eb088
docs/components/chatcontenttext.md:
id: 7cb138e038e3
- last_write_checksum: sha1:96696d51bf5961d4c1d094461b2194036c242d4a
- pristine_git_object: 9b7536182178d5a0554b659ee154c2b4f9c5b1cb
+ last_write_checksum: sha1:a728e8137eb44ac9ca1a564f5d6ed16ed3cf5417
+ pristine_git_object: 2857fcee25f5173c05ec2bf7952e89e6d00a0bca
docs/components/chatcontenttexttype.md:
id: ac89efae2559
last_write_checksum: sha1:dbe556bf72491a11746413bfb84d277623ed6df5
pristine_git_object: cc7444ce57ed92f8df7b4856c431b41205b7b082
docs/components/chatcontentvideo.md:
id: 644f016407a5
- last_write_checksum: sha1:54530f92e12087b402d2bb5d1983ce34bdd0caf1
- pristine_git_object: 0e9555efcbaf49b2f0b85c482a138c013a403123
+ last_write_checksum: sha1:80f59ac3d39149719952eef2275d27fc2e83330e
+ pristine_git_object: 8ddf46e867fef8a82c8dfec15eeddcf16959e94d
docs/components/chatcontentvideoinput.md:
id: 2801ab923042
last_write_checksum: sha1:04fe85c81976c0f9e99d1bace10b18315b62d17e
@@ -360,8 +368,8 @@ trackedFiles:
pristine_git_object: 710b14712a04c14746fce608ff3b3cd96189cc69
docs/components/chatdevelopermessage.md:
id: fcc03e0bec28
- last_write_checksum: sha1:66403b4ed9627821f1e1f39eda9e97fb106e4ec9
- pristine_git_object: 4742e52484e16330497f1f60aef93be3d13f4c65
+ last_write_checksum: sha1:86e0978d5a7dd8d39b2d68cbc5e8ed6482573800
+ pristine_git_object: 873f3a0d1cbd72f1e45bc05386143c205a60a368
docs/components/chatdevelopermessagecontent.md:
id: f57f34c0f41d
last_write_checksum: sha1:859f5db02c1ac1c5c893f93107d074d7da784ed1
@@ -376,16 +384,16 @@ trackedFiles:
pristine_git_object: 3942c0e03d4faffa564408ab97f99118f4453af6
docs/components/chatformatgrammarconfig.md:
id: 69a089aa92bf
- last_write_checksum: sha1:6091c265b2a9fb1e4670341c6debe95a56e1491f
- pristine_git_object: bb09d53865c8c95a1f6f7ccd238adc238db249b7
+ last_write_checksum: sha1:ac3e56e48a49cfd32c1203acc2a0f247dbad11b5
+ pristine_git_object: b97e1fefdbd33922d0c361f5cbdb86abe71c985c
docs/components/chatformatgrammarconfigtype.md:
id: "7259142727e4"
last_write_checksum: sha1:06930e28075aa9b4beaace531e8d1e3488956fa0
pristine_git_object: d61542a3c61384c4b8c656abef985a5761e758ad
docs/components/chatformatjsonschemaconfig.md:
id: d5d317f8b57e
- last_write_checksum: sha1:8926d8ff96309daab632790bbcc9b333d98bf204
- pristine_git_object: 39df5380e986286b8e3778106e5cb97237b1714f
+ last_write_checksum: sha1:f474c44931872d1ebbe3571ea4c965efed988a3b
+ pristine_git_object: eac1cb101f3b105ef17f8855329ee26d61bfa714
docs/components/chatformatjsonschemaconfigtype.md:
id: 5db00c47f9b6
last_write_checksum: sha1:d17911eacf2093ef10378e87c40d7a6eae45643d
@@ -408,32 +416,32 @@ trackedFiles:
pristine_git_object: f3a972b60a63cdb55670cc56cc92eae40578aa87
docs/components/chatfunctiontool.md:
id: 3c79deefdcc0
- last_write_checksum: sha1:4ea7c79cd0df227138741e443ea8b0cf012cf1d1
- pristine_git_object: fce475528b53c9c2083638a6282e4b7a3073c9b4
+ last_write_checksum: sha1:fcebebac15d379db85bb7122175be171d474632d
+ pristine_git_object: 113cb5d442456bcfbeb753cc9c07916d2f48ec77
docs/components/chatfunctiontoolfunction.md:
id: 0de29ccfd817
- last_write_checksum: sha1:835e60076a856e5f6996fea77e51bae60216cb31
- pristine_git_object: 754c2b18aa333ca8c28c5d33140e699cadabdc20
+ last_write_checksum: sha1:0a25d1c9b64f1da2513e9153682848cf41f324b2
+ pristine_git_object: 87d7d1ab7d1ed8bd79b7526ae1fab28e5d853c33
docs/components/chatfunctiontoolfunctionfunction.md:
id: 40ba7785b09a
- last_write_checksum: sha1:2fb9f3abf08bb4e9d4a454fd580593a68ebe6eca
- pristine_git_object: 678446041b4c4659c432016e3d928f70c12cfe41
+ last_write_checksum: sha1:3de4648516e0edfce65f56430f79ac4993acc798
+ pristine_git_object: ac0ce600775accc75afd84515c3d97bdcee221c5
docs/components/chatfunctiontooltype.md:
id: fd79c1a8150a
last_write_checksum: sha1:8180672d9c029ff2e0d2d3b3ae74f20562b6f939
pristine_git_object: f3b7513915d711c6b839126e6fed13f51a5cb5ca
docs/components/chatjsonschemaconfig.md:
id: 27016a1430b7
- last_write_checksum: sha1:2c4009da0dfab19276d8922c9c3d7667031ec873
- pristine_git_object: a46febe1a602460e5d049d3b6a0fae4599650426
+ last_write_checksum: sha1:327875efdcf556fd73b309ef4d1da40e9b18fc86
+ pristine_git_object: 36d33ca4a2734cb6dc70cb3cec5e047548a97f70
docs/components/chatmessages.md:
id: 27dc2c8c0d23
- last_write_checksum: sha1:2f700b68c8fe41008706bb68cb495ebf929a1842
- pristine_git_object: 87805945bd2a5d3aca43d9f7f450df4fca1a0c01
+ last_write_checksum: sha1:0a7de1bb1dba5911955257c068e7f91394a9721b
+ pristine_git_object: ba81886fb54754ea89b2f09c5289d3974a47c442
docs/components/chatnamedtoolchoice.md:
id: b55b10cbe381
- last_write_checksum: sha1:044c823d25ec9336f029c18aa88660a4c5e00659
- pristine_git_object: 9271eadd9496ea2d893b5c32f7a8fa1673963e04
+ last_write_checksum: sha1:b20618c87389e2c42263292d0d7e0df08dc554c6
+ pristine_git_object: 9a1ef4281b35618582c50551c2c241a2995783dd
docs/components/chatnamedtoolchoicefunction.md:
id: ce1786a50c32
last_write_checksum: sha1:b2b6c14545d0b4e23bc4dc9422b356a314620472
@@ -448,156 +456,44 @@ trackedFiles:
pristine_git_object: ca73483767de32b3d83b7f9e2741011e26ac8e59
docs/components/chatrequest.md:
id: 5e0fa9a2cb13
- last_write_checksum: sha1:66eacb25d3127af53b1fa6063a14f8c0753f242f
- pristine_git_object: f414833efac89a2495b7e50ea66abcb31e896116
- docs/components/chatrequestby.md:
- id: 145f80d51a5e
- last_write_checksum: sha1:5c17469562f652c78a5d8ebdf5d3973c4999623c
- pristine_git_object: d0601f6cdf3d3ab003d62350baed05c07f754b75
- docs/components/chatrequestidautorouter.md:
- id: 708031a38d35
- last_write_checksum: sha1:1d7a79a263ea67255064588ac182eb895e6c3259
- pristine_git_object: fbb63203ed2b26e0b49544e121a6aa2939d970cd
- docs/components/chatrequestidcontextcompression.md:
- id: 42cb1055cc61
- last_write_checksum: sha1:420fcf4e889f8d50029c9d93b14dc83ce399fb32
- pristine_git_object: 5db526d4fb869187d80f36b87174980bfce775ae
- docs/components/chatrequestidfileparser.md:
- id: 905ac45722f5
- last_write_checksum: sha1:9697b37c5f98d4f77ec85e3b6a47d91d25ca59e8
- pristine_git_object: bf53cfbc0a85f76f37fc15d746a0b8e6245ebeb4
- docs/components/chatrequestidmoderation.md:
- id: 272558c4d122
- last_write_checksum: sha1:d82828b40ec4651beb3caeb23258bcc77971cf56
- pristine_git_object: 9bcc55e1c73aa8958fe8c368fb1ae0790dbac9fe
- docs/components/chatrequestidresponsehealing.md:
- id: cb6623bda058
- last_write_checksum: sha1:15be004882a4d334a7bcf6b3c4d26a90202b8416
- pristine_git_object: 0f402ceaade2ee8ba624ab316f18723c8e55d30c
- docs/components/chatrequestidweb.md:
- id: c53540f2e04d
- last_write_checksum: sha1:240f0cd315bf49f8c384144c10120957ab74aea7
- pristine_git_object: cc196b65e4df56d684cfbc4a6c4e7d544255ae0f
- docs/components/chatrequestignore.md:
- id: 47c81ff619d6
- last_write_checksum: sha1:84ed01d1010307189777818dceb8d3bef0168f30
- pristine_git_object: f82a39f7f2c38fa2beb4d2aad449b56897f847bc
+ last_write_checksum: sha1:77efa544c98c633849d584c5ec72efd4f48f7aa9
+ pristine_git_object: 27ac21d71a864d740c75060514186f52245c6b89
docs/components/chatrequestimageconfig.md:
id: c307e038f375
last_write_checksum: sha1:ae532a9e8878e6ba9dbcb0d8880591cf89aac53b
pristine_git_object: e4431b693da838310e5abca4d4f2292e5a67f325
- docs/components/chatrequestmaxprice.md:
- id: d648bca2f846
- last_write_checksum: sha1:ba668e6c0ff802f07fb48a939a988ad1460d2577
- pristine_git_object: 04dd3f6a83e7bae119904f05b4140cf39fce5469
- docs/components/chatrequestonly.md:
- id: 378a632426e1
- last_write_checksum: sha1:398bc9193c1b99fccf125870d254be403f5b7290
- pristine_git_object: 8abe7af455596400a53d6e499a64b264ce1e5f29
- docs/components/chatrequestorder.md:
- id: 4c227f85e474
- last_write_checksum: sha1:ce3dac3cfea93ba2d6bcaeb151e055e9283e9ba3
- pristine_git_object: e103b0d98a92f29c853c99c3a8694164cbb6bf3b
- docs/components/chatrequestpartition.md:
- id: 9fd772b85dcb
- last_write_checksum: sha1:c0f875c5f73a93274bbdfd1b60a0cac8093ebc85
- pristine_git_object: 109ad370b4579741729546d0aaa0e26d8ef63cdb
- docs/components/chatrequestpluginautorouter.md:
- id: b581a8cb0d99
- last_write_checksum: sha1:8c5fa0c93d0ed23120d1eef625c445f57ded316f
- pristine_git_object: 6e9af616c0d41c79d5670d06b8c4c68b782bbe11
- docs/components/chatrequestplugincontextcompression.md:
- id: 58502b637b66
- last_write_checksum: sha1:f7dafd9b2ed734a904f281b9210fab81671a1041
- pristine_git_object: bcf9925179dc8a2288a27de6c73ddab2f52da3ac
- docs/components/chatrequestpluginfileparser.md:
- id: 3d5478026158
- last_write_checksum: sha1:a81db3881bc1d13f1baf1dcf7549e793841ca454
- pristine_git_object: 45e22a47159aeff001e0db0b20b7b08fe28cdd24
- docs/components/chatrequestpluginmoderation.md:
- id: 88ff921fc954
- last_write_checksum: sha1:0fdd62f77f54de7988c038a28e047327aae6ac1a
- pristine_git_object: b150582ed34c5cee02c68ab0ec163877c2606c52
- docs/components/chatrequestpluginresponsehealing.md:
- id: a95315777949
- last_write_checksum: sha1:df535e28ec728ed16ecf8eda554f44a75dfc9841
- pristine_git_object: ced37a1ee8ba9221577a47450b3c19771cf67ce7
- docs/components/chatrequestpluginunion.md:
- id: 0cf9523e9e48
- last_write_checksum: sha1:e2edf4433653fd301dd29b3dd55dc9c44fe4a281
- pristine_git_object: e9c2e3819ec26e4551c5534714a200ab1890b7ac
- docs/components/chatrequestpluginweb.md:
- id: b5917f3dd86b
- last_write_checksum: sha1:6d67e191d02ab5effdfb95d84f84036abefa9e63
- pristine_git_object: 297794669b9d952733f32cfc4336bfec66fda712
- docs/components/chatrequestprovider.md:
- id: fbd4a1b3b959
- last_write_checksum: sha1:25427b59357f240088c71527f037410e6163de4e
- pristine_git_object: 3dbddf65d74406cad0e1a8d248955b1a81104611
- docs/components/chatrequestprovidersort.md:
- id: 3e98ea0490bc
- last_write_checksum: sha1:b546da55439650541cad5814b4af900baabcde08
- pristine_git_object: 34834faca3696f5cd2cae69a4499fb518d9f5252
- docs/components/chatrequestprovidersortconfig.md:
- id: da566203cae1
- last_write_checksum: sha1:b2b9241a0db81179ea740f318bf508910161da65
- pristine_git_object: ac2a9dc93fb590cc163335c2c54ee88eb3cbcb93
- docs/components/chatrequestprovidersortconfigenum.md:
- id: 9169fa4c04a6
- last_write_checksum: sha1:3cd504f9f0c13c84896d5f24b8a3eb95a43dd673
- pristine_git_object: c35b72dc64378d10347aa50ab522213093d35480
- docs/components/chatrequestprovidersortconfigunion.md:
- id: f2dd32c19d18
- last_write_checksum: sha1:d8262dc72ffc811360cbf763eedc6de24d27d220
- pristine_git_object: 011fecf6dce6ad751e46ff79a1bfb8d4c7514763
+ docs/components/chatrequestplugin.md:
+ id: 24a908f99472
+ last_write_checksum: sha1:872a0f5dec13b33dac3aba3616a1b45ce5352feb
+ pristine_git_object: 3fcb3f49302af9c7394c00f4946576c5e3ebdabd
docs/components/chatrequestservicetier.md:
id: deaf591bec38
last_write_checksum: sha1:8fa53b0f868c99934b83719b7c0b6b44b1f960eb
pristine_git_object: 13ae40be5e3c883f88789c3b5b74a3b2da4c85c2
- docs/components/chatrequestsortenum.md:
- id: e9acfaa10ac3
- last_write_checksum: sha1:925655dccb42a5d825e85c4ba2412403afbeb049
- pristine_git_object: e31ed0479235d52dfee162471f56328e712ede0f
- docs/components/chatrequestsortunion.md:
- id: b3f6ccd518ea
- last_write_checksum: sha1:53418253f1389b5f11316ba14dbc8c9039310ed5
- pristine_git_object: 5e478000ed387b55b082419f0fa1d5d5336b6622
- docs/components/chatrequesttrace.md:
- id: 6773660e20dd
- last_write_checksum: sha1:7dc73ad5da9b9f5d3fbcb58e6d9e1592d913f956
- pristine_git_object: ca2056810661a041da1fb1cf35c9dffb601e669a
- docs/components/chatrequestttl.md:
- id: c1c7d8cc4b7c
- last_write_checksum: sha1:9a1f6bd610c089b78d72ccd5f6c22491bcb348e4
- pristine_git_object: 84250dbf74a81d75b6ca6db1e0220ee8bcaa13b5
- docs/components/chatrequesttype.md:
- id: 7207888c9692
- last_write_checksum: sha1:a143915b7f6b8c6ae55db165b74534d8ac703346
- pristine_git_object: 09929dd776a74cc340968112c6d25f37ac2a0aac
docs/components/chatresult.md:
id: 212b0f66efd0
- last_write_checksum: sha1:1b9e35af8ee0fb3c943ec69b7f184ba2094a7aee
- pristine_git_object: 48708b3133765c601436a996cebdbb272c774c6e
+ last_write_checksum: sha1:00d612b46dc057645e9f5b56e6ab94e50ffe9728
+ pristine_git_object: b4354698466089e4acfad8dad9d2d61dfb06662e
docs/components/chatresultobject.md:
id: 668504931d18
last_write_checksum: sha1:6d550246aa007a5be94a9788ae4cfdfb75006980
pristine_git_object: d05e8b4f60163be62354a7f84ac449e87b7418ae
docs/components/chatstreamchoice.md:
id: 4267d8be7145
- last_write_checksum: sha1:b33c06b3bdcd8a1845d1cca0d3c5d71ba9fcfc7b
- pristine_git_object: 5c96ff119a2ce5f39d5fa6bcf7491be549b23908
+ last_write_checksum: sha1:0c16659042a36e7c30fa688275537718582a41b8
+ pristine_git_object: 690d74b67239bf7f423039652aea3741c831137e
docs/components/chatstreamchunk.md:
id: 404d264ea22c
- last_write_checksum: sha1:53d9d8127e915f8d8062515fd2284ef6c26a5b42
- pristine_git_object: 2f3e7145c9a28cdd9b2a38a7c13048eea717b681
+ last_write_checksum: sha1:db550d704231305879464bb7ea5d3a00ffbac185
+ pristine_git_object: ead7b7ab994da4a328713d1a42a554bfaaeabfa1
docs/components/chatstreamchunkobject.md:
id: 5393918d9606
last_write_checksum: sha1:0765d94b3d01c811155dce29c20c2ae4bd4abd0e
pristine_git_object: e5c9b9a5c9a9d0604893f8b014d7857aa9d74c1a
docs/components/chatstreamdelta.md:
id: 6a802bee8f3a
- last_write_checksum: sha1:ea466fb7ed74e2e5ac6d2a26efd80b8a9ab5fab6
- pristine_git_object: 113fd7f8f71c679277287981370fc4047f0ae8dd
+ last_write_checksum: sha1:787fe3b23c098d8787d094f852be2e464f484964
+ pristine_git_object: 8788248cd6f5a1456300916fd01b0b25856c0a88
docs/components/chatstreamdeltarole.md:
id: bd41a2e6e1ba
last_write_checksum: sha1:4382019bbc25043a562225a2d54f07d282c65968
@@ -608,20 +504,20 @@ trackedFiles:
pristine_git_object: ade029eea68f198e2d9ca9cb1f377a595f641f35
docs/components/chatstreamtoolcall.md:
id: c82d4d57b836
- last_write_checksum: sha1:6babbebc3eb2edd280857dab486ffd04d43eaf3f
- pristine_git_object: c9c836284eb81aeb9bc311daf014b45ed7c5bbee
+ last_write_checksum: sha1:1ad1d687a17804028b837bedc036ae96f1cb5027
+ pristine_git_object: 35fe73ea17c5b3b3f97d33ec3f8685758c0aa5c0
docs/components/chatstreamtoolcallfunction.md:
id: e68f1b506665
- last_write_checksum: sha1:e87aeb7009616a374b662758dbac40d3d62543d2
- pristine_git_object: 97b24f8ce8aff9bc0933313fcb99c2ec40f5fc90
+ last_write_checksum: sha1:08bc633195508081d4187ce0995e923f3469b1a6
+ pristine_git_object: e623029905e1a87a0162baa4272920d6ab59b13f
docs/components/chatstreamtoolcalltype.md:
id: 1e3b82103eae
last_write_checksum: sha1:817c13c26f8493d94658fe6a9e11faf25d3520e7
pristine_git_object: c78e0564c6a19e3eb9cff4edf0c2e4d86b166a2f
docs/components/chatsystemmessage.md:
id: 19ce58721eeb
- last_write_checksum: sha1:9a942356ffe3c46941006c9afca8ca36b99b9563
- pristine_git_object: fbbf529e06e6057a5a2bfc073104a2cb105be9db
+ last_write_checksum: sha1:947fa8f1aa59ca02e4280b2eaca951ffe4944aa0
+ pristine_git_object: 578937800f24e000af91a085871c7af5c5382844
docs/components/chatsystemmessagecontent.md:
id: 0e4b073ca405
last_write_checksum: sha1:e3a97a8cdfa3ffa72fa16afc0ad2a74e128b2d56
@@ -632,24 +528,24 @@ trackedFiles:
pristine_git_object: 93ea0289f870442b5f7565843744993466933dd9
docs/components/chattokenlogprob.md:
id: 562b5ff8dc1a
- last_write_checksum: sha1:90f700801db29295fc33ec61ce06ad540384cd5e
- pristine_git_object: 3710116f6289a14763b110f45c90cffdddb8033b
+ last_write_checksum: sha1:471424d53f8a2cecf5097751cc8786f8e1abf6f2
+ pristine_git_object: 968793a35e58df8ce0cd6f026c8c8e55497ae035
docs/components/chattokenlogprobs.md:
id: cc600497da20
last_write_checksum: sha1:6581a4b05f8c01ca27a0f24a76d81c704f5c54d1
pristine_git_object: 5c1d509d7e80c65e63344ee815a982b3a321c122
docs/components/chattokenlogprobtoplogprob.md:
id: 2fdca99b1741
- last_write_checksum: sha1:fe74469d8ee9a4275acf04f18144c4e5a84bc275
- pristine_git_object: 58970acd3a36e4bf3b4c11b9139af0db9656e513
+ last_write_checksum: sha1:1c6fbd6ef782acc70ef41a7136c54de4e95be374
+ pristine_git_object: d6898ef9225f786433f4b61a2e1b8bfa25755d4b
docs/components/chattoolcall.md:
id: 5d5bc660b9d0
- last_write_checksum: sha1:b52d6bfe62b301d02fcd1f74f0a1aed5306391ac
- pristine_git_object: 7bee5a00ebe1993b03851edf530ce774ee9d754b
+ last_write_checksum: sha1:3034cd053bf9a0b12953f57186c89b0e338dca5e
+ pristine_git_object: bd8a1576abda8f7a5e2f22d6a3fc7c88ccd2b16d
docs/components/chattoolcallfunction.md:
id: 2b1fbca75a92
- last_write_checksum: sha1:3bde77494db57c666c280033dad7171a66f3ea90
- pristine_git_object: df28f52e4c5c2118f89b943f4aa6beff3fb256c3
+ last_write_checksum: sha1:6619b61e01a0fe5a19cc8f55a8549215ad2e8dbb
+ pristine_git_object: 3ab94e4e0c6210ee4d97f1017fb1ada38d21a3ab
docs/components/chattoolcalltype.md:
id: 4c4350539598
last_write_checksum: sha1:36c09bd5863038de76c0ec7c3f24f6fedc4a380a
@@ -672,8 +568,8 @@ trackedFiles:
pristine_git_object: 7b5f0cc697cfd542198018b03ac66b1b69488cc7
docs/components/chattoolmessage.md:
id: fa2c15e2086b
- last_write_checksum: sha1:a4dc4485b89713597c58c5dd231282a792a72648
- pristine_git_object: f12432a4be887b819044b6cae3a016d9de6ba7dc
+ last_write_checksum: sha1:b76200e3e214b73991d1361a5708a8c8efc9c5cd
+ pristine_git_object: c4ebf7c551f87f0aeb79cceb328002d3b1402b4d
docs/components/chattoolmessagecontent.md:
id: 8e2cb8de51fd
last_write_checksum: sha1:27c24922d9a1cc80988e9734222f5ba5fbc58e48
@@ -684,12 +580,12 @@ trackedFiles:
pristine_git_object: 7eb1791a9153498d5ffffc6b67d3668df59000c2
docs/components/chatusage.md:
id: 72cd0c41ec64
- last_write_checksum: sha1:db3d1a444f9b7c348220c7d5ba8d717c5a9ad458
- pristine_git_object: 51a4dccb09227b05a6d6b088c35bfb5f1383d413
+ last_write_checksum: sha1:ceb141009eac851f231ff66b767ba40627148f3b
+ pristine_git_object: e7312f04590a4a5b31a97597ab4f723f9ff356ef
docs/components/chatusermessage.md:
id: 4ab205b0030b
- last_write_checksum: sha1:15850f82824628c8a3a4d6a9991262c50ba9ab26
- pristine_git_object: 57bb1851ad0f0f273c1672cf86bb5556edf09a24
+ last_write_checksum: sha1:4c87fbc12f54bb5b58526949e3f8ea9c161f8cdf
+ pristine_git_object: 8c298e426888aac7d44cba52583bc82c8ea70132
docs/components/chatusermessagecontent.md:
id: 0cb3b5d5cd65
last_write_checksum: sha1:a4881f57d2a2f0d1746de22507bc4b3733753849
@@ -698,86 +594,22 @@ trackedFiles:
id: f4bb7c635d9f
last_write_checksum: sha1:e99a81c25906e98176a509f4b21a0f339b3758d5
pristine_git_object: 95203396fad26d48c76b23f3481b6167291500e5
- docs/components/chatwebsearchservertool.md:
- id: 0514430ce3ba
- last_write_checksum: sha1:86669504f1df87e4984ebfbf9ba2437a1520dd6c
- pristine_git_object: fc19a2156e954985a49259b94543e562d4659bee
- docs/components/chatwebsearchservertoolengine.md:
- id: f806d2aeaec9
- last_write_checksum: sha1:593986ca523ca814c985c3aaf48c0b088cd4d1cc
- pristine_git_object: 798382a9b483ef4fd689c7c6b6618493026185c8
- docs/components/chatwebsearchservertoolparameters.md:
- id: d3707e1a5a75
- last_write_checksum: sha1:5d36e1e006852c46151430cb5c49fe46f025623a
- pristine_git_object: f63fcf926a242812f80e6afb57e85da6594b9891
- docs/components/chatwebsearchservertoolparameterstype.md:
- id: cd3c94641c78
- last_write_checksum: sha1:aa88f9bc49de759b7b310f4009328ca2b41111ca
- pristine_git_object: 2c08d0b7e94dfe77f5f2aa9a7dff3a1dc8ac9ff2
- docs/components/chatwebsearchservertoolsearchcontextsize.md:
- id: 4a271fbbf387
- last_write_checksum: sha1:1697c197609ff2c45491c12dd64ef0a1d7f20a26
- pristine_git_object: 05640ddb5a65f367d785a85076a8aeec2685f5a8
- docs/components/chatwebsearchservertooltypeopenrouterwebsearch.md:
- id: 839d02a32d9b
- last_write_checksum: sha1:76c2591f6f5425c568b321b46e65869cfab02007
- pristine_git_object: 223c0facc161b26a4eca68577f83065cef482c66
- docs/components/chatwebsearchservertooluserlocation.md:
- id: 6811de95fb87
- last_write_checksum: sha1:a0e00d5d086871a87a40e63c3b723c0c800dda91
- pristine_git_object: a23d00280792e3adf5599f29f658e41b70c1f29e
docs/components/chatwebsearchshorthand.md:
id: 97a5522cf188
- last_write_checksum: sha1:f9fa4cbdc5380d17ff7127434277ccfa428f9059
- pristine_git_object: 951ac28a4aee81b1c9277d1e51e8a0be98abfb8d
- docs/components/chatwebsearchshorthandengine.md:
- id: 2e584b3ec7c1
- last_write_checksum: sha1:d472e1521c6ef9644db34eb958df906e3f760425
- pristine_git_object: 21d190ac9600faffd6152d23db75775606c10127
- docs/components/chatwebsearchshorthandparameters.md:
- id: d59f2cbea9b5
- last_write_checksum: sha1:cca63fca170b1ea8e91fdb6750ee7f4c91edef10
- pristine_git_object: d795a7dabdc566fbaec5fc11bacadc6c58d0be37
- docs/components/chatwebsearchshorthandparametersengine.md:
- id: 7603a3f89ae1
- last_write_checksum: sha1:33a1d49970eaa5c5453d00c06c2c77d4f4325067
- pristine_git_object: c6e3d71424e2a0bcdea407ba2569856eb53a177b
- docs/components/chatwebsearchshorthandparameterssearchcontextsize.md:
- id: 2f86125b6696
- last_write_checksum: sha1:d74061ac7e6c501976bd18fc205df82501662bb9
- pristine_git_object: 4c94f211346c8417f38b4214d1f54f814cd74ff5
- docs/components/chatwebsearchshorthandparameterstype.md:
- id: 408ce47c84b5
- last_write_checksum: sha1:aa80bf76ff85e1d79f2b01f5252e74cfd851705b
- pristine_git_object: ad88c38b66179c06e94c4b12e76c6703db5034e6
- docs/components/chatwebsearchshorthandparametersuserlocation.md:
- id: 6fa6585766eb
- last_write_checksum: sha1:68b9f73c86f4b7460a11ce7649057f51a46f88a0
- pristine_git_object: cc602eb8cc868e68b917eead1fbc8b6235fa4045
- docs/components/chatwebsearchshorthandsearchcontextsize.md:
- id: c520b103ca89
- last_write_checksum: sha1:e3febfeaea5cc0ee84ee2bc2455849686d2c465f
- pristine_git_object: df9a0f64da391e0e5cc88e8777836625dcae81ba
+ last_write_checksum: sha1:3058010c14073b6e201adb7400622a012abfea4e
+ pristine_git_object: 638c8a94151ac17091347e705f6eb35399b70d98
docs/components/chatwebsearchshorthandtype.md:
id: ec8d82e4169d
last_write_checksum: sha1:11a35b858e9630405ffdde10c89e60ed33fbed45
pristine_git_object: de2f86e7af6cc072ccd2af6d71e3babc9b554c4e
- docs/components/chatwebsearchshorthandtypeapproximate.md:
- id: 183e61e759f4
- last_write_checksum: sha1:3322b2f84f08e901db8866b2067e2935f953ae5f
- pristine_git_object: 7c3f41fc2353389d09c1848ad3f67ca86ed8c041
- docs/components/chatwebsearchshorthanduserlocation.md:
- id: f74b75c3882e
- last_write_checksum: sha1:16a02ff0d3d6efc7b9f26a800f2d134aa947470e
- pristine_git_object: 4eff7e63efa6943c4bb234f4e41f4d0f3ed97b2d
docs/components/code.md:
id: a224ebbe4cc9
last_write_checksum: sha1:f505e84ac9a4367e1ffda1f6e03c72c24c15ecbc
pristine_git_object: 86a85544261f8234a7d916e33599270b9d90b059
docs/components/codeinterpreterservertool.md:
id: 289a7f7a2d12
- last_write_checksum: sha1:3b128522eea15f3dc4a9c46ea793e00d9a78d6f2
- pristine_git_object: a82c7d99ad7cb11bedef9f3c9cb7fc31144d8377
+ last_write_checksum: sha1:a14f6246a36a1c36e73d3c3d42abf9e79bf162df
+ pristine_git_object: ede02254b80a4d7af3f3c0413ac36fd363676a60
docs/components/codexlocalshelltool.md:
id: 196880556b4d
last_write_checksum: sha1:56d679292f799f432181fac6ee5d024f74727d0e
@@ -786,22 +618,26 @@ trackedFiles:
id: 6b76cb92f8f3
last_write_checksum: sha1:e0bda1e8fea9942f8831ec3876344728e8d2d404
pristine_git_object: 043aac356e529af550220ec56161439b65d49321
+ docs/components/command.md:
+ id: 53e85119ed43
+ last_write_checksum: sha1:eae4f9ff22f1fb6c5139b9e44a35d0238388a2ea
+ pristine_git_object: 3c45dd0765fa97b40928a609a6bbc0e6092be0fa
docs/components/completiontokensdetails.md:
id: 6b7b08e269a0
- last_write_checksum: sha1:39b1d8dde2029505a93436f1dfcf7ac3875b9684
- pristine_git_object: 1fa23d635d7cbb500d5199b7cc4d9c3eb776073b
+ last_write_checksum: sha1:4da2bc38350c65cf19f2b5dc35d79d2eaffd8c15
+ pristine_git_object: 4a816dc88f20689977ca9d44095ba7e8358c9560
docs/components/compoundfilter.md:
id: 6c881867d341
- last_write_checksum: sha1:3244cc9e031036ce2a18d6f59b49a5e50c1fbdcf
- pristine_git_object: a6cbe94b908a1e5214a2c13122dcc126e1cafd5a
+ last_write_checksum: sha1:0afec796142bbf1dd29d5ae73e6926bfc46c7ab6
+ pristine_git_object: aff15cd55b07298e0fbaa37ad89cee8d26b1cd0b
docs/components/compoundfiltertype.md:
id: 8c913408500a
last_write_checksum: sha1:f08429d6fdf07f9d65321a8d00a72c6286ab1dc6
pristine_git_object: 162ed7159ef543f8b418b2325c75eea6467dd3a9
docs/components/computeruseservertool.md:
id: 68115b3d3921
- last_write_checksum: sha1:87e29fd2d9b5bc8335d8a062b7f6114106d24311
- pristine_git_object: ebcd67dd6e8f47087402097c626aa0330bb489ff
+ last_write_checksum: sha1:2a8d605be8897d6f4e019fa046ef5a123dcb2adf
+ pristine_git_object: cf1bfb52d4bbeebe8744cf8426a0fb16c2d5386f
docs/components/computeruseservertooltype.md:
id: 5957ac538f35
last_write_checksum: sha1:bf2c675ddac5469378b4a378a42496a3ec3bfd82
@@ -820,16 +656,16 @@ trackedFiles:
pristine_git_object: df1116376f912e55b36fa745a431175679413024
docs/components/containerauto.md:
id: 89a8dc079e5d
- last_write_checksum: sha1:981234a3e7562920981506122bb2e21db95b7b74
- pristine_git_object: 2ccdc1e0a9762385f40cfdd4fd1776a0ea9b4dc3
+ last_write_checksum: sha1:1504c81161683ff417806ddb74839797e7a08b91
+ pristine_git_object: df63209599b11bcc887019d5cfc0997071fe8137
docs/components/containertype.md:
id: beda1b89c7a4
last_write_checksum: sha1:f513446b0c8b1cb3a34ed6721bd716536ffbae47
pristine_git_object: 9be5b3ce474de60fa8116325313e5a8d9ebe188d
docs/components/contentpartaddedevent.md:
id: 46c34edca7cc
- last_write_checksum: sha1:36654eb79506a3c2fbf0c0ffd06adfb4f5837f19
- pristine_git_object: 3c110f507c15c42be50e7b1da7fe014bcb709fcb
+ last_write_checksum: sha1:d92174df5be607cd3c387504774864c6c80e7899
+ pristine_git_object: a89190b31c4f1e480719f22ceaacbee7a1c0de5c
docs/components/contentpartaddedeventpart.md:
id: 65797fea2a6a
last_write_checksum: sha1:6f3b68d1a22f7d690e3ea2ce1db2af74750f4953
@@ -840,8 +676,8 @@ trackedFiles:
pristine_git_object: fa5229a68a69489db870b32e5cb58e5e9e707ec0
docs/components/contentpartdoneevent.md:
id: 4c409e055805
- last_write_checksum: sha1:e0112dbe2763481f1d8d56c6a219d10cf760b26f
- pristine_git_object: 8b828dcc294c7b48e6e0c9bfe8f0eba4dc930225
+ last_write_checksum: sha1:5d6a3d850c8a4571937b891efd7ff368c8f11f7d
+ pristine_git_object: 7cccc9ecd85b2c6c18b792c8a361ac62ea10bf0a
docs/components/contentpartdoneeventpart.md:
id: 4e2036cbdd2f
last_write_checksum: sha1:461683c3f5f96c458c5d88e87b7876138b1ae22d
@@ -850,50 +686,82 @@ trackedFiles:
id: "859167485170"
last_write_checksum: sha1:f35a10d5fc1856fbbf28ee1f64ab43d288c8328b
pristine_git_object: 53a335d9b3cd971a3b24e4759234f987e3499679
+ docs/components/contentpartimage.md:
+ id: 04fd5d4395fa
+ last_write_checksum: sha1:22e4320a6ba2134948a97ffe35280304b4880fad
+ pristine_git_object: bd630073495ea820141ad7bca9cc137612f044ec
+ docs/components/contentpartimageimageurl.md:
+ id: 6352f603f663
+ last_write_checksum: sha1:71d48852b6dfb295d658462e07c52684e2e59431
+ pristine_git_object: 06ae1d1add91be985a996ba8e8356cc9c0b970d2
+ docs/components/contentpartimagetype.md:
+ id: 7b799c2f4203
+ last_write_checksum: sha1:77ad88cf178e7ba6ec27eb2ab17bad7473668a6b
+ pristine_git_object: a63a040363df5d6da9d336daeb354a87a73e531f
docs/components/contextcompressionengine.md:
id: de089ca4a588
last_write_checksum: sha1:4dee80dba0a801d9d6aec487235a39d548744372
pristine_git_object: aa78a36053e7d254e90281ce6432b84221badc36
+ docs/components/contextcompressionplugin.md:
+ id: ad9a51a0a85d
+ last_write_checksum: sha1:40459f7417d59618b7e2f8b16f1a9c879d1d8396
+ pristine_git_object: 2f8c52d5776546ba81a9a789baf6e74981792507
+ docs/components/contextcompressionpluginid.md:
+ id: 1946fe4536f3
+ last_write_checksum: sha1:918d605b019529584735b29b008e465a4f798af5
+ pristine_git_object: 4922c8b3bb952f712fcc0cf414dd5b505ed2c4a4
docs/components/costdetails.md:
id: 2e3d81b7a646
- last_write_checksum: sha1:298cb44901e7c50563597aae9e0606cf83edbc2b
- pristine_git_object: ada009ced29fcaf5d19e81bc67276fe9718ccfaa
+ last_write_checksum: sha1:d059d0f42dc0bdd72b52c1aa704000f362eff281
+ pristine_git_object: 8a64aa0923a52957e9fcaef30dcd659c051daf64
+ docs/components/createguardrailrequest.md:
+ id: 5144188aed43
+ last_write_checksum: sha1:5a0505ea0516ccb02b670f6df4c5f0048224e1e8
+ pristine_git_object: beabbf841e39f6d13cafaafdacfa4d5653c55e6b
+ docs/components/createguardrailresponse.md:
+ id: 94a5ed00d7b9
+ last_write_checksum: sha1:bad318ece1219797a8db60631961006554b38cda
+ pristine_git_object: bf3c2f7a4c16ba60ecac1fef7a733cfe6c9efb3b
docs/components/customtool.md:
id: ff0ec1b8ea8b
- last_write_checksum: sha1:090abd129254120c6ebdff2d303c36bddc62b712
- pristine_git_object: da6cd5777654596d56636052ed71bad3ab27e99d
+ last_write_checksum: sha1:1da938f1452f026020f8f3c617e2ee3fd11b78e5
+ pristine_git_object: 6cc1ff6a2b47a8fa754fa22f63506126b9b9d0a3
docs/components/data.md:
id: 097aebaf54b6
- last_write_checksum: sha1:7c521570c243b639ceffb808e8ec91e76d652ed6
- pristine_git_object: 8d840f603b0a7efd44bae95c88524f5b48986e40
+ last_write_checksum: sha1:b2407ba7d2f14428d780fc4196d96622d2d4dc07
+ pristine_git_object: 386321b1fbeae16dfa3fc07c073b7f1dd8844c1d
docs/components/datacollection.md:
id: cacd95d2ebf9
last_write_checksum: sha1:1d9eb4c12467860d5ef9edceb6456a4b9d6de643
pristine_git_object: a07c6e2e56cf9bca27530a9f9940b4d439680a0c
docs/components/datetimeservertool.md:
id: 2b884f7c46b0
- last_write_checksum: sha1:bed61a5e960712341c7f444589a1a94731836e71
- pristine_git_object: 7c2623ff136f0223cead23bf7d7cfc5d75c5768c
- docs/components/datetimeservertoolparameters.md:
- id: 8f0a4b31b545
- last_write_checksum: sha1:798b39b2fcd45c91a0b951346ce51941730ab318
- pristine_git_object: 5fd2e476f313310dc52d5555a1d157a0212ce883
+ last_write_checksum: sha1:60984916e1dc1df81001d9ff7b1f394ef4895498
+ pristine_git_object: f6abe0a5d59c59b6766f180d41d6bf65ae836a1a
+ docs/components/datetimeservertoolconfig.md:
+ id: 5d74f1cb3030
+ last_write_checksum: sha1:cccb4abbdbd8d33ab18eda21dcb71579ae6ac57e
+ pristine_git_object: 30af011662994a116fd52e1d8b8a446b760c1184
docs/components/datetimeservertooltype.md:
id: 8d84fb41685d
last_write_checksum: sha1:fcfbe6740c505b263b90f7de5281d4f506922b05
pristine_git_object: 870296bd3335da46ecdf4ec1722a3d47037a09c9
docs/components/defaultparameters.md:
id: a84477afcaec
- last_write_checksum: sha1:4bec180f914050a27da1cc04f4566712873c3677
- pristine_git_object: da72f0d77c00427d24591a1f3db8762ef47d9fef
+ last_write_checksum: sha1:346866d0ac71746908b6f450584d5ac706225012
+ pristine_git_object: 59ba90a20dbe46bfa8083dccaea946efcd2c4f35
+ docs/components/deleteguardrailresponse.md:
+ id: 78770374c8ed
+ last_write_checksum: sha1:1ceae5a23d706b158b011b234d968a0fd495d2fc
+ pristine_git_object: 7e0a483e6690842ba12d2a9349a9e2f0c79df8c9
docs/components/easyinputmessage.md:
id: a4927c37a92c
- last_write_checksum: sha1:c3363992a757fca3ce3f65669e9fd222440f9ab9
- pristine_git_object: b8b3c3485aee0650f8c8780b98246d954b326e44
+ last_write_checksum: sha1:9da1d4db9cd27f00a6b95f2bfd770e3e1f3755f0
+ pristine_git_object: 336ef7a7bb1df419370af586eec43e774bf4730b
docs/components/easyinputmessagecontentinputimage.md:
id: f7937c5f8c6e
- last_write_checksum: sha1:d8279b87d3e796670d97a548633f83ca5670970d
- pristine_git_object: 283037004f931748e6f7294f5c4077deb4ffb21a
+ last_write_checksum: sha1:2d0c966529294cac8c9a2f1327bbb2f751df635a
+ pristine_git_object: b4a0bb57d62eb7d91e0809c6334d2e08df6a2d61
docs/components/easyinputmessagecontenttype.md:
id: ff36a30eebf3
last_write_checksum: sha1:aa6d05a3a1e20b90ce068b7e98690061c89c6172
@@ -964,12 +832,12 @@ trackedFiles:
pristine_git_object: e58da65457bd71885289a77f054ae63189dc77d9
docs/components/error.md:
id: 786c3bb44e8d
- last_write_checksum: sha1:7f9e68078bbb760b8eabd8345db100dd9d2d26bd
- pristine_git_object: 7765bfc588aafe6caba3d677970ed003dc4fba46
+ last_write_checksum: sha1:5ed43ad1b7a3ad8ed0d2198be4edb3a469c4910c
+ pristine_git_object: a64dcf8737b1b8fd7dd8d3be0d9ca92f3febb59d
docs/components/errorevent.md:
id: 85ad990558e2
- last_write_checksum: sha1:4c780ed23b429c6af1f8aa003b300236341e270a
- pristine_git_object: 6f81e7ab3e7cbc6d03aa5104051337b52e62a923
+ last_write_checksum: sha1:b5a4361d18eceeeb7238df66b32e53ce42aa9888
+ pristine_git_object: fd68584a7de95958595c0463e26176397b63a479
docs/components/erroreventtype.md:
id: c66a1a2560ef
last_write_checksum: sha1:75e5cd528e6faeee349e685da1810190643ae17d
@@ -980,36 +848,44 @@ trackedFiles:
pristine_git_object: d2a2e85810efa44f6870d4a06de5ed01d59f97ed
docs/components/filecitation.md:
id: e234751883c3
- last_write_checksum: sha1:2213c61c6b5afc59ab72a0c9ee5d31e1a776325b
- pristine_git_object: d9673034efeeebc080c7684d63482b43d96c2e62
+ last_write_checksum: sha1:4fb72c563ad7da362b188942bc2910e59a8518ee
+ pristine_git_object: f03ca158d04793c033ec7bbd629e2c453a94edff
docs/components/filecitationtype.md:
id: 41e6446acd3e
last_write_checksum: sha1:8cf5b7140dee926145642fe455df0538a8c95e53
pristine_git_object: 787e2546ba435d92d0736bb1d4d6e212e0128ad7
+ docs/components/fileparserplugin.md:
+ id: 5f9fdad1c2b2
+ last_write_checksum: sha1:27fcde21e502bc5014e94a324bf470c98acb4b99
+ pristine_git_object: 6f72d585cf0b39f99832fa706b97de383d46fec9
+ docs/components/fileparserpluginid.md:
+ id: 9c8bc71e8b09
+ last_write_checksum: sha1:63680b47375eacbf235654cabe90c7f643fb9c35
+ pristine_git_object: 094f3b3dec61e80e62232e8b670d66d645a041d4
docs/components/filepath.md:
id: 6fc21505064a
- last_write_checksum: sha1:a6be92708ea86f23ae1b8e2e66a00233da1f5410
- pristine_git_object: 68dc392f52b2602d8ada5aaa4a270f273cff2b4e
+ last_write_checksum: sha1:87d59e2c0528cdd4eeb90a7585faf89ce6b1b5e4
+ pristine_git_object: cc41f2d3c5a100880e59ff8417b1b01e75519890
docs/components/filepathtype.md:
id: b9cccc74dfb3
last_write_checksum: sha1:bfdc1ffdd6ad62790b1b902de7f1e6f1e81fbca6
pristine_git_object: 8edc6ad003bcd068e3362ed1d4f658a756a01328
docs/components/filesearchservertool.md:
id: 4a63087d0118
- last_write_checksum: sha1:7673d77da536f84fe0f968d6defe22dd6c1c7488
- pristine_git_object: 489e73d48850a0c1574ec14da8d4df894093737d
- docs/components/filesearchservertoolfilters.md:
- id: 835669c775bd
- last_write_checksum: sha1:6a8c483c5332352d271970eee2faf6af68617189
- pristine_git_object: da597fcd45a513dd906b82ebce7986f5ff095226
+ last_write_checksum: sha1:3713c32b626ffd11e485e37d2d37b25e8feb12f8
+ pristine_git_object: 0315adc688c60198e04b04c516e0d8ac69009900
docs/components/filters.md:
id: bb43ec42351f
- last_write_checksum: sha1:ab847de6497bdc36c34e6fdaf1c732ef4087ce58
- pristine_git_object: a74f23c2dbbe9525f2f14d25b140106c995d2614
+ last_write_checksum: sha1:88d9a30429c9e65db5641349520318d4782dfe48
+ pristine_git_object: 28b2378e634ef0df5d0a030bb79d58ecca770db3
docs/components/filterstype.md:
id: 7a1c1e739033
last_write_checksum: sha1:355e43e7bfb04a8119a571ead3b12904526669ac
pristine_git_object: 9dda683e8bedae58b8a21bebc362926b200e2126
+ docs/components/filtersunion.md:
+ id: 3c6d0f38cff4
+ last_write_checksum: sha1:620288ec601a850106f4c32100227dfb0cd04d1e
+ pristine_git_object: 6ae299b869ca32481b9dd115daba724809216f87
docs/components/forbiddenresponseerrordata.md:
id: 2b182274133d
last_write_checksum: sha1:5905ebd01d68fd89d4b109895b76799ed95dbe24
@@ -1018,10 +894,14 @@ trackedFiles:
id: a1f82a6f0081
last_write_checksum: sha1:a2868ca356a3322f9ab3b2122ecb1cde9e0436d6
pristine_git_object: 96e07e7e317890e42522caddb5751f6988dfb112
+ docs/components/formatenum.md:
+ id: a9b19c5518ff
+ last_write_checksum: sha1:59d36b41317eda9e9c3b054e6dbc2e555f39c2fa
+ pristine_git_object: bed999ac8af6e73a75012a8608ccf532a7d01169
docs/components/formatgrammar.md:
id: 56dad240b6c3
- last_write_checksum: sha1:4f7bce21c3d1dd214bc0dca845ba7f174a9f7c2d
- pristine_git_object: 0a8c433a9911c4223b87b5268c6f0c3fb1fede59
+ last_write_checksum: sha1:e4d95b6a414a3db953ed65edaf349628c18a1621
+ pristine_git_object: 1077254507fff502cd57644a666e34fe564a4106
docs/components/formatjsonobjectconfig.md:
id: 0cb152015017
last_write_checksum: sha1:3e223b7d266045f2db2515cea9bc4fc9a836eca0
@@ -1032,8 +912,8 @@ trackedFiles:
pristine_git_object: f95e5f5749d25c1564372fadde296cd3fb537b36
docs/components/formatjsonschemaconfig.md:
id: 86caad7af281
- last_write_checksum: sha1:639227fe76590111b9ddf495ad1134b993316eb9
- pristine_git_object: 40f93d91e6b01c72a6789b5aae7cb9be8964a383
+ last_write_checksum: sha1:07692f66b93bc2e88ae48dfb705d7b10ab1bbe97
+ pristine_git_object: 372f0a15c0e42328970f27ec028b38353ac31cd5
docs/components/formatjsonschemaconfigtype.md:
id: 439973dacfcd
last_write_checksum: sha1:345a2c5fc424bf78d4f64f383dc093c38388d467
@@ -1062,38 +942,58 @@ trackedFiles:
id: 978549ce5d07
last_write_checksum: sha1:caec39e3db4ac9be861e1d30d08e58e543220344
pristine_git_object: 7d38cb838f31c6c6be5015fe284f22623ea120f7
+ docs/components/frameimage.md:
+ id: ebc112d05933
+ last_write_checksum: sha1:e65d5a74b177f6d9e11c7786c1e492f17d6567a4
+ pristine_git_object: 9d97afed6794b71ca949550406fc8dcb70777588
+ docs/components/frameimageimageurl.md:
+ id: f7f8b989e5cc
+ last_write_checksum: sha1:601f7bdfa4a294d4813b4757cbddd68a2ede75fb
+ pristine_git_object: d625c734e9d919fcf3e08c48cd851dc569b8f05a
+ docs/components/frameimagetype.md:
+ id: 5a90ea1e4cde
+ last_write_checksum: sha1:d78505a7ce5a303af6eb4fd6dbb98d9cb8893148
+ pristine_git_object: 696f2e3d541778996e3228e9caca8d9b06d06dbf
+ docs/components/frametype.md:
+ id: 1b935b46e543
+ last_write_checksum: sha1:8783b4abfd4eb3636c10f63970d052f8d68ded5f
+ pristine_git_object: 42690f69f107daa185fec7d36323bad56a51c266
docs/components/functioncallargsdeltaevent.md:
id: 029525b7c073
- last_write_checksum: sha1:bd02f3d8671b456f47402ab65d1a605bd8825ad3
- pristine_git_object: 79841c2cafcc9ae603b8056e8c8382798702f67a
+ last_write_checksum: sha1:5c00a1ef2b1b3a7c474a4d7bce8cd099b30a68a1
+ pristine_git_object: 02751bac36979d78e23fadb1f1ca5b0309ef6b38
docs/components/functioncallargsdeltaeventtype.md:
id: f3f34894a1a4
last_write_checksum: sha1:36466a5504f92ad63dbea7a289128918efbf8f7f
pristine_git_object: ecaf5b58a63e2b1d6f7034aeb39b5fd8930432d0
docs/components/functioncallargsdoneevent.md:
id: 3a2081d69643
- last_write_checksum: sha1:efabd5a336187e33af86b3249ee45e95d86962b3
- pristine_git_object: b9645497d3de6ef266db817558a793e365311c9d
+ last_write_checksum: sha1:e718ba7e7c1ee82212725064bc96e0c13c3772b0
+ pristine_git_object: 1e19ee10fb40a907c871ac1ebb145d4b73e2ed86
docs/components/functioncallargsdoneeventtype.md:
id: 0a537a121286
last_write_checksum: sha1:ecd15044cea3777ff481256819feac67f7643566
pristine_git_object: 3f4c91d5bbe63c375f8ba938bfa6b620355c82c3
docs/components/functioncallitem.md:
id: 728446a82c6b
- last_write_checksum: sha1:ae1fb2b45119cd88fafd6cf4095172f51df5bfc7
- pristine_git_object: 8af78d9d1e6eceb6a52a8ab90d109df5499b928a
+ last_write_checksum: sha1:b85a6cb3ac90cb0a7dfba0bb1d05a4362b892dc7
+ pristine_git_object: f1c940dea0a871300f9b3e4a213e0fb90e0386d1
docs/components/functioncallitemtype.md:
id: c7b1c1ec212b
last_write_checksum: sha1:995a373197e8ee246d7127595dfdd1c77a913dfe
pristine_git_object: 7640481023ffc48c27a7e7417451fecbc661c205
docs/components/functioncalloutputitem.md:
id: 5bdb39338207
- last_write_checksum: sha1:efb6a0d5a1b4f4d0b410dc7e8c3795f20deea6c5
- pristine_git_object: e859af0cdaf4e47bd22434d3ae877a5f04ac2c02
+ last_write_checksum: sha1:055ae81522a43ce32bc2826944bbc0f71a19aac2
+ pristine_git_object: 70980ff71ad1d40d3883760dd03e08e441cae5d0
docs/components/functioncalloutputitemdetail.md:
id: 2cb02374b48c
last_write_checksum: sha1:c03306cc3461fa680c42fe147394c5b2a27d58cd
pristine_git_object: 3308be744f3ae5d92e2e90e5f9d4b29bc30c4ebf
+ docs/components/functioncalloutputitemoutputtype.md:
+ id: de216282851f
+ last_write_checksum: sha1:2a078e25376f85ab835fd8e685305b62091426b9
+ pristine_git_object: 048a5f46975d5a2df14a7df7cb98e217382c09ee
docs/components/functioncalloutputitemoutputunion1.md:
id: f029cb33f764
last_write_checksum: sha1:ab07cf8dcc44a1d42fe622ef4ced5a0ecebde673
@@ -1102,50 +1002,66 @@ trackedFiles:
id: 1737d9834676
last_write_checksum: sha1:edde5e34d278f6fc8068d42e94e42d4fdad355e2
pristine_git_object: a91fd7c0fd6924e7c7870c94d40753f552fc6c04
+ docs/components/functioncalloutputitemstatus.md:
+ id: 153450590b13
+ last_write_checksum: sha1:0cdf893ee7a70253229b92fd906df2e9b179047e
+ pristine_git_object: 46b4b6b4fd4063952ba22957347c34dd8fa5eb49
docs/components/functioncalloutputitemtypefunctioncalloutput.md:
id: 88a512c5f9ce
last_write_checksum: sha1:611201e2dbd2c8fe1c501b5365bc06367bc5370c
pristine_git_object: 2f4629220306ced5674a9ef70dbcbce1f908b93a
- docs/components/goneresponseerrordata.md:
- id: e0a6af2f3930
- last_write_checksum: sha1:bb71aaa5536e5e1318be7ff336df76ef276acbe1
- pristine_git_object: 87ee01d49d24f644cd8143ecd5435621fea20831
+ docs/components/getguardrailresponse.md:
+ id: eac79c96805c
+ last_write_checksum: sha1:da1d99fad316a21e9db253b30bbf9d590062fc59
+ pristine_git_object: d7de0f8ddb4847ec9c60c25f3d46ab408aac707d
+ docs/components/guardrail.md:
+ id: ce84902d4cc2
+ last_write_checksum: sha1:033b4bd2ad9a5406b1526fb7b34bbaea004e47ec
+ pristine_git_object: c2fa91b7cda0fe6318e953a269e2cbe6d515ce64
+ docs/components/guardrailinterval.md:
+ id: 79efeedcb880
+ last_write_checksum: sha1:3c071c14943c7b26474847eee46925ae884a8a6b
+ pristine_git_object: fb07147177ab7ffc9d291d2ab17bcf4f32d96d89
+ docs/components/ignore.md:
+ id: 854b9623c0dd
+ last_write_checksum: sha1:7382df94bafcb659bed252f3f3e45fa23ccb430e
+ pristine_git_object: 5f7870871ac61bf7e1a1f6d4998a7353518f3bbb
docs/components/imagegencallcompletedevent.md:
id: c26bc1b3854e
- last_write_checksum: sha1:3fbced46717f100511986724f16441ff0a081187
- pristine_git_object: a94d499fa1a3208b9381bb5cb21dfc334191a249
+ last_write_checksum: sha1:487f2664906ce2bf995e5f33739ea14944d4a20b
+ pristine_git_object: 3c63b103fbe070c5c901a3d99d1b864e344255f2
docs/components/imagegencallcompletedeventtype.md:
id: a74ad0e7b9ae
last_write_checksum: sha1:3cc41a971955015c2fdfb46f303ae6882b450b3e
pristine_git_object: de12c9ae201cb4226a48f20f9c19e528bb8089cd
docs/components/imagegencallgeneratingevent.md:
id: d24140b27e2d
- last_write_checksum: sha1:a7b69c00aa796bb2cc48a36914e26502c3af40f9
- pristine_git_object: 31b706bcf5d258665a93114a958a76126a9307b2
+ last_write_checksum: sha1:a366aafcc5e7c278fd252ec2ba4585b7d2b589ea
+ pristine_git_object: f22ecf7e8d7bc563ab49a554f08555ff0a0a61a5
docs/components/imagegencallgeneratingeventtype.md:
id: b929dcb09058
last_write_checksum: sha1:03fed8821dd92b8c233e48725562ef2eec92b34e
pristine_git_object: 620ac466453fb5b61f2bb0f3ba4881c538418830
docs/components/imagegencallinprogressevent.md:
id: ee60aae70dd9
- last_write_checksum: sha1:00259d79eb464977eb6fba83c1437aa62ba781fd
- pristine_git_object: 3c1851ddd38bccfe63f543f6bdc4e6c14c4cbd30
+ last_write_checksum: sha1:561f3a9452f4127979615db84078dc87e78b0828
+ pristine_git_object: 463bb94421491851e756c463c9148ad08a0f185e
docs/components/imagegencallinprogresseventtype.md:
id: 51942aa68303
last_write_checksum: sha1:57cbecd6dd9f7a5bedf779ac06fdecd4cc8fea50
pristine_git_object: 407c29cdf87ad5ddc32e64d3f68c3785161157a0
docs/components/imagegencallpartialimageevent.md:
id: 3845104b6af7
- last_write_checksum: sha1:d56e5f8d0b398b43963addad31aac443e615695c
- pristine_git_object: 0b6159487f85a5e8178e52c97c9a3930caee04d4
+ last_write_checksum: sha1:ef10048a6590b53dbaed284d1a4f56e167647879
+ pristine_git_object: 41f52c3eb3d170146d3d1646b9a2a4602b70f1ff
docs/components/imagegencallpartialimageeventtype.md:
id: c007465f6177
last_write_checksum: sha1:c14e2e12eb49cf4445fdda2e2f400a8ea849d058
pristine_git_object: 841d9210013aa9eac24702237c16d0aca12a985f
docs/components/imagegenerationservertool.md:
id: 0ddff7f46134
- last_write_checksum: sha1:ea311fe2164261c6ae9effa396c0d2b84258dce8
- pristine_git_object: 20a42975b05727ba1b6fd44d23758186f246909d
+ last_write_checksum: sha1:b46e044c36e1518d95bb94572e43311da69a5b6d
+ pristine_git_object: e38b5c19b6356f255783dfacea66b45418679e21
docs/components/imagegenerationservertooltype.md:
id: 5d4b6d6b41ce
last_write_checksum: sha1:125bdc6395723e8fcdd82be5d88e04916b8641fd
@@ -1160,16 +1076,12 @@ trackedFiles:
pristine_git_object: 1e12f5f39649bbc28907eb579d26b1dedcd634d9
docs/components/inputaudio.md:
id: 3bad9d0f3bfb
- last_write_checksum: sha1:3780c1c2e2e33d470fab417acbd8c1418967256f
- pristine_git_object: dac9b47d60961d90d40cc61d5d0e702807cce65e
- docs/components/inputaudioformat.md:
- id: fc1e276a2e54
- last_write_checksum: sha1:dcc117039d1c99730491717a90e97c7dfc26d8a3
- pristine_git_object: 226d6990faecc4a44360c6985220fdeadab5e968
+ last_write_checksum: sha1:911ae8d63fb5a0fd4b27d922aa2547cc6e973523
+ pristine_git_object: c02836b58a4d4ab93cbd9a35c36d27f334ef405a
docs/components/inputaudioinputaudio.md:
id: f60668aee68e
- last_write_checksum: sha1:e4350309bd2e995a31c8e97c63bd4722dfcb13d2
- pristine_git_object: 2a7ec30a0e77583fb7775b49ab9b769d08aaa5d3
+ last_write_checksum: sha1:e9790189c0a3a2b8da358be89ee7f1f7586a70d5
+ pristine_git_object: 6d5b50a99994d37b047abb6e1174cb0d43bdf3ab
docs/components/inputaudiotype.md:
id: 2a37b5504461
last_write_checksum: sha1:e1b72ab7561db1859a957f92514258163a207d03
@@ -1180,36 +1092,36 @@ trackedFiles:
pristine_git_object: e89ae0570c5bca8f4e633d7914cd6c98f9799c66
docs/components/inputfile.md:
id: 3a1680eda22e
- last_write_checksum: sha1:717b9ebf4f66d986213a2e83d5d4be920fa3c48f
- pristine_git_object: a63bc8435f158f0bbc74e8c9dd688232c2bfcc2f
+ last_write_checksum: sha1:d0acd952ab08dd42dd99a7d27f2cdf0cc6d91f63
+ pristine_git_object: c53489e2e5373c9178b87586e4f1bea5a0bd1d88
docs/components/inputfiletype.md:
id: 57d39465e429
last_write_checksum: sha1:1d94b6bf420854cb5e0162391fe5465cf8650b2e
pristine_git_object: 801a1474178b676683782b4e4672a8ddf9f493f0
docs/components/inputimage.md:
id: b1754e9aa099
- last_write_checksum: sha1:60ce1b945c96493bc843446ad1bf66b163b84de9
- pristine_git_object: 9c79fa277e4f37f7a6f19f653166bb65fe151680
+ last_write_checksum: sha1:190336624dd840a0d84fea1306786060e9356fbb
+ pristine_git_object: cfe6e3e41c8ac75a7f00d1a316153d6e7eec587b
docs/components/inputimagedetail.md:
id: 582114ff5e40
last_write_checksum: sha1:8b26812936eea42fe754a8376c1bf909d8b85197
pristine_git_object: 09106b0661c2e4b67a76f98513efec087153912a
docs/components/inputimagemask.md:
id: 014a4ddc9ad5
- last_write_checksum: sha1:5b0ae7389a73c3dd799a7ff4e1cceaeed77ffce2
- pristine_git_object: 911ea05268095f50dbe9725c3fe4baa90696f8f1
+ last_write_checksum: sha1:7ff0dcc8b47b7cccff30255b13d2f4b585e6919c
+ pristine_git_object: 4d706bed030726f9c15f37a426d6c66c4a186c05
docs/components/inputimagetype.md:
id: 2c928cbad52d
last_write_checksum: sha1:3f986842d8fd5fb4aeced61a2e4e896f41b7ac76
pristine_git_object: 75b828e8fba8d581e1631636b8085053324aff0c
docs/components/inputmessageitem.md:
id: bb421a6ae354
- last_write_checksum: sha1:b24636fb15cb8e26ee30cea3bca6f4411592ab6c
- pristine_git_object: a7e9fe0c2160e30592b48225e24ddd79f4ee75a6
+ last_write_checksum: sha1:fcb7fb6853f06f80c3cfae7df8c64ebe671f2b12
+ pristine_git_object: b46d160554cf4cbb18d57d2bad9f79c1f7c94e6d
docs/components/inputmessageitemcontentinputimage.md:
id: 70760d9b88c0
- last_write_checksum: sha1:60ebcac0949fcabe91415103ac6591bcaa69c5e4
- pristine_git_object: 08da210cc3725281532de89430f7ad30d4d58634
+ last_write_checksum: sha1:1f92db0bdba7c423f9433e20936fb2870c8bbf9d
+ pristine_git_object: c782ffec146e4ba2f820ccd21d216690dbcfb0c1
docs/components/inputmessageitemcontenttype.md:
id: bb291db04191
last_write_checksum: sha1:d85c022662be3d3cab6c5bc349d30288a402afcc
@@ -1254,14 +1166,10 @@ trackedFiles:
id: dc0736cbbf99
last_write_checksum: sha1:ff08bc1cde46e84a744d200629cfc665ba5ebeaa
pristine_git_object: 709bf3192502fa94aca1fde8215ffd2a37cc9198
- docs/components/inputsformat.md:
- id: 45dda36b9ef0
- last_write_checksum: sha1:5e9170e204b757bcb09852ba3c2b64f175f7115a
- pristine_git_object: 123b031beb00bd60039dba20c164499738152b82
docs/components/inputsmessage.md:
id: 0e40015668d3
- last_write_checksum: sha1:01f7f593a85d58030e684ef8887143f1eb836afc
- pristine_git_object: 586132388c416a11bb32987c4d85b6aea33a07f4
+ last_write_checksum: sha1:0b70f907021e023a752b54a4790317182b88b17a
+ pristine_git_object: c877c12a1f97249a6d200d501eb624eb14f19563
docs/components/inputsphasecommentary.md:
id: 9cc8146c29b5
last_write_checksum: sha1:d44cdba85419f8611b4c79f2224be891c8dbd532
@@ -1276,8 +1184,8 @@ trackedFiles:
pristine_git_object: 8a1a58aab6b1819a1261787a613bca096bb20ef8
docs/components/inputsreasoning.md:
id: ab39ad335ef0
- last_write_checksum: sha1:02460c25d7841b7c99a8da1ad5108fe32f72f780
- pristine_git_object: f68169e7f571e12cd6f485f2ba531f4add1e8002
+ last_write_checksum: sha1:bc111d320a72e69202054a799a2346617c9c0179
+ pristine_git_object: d5842a9778e75c8e0660fb33286a99faca2f98ec
docs/components/inputsrole.md:
id: 94a7950b131d
last_write_checksum: sha1:d0df3609fd57ec61d9bde5cd2538ec462a3cd654
@@ -1328,20 +1236,20 @@ trackedFiles:
pristine_git_object: 404cc4a69bca7b64c9172078420c72359ed9c2d8
docs/components/inputsunion1.md:
id: d017aeaed00c
- last_write_checksum: sha1:068bf732066c81337f1154932450cc0d80303e79
- pristine_git_object: de2e664b7a9331a428b5b042d105a743cfa31bf9
+ last_write_checksum: sha1:37e5b6e526766168c9b5d4227c4f18d1a8a065d1
+ pristine_git_object: 8289eb7af2e7ed5da6b65edc0dbef4b11fcdef26
docs/components/inputtext.md:
id: cf4503b3219c
- last_write_checksum: sha1:25f67f798df55df68f7f8c8f604183ed4bd6d139
- pristine_git_object: 0ed5308e8c3966ceafe7037b9d3279cbdd62788d
+ last_write_checksum: sha1:af646125dfffda8cb71e15c602fcd4823b85f3ab
+ pristine_git_object: 15197976ab1da8e51e6c2ba2588fa7c6bc051c82
docs/components/inputtexttype.md:
id: 5060f8d1c11d
last_write_checksum: sha1:f328a4d2fadde8103bd4fcf6a58fbec034e70e5e
pristine_git_object: 6181f0da9de76a20735b7b4bd8b174261db61578
docs/components/inputtokensdetails.md:
id: 331af539199a
- last_write_checksum: sha1:f05248e182d51b7c80541dc8784929f8032f5493
- pristine_git_object: 40de8ec7a8d12159943d98bb1ba4ec093483f234
+ last_write_checksum: sha1:136d08c7846075581f141aa89c74743a4684585e
+ pristine_git_object: 7b6d8235fbeb431c27cec3d689c6d5aa558d8d40
docs/components/inputvideo.md:
id: 5775df94513a
last_write_checksum: sha1:9096278894b57ece97edefbfcfbbbae5f91fb259
@@ -1358,42 +1266,62 @@ trackedFiles:
id: c7d253bbe0f1
last_write_checksum: sha1:c95fa69b2e5ba1ad8801577e0833513b4045c733
pristine_git_object: b320ded97617f2a84341aaf23e73be3e0d46546e
+ docs/components/keyassignment.md:
+ id: c2be60993728
+ last_write_checksum: sha1:4791e8ff5cc6777dd2e130a2b67f019a1f6639ad
+ pristine_git_object: cda76fb01c2f5292ea05924127c9b99cca3d2dad
docs/components/legacychatcontentvideo.md:
id: 9a2b7bac8c07
- last_write_checksum: sha1:a6b313e115323750053500d55f0013f0868533ed
- pristine_git_object: 124d040bd8452321a8271363cb1f9fa525a6e578
+ last_write_checksum: sha1:b9618041699ab740ef22e91b9c39e9d1476cb0d1
+ pristine_git_object: 0ceb8bfb774aa07d662d8c5206a847205eb15b61
docs/components/legacychatcontentvideotype.md:
id: 70e7ece41351
last_write_checksum: sha1:bec40e9210c450f025f34e42f967fe1fef2c109f
pristine_git_object: 22ecba2663eaeccadf0d1c0283236d794afb2b09
docs/components/legacywebsearchservertool.md:
id: "0e2991237936"
- last_write_checksum: sha1:800a6dd7cbbc77d803df060aa2991e942b11ee35
- pristine_git_object: 403745f73149a7247290f2653e9b9903737fe9a2
- docs/components/legacywebsearchservertoolengine.md:
- id: 96cdd1800966
- last_write_checksum: sha1:2797ba71a64dbf6f51542d20f9a853b8a8c60566
- pristine_git_object: 473b441f92491bbdb44b3735873a58cc425d5561
- docs/components/legacywebsearchservertoolfilters.md:
- id: c345c58d827c
- last_write_checksum: sha1:c760469e0d5126e07c00cb91ddc7db908f40ffb4
- pristine_git_object: c992fa1fffb3f9436842424da12bc7218f47c93b
+ last_write_checksum: sha1:4d3e9701c927a572dd50d6697526cc6f93047c0e
+ pristine_git_object: fe56675849b873eecde4306246b6f2fd8bd5b275
docs/components/legacywebsearchservertooltype.md:
id: c5def381d385
last_write_checksum: sha1:ea65b6214a79a7125bff8e6cca1f55863f5c1c08
pristine_git_object: cfa9fd582c4d290d8700f34f092b5fd45d5a1172
docs/components/listendpointsresponse.md:
id: b79a056a7034
- last_write_checksum: sha1:dfc1567089c65b8412b216586623eb2014e332cb
- pristine_git_object: 89050e44901e67c37ab84a65c6d97f63f64a026b
+ last_write_checksum: sha1:046b22b032ea14ce42886c0b1d2945c2027ab1de
+ pristine_git_object: 5a0af7d3c7b3d0f954a2916581f4d006930af3cc
+ docs/components/listguardrailsresponse.md:
+ id: 90134b3124e9
+ last_write_checksum: sha1:c87b19168aaa3552487afd576384b54bae595082
+ pristine_git_object: 27d4fc9916f854e7c59a3cebfa3246b0a367a4b8
+ docs/components/listkeyassignmentsresponse.md:
+ id: ffb305258925
+ last_write_checksum: sha1:f74d1b0e4441ec590cee3af3bcc42dcdb0274401
+ pristine_git_object: bf0b206bd7a039f2fea3fae71fe276c63a585f52
+ docs/components/listmemberassignmentsresponse.md:
+ id: b34008c23794
+ last_write_checksum: sha1:a80fc686dfb13c7179c1a49808ca9d10fbca0cec
+ pristine_git_object: 16092238affd61950df82d45bc46ae0be98df7b3
+ docs/components/logprob.md:
+ id: 351b5c050527
+ last_write_checksum: sha1:fce93846d1c33a013a40764c5e00e6191982bdbf
+ pristine_git_object: cc928f671dcbde0ebe7ef10cef976333fa35cd68
+ docs/components/maxprice.md:
+ id: 15ed956070c8
+ last_write_checksum: sha1:a6b154896d64cb9feac8742b812bf40951867375
+ pristine_git_object: b932c8f3988960414d7cd0f2ac795f1cc3b58884
docs/components/mcpservertool.md:
id: fcc92d12bf9a
- last_write_checksum: sha1:1264f489c4609ab03424a49f11c19572c25aaa7c
- pristine_git_object: 4025afb6a8101c9ff42783f3a2478660d32f982e
+ last_write_checksum: sha1:edc8bdacc891f72eb9685d076ac2aa2ac18d30f7
+ pristine_git_object: 2ce5cd65467cbb0d845210c1b5b77f4121f22ab3
docs/components/mcpservertooltype.md:
id: 2090c8ba1a1b
last_write_checksum: sha1:7a7a827f064395ff5d952fd0dc775258b15f73c1
pristine_git_object: 9c7e037d6bb5943e473b449b4d072af037e95ada
+ docs/components/memberassignment.md:
+ id: 760c8ff810ca
+ last_write_checksum: sha1:8eb2f8a077dab3774995986b09b13e7e86591de8
+ pristine_git_object: d51bb51ada023d10b2dec047bc71375c781a5f23
docs/components/memorylimit.md:
id: 6b23dc8e3b8d
last_write_checksum: sha1:af1899a519c3c3b50871014b17b50153050b59e8
@@ -1402,14 +1330,22 @@ trackedFiles:
id: c06a1698adc6
last_write_checksum: sha1:9bbac55e2cb009dfd90e129cf3abd35dcab6d2ac
pristine_git_object: 54561e47866b619fda09c4168acaf5094a5158ad
+ docs/components/mode.md:
+ id: c4b5ab74eb19
+ last_write_checksum: sha1:7e3dbed60e5a5a3f21d179fbc46a596acd3a8d9c
+ pristine_git_object: e87cda7a904eb2554c58b6966a50ef581bf1bcb2
+ docs/components/modeauto.md:
+ id: f43745eb6f43
+ last_write_checksum: sha1:5eed0f8eec27adf49aadda8d5403f2c7ae0bb18e
+ pristine_git_object: d5bbdc95f658be46eebf13f0ba8b9ae3716f72e2
docs/components/model.md:
id: 673ad57400cd
- last_write_checksum: sha1:504edb8198debf509540c5db3a9c6166ea1b8734
- pristine_git_object: 5db2d5688977c09b67f2e5551c5f8a2b9c3ed9ed
+ last_write_checksum: sha1:fb1d37869cb932b7aea2d12d747241f5fddd7e20
+ pristine_git_object: d7a1f24eebecf4bf99787df37d1567df2e4fefaf
docs/components/modelarchitecture.md:
id: 79816051e6e8
- last_write_checksum: sha1:176243942bbd83edf1612ef12abe322bb433b18d
- pristine_git_object: 63f4c32305793fdbf6a75289a38b977122a5dab7
+ last_write_checksum: sha1:158b04c79b7a32a2d95e3d3fda8fa6da0ab91cd9
+ pristine_git_object: 7579049efab554d7f538f7cad1ffd1a8ab1be80a
docs/components/modelarchitectureinstructtype.md:
id: 3518ad912450
last_write_checksum: sha1:e4745000d4820fa66c7b7994e676b061fbf38d96
@@ -1420,20 +1356,36 @@ trackedFiles:
pristine_git_object: 0698ec66d69f7160750a558282c367f570465187
docs/components/modelgroup.md:
id: a6a4b80844c2
- last_write_checksum: sha1:06712748fbdceed0908f6c6be3bbde84a8b7a964
- pristine_git_object: 377c57c720a633f07969eae664b39e5c5f607a07
+ last_write_checksum: sha1:6d5649d0d2ac8d8869fb39158c5dec52db0e8087
+ pristine_git_object: 80ef8a09c268ffbbee85d92dce038461b634a71d
+ docs/components/modellinks.md:
+ id: 74607e6a173d
+ last_write_checksum: sha1:445ec227b130763e2509d1a181dd5e3e6d71420a
+ pristine_git_object: 317190772f743d2aba63c4dad770827b46688f6a
docs/components/modelscountresponse.md:
id: abdad0c1a02a
last_write_checksum: sha1:6c32f935021d24ff9eeae39f903f71b9ddaedf3d
pristine_git_object: 84bbce80ebf7ce2a93ad853bfe2f2a80a8395077
docs/components/modelslistresponse.md:
id: 37e791d4f265
- last_write_checksum: sha1:f07b15965e2d9d70a6aad4894b51b8d008f64296
- pristine_git_object: dacf9fa2657ea04a081d37f741cdd1b7a54660dc
+ last_write_checksum: sha1:fb8fe5748b0c7a5e1e515233cad4d9524cd342bd
+ pristine_git_object: fb5d458197af006a3706e4c133bbb3af45dd64bd
docs/components/moderation.md:
id: de90083e5402
last_write_checksum: sha1:d0cd3160a76e89d8749cb27687b1bba3dac5089d
pristine_git_object: e537afb55f6f683d8e11dd14014db2c808c0a3ef
+ docs/components/moderationplugin.md:
+ id: 975e1b877c99
+ last_write_checksum: sha1:07b0c52842055be65a650b641407ed3b595c980a
+ pristine_git_object: ca5adb179586eafff10901ac1900d38e895dea7b
+ docs/components/moderationpluginid.md:
+ id: c266dcd9ec14
+ last_write_checksum: sha1:f72de648ce857abfa35274d8859de5e8f2c58125
+ pristine_git_object: 60d7d13289d6543385b236e37b40231d6633e20c
+ docs/components/moderequired.md:
+ id: 6e564fce1a7d
+ last_write_checksum: sha1:16f798521d1221c04b8c39d7e25383c8ffb7be7b
+ pristine_git_object: cfecb28d11204fe2cd3d69f1ba16a09212f5cf93
docs/components/never.md:
id: 43f2ea5e9932
last_write_checksum: sha1:e6525fb53deebcdebcb5da707fd9f3250d8f2e9d
@@ -1442,14 +1394,74 @@ trackedFiles:
id: fa528f1f7879
last_write_checksum: sha1:8872a5d706d3a3392ae8c552f54ecc3c6df00f9b
pristine_git_object: 0ba248529a84feb2bf9d2f519895b3194349d2db
+ docs/components/only.md:
+ id: 91bc6779dc0a
+ last_write_checksum: sha1:9d9c9f1858695f9fe710f28aecb7c84856c494a7
+ pristine_git_object: a62341bd1e17c836ec7539bd7d8e494a1a5184dc
+ docs/components/openairesponsefunctiontoolcall.md:
+ id: 3a1364f8d3e1
+ last_write_checksum: sha1:27c018aace3db99e6163b746c270bf5a1d0266aa
+ pristine_git_object: 9e32253dfeeef51181e0789fada005b1edfcaa2b
+ docs/components/openairesponsefunctiontoolcalloutput.md:
+ id: b3939fe71de2
+ last_write_checksum: sha1:1705dc61ae8733d30d88947b6a950f92af935ffc
+ pristine_git_object: 60257a07205e3fa2e534d8ef6d920fd658efdb9f
+ docs/components/openairesponsefunctiontoolcalloutputoutput1.md:
+ id: 890af6bbdcfa
+ last_write_checksum: sha1:f098ac07c6c67838bbc6abf901b458c8746244b8
+ pristine_git_object: 7496833a959029ec59035966be140759e9ae444f
+ docs/components/openairesponsefunctiontoolcalloutputoutput2.md:
+ id: 292c63ce0cd0
+ last_write_checksum: sha1:84bc2133779253b1a0a3488f5ba0543a69883e8c
+ pristine_git_object: add9b33119d4fdcad7c277263487308098682028
+ docs/components/openairesponsefunctiontoolcalloutputstatus.md:
+ id: b421aa3f6bfb
+ last_write_checksum: sha1:387af8f984924903f3617df6fb8a0661a7ecfb52
+ pristine_git_object: aef64b38db8bcf226a32822af6232ef1c69f8aa2
+ docs/components/openairesponsefunctiontoolcalloutputtype.md:
+ id: aa8b177d1ec1
+ last_write_checksum: sha1:3b95f762eceb734784551c575cecbdb28fccfafb
+ pristine_git_object: 42ae342d0971e385cc996ae3011c45fb8f874377
+ docs/components/openairesponsefunctiontoolcalltype.md:
+ id: 7b166a0d0b2a
+ last_write_checksum: sha1:6c807f62207fb36ccef1da18232aa7c83f9dad5a
+ pristine_git_object: d966b3227d4c973ff8986b0a58b3aef89d26523c
+ docs/components/openairesponseinputmessageitem.md:
+ id: 36f42513d2a7
+ last_write_checksum: sha1:d00cb57892a0aa2784a7ebe83d776f317976048b
+ pristine_git_object: d71d5fde7f259fd906eca66522d59dc0d55f3caa
+ docs/components/openairesponseinputmessageitemcontent.md:
+ id: 52e9bf63eda0
+ last_write_checksum: sha1:311a3e0fc263a3fd3a627728da28db217333f741
+ pristine_git_object: a823b7b02ee8193e9bb4bad239c412b1143577f4
+ docs/components/openairesponseinputmessageitemroledeveloper.md:
+ id: 0dd13dac0dbd
+ last_write_checksum: sha1:d33802c5564ac45feb4905e482d4acc5afdd670a
+ pristine_git_object: 0c0c982f77a8dc04c9d343e2e5c4531a00fcc38e
+ docs/components/openairesponseinputmessageitemrolesystem.md:
+ id: 9a4648fd3cb3
+ last_write_checksum: sha1:cf80baa698d6c76a8ebe65a9d0cdac7f302a5e14
+ pristine_git_object: 5796e10eba5845d650471b35101c93d8d0944ab0
+ docs/components/openairesponseinputmessageitemroleunion.md:
+ id: 5e57b5425e20
+ last_write_checksum: sha1:898bfd48b6e4f1df20a766d6d2e47bc1f3dcdac5
+ pristine_git_object: c1b9743a0a124ac490a4f82d1a190e79ba194c06
+ docs/components/openairesponseinputmessageitemroleuser.md:
+ id: 55c3e6d597b7
+ last_write_checksum: sha1:fc65d52f808697f04bb4066bfd1b18983b48db7c
+ pristine_git_object: ee51089659605b755564bd72d62b3bfdc2f00ff8
+ docs/components/openairesponseinputmessageitemtype.md:
+ id: 82146d08bc72
+ last_write_checksum: sha1:a73b2a36c3bf3386aea497899ed43e40424ecbb4
+ pristine_git_object: efe2fbfa7bb0202b31459296f739ea767b7ade62
docs/components/openairesponsesannotation.md:
id: d8d10fd7804b
last_write_checksum: sha1:fa57b686a405727f7e305c17d9e97b981aec6ba7
pristine_git_object: e3b6962893d7ecac7b171ce17969cf935186d256
docs/components/openairesponsesrefusalcontent.md:
id: 864502b050dd
- last_write_checksum: sha1:1bb95ad065dc2201dace99b89619f915aa59856d
- pristine_git_object: 4709b80e87899ec62e058ba539d5e49d24c4e9cd
+ last_write_checksum: sha1:7777af1d85b821b1f8d36d9bde7ac1489853984d
+ pristine_git_object: ea13450e264c0b2267746bbc9a3f68d93da246bd
docs/components/openairesponsesrefusalcontenttype.md:
id: 0e2415eb75a6
last_write_checksum: sha1:d934ac9cdb5b1125a8a60b26a25763356a854603
@@ -1468,8 +1480,8 @@ trackedFiles:
pristine_git_object: 5a958ab0c25e26ecc1ee4e4663a1cc4a51cf5d78
docs/components/openairesponsestoolchoicefunction.md:
id: 98a6be9ff937
- last_write_checksum: sha1:73a64a8b021c84ac812f5522dacbaa7a8b7075c6
- pristine_git_object: 6889a238bde8f6e7b21e7a0f3686963fd3397425
+ last_write_checksum: sha1:b3227df6ff61d9d10b779ca476d4d4b84ed22145
+ pristine_git_object: 9163b3d1e3eb13d3c7b84393c6cac4a0f587c4f8
docs/components/openairesponsestoolchoicenone.md:
id: 7e44390a9041
last_write_checksum: sha1:d6324a5ec32cf87e40ba5cc27f82b8eec52cc291
@@ -1492,24 +1504,40 @@ trackedFiles:
pristine_git_object: 3162d396225c6fa3f2597ed4aea08c8b1dc7db22
docs/components/openairesponsestoolchoiceunion.md:
id: 0deaf8366a16
- last_write_checksum: sha1:6b100dab10a99ca8e44dbe724b91491808f2fb7c
- pristine_git_object: 7ab787b20a7908ed75e103b7b8f973ea6838e4d7
+ last_write_checksum: sha1:117368768009291418543d72c854fe5bdabc2e81
+ pristine_git_object: 7e503bb70c5c5e4a853d65d39fac69f6c8c1f503
docs/components/openairesponsestruncation.md:
id: d4ad0cf0c093
last_write_checksum: sha1:0adf4105f41726d94f43e9b76a7df2bb4cd791f3
pristine_git_object: aafecaeb79126df177943a9c64776946f4248e2e
+ docs/components/openresponsescreatedevent.md:
+ id: 75983186e798
+ last_write_checksum: sha1:7b04290cb5943d838fbf8d05577d424ee6f4b448
+ pristine_git_object: caa28148cf40971bb40b7503e09f38b9c9f1dabd
+ docs/components/openresponsescreatedeventtype.md:
+ id: 6d8899980bf4
+ last_write_checksum: sha1:0365bfe9e0c71ba85fff35c999013eca350d5332
+ pristine_git_object: 63afeabd857237b4c953e0f81370652473963ceb
+ docs/components/openresponsesinprogressevent.md:
+ id: eb1c9597416c
+ last_write_checksum: sha1:409affe8297ab4e3189ee766a265dd7baa720dcb
+ pristine_git_object: 9ac152a29e39953b4359c1fe0975e7cd5dc64e57
+ docs/components/openresponsesinprogresseventtype.md:
+ id: 400282eb4448
+ last_write_checksum: sha1:284babbdeffb8902ac40086042a646b50cddfa10
+ pristine_git_object: e88886f738fef9ad22e5efc74e3e0ea2cd8ceeb3
docs/components/openresponsesresult.md:
id: 9795b7de3f92
- last_write_checksum: sha1:7e29730e13b9285fc95f203a5d9ff341057e2859
- pristine_git_object: 148655006ed779c29596603a309dce948641083d
+ last_write_checksum: sha1:2d75277fa00f1373256e1e46b44295b09bb006f8
+ pristine_git_object: 2e608eee0f77d3a630dfaddfb0cebac7de490e44
docs/components/openresponsesresultobject.md:
id: a8c7f7bc0b24
last_write_checksum: sha1:3df49df80dda49ea4cb53f913931fd4754769b66
pristine_git_object: 1ae6c220a9c087af683d65806061ef350e7f1fcf
docs/components/openresponsesresulttoolfunction.md:
id: add7bd8ba16c
- last_write_checksum: sha1:abbb99035ef3d092dbf10592111f1dcf1a961860
- pristine_git_object: f3e896d5d9eb923f1f8d11ecaf53486b7360cb2e
+ last_write_checksum: sha1:e54808564c7f2d988743c781f1049f86e1ebb0c2
+ pristine_git_object: 01ce9e3ba45dbad7407fcb075c5a068ae66ed022
docs/components/openresponsesresulttoolunion.md:
id: 3da3bd935d27
last_write_checksum: sha1:07299abfdb408bacaa372bafb3edb4e946fc6108
@@ -1518,34 +1546,106 @@ trackedFiles:
id: 11e423f51c0a
last_write_checksum: sha1:aafa032ff25d8adeec0c0bd0d995fdcebecb59b0
pristine_git_object: 1fd0de22bc2eadd015eb6e04c46eafa3dc992af4
+ docs/components/openrouterwebsearchservertool.md:
+ id: fb93a3700123
+ last_write_checksum: sha1:9bea49bbae5d084bf15a20caa095165fcf14a334
+ pristine_git_object: 6e90c6e024b0efd7295575650bd79133ffe6a33d
+ docs/components/openrouterwebsearchservertooltype.md:
+ id: 16e1e8501319
+ last_write_checksum: sha1:6d83c960b1b1f5be7be0f0f6f6b71d86fb160cc7
+ pristine_git_object: 947a0b4decad7398ad4ddd0ff70a3a8cf95c5e87
+ docs/components/options.md:
+ id: d57f3108a48d
+ last_write_checksum: sha1:33aba904de1c5bbbb772a34eaf56daa859a81143
+ pristine_git_object: e695cb694be73ef388c6039ef8803a6ce146e500
+ docs/components/order.md:
+ id: 16e6ae6962e7
+ last_write_checksum: sha1:a060705e562a2f3fc024c4fd8aa80604535b0bc1
+ pristine_git_object: b0e21fa3c30d5f4efb71936cd033937d0b0ad8a9
+ docs/components/outputapplypatchservertoolitem.md:
+ id: 31b40a05f9bf
+ last_write_checksum: sha1:6060e1f8ffa79af2c60eb80637b5ad2130b79501
+ pristine_git_object: ffa5f0e7eeb63de787e8b1830482ffa368976413
+ docs/components/outputapplypatchservertoolitemtype.md:
+ id: 0fc0eefe1f94
+ last_write_checksum: sha1:4e7bd5264d2da2fb6fb31d4f17cff1c5f6159e41
+ pristine_git_object: 6bcda35808f730436e4fe9e0c6a3411b72c026c0
+ docs/components/outputbashservertoolitem.md:
+ id: 4835772a8420
+ last_write_checksum: sha1:762c035946c6c7d58b272dd7adc66761e772a264
+ pristine_git_object: 1008d6ebfa3de7850ae1b0ebc5d6d5c027f58bfd
+ docs/components/outputbashservertoolitemtype.md:
+ id: b822f3bac2fb
+ last_write_checksum: sha1:045b19bd838ba1a8d148a827b700d312ba9cd2ea
+ pristine_git_object: 60528d753e2113dfc4ec8b3b97eff63f5b425801
+ docs/components/outputbrowseruseservertoolitem.md:
+ id: bb331a0a59bb
+ last_write_checksum: sha1:4baff51073d1e0b8cb724411a068e1b60dedef64
+ pristine_git_object: 240e7d9741e9d6405a5e68c852f041ca4b477327
+ docs/components/outputbrowseruseservertoolitemtype.md:
+ id: 5443792d20bb
+ last_write_checksum: sha1:bf84e13c162b48aa42cd6eeff125a752a3ceaa4b
+ pristine_git_object: 09b9d7d6a0d608702fa83d18b5e212b40569fb7d
+ docs/components/outputcodeinterpretercallitem.md:
+ id: 1e909305d0d7
+ last_write_checksum: sha1:255322a6005c7ed1e4f62ebb9dd7e4c40177083e
+ pristine_git_object: 992a9971f979141c3da52d3ffd21489e1f2e9ad0
+ docs/components/outputcodeinterpretercallitemoutputunion.md:
+ id: 20b1004f0b3d
+ last_write_checksum: sha1:29fa7ad397141191b331383f8931d77b1bef4000
+ pristine_git_object: 458ad8c97d2d4f05dc5858b26b062a48520482f2
+ docs/components/outputcodeinterpreterservertoolitem.md:
+ id: eaafa674fcfc
+ last_write_checksum: sha1:28c0bb8b3f4e1925d63066e6e450945ac1708bfc
+ pristine_git_object: ba02a1bc7616be6e0d7dac6e86d73b194055a9d9
+ docs/components/outputcodeinterpreterservertoolitemtype.md:
+ id: 3ba159197184
+ last_write_checksum: sha1:99d08eca63ae6f530d0a0d854662e57210b87e66
+ pristine_git_object: c5039dae98620bb96457d264702586d993b89853
+ docs/components/outputcomputercallitem.md:
+ id: c67aa5789709
+ last_write_checksum: sha1:16763c6bd0ef2cba4c98f675bf9bdda65585e172
+ pristine_git_object: ad8023fe1cf62670a86cdcd6fc93f81e2365721f
+ docs/components/outputcomputercallitemstatus.md:
+ id: 2b335f7927f0
+ last_write_checksum: sha1:0c167ca5a567467294a48add5f2aaf056ddb81e6
+ pristine_git_object: 72afd5f088a1c8fe87c505aed8d524cf160297dd
+ docs/components/outputcomputercallitemtype.md:
+ id: 93a8202e16fc
+ last_write_checksum: sha1:3d997f3397a92ffd8d05ff539073e06c38b0e2bc
+ pristine_git_object: 6433a41ff2a718dc451382f1d3a5e616e7c6d5d9
docs/components/outputdatetimeitem.md:
id: eccb35ac217b
- last_write_checksum: sha1:fb7447f3720cb522f23967abc06bb33496bdddf0
- pristine_git_object: 0f4c677683209714f76d864f9be5e65af8f6ad2b
- docs/components/outputdatetimeitemstatus.md:
- id: cb32e33b5a87
- last_write_checksum: sha1:ca0b9cfcd278336c8d8a17992e6f2870b677ab4a
- pristine_git_object: 7e8ce5ec974187ec2869bcf4d330888d7026fb37
+ last_write_checksum: sha1:426d333d7fa20b3da448c40c5d1d6f0cd6667ebb
+ pristine_git_object: a7fa2c93c39329d22f3b7a3a3623b2761e81430a
docs/components/outputdatetimeitemtype.md:
id: 442b4d04e81f
last_write_checksum: sha1:57d010210f56af5a8cd00988ccd7c9032a7799f3
pristine_git_object: b6680f420d6cad71e6e6012787f21c8fdc11e42f
docs/components/outputfilesearchcallitem.md:
id: e1453f81fc58
- last_write_checksum: sha1:836ba95ceaf0cee59053022b932d2f0a43dacdb8
- pristine_git_object: c039733e00249be4168477c9430cc074759b1b8f
+ last_write_checksum: sha1:adf0a841d4566984111a90563062be453b3fbb87
+ pristine_git_object: 6fc2b2bc8f1f69e7cbf45a035b8a2f2db9079011
docs/components/outputfilesearchcallitemtype.md:
id: 9879cb2103c5
last_write_checksum: sha1:f3ed9f8762aa542168e2ccf5a4b7a9dc108dc4c8
pristine_git_object: a1710707c286ba7a953f582fbd58d43b0ac380c4
+ docs/components/outputfilesearchservertoolitem.md:
+ id: 00acb647b753
+ last_write_checksum: sha1:ebdf1bb2ef2568dbf9e7a4a0d1868f3c89cbcfab
+ pristine_git_object: 30874270a4ec1a93e80d5512dd8247e8a0de7d67
+ docs/components/outputfilesearchservertoolitemtype.md:
+ id: 706d9134f7f4
+ last_write_checksum: sha1:2a870670b74028e5d40aac474e3cb64527a740f8
+ pristine_git_object: 52d2d39bfacfe9086893c241a4bc4e22f7d13ddc
docs/components/outputformat.md:
id: 6699f32fe6fa
last_write_checksum: sha1:f02204f21f3fb218890b08c23458c4db9d27b634
pristine_git_object: 7f5c5453ac49de51f495c9bc9ab491a02025e92b
docs/components/outputfunctioncallitem.md:
id: a0b3dcf93469
- last_write_checksum: sha1:163ad39b43bc3e137a87c94a45c586e0784d13cc
- pristine_git_object: a5179a2004888c8230ae0686ab67868c24a32e74
+ last_write_checksum: sha1:c87ae53881823e5d660d25ee190d316e16026cbf
+ pristine_git_object: a1bfc0dc317f6638d51dcb248757660829983925
docs/components/outputfunctioncallitemstatuscompleted.md:
id: fcce7d103880
last_write_checksum: sha1:a555c5ed9cfba8bb91a9f3bbfa561a4df06e1d6a
@@ -1566,42 +1666,74 @@ trackedFiles:
id: e4f072d4f1d1
last_write_checksum: sha1:042aa6381e2b6b199e9ec48f1554f011403525b6
pristine_git_object: 31066e50f45a2f32c35d0389886757885704ea4a
+ docs/components/outputimage.md:
+ id: 6f1d41cfe2f6
+ last_write_checksum: sha1:ade263b8889aa203c5fa3444d2868c589424ff49
+ pristine_git_object: 95bbdbd77be64f6a25658241601342c6dad545a2
docs/components/outputimagegenerationcallitem.md:
id: e91e03b12978
- last_write_checksum: sha1:b5a331bbdb21e15cb5c1946522f3ab074a498b4c
- pristine_git_object: dac90486a2fbe6def009c2b79b55a5284a9ea9b2
+ last_write_checksum: sha1:9128df964c87da7033866dc035b806b2012ec070
+ pristine_git_object: b3f7449eaaaabc75d29f3af78e16ebac44cbc8c4
docs/components/outputimagegenerationcallitemtype.md:
id: 0a38d9247096
last_write_checksum: sha1:9907040d8512c264d437364514ecbe6db6d2f743
pristine_git_object: d7d592b96122136f2e4becd5edc72b95062d6237
+ docs/components/outputimagegenerationservertoolitem.md:
+ id: 0a39a1c10949
+ last_write_checksum: sha1:b7ffc78b0acdbd0c9e5c9b6a777e8e2e39ff16ee
+ pristine_git_object: 563b9e780a842074f1ea9da0a9b81133833609fc
+ docs/components/outputimagegenerationservertoolitemtype.md:
+ id: e8483d8856aa
+ last_write_checksum: sha1:43f034d1b716ef2878be034bb01e836395c7b686
+ pristine_git_object: bd9e1fe6213d47f2eb203ae3765551cae69784cc
docs/components/outputinputimage.md:
id: 776d1d3ae41b
- last_write_checksum: sha1:7469c33228e2fde6372221f83ecb530c6b82c262
- pristine_git_object: aa7fdb8838409707d493227f2bd91de719fc4cc1
+ last_write_checksum: sha1:c1fdf4043148b34fc92ea0363006731dddc8e3cc
+ pristine_git_object: 6a3865d688cfa35328a6e6e4c409d2caf7541bd1
docs/components/outputitemimagegenerationcall.md:
id: 1338bdb69860
- last_write_checksum: sha1:6d4888c7863d4ff76962256201142558fc7f57b3
- pristine_git_object: 125c3632000065776bdd360122765a758caf6530
+ last_write_checksum: sha1:d08ae2d3ad68eadc96ec27786fbe23a32a0aa82e
+ pristine_git_object: 735eb058959e7177bd51fc04682f2d2a1a22e61d
docs/components/outputitemimagegenerationcalltype.md:
id: da05f040f584
last_write_checksum: sha1:a7392cdfaa9599c069db92faf4b9f9a87603d29d
pristine_git_object: d9e663fcae49dba7885223f4f0848aa9f9a23002
docs/components/outputitems.md:
id: 92565743132e
- last_write_checksum: sha1:07933fffd557f1aafcee6dad398a3c7908a0658c
- pristine_git_object: e2bd46bdf66e2fb405f61075d6498a30ae377178
+ last_write_checksum: sha1:0080f5650ea184795c28fc44983eec2989b58634
+ pristine_git_object: aaa3a85a2a72fba77cc2a3e939d8df3a00e1073e
+ docs/components/outputlogs.md:
+ id: 0821eefe9546
+ last_write_checksum: sha1:1ff4592093bd2fe28038cc8db28bee6a35025c96
+ pristine_git_object: 45b477fbc8bf92fb6e5441bd9d198a90b97a521c
+ docs/components/outputmcpservertoolitem.md:
+ id: 19fb7f7d6864
+ last_write_checksum: sha1:26f0997f15397e0648b85d05331a78e0da84b485
+ pristine_git_object: a9e3a8223a8f5e54005a845a858b0c8bfd3b0b7f
+ docs/components/outputmcpservertoolitemtype.md:
+ id: bd581943f317
+ last_write_checksum: sha1:ba58cfc0cbb268628ac3bb09b3f18593093f9f53
+ pristine_git_object: 368417c285d7e3dbee81ef64393fe52c24d1ec00
+ docs/components/outputmemoryservertoolitem.md:
+ id: 77b3b280d389
+ last_write_checksum: sha1:7c369c877e6714193c82f7a3d0571e45dc18db41
+ pristine_git_object: da0de56911025a180c945516b82b88546adce0fc
+ docs/components/outputmemoryservertoolitemtype.md:
+ id: 853f37d4ee26
+ last_write_checksum: sha1:ae07c21e90f54653e998f6149ca79a1d6e6eae74
+ pristine_git_object: 3c78696d67e73f6bea782a99ec4b2dc8bdf43f4a
docs/components/outputmessage.md:
id: e0ec2ca7f0e2
- last_write_checksum: sha1:aeba62f08e8ba95d292bdfa5cd4c68902f50adb7
- pristine_git_object: 4cb87d599c03faed0897c7b4da75e63acda77e6a
+ last_write_checksum: sha1:399e00c91eb89ff6741e058f911c57ac0e3a160e
+ pristine_git_object: e59886ce15b46ea82f8a9921446187b75b00d4cc
docs/components/outputmessagecontent.md:
id: 034f3de27e7b
last_write_checksum: sha1:39b6fda5c977820fe327628faaa7617ee569c22a
pristine_git_object: d8ae814ddb4c7da2357ed9778a312a0944b5a331
docs/components/outputmessageitem.md:
id: 3d3fe949119b
- last_write_checksum: sha1:2188f92a73afeaee5788ad48d38e46944864426f
- pristine_git_object: ba1712d3a47424b8fdb9a484b5648914461a2e2c
+ last_write_checksum: sha1:52efe2e9127aeedb2853ae259fe606201b7de836
+ pristine_git_object: 631ba682b4bfe921f377c517fd89f01affcace53
docs/components/outputmessageitemcontent.md:
id: 055891480f4f
last_write_checksum: sha1:ef754b5f638dffe88175af6a3fb73df886419983
@@ -1680,20 +1812,16 @@ trackedFiles:
pristine_git_object: acbedfe1aca86bfe4d682abcd075b89d872e9e06
docs/components/outputmodality.md:
id: 8e1105f01041
- last_write_checksum: sha1:ac10a810ace775c137715a79ccc930fed7747706
- pristine_git_object: faae463c15299a9c9e20e2c9f21944813e00caca
+ last_write_checksum: sha1:6fe20f70faa190a188e00961cb8f13edb2dc371c
+ pristine_git_object: 7b8edcffcb042e3dd1115d6a2f976ac4d5967461
docs/components/outputmodalityenum.md:
id: 9e9b5b751962
last_write_checksum: sha1:e445a894b182e6fd805d5b9310d13b8a8520349d
pristine_git_object: c2beec6de41ecb535d9b22a97ad3a21f8e6a2f28
docs/components/outputreasoningitem.md:
id: 5196f1ee0df3
- last_write_checksum: sha1:82a7f9323c12cdf15077bf430719c8724e65974b
- pristine_git_object: 1ed034a1d0e6087ea0bababfa86074d5e41f6388
- docs/components/outputreasoningitemformat.md:
- id: 4d0dcfdc5642
- last_write_checksum: sha1:5e41fa47fe1824ec9dabc2fd1fa82f3701c832cd
- pristine_git_object: b808f81d563b3b5828791af2a423951160452c19
+ last_write_checksum: sha1:05f08cf1c1d78df5d87acc3ed8e4620e64ef2b78
+ pristine_git_object: 9a3cbf8f3f0b118abaa8a41d1983c69d93fa68ef
docs/components/outputreasoningitemstatuscompleted.md:
id: 35ed5dfbdcc9
last_write_checksum: sha1:78a2aa4842aab41e9734429e08c571430162a80e
@@ -1714,30 +1842,54 @@ trackedFiles:
id: 2efd271441f7
last_write_checksum: sha1:36a63bf61d927a595f3e58dd0b607a8937db9ff3
pristine_git_object: 24800454b81c6b2f9a0180f283d793216bd90384
- docs/components/outputservertoolitem.md:
- id: 87e536c2b92e
- last_write_checksum: sha1:cff2c6957e34262ca131da6fb2b9f1724cdc0394
- pristine_git_object: fb6b6b434b3cc0993daf633eee12d80ca2e17f3b
- docs/components/outputservertoolitemstatus.md:
- id: 2b28c10bf6ff
- last_write_checksum: sha1:c7593744dc45b7b5744e150f376dd9ce0e7b0f99
- pristine_git_object: af6820d0a5f9d81a7baaf8e55a1f2bcc268f2383
+ docs/components/outputtexteditorservertoolitem.md:
+ id: 6c114519044a
+ last_write_checksum: sha1:7b90b5ce30ff6df03376e337e266dbdadfa751c0
+ pristine_git_object: 06f7eccc2b458a3a5bee3f6e5f02b46e6ebb91d1
+ docs/components/outputtexteditorservertoolitemtype.md:
+ id: 939ee7d54395
+ last_write_checksum: sha1:3cfe652a6c4711060fe0d104102950bf3f7a9b35
+ pristine_git_object: 78603c1ee2edfe1c78683dfa6d273bf63dc1024e
docs/components/outputtokensdetails.md:
id: 5d5eb3509e1a
- last_write_checksum: sha1:27eae80aebbee79d67c8c160cb13f2bbdbf12a8b
- pristine_git_object: 430d40b25573760453873e2c56e85518eb2ebfda
- docs/components/outputtype.md:
- id: 6d5c120fbdae
- last_write_checksum: sha1:f129808a3a3c912f1a5fdb7ca6573beca109cdb8
- pristine_git_object: 81e1750f55b3620ec46361e6f900f3341056ee43
+ last_write_checksum: sha1:f011b1d1a289f1a34210a81d5c144322735aed16
+ pristine_git_object: 59bf4277688bf4500a9ac4dfce0e0c33fb4311f9
+ docs/components/outputtoolsearchservertoolitem.md:
+ id: 5936350a7874
+ last_write_checksum: sha1:d7e0189335ea808bc9c65ef6b5f6c8a69b78bce2
+ pristine_git_object: ba436ee49f6d0a14368453c8738993847d6b9054
+ docs/components/outputtoolsearchservertoolitemtype.md:
+ id: ce666db43fa6
+ last_write_checksum: sha1:a20dc4692ec094bc22c7689f9ae05aafa2a757fc
+ pristine_git_object: 0083cab9d32c4c2364eaafd66c376220aa8ece54
+ docs/components/outputwebfetchservertoolitem.md:
+ id: 9f1abd1711b9
+ last_write_checksum: sha1:22b9c861aefe5a3316875212f6db6401c24b6ec5
+ pristine_git_object: 251e0495c03d2cb1edb1500df2bd5c32610e127c
+ docs/components/outputwebfetchservertoolitemtype.md:
+ id: 6e1e0de2a502
+ last_write_checksum: sha1:0c7af6f7dce5a92e6c906e8edfd6524b949f0857
+ pristine_git_object: a81ab5dff5c808fcaadefd99601f35fdeb765212
docs/components/outputwebsearchcallitem.md:
id: 7d5a537f4c7c
- last_write_checksum: sha1:c38d2926b0f1fd76cc337d9e96205e6e52e6fccd
- pristine_git_object: cff2080ab9e4bb53d3553aad108caa23daa3a754
+ last_write_checksum: sha1:7b1b7592236a4bfcba7eeae5d67d86579c86679d
+ pristine_git_object: 8b512f47e3ea22da48a6ef9c9f2a664ca80b9751
+ 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
docs/components/parameter.md:
id: d1b8871be7f8
- last_write_checksum: sha1:b1802dc179a44a9dc7becd0b416822c029f07852
- pristine_git_object: b638d09adc65c3f8f2608ce4d46171e5bdfacf3c
+ 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/partition.md:
id: cc74439b2251
last_write_checksum: sha1:de88a6dedcd65f73fca2bd1913f7cbfd0d62a4ba
@@ -1764,24 +1916,28 @@ trackedFiles:
pristine_git_object: 84226b8778909aec357ac1207cba468a9351cd5c
docs/components/pdfparseroptions.md:
id: c0dac3d032e3
- last_write_checksum: sha1:b79f362961709409863df4a2b05fc6920f4587ad
- pristine_git_object: 6bd996797e648b074c7e38ec77bf8f93306b1878
+ last_write_checksum: sha1:dfd5d9867b4d2d540c6afb3092b22cbcf574c71d
+ pristine_git_object: 05a4fc47fb7c6111c9cc2349e5457408fd1eda29
+ docs/components/pendingsafetycheck.md:
+ id: f8a4b06e4b7a
+ last_write_checksum: sha1:6b2ecccf62ced224c6dd5252b3f16aa202feec0b
+ pristine_git_object: 1923aac7c5fae150b9dc96ef9ee63797aebd31da
docs/components/percentilelatencycutoffs.md:
id: 2e543a8a2907
- last_write_checksum: sha1:8235ed4e1c6c74a0038d35db3e68571f55482537
- pristine_git_object: 6a2c04f7d3c8b6e9f1d5151b92bd08991b836e4d
+ last_write_checksum: sha1:f47d597ca6c81f9edcfc8b006ac57afc093f7619
+ pristine_git_object: 7533ba097a0b16ef83ba3f5a2262dca063e4ec1e
docs/components/percentilestats.md:
id: 1b4159e54240
last_write_checksum: sha1:33924fa3e9065174b3d235abfe1da6cd8de3a559
pristine_git_object: 6f47431682a0b8df76b71f7088bd60ae3b719cdf
docs/components/percentilethroughputcutoffs.md:
id: 5b84667c97a1
- last_write_checksum: sha1:5dd867ac4a1fecbe3807b8b371f2537ade03f5e4
- pristine_git_object: dff209d8cd956e99615d1cf6e7cd06f072cdbd2e
+ last_write_checksum: sha1:179cc2fa2319b2679655aca315412a738b648de9
+ pristine_git_object: 41f258ff5306edb8d4b3cf5ce0f3f0499c9354ca
docs/components/perrequestlimits.md:
id: b3e279b3aa17
- last_write_checksum: sha1:df11f36c2025f8419eae1faa0f5542e32e311335
- pristine_git_object: 607ebc6c79c918a179b210d205e8b5b973226ee4
+ last_write_checksum: sha1:4b5e8c0bb453b54a0c31faffca45d3ded875be48
+ pristine_git_object: f42074dab36af7d2b068c0b24652b7db672dc0cc
docs/components/preferredmaxlatency.md:
id: 0b82201b730d
last_write_checksum: sha1:5dc1be79949b581650dbecd75ab4afccbf320a8b
@@ -1792,112 +1948,60 @@ trackedFiles:
pristine_git_object: fd49bf88b75891b0f2a659a453ff3e3aa0d55ae8
docs/components/preview20250311websearchservertool.md:
id: 0ba7bd853f96
- last_write_checksum: sha1:631bcb62be67a8b1d3cd5817380c15a876883994
- pristine_git_object: 0dc73e3a117f7aa0bdcafe0da443f224f7767ab3
- docs/components/preview20250311websearchservertoolengine.md:
- id: 0abe4888932d
- last_write_checksum: sha1:0e32338b5b9790ca5f49a45906937349d5d613a4
- pristine_git_object: 9e159d5e6951612d8150d58853c9b1f95bc8d7e6
- docs/components/preview20250311websearchservertoolfilters.md:
- id: 93e245d72895
- last_write_checksum: sha1:2c223e01f193af4ae37aa700ce21736ad5ad2c8d
- pristine_git_object: fdadb163ea66905410b7570ba02b2e3e6e10a75b
+ last_write_checksum: sha1:f29b3b4d60d9144b753d57bb606825dd647a4146
+ pristine_git_object: f11fbc20667eefc4bf96f9b0f6245097682c5493
docs/components/preview20250311websearchservertooltype.md:
id: 7258d1f3ed79
last_write_checksum: sha1:8fd6c12c225e6756938f25e97c6818a7477d9408
pristine_git_object: 16caa8a6f0ac16b49437cb1a95e5c93781d98d01
docs/components/previewwebsearchservertool.md:
id: b43bb7090a75
- last_write_checksum: sha1:f0f8241dc61527cdb2b41cb42397aecbe0bd2f4b
- pristine_git_object: 73d06677c03a1839532402cdb9d5c241dbd6b41e
- docs/components/previewwebsearchservertoolengine.md:
- id: 741f450c1d8f
- last_write_checksum: sha1:eee87201a26426172787af2982e92f829672c014
- pristine_git_object: 3d2a48f1652315c2448a2b6be8c882d37b5f93e2
- docs/components/previewwebsearchservertoolfilters.md:
- id: 06e32d85821b
- last_write_checksum: sha1:186041d014a25d0ebbe72ec24973b246c642f1d2
- pristine_git_object: 5e27502902730f8ebc9fd2cf39d8a87e8edcf963
+ last_write_checksum: sha1:9aeb9d3a4f3951fd8db0cd892d1dfe676e7888f3
+ pristine_git_object: 43701ad75870e8b0ddbd792cfc86e2724aaf7e54
docs/components/previewwebsearchservertooltype.md:
id: c6073c9ee3eb
last_write_checksum: sha1:46f579d5f71a87b20d7ca0674004ced55c37121b
pristine_git_object: acff7387bf13fae0aac386037cc19e5d36f55782
docs/components/previewwebsearchuserlocation.md:
id: 36921d9aba44
- last_write_checksum: sha1:c44bbc5af7a70e60eb908574723704d0f8440c15
- pristine_git_object: 843b2a6d9b9fccb67dbf7ad82f35cbe67da851cf
+ last_write_checksum: sha1:ed8c8dfd114b590b5da26a5f340e3d88080ba377
+ pristine_git_object: 3d26cf99f11f223344ffbbc2fb8e494419894c43
docs/components/previewwebsearchuserlocationtype.md:
id: fa0c85429645
last_write_checksum: sha1:34d91154dfedd31083714270161a12817191c13c
pristine_git_object: 685705c19f968d6408d3bfc3d398eddb2ef5e52a
docs/components/pricing.md:
id: 15dca753d9eb
- last_write_checksum: sha1:529e8ba25ca5edf4fef14c26630ed51c9b5df89c
- pristine_git_object: a997dda76ae9521dd499a796c69279272f42d8e0
+ last_write_checksum: sha1:11793d86b7506e8bfee21225071f1841bbb368ab
+ pristine_git_object: 084b83a2e83521084ef17c63e88007953e5d3170
docs/components/prompttokensdetails.md:
id: 58d2af57c508
- last_write_checksum: sha1:f95cce3bfd4a266e07027a7d56924c746b37e9b5
- pristine_git_object: a929f8769cb3a7341b97ea205e4784d568be78eb
+ 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:610b9e542cc0d7b774c1fc133b1fde5c8308ea12
- pristine_git_object: 25d8ded2e4c6062327f1440066057abf24935e2c
+ last_write_checksum: sha1:47af6679dbedcf8d8d0ac8995cfc9cd3020a6b7b
+ pristine_git_object: 22effdd1f55bc9d60648a80e825e17d4b94b01c1
docs/components/provideroverloadedresponseerrordata.md:
id: c2a8cc4ec6df
last_write_checksum: sha1:1d206d00dc0d91b5ceec470579c6ce345cc23d29
pristine_git_object: afebc305bd99e4b9b682bc2b82aadf318767083e
docs/components/providerpreferences.md:
id: 22d442ed4785
- last_write_checksum: sha1:31a21b8f81ad077301e6497f7ef146d3fd427473
- pristine_git_object: c95276b633ca63462b826652843324db3afc3ee3
- docs/components/providerpreferencesby.md:
- id: 08ddbb3c669d
- last_write_checksum: sha1:688a2d7ee10b13ea8fe7835b1a3387e9aa25472d
- pristine_git_object: 2af40e5ad7e9951b7a7b731a4769f178946d0e0d
- docs/components/providerpreferencesignore.md:
- id: 13e56a8bb6a4
- last_write_checksum: sha1:9ba4bf53d6dbd64ca265a335696a4fad449ba6a0
- pristine_git_object: 2d18b70759ac1f28a7402f3833aab2e66cdb03df
- docs/components/providerpreferencesmaxprice.md:
- id: a585cad61e37
- last_write_checksum: sha1:ea25c68b1fa37786a23defda6852dcf45041c195
- pristine_git_object: fb14872176e26b2b37ce86bb2d2a7dac39b2115a
- docs/components/providerpreferencesonly.md:
- id: ebc63eab9ac8
- last_write_checksum: sha1:f60cd17501f5cf71cfd1a49a538ac21cdb132f0b
- pristine_git_object: be68765de2e18a113986032ac3aa48cf1faf44b8
- docs/components/providerpreferencesorder.md:
- id: 47f5e03f1a4c
- last_write_checksum: sha1:a9429a108d9cbfc1b0810ae0d839800f60654525
- pristine_git_object: ccc7218a4057af0d0bd87cbcf399e3305efe4792
- docs/components/providerpreferencespartition.md:
- id: 3ce968e1b44d
- last_write_checksum: sha1:b821ad35e9f11e48c9f3cc6672673df782f19c93
- pristine_git_object: 147aefe4d9e2824cdbc2184f11b6fc492647f1d8
- docs/components/providerpreferencesprovidersort.md:
- id: 2856a1eb4306
- last_write_checksum: sha1:cf2079b6045182f8dea3121e3121f1453b3cfef6
- pristine_git_object: 2f06e03a80296dbaddb5ba16ef4ca457c0497839
- docs/components/providerpreferencesprovidersortconfig.md:
- id: eb732edec47f
- last_write_checksum: sha1:edd978fc4b7dded3b44ebb11238ec4ddb1bbb9d8
- pristine_git_object: 95e5f0566bf32c3bd8e4f04285398433d0b1e12b
- docs/components/providerpreferencesprovidersortconfigenum.md:
- id: b4ad5fe913d5
- last_write_checksum: sha1:8db34ff61258a18987323066bd1d9081a9b58403
- pristine_git_object: 3e50142957a48a594e7dff0cd3c236349bcf4643
- docs/components/providerpreferencesprovidersortconfigunion.md:
- id: 06a28e23e5a9
- last_write_checksum: sha1:a0244388066c7961f3449783ac15d316ab44f3a2
- pristine_git_object: 3b811f716be97e538f23aa97f83a7a8525adaee0
- docs/components/providerpreferencessortenum.md:
- id: 74782e12d545
- last_write_checksum: sha1:6cc8720730bfaad057a85b2eb79b605d7aafdcd2
- pristine_git_object: 70cdaa9d783d6cef16b3030cddac5cde9e06c3a3
- docs/components/providerpreferencessortunion.md:
- id: 9692a76779ae
- last_write_checksum: sha1:aef3513308cce7c7978b6255e3d34607bcf22b85
- pristine_git_object: 172baacbaeacdab65e71d27dc2e5e62a4740983b
+ last_write_checksum: sha1:08d9e64287a564324af93fcde71fa7d13d05c66d
+ pristine_git_object: 2321236ed51accb2e65a5b54c9dd727d720f6bc8
+ docs/components/providerresponse.md:
+ id: 4574bcbd4144
+ last_write_checksum: sha1:fa7655aac30b91780f44cd912b9923d9af3f6300
+ pristine_git_object: 9dca4ee9d4a9ec0a46ce21fb3823f05e8e119334
+ docs/components/providerresponseprovidername.md:
+ id: 800bab487911
+ last_write_checksum: sha1:befe2d2077d8abc969729b09ce4aba6a2b14bb37
+ pristine_git_object: 73838c84a7682a4b6903b0ab3383b6514ca6951e
docs/components/providersort.md:
id: 290449b1880f
last_write_checksum: sha1:f15d65e5c226a222c3bfc0b9f55dd9ca0443d415
@@ -1908,16 +2012,16 @@ trackedFiles:
pristine_git_object: 70db18a3a953e992834a54a5744f1a7245d081d0
docs/components/publicendpoint.md:
id: 46f345cbc943
- last_write_checksum: sha1:13f0b08536e5158fab6ac21250392483b1e2d70b
- pristine_git_object: 147ff5198dda9b2faa2b8fa89d16a88c5bedd609
+ last_write_checksum: sha1:71ffe84c9a502eab6e1050e3e5751b448be0c366
+ pristine_git_object: 7a67576134989c4e8066a95b558a409dba604790
docs/components/publicendpointquantization.md:
id: c94b72bd3c23
last_write_checksum: sha1:e79fcd7d4a2829c2f696b79f050e56f1343a86a4
pristine_git_object: 7d0edd22dafe693920f18e0c0c99b852c6b3bb57
docs/components/publicpricing.md:
id: 9d43651da8ad
- last_write_checksum: sha1:160b21fa2437d7424acb07eaf02aba802c873be4
- pristine_git_object: c7ac704cd2ebe8ca2637987ac0e8628bbc01b788
+ last_write_checksum: sha1:c066038e95bcbaec6cb1eeb3b5657102c37ee5a7
+ pristine_git_object: b96d4af729e9e69d041122e88b11e82cd2db8878
docs/components/quality.md:
id: dd4dd0d7b023
last_write_checksum: sha1:6191307209f88c4d94d43a9f9b2e200a2b16cc66
@@ -1940,80 +2044,68 @@ trackedFiles:
pristine_git_object: 1c21d0457d1c635b8eff2a46144cac5e24840183
docs/components/reasoning.md:
id: 57e5fc147254
- last_write_checksum: sha1:ce17ee66a534713a4b757d21665d94e81d347aa8
- pristine_git_object: 0a8755d71950a9ea630080887b46bde2e9438647
+ last_write_checksum: sha1:af35fe2b1c30924056ad0fb12921b2f8e9b52d78
+ pristine_git_object: a56f26b8ea8e757ae06a70d89059656024ba7f90
docs/components/reasoningconfig.md:
id: a2d51e262631
- last_write_checksum: sha1:9f12f79bc754554e6dc4dac0d6717dd61ab8ee51
- pristine_git_object: 175f2cd361f99cf83cbddede7db45ade2c51a43c
+ last_write_checksum: sha1:69ad419f6f469e4c4738efb3e8e2c454cf4997a8
+ pristine_git_object: 1a736c5530495e18240c72ff5d28cf14e68490e3
docs/components/reasoningdeltaevent.md:
id: 5d657813c9af
- last_write_checksum: sha1:4757d23d0f8519438e9f01ab516ad7680530c335
- pristine_git_object: a739481a15de3e5d32688f3e2502d71c21205136
+ last_write_checksum: sha1:14999e0c8cf52d33c9e47309e7f82d85ed3e60ab
+ pristine_git_object: c523137050564025f9b567f458b80d6c92275bb4
docs/components/reasoningdeltaeventtype.md:
id: 4bc6c0ee1182
last_write_checksum: sha1:8eb7d791510905b901133c42357d712b799ba99c
pristine_git_object: 8fd61605be2b1caad008dafbc5fbae664c28b7b5
docs/components/reasoningdetailencrypted.md:
id: 410e7c90e4d8
- last_write_checksum: sha1:54b44e1d4b9d6e764303562691ef8ca8133a23f0
- pristine_git_object: 685b2f45259a15e160273078ba2643ad7c75e030
- docs/components/reasoningdetailencryptedformat.md:
- id: 32cb6fde4579
- last_write_checksum: sha1:9eea90a64a6800aad04735b3e701fb7c8a30d8cc
- pristine_git_object: 5648e15b21e3fded75807a69ba5c96db79b8ece2
+ last_write_checksum: sha1:74281a14bbee30728d728e5725c3b96e3b4da4a9
+ pristine_git_object: 44d9d2da2d7729732d27d42e72e6af0912b2d7e1
docs/components/reasoningdetailencryptedtype.md:
id: 7c94a00c5b1e
last_write_checksum: sha1:dc3719ca804f71cae4ea2fab5c69e5fdd6ee355a
pristine_git_object: c574453756cfe8a0b11155d8267ab3d82736c4ef
docs/components/reasoningdetailsummary.md:
id: e3376a9e2eee
- last_write_checksum: sha1:d5f99501f392e379de2f4e9ec81fccd5b1f1238a
- pristine_git_object: 33fcfdf8afd27f7f76279821720bf06d747fd06a
- docs/components/reasoningdetailsummaryformat.md:
- id: 24a7afef11e0
- last_write_checksum: sha1:fe4cfa8f458eca8277ca2f5a8f7a43ba79669a76
- pristine_git_object: 2eae737321e5b244de76993b3be79311e06bf181
+ last_write_checksum: sha1:52f5acd636cad24a90127d208e9f680f01979333
+ pristine_git_object: 1a6e291928060e8df20e9655f6382048eccb031f
docs/components/reasoningdetailsummarytype.md:
id: 158ee2616b70
last_write_checksum: sha1:18e9a212106b11407027d66c899b6e3ed0271344
pristine_git_object: 6de96b93584ce0fdacd35a8e29907e85e6cc05e9
docs/components/reasoningdetailtext.md:
id: 6c40c8515f9f
- last_write_checksum: sha1:b7152e06b8b99e6a66b463aa4a35b6cdca56ea42
- pristine_git_object: 5e224c0a74a50186bd67d2d9b754c6812ea414c9
- docs/components/reasoningdetailtextformat.md:
- id: e6a41fb6eb21
- last_write_checksum: sha1:86f9d6bc3db6bb865f2337cb88179b770066777e
- pristine_git_object: 8a48d10c1008710e02edd03161d2d155dfd5f3ba
+ last_write_checksum: sha1:ab77e33177aab0a1d50c1b5430990d7eb6006858
+ pristine_git_object: 52b113399c11cd4de5bc89875714452e6a788ffd
docs/components/reasoningdetailtexttype.md:
id: f1f8a16d1bf2
last_write_checksum: sha1:fef97ea7ffa115a973e97000d3ae7a79266c8684
pristine_git_object: 2a56e429c7736198136c527b5a026e9cf674de7b
docs/components/reasoningdetailunion.md:
id: 4f4ffac94960
- last_write_checksum: sha1:648600715cfa16d1fbfb19f0b6f67820d2111b2d
- pristine_git_object: af977b31f035f91343cdd22d68f162fb2eebd4b0
+ last_write_checksum: sha1:ee76cb356764894216247d29a2fcb4bbaffeb2b1
+ pristine_git_object: 015b016c641583cebc499d826405c71f4e0a86b2
docs/components/reasoningdoneevent.md:
id: 610fec27fa67
- last_write_checksum: sha1:4fa169b149ef5edebc2a44d4295c955630184da1
- pristine_git_object: 44f0982f2fe92bd140ec06e97f89aa2464920825
+ last_write_checksum: sha1:8455dddf6f10abbf68cfe0704f6b1ae20c6401c1
+ pristine_git_object: 5681555465e949d20ce1e3676757cf8407185a89
docs/components/reasoningdoneeventtype.md:
id: 4cf951ef736e
last_write_checksum: sha1:e2e8bee66451ecf37dc65b38d919318f06899bf1
pristine_git_object: 31d997aa9e0721cacdebfeb79ce3428d5ec79bf0
- docs/components/reasoningeffortenum.md:
- id: d58402a4fd05
- last_write_checksum: sha1:3833cf0605475bf521cde4a7764c103ace76b1ac
- pristine_git_object: 9527c2fd2943fc71100c4a0545e9362f95ca94a8
+ docs/components/reasoningeffort.md:
+ id: ea6dba24a061
+ last_write_checksum: sha1:1a34f59ecfdc631ed846c0e33951b52d2a86beae
+ pristine_git_object: 9fb0ddf227e42c634f5c435a2749db2e7effbf45
+ docs/components/reasoningformat.md:
+ id: c0483881ee4e
+ last_write_checksum: sha1:45038411b97c73c37fa000694770b06d13b0eb4b
+ pristine_git_object: 16654f0baf3850c248f3f13175dfc95ea794c8f7
docs/components/reasoningitem.md:
id: c9f6a9187222
- last_write_checksum: sha1:e2a1791124918174ee01a0f9b42704e37b8eaa77
- pristine_git_object: 8bf3e8c5a0ae9584a9c9a1a9992a390b24db7824
- docs/components/reasoningitemformat.md:
- id: fb83d40fc55b
- last_write_checksum: sha1:35a7573be40cffe930b1fc115d68132ac50ee9e7
- pristine_git_object: 5743fe030c3f0cf3dde7f8bafd2a7f0e9ba71195
+ last_write_checksum: sha1:9636ff42739babe7771b61dd105dd739ed18cdea
+ pristine_git_object: 5f15f758daf56a70ea09d08f2653c3e15aa7a8ee
docs/components/reasoningitemstatuscompleted.md:
id: 2b082c1445db
last_write_checksum: sha1:866fa1bb8b3f8d1d68ff689a2c4f715dfdf4ea70
@@ -2036,36 +2128,36 @@ trackedFiles:
pristine_git_object: c14b732036c588a59aee3b04f8bec51d9a58c140
docs/components/reasoningsummarypartaddedevent.md:
id: 3297c69f1031
- last_write_checksum: sha1:8cb37bd1b2b12cf19be078e1f1fd45371e38d59f
- pristine_git_object: d80d5977ed9f88d717bc2e93a86115a358c4f6e5
+ last_write_checksum: sha1:6b1458b4d5819319e256ebf1517ea582a02cf384
+ pristine_git_object: 38e8a644d74f02cd42b032419f88673876aa53e7
docs/components/reasoningsummarypartaddedeventtype.md:
id: 3a4846a7c613
last_write_checksum: sha1:bd6003eeb746078a313b7f27c4560aa2c33ecb29
pristine_git_object: aa5ebb968e19fb8c96c0fab86ba3f4d8e697c459
docs/components/reasoningsummarypartdoneevent.md:
id: aae02dc325d9
- last_write_checksum: sha1:c6b9fc8a30eb67037ad2b23783e95ae70cba6707
- pristine_git_object: 6220eeb7faa868bd4e881414bf632fab71e28b6d
+ last_write_checksum: sha1:7a63641014b358f068eadd984666a43887188685
+ pristine_git_object: 6d17994d8b92e04e8a1578754324f514ca00554c
docs/components/reasoningsummarypartdoneeventtype.md:
id: 0630358b5fb6
last_write_checksum: sha1:ce572a34e1cf9977e00bfca4838093088732772a
pristine_git_object: 9fec4ad23bad6f3f2e62ef6529859c58f9c70fd7
docs/components/reasoningsummarytext.md:
id: c221ba8e3570
- last_write_checksum: sha1:da0240291bf99658d9bb09865dd00315b9849275
- pristine_git_object: 7bee8c5c067123523aba194df5cd0250ce1e417e
+ last_write_checksum: sha1:62a0facc4c3afacac9c4bdfddb11387eea43b2ad
+ pristine_git_object: 9786305e20e3eafc8a2628e04edbe8981f08ed99
docs/components/reasoningsummarytextdeltaevent.md:
id: af44f6e43997
- last_write_checksum: sha1:abfc6c8788502fb3435237f9f61635e3adcac3fd
- pristine_git_object: 1d6bb65b1fa97527a91e2d5741b0ffeee9cceec2
+ last_write_checksum: sha1:a6d737a401b8826f8d512af74043b7158c915d02
+ pristine_git_object: c76001aa709deb724c766c7b1d8a7b8b080842a9
docs/components/reasoningsummarytextdeltaeventtype.md:
id: cd79224d89a4
last_write_checksum: sha1:4b1ac85310044496ef2b073786fce9a83d922be0
pristine_git_object: b8d5ba75fbd46032fa02bdacad51a31225ad7fd4
docs/components/reasoningsummarytextdoneevent.md:
id: 002e9b6317d6
- last_write_checksum: sha1:5c02a59552cac54fb678c1e4873034cef38accac
- pristine_git_object: 7be33a1721622e13efbec2504a8903e1ffda0b96
+ last_write_checksum: sha1:e7db0e468f38a4ec8303ac7a824ceffad5621fe7
+ pristine_git_object: 1b1a217d8297b120751418ff0cbb86f8a752090d
docs/components/reasoningsummarytextdoneeventtype.md:
id: f398db687eb5
last_write_checksum: sha1:771287f4db2462e770c576c243e836a6991390f9
@@ -2074,30 +2166,30 @@ trackedFiles:
id: 7579578d3af3
last_write_checksum: sha1:bbae6e3bc66ffc4661ac12c300fbc2061588733d
pristine_git_object: af36e333e2e50af756433ceffb26f2eb08442b61
- docs/components/reasoningsummaryverbosityenum.md:
- id: 41371f991bed
- last_write_checksum: sha1:ae1ca865de542b276bad0be2159ac94ac8e3712e
- pristine_git_object: 97eda26c982a6e9f6adb3177ead7ad97f6626f32
+ docs/components/reasoningsummaryverbosity.md:
+ id: b7eebec4d7cd
+ last_write_checksum: sha1:4e73d230d13f73db44cb9282a40029154a127565
+ pristine_git_object: cc36f39ba426e6e453162f8b7af7c067db604aba
docs/components/reasoningtextcontent.md:
id: 4178daf4c506
- last_write_checksum: sha1:be81b290d91a007ce9dbc489c872e63d94dae4cc
- pristine_git_object: 40aa10a23f24d07603880b3b38b3ffcdb304d65d
+ last_write_checksum: sha1:029583e3e4ab024e55feffdf6a6949e48bd8ea17
+ pristine_git_object: 500d7a1a932018966b1409ca75d0847bef8e1335
docs/components/reasoningtextcontenttype.md:
id: 22b777e7bb71
last_write_checksum: sha1:a43be1428333ef3082148054dcacb73b4b7a4ee4
pristine_git_object: f3646d44686e7d48c526d8417b0a56db35d7290d
docs/components/refusaldeltaevent.md:
id: 9c64cdf1cac4
- last_write_checksum: sha1:373335a4b6e8140a2dcd8d9bc07a8e0b53e92e31
- pristine_git_object: 6c18f8f061510f259f6004d48ba94b6498f1ad70
+ last_write_checksum: sha1:8610f12e1fa4af528f2dda1d734b16f70ab70a99
+ pristine_git_object: e791265cb95569755e82f8ec8d69885b6e43a27e
docs/components/refusaldeltaeventtype.md:
id: 24a36da3d484
last_write_checksum: sha1:ab1a0ada35eb3123f18f64416ef9c9f1e415681e
pristine_git_object: 8aadcc15109d8163d6632b1a4ddf87314641e12a
docs/components/refusaldoneevent.md:
id: 66de77a0628c
- last_write_checksum: sha1:48dcbc60f3f124372a9ad0b5500023811e9b1ac2
- pristine_git_object: 290ad1574abaa1bbc861e77776db1898afcfe785
+ last_write_checksum: sha1:2536f951d8c10846a6039f163055675ef703dff2
+ pristine_git_object: d46662429754f1c006600e8f327244971c8d66d1
docs/components/refusaldoneeventtype.md:
id: c4000667a2c8
last_write_checksum: sha1:2ff86281263010d78e755cdd7289f5daffe05cbf
@@ -2108,8 +2200,8 @@ trackedFiles:
pristine_git_object: 2e062ef576233d063d8117cdb312e2d88846ed33
docs/components/requireapproval.md:
id: 4b47c7f7eca3
- last_write_checksum: sha1:32d315d07893bb67a6c23e84a6aa108c76de07cb
- pristine_git_object: e69f115051478c4b12c9b949d5c83c441ad244fc
+ last_write_checksum: sha1:4c86c2c85fbc89164db23754f283e5f9bb17e367
+ pristine_git_object: 3da3106bc61497cf6f9f7f1b7283516d83c2f958
docs/components/requireapprovalalways.md:
id: 55b258963d0c
last_write_checksum: sha1:ae288dd0e2e6c79d0742ae899b05901c87337137
@@ -2118,26 +2210,38 @@ trackedFiles:
id: 0492eb1833e6
last_write_checksum: sha1:6bca2b6eb5f2a564173ae4a3e468c61e3293a002
pristine_git_object: 7cd7f146635d6a24361f1b881ccbe4e1828e3abc
+ docs/components/requireapprovalunion.md:
+ id: b6f5054b7776
+ last_write_checksum: sha1:9d6c60556b5dee2b3e581934a7e3d48b60034c57
+ pristine_git_object: cc964d62c8f74f43102b289a0613c9b9b928405d
+ docs/components/resolution.md:
+ id: 84d737f84bee
+ last_write_checksum: sha1:606fd74ebc92be927228afd7adefa80e64c47a52
+ pristine_git_object: 596502b2f94707deb347c53015c764525c9ba3b9
docs/components/responseformat.md:
id: 21aa2dcdc770
- last_write_checksum: sha1:beafba5edaef205849f13eb3931243c3d55b1489
- pristine_git_object: db3b37662241eb32327684fa354b2dc80875d4de
+ last_write_checksum: sha1:2ea5efe6bbf68d068fdf992ae335cc4fc2fcf7d7
+ pristine_git_object: 86cd00504691f2fdc33549cb33e9b07d0c31dd3b
+ docs/components/responsehealingplugin.md:
+ id: a9a3b6d3e0c1
+ last_write_checksum: sha1:ba75992bae3382339f5f1e654a91da4cdd1f7eda
+ pristine_git_object: 0a90c208633e8b379812e7742ccaee711b05d0e4
+ docs/components/responsehealingpluginid.md:
+ id: af80ec154093
+ last_write_checksum: sha1:d5a3b91db105d63b61714b2bc638901d15e0dfca
+ pristine_git_object: 27004e94c62657639578572814955300bf60caa4
docs/components/responseincludesenum.md:
id: dcdd5e53c3a4
last_write_checksum: sha1:154df040e05c81e46dd8dd235fff354f41b7c8b5
pristine_git_object: f69d88622286c505b54c290978c1ecb7b2e1562a
docs/components/responseoutputtext.md:
id: ef76a9bd7078
- last_write_checksum: sha1:6ad5165743fc7cbd992ac8b52b467b9770ab3024
- pristine_git_object: 1c8bea48339e162df286c0e5aa2c2621f1bb3e0e
- docs/components/responseoutputtextlogprob.md:
- id: 44ef4c916eea
- last_write_checksum: sha1:08b767f0a37f17b0655af4acc5146f40f5dd0d95
- pristine_git_object: 8d54154542ed05be3a1b46ae8d2d51ca7df3b85e
+ last_write_checksum: sha1:8705b80d6a3db7ccdac8ed5a0fa63f2daf3a548f
+ pristine_git_object: ad73bf9fb78d3bbce3398fa6c89d684b1aea5abd
docs/components/responseoutputtexttoplogprob.md:
id: e1cf9d75cdc9
- last_write_checksum: sha1:836c1a0d52511a99c64dc772e015a32aae3abdd4
- pristine_git_object: 4122cab9d93428aa34d65cbd5bd21a591505778f
+ last_write_checksum: sha1:79094726662b2d0757b9cd79178e63ac4691c1b7
+ pristine_git_object: 73e27f231572c70cb205fed1fc8e21674046016a
docs/components/responseoutputtexttype.md:
id: eb2bc6b65d8f
last_write_checksum: sha1:103072feebd30b09d458646db4d0f4350a4c9a5d
@@ -2148,104 +2252,28 @@ trackedFiles:
pristine_git_object: e21193bbab68ee5dfdb0a113e26ba70f82bcab55
docs/components/responsesrequest.md:
id: cb5cd99790f3
- last_write_checksum: sha1:9e287870498b5d84623108fd4c644b80d4b0738c
- pristine_git_object: c699d5a3a0c57197633ddc36c5d15ef4148cc662
- docs/components/responsesrequestidautorouter.md:
- id: 0b33149d93de
- last_write_checksum: sha1:7206b21c6dc1d8a0dad70d604f7cc6c0ffec6990
- pristine_git_object: 911845f61172eaea0d503087bb703fe25e95cb83
- docs/components/responsesrequestidcontextcompression.md:
- id: cd4857c9cb8f
- last_write_checksum: sha1:cd616d84b038356f2e1649f1388d5a77cd2a2d91
- pristine_git_object: 05ddb0655cd9482c820bc9ee7892cfa2947c977e
- docs/components/responsesrequestidfileparser.md:
- id: 48f5ef8828be
- last_write_checksum: sha1:0731b696a9b17b81b7646e54526e5ef70f5b54f5
- pristine_git_object: b4a4d3644f817cdaa6f5f8d87fea0ae45af95795
- docs/components/responsesrequestidmoderation.md:
- id: f524bc5e9224
- last_write_checksum: sha1:d5c23d7e4233c9580a99dd0a5d4f9df73b634a6f
- pristine_git_object: 01847484ca8dc5b89f494f1073f4179776923d8d
- docs/components/responsesrequestidresponsehealing.md:
- id: 546f6d9b9c92
- last_write_checksum: sha1:7678da1daefb4bc788e806c725634821ec5eef13
- pristine_git_object: 828e86e7832ee676ebe820f7278002fc412ed8fc
- docs/components/responsesrequestidweb.md:
- id: 706ed77dc2be
- last_write_checksum: sha1:204eb9db4654c4acde94446bb108b5f517e7bf2e
- pristine_git_object: c26776524605f0d6e375ab26291e52d15c7d34ab
- docs/components/responsesrequestignore.md:
- id: 8da2f8893b96
- last_write_checksum: sha1:f1ef3c6fe68e727d7e3ae5fd2af8c7055cfddbaa
- pristine_git_object: 9d12f105c563e08ff4a34592aa2bc28a3c0c382d
+ last_write_checksum: sha1:15e35ede71857674622f0a296694278261c03b9e
+ pristine_git_object: 3221ec68d813c85b58df3b8b0a00e3aec7032a44
docs/components/responsesrequestimageconfig.md:
id: c7e2eb6479ef
last_write_checksum: sha1:daaf30cc6be1c88f3fef6b71e3266e78b4425a9b
pristine_git_object: 19366580d12681fcba6345af951f1babfac992bc
- docs/components/responsesrequestmaxprice.md:
- id: 047559d7fe98
- last_write_checksum: sha1:3da8fa94c98864800dd770f396f21d47a8bf1837
- pristine_git_object: dbb359a1d37ffbc7f13ac92ee51c0e1cac4da9e9
- docs/components/responsesrequestonly.md:
- id: bd8170282405
- last_write_checksum: sha1:c384a2e5049c4955b301bddbebf30706573796d5
- pristine_git_object: ed6910ae43bed3e8e758ac93db629ef5ec3e7f69
- docs/components/responsesrequestorder.md:
- id: a7e055e09fcf
- last_write_checksum: sha1:27e61dc1c56f67002dfeb6036e2f14c4b114f831
- pristine_git_object: 0b3f0e0625bb0a8f118f90b57eb15af9dfaca4e0
- docs/components/responsesrequestpluginautorouter.md:
- id: 8e6441aa9b17
- last_write_checksum: sha1:652050e3368acac8e6b24c1337e712762dbf59ba
- pristine_git_object: 346b24f1f151f4586386a5b658d84dc85e43fdc6
- docs/components/responsesrequestplugincontextcompression.md:
- id: bd9f1610ed11
- last_write_checksum: sha1:47a1e34f9a47a1318d3fa0a69fbb78fa726479aa
- pristine_git_object: ee612114aac9236957afa8277930848412fd8d0f
- docs/components/responsesrequestpluginfileparser.md:
- id: a41c8a2a1d8c
- last_write_checksum: sha1:b8b480371066968648529445c170f363b234c1ca
- pristine_git_object: a98ab10c73ec2b1fbdd74518ff9b92c32a841f00
- docs/components/responsesrequestpluginmoderation.md:
- id: d78e283c0e66
- last_write_checksum: sha1:df130cc7a83b619e4eceab0ccef7bf841a6a0e44
- pristine_git_object: b722b76efc7e1ebc6089b519d04018ff045ad620
- docs/components/responsesrequestpluginresponsehealing.md:
- id: 1099f204ad30
- last_write_checksum: sha1:98f472a15cfadf911b12c479b5d78be3edc1436b
- pristine_git_object: 6553f937ce424d424035788a8f4a99a092fcae9d
- docs/components/responsesrequestpluginunion.md:
- id: 29f36b502cdc
- last_write_checksum: sha1:2ed0e7718c8bc158c13aa24cebdef3f510e9c37a
- pristine_git_object: 62bc0ba2e0c0bf1af08054790a286edcd4e92e09
- docs/components/responsesrequestpluginweb.md:
- id: 133b182f44b4
- last_write_checksum: sha1:8bb397f3fd88ecc2a2240dca22cd2fa245c1c6dc
- pristine_git_object: 0d835807a1cbd4ef69baa349f9a0c21ac098b87f
- docs/components/responsesrequestprovider.md:
- id: b5433a95924a
- last_write_checksum: sha1:a940f98c13fee88cc6cbedf4f1300f37563fefd7
- pristine_git_object: 178c12e585afd84b9c32ea62a2821f659a5088ac
+ docs/components/responsesrequestplugin.md:
+ id: 20da7be12bb9
+ last_write_checksum: sha1:14dbd6cd32c51d333548f2c43772c43540dc97fd
+ pristine_git_object: 39234e56fbc2e0bc654e55a7811fca1169ded5da
docs/components/responsesrequestservicetier.md:
id: 79d0f5c6bdbe
last_write_checksum: sha1:759cbf960f90a2680f905be11049e8f88cf6ecda
pristine_git_object: 9eff92befce7294a62c1beab6f47cf037a215885
- docs/components/responsesrequestsort.md:
- id: 9b6fb20e1aa0
- last_write_checksum: sha1:484e4f2450b718c46f35c387b9a8a698775be7d9
- pristine_git_object: 3dfb2ddf2cdf7755180e273ffa848751b10b1297
docs/components/responsesrequesttoolfunction.md:
id: 834bf2b22f82
- last_write_checksum: sha1:6ee2bc4d6abaf89389df8374cee62e5c77f26450
- pristine_git_object: 4e9e877ebddb141ba9ad731c99e7489bbbeea008
+ last_write_checksum: sha1:d7719be37affe12852b150ffaabe6dbfaccf6ae7
+ pristine_git_object: 98ae0961e2afdbf95cdc71e2eee23c9c06972889
docs/components/responsesrequesttoolunion.md:
id: d6a807777d03
last_write_checksum: sha1:960564f5db65b06b811859788c41439fb5d73924
pristine_git_object: c8fb972045317bf08461945bccbf6f8c6b96c053
- docs/components/responsesrequesttrace.md:
- id: ad010b52a1f5
- last_write_checksum: sha1:e24c52e0ea78a0af7ff4d5f31645f87eb6db189b
- pristine_git_object: ec5575914f6427c270207a9265769e2d6a4840f7
docs/components/responsesrequesttype.md:
id: 5bd80a5ef99f
last_write_checksum: sha1:96aba92528f15b2e26760ec90539b8fd7a0e9cc3
@@ -2254,6 +2282,10 @@ trackedFiles:
id: ba037b375d32
last_write_checksum: sha1:1802fbb5223f07b0db2e7503e12f59647b3608f9
pristine_git_object: 75d3a14d662e8a753b6f8c02082582d16d854226
+ docs/components/searchqualitylevel.md:
+ id: a4e6b74956c7
+ last_write_checksum: sha1:bd89df72f13cb501966c208333fa00f123eff131
+ pristine_git_object: 05f28d4664e7c5101ed1629a347dcec7e3c6904a
docs/components/security.md:
id: beee40001fda
last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf
@@ -2274,10 +2306,10 @@ trackedFiles:
id: e4d18c7f0385
last_write_checksum: sha1:3ee0ddd204fe2b2758b0ab883a37916d9af2ca43
pristine_git_object: 4334c6b14cfc9af110ca8818ee954a7048ff7331
- docs/components/source.md:
- id: feb017a05936
- last_write_checksum: sha1:239395e897144c41020cf4c6ba232a3ef3075776
- pristine_git_object: 372e3892d1484a19c6df1cb7ccfe00e56814afb9
+ docs/components/sort.md:
+ id: 063e11fe2d35
+ last_write_checksum: sha1:c8046f6bc1c8c61e823f49c846fe7ee6af3d0cdc
+ pristine_git_object: 4b07bd1be51b737783b69c8b3d71725fd4484a25
docs/components/stop.md:
id: 0d74a157c3ba
last_write_checksum: sha1:f1b797e3188274e4411a26f0934c1d455bd85bbb
@@ -2288,36 +2320,72 @@ trackedFiles:
pristine_git_object: 0b3d0bcfd7082915b45ef9a4a8e74422857dd665
docs/components/streamevents.md:
id: bdfd7bf6c2b0
- last_write_checksum: sha1:4420a69db7b471c77b029568c8cffcfc2a1a6276
- pristine_git_object: d16cfa143412065318bd0f3713124541cd6909ee
+ last_write_checksum: sha1:96cebd9096c23e86968d5091660332c579f5a865
+ pristine_git_object: c41dc50aa360349bb92222a9f608e1438b3b91d4
docs/components/streameventsresponsecompleted.md:
id: 072f9ee89867
- last_write_checksum: sha1:3363eab7ba1d953e7138616c21689227b1eb1c02
- pristine_git_object: 5af624c892600a9b4ea09b95cd34894c7550a7a2
- docs/components/streameventsresponsecreated.md:
- id: 6019de1f7990
- last_write_checksum: sha1:82edb42c3b1e467a7e0caf6da0a449529dd88aab
- pristine_git_object: ff22afe5421beb09dfe15ce985b0b8f8d2110e7b
+ last_write_checksum: sha1:9f33add33825fc28ad93f36c26638728fc66712b
+ pristine_git_object: 6b54a3a71aa8ab520f1fab362b3161a9127b65a9
+ docs/components/streameventsresponsecompletedtype.md:
+ id: ae6f4d1c656a
+ last_write_checksum: sha1:3b4a811a64fa72506ce33739e0967cc50d7635ca
+ pristine_git_object: ddfe3706869b6ba6c789baa92fc9e66080f2a80e
docs/components/streameventsresponsefailed.md:
id: ebfa5a8944e2
- last_write_checksum: sha1:eec070ab456230e579623930d274b631db7dbd35
- pristine_git_object: 3d6061b878f449a54e783d396f1597d7a969e1c2
+ last_write_checksum: sha1:92ee353537f9b1e02ef27f619ec94dfbed5c2114
+ pristine_git_object: 06831d0d4ca5868c7e58a4f70809573901531fa3
+ docs/components/streameventsresponsefailedtype.md:
+ id: ce5db8088931
+ last_write_checksum: sha1:e6547cd19f15667aa269e864274223eff2479c47
+ pristine_git_object: 9125dac025d67a9b69e11924f9a825ac447a25a8
docs/components/streameventsresponseincomplete.md:
id: 615fa03678b5
- last_write_checksum: sha1:2caec7e6a380bac49d536df563c283bfbb833550
- pristine_git_object: 40db8ccf593bb868ba211b077dabb68dd10dc631
- docs/components/streameventsresponseinprogress.md:
- id: a690361889a5
- last_write_checksum: sha1:d76b8f85a98062f0cb20d16d8fd209f4cb7dc214
- pristine_git_object: cf1d85aad3cbd4c9594b4d2b110dda5e2b643b3e
+ last_write_checksum: sha1:224c6ff052180c2e89f0e5a80ac298a1721cafd6
+ pristine_git_object: 7676de4da6daeebec1424619a24083adcedd4857
+ docs/components/streameventsresponseincompletetype.md:
+ id: a7ca0c85090b
+ last_write_checksum: sha1:bc6e0ac3818e418e766e8fe182a352e58cd3c41c
+ pristine_git_object: df61d8e41d68f39dcbf97e315b1c9a6975052d7b
docs/components/streameventsresponseoutputitemadded.md:
id: 28063376bbd6
- last_write_checksum: sha1:9f688b8ae1d270aaae888b81cc5318533d675c81
- pristine_git_object: bc6ca2d07a2968fdcb740ba7a788e7438bc4a388
+ last_write_checksum: sha1:d84fd33ceae3aec2af312c307dbbda470731dbda
+ pristine_git_object: f03926c09d433fc5c50602a4bcf8131a5369d0c7
+ docs/components/streameventsresponseoutputitemaddedtype.md:
+ id: 2c10b4c3cff6
+ last_write_checksum: sha1:a2681759bd42f5d1efcd7418d4696b3e91469ff3
+ pristine_git_object: 0b946d656ae917db5b24fe4573ebc44b1dd2d64b
docs/components/streameventsresponseoutputitemdone.md:
id: 2f634ca953f8
- last_write_checksum: sha1:63aaf9d2560fe0e03396959dd0b1309558b8af84
- pristine_git_object: bc30235694b93a91750fdcf9b0033835c9e5c06f
+ last_write_checksum: sha1:fc6ec88f01fb4c233126535ca52f2993b054b9fb
+ pristine_git_object: cb73fd1340c48b1f9d67b146d987e9031b35f0e8
+ docs/components/streameventsresponseoutputitemdonetype.md:
+ id: 1436a667cd8d
+ last_write_checksum: sha1:0d87b3b89f440a45cc887362809ea2f183dbebb1
+ pristine_git_object: 9549068a77ad8f70f93dd6a911fc90982bb70ef0
+ docs/components/streamlogprob.md:
+ id: 7a144e910288
+ last_write_checksum: sha1:447ce32765ca1afdc8bbe092b3d97fd0b48fd324
+ pristine_git_object: dd537cd00feba3ba461fbac6f2070bdfb1c88f47
+ docs/components/streamlogprobtoplogprob.md:
+ id: b2f58ab0ba4b
+ last_write_checksum: sha1:38b5fc345aff1c89059d223f85b31a717aa29257
+ pristine_git_object: 4f2e093dd4ace184096b017431053be92051d471
+ docs/components/supportedaspectratio.md:
+ id: 435dd9a15912
+ last_write_checksum: sha1:9e8076a9123cf9c4e40e43d3dcbff14b112c64cc
+ pristine_git_object: 08be4d09aa458c3a87df3d385179c81607c83d2c
+ docs/components/supportedframeimage.md:
+ id: ee9feca3fec2
+ last_write_checksum: sha1:4ae34fbda72b5e31ea60cbd20b1a970bfca30056
+ pristine_git_object: b2d0581008abf1dfee20454bfa7f0379d0ac9bfb
+ docs/components/supportedresolution.md:
+ id: b093756351e8
+ last_write_checksum: sha1:1a1922f0e6b53ed4a83ad1877c318e2c0f53fa04
+ pristine_git_object: ffb37fabf1622a890eff20193ffc86677a299f2d
+ docs/components/supportedsize.md:
+ id: 8322ab1a4113
+ last_write_checksum: sha1:b4c23982056253808e490aa3bccf6e6ae86c29b5
+ pristine_git_object: 196402df2e8bf443573d9bd21c69cc8c49fd0316
docs/components/syntax.md:
id: 0cf5ab254bc8
last_write_checksum: sha1:632fc2775ec4066a2b1ee403579ff59bdddb4a91
@@ -2332,32 +2400,16 @@ trackedFiles:
pristine_git_object: 0bdb609ebbb664477effde646423a619b74738b9
docs/components/textdeltaevent.md:
id: 339fe3591c0d
- last_write_checksum: sha1:70631c818431b47267546d1832febf0bff746912
- pristine_git_object: 86c75b9b7e2849965e80869c6dc08dd8a0ca6a00
- docs/components/textdeltaeventlogprob.md:
- id: 95ab5e8143b1
- last_write_checksum: sha1:24a9851cc9a567bfc35327987f3e7bf17658ec14
- pristine_git_object: bdc97deca309889559ec04502eaa28f9d2f0ac39
- docs/components/textdeltaeventtoplogprob.md:
- id: 72f135af4e18
- last_write_checksum: sha1:e5c49b9eb7d4f112f5781b6bb6e996a0fb10268b
- pristine_git_object: 368ea273da6d5a26aa6841d9d2a88601b6ba3fe1
+ last_write_checksum: sha1:97aed7ba0e23221806738f4ed7819f8aec0db957
+ pristine_git_object: 0929ae6c0924c9c18d7251b5a313fa9e1833b20a
docs/components/textdeltaeventtype.md:
id: 5974fc3de118
last_write_checksum: sha1:e1528095a4d640ed17fb13afabb333dddc6d7429
pristine_git_object: 9cf69c3b33abbe4d7deb38eb9b9c9636c31c45ba
docs/components/textdoneevent.md:
id: ff45b02ca7a4
- last_write_checksum: sha1:caf21a99eb4d28e99bc333e4f7806ce5ee1a8888
- pristine_git_object: c3a3e490ac52be0f6fa3d6f099bf7b6613c95886
- docs/components/textdoneeventlogprob.md:
- id: 12db57b51708
- last_write_checksum: sha1:42b24452d4a81b99fb22ab178f4857fc8fa3e893
- pristine_git_object: cbbf9d68459dd1e9be16017f7a3a294183a6bd69
- docs/components/textdoneeventtoplogprob.md:
- id: 616aa640232c
- last_write_checksum: sha1:a00c77e4a0d128d28f44ac075ad6ee09676dc471
- pristine_git_object: c04407d868e893dd385ba12228d3d226d778bfb5
+ last_write_checksum: sha1:3d08617548c5be1c7a59cc5acb6694a94c04e013
+ pristine_git_object: 6162d84b58909f01fe1f5aba123caf56cd407148
docs/components/textdoneeventtype.md:
id: f956af59ac8f
last_write_checksum: sha1:8e6b985ae16c0f7d56415e3502bdcd73e698c1d6
@@ -2372,24 +2424,36 @@ trackedFiles:
pristine_git_object: bbb9988342a55552bdd3c0985cd9f6aa9a302bdd
docs/components/tokenizer.md:
id: f1ad3417d8d1
- last_write_checksum: sha1:71829de4c9562b3a1278d71cda93f6013d015334
- pristine_git_object: 375af174630ba6823687779c76aaf7df6f3b4993
- docs/components/toolcallstatusenum.md:
- id: 549255cbb115
- last_write_checksum: sha1:1ed0af16714c3cc566b86680a98dcc96fca4dffc
- pristine_git_object: 346b32ea6deeb551b60098178a19e0ffefdabcfa
+ last_write_checksum: sha1:4223f630f7d880b9288fb654f67817560fb2dbd8
+ pristine_git_object: 3811d6eda7bcd0aee90a46b9091b729852d23b10
+ docs/components/toolcallstatus.md:
+ id: a3331842b25f
+ last_write_checksum: sha1:f1385923978aa4292c9db1baf735295706f4f3a2
+ pristine_git_object: e3aadb1a488df23daa3344fca333bf3fe7637e4f
+ docs/components/toolchoiceallowed.md:
+ id: 515dfd66aa38
+ last_write_checksum: sha1:5729b49ee5f1736fc43e8046c57ebe65479b6cae
+ pristine_git_object: 89cd22af3eb6da27984126ba7d6fd292ac49617d
+ docs/components/toolchoiceallowedtype.md:
+ id: 1609bc274da4
+ last_write_checksum: sha1:10c591cedf1beea432a9ed7edf540a1fd62f9423
+ pristine_git_object: 31f2f939e02ed27bdec9cbae6e3b9fd54b0876f6
docs/components/toomanyrequestsresponseerrordata.md:
id: f23681a41b53
last_write_checksum: sha1:e5b3d8c0bced377d2da5cd4826d4fab9e45df3ec
pristine_git_object: a957677d324419e4de813b33b88a76667d3ca940
docs/components/topproviderinfo.md:
id: c9e56036dd80
- last_write_checksum: sha1:458ed83efcd607ec75e62c39c126906c60874721
- pristine_git_object: 13539198953425cce18fbf1ede3d3f7017f56dd3
- docs/components/truncationenum.md:
- id: 09dabd53f527
- last_write_checksum: sha1:5a20fed6f77eef737258571c39a7b7da551a6e1c
- pristine_git_object: 4c713e8391c094279dad895d905196ec9feab49b
+ last_write_checksum: sha1:8efc81e2e84887a1ea96ea87a2444161052cb278
+ pristine_git_object: 239aaeb9ffe3aba0f920435390f5ff2264bbbdf8
+ docs/components/traceconfig.md:
+ id: 639fd1f6f967
+ last_write_checksum: sha1:560d3f57a9f103eee587ab1f260548161658675f
+ pristine_git_object: 95932dccc7672845937b71347c587b6910b3a68b
+ docs/components/truncation.md:
+ id: d7a54b499339
+ last_write_checksum: sha1:3e9994693b154d14afe2e6cf5382ea956dd92c2e
+ pristine_git_object: 5a04bd971f948fc59f1f35aedd09406a078c81a4
docs/components/type.md:
id: e97521853030
last_write_checksum: sha1:bbb845cc877102b35f5a5f8bd974a5fbda8358ee
@@ -2398,6 +2462,10 @@ trackedFiles:
id: a0ddc54bdcdc
last_write_checksum: sha1:0ce1975a7bfeeb5bd2499dfd265528be8481351d
pristine_git_object: 761e09a30b291600b670f94f41c404f40c81fec6
+ docs/components/typecodeinterpretercall.md:
+ id: 0753f817b4ec
+ last_write_checksum: sha1:1f256664635f1a8ea45367cdd40d5e4f92a46418
+ pristine_git_object: bc24fd4a7a4e7c6af170ee257707568d465a3833
docs/components/typecustom.md:
id: 7346206117ce
last_write_checksum: sha1:85677cff1322ca22fde8effb6d9e1f24351b12b8
@@ -2410,46 +2478,22 @@ trackedFiles:
id: 1ad664e7de56
last_write_checksum: sha1:10a3f3d7d83ea85fd1e8bb6cd4bb442ddc548e29
pristine_git_object: 14fa7857b732f987fce03ce6672ef11cec4f06da
+ docs/components/typeimage.md:
+ id: 37235a183141
+ last_write_checksum: sha1:fbb633d58e1be270989c46bc5961f361772e1f8c
+ pristine_git_object: 1aa3dd7e7f1964bef22d3851ac42f5b480544e2e
+ docs/components/typelogs.md:
+ id: 2db9d386c665
+ last_write_checksum: sha1:bef7fb6f13f0e7078fa25821b7d5787733569a52
+ pristine_git_object: fda0dd30852f4d091b1e8d62590ed83bc1839e27
docs/components/typeopenpage.md:
id: 3e349476bb3c
last_write_checksum: sha1:795aceda2ea4559886aa768e536a738a42f49cc7
pristine_git_object: 37b24080fbf349299ebecd8f7ee42a62c5c84de6
- docs/components/typeresponsecompleted.md:
- id: 4a732cb5c0a8
- last_write_checksum: sha1:b06634b391318e338cc34d28cec16651cadd55f4
- pristine_git_object: 77875c6fa5191720f0e7c5c98d6e5047b4673d6e
- docs/components/typeresponsecreated.md:
- id: c6c3e5cf7745
- last_write_checksum: sha1:c715c4e5b71d2353f7f77ef36c683b4a30afb7c0
- pristine_git_object: 364b68bc991cbedee72d5c8989d858cc18bf9a37
- docs/components/typeresponsefailed.md:
- id: d9d18f132fc3
- last_write_checksum: sha1:f971b53bf361b3565a7ec36502a89977502318f1
- pristine_git_object: 6ce28360db8977e985a651ca1073875133587f0b
- docs/components/typeresponseincomplete.md:
- id: 4502dcf6cd3d
- last_write_checksum: sha1:24248fd5bc667326c0e69c56a0faa569dd37bdde
- pristine_git_object: 3fea8780868b44c67c3613952740f2838ae8a4ee
- docs/components/typeresponseinprogress.md:
- id: 31bf9eb9f823
- last_write_checksum: sha1:f44d3cef2db709f1e4f655600c8179a759825961
- pristine_git_object: 6f2328e77c4f77845b7e0ffa6fa3af826dcfd21d
- docs/components/typeresponseoutputitemadded.md:
- id: c8db2ac8ee2b
- last_write_checksum: sha1:a4ee147e3adb2f8c0dd49cc44ff58a8c586ad393
- pristine_git_object: b29c71ee34086640b5c944e6e0093b5133d8651e
- docs/components/typeresponseoutputitemdone.md:
- id: e7f0d18c3618
- last_write_checksum: sha1:e20d46472d3d43f876bc15eed251bba7a5267c51
- pristine_git_object: 4c6f4a659a7e6bc2858d8d0b6eb3d8d2881dbcb6
docs/components/typesearch.md:
id: 61c60e55211d
last_write_checksum: sha1:390cbcc7add489ce06a860d4116ed721a98b4121
pristine_git_object: bfea226955f7aae698b7841853c0f57719b7a69b
- docs/components/typeurl.md:
- id: 1c413c4e474f
- last_write_checksum: sha1:a0924a8ec054894d559dc80c6332ecba519f687a
- pristine_git_object: 8965e38333e756ec13deeeb4bf816bd11e4e3a60
docs/components/typewebsearchcall.md:
id: d4647ca78da9
last_write_checksum: sha1:0abbaba9c6c9a3722f755516331a80d5a1e7aac6
@@ -2462,18 +2506,26 @@ trackedFiles:
id: 6a36f0c9d959
last_write_checksum: sha1:b7adc7ae81b79cb1436c8f85b45283fe52320d81
pristine_git_object: 9ccd3c05cd75915c70aa542bb16e2a8f77bb91cd
+ docs/components/updateguardrailrequest.md:
+ id: 5a0fb143eaab
+ last_write_checksum: sha1:1087be3cfaf08a25bd8e202557b7448e949038df
+ pristine_git_object: 8908d6dd084a69919b923782e48052d057911f6c
+ docs/components/updateguardrailresponse.md:
+ id: 311d3e7a185a
+ last_write_checksum: sha1:240e2fc38ee1954caf6afb473cd9d85030b28285
+ pristine_git_object: d88f7735cfa90be90763bbcfc7cbf1b8e12d7cf4
docs/components/urlcitation.md:
id: 02c4f88e5f51
- last_write_checksum: sha1:1d1257827dd2202b2589d0b87e4c38047e15e759
- pristine_git_object: d98eb3b89f51843c105215beaf4a5d850cc87556
+ last_write_checksum: sha1:5d5a717a552b86279bfe20c6125cb0561d2052dd
+ pristine_git_object: 06d9697c84c2e03a6dc1c170adce74a23eaed731
docs/components/urlcitationtype.md:
id: 7631f8ba867e
last_write_checksum: sha1:6723ca63815f15e697b2e8ed1febd1bc0da0beca
pristine_git_object: 2b6e38f54f447f8fc794d3c35c1a0bc690cc4d2e
docs/components/usage.md:
id: 15e3eea02540
- last_write_checksum: sha1:04c5b234dfc7abe5c957f3dc2d54f9fb974c5e35
- pristine_git_object: 7707b15f8a4ba05029ee5726fdd48723af2f6dee
+ last_write_checksum: sha1:0ae2193567cd6c719d88160f4855cac92a8bca4f
+ pristine_git_object: e915b448fba6fa616ed590934da5fd29987c4add
docs/components/value1.md:
id: a13f75759dc0
last_write_checksum: sha1:0c7d94ae129961ad32dbc85fdc0958596316939b
@@ -2486,54 +2538,86 @@ trackedFiles:
id: ad5d1b284346
last_write_checksum: sha1:30ebb41e8bac9a8d817b2c0ab0a9e9fded4a73ee
pristine_git_object: 0698d06289a06a6cfcd35f7069f2ef64a0aa0e25
+ docs/components/videogenerationrequest.md:
+ id: cacead3ac9fe
+ last_write_checksum: sha1:e9f69f5b244d468fbf3ecdd1872671fca4b4fc9b
+ pristine_git_object: 437ac8fd1a297aebc6dd9369947b80d85530cb92
+ docs/components/videogenerationresponse.md:
+ id: adbbd66af4bd
+ last_write_checksum: sha1:52c73fc2047792e3194f316e3182a96f8c7b85f2
+ pristine_git_object: 547f9b54b17ebeedc0c566fcafe94729fe5c451e
+ docs/components/videogenerationresponsestatus.md:
+ id: 0a331c7f4b7e
+ last_write_checksum: sha1:a8ce41f7e0a7705f003de671e29bb7ac7b320676
+ pristine_git_object: bcde5432dae5013cab462aac0369c2dff823f87f
+ docs/components/videogenerationusage.md:
+ id: cb8b5821f432
+ last_write_checksum: sha1:65e1cc35085805c27486bb768677621f5a6bd4c9
+ pristine_git_object: 69860412b7f25618069e280bbd54252002252009
+ docs/components/videomodel.md:
+ id: 903775781ac3
+ last_write_checksum: sha1:57ceaa8e35d7fa680d60cfde192ccf533f7a287a
+ pristine_git_object: 6d5b334bc3301dab11d1d8ec1a436d58cb8fcaac
+ docs/components/videomodelslistresponse.md:
+ id: 6a46f08aab47
+ last_write_checksum: sha1:63812cb97f0ba13e4e9e0e524fb82edccecca061
+ pristine_git_object: 45a68af199ccff5747b446511dd9fc1c550a4d34
docs/components/websearchcallcompletedevent.md:
id: 8c338a61bc9d
- last_write_checksum: sha1:39f63ce5dfc8e5561d9ee03846328917793febde
- pristine_git_object: eb1d165edffa38c018f693e1bac4c19660bfbafb
+ last_write_checksum: sha1:b46bf9e0c87df24c83fba70f4a0ca91648680c22
+ pristine_git_object: 7e6a5f174cb429ee9d6b655c2d167b790029f03f
docs/components/websearchcallcompletedeventtype.md:
id: 1a502d610554
last_write_checksum: sha1:56512eed2eaff1c4cddda33efbaeab3dd2322e5c
pristine_git_object: d62999f7bc2df383fa86043fc57b563175844420
docs/components/websearchcallinprogressevent.md:
id: 31189749d1bf
- last_write_checksum: sha1:b776d4702919cd538a80e7691d422277951a7f7a
- pristine_git_object: 52e1108b1f33c9718269adb81be9e4223fb6e324
+ last_write_checksum: sha1:0f869934eaba165fbd6253c960413f03f9112814
+ pristine_git_object: d4701a43a722261c86f9dff43180c8c5ec145a54
docs/components/websearchcallinprogresseventtype.md:
id: 15a11ab4c4b7
last_write_checksum: sha1:f9d645c8458d7246b351f653c7058d343e53f640
pristine_git_object: 41ae71672238c0c6e34302f7b692ed71d315dde6
docs/components/websearchcallsearchingevent.md:
id: b182331a02b6
- last_write_checksum: sha1:1a8d3fae927c811526e6dff348df4a2b9a51e9ea
- pristine_git_object: ec9bc6744734c450a7c9bd7d0300f9ca93a7a781
+ last_write_checksum: sha1:7a911e2abc45c00fd91a0c187d3256aa88f50aed
+ pristine_git_object: 95d1b4e6cb9d5c649252977d600be9888534af1f
docs/components/websearchcallsearchingeventtype.md:
id: 652bc30b0248
last_write_checksum: sha1:debb8eaed5f86bac53f74f3e61380b2235470795
pristine_git_object: f1771d0b194da9cadcbe7176c43059189745af44
+ docs/components/websearchconfig.md:
+ id: 3fcee95e24a6
+ last_write_checksum: sha1:f5edbfa631a4a020b7e4d2c4e2abb5e7081681d7
+ pristine_git_object: e619e700a585c8daefaba731cb926733cb917f91
+ docs/components/websearchdomainfilter.md:
+ id: 47d067b8286d
+ last_write_checksum: sha1:bc0207fdf5478614ee90906ce70c42e57506378d
+ pristine_git_object: 49047767ed450538e956901a7a1bab92099a9493
docs/components/websearchengine.md:
id: ec8b8ee1236a
last_write_checksum: sha1:59a0029e174957275203a64c9d2b4a502cd8c2bd
pristine_git_object: c0da50524ffa09ff15d26306df1bb1e9f7346998
+ docs/components/websearchengineenum.md:
+ id: c7543e4c8464
+ last_write_checksum: sha1:2b93ee9ff56e1cb22740737354d2fff1b23b51c4
+ pristine_git_object: 915b4ef64620b4cbf4ef4595cd1780a414bbfac1
+ docs/components/websearchplugin.md:
+ id: d6baf3aa0a96
+ last_write_checksum: sha1:13cae4374787097735b6896cefeea505ef33824b
+ pristine_git_object: 5a49814a65bddea31eafaa3bacfe5ed7d0444d2e
+ docs/components/websearchpluginid.md:
+ id: 0b025727cb2e
+ last_write_checksum: sha1:b8da5b1cb0bcc0e2e067e6d09f5e2b51a77d0592
+ pristine_git_object: b0913dcfee22f1204335350b9b9bca75db27c821
docs/components/websearchservertool.md:
id: 92cff6162ede
- last_write_checksum: sha1:cb88d016e41fff439a79b05c8d1871f4bccef676
- pristine_git_object: 38c9e0b070518121aa569a0cce7a00568e136c94
- docs/components/websearchservertoolengine.md:
- id: 477027aefc9a
- last_write_checksum: sha1:503c5f2edcc44c2362f88720155cc8fcc09388f8
- pristine_git_object: a53a4e077fda0df4ada9f36f9b1b5a35af3f4fc0
- docs/components/websearchservertoolfilters.md:
- id: 52a5640b6124
- last_write_checksum: sha1:2bf8119ec638fe97fe91220331e1c0319675a087
- pristine_git_object: 456c4ed9268d5183f11f67dac104a7cebd9a8012
+ last_write_checksum: sha1:860b4c1b13b6be3ffbd2ff99f20e7055a0ac2098
+ pristine_git_object: 8ad43c178a611051aabb65b30222a2e901004d9f
docs/components/websearchservertoolopenrouter.md:
id: 34b36452e3b3
- last_write_checksum: sha1:477fd3c6064e802b3d880f597d667d4b5d188114
- pristine_git_object: 701432f797d1ee96adfc6932a223e4f214ebc2c9
- docs/components/websearchservertoolopenrouterparameters.md:
- id: 9dd0b802a379
- last_write_checksum: sha1:b1e42acaac7a2865a6fb995791843ede70edfe7e
- pristine_git_object: 39446ea916e71987939143c5a18258aa3449025b
+ last_write_checksum: sha1:0600f96fa45dbc72b36e1cb67c35e30583650f97
+ pristine_git_object: ed81b6598a5d13d51f235e7017bf1c563f9ebb43
docs/components/websearchservertoolopenroutertype.md:
id: 709a7a44c3c9
last_write_checksum: sha1:a2b894302d879e185fdad29ab6911c7a9b72f6ca
@@ -2542,14 +2626,30 @@ trackedFiles:
id: e16d860cb061
last_write_checksum: sha1:505ba5b2c7ccccd75f531f163f5077916e2f1c63
pristine_git_object: 13b6311489f87d206fe37c2b6446f7b0e8626547
+ docs/components/websearchsource.md:
+ id: 5b395a085271
+ last_write_checksum: sha1:e267ac945598e9f5d6004c17aa4379da17d18f27
+ pristine_git_object: 1a71cf6dbff45789196f28a2acbdb0c7a3d199b9
+ docs/components/websearchsourcetype.md:
+ id: 45feda8e9988
+ last_write_checksum: sha1:bbdaeec6e80d646148f777b1cfc403131ad64eec
+ pristine_git_object: 4e69352b3dc18b87383f39a643cc04f7f7085752
docs/components/websearchstatus.md:
id: b43113e03655
last_write_checksum: sha1:b94a253e70c37b3c6aebaeb73b9956335e0b97b8
pristine_git_object: 53303ec32abcff22251468692cf0aaacd746e307
docs/components/websearchuserlocation.md:
id: dd5e502d8105
- last_write_checksum: sha1:d0751db3b12386419e79dd226477896147e110ec
- pristine_git_object: 6fd81cd705c20c711c1adcda5e44c8dd73b50a04
+ last_write_checksum: sha1:745b267e89093e0381da08a657f7ed57df85fa18
+ pristine_git_object: 678c7653c10d98a575a20208d824170418a1950f
+ docs/components/websearchuserlocationservertool.md:
+ id: 10b54200c690
+ last_write_checksum: sha1:270139f080f581acc09cfc726f3144e3e457d9ab
+ pristine_git_object: 9e77679591ae44e647b1fcc515d0905744b488f4
+ docs/components/websearchuserlocationservertooltype.md:
+ id: 9418ba6655a0
+ last_write_checksum: sha1:195a53255f2c1f20a1dd978730b9b772c7f2d987
+ pristine_git_object: 4a651edf31ac91e41fe187540f9082fe7b28d7d5
docs/components/websearchuserlocationtype.md:
id: ac432a0db67a
last_write_checksum: sha1:6b322242229459f409a83243db53ff8069fe1a3f
@@ -2574,10 +2674,6 @@ trackedFiles:
id: 7decb227f487
last_write_checksum: sha1:283f0f2a777f118448acd3bed2b98a879a8175a7
pristine_git_object: 290d3a4196ed994d4c8637490aa1449fbe624724
- docs/errors/goneresponseerror.md:
- id: 526d816ed2ec
- last_write_checksum: sha1:cb1bd47cc04da0d4b407ca3d561e8661da59deef
- pristine_git_object: a2742e040c20f55cde9b6083eb38db64e8a4d4cb
docs/errors/internalserverresponseerror.md:
id: 7e8ff7f684b2
last_write_checksum: sha1:7286bd98d0952f44d807965c284796fa8b271be4
@@ -2628,72 +2724,40 @@ trackedFiles:
pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf
docs/operations/apitype.md:
id: e271bff20dc7
- last_write_checksum: sha1:0d9e181be7e9a8f1f77bc1657e1ea9f3a0f5f71b
- pristine_git_object: 15a30418de45735cbce4d76279733e99f8426577
+ last_write_checksum: sha1:589d9ed0a91014cf2b66f83a118259aafb78983f
+ pristine_git_object: ffff0b9ea5cb410b51798b848ccf40a763edc216
docs/operations/bulkassignkeystoguardrailglobals.md:
id: 10cab63c9a95
last_write_checksum: sha1:5c7983931ef784a72f7dfec732eb7809d352c313
pristine_git_object: 1b45a8531b22e0412e5e23d8d3491930a208f73e
docs/operations/bulkassignkeystoguardrailrequest.md:
id: 17f1b1837a1b
- last_write_checksum: sha1:7d2f189b1e89951f3ee99cb4bedab924b5b9c6ba
- pristine_git_object: ea428c6abb2a85880b9498a6ab217b865a8b2874
- docs/operations/bulkassignkeystoguardrailrequestbody.md:
- id: d34f42cdd49f
- last_write_checksum: sha1:2515443242c2122b24559962e3bba83f0cd0e82f
- pristine_git_object: 38b45b39e03ca4d680314d9c3ae205256d4bff87
- docs/operations/bulkassignkeystoguardrailresponse.md:
- id: ba15cdc12a46
- last_write_checksum: sha1:bf8c9e9ef203d07e43b2c6617c2b432a23b53587
- pristine_git_object: 11f3e6936e73a64560e72ffd9d77a19a1ddb4cc0
+ last_write_checksum: sha1:715a1938733348e231c60adeba04a092ab98128f
+ pristine_git_object: b179068885d6054fb62a8d980a736de77a79eb4c
docs/operations/bulkassignmemberstoguardrailglobals.md:
id: 5d30b7e9c735
last_write_checksum: sha1:0830f7c17c8ab7961e54910742628de069d22871
pristine_git_object: b970409d4cd5c37ada32927921add3b2b0f013c2
docs/operations/bulkassignmemberstoguardrailrequest.md:
id: 6d6c7e9ae12f
- last_write_checksum: sha1:2439993f7e5860a91ba7d79da4b9856355ed5783
- pristine_git_object: beaf17441eb3d783e231a6bb4069b192ed005d35
- docs/operations/bulkassignmemberstoguardrailrequestbody.md:
- id: 0cbfdd8e16b3
- last_write_checksum: sha1:428fe76f730c54dbdc8079516ea2cba2ec6f90d2
- pristine_git_object: 505532ff0261622b4a289789788af2ebda9d6117
- docs/operations/bulkassignmemberstoguardrailresponse.md:
- id: 5eea75c03c11
- last_write_checksum: sha1:71543d765329460d04391cb77d0535378507bfae
- pristine_git_object: 402d357f19b9bcec073811a61acbc98c236acef1
+ last_write_checksum: sha1:8aa5702d46c01c87db1df7624b5125ee9bbc8edc
+ pristine_git_object: f15474f24f02a38716f8c83f74a501a3dadef26a
docs/operations/bulkunassignkeysfromguardrailglobals.md:
id: "491635767122"
last_write_checksum: sha1:06e7a6b0f052e73e5cacd480e3bff8ab7756d0b0
pristine_git_object: 8472ab41760bcb0767280a0af1b4c2ac27ba4ee1
docs/operations/bulkunassignkeysfromguardrailrequest.md:
id: fece8f279cf4
- last_write_checksum: sha1:83ead372b4f81521e3a3d0e22bca779a4567a47e
- pristine_git_object: b80c239dbc8b44c18a125485396b1e0464352f2e
- docs/operations/bulkunassignkeysfromguardrailrequestbody.md:
- id: aa05e09a2421
- last_write_checksum: sha1:cc73ae32cb8c2ae265371212a34f0dfc6b5d6446
- pristine_git_object: 5f4b2bd1fbb96c7904bd13c786d2f09ac16e954b
- docs/operations/bulkunassignkeysfromguardrailresponse.md:
- id: ce0017a791f0
- last_write_checksum: sha1:3b72f6a8cbfca2cf5942bbd3ebd649cca3fa8ae4
- pristine_git_object: f789d2ae375e3f25474b53562da1835efaba2ba4
+ last_write_checksum: sha1:55f7ca24a3fdd43a4699213b51174bb5b235a3b5
+ pristine_git_object: eb2cae6eadb71d04625eaaee1b5953397a922aab
docs/operations/bulkunassignmembersfromguardrailglobals.md:
id: 0fcd5a2477df
last_write_checksum: sha1:82475eb0c237f8fa9b1672684bc441c5ef5beb95
pristine_git_object: 5df6bb6d4a2f35ddeefd0064318d867dbe4f078c
docs/operations/bulkunassignmembersfromguardrailrequest.md:
id: 682c7ea4ed8e
- last_write_checksum: sha1:82a1ae956143eafc9079d915267f4b9c513bff31
- pristine_git_object: 90a94751989a93a7e94631ed8ed45cb9e8b0026b
- docs/operations/bulkunassignmembersfromguardrailrequestbody.md:
- id: c7e4e8c210f5
- last_write_checksum: sha1:0fc11e3f321f9ffed701abbde874c804890771df
- pristine_git_object: 76855da93e358108c8e6f1b760d218dea58308f9
- docs/operations/bulkunassignmembersfromguardrailresponse.md:
- id: 6fa28513237c
- last_write_checksum: sha1:8880a7ac0b9223137e8debacabe38c594f6d0864
- pristine_git_object: 76e85b285366d5731dd1cb6cfc182907406fe741
+ last_write_checksum: sha1:964acf8bb04f507c264602c68c77cc1d59c268d5
+ pristine_git_object: 31832c55a3f01279e7609124fe1b02e640f6af51
docs/operations/category.md:
id: 694f17d9e80d
last_write_checksum: sha1:6437eb7bd8c0df1767aee6a6522c5a67fdfaddcd
@@ -2704,20 +2768,20 @@ trackedFiles:
pristine_git_object: 727997fcf2c2d7ecd0576adcd3fafc945c90ad61
docs/operations/contentimageurl.md:
id: 8e6b0dcac568
- last_write_checksum: sha1:5bf1be8a325ba6d0c7d54f67917b330ad67ba802
- pristine_git_object: 3a624d568a823effd91a90dfc858add239b2b0bb
+ last_write_checksum: sha1:0a8701c28d0de7adef8ac51053bc5f701a26aca5
+ pristine_git_object: 7fedfe3061beb273e5beb8893ad16e0b6feb34ac
docs/operations/contenttext.md:
id: 01cceb61d42f
- last_write_checksum: sha1:01d289dfa29f62018f461b0ace2a1fdb3af2da13
- pristine_git_object: 11ffb7a710b7d4fd11caaeb70f44ea77bee89d4f
+ last_write_checksum: sha1:7e1d73bd30584d55f4b116737c15d7c73cdf6a3a
+ pristine_git_object: 522f4978a3c4e1d1c0d197b541fc57e745b7d4e7
docs/operations/createauthkeyscodecodechallengemethod.md:
id: d598c7da9363
last_write_checksum: sha1:3b81340adcf218991f7829e692e64f484763de2b
pristine_git_object: cd496b740a0d914d6bf01b0b8c734440719a7126
docs/operations/createauthkeyscodedata.md:
id: de024dcd716f
- last_write_checksum: sha1:6e035396ed061e3c0142c3b16b161f8577eb0716
- pristine_git_object: 81adde90b2beab341e820ca58625c0c5d984f3e8
+ last_write_checksum: sha1:426b07933182096ad16766e8e7c630d04d841878
+ pristine_git_object: 23309c756a702fc275ee80203355ac81a3cc7a9e
docs/operations/createauthkeyscodeglobals.md:
id: dc07458757e2
last_write_checksum: sha1:56a8ab12e43378b06746682f6ff831f9edb18452
@@ -2728,76 +2792,52 @@ trackedFiles:
pristine_git_object: 6dc06174a0f72d4b4d0f22bc88a3f8a941e7666f
docs/operations/createauthkeyscoderequestbody.md:
id: 402f2065cf8a
- last_write_checksum: sha1:9d6bc13b6bbdf1f5b72afeecec10e1018e607eea
- pristine_git_object: 76ceb7bb2b742673d692f177c091c82a14355e91
+ last_write_checksum: sha1:df4a827cb17240f62bfa31c2f72444a7dd49d7ac
+ pristine_git_object: 787c57a4d6bd2134c71d88a83044aee60cd9cc83
docs/operations/createauthkeyscoderesponse.md:
id: 6c92952aa6b6
- last_write_checksum: sha1:c456860d3c44db9bd993e3e4371025d50be959f8
- pristine_git_object: acad71c0e6f4d79b6cc9a2e88e6b8a0f9af321a4
- docs/operations/createcoinbasechargeglobals.md:
- id: f991df871a9f
- last_write_checksum: sha1:75b0e35461d66b1eed488b9298219f71b85841b9
- pristine_git_object: dcc7d37f19107efe84f79941648b2902585d6e2a
- docs/operations/createcoinbasechargerequest.md:
- id: a448dd5ceebb
- last_write_checksum: sha1:78f9ba075a4cebcb45341f7b47715a0364ec96e6
- pristine_git_object: 9a425d353ef0972e8555b1a45bffd0b5eef61e3f
+ last_write_checksum: sha1:9f9f0dd11d268a8bb27e9f6f99ce41da757e23fc
+ pristine_git_object: 8951a7ad215a64f23e5510b216b921b5c66d002a
docs/operations/createembeddingsdata.md:
id: b2123807ad9d
- last_write_checksum: sha1:6c7ca4ed9b4552bbafd6978b034bd2117d216574
- pristine_git_object: 297dc692bb6d7112b3daa9d9b918fda66a0fccfe
+ last_write_checksum: sha1:0d1867d420c85221d76dad11143ffb836c66cd6c
+ pristine_git_object: c473e71e3ebbdd11adb1c7728048ed3f638838f2
docs/operations/createembeddingsglobals.md:
id: 57210fb0e38a
last_write_checksum: sha1:82fd92d8da52017a2e7892b5611af5168fe65a7a
pristine_git_object: 13b9e13d3c25a43c492fae346593bbbc46b52580
docs/operations/createembeddingsrequest.md:
id: e680f1daef8d
- last_write_checksum: sha1:a0619baba5928246740cb374bb8790a0be691093
- pristine_git_object: f0c5d8379e05cea0576254d5868bceaf6cbfff13
+ last_write_checksum: sha1:e3c7fe36419ff4d4bbe1863758d36f475aa0172e
+ pristine_git_object: 9b7a73a661c2906bd071dabd90a6c273d19e2125
docs/operations/createembeddingsrequestbody.md:
id: 1dc1b7920b56
- last_write_checksum: sha1:7c2b4a646406f08c7e772552ef7aa26fffcbbea6
- pristine_git_object: e4229b334906c36cd3690c2afe376cb10fdb8c9e
+ last_write_checksum: sha1:e47df5a1f79d110f04cc5c032bc51ce06f35db36
+ pristine_git_object: 9ea89389ed108b5cd93815054337619e4138231a
docs/operations/createembeddingsresponse.md:
id: 1314e0c18f0d
last_write_checksum: sha1:3585e9e490549efb1a71dfda28e0faa41b79eeea
pristine_git_object: 4c379be00bda8bdaa67de03470f76141803cd62c
docs/operations/createembeddingsresponsebody.md:
id: eb2fea5ac750
- last_write_checksum: sha1:0fc79e3014e71bd3d07e6db2f0b964e7ead8fe59
- pristine_git_object: 2252cfd18b3935127ee68316fb2130e213387b22
- docs/operations/createguardraildata.md:
- id: c3dfc7f1a090
- last_write_checksum: sha1:7db1b52255a966374bb65fa07af1bafb4ed9d44a
- pristine_git_object: 0cfc0cf12a0d0370d2196cf16286fd43e529a49b
+ last_write_checksum: sha1:52e719372697ab752bd9913606432527e08cd5bb
+ pristine_git_object: 1ff75cb8fa59d2b7b756ea07e9f5849995b62435
+ docs/operations/createembeddingsusage.md:
+ id: 2dc99973f6c7
+ last_write_checksum: sha1:a51043a1dcc144a05c76c218c73ff3f413d313ec
+ pristine_git_object: ef0429e0678238d40901c630b48ab20680eee1f5
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:c58574f8d0e0e2d0eec8f0d40dc5e682981304d9
- pristine_git_object: 1f1c9440c1475fb24034d20666289aa490bd9a54
- docs/operations/createguardrailrequestbody.md:
- id: b683515dd4dd
- last_write_checksum: sha1:42729c623234049d62d351711ce2b0a2e5d6af42
- pristine_git_object: 843fd1ea7fd043af2818b53427c5e2ef14334c78
- docs/operations/createguardrailresetintervalrequest.md:
- id: dfd5668013f9
- last_write_checksum: sha1:8899f5440dd988f6a472e5ddf8ae9f88cfe711ab
- pristine_git_object: 4d591a766941666964437a2339954740c5c4dc3b
- docs/operations/createguardrailresetintervalresponse.md:
- id: 20f5c0fcdb06
- last_write_checksum: sha1:573d5e213d588c1a6b3313b0614610927dcfe9f4
- pristine_git_object: b49fa04b6d5531653211958eb2fa4bb7e0cc5579
- docs/operations/createguardrailresponse.md:
- id: a96622c2743d
- last_write_checksum: sha1:3d6fc5670b3296d2b023581c03f3d77169ed6b8f
- pristine_git_object: 4cf770bd215ff13d4ae89200b2515c7c5e177cf0
+ last_write_checksum: sha1:4b958201a047311bd6b7c74e767fe25f7c949d45
+ pristine_git_object: 5a414e26806520a98f50229a063f127f712054b0
docs/operations/createkeysdata.md:
id: 903a6d611ab2
- last_write_checksum: sha1:f323d972a4e5f139f055e25ffd33429b6b2e1ed5
- pristine_git_object: 6bbf38d24cc8913710524d8230e62676df3f5018
+ last_write_checksum: sha1:6154a06532e92530eeb880e5e3e400c83944ba26
+ pristine_git_object: 054ae84199061fd24065a8011ca67c86dbc1c169
docs/operations/createkeysglobals.md:
id: 15dd52d4443e
last_write_checksum: sha1:032800ca0e8b56a1819431b9b27fa09a5b4b09c9
@@ -2808,32 +2848,64 @@ trackedFiles:
pristine_git_object: 5d1659c4ceffd5282b3fe7a4c106fff641af722e
docs/operations/createkeysrequest.md:
id: 57f03f411f99
- last_write_checksum: sha1:30bc04f324314ddff93990700cbb2e4329e39478
- pristine_git_object: 281d4e8f1aa1c1738331e228fea564d19114b7ee
+ last_write_checksum: sha1:16e94df473652f8f4438f519ffcf7b8c238559ba
+ pristine_git_object: f587de752afc6f5f82d55ba4b80f6d59336db24a
docs/operations/createkeysrequestbody.md:
id: 9aee51637cee
- last_write_checksum: sha1:ad36a3f9f254273972b1acdb98326a6ab87c44c5
- pristine_git_object: 067a1d5edacca2b778fe6408f0ea0658e637b053
+ last_write_checksum: sha1:24567e6e6e94df8c83deb73a01b7e3a567d40b9f
+ pristine_git_object: e43517f0fb76a68308997868dfae8cbe9b463a52
docs/operations/createkeysresponse.md:
id: 42bb3427e12b
- last_write_checksum: sha1:ecdac228aea32490a6c114a32dcc90cec87de9a2
- pristine_git_object: 2db8887327d7a2406ecfd23ed5e2488fcd271524
+ last_write_checksum: sha1:b3aab1702c99f425a12e00607278808682bcf666
+ pristine_git_object: e74907571f4147d457e544df8bcf6e4bb5be38fa
+ docs/operations/creatererankglobals.md:
+ id: 46c967a0d2ba
+ last_write_checksum: sha1:9dffe3342695ec66163cb83423f441d527d4e561
+ pristine_git_object: 8651948c5053890686a408a39dfe62e1ecb62714
+ docs/operations/creatererankrequest.md:
+ id: e0a2523b2d23
+ last_write_checksum: sha1:2071d69e87661cd661b951bf24ef36a6971e560a
+ pristine_git_object: cd88d08f3a6d71c88f56912d5a739b59cff0804d
+ docs/operations/creatererankrequestbody.md:
+ id: 8456551b3ea1
+ last_write_checksum: sha1:2a635729172e375907d8298a633847b0f720ec26
+ pristine_git_object: 29fb1c6cde9073c1a3d792e7c95fffe365a3b658
+ docs/operations/creatererankresponse.md:
+ id: 1b5f55b55e69
+ last_write_checksum: sha1:426209e05c118111316d4486c9cba821bd88ab77
+ pristine_git_object: 0b28bf7096289a1ed51ef83ccbd06641efe5fefb
+ docs/operations/creatererankresponsebody.md:
+ id: f1f58657dfa9
+ last_write_checksum: sha1:b845d6dafa286dc879ebc16d32586b061744634c
+ pristine_git_object: 57159c5385db02707ad1fc38c701ffea818b0d84
+ docs/operations/creatererankusage.md:
+ id: 1e5c3b94d7d4
+ last_write_checksum: sha1:b868206dafba854b524d1a4f1f2f283628fe28da
+ pristine_git_object: 42682414d583eb0c2cb26ec7ebbe302e969d980d
docs/operations/createresponsesglobals.md:
id: 9ea14f11bfeb
last_write_checksum: sha1:9586d395012468f47af06b82c7fd6f71b52bdb9c
pristine_git_object: 265872cbb44f436ced32612e7d880ad31d3fa41d
docs/operations/createresponsesrequest.md:
id: 98a355410675
- last_write_checksum: sha1:6a1943568a66018ee2163affcafb48d7f0bec052
- pristine_git_object: 6436099931b01df8e63cccfb364a260fd1750cad
+ last_write_checksum: sha1:42013ced1fe3f6f5f080cee401a67e01ed6fd9d7
+ pristine_git_object: 479750cece19c843bc8cca71f32ead0f5e0dfb1d
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:e0be4cc8e221c4981f7400b5a08c6913883ffbf0
- pristine_git_object: 6190ddd8ff4518eaf4d79cd058a0ec5b436a6706
+ last_write_checksum: sha1:79a9815ab0129b3254e878501ebe5b2cd85c51e1
+ pristine_git_object: b6dddbc3a55f3297719a3648b699634e50ca2f98
+ docs/operations/createvideosglobals.md:
+ id: 356f4c73b7c4
+ last_write_checksum: sha1:c639cea73f4e6c596f5b1fe567fa9b0c584caa6d
+ pristine_git_object: 5a2167c582c16eb6d2811f5e5af20246798fd110
+ docs/operations/createvideosrequest.md:
+ id: b8190b2b48e4
+ last_write_checksum: sha1:ccf223bd7e2958b01032fffc328ba43f0e6bf260
+ pristine_git_object: c9ce4f85e23827bdd48ebb8bf00525343eac73ce
docs/operations/datacenter.md:
id: b08a21cce65c
last_write_checksum: sha1:9f399d250c42bff63295881990961f871a36b8a9
@@ -2846,10 +2918,6 @@ trackedFiles:
id: f746c227ab1e
last_write_checksum: sha1:f2ae275087247cb5df753ba94a6a922304ee7fa5
pristine_git_object: 14aa025d53ead8b0c2f7d64b4a25bc2424261622
- docs/operations/deleteguardrailresponse.md:
- id: 01d6299e4794
- last_write_checksum: sha1:61e36f6a68d31efdb1f40ea6dfea5d9bfdf98dc2
- pristine_git_object: b548b9ff0eedb2a2d0b394d253278c508f8bfc19
docs/operations/deletekeysglobals.md:
id: b6346fb0dd73
last_write_checksum: sha1:6e15f083ee437e9ed5f60702bdfb893b0b863d53
@@ -2862,14 +2930,18 @@ trackedFiles:
id: 843ae03c4c33
last_write_checksum: sha1:3e34ea65b5397e4d1203306e4a08f12023ebfba2
pristine_git_object: cc7cddbdde6e0f31ddbec25b8a01e7ece0b8e04c
+ docs/operations/document.md:
+ id: 640b715eb2a4
+ last_write_checksum: sha1:18b3bcf786efa0cf41dd10ba4c3a3a58c65cd134
+ pristine_git_object: 58e1f342ab67ae2c59a20b52fec72712a80e5a45
docs/operations/embedding.md:
id: f269f99ee6d5
- last_write_checksum: sha1:2e6726480547ce12c49961ddf861401edfa46259
- pristine_git_object: 59f08e3d11d59a36593dedf259d77f797d3fe3ad
+ last_write_checksum: sha1:37c64f7daf2ddca055feafab8df92acd112976f3
+ pristine_git_object: f6344cab1c59e1be2b221d42c09ee4fe4ea8b69c
docs/operations/encodingformat.md:
id: 3ccae4d8f099
- last_write_checksum: sha1:8d6c4b29dea5ff7b0ae2b586951308fad99c60eb
- pristine_git_object: 7d5941cfe6cea2e85b20d6fb0031e9b807bac471
+ last_write_checksum: sha1:7b7792741089194d996848dccca2144db1e2ca3a
+ pristine_git_object: 7f532c1c211071ca34ca8d2fa9296a94af0192c4
docs/operations/exchangeauthcodeforapikeycodechallengemethod.md:
id: df7142dcee15
last_write_checksum: sha1:abf90e37d86ba401850965e0837d590fa7cd7d14
@@ -2880,12 +2952,12 @@ trackedFiles:
pristine_git_object: 91c87730d951c0b1d89bb4f876e3b2552127af81
docs/operations/exchangeauthcodeforapikeyrequest.md:
id: 88d7fb3e304a
- last_write_checksum: sha1:9d6b71d92c0a47b46a65aac74530b24b0b5eb8d6
- pristine_git_object: d818ef4262987790ae18de9675e53a087c9e2264
+ last_write_checksum: sha1:88d2ce3d649aec2ef9b61bbd370f124cb0539c70
+ pristine_git_object: 05bbc427c28921582f5bf67af31c6eb685502bb0
docs/operations/exchangeauthcodeforapikeyrequestbody.md:
id: d4dadfc0846f
- last_write_checksum: sha1:9ecfdc7dcdee06dedc0e9b7332ac285835aaccf3
- pristine_git_object: 1543d582736b48748a8d5726c9371af6fd40c90d
+ last_write_checksum: sha1:0a2aa24a4d45ed66e6b2c39e47f684ef4bdfb65a
+ pristine_git_object: 6361a13cacd0f7e6d72eba0e7fd912cde7251a54
docs/operations/exchangeauthcodeforapikeyresponse.md:
id: 62e36bd89583
last_write_checksum: sha1:f1f06cc15b7bf183358c6de9aa6351b70ca5e8bf
@@ -2908,8 +2980,8 @@ trackedFiles:
pristine_git_object: a58a336fb17cd33196da51df89c7803ba0cba363
docs/operations/getcurrentkeydata.md:
id: e357cfe8cdcc
- last_write_checksum: sha1:39a100ee48a6189fbc5fcc167155d3a0b6e35797
- pristine_git_object: 4c5ad958f1f3546f3428ece8b196e86870fb80cc
+ last_write_checksum: sha1:b27be09197f950cd4147d05183709077ff1b5e92
+ pristine_git_object: 3f5e088cbdf06185743f1c8821455e1306e6d265
docs/operations/getcurrentkeyglobals.md:
id: 9d0a1314955f
last_write_checksum: sha1:3aaff7ab31036ad4edb525577759ec52c430e180
@@ -2920,28 +2992,24 @@ trackedFiles:
pristine_git_object: e20974606ebe165785b5c3cf7a392d3acefcceee
docs/operations/getcurrentkeyresponse.md:
id: 37af8951de4d
- last_write_checksum: sha1:8f8d06ebea5c9e17c36a638582b98a21adb3cf08
- pristine_git_object: 8f279e23350b014fdcb58036f59c42412db914c1
+ last_write_checksum: sha1:1e62836ec19a8aad8b0dcafd7799b71250a5c6f7
+ pristine_git_object: 2855d5b95d41a494bc7ffa9f85c74ff27a46ca96
docs/operations/getgenerationdata.md:
id: 89a3aab8da20
- last_write_checksum: sha1:eec7b35116e558c6dc36739f114297f6beb97de3
- pristine_git_object: a980f2a2fb391e8cdbb320ace99c96f33e213ac8
+ last_write_checksum: sha1:a78e4be50fb3b4de56daee4ea04a1d47f21a081b
+ pristine_git_object: cf02875be60dbecc3f0a1bd16e9998f2c8723c09
docs/operations/getgenerationglobals.md:
id: 0d6e856c5861
last_write_checksum: sha1:b5236815132dedf2b595fd520f1753d5ec8bb6e0
pristine_git_object: 842003596b344b8b0ce3d74f0eb05e8157b4a4de
docs/operations/getgenerationrequest.md:
id: c830d67c6a95
- last_write_checksum: sha1:4fe7c3206dda93bd0b884c05187af559de791921
- pristine_git_object: 5fa33b65b73f4f471b51e4f83903a89f4241b968
+ 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/getguardraildata.md:
- id: b102d42f75a2
- last_write_checksum: sha1:f70c75a31edcf1fd3e785347ec5b7038894a7eef
- pristine_git_object: 25bde01b6bced6fd4d1f1b9347881546a26b577b
docs/operations/getguardrailglobals.md:
id: 6cf14d555b8f
last_write_checksum: sha1:025d0a3b53ce5603d5d262a5db3ac54b5ce981d0
@@ -2950,18 +3018,10 @@ trackedFiles:
id: c105f1324d76
last_write_checksum: sha1:a0b3242a5fd017bdc1819eadc5e74b40b8e7bc2a
pristine_git_object: ad49c823ffd11b46d8a8ce2a67eed5bd71d09db8
- docs/operations/getguardrailresetinterval.md:
- id: 998a5941a6be
- last_write_checksum: sha1:d9d2fa81397c044592a02e00243a60b87c95ec1e
- pristine_git_object: 48f4f0e1c260f8f0fb29053b75e052590c39f7bc
- docs/operations/getguardrailresponse.md:
- id: 707610da92cb
- last_write_checksum: sha1:d348b887b4959295bf1c788d527ac93baf1f3a9d
- pristine_git_object: 08739b60f2c47b9e8d0502359173e8bd35dcb81b
docs/operations/getkeydata.md:
id: 4fba05263947
- last_write_checksum: sha1:827b8de719f40fd8d28641c569b8e70cede3a43f
- pristine_git_object: c4f0b560c646d9d80d02476de3455f55cc570cdb
+ last_write_checksum: sha1:9e9eb077c97bd989cc198bd17222972c3a63da9e
+ pristine_git_object: 8821e8f90d8e4c61b046be1926d2cabed238ed05
docs/operations/getkeyglobals.md:
id: 7f990e0efc1e
last_write_checksum: sha1:12dcc44c433951cdd8c4136ae1a70702e2b3e47d
@@ -2972,28 +3032,32 @@ trackedFiles:
pristine_git_object: b7b0a302d24d5964ce5a4bd24672d766362564cf
docs/operations/getkeyresponse.md:
id: c145b1a0dd5f
- last_write_checksum: sha1:0a6ec7d718ba4bcd07e5e3b4002820a3107386b4
- pristine_git_object: 16994d0d310d36fe652ac13ac125f8eccd8fe8da
+ last_write_checksum: sha1:71d93bb73bc10bb55afe1d816f2c839b43528c96
+ pristine_git_object: 7959a400503db3233fc13546d4b63995690d5984
docs/operations/getmodelsglobals.md:
id: 61588f3029c8
last_write_checksum: sha1:f1565d45f3d06f070a8bc5ebe53d6205656b4b3b
pristine_git_object: 9533d03cfb8ec3720fde4833d7260f4f645d6786
docs/operations/getmodelsrequest.md:
id: ffb89fce8262
- last_write_checksum: sha1:53784ac82693cf6c8cd56b4243a697d27df2c88f
- pristine_git_object: 1a66d5a3dab1d19bfe9b4f810ef73201dd702a81
+ last_write_checksum: sha1:8a16948332630ebc3a9c1d6daeff63cf11e4b07b
+ pristine_git_object: afb02bfe9dacbe10ef68aeda55e8c50ccd35ecfe
docs/operations/getuseractivityglobals.md:
id: 39aded6fc0f1
last_write_checksum: sha1:53ccc45e0783444aa97f4e051b6ac6edc3acc588
pristine_git_object: a67a41d74952a5d50a22e2c080f7f89fefd1993a
docs/operations/getuseractivityrequest.md:
id: 114457542fe3
- last_write_checksum: sha1:5da41028b088a42f12f4eee95f2dba4b33af5c58
- pristine_git_object: 6d4d521e2a95e4a803502e37d38a391cb525f28c
- docs/operations/getuseractivityresponse.md:
- id: 4176768b1f92
- last_write_checksum: sha1:d54b68325add3f560fdc88bab219153b0ebaf4f9
- pristine_git_object: 24cc9e1af56c4082bdcc2473ea7d122c6b7a7e93
+ last_write_checksum: sha1:a227cb2f2e7dacedea35660a62782d35688b5756
+ pristine_git_object: 302da8dc897995610aed1ff03ffcf2d882c9adaa
+ docs/operations/getvideosglobals.md:
+ id: ac6874f74ef9
+ last_write_checksum: sha1:d76755afe2595aa9fcc2bb498bfe0c779282c35d
+ pristine_git_object: ea3a74389060aa5eb44ff3edfda609e490833bbc
+ docs/operations/getvideosrequest.md:
+ id: 2eeac3b6576d
+ last_write_checksum: sha1:9f6eec582ec3a568a6e14f57a687f0d360fc9748
+ pristine_git_object: db40577d2526f81edbcc38cef6517c598a98bc7b
docs/operations/headquarters.md:
id: 3ccf7adf2542
last_write_checksum: sha1:24ca86fa6e2ebabf4cb034f6e368901e5041ccc7
@@ -3008,12 +3072,12 @@ trackedFiles:
pristine_git_object: 455985900b46a8d308c755ee0f060bf32c93fa16
docs/operations/inputunion.md:
id: 8bde108b50c7
- last_write_checksum: sha1:b04899ab29fd74e630548ec4a6982c60f0b8ae0a
- pristine_git_object: 75550b62de7362443297d5894076e75569707133
+ last_write_checksum: sha1:e671ac1a028be0528b5273dd61b8deea5c3f9451
+ pristine_git_object: 655cca3c9dde2904f47187955063ed1def505e47
docs/operations/listdata.md:
id: 3a3029670d40
- last_write_checksum: sha1:89b37f48febc95e0e44e8a0d4f29a2bd38addd4e
- pristine_git_object: a265ecacca908385ac90967e85fa375439b5702e
+ last_write_checksum: sha1:2d89b15dfea6a82353401635a09e502c11633e47
+ pristine_git_object: c43c8c6cfb755095bb515a33dd923b30bfcf2295
docs/operations/listembeddingsmodelsglobals.md:
id: 29c3a9629ff7
last_write_checksum: sha1:a8b2d679ac7a558761e4289233d31084f4f7663e
@@ -3028,12 +3092,12 @@ trackedFiles:
pristine_git_object: 5a8118765497e987ccb2ece257091931d6db1c64
docs/operations/listendpointsrequest.md:
id: a3fb6a6f2c84
- last_write_checksum: sha1:f05b158c361d81ece3253b00b64a49a922a6800c
- pristine_git_object: 86d4ace3b7d5d4fa12fdb871c356fc717364cfd9
+ last_write_checksum: sha1:d044d07943c5fe4ed46ed8292c88eac0a43ec3d4
+ pristine_git_object: 49dea4f8a6e4609aadad28dd43f0963f4c6c8a49
docs/operations/listendpointsresponse.md:
id: cfc28fb4b9f6
- last_write_checksum: sha1:12672b0118d4912dbf51dea68ecfc18a94654079
- pristine_git_object: d4a7a58857cc2b8681dcd4561d219b2b1aaaf5e0
+ last_write_checksum: sha1:93ba9653230f96a61c30adc5964b7cea0f931c06
+ pristine_git_object: 130c76834bae2d44f58cab77a99f7a5d72b1ea8d
docs/operations/listendpointszdrglobals.md:
id: a2c6a0214809
last_write_checksum: sha1:7992ef1026f739604835fbab28c5fdf28b8dff63
@@ -3050,90 +3114,66 @@ trackedFiles:
id: 32d30e56f680
last_write_checksum: sha1:6b2661b1a208354794ee9f591c7581526d4641be
pristine_git_object: 53064e43a4cc24c142195b662f4dec2ba7218081
- docs/operations/listguardrailkeyassignmentsdata.md:
- id: 6843acc9a614
- last_write_checksum: sha1:ca9dd85caae7eb06a6f61c580c66b5ad32d41585
- pristine_git_object: 285bd056cad1f40b95baa835b7f84c12db619bc8
docs/operations/listguardrailkeyassignmentsglobals.md:
id: c1e1fe669380
last_write_checksum: sha1:58b3d4cc562e3cf74fc46213db5792aec38900c3
pristine_git_object: a9cc4a39cec08240575910f54e2d3066f013dca5
docs/operations/listguardrailkeyassignmentsrequest.md:
id: c841f466ea37
- last_write_checksum: sha1:831929c0baf33a9b185d4d8e880f8f2e5b4c4a87
- pristine_git_object: e78c27159f6aadf0eb4816a0fb01badcbaaabc0a
+ last_write_checksum: sha1:7084ec7cf9a90757bcd5180b2a3d78e90624264c
+ pristine_git_object: 1873ab97b35a1ed0b2af8a1bbffdb3bb4a6ca340
docs/operations/listguardrailkeyassignmentsresponse.md:
id: 1d97f15080c2
- last_write_checksum: sha1:3f3539aa8e1232a5d8d226a6bf249d1d7a3f53ee
- pristine_git_object: 90844cf50ba7c384520fa9fb465d14a09f7ffaea
- docs/operations/listguardrailmemberassignmentsdata.md:
- id: 94403dff8552
- last_write_checksum: sha1:fb4cde4456c145d180b67038810002050fc514e9
- pristine_git_object: 9b3be4f075bfb17950eeae78a698489ad2b485ae
+ last_write_checksum: sha1:4ed00c4ac409a79c9d8a11cd528584b792208cdc
+ pristine_git_object: 3ce3be710fd904fdfcdf63fb7fc9428993df8f1f
docs/operations/listguardrailmemberassignmentsglobals.md:
id: 104391661d20
last_write_checksum: sha1:fca243f432ac5f1e46b991c83b4ae0ac76a173df
pristine_git_object: 58ce40eb9573bf958f8063767bb57235c3d9595c
docs/operations/listguardrailmemberassignmentsrequest.md:
id: c2181183ceb0
- last_write_checksum: sha1:534f8e71454982cb56cdf22c7d825a0552d5c1ee
- pristine_git_object: 2ebeffb068c574301bb63082d234b9a4a721d00f
+ last_write_checksum: sha1:949f302f653c130fa4d7c683b6999a26ad85bf63
+ pristine_git_object: 962eb0c3abb81b9dfd2460b541950118579ae869
docs/operations/listguardrailmemberassignmentsresponse.md:
id: 3148eb3110b1
- last_write_checksum: sha1:6c30414eb6995b503d153bad1349a2334eaaabe9
- pristine_git_object: ae1be1a57422c2723f6dc251c264617edc162ed0
- docs/operations/listguardrailsdata.md:
- id: 13c79fcad988
- last_write_checksum: sha1:0486f7dc95a2d2fd3778e8eb3d7e5eca1861a38a
- pristine_git_object: 4b94ae284ff08065b08e962f2fb9fe83c6921b89
+ last_write_checksum: sha1:3c12490bf06aab3053f5a05295b2147f85942ede
+ pristine_git_object: 766effbcc369983252d95e837f67082dd1f9ff91
docs/operations/listguardrailsglobals.md:
id: ce7fe6f64d6e
last_write_checksum: sha1:14bc637a0e4375919159b6d2be79fbacde3d70b6
pristine_git_object: 4a623f2b7664346b324037e5e099cc19a22e0f99
docs/operations/listguardrailsrequest.md:
id: c00416201071
- last_write_checksum: sha1:383d074f5e60afa0b7dc2717891b7d7d83d79b4f
- pristine_git_object: 598440f1f68dd2ca30e784014f91df327ead27a0
- docs/operations/listguardrailsresetinterval.md:
- id: 880ab4949bca
- last_write_checksum: sha1:59e89c6a8eed378f232370939bafe4b8d87e5c6a
- pristine_git_object: 0c651fc2dc640931c9d3ebefd3bf358a514cf223
+ last_write_checksum: sha1:59f051110dcbb0bff3ef96bb5f098b561a810c43
+ pristine_git_object: 65946b14204dcd39c2a43303d56e62439506a07b
docs/operations/listguardrailsresponse.md:
id: 0e85f301aa5c
- last_write_checksum: sha1:967723e13274f3317da18372aadff828dcaf7e54
- pristine_git_object: ceb67284ea63f2d5b8610f410803a3da3b6f3a5b
- docs/operations/listkeyassignmentsdata.md:
- id: 878adc195a58
- last_write_checksum: sha1:d84d599d03a1876695c34c0145d2d3ab5c5fb95d
- pristine_git_object: fa93d0daa4c9fbf9a7562d050bcc9e3d915c94c9
+ last_write_checksum: sha1:ef8d1dd575f41c8fdbefce870526326b9f213912
+ pristine_git_object: 3046aeb171cb27a5ce37814a5723e3fae8ef2969
docs/operations/listkeyassignmentsglobals.md:
id: eb16fba53032
last_write_checksum: sha1:823375a0dc84574748befda39821c790b469a6b4
pristine_git_object: 6c0713d69c8b9f3d7532681b73857042bf0e6474
docs/operations/listkeyassignmentsrequest.md:
id: 0d0d4d33f476
- last_write_checksum: sha1:94be81e3988180059a5baadbf64eaa4c2f72ea96
- pristine_git_object: c3db738c6ab08b8e82b646a1a1a79309bda6eeb4
+ last_write_checksum: sha1:24232750e6497d8670cc36d73957cd6a79a574fd
+ pristine_git_object: 4902d03ad6d0aa0f304f99c997ebcd816540aced
docs/operations/listkeyassignmentsresponse.md:
id: "973479296236"
- last_write_checksum: sha1:e143037d174445f03a6c8ac08d5c299636a80922
- pristine_git_object: 9f6529c7e819292ada0e013c1d4c0891eec845d4
- docs/operations/listmemberassignmentsdata.md:
- id: 3631cc8c7f91
- last_write_checksum: sha1:78654bdc122895a0ec2d06a26da6723c12ce85be
- pristine_git_object: 9d95d1e82a937f09a00908f9203fd89e03232276
+ last_write_checksum: sha1:a89918b7355e48a0e8946fd89bba5bd2e38f6357
+ pristine_git_object: a083a11699fdc01328172073f6c5b11643491b6f
docs/operations/listmemberassignmentsglobals.md:
id: 4df3602b0efb
last_write_checksum: sha1:0e4513ed008550da90164df2dffdb82abb49b5ad
pristine_git_object: 7d4eb65315a19218dcd5c31e6ae67e68fdbc897e
docs/operations/listmemberassignmentsrequest.md:
id: b5c1c04b18fc
- last_write_checksum: sha1:b4b348b8248f445c692654d58e0332a7de2c90d3
- pristine_git_object: 61416c7a3635130e7048ca3c8166d6b9f0f45c84
+ last_write_checksum: sha1:d8f4c537908c139b257c203f501085a0868df064
+ pristine_git_object: e58ec65dd9087228d5e073ecb67d89df3ebd2132
docs/operations/listmemberassignmentsresponse.md:
id: 4dad56275a0a
- last_write_checksum: sha1:6fec1c63eaed9bda69473a7eac1aa5e1046a4144
- pristine_git_object: 6a05f64587ed10bac12801ff32d5bab0556710eb
+ last_write_checksum: sha1:e0534935d968cf8af6497cef949e2ec8f179229c
+ pristine_git_object: 6ee5e606e476ab16db887de01ae94ce3aee2a181
docs/operations/listmodelscountglobals.md:
id: 9d155afe292c
last_write_checksum: sha1:ad8222615eeb5f22a7dca9ad6008a97146fc22ad
@@ -3154,10 +3194,30 @@ trackedFiles:
id: a5b7382e5fb8
last_write_checksum: sha1:c4de0a5a996b4ad48cf50e0f5f35db05c882c574
pristine_git_object: 3d42e13fcb006322664b3458e5399483ad0b73fb
+ docs/operations/listorganizationmembersdata.md:
+ id: e2cb8741f8f1
+ last_write_checksum: sha1:2ca75ea8dd657b6cf33236ec7e3949215b958a8f
+ pristine_git_object: f4fcecaff12922aea5cad2a0e14415794dce7842
+ docs/operations/listorganizationmembersglobals.md:
+ id: 01c9c4a98f1f
+ last_write_checksum: sha1:4a3bd5fe1fee29c52df34521ac1b05727aa92991
+ pristine_git_object: aa080033b790fd4ccb16d01c64118aed5a66a156
+ docs/operations/listorganizationmembersrequest.md:
+ id: f382354b10d8
+ last_write_checksum: sha1:39a624c237163785c5a73aed88305e4d0a943909
+ pristine_git_object: 6f90ae081bfe98aac40e7e632dcc9c324d797ecf
+ docs/operations/listorganizationmembersresponse.md:
+ id: b7cd9449d176
+ last_write_checksum: sha1:f163e031babdf6a3db3e669b821578099ecd2441
+ pristine_git_object: 240d8d538434110c7b972520ec373cb177e46feb
+ docs/operations/listorganizationmembersresponsebody.md:
+ id: 573a08dc9d96
+ last_write_checksum: sha1:89cd76c6935cda7cbdb00de704b1d527e4eb0a14
+ pristine_git_object: e5aab441b87284d7d88749950848db12655d48ef
docs/operations/listprovidersdata.md:
id: 576de3a80e5e
- last_write_checksum: sha1:18f2ee1265d6335aec73bab1de1eea7a40dc6918
- pristine_git_object: ec9b21ba934ea63e8c203cd41621cf73e33ddd57
+ last_write_checksum: sha1:2f5a3edd32a37e17be34bd07faf0b89b14f8a08b
+ pristine_git_object: 5179c87ea3ff01c0f5a36120cd5142c7196cec78
docs/operations/listprovidersglobals.md:
id: cbf10c70be68
last_write_checksum: sha1:00b1bc3b8b9781a6f71972c0975609a1cb6968e3
@@ -3172,12 +3232,28 @@ trackedFiles:
pristine_git_object: 922cc65548995e12edbe83abf86732c4190c7a97
docs/operations/listrequest.md:
id: 40bb7fe37ce6
- last_write_checksum: sha1:8fc93d41c56fad8e7dddef87513939f9216bdc63
- pristine_git_object: 0118178fafed3e05391368a4836d15bc45df678a
+ last_write_checksum: sha1:36a84dbd57ce7422a28707449d645c467d77dcb4
+ pristine_git_object: 5507b0aa07c0220cfdad1e7ec264f0d74cd2ac94
docs/operations/listresponse.md:
id: 14450e1d6614
last_write_checksum: sha1:e432e29d3c7de8517cc16b59b958134ec561f09c
pristine_git_object: 255d266cb4cee8057210f820e560bba25858b82c
+ docs/operations/listvideoscontentglobals.md:
+ id: 5e356abaaa50
+ last_write_checksum: sha1:476094e7c2920e0e3056d4995c4f02a450eab79d
+ pristine_git_object: dc3c375e02be84568e95cb4bc6ce766f81f5714f
+ docs/operations/listvideoscontentrequest.md:
+ id: a03dc9d02574
+ last_write_checksum: sha1:a895bbbbb64b8a1e300bbae942196c52e86741c6
+ pristine_git_object: a729b3d4582f4b596ef1535a9e69a7e426de2d03
+ docs/operations/listvideosmodelsglobals.md:
+ id: 286327d3b747
+ last_write_checksum: sha1:eb199755e6b166a947a8fed9462fcf061264889e
+ pristine_git_object: 305081b9fe45addf7f6802273992ee2b465e3257
+ docs/operations/listvideosmodelsrequest.md:
+ id: e0e776f67adb
+ last_write_checksum: sha1:0d590826439a800f340367b6721265535827aede
+ pristine_git_object: cbd65ef6238a8b9bb2c36bc37cbdb5a5e181d3ad
docs/operations/object.md:
id: baee3544844d
last_write_checksum: sha1:2fba5ecf3f93c90460a972666d6acdfb597cafad
@@ -3186,34 +3262,34 @@ trackedFiles:
id: 7a144a9c7a29
last_write_checksum: sha1:5f009bd24fd951128cdc546a6a5c937ab0426387
pristine_git_object: 4f8c20dd33dceafda3362119a1cfb1e5133810d1
- docs/operations/providername.md:
- id: 75b460b5d0af
- last_write_checksum: sha1:a4af63f1b3fdfdd342491b3f895aaa9fb26a33a5
- pristine_git_object: 5bff3c054611c49b09a80561349d4d2531323592
- docs/operations/providerresponse.md:
- id: 2e4a2f725850
- last_write_checksum: sha1:e46e252cad6be1bcc04c12fc36a3643aa3b75545
- pristine_git_object: cd0f8fb1779dd16d43f60288b44d6712f5f2573c
docs/operations/ratelimit.md:
id: 55ccfab9dcb0
- last_write_checksum: sha1:40125e5e688deec630a8c3503d9f69c4640dc27c
- pristine_git_object: 635db2a1f5605d62a4a4a2dd83dbb9580cfdd8ef
+ last_write_checksum: sha1:ba383320e312bc87bd156a5d338f3d973376ec02
+ pristine_git_object: eeed3720e0eef6a871483dabd4a345495b466339
+ docs/operations/result.md:
+ id: 432b3cd4c69c
+ last_write_checksum: sha1:1eab024add8cac132cf311dcb6d569e059aa7329
+ pristine_git_object: ece2bfd8dc0af3d882cf7d088c02893da7aad332
+ docs/operations/role.md:
+ id: 361efe189fd3
+ last_write_checksum: sha1:b636196d23d598f27a7b39d5db1e9faa3a0cb072
+ pristine_git_object: af35a0b8e024895cf26f5fb6a9bec2cffef12ee4
docs/operations/sendchatcompletionrequestglobals.md:
id: 4ca845a0810c
last_write_checksum: sha1:da4e80f313c65f3534117604e4cb79de3516ec20
pristine_git_object: 3256c024465d68f376df1e9498da94ce756bf320
docs/operations/sendchatcompletionrequestrequest.md:
id: "220604035185"
- last_write_checksum: sha1:c3a71c4d25935c66963331082096ae0ea641f839
- pristine_git_object: 2150e2f57e031e155668e7f85370965db96975bd
+ last_write_checksum: sha1:55f1470ef51551503f7ad08489329bd1b81e4c4f
+ pristine_git_object: f0a096f40d2d0e187d2cd3884aa957d863913ef5
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:3235dd5b19271fd86c2c03d79178948b1611e6ca
- pristine_git_object: 4c840446aba01bd1283151184a07c582786ad9da
+ last_write_checksum: sha1:18f9b7a258b6cec3ea91def378505c01d63b8abb
+ pristine_git_object: ff4ce98066d383548220f9dd7a3e127603a1b6b9
docs/operations/typeimageurl.md:
id: 433d2dc21947
last_write_checksum: sha1:24b83d5212d95f5e5ee95d1b9e47059613126ea1
@@ -3222,38 +3298,18 @@ trackedFiles:
id: 58e69601e3dc
last_write_checksum: sha1:5abedb25856f0e45ef9b80e42cf6fe4aaeca0741
pristine_git_object: fb9c2cfc86821cc2713c143ada5094af0e775f08
- docs/operations/updateguardraildata.md:
- id: 51dea8eb28d9
- last_write_checksum: sha1:9968c751639f1a1f91080ca43c0731a8838dce28
- pristine_git_object: 2a97bda775ab6ff2eee7f9dbb16d480b6646e645
docs/operations/updateguardrailglobals.md:
id: eb4357a0714c
last_write_checksum: sha1:3ebdcb875989055d04737285abb527a8ea30720b
pristine_git_object: d72ffed2d70092f83e5af65f6abc80e05590121e
docs/operations/updateguardrailrequest.md:
id: 655370b0fd4c
- last_write_checksum: sha1:794558890881ff5441ab86671265cf6d6499d870
- pristine_git_object: 7ccfb1e1a4a236bb1a7a18026db943144111174c
- docs/operations/updateguardrailrequestbody.md:
- id: 17997d6d8577
- last_write_checksum: sha1:e48f8b6e4abe9765f71d07f98ffde5f7faf82a56
- pristine_git_object: 9365423254a5f86234331b4ee4985d0f0d2b6689
- docs/operations/updateguardrailresetintervalrequest.md:
- id: 1e98235ccbf5
- last_write_checksum: sha1:4f28cc73ca343663a357550832b1a4f2dfb8e0a5
- pristine_git_object: b48624a6a9a7616e32da70b490784b744e02e4b9
- docs/operations/updateguardrailresetintervalresponse.md:
- id: 42bdc91f2073
- last_write_checksum: sha1:8a05db87e69263da897dafb587c92067d7eb28de
- pristine_git_object: 64ccf85362924e2b627c892f62c3a55e671ec7b7
- docs/operations/updateguardrailresponse.md:
- id: be92b68f1025
- last_write_checksum: sha1:7e8cc3988e587e110b9aaf00d3ee0e369e36864f
- pristine_git_object: 19b1364faf1136a2fdec1c6b45a3e82416cd473a
+ last_write_checksum: sha1:daa57018bd9010c6fdf08fa4bbb9fc5c5b193dc3
+ pristine_git_object: 58ac81b1a12447b17d1da21f1b2275b32e2c2ca7
docs/operations/updatekeysdata.md:
id: 989d7ddeeb46
- last_write_checksum: sha1:82a277fe74215191e72efa6e898e9d718f98748a
- pristine_git_object: 9eec6b57c3a6c1bfe6bcdc7b246df61d5b5d6f19
+ last_write_checksum: sha1:ea99e0258ff278a6346f7acfbcd72be2ba19084e
+ pristine_git_object: ba44333601b75f8ce7c42e71c6f9692c89787321
docs/operations/updatekeysglobals.md:
id: fe06e9820a16
last_write_checksum: sha1:bc44e1936abe8d3ce77e223aacb0326143a4a812
@@ -3264,84 +3320,96 @@ trackedFiles:
pristine_git_object: 7a91c14c09527cf868aff6fa189db2b2fd6d83c9
docs/operations/updatekeysrequest.md:
id: 37aa3abce627
- last_write_checksum: sha1:1603455e650290825772fcd20308462e5bca3fad
- pristine_git_object: 75e58386f5f7218a9c909fd8f7ca36a589f72a8a
+ last_write_checksum: sha1:71e83687cd5bb68a435099abde4f46a0ab146ce7
+ pristine_git_object: 1e35e33405525e49a37be85790ccb85b92676050
docs/operations/updatekeysrequestbody.md:
id: fa955b3d03f9
- last_write_checksum: sha1:95bd5bee20c0ec6bef510c1dc3094a213abb5399
- pristine_git_object: 8d8ebb1e842deb8157b1d83832d1a67b424748ba
+ last_write_checksum: sha1:b80cf926a89a28245c5a9cd2171f1b202ce6b3f9
+ pristine_git_object: 223702c414a1ee652c5dd849559d967cbcb1f628
docs/operations/updatekeysresponse.md:
id: 594f08a35b03
- last_write_checksum: sha1:5f93e99eeca00cbe2af1348b390b11563867569a
- pristine_git_object: bf4c26191b62070799de34a57a7d27478754527e
- docs/operations/usage.md:
- id: b333f5aae0e3
- last_write_checksum: sha1:41aed2c3ac763048a82831b15de181d3346d72ba
- pristine_git_object: 90e936120e231dc4d16952adf15f34dba2333c0a
+ last_write_checksum: sha1:f4a1479f7df16e20dcc7f9259245163c0550d423
+ pristine_git_object: c1dde7cca4a08be11d91f1f97bea5d2a08ab5d6e
docs/operations/usagelimittype.md:
id: f83f3fcb36f8
last_write_checksum: sha1:9c272d9908a57fdbd2b376e13c8fd226e7d4ce65
pristine_git_object: 0d9e7c83f5ae8bab7f5f5cfa6e48805c00f56f40
docs/sdks/analytics/README.md:
id: 4c84abb05030
- last_write_checksum: sha1:9b5a8b4b1d97befb1e2a21dfeb35dcff078c9627
- pristine_git_object: 91805c7e8e111b3047ed8e69c7e687b1addafeba
+ last_write_checksum: sha1:2af2b879b1945ad9293b519ffa87579393608031
+ pristine_git_object: 44f78122819ded7e472e28ebcf37dd8812707097
docs/sdks/apikeys/README.md:
id: e2bd25998427
- last_write_checksum: sha1:0f630ab49e573a34e13a589550e5dc22f11f9337
- pristine_git_object: d072fdd1527e7c8a2bca61dbe46977222a96d135
+ last_write_checksum: sha1:8d511dbb54f0e4828ee49e22cc65daa307fc831b
+ pristine_git_object: 83c2e81cf7ad8565fb375f2f7e5b36e20d60f896
docs/sdks/chat/README.md:
id: 393193527c2c
- last_write_checksum: sha1:95c783c0a34a00f3d6e12406a683635fc0714115
- pristine_git_object: c28f38d9890824ef84d5804b6916ab30005bfaed
+ last_write_checksum: sha1:f9e001787d9e37d51692623c4375e9c1df09a2de
+ pristine_git_object: df4d756456d9fb569e546bd9bac705a20e4222ea
docs/sdks/credits/README.md:
id: 81608135c0ff
- last_write_checksum: sha1:c0cd734a1c3df6d92a010cf12a676506e8dfc280
- pristine_git_object: 59bb0abe2d0b68677672b8fe536ff2aba408d46f
+ last_write_checksum: sha1:abca02bc25760be47f80100a7cce6bb711202aef
+ pristine_git_object: 1837ff59343eb87482e8750c1fb5d2b5f89aae6a
docs/sdks/embeddings/README.md:
id: 15b5b04486c1
- last_write_checksum: sha1:93409aad79adcad06e751cb1b48907c0b261c663
- pristine_git_object: 0fb307762dbdd3bbb6b3bdb827a6a70f5a306da5
+ last_write_checksum: sha1:c2ed15521af31873f56e7813292aa30c5adf94e4
+ pristine_git_object: b649f5b605ffcf156e773840dd28b9eb7c9ac147
docs/sdks/endpoints/README.md:
id: 80d3fa9f5f5b
- last_write_checksum: sha1:6311913ee2c68e62fe1a590bbd5a87d16a5491db
- pristine_git_object: 598fc203ed6923dea6aa6661cdc883ec62b1427d
+ last_write_checksum: sha1:8eead5232f81561abe5a4d37c74c9a69a5de0387
+ pristine_git_object: 2ce96e9a6eedf3a64256cd848615e9c4fd76c0af
docs/sdks/generations/README.md:
id: a7d12ae95fb1
- last_write_checksum: sha1:9b4aac4a3e0c1ca33794e72d66d9c0103136ad33
- pristine_git_object: bf57d215e03057a084452c814a186762744c4f5a
+ last_write_checksum: sha1:5846217fd9616824edcf5f41d6c54bc727f07195
+ pristine_git_object: 332b5683cfe8c07ce4cae93b3247cd56f545f535
docs/sdks/guardrails/README.md:
id: f72b38a5a2a7
- last_write_checksum: sha1:d071e1bc9a8146be409aae3b3dbdd3250fb7c362
- pristine_git_object: fdcde880d4c567edffdf4df6a6a7915a3381a00c
+ last_write_checksum: sha1:b13cefe74bc186fa193c9c47a274dfe0e4692725
+ pristine_git_object: 6f3a20f6c6ef2fae15974c465da228a0f03622d1
docs/sdks/models/README.md:
id: b35bdf4bc7ed
- last_write_checksum: sha1:c7013e1e1e7a5a8fd0acdfabf88fd21c761c80a1
- pristine_git_object: 3f63d9a01bb55e2d998f5e256c100458ddbc88d1
+ last_write_checksum: sha1:ac628dd17b528a4772ef0797c4c47906faf8dc40
+ pristine_git_object: 74618cb8c5b4d8781e54dc2ee6997fcf2b365c78
docs/sdks/oauth/README.md:
id: 80ad2c1a7b62
- last_write_checksum: sha1:68cbfc8a92c79c02898180a46fc37fccafdae5df
- pristine_git_object: 704edee5cbfe9fc00d3f639fe3d9d08d624e8cd6
+ last_write_checksum: sha1:bec31275e907bdf1f888ad7e2a6af916b84d5103
+ pristine_git_object: 562e2e83f65a925b834b591ede742db3050d3cce
+ docs/sdks/organization/README.md:
+ id: 69e4232b8432
+ last_write_checksum: sha1:3aca4d3971ef8e049ec6c66d4dd160cf110529b1
+ pristine_git_object: 867781001d3d7c6e755bcd3024268d831d154732
docs/sdks/providers/README.md:
id: b02aa45c0093
last_write_checksum: sha1:576c938477d66de01f39db88b50caea41a6812d3
pristine_git_object: b414ebc8a9ea57045833409e5deaa8aa21d283d1
+ docs/sdks/rerank/README.md:
+ id: e2b361cec1dd
+ last_write_checksum: sha1:78d6cc40496f406429d5ef3143f4b83e33002e01
+ pristine_git_object: 3bda1a6f6fccc91a04e52d373727cac8861e1a26
docs/sdks/responses/README.md:
id: e717bad14f63
- last_write_checksum: sha1:51d14850ac47888ead6678e6a42944314ae89e0c
- pristine_git_object: ab1574e79547613ee54191690eb1de0adf254d02
+ last_write_checksum: sha1:35da9276b7b942874450f3250f4e90aafeed8399
+ pristine_git_object: 9f0b8db0cb7af3342ba15767bf1997bd8f39911b
+ docs/sdks/videogeneration/README.md:
+ id: b6dbf7b0729c
+ last_write_checksum: sha1:594c4bbe8b2396d28e4a5fe664e21de4d2dc8444
+ pristine_git_object: b2f26971f1f28f4614f021ffdb87fe958522d029
py.typed:
id: 258c3ed47ae4
last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:77eb83db047dc7a0fee66142a4408efcab29f3f0
- pristine_git_object: 71d7080bdd4204fe1367f7fc5195a5573fcddd82
+ last_write_checksum: sha1:282f9c22f307301f2f059315894f72506155ddd5
+ pristine_git_object: c820c26e833e2458a592503c86e74200a3e98265
+ 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
@@ -3360,16 +3428,16 @@ trackedFiles:
pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:ab653d10128db3311e4804ef39828494efa4e115
- pristine_git_object: 1057ee959bfaf7c2d9e26d8b6ce54bb153071ee3
+ last_write_checksum: sha1:d6cef74b80a76dcda210290417fd88cd9120832a
+ pristine_git_object: 9bfbdc043b619529b0edb750ce4a28f07b2bac5d
src/openrouter/analytics.py:
id: cb406b5aaabb
- last_write_checksum: sha1:e395dc6b6403e7a37f8cb4be2d679cd151dc6780
- pristine_git_object: 4d707db4d4b858c5b1ec1b0e57da6563191028e5
+ last_write_checksum: sha1:6d47d1ab3da9cb4ac9f0a2bfe442f1a82a614f35
+ pristine_git_object: ea004eaf47a1a48622d4a4276fba1e329d5559ab
src/openrouter/api_keys.py:
id: 876fac88fff6
- last_write_checksum: sha1:bf752210e32e95352f270876a9d292fa27f44cac
- pristine_git_object: 0c1e8d0535afea2d27e6b5f7aa7e472357e79b9a
+ last_write_checksum: sha1:5b18e23448d79894aba08f0e46d6e7491777bc4c
+ pristine_git_object: 40474f7e98dd47321618ecc0692defef90d59fce
src/openrouter/basesdk.py:
id: c5733c5a1e12
last_write_checksum: sha1:71f242fd9955e5a17a8d055e2210cc2708bb94fc
@@ -3380,24 +3448,40 @@ trackedFiles:
pristine_git_object: 5e7c70d1f15e0699b4b4099322ef2217f66b4696
src/openrouter/chat.py:
id: 723fdce15c1d
- last_write_checksum: sha1:d6ff9357a1419cc81833e90085ae8d4e2d70a0a3
- pristine_git_object: e7855d1f5531df21d376dc9448b1ceb2fe86fbe3
+ last_write_checksum: sha1:7a48b18631d60bf60a7dda6be10bee9773b2a5ae
+ pristine_git_object: 3949384c80bee3fd056502478fb3c22b11b68b4a
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:885c33350de6090e4476d00178f0087152a08b6a
- pristine_git_object: f62b9c09ace5db9c90b06aae4533c94880faee3e
+ last_write_checksum: sha1:4b1be5c5ebf9e218df0a07047cd5523d60b7e27b
+ pristine_git_object: e4f9cbd6ba44a6a1b1f6dc39478e26a960c798e2
src/openrouter/components/activityitem.py:
id: 3bbe7d35f459
- last_write_checksum: sha1:08483b6fe216e4bb2fd7205b1f6d7394af826f26
- pristine_git_object: 12c081ff73fd9e2dd5368d5222dc7a7f7e40a6ff
+ last_write_checksum: sha1:32b873ba5c0a9dbf5f0cf32c0217ce17395ae69e
+ pristine_git_object: 2f00349d0523c4686115fb2039b6f8fe7043e849
+ src/openrouter/components/activityresponse.py:
+ id: 0bd8d79c3144
+ last_write_checksum: sha1:db8e3247cf9eb2c235d32949d36f7ae95870e8ed
+ pristine_git_object: 1138e6f6bc025546a86877749ce83aca4c46499a
src/openrouter/components/annotationaddedevent.py:
id: dc032c9ad744
- last_write_checksum: sha1:1e1f68555f689211abd676734b682c57dc10b71c
- pristine_git_object: 361c244fd34e9ef83db309e27a140acf74348a19
+ last_write_checksum: sha1:8e5d49d2b57114df7f4559b611d40769e65f9f78
+ pristine_git_object: 597a5e01e843b06758f9c49b32d5d18d473dd106
+ src/openrouter/components/anthropiccachecontroldirective.py:
+ id: ffa72802cd82
+ last_write_checksum: sha1:526dea61f351102a3b51a90e9979460468f4bce5
+ pristine_git_object: 67645f080ac04382b3f363455231d80771894dd3
+ src/openrouter/components/anthropiccachecontrolttl.py:
+ id: 2ec3e3546afe
+ last_write_checksum: sha1:338e193bd6929eb6ed69da9bdb4e608e5db6121b
+ pristine_git_object: 05a105c6e4f6c9037f953e4620576a8494645865
src/openrouter/components/applypatchservertool.py:
id: fb93c63175d6
last_write_checksum: sha1:4e388dc3b303e77308413810a0c090f760debeb2
pristine_git_object: 0be07495eeb9ab2be9421d1a5deda27859865e57
+ src/openrouter/components/autorouterplugin.py:
+ id: cf49add5d1ae
+ last_write_checksum: sha1:efd7f350bb1712b793ecb53c64aad26938cf9be5
+ pristine_git_object: 2cec0f748f21614b0d504ecc3b29006b95eeeb62
src/openrouter/components/badgatewayresponseerrordata.py:
id: f7a33d30d269
last_write_checksum: sha1:338789c4e0dc85ac1c949f3b7d35127f7309bb98
@@ -3408,52 +3492,84 @@ trackedFiles:
pristine_git_object: caaacbde392cefe0e8be9a0991b42fa653909bc2
src/openrouter/components/baseinputs_union.py:
id: d85e19ff642b
- last_write_checksum: sha1:e8954407122f58508d4d988d601e41f4f56cf7ab
- pristine_git_object: aac7cf9030e1d2b8a5c4b827a018a78da44a0d40
+ last_write_checksum: sha1:96fc5c400f324fcc90cdefb7dbcadc3e120a80a7
+ pristine_git_object: 7e501214d82701f45cc406ad676c4d690204854e
src/openrouter/components/basereasoningconfig.py:
id: 8bd09a7e873a
- last_write_checksum: sha1:96b2af5b716b1877b8f9a3465eb45dbac54e0ffa
- pristine_git_object: 7c9263e40da48a5bc5ace8025db0d7ec4df5b16f
+ last_write_checksum: sha1:c7c812629a7fc46f8064bc874b77424b30df9226
+ pristine_git_object: 22bd982575db23648faceab9dbedf75fa1f1cb38
+ src/openrouter/components/bulkassignkeysrequest.py:
+ id: f801d53f55d5
+ last_write_checksum: sha1:20f64607c61683eb2438b5b7411643e1340b2db6
+ pristine_git_object: a9bfb5e20bc6122abf47d96110d5081a7311ab45
+ src/openrouter/components/bulkassignkeysresponse.py:
+ id: aa1d1a62b782
+ last_write_checksum: sha1:c09a75f01c373f7a3fa8ada735b098e3dbf215cb
+ pristine_git_object: e994e0ea9070e2f3a43885aff835534b41239d2f
+ src/openrouter/components/bulkassignmembersrequest.py:
+ id: 4b232d61ee64
+ last_write_checksum: sha1:d361a65e5fb438c473830466b31940ad911164f2
+ pristine_git_object: 5aef49c5c5063ad284d31aa35dbed11c514a0225
+ src/openrouter/components/bulkassignmembersresponse.py:
+ id: 6c7ce2235489
+ last_write_checksum: sha1:c708637e9d6aaf9eef90747b3da1af97c1b73e92
+ pristine_git_object: 2435b0dc46cc7e26a961eafde84ca68ad52a0a95
+ src/openrouter/components/bulkunassignkeysrequest.py:
+ id: f7ef88765f9b
+ last_write_checksum: sha1:a46b022e4264377b2d8c137f9d0df34824aa2100
+ pristine_git_object: 27b1d37df6e92a64e03ea69fb46bf3c1ddc0c30e
+ src/openrouter/components/bulkunassignkeysresponse.py:
+ id: 987fcc407701
+ last_write_checksum: sha1:57eb4faaa6e86d2811b31a2c7cecccd9be3b0468
+ pristine_git_object: 60ae254e5b510382fe7fd14ff20f2167e28fb7c7
+ src/openrouter/components/bulkunassignmembersrequest.py:
+ id: a51dafc1d29b
+ last_write_checksum: sha1:a75e3a2c5a58248a821d27dbe92de266ca84f1a1
+ pristine_git_object: 40e1b3d8f83ac0bda5de998f14de9fbed017bb59
+ src/openrouter/components/bulkunassignmembersresponse.py:
+ id: e76005848b0d
+ last_write_checksum: sha1:48f2993ea9d7ff4fb9a0a44053ee1ca2e1b54d3f
+ pristine_git_object: 219148fc990faf0541310cf55cf11ffbcccc2e55
src/openrouter/components/chatassistantimages.py:
id: 993f9dcd8575
last_write_checksum: sha1:0b6be31bb9c8b3bc8f2098af5b2bd12b62a710bb
pristine_git_object: c7866f6fa8967c301f6aa11b0b0431384ab79556
src/openrouter/components/chatassistantmessage.py:
id: 16355b51794d
- last_write_checksum: sha1:b322fdf991695147bc00c0a30d49cda5abcbc990
- pristine_git_object: 78199e8282f79750ec106a075031f5b80fc45291
+ last_write_checksum: sha1:262463011bb166384398cc28bb4ee158990c4e71
+ pristine_git_object: 60b919a36d0f637df0e20d85d7b3dbc613828651
src/openrouter/components/chataudiooutput.py:
id: 99984fd282ee
- last_write_checksum: sha1:b24a6bb454bd09fd1633380ebd8cb025eaf0b50e
- pristine_git_object: 19bb084c3a33b22b1eb9017ffb81147d36b00e8f
+ last_write_checksum: sha1:d6daea59d700227f24194133cbf8c08bb2f8d26a
+ pristine_git_object: 0ce4edfdee4b3f90d38f64e2d0c2ea861bda095d
src/openrouter/components/chatchoice.py:
id: f511174c4629
- last_write_checksum: sha1:36e7ea1e62f4e6be6a12c3f1a4832f1d9c24a2b6
- pristine_git_object: 6cb0225b86ac8abf591313167efa9c201826143f
+ last_write_checksum: sha1:7c37937628dac76596825dffbeb2335bec99cc97
+ pristine_git_object: 8651759272bdcf01eb65fbc7bd644e8c0aac8e67
src/openrouter/components/chatcontentaudio.py:
id: fae7bc57e73f
- last_write_checksum: sha1:290b476989397cf4754c300d81aab3fd37728e48
- pristine_git_object: dc4293ec8e13838f75758aa399d4e1cbd9bdbbca
+ last_write_checksum: sha1:23f5a430c45dc89780b16c3f4d2dcf8df6f0fee8
+ pristine_git_object: ad506c0e68b77dec2dfcc3acadc91a3c15a3927e
src/openrouter/components/chatcontentcachecontrol.py:
id: fa34483583b7
- last_write_checksum: sha1:b527c24061331c01b9d6b2262f703418045a0a1d
- pristine_git_object: 11a86bf5470ce7fdd29146b82d5a9bc0a760a12b
+ last_write_checksum: sha1:6c8e40f1358dccece301730dafd3eb00d4aea805
+ pristine_git_object: 7263adce89ef130ad94504dd600ba19deeece3d6
src/openrouter/components/chatcontentfile.py:
id: 2a747b8033b8
- last_write_checksum: sha1:dc07f69e97578b2710f4370374710e1e593d9111
- pristine_git_object: 5101311b28c32f05c6951749dcc26467379ebeee
+ last_write_checksum: sha1:f8ea4e6c0999d2ae59e1b6de39dd2bad07599c87
+ pristine_git_object: e737cbd7318fb553946f2c5a9986a9630415016e
src/openrouter/components/chatcontentimage.py:
id: 6897abcd5da0
- last_write_checksum: sha1:a7bee3ab6a81b0a5cbabbaaec330b5de9d3256e7
- pristine_git_object: d7850d5affb888ee65c4157a2e6eee5f546eacce
+ last_write_checksum: sha1:e60f0f980421fe82190850b65948bdca3b0a7859
+ pristine_git_object: 6219f8400d09673322eaa3068c0b57dbcd662e5c
src/openrouter/components/chatcontentitems.py:
id: c4253e14cbd3
- last_write_checksum: sha1:fcf9dda277b5f3bdd13f96abdff530e17dc13bb2
- pristine_git_object: 6a65c9c8fe9cc395adb9ee86f267d9e2264f42ae
+ last_write_checksum: sha1:e17966663f37a773e5ab5fc0c5e7e09f3ab9aef4
+ pristine_git_object: cb153a030d300afe41950e098d219bbdce2bdcfb
src/openrouter/components/chatcontenttext.py:
id: 5301d8af31e7
- last_write_checksum: sha1:d5064f43da56d5745e899bbe98dc466966a39dd5
- pristine_git_object: 1fed3f58b99d0383d4495b616be6de7ee556b7c4
+ last_write_checksum: sha1:34e58197e8536c49997b2f2ac68aa7c654dd17d2
+ pristine_git_object: 4367bde935d5dfab2b33cb2aff89101790350be8
src/openrouter/components/chatcontentvideo.py:
id: 42859cb5a9f4
last_write_checksum: sha1:f60354c6602613f3f8628ca29330a6037fcf20e9
@@ -3468,20 +3584,20 @@ trackedFiles:
pristine_git_object: 777d93efafd1f357560467682bc13d33c98a160b
src/openrouter/components/chatdevelopermessage.py:
id: bcba94e8d19a
- last_write_checksum: sha1:25905b86816304eb3a34403cf90d76f5f050b14d
- pristine_git_object: aaaf7424674b0fe89e1c8ae2446727ddf909629e
+ last_write_checksum: sha1:e9aebdfb1010b763874467a3c540b5588ec9ee1e
+ pristine_git_object: 175218a937ea755e521289b92486a7d67fdcb907
src/openrouter/components/chatfinishreasonenum.py:
id: "331394791883"
last_write_checksum: sha1:98f6b15af15986f5b3e9ac60c29bf9e5a70eeb5f
pristine_git_object: 00c38bd994222dadc92b530ad45c470e09fb2af8
src/openrouter/components/chatformatgrammarconfig.py:
id: a852009cc661
- last_write_checksum: sha1:7148d362510561e407d81842a0a9bda113a91d22
- pristine_git_object: 9ea1098a687988f9061fb15558ecaa2e1d1ad1d9
+ last_write_checksum: sha1:0b53b9be3fc3c703dd69f537bd4e2d74bb3794b3
+ pristine_git_object: 9ec411f0b6d050166527d9ad38b892763113781b
src/openrouter/components/chatformatjsonschemaconfig.py:
id: ab345e635f28
- last_write_checksum: sha1:a18ba704bd6ae8fbc62ae672c747e5d85e1e388e
- pristine_git_object: be2887deab59168ef0ba6c703418c4622c7474c4
+ last_write_checksum: sha1:cf6c6e7bf8101361b2351f978e21bf3f8d61c375
+ pristine_git_object: 9cd133061b1c86578537b7a7ba296ee14baa2028
src/openrouter/components/chatformatpythonconfig.py:
id: fac2069b3825
last_write_checksum: sha1:2ada99d602a1e0f237b9afbcd80bdab3a622d92e
@@ -3492,144 +3608,160 @@ trackedFiles:
pristine_git_object: 7a6140f2b8afb0cde9b031322a4284c9cbce7e33
src/openrouter/components/chatfunctiontool.py:
id: 1fcf92f8a7da
- last_write_checksum: sha1:9f7d78e0996035c68dfc1cd7dba8f946726840b0
- pristine_git_object: 22fd9cd3b196e5d82f00008772862b15998083c7
+ last_write_checksum: sha1:661e6685c3dac0d479503615a9cfe54dc8dbbc85
+ pristine_git_object: ab80d60bf82934cc12d92ebda44070fb8af19733
src/openrouter/components/chatjsonschemaconfig.py:
id: d2278e414fab
last_write_checksum: sha1:69efa91d33e4767058c2d377814b820bb5104ab4
pristine_git_object: 013154427936561c5aeb7180b325a033c26c23c3
src/openrouter/components/chatmessages.py:
id: 3425ec393ea1
- last_write_checksum: sha1:ab650a5534acbd4f6269466a9dc1653a63fc6c16
- pristine_git_object: 7d3054f655015516e39ee6f41d946b3f722bad1d
+ last_write_checksum: sha1:e5a58c98ecacc9b4c72a147c458532cc78a7d898
+ pristine_git_object: 1c9a570fc7231f2af97bd964141e407930ac1c51
src/openrouter/components/chatnamedtoolchoice.py:
id: 8dec655ada92
- last_write_checksum: sha1:44131d90f88d05e4d6460e96b13f776f4b209e75
- pristine_git_object: b725d19ab231201bd59feb3339fe2a65ee6b613a
+ last_write_checksum: sha1:282eb40a8c8f08d41f7559bed7e34ed631a79741
+ pristine_git_object: 3007637729253c53e2e422a98735dd8afca72d83
src/openrouter/components/chatreasoningsummaryverbosityenum.py:
id: 8edd38b78444
last_write_checksum: sha1:3bb67c7fd68492b13b967b49462568ea22ce79ee
pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810
src/openrouter/components/chatrequest.py:
id: 5e39eaefa9cf
- last_write_checksum: sha1:a7e22228e9fb8125f2f98286dd5bbdc02764cc42
- pristine_git_object: 0af80f72c6486dcca3f669c8023fb2158c09f3bf
+ last_write_checksum: sha1:b0aaaf512fc2971908ebe2b72555504bd25d2063
+ pristine_git_object: 6a2482a4a6154c3efee5c10f1010eb5ce42b611b
src/openrouter/components/chatresult.py:
id: 9062fe2935fe
- last_write_checksum: sha1:a00e8c236198ebc412448df0978ada8320cd6094
- pristine_git_object: 472df5b2091d62d509c7bc1a8db1ac6d3f765337
+ last_write_checksum: sha1:b0a7c4966abc14496a4fbaf9d3cd596c845da797
+ pristine_git_object: 35a7ea24902a10fb9daf16e7e56c42cf063c7453
src/openrouter/components/chatstreamchoice.py:
id: 356768c2edcc
- last_write_checksum: sha1:cf82174e2028643980368429669ec1937f0947ee
- pristine_git_object: 03e0839a13b0ab6601299dc4117e63a01b192da8
+ last_write_checksum: sha1:bb475a522fedfb04084c1b6b0e7cb5d8a0d4cdad
+ pristine_git_object: 9166d93e4c351c7465ba67e2e7f4708038d6ef2b
src/openrouter/components/chatstreamchunk.py:
id: 16cdd8d4a3d1
- last_write_checksum: sha1:0ff3ca3499eb7013b97e3e8008dc41ef6e2797e3
- pristine_git_object: 59e17c203d2d8b39e2a997d9395b1fd2a468f407
+ last_write_checksum: sha1:4474a7f0b1e6bee8302231bd5cd6ed295d102a0c
+ pristine_git_object: 24aa825cd2c2ca95464306d2c73e80378a049ebd
src/openrouter/components/chatstreamdelta.py:
id: 7484252729d4
- last_write_checksum: sha1:ca00bacdc826e6a5cf9aab973eba701ef22c0be7
- pristine_git_object: 540982efe82cd07b028c3c464225b8ca07c49ec3
+ last_write_checksum: sha1:2e1a6408c51e6519337e01c394f4ce7695edf573
+ pristine_git_object: 8d0c74c413e531eee7b7130e3cc3d9286a262229
src/openrouter/components/chatstreamoptions.py:
id: 85e752c7d55e
last_write_checksum: sha1:9e989c9b9282d3a014d3933e6d2227ca242ae1f6
pristine_git_object: 48eb279a4e3d4e04c484f5da2feb90e49a585fba
src/openrouter/components/chatstreamtoolcall.py:
id: 7afc3bcd51e4
- last_write_checksum: sha1:010ed05983d30593deba4018c045bcb9d15e6a3a
- pristine_git_object: 0f25b0c526ecffa95f2dac92b3fe71ffd7f5ca56
+ last_write_checksum: sha1:a7d37d8e6e0fd2c6db08f2ab9dce9cfbe4be92b6
+ pristine_git_object: 461213986d44d0e5e79e8f2bcce4ac1892f639d0
src/openrouter/components/chatsystemmessage.py:
id: 72524b9ccaed
- last_write_checksum: sha1:d3113b29e851e983cb9694d6984b74316cc840b2
- pristine_git_object: e123812f43469e6755ccc16e317ab1eb1d30935f
+ last_write_checksum: sha1:e2ebb6daa6d430843678c7102b2d7b542155a8a8
+ pristine_git_object: a9e7bb12af12d0dc6592de4da55bdf23e854a76b
src/openrouter/components/chattokenlogprob.py:
id: 6ddf9cf44f5a
- last_write_checksum: sha1:9c91ea4df5ecd9fb2a98082a300e4ffe9a612cb4
- pristine_git_object: a52d234da8e20301a442e397d8fb58582d345ce4
+ last_write_checksum: sha1:e205f6e2e60d32d72f64ca67543b8524e5dd3c84
+ pristine_git_object: 2a82b99eed3d853ea554205049989e048aea45e9
src/openrouter/components/chattokenlogprobs.py:
id: f173ce5bcc37
last_write_checksum: sha1:8656ce700afff96f866555500521923d274c5aa7
pristine_git_object: 037f8b50e5fa0dca36a9754ff01db39b63950ab6
src/openrouter/components/chattoolcall.py:
id: 494372b36e05
- last_write_checksum: sha1:3f66bb07a4c3a78a3238a2ec54ed1995a5693d83
- pristine_git_object: 4788e38fabe8883e56ac44d37b350fe7c08f1f88
+ last_write_checksum: sha1:892f2a4800d448de1f1735ae91e301a6475b5189
+ pristine_git_object: 17d6de61d58aaca1ae684b2e3ddaabfe225b2557
src/openrouter/components/chattoolchoice.py:
id: 3188396ab842
last_write_checksum: sha1:c78f3f3f7cb1824fd00775f95e51b79c02b0633b
pristine_git_object: 4bdebae06f62957cc2c962945714293aa239315d
src/openrouter/components/chattoolmessage.py:
id: 7c42588b57f4
- last_write_checksum: sha1:17abb79223b2c459fd20e29d2017b8440054986c
- pristine_git_object: 1738954588ea6e6e498e402dc23ab619817cd494
+ last_write_checksum: sha1:67bbf68b10bde230884fc78093a665e73916e913
+ pristine_git_object: 2ccba8386486b7a730816a9829b01754935a2e96
src/openrouter/components/chatusage.py:
id: f224a054bf45
- last_write_checksum: sha1:aabc8e93e433486fbf07147a6200dd7a6622cdd9
- pristine_git_object: 51f0bd676b3cdfcf3adf4a8a7abe54f902920f95
+ last_write_checksum: sha1:c2dce05488ace855f6267ea11423f853ffdd7e40
+ pristine_git_object: 7df37ad7685e4b5265abfda05a39be892c662bac
src/openrouter/components/chatusermessage.py:
id: 7777191e729a
- last_write_checksum: sha1:375139983530cae76be6a0f0e65665fe7c72b5f5
- pristine_git_object: c8ecec590b526ad840a2dc456e741a81f155eb65
- src/openrouter/components/chatwebsearchservertool.py:
- id: 260cb1ea2a9f
- last_write_checksum: sha1:0ba4039a86edfae0d2edd2e3ccc90fd43e391c60
- pristine_git_object: 48ad6da7900ec52e8290e59b3eeda43920720cc5
+ last_write_checksum: sha1:1ecc9101c05178427d73e455de4d679ac8d78015
+ pristine_git_object: 9092aa329bdd58891c2c6f92a6d9c4228b37400c
src/openrouter/components/chatwebsearchshorthand.py:
id: 13091b97a3f6
- last_write_checksum: sha1:6bf695cea1ade1e8644bec9f28181eeebda60efa
- pristine_git_object: 92d86d4bcc0680cc3b772a39ebdf012891ee8079
+ last_write_checksum: sha1:0b1c948199169dd81947509f41128c5df6d74e05
+ pristine_git_object: 707f0cf6b3b874838ea24df2364ec8cc913df244
src/openrouter/components/codeinterpreterservertool.py:
id: a72c520afbf9
- last_write_checksum: sha1:59ee01e6e91d0b9949170a9c1e45489fa08f3519
- pristine_git_object: 3342144f176dec419e453168b53ea7e3a3bd4ab3
+ last_write_checksum: sha1:f6123d9808c530e0b042e0a30fbb1a11a82096e6
+ pristine_git_object: 67d4cf9e411c21528c7a5648e9a4c31e9f99e316
src/openrouter/components/codexlocalshelltool.py:
id: 74a77b6a8b21
last_write_checksum: sha1:135cdc82ad9f65401da11274c786e471888e27e7
pristine_git_object: ea86f79f7e10d7584621fb804ac56e7bb79578ba
src/openrouter/components/compoundfilter.py:
id: 0cab72c7a3bc
- last_write_checksum: sha1:553b50c2656ddcd2b127d5ddc6b89670e2090cf0
- pristine_git_object: f4bcd5598acc997de4b2deaa3fa3c5f5403e1923
+ last_write_checksum: sha1:8ff3005f188637f3a82bfb4c842ac1eed8fdb8e1
+ pristine_git_object: b32ff67d3c2096c21d785a9eb037ff4bd293cbe8
src/openrouter/components/computeruseservertool.py:
id: 10d96ee539dc
- last_write_checksum: sha1:3303ed08cb8269a190c2274fd3577c7c1a3922b3
- pristine_git_object: c1596a6463c30db9940a9ce5618a0a5e2aa91c46
+ last_write_checksum: sha1:62b38f9910153b95695824e7820f0f3bc2f85b35
+ pristine_git_object: 8f6128f97f9b7ea70c3b4453aee67fb2bcde2db0
src/openrouter/components/conflictresponseerrordata.py:
id: 212cdf3bcdda
last_write_checksum: sha1:ee91dc17cf80f2aa72eb976fdf60ad4c094ca45b
pristine_git_object: fdbfb1678062f33794f10f032a13f127c35a7db7
src/openrouter/components/contentpartaddedevent.py:
id: a074d4f3e193
- last_write_checksum: sha1:b2eaf5ef181c94a6e9f2cdde71f5eb8fd4a01950
- pristine_git_object: 8a0d0c7e6a89df258fd408d927d28d2e3b2b47b8
+ last_write_checksum: sha1:016196b914b861c920e8cea01b04207bddd5e286
+ pristine_git_object: 019b9064d04bf201e7599e79e605ca249bfab61b
src/openrouter/components/contentpartdoneevent.py:
id: ebc3878afbf6
- last_write_checksum: sha1:136ba4d68548992e58867fadd02098a37c5ccf42
- pristine_git_object: f9046afdcf5bdeab07df73495fad3b60b2e7fadb
+ last_write_checksum: sha1:8394f718a55af4ff9b1b0f8302e974d320f8cf7f
+ pristine_git_object: 8a7f7380eb02f24f57819fffc03f8f06b70e3c84
+ src/openrouter/components/contentpartimage.py:
+ id: d6af351c330e
+ last_write_checksum: sha1:22c7d09037d2aca7022a4e1e507d44d2eb051a89
+ pristine_git_object: baee3cb60f9359158c57a53c75d1702cdeed6c2b
src/openrouter/components/contextcompressionengine.py:
id: a3965275d07f
last_write_checksum: sha1:8aeacab427a9277db44ef731fd7a38a58752a64f
pristine_git_object: 7d5b6f700b28296f6879a4a87d65a794f3e96cb3
+ src/openrouter/components/contextcompressionplugin.py:
+ id: 0262a4f96713
+ last_write_checksum: sha1:288a9cf2f3b3a0d90a71ac60f4c4a6f03f6f2444
+ pristine_git_object: 22758a015ceb978263246b58da19d382ae38938e
+ src/openrouter/components/createguardrailrequest.py:
+ id: 34d69149fb33
+ last_write_checksum: sha1:ccba7f6571884aa3fa3f0202d16a6a5bf973570a
+ pristine_git_object: d0acbe13ae43d809855f365efb0a9979c77c78ad
+ src/openrouter/components/createguardrailresponse.py:
+ id: b4e1bdf1de5b
+ last_write_checksum: sha1:ae20a5e7425510c240e5697d847b1cae65940bd6
+ pristine_git_object: d6c4a4dc73222668daddc2a1788d314ff30e8fe6
src/openrouter/components/customtool.py:
id: e83b0c530680
- last_write_checksum: sha1:8c39362a8d105601a0a71d429580ac5a43ca94d9
- pristine_git_object: bc706a4a769d1e024d22b81389f849561dcaa0ff
- src/openrouter/components/datacollection.py:
- id: a0942bfa5b87
- last_write_checksum: sha1:481b33241b57867b54901f74d2e2801a341fcc74
- pristine_git_object: 0ab58be6bd3c5fd096e29e7b88c355832653bebc
+ last_write_checksum: sha1:4ac260beeb9cb5b2bd21156d23315263ebe7f891
+ pristine_git_object: 128bede72e4efe343a109ae6f37dbd646a3fe20e
src/openrouter/components/datetimeservertool.py:
id: 444350bd66f4
- last_write_checksum: sha1:5fba84fbab27da8328b66550cfcdd9aef7272cf9
- pristine_git_object: ced5c343d04435632a1dc5e998d44e7416303b93
+ last_write_checksum: sha1:ce9c7aba930c6a8764ca762052912d6533ccf53a
+ pristine_git_object: d98c3fd0b630abed2a013cb29e2382002949c1d5
+ src/openrouter/components/datetimeservertoolconfig.py:
+ id: 96ac233137bf
+ last_write_checksum: sha1:0e20ce9fd09b64922e63b1bf37395bb80ea3e440
+ pristine_git_object: 3eaaa33c3856a99254c617bcfe98693f31db1234
src/openrouter/components/defaultparameters.py:
id: 548f4f885c22
- last_write_checksum: sha1:4b5a1ec5c29450f60055a676685e09ea524e3c92
- pristine_git_object: 8af36cc061d64995ce57e088373394b31d6a024c
+ last_write_checksum: sha1:8eb3e285540840e0d5ce5deacca3c314ec5e7794
+ pristine_git_object: a59fa40202864f5968163adb7520defd211d28e4
+ src/openrouter/components/deleteguardrailresponse.py:
+ id: c3ac908331ef
+ last_write_checksum: sha1:8984f78ae6a2b3ee8b16d7f0018622ba725c1583
+ pristine_git_object: f31843cfe4e36f3f6371837221b6966fabaa563a
src/openrouter/components/easyinputmessage.py:
id: 72619a312585
- last_write_checksum: sha1:7cd7509a28229e5e8ce2c813a8acc68e51c86ac9
- pristine_git_object: b7a6d28c4fce743d331d637e7aa78dca9218b896
+ last_write_checksum: sha1:154ba5f3afee09526acdc5d6291584e01c54f6ed
+ pristine_git_object: 75661670388ead48bc50e34948fbebdf8caa5f66
src/openrouter/components/edgenetworktimeoutresponseerrordata.py:
id: dc53aae5b171
last_write_checksum: sha1:5f40d76eafb399dfee5f6e5a8cc6eb94ecf3ff8b
@@ -3640,20 +3772,24 @@ trackedFiles:
pristine_git_object: ed5f8af0c599b1e55bb1939bc1d2aff0aeef610d
src/openrouter/components/errorevent.py:
id: 8e87043bec43
- last_write_checksum: sha1:23bbd8cfed63a979a827aedce8e42f66b5020f0f
- pristine_git_object: 38fb52051a4646c60313429a8af3e5c1e788eefd
+ last_write_checksum: sha1:ca2fd0001394a54cbaaf07abb827184f58e1de9e
+ pristine_git_object: 83b6cd340292e31f23e5d4638e9e45753f612b7d
src/openrouter/components/filecitation.py:
id: ae9f50481422
- last_write_checksum: sha1:a0f00f66a78e415be312e3d70dbe3534b01a13d3
- pristine_git_object: 265b6ebd1afff4754f2f89995db5dc5e352f0cd7
+ last_write_checksum: sha1:3e94a2b7245fb44ae818f78168767980f41e6559
+ pristine_git_object: 7217c3099593e28e52a784193364285f101d7318
+ src/openrouter/components/fileparserplugin.py:
+ id: 1120c86c0856
+ last_write_checksum: sha1:a23fe386c1606aebe30057fec1d20516b5984f7e
+ pristine_git_object: 4c88871d5537324d62eedd0ab15204f1a279ebbb
src/openrouter/components/filepath.py:
id: 9e37fa73a86a
- last_write_checksum: sha1:55329bd8e0d1dbc1a4aeaa66ea443d9ec7f4ffb0
- pristine_git_object: 3afbce35ec42707a31317983382d5dc5ca108d03
+ last_write_checksum: sha1:65fe062e78f2716c180230379cbd3419f8b36e49
+ pristine_git_object: fc29881e08f5804dd5ba0ab66572d6c74f83e0c4
src/openrouter/components/filesearchservertool.py:
id: 8ecc4d4a0ddd
- last_write_checksum: sha1:23500895c3f2aa7360c7f1f8e63ed649e7845956
- pristine_git_object: 347f0232681b0521b8ecc328813a0e3c0eab028e
+ last_write_checksum: sha1:e8e50b2359f7c8e18f8a015720cb230cbffc9912
+ pristine_git_object: 54e3cfb48db5ef4bc60aa64ba46837596c388316
src/openrouter/components/forbiddenresponseerrordata.py:
id: 93ae47a0c337
last_write_checksum: sha1:dffd1d7517d9ad6ce139089de52a0308c2b234ec
@@ -3664,8 +3800,8 @@ trackedFiles:
pristine_git_object: a530b83d7202df8626a379619592e71c964eabf8
src/openrouter/components/formatjsonschemaconfig.py:
id: 93c37c13510f
- last_write_checksum: sha1:6ff616ec064ffe29e6beaaf838c9bbf27c457da3
- pristine_git_object: 109f115a7afa21b2a88cefecee6330d72a9cdbb6
+ last_write_checksum: sha1:12fe39900dbf181a893b751663549a6fd48232ad
+ pristine_git_object: 4a08f89d026da9db0e46ee1354adf1156f0a28fe
src/openrouter/components/formats.py:
id: 26f57c67a9d5
last_write_checksum: sha1:addc98a1b6687d0edbe18bed1de17af4cf17e03d
@@ -3674,46 +3810,58 @@ trackedFiles:
id: 2e01bed905b9
last_write_checksum: sha1:c192d45b9530804e6e75ec40829b50b9f1adf5fd
pristine_git_object: fddfc9b96954944ee881adc12430c9cb38aa835a
+ src/openrouter/components/frameimage.py:
+ id: b0ed6cdd579c
+ last_write_checksum: sha1:6ca944c66b46bfef8a46c72e1d6958662b77af90
+ pristine_git_object: 9e5aa13a34ab0d55be29560be0c2995661181620
src/openrouter/components/functioncallargsdeltaevent.py:
id: 4e8187066efd
- last_write_checksum: sha1:5609d2e599e47473f67d307cd77e24f8b4f231dd
- pristine_git_object: b035dc305a9edbeb6f7a3240a42728f9494087e8
+ last_write_checksum: sha1:d618e8c717d93159fd21fe457d03a85549498a71
+ pristine_git_object: a7386aa7865dc4cd2fe1347e7accfa3d7f3c838c
src/openrouter/components/functioncallargsdoneevent.py:
id: f2f71a241c22
- last_write_checksum: sha1:c1aebd0c5adb36dc917a3512a1bd7e3543a0f9cc
- pristine_git_object: 335579b1055222d8079666141a487c6eccc1ea0b
+ last_write_checksum: sha1:a490fb5f3abfdfb3312f741a5b1add6fb2274275
+ pristine_git_object: 613c2bbaec296ed9b0da13f249ef96b9314ff9ed
src/openrouter/components/functioncallitem.py:
id: 5e69afffd660
- last_write_checksum: sha1:a974a9001304dc4ac8b829f8436fd7491a620289
- pristine_git_object: 666d0b05553bcf21a4e48252731e8ef134626024
+ last_write_checksum: sha1:43301cbce07f88805e03ac0a1e1c236a382cd4d4
+ pristine_git_object: 5f04a0596dc5e071e601336c6f710e6d47d1e296
src/openrouter/components/functioncalloutputitem.py:
id: bf659aa04e7d
- last_write_checksum: sha1:0a12e07fb5148a167e32d96be37a98dcba3ebd36
- pristine_git_object: 5173384b7c17ab8bde006291251f101037146945
- src/openrouter/components/goneresponseerrordata.py:
- id: 41f97eceb29a
- last_write_checksum: sha1:f2a9f26b6e724ddac1fd29963cdc01a5941e9fa9
- pristine_git_object: 78177b848271cd74e44d0fc956ff8d15be5871de
+ last_write_checksum: sha1:0beae7f5475531ffd58d6b8bcceb5e9ea987387f
+ pristine_git_object: 239f67dc3d0b8bd82e81c1f510afb7df96397401
+ src/openrouter/components/getguardrailresponse.py:
+ id: 6f9054fab3d9
+ last_write_checksum: sha1:f20a0be686991d8f7ed0eb884612586052efc5c1
+ pristine_git_object: 6cdeb99e76ab6ad2e22b13164efbdb68cf8f328d
+ src/openrouter/components/guardrail.py:
+ id: 67ee78dd06e6
+ last_write_checksum: sha1:44844d42057c7d41beded21d89b51471ec6e872e
+ pristine_git_object: d1c779c5e23b11d5c0d74b6318db259121ffeb7b
+ src/openrouter/components/guardrailinterval.py:
+ id: 01687fc135ab
+ last_write_checksum: sha1:430f886f371b85777346de663202d62708cd84cf
+ pristine_git_object: 9cdf08ab3c380a8ea69b5884bcd40a09464589c6
src/openrouter/components/imagegencallcompletedevent.py:
id: cbf654faeb3e
- last_write_checksum: sha1:c09c72377699dfcb9030c7353f7b9db1b955a268
- pristine_git_object: 72f087556941548dd5cbf4619f1ddceefe86240f
+ last_write_checksum: sha1:8fb3e34408dd8b167afc6aad641de9cc2483c9f1
+ pristine_git_object: 06d804ac21a02d60ac3e05ea99f31b6f30237f52
src/openrouter/components/imagegencallgeneratingevent.py:
id: e1a5027a61e8
- last_write_checksum: sha1:fd04a14c7cdd78778f51c0ebc2a5c0b22d167b3e
- pristine_git_object: 91842cb6cc8da703c5abe8f7e00f2d2c0d576ed9
+ last_write_checksum: sha1:1ccf227e5a5a2e355d816149c13c30acee9b5009
+ pristine_git_object: 3c9a93ecc7a15c695eb6f1b3ab4953aa92f4ac62
src/openrouter/components/imagegencallinprogressevent.py:
id: 34a85e3f14ac
- last_write_checksum: sha1:258165d78f66e7cf211872068f79b5905e2e5e77
- pristine_git_object: 4b9b6124f4168425e8e82e7848ff2db40bf3fc75
+ last_write_checksum: sha1:3d8de089487b017ce717eec9c9302f0737786cfe
+ pristine_git_object: d26ec370afb702dcfa0cc091f6108641c4221a11
src/openrouter/components/imagegencallpartialimageevent.py:
id: 8d83770569d5
- last_write_checksum: sha1:4214b25cfd389dbf53b40432c51f6a6bb4712d27
- pristine_git_object: 8be2e339feabee1471eb72f2b0d1c1d350f278c8
+ last_write_checksum: sha1:c56b462d54b40d74e37bda390528b127565b33fd
+ pristine_git_object: 5f17d77c25a82ad2bf7b1211d05ee665b6fee35a
src/openrouter/components/imagegenerationservertool.py:
id: 9c95bc975f2e
- last_write_checksum: sha1:eb7a84cd0c722e5f630b43cd3f066d1fd5472162
- pristine_git_object: 98d922500f0ad926ae9915713eed1ce17d2c07dc
+ last_write_checksum: sha1:5b6cf7e4c433056713467e1fbb680e644a1f47bc
+ pristine_git_object: 1bb3764815a286c4774d5b0a6b841c1606d57fa0
src/openrouter/components/imagegenerationstatus.py:
id: f257690edb46
last_write_checksum: sha1:8ae33e94dc42144f3269a65834ed7d59aeab3c69
@@ -3724,32 +3872,32 @@ trackedFiles:
pristine_git_object: 56dc0963b67dead0ad9f529fd7e3275e95af73eb
src/openrouter/components/inputaudio.py:
id: f8f101a46dda
- last_write_checksum: sha1:0698c45aeb49f8a15acd5ac64273d7ed3c879b56
- pristine_git_object: 0c0db5ec381b0db089364612eb22d3301995bb4d
+ last_write_checksum: sha1:93bf549be043e2a083944c3dc42912827efa4e43
+ pristine_git_object: 00e2180bab28843dd022391c6985d4eca733a6a3
src/openrouter/components/inputfile.py:
id: 19d9367db0d0
- last_write_checksum: sha1:5c785eb1494bf26d8d5f4c0af64464f13f69c585
- pristine_git_object: ec4f269eaf6a9f4577a7573b991eac4edef13b71
+ last_write_checksum: sha1:953c4a25890b45eeb4f4bd56c619fc212ca03ff7
+ pristine_git_object: 7a6dacdccea14227eed247b8c2442a79578608e1
src/openrouter/components/inputimage.py:
id: 995d068f1073
- last_write_checksum: sha1:7827e2a8eaab3a1471b8fd45dec1731d512fc654
- pristine_git_object: 9888ab5de7878104e96617c3a2a40e176d4aff86
+ last_write_checksum: sha1:1922908de3eb591081acf99d2a34b1659ee54c69
+ pristine_git_object: 279f76bb22e6b123d6ba49447c5a5098871fb9f3
src/openrouter/components/inputmessageitem.py:
id: 6c5260d62714
- last_write_checksum: sha1:df17649d394440e06e567dd89343bdc35a165ff4
- pristine_git_object: 808a7fae141e9b6a56b438084808fad09da1a799
+ last_write_checksum: sha1:79ef4e787e82e9839cb1523d5d8e34ff2afad5bd
+ pristine_git_object: 9ee8aab8f11a526af00d93d20b69ffb7cd04f6a7
src/openrouter/components/inputmodality.py:
id: ffa999fb401a
last_write_checksum: sha1:da607c1deed71fcc11d880b7cebe92471e2ec5d4
pristine_git_object: 3b0c560bc9298bd40e2cdf1933ed0d5b98bb919b
src/openrouter/components/inputs_union.py:
id: 17d6239cb6a7
- last_write_checksum: sha1:ec70ed9240de14eacb0eed1cbe761eeb5376a770
- pristine_git_object: d846015e59ac03ea312649ec11ba8dd734c489d2
+ last_write_checksum: sha1:6b4ed04db14f3afdc0d62b9cc36da363101c4f8e
+ pristine_git_object: 723f035840411ada143c5a48fa8372a9bb098d24
src/openrouter/components/inputtext.py:
id: a995ae96be99
- last_write_checksum: sha1:768e2fa6174bdc3f5e69b8a9d4cffde625fe83db
- pristine_git_object: cfc912b14c714db4b593930b4c5ab1f83017e8b0
+ last_write_checksum: sha1:0e30dbfa1813d3e69e0ccd2511f50080cce0fb6e
+ pristine_git_object: 088b7564b2d7a76d0a1aef448050975fbc18663c
src/openrouter/components/inputvideo.py:
id: d262affd6f7e
last_write_checksum: sha1:60c1792ab1f440ae67b5b451fd4d195e02783161
@@ -3762,126 +3910,230 @@ trackedFiles:
id: 91397805fa13
last_write_checksum: sha1:cb5655008ac7209608b832f0d28de8c21a0831c5
pristine_git_object: 499f4923723d9e027cfc90e8481de44a123134b0
+ src/openrouter/components/keyassignment.py:
+ id: 07a64362e7fd
+ last_write_checksum: sha1:769458eeb21e1b275a63ba7bdf70a60fe9506a8f
+ pristine_git_object: 1598e46441729cfac244f806248a72f124e289c6
src/openrouter/components/legacy_chatcontentvideo.py:
id: b06bf8b4b644
last_write_checksum: sha1:13c50b1957251e4819fc8ac6545c64cfe940bc8f
pristine_git_object: b5dd4d1a0d29169acd66c3b92b04dd9cf5291f79
src/openrouter/components/legacy_websearchservertool.py:
id: 8b28b05b8756
- last_write_checksum: sha1:2940666d2a72ae6ed075161b12c0004114851e06
- pristine_git_object: a04ab37fe6de98cb1070699df82c43410c33eee8
+ last_write_checksum: sha1:2a917ce617b652fa9bc490d8f74e661480ff4f81
+ pristine_git_object: 3b584a93c2329f2ff1c4b24a57abe0d238e35fcb
src/openrouter/components/listendpointsresponse.py:
id: 7662d5774bdb
- last_write_checksum: sha1:64dec808abc7a17b683d4db714b7ad7393d9c5bd
- pristine_git_object: f4f947a311b93bb92cc9b6b4e1ec68c7a0f7a40c
+ last_write_checksum: sha1:47bb7a70d674ab63a157333c6c11cd36f1f41a6c
+ pristine_git_object: de4f12152b4ff4ba981538c21fdf4567b7b6cdca
+ src/openrouter/components/listguardrailsresponse.py:
+ id: 78fbd2689b5d
+ last_write_checksum: sha1:d3103f2ff7aa2be788ef4aacf6a068497779cca1
+ pristine_git_object: c7af7a7d691ca4e900f64befcd7b43a1ecff3ff8
+ src/openrouter/components/listkeyassignmentsresponse.py:
+ id: d5aeae7ea50e
+ last_write_checksum: sha1:68b7fb667ea24ce11e8d854b370094b510722833
+ pristine_git_object: 252641434f7328a32be851929ca1c96bbe86d98d
+ src/openrouter/components/listmemberassignmentsresponse.py:
+ id: 78ca80afcc6f
+ last_write_checksum: sha1:3edda0c8ff111abaf5332475d89a87e84f4f5d78
+ pristine_git_object: 1497ba3814f2f058c1332d8bcf92a2e2bbed0fe5
src/openrouter/components/mcpservertool.py:
id: bb8aeb03a111
- last_write_checksum: sha1:59c63e9d3f8d59b08531e7b1edf2c2065efc6933
- pristine_git_object: c613dd3a3cd29b05646542fcf074ab9e702f36b9
+ last_write_checksum: sha1:014b01dd6253437640d2b3fbd084cfddb2399073
+ pristine_git_object: 2a2dce01b6afc66f15150a51245ed0a781347c0d
+ src/openrouter/components/memberassignment.py:
+ id: c11eba01a3db
+ last_write_checksum: sha1:db9d3c5dcd61a231f7c93bc92a5adce4a4811ad6
+ pristine_git_object: bf257605d2a5dc41234cb9fcfdda939948b26388
src/openrouter/components/model.py:
id: cef3adaa772b
- last_write_checksum: sha1:96ed6b4e7899e632fa9e5e95ba70fca5d131207d
- pristine_git_object: 256a8d288ef8fa55361c5aee04cac5ea7138efca
+ last_write_checksum: sha1:d3f7c187d04c26f53197b0ea66f6b40063400041
+ pristine_git_object: b4be94fbc1d7c973d481d5abf020263e7080e838
src/openrouter/components/modelarchitecture.py:
id: b37ac27e512b
- last_write_checksum: sha1:bcd6d2ecddaa07eef2c60a46185cf41203a940c9
- pristine_git_object: 656f0c00b4e1f78ed6f5e792ce0f14e587da9cc1
+ last_write_checksum: sha1:e1dd41aa140b2ca2c3bbf15abf74e034d42b0166
+ pristine_git_object: 2da26c7abc1b7e2b895a056c72d90bf8c8efa6b4
src/openrouter/components/modelgroup.py:
id: ffb5492b0d39
- last_write_checksum: sha1:5630b3d23157cbb8e7daa785338c37e46a0cf078
- pristine_git_object: ae6ee9e563fe319f0f5083789689b8ae91471e8d
+ last_write_checksum: sha1:75da0e0a977d4fd2908506683548c7a8c878b869
+ pristine_git_object: 2491da1edbccaf8ab233b4a0767885f9a5d4f020
+ src/openrouter/components/modellinks.py:
+ id: b8759a1a4787
+ last_write_checksum: sha1:69b2c991666848f4790e5136c67553733cc68a54
+ pristine_git_object: c197cb2c527296adff2c3cfd9e49bcbc48087ce7
src/openrouter/components/modelscountresponse.py:
id: c08f960ac611
- last_write_checksum: sha1:5203d03794da7f92723b9157998798f1d0ae09cf
- pristine_git_object: e80d5135bfed4f0a8ab9956a8855892ae9efd8d2
+ last_write_checksum: sha1:e53d3191d1edd6e289a90fe22c69ab1f02ec73ed
+ pristine_git_object: 86bb27c9ce62c148a54ec7a61796154a2ca18c76
src/openrouter/components/modelslistresponse.py:
id: c2d4bb2cac89
last_write_checksum: sha1:54bc618bea7ddcaa4e49082d601065c634fb2ea1
pristine_git_object: 8497c58e5956b9344427e0147063b01ab86c7001
+ src/openrouter/components/moderationplugin.py:
+ id: d99bd9d505d3
+ last_write_checksum: sha1:58ff3e6829b973b3db5ed7dda3fa11558ded04b2
+ pristine_git_object: c2db9e78ad403cc9c27269d0be222ec85706446d
src/openrouter/components/notfoundresponseerrordata.py:
id: 6ebceef7a039
last_write_checksum: sha1:b57cbe36f5a56241d3736f59a6a10f974751feb4
pristine_git_object: 5b8ca0ce252ca2fc909770c5c338793b05877a91
+ src/openrouter/components/openairesponsefunctiontoolcall.py:
+ id: f201e89f8dcb
+ last_write_checksum: sha1:502991b4294892f58dfbaf0f8dc4c8ffdcb08b6c
+ pristine_git_object: f3a4cf75215d3ccad2be058f8423e8254d758551
+ src/openrouter/components/openairesponsefunctiontoolcalloutput.py:
+ id: 1440f5810305
+ last_write_checksum: sha1:d24140b6566a04d5962fa967d28575c828502bf9
+ pristine_git_object: 491f3fa16ca666e3509eaf389e803927c5c6e80d
+ src/openrouter/components/openairesponseinputmessageitem.py:
+ id: 90c7fe9366e7
+ last_write_checksum: sha1:3cdac28f313ad612a2b31f40b4437c7067078305
+ pristine_git_object: 5aedf6b16d685bb9048349dfdaef06b1c289dda0
src/openrouter/components/openairesponsesannotation.py:
id: 092d7d770eb3
last_write_checksum: sha1:54d0c47c3486c15abd9a45622fa31607a946eaf6
pristine_git_object: 1303f981ea1190c46bfcc6e538995a7a630fe4ee
src/openrouter/components/openairesponsesrefusalcontent.py:
id: e65dad8b00d3
- last_write_checksum: sha1:724d8cb2464bbb3a3ca6650961a5bf7d5fa0847f
- pristine_git_object: 9500782547b2a7e58179d94f615d07c780e2a9e4
+ last_write_checksum: sha1:5891412e704c1af0b69bdebf44e2555f6e8117cd
+ pristine_git_object: 3273a6d2c12f8afde84a86b91756fc95f5ae4a02
src/openrouter/components/openairesponsesresponsestatus.py:
id: 8178c2b14bdd
last_write_checksum: sha1:0adab12817c56d82110d8fe2a7f08863f32003ba
pristine_git_object: cd39badb7af07d0bb5390e687427aebd6230ea76
src/openrouter/components/openairesponsestoolchoice_union.py:
id: 1a0b229049a2
- last_write_checksum: sha1:8fffa04d07c64ab204c30f8f5dab0a20e277e5cf
- pristine_git_object: 5db29bbc6640b8baa5f520de2f283cc760edc06b
+ last_write_checksum: sha1:1912fd554d0659742cdb7a30d381de1f97457ea5
+ pristine_git_object: cca8c5f26eb9e616a5916a04f277f0d64a414ca7
src/openrouter/components/openairesponsestruncation.py:
id: 0c92464e7292
last_write_checksum: sha1:5df4098cf0472d2df40fdcc1350f81d6059a9ab7
pristine_git_object: c481d06cfb216c14cb5da8ef37526b64b1f6cfc9
+ src/openrouter/components/openresponsescreatedevent.py:
+ id: 688bd28d76ae
+ last_write_checksum: sha1:c82d1bd9953796a2e350fd0a76189a9d0a2df63c
+ pristine_git_object: 2a125a58cbc85290937faa3eaec8efcc7a68a18c
+ src/openrouter/components/openresponsesinprogressevent.py:
+ id: 932dccaeb6bd
+ last_write_checksum: sha1:dae711452eec3e12f787d58999add0b9ee7650c9
+ pristine_git_object: 08d990d8cc07b7928158fc55784cd9d613f4c58b
src/openrouter/components/openresponsesresult.py:
id: 78f7e33b19e6
- last_write_checksum: sha1:3f479eb987a35575cf7697bc182b52b43433385f
- pristine_git_object: 7d7ae0a2e885a2b9a7aea640e73c600f4106fec2
+ last_write_checksum: sha1:fa6f57fed62bfb641a8fbcfa322c2b1c192decb6
+ pristine_git_object: 1a565178778c0f5f249304e439b193f23dac5353
+ src/openrouter/components/openrouterwebsearchservertool.py:
+ id: f5400a5de3cd
+ last_write_checksum: sha1:e1cd10158e15f88d5c2903b1508a42d4006f4f3f
+ pristine_git_object: 0f83d4405d1f2f7892dea255eac01aa34bd8ee2c
+ src/openrouter/components/outputapplypatchservertoolitem.py:
+ id: e38119e7e094
+ last_write_checksum: sha1:7193cc63977b00836e70456e630e608563a2e233
+ pristine_git_object: 5b2be1e4d805e992dd139ca6a37c0998dce05922
+ src/openrouter/components/outputbashservertoolitem.py:
+ id: 39d03767e214
+ last_write_checksum: sha1:1f60c9358728a826bba8a6226f11deba788120d8
+ pristine_git_object: 2b9fe1845eb56d368106f217c9944027868b6263
+ src/openrouter/components/outputbrowseruseservertoolitem.py:
+ id: 73bff94d7284
+ last_write_checksum: sha1:0428a118986766743c6ba142b7a68906f2fc8331
+ pristine_git_object: 4e7aac5b5ff66ad429b406d62b8b6cec6824313f
+ src/openrouter/components/outputcodeinterpretercallitem.py:
+ id: f3d69267994b
+ last_write_checksum: sha1:0972f4588d8f6c3364e51d69d2f1aaff763f16de
+ pristine_git_object: a2363f953a090e92eb0052051734e4f2b821fde5
+ src/openrouter/components/outputcodeinterpreterservertoolitem.py:
+ id: 628c3093647e
+ last_write_checksum: sha1:65f7bd8c941e9c16533c5cdbc309d46ebeb106ca
+ pristine_git_object: 50a002ff46a064755d5fde512da95f4d2397ef6f
+ src/openrouter/components/outputcomputercallitem.py:
+ id: b6b688951964
+ last_write_checksum: sha1:6277e30250e00908ebdf47710d20b9d7bf54e684
+ pristine_git_object: 6d1009d4e2ce8adda879e3ba997ace6a25ece010
src/openrouter/components/outputdatetimeitem.py:
id: d7784d04fba3
- last_write_checksum: sha1:8126a324273007fd013dc8690409b45e7bd5f78d
- pristine_git_object: d11192eef18693538137ad5a8a965b74f5045e48
+ last_write_checksum: sha1:95710e9c510d4b205ae5c52e512377a999c5c1ce
+ pristine_git_object: e84df923deb29f9ff6c2595fb92d8cbead3cf3f7
src/openrouter/components/outputfilesearchcallitem.py:
id: 61b88e4356a3
- last_write_checksum: sha1:ce9f9d53babfea56dc763955f6db6839329748ad
- pristine_git_object: ce347e9432e00b57eab3dda08bea6c02bcc66345
+ last_write_checksum: sha1:a26855c34e42956077678a9c80c5472bdd478447
+ pristine_git_object: 0c3c4ba7a473e037d8621fbf5de7d6bd69d1395b
+ src/openrouter/components/outputfilesearchservertoolitem.py:
+ id: 9e99e5ff3288
+ last_write_checksum: sha1:a961e64e1d2852f409e3696d07f5a461d938f648
+ pristine_git_object: 1916f7da478607126180a8d7e25dcc56cd36c93f
src/openrouter/components/outputfunctioncallitem.py:
id: 516ed67b5406
- last_write_checksum: sha1:074a4da1944fc9820aad080b2b2542a797d1b045
- pristine_git_object: f82f43bce7acf855be5986e14cb8dd613e88878c
+ last_write_checksum: sha1:71708bac0660918fb3b71100435b232e0f9ad2e4
+ pristine_git_object: 9df0afe02e5cd6b96e09933031df1d0a86906458
src/openrouter/components/outputimagegenerationcallitem.py:
id: 48d20dc00e1c
- last_write_checksum: sha1:fb120f939b41d9ca80ba8bbf154cb9ad6dfa28af
- pristine_git_object: 2347dba6d8f66add652d655257cf5f021e4f8596
+ 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
src/openrouter/components/outputitemimagegenerationcall.py:
id: 0b4cbdbd733f
- last_write_checksum: sha1:7e6ec3f9f8c20b44467f67eb29dbc735e0d2b97a
- pristine_git_object: 857deaba996e9a3715bd188fea07c5e296b872a3
+ last_write_checksum: sha1:f9ea61a170b8e516108d2d59b0e7df9d264d3aad
+ pristine_git_object: 897c4727eec2497fe15e5603187e24218c08ac87
src/openrouter/components/outputitems.py:
id: 90f107de3116
- last_write_checksum: sha1:394b6cdb81bb81e98401900dfaf65ddb0906d72a
- pristine_git_object: 1936438d4a5010761b4c128136417b93b4f7b689
+ last_write_checksum: sha1:3e25cbb638d9f753193e6c7882077468032a30f8
+ pristine_git_object: 4457f805c46470e36ff5cfd30eebab43e0039a96
+ src/openrouter/components/outputmcpservertoolitem.py:
+ id: bb8c2536a58e
+ last_write_checksum: sha1:6cbe556b2268af0142d982007b273cc43b7605c7
+ pristine_git_object: 259566184ef98b93f30329b961e8598da36f572e
+ src/openrouter/components/outputmemoryservertoolitem.py:
+ id: 4b0dc2fc5f41
+ last_write_checksum: sha1:452622e2debedac3ccaed0365ba612644d7ab8e7
+ pristine_git_object: 204cc7d4f1e68e56852c9f3449a336ac516f3019
src/openrouter/components/outputmessage.py:
id: c6828e87dbd3
- last_write_checksum: sha1:b608203c0fc29d1ce893504381f4444ffa09c550
- pristine_git_object: 497bcc03ffaa9d8db9ce253a56180bc92a15375c
+ last_write_checksum: sha1:04dc553699acda6552a0bc461c9eb74245b9670b
+ pristine_git_object: def0cb71f27238b4e3ea52e6e1eb3329cdc4e184
src/openrouter/components/outputmessageitem.py:
id: 97dec64e783f
- last_write_checksum: sha1:9bd2266f0c827b0ca854ee6b847559994eb5b2dc
- pristine_git_object: fbe391becfa3c8baa417adb66374518d39e0a501
+ last_write_checksum: sha1:0ef0488f60686e827be3a3f73d6d1f8b6808b850
+ pristine_git_object: ec59a9d5b4c96843033bd73783a7b923fb741928
src/openrouter/components/outputmodality.py:
id: 74c79e4cad45
- last_write_checksum: sha1:2f3327bc4da37835c4819749e6d4aef81afbc274
- pristine_git_object: b3120b07d91e2391b157cb695dc3aebb323e5899
+ last_write_checksum: sha1:76cc17e2a535074d823d7250c3e856d165ceeb70
+ pristine_git_object: c926bb65891bd067cfbf45ae48f960a63820aa70
src/openrouter/components/outputmodalityenum.py:
id: 82bebf193d55
last_write_checksum: sha1:2983ef9a3c82244eff5f8b1184637a1fef13573c
pristine_git_object: ccd5283d0d31048059abf6ff85677b5d1f9f4b7b
src/openrouter/components/outputreasoningitem.py:
id: 0bc0568f44f9
- last_write_checksum: sha1:06912ef8f32e785c0df069bb534296c168830ec8
- pristine_git_object: 5ab5d77ec8b163b3ba7220a31d4a6bcb9ccb09b9
- src/openrouter/components/outputservertoolitem.py:
- id: 8f675ae75ccc
- last_write_checksum: sha1:2168af0cc9366a855b61a77293b690aebfc98c50
- pristine_git_object: abfbff581efdd88f8aeaa27b385502d60f4f02ec
+ last_write_checksum: sha1:3c460a262ff94910ea443fa6ac7d3f6608c3209f
+ pristine_git_object: 50eff94f87fe82aba4fe330ee61e79ab885847fc
+ src/openrouter/components/outputtexteditorservertoolitem.py:
+ id: 2a5dc9318fe6
+ last_write_checksum: sha1:75ce53e78b352b0427acfb5310b2500ee76351dd
+ pristine_git_object: 6b7dc1cbaf7ed7d2943a8c336990c032a9c638a1
+ src/openrouter/components/outputtoolsearchservertoolitem.py:
+ id: fb4ec737039d
+ last_write_checksum: sha1:cd368fb2d7f2cff91351c5922291f025177b5fe2
+ pristine_git_object: 45dfd93dab49766840806b9263ab64da9f6fe0e5
+ src/openrouter/components/outputwebfetchservertoolitem.py:
+ id: 2b12eb287cdf
+ last_write_checksum: sha1:9cbfbd687515a31c41c198f9fa0dcb82a1046932
+ pristine_git_object: f443472d28fae0a33cf50463bd76525d0ba296dd
src/openrouter/components/outputwebsearchcallitem.py:
id: 8c94cd441023
- last_write_checksum: sha1:55ce991f9816055cc01fbd5dbfa6c6b37f3f0500
- pristine_git_object: 84d048cbef1cc78cdca6b65c1cf64cc970681720
+ last_write_checksum: sha1:8eb97fbc2b8dd6a21377ca892ee6fbfd36924610
+ pristine_git_object: 706303d7461ee7df2823f973f5ba517f076ed27e
+ src/openrouter/components/outputwebsearchservertoolitem.py:
+ id: b1fcca0b3fd3
+ last_write_checksum: sha1:c82e5ab1c16b409708c4997fcaf45d8abaa1e1b9
+ pristine_git_object: 304cab51826d39b91964917148f886f8bb681149
src/openrouter/components/parameter.py:
id: d76aede00388
- last_write_checksum: sha1:b78beaed494f5267301b0125960c26ef20011441
- pristine_git_object: b84cbf0a1ddb6ffd07ae9720d0a78954d7f0bbdc
+ last_write_checksum: sha1:bfd3c5f0f386b8c743f724c52ba51d97e49a1757
+ pristine_git_object: 9aaebc4cb7eefdce97f37e89d6d719e524d148e5
src/openrouter/components/payloadtoolargeresponseerrordata.py:
id: 5209b3a61cc9
last_write_checksum: sha1:ba13b793314af45716d3ed5572abaad213d01850
@@ -3900,20 +4152,20 @@ trackedFiles:
pristine_git_object: 4510e737dd18154f31fb91ea607db550c11f8290
src/openrouter/components/percentilelatencycutoffs.py:
id: 00ca8d5c0100
- last_write_checksum: sha1:81d6bd48f353122c5106ecf3a8540588876fb2d9
- pristine_git_object: fa8175fcefc672bad9edcc8612dcc447723a723e
+ last_write_checksum: sha1:8b410420ec880d0d08a6d99f41d4b047bdae9d90
+ pristine_git_object: 47b987a7d45d94702dcae46496735d5de827c941
src/openrouter/components/percentilestats.py:
id: 9c88efe57f70
last_write_checksum: sha1:c66a32149756893be4e46f16bf166cd9e36dd9f0
pristine_git_object: e979e11469df4f37098d5804ffd3e5da217468b9
src/openrouter/components/percentilethroughputcutoffs.py:
id: 652397163aaa
- last_write_checksum: sha1:409e8a4c017d03a4f852bdbfae874fd126a434d5
- pristine_git_object: 17b28ced7a9ad1df064a5509d55b1ead8cb2a4a5
+ last_write_checksum: sha1:9d6b65012c6b2884e883ecc4024fc452622f9d10
+ pristine_git_object: d6e0323b1ca34ee37890b75373d12385a827f866
src/openrouter/components/perrequestlimits.py:
id: 5a170d7d1f2e
- last_write_checksum: sha1:0828a3a91c51ece02fda34da9c045dfbc4a49015
- pristine_git_object: d83c7d1d274a151720e92741fe20d1009bd841d1
+ last_write_checksum: sha1:9b269bd87a1f704a0f0fa731da57cb35bc960674
+ pristine_git_object: d572e3bfa6c8a55afa7d4f057fa17186652a98a1
src/openrouter/components/preferredmaxlatency.py:
id: 20675ae045ba
last_write_checksum: sha1:279e300348daf2d15744ee9e0e6520639e95dfd2
@@ -3924,28 +4176,32 @@ trackedFiles:
pristine_git_object: ceb4be7e491c27a88e8c5987268e9cea098317e8
src/openrouter/components/preview_20250311_websearchservertool.py:
id: ecfe1a37c34f
- last_write_checksum: sha1:979b40bd602579cb09071bc167e4b6ddd59813bf
- pristine_git_object: 883019b2be1b45b512a8f197910db36ccec47ae3
+ last_write_checksum: sha1:0f1409a07771fe8ae5c7be7130a75424ecd7de5f
+ pristine_git_object: 2f0cd464f6e9c118472c9fa2365456e5522f285d
src/openrouter/components/preview_websearchservertool.py:
id: 9c02777285ce
- last_write_checksum: sha1:ce8d7487fe3cdba6526d956cf04840baccb6a43d
- pristine_git_object: 0903c5a4bf9a57aea88673f266a6ce58db88863b
+ last_write_checksum: sha1:1921201f0eaee55ac342d6ab987e9ece535c598d
+ pristine_git_object: 434b214eef98bac64bfe51f0c511d5b5030180f3
src/openrouter/components/preview_websearchuserlocation.py:
id: 40414eada27a
last_write_checksum: sha1:52707a8a06e2c03a4c671f909e42c6d1da6dabed
pristine_git_object: 72dd15242d7d35b2b493f90d0cdebf6f8a51d684
src/openrouter/components/providername.py:
id: fcc722fa2fce
- last_write_checksum: sha1:eb2c77e4fb86b3b7d34fde52cc9046791da32d32
- pristine_git_object: 413ecfcfef7cd94854eb677e2df7362847f953e4
+ last_write_checksum: sha1:5f1b8a8471ab3d11bd0d18927a9cd9c747bababe
+ pristine_git_object: 7764a12512827640f3c32a22b199b09cd890b57f
src/openrouter/components/provideroverloadedresponseerrordata.py:
id: 5b693682570e
last_write_checksum: sha1:41a977452d58b52cb9d4b3a85f4b7970529352d5
pristine_git_object: f3d7756851495a1f1cdbf62fd62d20ff0ea07bf8
src/openrouter/components/providerpreferences.py:
id: cdd58c8d664d
- last_write_checksum: sha1:a480fec760655f5ab494ae626ba2c28fdb3cd3af
- pristine_git_object: 819a6daf6a28c4ae98f20c39219ded335a9ae6a1
+ last_write_checksum: sha1:6b45aaae052bcf64980242ec344fe385de94ebd3
+ pristine_git_object: 5145815e6196470f3f5f24893afdc4415d27c53e
+ src/openrouter/components/providerresponse.py:
+ id: ad3887be54c5
+ last_write_checksum: sha1:d5988a5d8c6174971287275305c6b638b6325940
+ pristine_git_object: 4856eee2be0d7aeaadc4cbacd0ba1b08e5886999
src/openrouter/components/providersort.py:
id: 348e382bf494
last_write_checksum: sha1:57551507f95cd2e16ef995e1c13f859fd0726152
@@ -3956,112 +4212,124 @@ trackedFiles:
pristine_git_object: 4e1073b4e3c10943c7035376f9984cd6559653a2
src/openrouter/components/publicendpoint.py:
id: 848aa2ef9129
- last_write_checksum: sha1:37068961163092b9c887c0d9c82ba0ebf71a2a68
- pristine_git_object: 522f96bea1bd83abdd2cdf63020d078127feea7e
+ last_write_checksum: sha1:eaeb6ac6a3b3ab23fb1021bc1c84a0d8ea8264e8
+ pristine_git_object: 04885b1822518383f68cbc6ceb62488cbf960a3b
src/openrouter/components/publicpricing.py:
id: 96d115d83cc5
- last_write_checksum: sha1:9d57a7c06bf1db89dd6dfd3742e6d78ebf0fa99b
- pristine_git_object: 0aef8d6ec575304043c57a355090e70066e6ff1e
+ last_write_checksum: sha1:ccec3f6d6b07186a612c23561f2bbe6ecfd6839f
+ pristine_git_object: 42a29282d09996796b9e981b96a2772d08eea28c
src/openrouter/components/quantization.py:
id: bde317b3d703
last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d
pristine_git_object: dfcecafdc6d2a3a3dbc7beec2f07e1258415b2b4
src/openrouter/components/reasoningconfig.py:
id: 754fc31a7b69
- last_write_checksum: sha1:66f29e2f1a3c1537ab4d908606fb6c88873f3c94
- pristine_git_object: 513a56db69e31d6de0802ae56a64a4329bef0065
+ last_write_checksum: sha1:d5f07c166136b8c271b567a2363432656c758531
+ pristine_git_object: 7157cd7aad433672c5501959a4eb8a37ca81c5a4
src/openrouter/components/reasoningdeltaevent.py:
id: 6de06228d1f6
- last_write_checksum: sha1:c3a5e9b7210fc55ed26cf3d6f46077e2e5353547
- pristine_git_object: ef4af5f31e138ce1f293e28ee7fc9a2416124a55
+ last_write_checksum: sha1:efff164cfffbf6b89ab270ac4912243649149457
+ pristine_git_object: fce551fac40c914beb4d8db48ad8f0acde7c2212
src/openrouter/components/reasoningdetailencrypted.py:
id: ae7d7526c9b5
- last_write_checksum: sha1:8bb3019754e8ab1cf0eb57c970c4bc1766d4f1ff
- pristine_git_object: e8d1942f72ce4119989984db134db1bffdf5f68b
+ last_write_checksum: sha1:91114e68c6610a4d70a813ca3b188d5f1a02f238
+ pristine_git_object: 0cfaff93983cceca55a02f8cda020db7a9024121
src/openrouter/components/reasoningdetailsummary.py:
id: 53bda5c72dc5
- last_write_checksum: sha1:27834e781ae9a8f32d5e35ff5463ddea20945992
- pristine_git_object: 19be6e512498314e715d31c99caaea8c595b13d5
+ last_write_checksum: sha1:ad22f1d6a12836d5324048fd9965e4a9fd1b536b
+ pristine_git_object: ceab1ea50261bf588a3175889c1e9a439ff9643a
src/openrouter/components/reasoningdetailtext.py:
id: 62f254529b87
- last_write_checksum: sha1:dd1dc4c54ea5b2b8f5f176eaf1a10d655ab922b1
- pristine_git_object: 422067df630370298f029e2e60bceec05bcbcedc
+ last_write_checksum: sha1:1cc4802602df372dd93fe48a8d422768ee395cb8
+ pristine_git_object: a21b8ede1b4c9405cec2d3b2937c8c4fc7ee6a44
src/openrouter/components/reasoningdetailunion.py:
id: 3326e0b80cdb
- last_write_checksum: sha1:62dee592ffc9a930890e9879342bd37ece254285
- pristine_git_object: 636473021e0c5b515e38996a7576c70d41702ec9
+ last_write_checksum: sha1:94b5f9d7b3f65acd1a77db4d4cb843623bef587f
+ pristine_git_object: 42ce66369bbd7e527e12cda8b48ba50971f8674c
src/openrouter/components/reasoningdoneevent.py:
id: 5d7fc847e949
- last_write_checksum: sha1:e34f1cf97579f73ce5af1f9b2861c02f0e1b4abc
- pristine_git_object: 3dcca9ff97e12328e3cb817bc811f039389c1261
- src/openrouter/components/reasoningeffortenum.py:
- id: 98c047f96d0c
- last_write_checksum: sha1:e3816f21742509719ceb9c00bd462aa2c2babe93
- pristine_git_object: 58d10b54a154bc72ea9766717ad0a9d66767797b
+ last_write_checksum: sha1:456aa0d5bc1ca2e46d2dd494d3d0f78d77ca23bf
+ pristine_git_object: 29c0fc9a1ff14d26fc99a70bac491ce3b4240384
+ src/openrouter/components/reasoningeffort.py:
+ id: cadb8da93572
+ last_write_checksum: sha1:a4d9c3c61ccfc2842592ca33d310b15b60bf9a10
+ pristine_git_object: 3cf5b2e32d9b73277c73db6141e841f416fba384
+ src/openrouter/components/reasoningformat.py:
+ id: 99d79e5500b6
+ last_write_checksum: sha1:bfb111196309079ff8dcb09ab406d08a3a809e67
+ pristine_git_object: 3145901807a1b03565dab73b2738b14f27919f52
src/openrouter/components/reasoningitem.py:
id: 4345f446ad97
- last_write_checksum: sha1:1abd8b76fe628a073eb43ce6acc35a5a8ae1e108
- pristine_git_object: 9fdf1e6712e991f1fea6100cc53d733143588726
+ last_write_checksum: sha1:1b76e91974e6f37f29bc7db90d5d4207f7c333c6
+ pristine_git_object: 43d3ff5e66c9c6761fb2fb78219452d77675dd04
src/openrouter/components/reasoningsummarypartaddedevent.py:
id: 006a060524d6
- last_write_checksum: sha1:6ec4fbbf0f7c3164078be3028d2369660377f392
- pristine_git_object: 1c451f8d2c184a05e211606bbee9ee4dd7ea948b
+ last_write_checksum: sha1:acd510a13e5cc8df7dcca38040af2be0a37a689b
+ pristine_git_object: e498256f260e95fe437548449e73ec110869f89e
src/openrouter/components/reasoningsummarypartdoneevent.py:
id: 47e4f3e87c57
- last_write_checksum: sha1:62631df0a15d925544662b341929a90318a6955e
- pristine_git_object: f22910435d017ff8cfd8d8d14a2ab2a20110e1af
+ last_write_checksum: sha1:65dbb60d496ba702b92d9d83c5984b69832b59ac
+ pristine_git_object: b1d4fa8a30f180fbb0d874021a63b61446161b24
src/openrouter/components/reasoningsummarytext.py:
id: a1dc6f00beb5
- last_write_checksum: sha1:c75be0683c4f90c725462eb635e37eb2a5afeb42
- pristine_git_object: 55e368fe9328dfd157bf0af79e200ac03dd1ff4b
+ last_write_checksum: sha1:72dd1e2354867035990c66dc94103a4fd942a8cf
+ pristine_git_object: c6d91172bac85309c708cdd72469ade5de94d6b2
src/openrouter/components/reasoningsummarytextdeltaevent.py:
id: 979527a4c6be
- last_write_checksum: sha1:e559d46426275ab09822caa2cc2faf0f2d4f56bc
- pristine_git_object: f5070ae6f8ef31598efd49049304e40eb1a04ac6
+ last_write_checksum: sha1:d5212aa4e24e16abb67ae0feb71147e4ceaa83c8
+ pristine_git_object: 05be1839a77708e1ad9056b4b4bd96de1b34547e
src/openrouter/components/reasoningsummarytextdoneevent.py:
id: 326dee82fb46
- last_write_checksum: sha1:02e13d39eaaf275be48cd198d7ddbbb0ce436d85
- pristine_git_object: 2f0d77b8927f05fc4c9ff66230c248c7dccadf47
- src/openrouter/components/reasoningsummaryverbosityenum.py:
- id: 65e0332c8bdc
- last_write_checksum: sha1:b800a2c14bdadce75c099474755abbc3b8fdfd68
- pristine_git_object: 6cfcfb3743c593235446f93e552450fc4deee5a2
+ last_write_checksum: sha1:9d032bc9be0534f0f25b3d177c84dadf3463c04d
+ pristine_git_object: a9d1f8cc235c7c4303d8afb278d49e3d105233cc
+ src/openrouter/components/reasoningsummaryverbosity.py:
+ id: 69f7f91c3a0e
+ last_write_checksum: sha1:93a960fae9d781c4704115f506de412a16430d5b
+ pristine_git_object: 6ed1f76cfc37bdeaeab2ef67a5430af28fd080e4
src/openrouter/components/reasoningtextcontent.py:
id: 39e110f99aee
- last_write_checksum: sha1:a0984180feec0759f24993f34d5ef88c8ec55723
- pristine_git_object: ecac43e98ab55ddc69cb9c95cc563653a7512f83
+ last_write_checksum: sha1:042b23429e2ac7ddc10851691d227a7fb7fd6aa5
+ pristine_git_object: 95a557a02b37606c8a6ba374aabbcb2ae86ae88f
src/openrouter/components/refusaldeltaevent.py:
id: 35558498ab4b
- last_write_checksum: sha1:ea0266c203133fa91cec08475c5becf9f8a2d13a
- pristine_git_object: fa8e88016faf5bbab83d9e2610d1fcf4d5183031
+ last_write_checksum: sha1:ba5611b833aef9ed481a8cba09df50345593ec23
+ pristine_git_object: 72f61854b162a6198e9025da2b930b75408d5719
src/openrouter/components/refusaldoneevent.py:
id: 57605bfcaca3
- last_write_checksum: sha1:de35056359d2a07c5f529d80503ba7d01fc3f846
- pristine_git_object: 78652316aa2ab2168252e696343a84a96fd1ad56
+ last_write_checksum: sha1:db596a4c6df72e79e7e8b68a4c038b8c7f354f7e
+ pristine_git_object: e09987ebcd2b8c39d61a8a766655bd275d4e7039
src/openrouter/components/requesttimeoutresponseerrordata.py:
id: 2c5f5ceaf22d
last_write_checksum: sha1:2173f6ce9aedc0f4afbb76167bae56d0db186ebf
pristine_git_object: 50be74aa7d8198c25ecf4d858077ddded9fb740f
+ src/openrouter/components/responsehealingplugin.py:
+ id: 06608e027868
+ last_write_checksum: sha1:11dc1c5534543ffe4492fbaac23f6a264519a693
+ pristine_git_object: c13279f2c2943981b51b5dac402c82c4a07f63e7
src/openrouter/components/responseincludesenum.py:
id: dff573cddd73
last_write_checksum: sha1:71e46afb70c23cf988579d27b6df3ebf421f1684
pristine_git_object: 9da58c5b22cbe284a9fa130b63c7d8ead77669c5
src/openrouter/components/responseoutputtext.py:
id: cbc203c3ff40
- last_write_checksum: sha1:63efd82c28381d4463843500ab297528d4d97b01
- pristine_git_object: b92a2b126463dadca4cd157284a3b5245c39af04
+ last_write_checksum: sha1:0ead2b72e02365330f7aafcec8a81d51a849cd59
+ pristine_git_object: b1c89ab1d6cd0305229efbf134e168e7e223f772
src/openrouter/components/responseserrorfield.py:
id: 565a88fd70a1
last_write_checksum: sha1:3efa77fc8cd3aeef21266d3dcbf47717f7856830
pristine_git_object: d3c77624292ba0985104a6125e462c305a633d84
src/openrouter/components/responsesrequest.py:
id: 8c850080ec5d
- last_write_checksum: sha1:705af4e77d8cd3d6359ce0fce589a318f50c7024
- pristine_git_object: 122a0414503f50c38e178bf9b2f3535af953269b
+ last_write_checksum: sha1:0a780f225dd8afae2ce99590bdcec98dd3cde7d1
+ pristine_git_object: bf396f9a8237fd7733d1d5cdd0d8d5b206bef4d2
src/openrouter/components/searchcontextsizeenum.py:
id: c246413c0bd7
last_write_checksum: sha1:863a664a9f17def86180b0407c8233c263acfae7
pristine_git_object: 7faa97b80bfc0d362fd89c255adb708a4f7afc05
+ src/openrouter/components/searchqualitylevel.py:
+ id: 8fdb148edfb2
+ last_write_checksum: sha1:ef6932e03bc19a234c36b511313826048241b56f
+ pristine_git_object: 36eba036095d6981523ed162e3a9b30188731651
src/openrouter/components/security.py:
id: ae2ca334218a
last_write_checksum: sha1:e6bfa94172df4c823ed9dd83b9b2614e6890d462
@@ -4080,40 +4348,76 @@ trackedFiles:
pristine_git_object: ffb7a43e64bfef2809683fe60a5d17744ea345c3
src/openrouter/components/streamevents.py:
id: 331636234c76
- last_write_checksum: sha1:49d5c11087cb3c2efdaa05067ac7dd6cb2d26187
- pristine_git_object: 58d269412183bc509ffa8e2fd0662f736331a1c2
+ last_write_checksum: sha1:9940f9b8ae8a4198a4ead72a1906bc31e979839b
+ pristine_git_object: c663877267863a9a85e45c56c03004f642feca50
+ src/openrouter/components/streameventsresponsecompleted.py:
+ id: fd244f61371c
+ last_write_checksum: sha1:011e0930c7994f64dbee78c0a4c2fa5d7167d8ab
+ pristine_git_object: f1f969ba39fab11d3b66d417cd2c009047a02323
+ src/openrouter/components/streameventsresponsefailed.py:
+ id: a1562f0bbd65
+ last_write_checksum: sha1:3fa4535bbf8db8d3f3be95a0786ba6c7fe77dd55
+ pristine_git_object: 1a0dbc5279f954f4e50cb7fe4d83002d5bd4dc28
+ src/openrouter/components/streameventsresponseincomplete.py:
+ id: 8676df582839
+ last_write_checksum: sha1:0da6f8ccd0704390643c7b061cb9d8d4e5487cb0
+ pristine_git_object: a5f28e1ee4c4fd514c45e9a3d82134b0332125b5
+ src/openrouter/components/streameventsresponseoutputitemadded.py:
+ id: 965fcc865bbc
+ last_write_checksum: sha1:a1ce175727b5d3b18e6b759227cc57a7001df096
+ pristine_git_object: ec50be5d886c3aef9076c0cafccc3280d209d431
+ src/openrouter/components/streameventsresponseoutputitemdone.py:
+ id: 02d00ea35943
+ last_write_checksum: sha1:7f6f9f8e85673fef328241113f7a3d59eec69b6f
+ pristine_git_object: f94015b84f011f33a2ef571d4789c87cf9dd758b
+ src/openrouter/components/streamlogprob.py:
+ id: b69b8f2bb578
+ last_write_checksum: sha1:ebb53f7ee5acf6262f67574a27fd35b134691bd8
+ pristine_git_object: 44e37608374c05189542fec1faaf76667ab55f28
+ src/openrouter/components/streamlogprobtoplogprob.py:
+ 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/textdeltaevent.py:
id: 6d1d416a373d
- last_write_checksum: sha1:4d5beac405628644601e3495c8e2374ea36eb5d1
- pristine_git_object: c42bdbc2cb069e20dca83f071b9263b7aae83d69
+ last_write_checksum: sha1:9a024e07b3f2d65d5f88e01f0e2035efd956f3fc
+ pristine_git_object: f314ebc7a6689370772f0fd6cbff9f4a84815098
src/openrouter/components/textdoneevent.py:
id: 63884cd6f224
- last_write_checksum: sha1:dcf19ae3f92d11359ddc43e06701f9be89e5eb69
- pristine_git_object: a21655a423b92e8a4a5bccb789e2768b28049c93
+ last_write_checksum: sha1:48d4486a104ed464e192b54affc3d3abf56b9696
+ pristine_git_object: 9bc3b1fd09ca7d4be981ceb7b10e14fb157dbb5f
src/openrouter/components/textextendedconfig.py:
id: 150a449e46de
last_write_checksum: sha1:8e6dd8672fcc687c8a930c533d94daac4bb4ce5d
pristine_git_object: ee561b18699c16f952bc036a2d0903e0ea3a8d9b
- src/openrouter/components/toolcallstatusenum.py:
- id: 08e406c73b69
- last_write_checksum: sha1:677017415ce127b7d07a501585244306d5306a35
- pristine_git_object: feeccd7c2e4b9f3268cd2da11965e1e39183875e
+ src/openrouter/components/toolcallstatus.py:
+ id: 32339139c3f3
+ last_write_checksum: sha1:a75631cdb460f190aa10d5557519519d1ef5fbe3
+ pristine_git_object: bbd8827835868c2708baa37d1a060b3f24f16cc3
+ src/openrouter/components/toolchoiceallowed.py:
+ id: 9e2a14e87eac
+ last_write_checksum: sha1:53bae953f77869389789d3d520b0cc22e65cd5bf
+ pristine_git_object: 999b399bc6f5ad2be3bb87f813d0ed1fb5ec2614
src/openrouter/components/toomanyrequestsresponseerrordata.py:
id: 4dc67ae011a1
last_write_checksum: sha1:e30024f0469a52dd7d249f8bc3b8c2cd28212790
pristine_git_object: 19fda103cedcccd94e8feac9ee0a069454b06868
src/openrouter/components/topproviderinfo.py:
id: 0517ce43cc77
- last_write_checksum: sha1:4a111af0fd6c2c83146b57035a9ead8f4c7b8d04
- pristine_git_object: 791263586bb834b9e8fc156d057c98413a52dffe
- src/openrouter/components/truncationenum.py:
- id: c28e5ced6582
- last_write_checksum: sha1:ddf1b1b96ee9864f36f9ce5eef2a00cfa5c526a3
- pristine_git_object: d848ca9e2bc6ec7219eb408ebf3b32c238bdb128
+ last_write_checksum: sha1:d00eaf491caa06fd306a8e7ea22980cf5025c86c
+ pristine_git_object: d5f5d35575889d9a04cc0512fff6910f242aaff8
+ src/openrouter/components/traceconfig.py:
+ id: 19375fa88b9a
+ last_write_checksum: sha1:f8f931bcc35e0b4cd45669a77fddf7fab812da16
+ pristine_git_object: 644b9be533d692ffc34a9fb5f563f69aa0438ca3
+ src/openrouter/components/truncation.py:
+ id: 88f4e4be9fc0
+ last_write_checksum: sha1:69e1f9d19ad27b82d882031c100f8a607344f8af
+ pristine_git_object: 1f8bea3c63592dc738f70d50eac8c69e2e755096
src/openrouter/components/unauthorizedresponseerrordata.py:
id: 7d9755fc8395
last_write_checksum: sha1:d614e72cc67bf6c4da7f57cf0f4367de726ec06d
@@ -4122,62 +4426,114 @@ trackedFiles:
id: e8ca4a51f994
last_write_checksum: sha1:d9ff0dea491e12d5ccb28607eb65f00fe8d694aa
pristine_git_object: 1c70ab3d8b23363543675abe5d3b3566aea113e7
+ src/openrouter/components/updateguardrailrequest.py:
+ id: 6a557cd822a0
+ last_write_checksum: sha1:18e5c377616336011698f7dbc7e7b7f797e85ccd
+ pristine_git_object: ac199a97e7780b8d15a623a04138f2ae8ab0cb35
+ src/openrouter/components/updateguardrailresponse.py:
+ id: 7b068d26ce31
+ last_write_checksum: sha1:2b63cbb90747f07f775d9a22e80f74c67221fea8
+ pristine_git_object: df833960211cc7ed2a2a42fddbeafda0092e1c0c
src/openrouter/components/urlcitation.py:
id: fe4578e64ea3
- last_write_checksum: sha1:e78bb25f909d1111245ee54b1c65855f4157059d
- pristine_git_object: f5ad030dd383deb69b0bdfe15e9c87bb3c5de09b
+ last_write_checksum: sha1:c63b25e9b3162a543d7e4a8bb88f8a10b2d8d8d9
+ pristine_git_object: 5fbad2e52909780be771ec9e3aa3410cf0ed7561
src/openrouter/components/usage.py:
id: 965ca6748bf6
- last_write_checksum: sha1:1193d530ad11861f2b0f6fc7b2d329694a91de46
- pristine_git_object: 37e41bfe89a17e316de7ea20ef224dfdea92e20a
+ last_write_checksum: sha1:dd89198ccc0089fc10e4072b66ac8248636fd553
+ pristine_git_object: bce40413582842d38e334193913889d92ede78e8
+ src/openrouter/components/videogenerationrequest.py:
+ id: 70e3c9ff288c
+ last_write_checksum: sha1:f892d1c5506561312151604aa837b90546603d7f
+ pristine_git_object: db54f129779d55863e0ea63affc0600700d2fcaf
+ src/openrouter/components/videogenerationresponse.py:
+ id: 541f1321b072
+ last_write_checksum: sha1:051ace67776106616ec4c8e55cf2df9a99855d0f
+ pristine_git_object: ab182a8151bf251a7cb587e3a8dcf07337a468e9
+ src/openrouter/components/videogenerationusage.py:
+ id: dded36eba597
+ last_write_checksum: sha1:abe43fc81268db99abab0bc9e6c9076e7e776aff
+ pristine_git_object: 806f1d0757c87b0e8c6cf166a6c13dbf0710d802
+ src/openrouter/components/videomodel.py:
+ id: a544a49f7891
+ last_write_checksum: sha1:5a49a75ead25b02765b589d207e3bb5e98bb190e
+ pristine_git_object: f313821b8f9b35d48978c2040c1953b7a0d50f3a
+ src/openrouter/components/videomodelslistresponse.py:
+ id: 2e9d1ce2cf19
+ last_write_checksum: sha1:b94977aa6941f7cf15c889f1b7cc69b50cd35856
+ pristine_git_object: 796e741c43389a96f2ed44d3b5d862475a8af2cc
src/openrouter/components/websearchcallcompletedevent.py:
id: a5818af2b521
- last_write_checksum: sha1:818bd52b535c64998a9346722da3e7c69b9480e9
- pristine_git_object: 3e4c846c837b84edbbe7270e29b54956a0e6a314
+ last_write_checksum: sha1:538a39bf773415567086a28ff2cde66fd37ea763
+ pristine_git_object: 360d8438599c50fc064fac8c7e1e7fc0e8ef0541
src/openrouter/components/websearchcallinprogressevent.py:
id: fc52afdffc58
- last_write_checksum: sha1:4d98068cb44767cdf2257c90e41b150badb0fd95
- pristine_git_object: 1bd1ad010f4b22ed961c8b4adee3945b8b27dd36
+ last_write_checksum: sha1:1ada7c6631df2ba84b35c88af5e30c063e4af4ce
+ pristine_git_object: 8fceb5b38cb38e12a3991f9486b8a143882028fd
src/openrouter/components/websearchcallsearchingevent.py:
id: 2aeb2f7f322d
- last_write_checksum: sha1:400eebe552981a583ea943f902e608b6da81cea8
- pristine_git_object: 3d93cbc8b841f85413aad87fe31228a38fa721fc
+ last_write_checksum: sha1:13289bf130fa2b940eb893f463f67363d1a1b5f2
+ pristine_git_object: adceee794cf8135f5db3b2d741dc6e4de9c4e968
+ src/openrouter/components/websearchconfig.py:
+ id: 3884d9509e8c
+ last_write_checksum: sha1:203af5719bc5fb7c66956e4554eba9d3b1a30542
+ pristine_git_object: dfe91153bcab48d544ee9a7f4a4d409640e6599a
+ src/openrouter/components/websearchdomainfilter.py:
+ id: 4a7307ed2ba6
+ last_write_checksum: sha1:043839dada28f82b33f70534895e98e7ee6ce7f5
+ pristine_git_object: 64d3c5f2138e19cbe4f4444e006ac826be48d808
src/openrouter/components/websearchengine.py:
id: 9e028088afc7
last_write_checksum: sha1:d549940c1ee74aa82d7aff4ff3ce6846a8ff20f1
pristine_git_object: 992db72e3236a262e2d93d2ed58f0ae44cc194bc
+ src/openrouter/components/websearchengineenum.py:
+ id: 97803317b825
+ last_write_checksum: sha1:d9619246b43934e903790a5fc8a4802745d79f54
+ pristine_git_object: e98eed23d754ed438624c041a7f433522e0e001d
+ src/openrouter/components/websearchplugin.py:
+ id: 1d872d1792a7
+ last_write_checksum: sha1:e6d621eeea6b000cb7cc4e75f2b0695a9426ac9a
+ pristine_git_object: 93c8f70b055d065e08480b5a75ca23d74dbb57e5
src/openrouter/components/websearchservertool.py:
id: 32c7333e3c21
- last_write_checksum: sha1:70a7a97879b318f8c63329050ae2ff2a841f42de
- pristine_git_object: c59e38ca50e39c919bbaeb47972192b184b6161b
+ last_write_checksum: sha1:57f9a9d65715b12f0ad7ddf88690b9eb656b074b
+ pristine_git_object: 363a4ea93e4eff5ac708bd2eb69aa6aada986075
src/openrouter/components/websearchservertool_openrouter.py:
id: 3fcedc999f5b
- last_write_checksum: sha1:02e8045a02fc9f658d5ba1e309933033f85126fd
- pristine_git_object: b624ce7a6cb3772047533b57c5efa48fa5ff4cc5
+ last_write_checksum: sha1:f7419ca78cf720ba7968d0091740d3abdd8fb621
+ pristine_git_object: 29b8262239fccee9b159ec93f0b6fe307d3e636d
+ src/openrouter/components/websearchsource.py:
+ id: a1fe81b68a7b
+ last_write_checksum: sha1:fa30e5813682231d742fb6861f0fe92f655c8e81
+ pristine_git_object: 13e5a78c446eb248e95c1af3f2424c99d577d391
src/openrouter/components/websearchstatus.py:
id: 639330492ee8
last_write_checksum: sha1:bd1285ae6b8fb2695468777c7b22d94ce06b520e
pristine_git_object: a607c88285f5f8b8e0f057750cde1b6cd14244df
src/openrouter/components/websearchuserlocation.py:
id: 26eff9609a46
- last_write_checksum: sha1:c39b72d0cc4dc694be1fd636926489f6f6b05dfd
- pristine_git_object: 4ffc90b3f040fe0f18cad97cfa5220c7e5d26018
+ last_write_checksum: sha1:060077a0757338ae1b6bbd3d194b4771b6e08c90
+ pristine_git_object: bdb5b03c5e524404f4aeb7123b0410b645ac8a74
+ src/openrouter/components/websearchuserlocationservertool.py:
+ id: 34efd6600d16
+ last_write_checksum: sha1:cb3ea048d0ba10bb8fe943c8e1330e677f598a2f
+ pristine_git_object: a716b872c7c00c57fc27733362d5e78120c89c3e
src/openrouter/credits.py:
id: cdc961937101
- last_write_checksum: sha1:96e0326da16cf82713a498c04485c879852c1472
- pristine_git_object: c06e2ae01f025b9b2993ee92a28352921de1a7c3
+ last_write_checksum: sha1:2d49b088f5895c7d1b3167d6d99d304221812fb6
+ pristine_git_object: 0a376fb8ee2df0be8546458e0008a2fbc0fd492a
src/openrouter/embeddings.py:
id: 0374ace39067
- last_write_checksum: sha1:a491c4af1fe4bff2400012c19dc35f52a8eaca68
- pristine_git_object: 0709e4140b7304866b4c86a96918ace2555e8106
+ last_write_checksum: sha1:8622e7717ef639f2ee452d295c4b2c957a2fe13f
+ pristine_git_object: d8426527b3d4f0d8b9398646f1b701b4cdfa7dc3
src/openrouter/endpoints.py:
id: 465bbf2b7939
- last_write_checksum: sha1:ef1e846a154f78df6c3c238a217fc1bd31712a47
- pristine_git_object: 09823d301c103f8e65e9fb2b2153ce7a1d424bd2
+ last_write_checksum: sha1:fced76a1fcb464e0375bb2b0ba848535f34df5dc
+ pristine_git_object: 871bd5b1b9a164b36ae2047afd20cfeba88828a1
src/openrouter/errors/__init__.py:
id: 366154d0d60a
- last_write_checksum: sha1:4765e4763f162d381bebb9b2ec284305fdf62707
- pristine_git_object: 1695b737f1d19a4c63197a3b13f3307fdca1cea9
+ last_write_checksum: sha1:84e5bdd52a3e99fd8bbbd718fa4f075ae0df4f64
+ pristine_git_object: dc5ef68c20dea9461abf913779f5f0e21defc829
src/openrouter/errors/badgatewayresponse_error.py:
id: 818c3605ce23
last_write_checksum: sha1:d9d2599c2be63be36d3891bc94e34535edb3f05a
@@ -4198,10 +4554,6 @@ trackedFiles:
id: 4c1d3e6c95a4
last_write_checksum: sha1:930eb57082f282587d05c77b243990d4bc32fdec
pristine_git_object: f9fd3e58e09630c176f4868c6a962c96c630eb8b
- src/openrouter/errors/goneresponse_error.py:
- id: 13e8901c2c57
- last_write_checksum: sha1:18df5a97e332bbca977222a4fdfd0c1509de32cc
- pristine_git_object: 192dae529965ebc7ba7b5001b8bbc29b2b6a40b4
src/openrouter/errors/internalserverresponse_error.py:
id: a5ab5c4a53a9
last_write_checksum: sha1:f91e21d4022b0ede924736ab9664e63d73e64b55
@@ -4260,12 +4612,12 @@ trackedFiles:
pristine_git_object: 7304f75b9e8f3bef2d1c918f875420b26a15f8d7
src/openrouter/generations.py:
id: 70e1c21042bc
- last_write_checksum: sha1:0bb7915e08196820d93c66ceeed043c2eed0c847
- pristine_git_object: ccf3642d15d648c1ef5fa0f7764020e71334d56f
+ last_write_checksum: sha1:a8dcb94d3809b0b837398caca08dabd3c0481d21
+ pristine_git_object: fddcce7468125b281b22f520928ee5d31f027fc5
src/openrouter/guardrails.py:
id: 705839f34e66
- last_write_checksum: sha1:1e7af450df89f0df402e00064340d64bcdf76734
- pristine_git_object: 31dd3fb93d2a13972fd80dd029db980e3035abf1
+ last_write_checksum: sha1:aff353ba2abd51c9800cf404316f8cc957fc10cc
+ pristine_git_object: 50a17b2c63d2ea1fb4645bab913ab69b09813d98
src/openrouter/httpclient.py:
id: e9311185443d
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
@@ -4284,132 +4636,140 @@ trackedFiles:
pristine_git_object: 701741bbf61e70c9dd84199249f2aa1192c30a18
src/openrouter/models_.py:
id: 4e1ae1fe5b98
- last_write_checksum: sha1:bb33a62e4c0b82cd0434be0dd83570647dd06070
- pristine_git_object: 9da3b0011ccdd2b4e1afc7906d771a14930158db
+ last_write_checksum: sha1:f1edac568824553a64db6fe277dc1bb86ae35cbb
+ pristine_git_object: a0963ae30def1be10c8819632f0a9d5b6728aa38
src/openrouter/oauth.py:
id: 1948ce27255b
- last_write_checksum: sha1:b14ff456d8c26f087e910744f7158634afb20e94
- pristine_git_object: b31df9fe79cf8e58d16e140e93e3ec2c358eb89e
+ last_write_checksum: sha1:e847767a0718afa3d0cac8a3d0735d95e6892265
+ pristine_git_object: ef6eb9aa10d9b067d96dad78a1d34f939c1091e8
src/openrouter/operations/__init__.py:
id: 9afcea1e7161
- last_write_checksum: sha1:acdd42df97635d112197ac02a1d9c9b10d94d4ca
- pristine_git_object: 154f41155799456d23702e5dfffb2efd547b5395
+ last_write_checksum: sha1:ec3ab8fd0729912259f86a370453dd311f440953
+ pristine_git_object: 8c2b3198136aec28d1b51abc1b12386429039561
src/openrouter/operations/bulkassignkeystoguardrail.py:
id: 6d8435d51d9d
- last_write_checksum: sha1:f900853fa8060a8a78674a3e386e7107f0233a44
- pristine_git_object: f258d3d4f0919e2f5f70b857c895906c0095ebda
+ last_write_checksum: sha1:2136b0223191e5d8159c77cff06845958930184e
+ pristine_git_object: e0401f525afe24f77e962fa5e64994b6c5ebe2ce
src/openrouter/operations/bulkassignmemberstoguardrail.py:
id: 079706f81038
- last_write_checksum: sha1:8ec118f1e9f95c56121afec299150adef292229f
- pristine_git_object: 1ebb22da17ed654ba0fee71d6706bd7adcb4ed6c
+ last_write_checksum: sha1:7c8fb1abae40f33c8d467f73b3779503469cad1c
+ pristine_git_object: 80a1cb770eb34221c7691abb44849bb6db23322d
src/openrouter/operations/bulkunassignkeysfromguardrail.py:
id: 006249615b0e
- last_write_checksum: sha1:bc1b57ff2dafb6dfdb121a25822796fe08c943d4
- pristine_git_object: 45cd84b00f28351da9f7572d8bffc48186238c3b
+ last_write_checksum: sha1:88df9d073f73c7d1f0fb70e46a109b17f84f04e8
+ pristine_git_object: 4f4862308bc488f32696cfe91a5110b7bf28ce39
src/openrouter/operations/bulkunassignmembersfromguardrail.py:
id: 8127aafae1ef
- last_write_checksum: sha1:f1970a20b75982f21ae94b1ade20cf0696c6e098
- pristine_git_object: ac6e0c12541c558adba126e92d1808aaccf4c9ab
+ last_write_checksum: sha1:a4c24a2e84c611856ed0ea45168b31cd5b8e1dd0
+ pristine_git_object: 3613dcf6d85a45e916983f238cd807695433b401
src/openrouter/operations/createauthkeyscode.py:
id: 4253a437de22
- last_write_checksum: sha1:929010f051f34d9010cc6d94187fdbf6a52db85c
- pristine_git_object: 610f4463df8df044f109675109397462d4821660
- src/openrouter/operations/createcoinbasecharge.py:
- id: 7858e70dbf27
- last_write_checksum: sha1:d229f8ba547f2c124def12dda6892926e559f15e
- pristine_git_object: 6e296e19bfdd8a1b84d9368b1d582c56a888a5a2
+ last_write_checksum: sha1:de809cb9a55efb7b22d033bace50344bf53696f4
+ pristine_git_object: d3ef6c4b8374be3dfa5d807f879a430e50dc444e
src/openrouter/operations/createembeddings.py:
id: fe1160a960e9
- last_write_checksum: sha1:d6e7e034971ff17128e1d6cc132fb85fa95cf685
- pristine_git_object: bf520a6a9bbde8e95d6b1da3c96680202dc03e5f
+ last_write_checksum: sha1:7c43b2de3e40ec1fcbac46f4bc89ae6fbf5eb95d
+ pristine_git_object: 3872d32380bd3ae8cb9cdb6d7420a4e32464596f
src/openrouter/operations/createguardrail.py:
id: 52ed4b2f5903
- last_write_checksum: sha1:a4f3701ddb30431df0267cd3b54b87f1e281fd10
- pristine_git_object: 8f24ce49d37b1746af13d0eed0429a2d619d6cbd
+ last_write_checksum: sha1:119141c01d19df6b6d090b67f80145e3bf4d4d60
+ pristine_git_object: 75b9661b38be99f2a067eda4051592111301bed1
src/openrouter/operations/createkeys.py:
id: 64ad31fdaa6c
- last_write_checksum: sha1:cca4d2d6814b8886b51ef9e783bc89a2edf567a4
- pristine_git_object: 77d35e274da8783f89790aa8efa1e63e62821dd0
+ last_write_checksum: sha1:726f5ba4242c20a684cf67e7b16f97486089c0de
+ pristine_git_object: d77c96e247be5a7f7eb329565e9baf89395452b0
+ 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
+ src/openrouter/operations/createvideos.py:
+ id: d52f6a4a3fe4
+ last_write_checksum: sha1:12507b8087961d8efe67590e8c5b93f47a9d1a23
+ pristine_git_object: 3892fc759bd022cdbbaf830f5f20f655131a6d90
src/openrouter/operations/deleteguardrail.py:
id: 1fbdb98bbb85
- last_write_checksum: sha1:c5c3340fd1bda07cbe676c2a25ae8de9714017de
- pristine_git_object: 2eade139fea29ce731dc5877d3eb26362626e971
+ last_write_checksum: sha1:e245a5061592daf839d38caace9cc38abbce879d
+ pristine_git_object: c69e9ced3d22240edafbed449752f6d6a09fa649
src/openrouter/operations/deletekeys.py:
id: 0bd72d53b0a0
last_write_checksum: sha1:de3ec2a557ba007482a9d7ecaecef00cb6ead537
pristine_git_object: 51d48818bce022ab5e9514ea48429e3aca75e997
src/openrouter/operations/exchangeauthcodeforapikey.py:
id: 37bdd1517a07
- last_write_checksum: sha1:a3d39a96b3438e6e7569865b048a26b35187364d
- pristine_git_object: eb44748fd5c0475185b663051b3ef58cb6d20b39
+ last_write_checksum: sha1:963c95a165a35ae235d9b03d31c4e029de0246d4
+ pristine_git_object: 4e4295d69ef4c06a932c3141568c61cb72ebee4c
src/openrouter/operations/getcredits.py:
id: 83155df53da5
last_write_checksum: sha1:8b1eccdc3313fb35c0d5fdbfe63dbf64f35d460b
pristine_git_object: 54ebfd677a4050866cb070a1889169842f08f08a
src/openrouter/operations/getcurrentkey.py:
id: baf3e38db22c
- last_write_checksum: sha1:01a15c9ba4f7800c527410eb5d7f98de68d377b2
- pristine_git_object: f293fd690dc6a5e3fbbd630fd2d505255f754b03
+ last_write_checksum: sha1:1d1274c7f2fc9fe455dd624d2a9a532dc5782c68
+ pristine_git_object: 033e231b74631ead7c0f60586e0e33946934b1cf
src/openrouter/operations/getgeneration.py:
id: d7c64961334f
- last_write_checksum: sha1:f93c85af7114ccd4d14ad380c552b8735395903f
- pristine_git_object: 8a71781b05d3a5735cbc0e4121d2a22ba0e3c5bd
+ last_write_checksum: sha1:c4d5f17282e2e62f40256bb58519596037c126f0
+ pristine_git_object: ab106e6ad1f6464371dd86451a9c3fa1d63c956e
src/openrouter/operations/getguardrail.py:
id: 9b3309b59c64
- last_write_checksum: sha1:9cbff6569e2b7e34368252b14b9ed4125ba75f73
- pristine_git_object: f8f5d38c02f8575aec444f878d4aba7dcd43ff93
+ last_write_checksum: sha1:f83b3d52731324d0bc87c382196b84713e77f6da
+ pristine_git_object: e3a2ca2914e9add5060e7efa73dd268d5e32a9a5
src/openrouter/operations/getkey.py:
id: d9769da90865
- last_write_checksum: sha1:a077b20bdd05d124cf343563d0a1e3fc96bf6a46
- pristine_git_object: 66d56e05e1be9b6f6e31e5ef40c4f546ca8e6897
+ last_write_checksum: sha1:eb81f6e4775e83d22296786c4ed1cb9e08580fcb
+ pristine_git_object: 77c3f4b78a018ada25945284633b85816e7a71fc
src/openrouter/operations/getmodels.py:
id: 5bd5dfcb0125
- last_write_checksum: sha1:c15d8e05dca16da4cc6ac043ab809431682c3973
- pristine_git_object: 472068de469b53f7278d31ab244782e013af31c6
+ last_write_checksum: sha1:013ccee44da99aa609f290aef9f253e64dca38c6
+ pristine_git_object: 4f37b3b7dfc9f4e6c0f127865afd5889baa8fda7
src/openrouter/operations/getuseractivity.py:
id: 560a0e01c2c3
- last_write_checksum: sha1:72be3511150e52b5fa7c710e834089fb63bd805e
- pristine_git_object: 9dacdcdb67cd780fba94835751f045e61e5c4e70
+ last_write_checksum: sha1:88c8f4fe8019dc79934cf6b566111bf34d4adb08
+ pristine_git_object: 3e29cdf18f4cb933124841e7685f2a6956dc4622
+ src/openrouter/operations/getvideos.py:
+ id: a5f626467a69
+ last_write_checksum: sha1:00f000b3fab29247f632c12bcdfe71a579a2ee6a
+ pristine_git_object: 3a120ed0aacd7ac94b3421fc1439e1308d53f83f
src/openrouter/operations/list.py:
id: 3ced31e3804e
- last_write_checksum: sha1:ce109f00215eb463662cbdcdf68b5ca43a8952ba
- pristine_git_object: 649e842dfe359d3e24ecebd2c267ea98243abfd8
+ last_write_checksum: sha1:cd0a657c175bf542a82208d8388f88fe042b5da0
+ pristine_git_object: 2119c129622cb8ee2312090196ea6b0404167daa
src/openrouter/operations/listembeddingsmodels.py:
id: bf749a1f23d6
last_write_checksum: sha1:654a4e7e7b486f1d321eeb11ef7a7fa928e501a6
pristine_git_object: a4042eeccfd06d6fb1e5de741f1eb25e29347654
src/openrouter/operations/listendpoints.py:
id: 62b7a5f21dec
- last_write_checksum: sha1:18e9366b711d653136c6de3f38d41be054007124
- pristine_git_object: 4470cd27469e9d369edf1a02ec1e8f06b5005d3c
+ last_write_checksum: sha1:a6d36bd19eac1f2a3f1142ded3f7fc928230d633
+ pristine_git_object: e1cef6f827b14d7d0a9a52348563e0afa80a02bd
src/openrouter/operations/listendpointszdr.py:
id: 588bf206e92f
last_write_checksum: sha1:6d8e90c542ae6344e403767a3a4f8ec5d1d4dc75
pristine_git_object: 23e735db74e27dc35e80b2f72cf386b0eeeb116d
src/openrouter/operations/listguardrailkeyassignments.py:
id: ee9d33f4de6b
- last_write_checksum: sha1:1a6895f7c6a7f2fa882904fc5d9e1c9e1e99cc94
- pristine_git_object: 28a84b6c51144cf5e0a959da700eb33622158484
+ last_write_checksum: sha1:51cdc972a09b21dc3610b634bd0837a8d3b5b249
+ pristine_git_object: 1278683af12aa38dffba0433813102017117f309
src/openrouter/operations/listguardrailmemberassignments.py:
id: e36e679b02ec
- last_write_checksum: sha1:c402ce1a6b606eacf1da355a3252a2f2e38f7e51
- pristine_git_object: 88cb8d0fae44518f8402f654fb64efd93b955ea6
+ last_write_checksum: sha1:d056cb9d72107ca518ce627a5af27a15c7644eaf
+ pristine_git_object: c9c8c3ec5ea6ebcf1e160aa1e3ec41390bcbdfe3
src/openrouter/operations/listguardrails.py:
id: c99a9e7be93c
- last_write_checksum: sha1:a7486cadadaf355f88e22e410d30ffd7e7d9b483
- pristine_git_object: d6c1886a975c208173e6d13dfc9bad0fb9ad419c
+ last_write_checksum: sha1:0a38c88bb6f4f89dc5dd671d6d8b752902e042b5
+ pristine_git_object: 8345e0e2d960cb1df76f5a8c60dd7817db7d22f8
src/openrouter/operations/listkeyassignments.py:
id: e26c11d1bd3c
- last_write_checksum: sha1:dfb25c20d166a22038e231f935f8fe0fc4031194
- pristine_git_object: 36df9a6ea81dcf70093dd4d763479ff8cc6012dc
+ last_write_checksum: sha1:2c4e9b2dac5566beb3b4f1331686ec45c174e021
+ pristine_git_object: ae0bfca10fb38c10916c0420f78d3adf3706f544
src/openrouter/operations/listmemberassignments.py:
id: a993b5549126
- last_write_checksum: sha1:2af738130bca56452a91f423656d1fe909e4134c
- pristine_git_object: a6684dd39417aec662112023dee620f1303c89b3
+ last_write_checksum: sha1:b234a47a5b0cfad0cb47377ade93531c194dd4bc
+ pristine_git_object: 55c93baaa92a759cd94969ba1e79aff33241cd3d
src/openrouter/operations/listmodelscount.py:
id: d588d81b71c2
last_write_checksum: sha1:53314179fa961048fec7f4580962167c29020de7
@@ -4418,38 +4778,58 @@ trackedFiles:
id: 16eb5946cf60
last_write_checksum: sha1:bf9aee7db7762dcd082791962b962940dc7e16be
pristine_git_object: d25eea81bff3710243fca5874e934c024ab1f007
+ src/openrouter/operations/listorganizationmembers.py:
+ id: d40a3e0e2b38
+ last_write_checksum: sha1:201eccb7b2352cfeba4e2fb05dc23ae2ebe92e6c
+ pristine_git_object: 6d918f6f02ce6f0690ec93314d5982f098738b27
src/openrouter/operations/listproviders.py:
id: cf6e2db15118
- last_write_checksum: sha1:0e735dbb5abab170ef0a090010c24de662ad0246
- pristine_git_object: be65217d38b52f1d12a2ac481dae3045f010b479
+ last_write_checksum: sha1:384fc4522eedd74a186ed24077a116ef2b77dc42
+ pristine_git_object: c4e51800a7c11cb8c6f74e485c0bec84016915ce
+ src/openrouter/operations/listvideoscontent.py:
+ id: c27f9deb98f8
+ last_write_checksum: sha1:d677eda0c9d826b1e9b391c27c3d9aca1f7c75f2
+ pristine_git_object: 5ca3eefcbb9a2246615691514562083c63a7c213
+ src/openrouter/operations/listvideosmodels.py:
+ id: 77ba4890284b
+ last_write_checksum: sha1:9bb93fb1d1d71effb5f4dc58cef9d7b2265a92b7
+ pristine_git_object: d1497b8429e19d06cc674940e2641b3ed2222ca7
src/openrouter/operations/sendchatcompletionrequest.py:
id: d9fee71bb577
last_write_checksum: sha1:35f707844223de94c0ddcb0d7d67abb50dc0fa26
pristine_git_object: ef5ccb09584600a7c8dc99c2f02a5d7f1c65f10e
src/openrouter/operations/updateguardrail.py:
id: 6cfb33d7d40c
- last_write_checksum: sha1:b365877cf6dd2494565dd67477d4f2319b5b1bd1
- pristine_git_object: 77946e4271cebc9d510927863e47d6a2ef3e0e44
+ last_write_checksum: sha1:fa9ca7390db4e4b45d514f821c008748af8e4c8e
+ pristine_git_object: b3675a1d1a828f26750e5b7ac98fb7cf42ed49e1
src/openrouter/operations/updatekeys.py:
id: 56fb213253a8
- last_write_checksum: sha1:13798de8c313fd12b0c09bee84b5fc7ea17d3013
- pristine_git_object: c54d2e706039e6e630c9a3fe960949a1e539f2a9
+ last_write_checksum: sha1:745fc6dc0b0de3322ac7efe78e9afb2fb72c449c
+ pristine_git_object: ba632390fd0f6374850657a4d3a4ecc46d31a043
+ src/openrouter/organization.py:
+ id: 6f4c63c416e8
+ last_write_checksum: sha1:4ca00158cd6a4971e7a4cf6da1ef084da25630d9
+ pristine_git_object: ad2e7f86b6138cf2b2137345155e2b3a5784fb46
src/openrouter/providers.py:
id: debc4c48f149
- last_write_checksum: sha1:79410d5a3eb8c5d1d7a37efc004838f5b88f3eac
- pristine_git_object: 31e1e3abdb396726cf54524e3ee3aedb047872e2
+ last_write_checksum: sha1:f39f155f26e6f5e4fb5b7e0f577a8c49536f6bb3
+ pristine_git_object: 1c940641b8f61a395bf8a37f203a8fbb6ad41d4e
src/openrouter/py.typed:
id: 89fd03eab092
last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
+ src/openrouter/rerank.py:
+ id: 8dbc1be8d76f
+ last_write_checksum: sha1:058500aa379495d86e1fce727c49c8146eff3630
+ pristine_git_object: e8fdd1dd0911b8cfb465e577d22079644733f687
src/openrouter/responses.py:
id: f2108fb635e1
- last_write_checksum: sha1:b5ee63ffb64a24f10ab625fcd5a9fec2a596ad24
- pristine_git_object: fbc9facc45e28082049bfc7af5ed218e872c84fc
+ last_write_checksum: sha1:d1abb961cf4fc197b34e569c6649e8ae6e9786cb
+ pristine_git_object: 887a3ab4324c3a03faf3ebf412d9954c5a4c7065
src/openrouter/sdk.py:
id: ee9846c4c9c5
- last_write_checksum: sha1:1bee58213d72b76924c6ffd5c73f7dc99597738a
- pristine_git_object: 5796a31460d94c12a0356aaaec81a0e57df118d8
+ last_write_checksum: sha1:af0469095dac69b5b92dd0f717ecf193a9c353e2
+ pristine_git_object: 43d1636646e181c09eaa9a42cae71c53d8ee9f1e
src/openrouter/sdkconfiguration.py:
id: 55773bb98d7c
last_write_checksum: sha1:c01826125c31a8b8bc99d9d679782c8758fae001
@@ -4530,14 +4910,18 @@ trackedFiles:
id: 4ed16ed605f4
last_write_checksum: sha1:acaa178a7c41ddd000f58cc691e4632d925b2553
pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3
+ src/openrouter/video_generation.py:
+ id: d0a90c1b8efe
+ last_write_checksum: sha1:e71109a7ac4215c56e5fa3d0e843d532278d681c
+ pristine_git_object: 238bbcc92885086a6faaf351dbfdc095b8c6d8d8
examples:
createResponses:
speakeasy-default-create-responses:
requestBody:
- application/json: {"store": false, "service_tier": "auto", "stream": false}
+ application/json: {"service_tier": "auto", "store": false, "stream": false}
responses:
"200":
- application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"type": "message", "status": "completed"}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true}
+ application/json: {"completed_at": 1704067210, "created_at": 1704067200, "error": null, "frequency_penalty": 3967.09, "id": "resp-abc123", "incomplete_details": null, "instructions": null, "metadata": null, "model": "gpt-4", "object": "response", "output": [], "parallel_tool_calls": true, "presence_penalty": 7468.94, "status": "completed", "temperature": 9442.28, "tool_choice": "auto", "tools": [], "top_p": 2510.63}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4568,7 +4952,7 @@ examples:
speakeasy-default-get-user-activity:
responses:
"200":
- application/json: {"data": [{"date": "2025-08-24", "model": "openai/gpt-4.1", "model_permaslug": "openai/gpt-4.1-2025-04-14", "endpoint_id": "550e8400-e29b-41d4-a716-446655440000", "provider_name": "OpenAI", "usage": 0.015, "byok_usage_inference": 0.012, "requests": 5, "prompt_tokens": 50, "completion_tokens": 125, "reasoning_tokens": 25}]}
+ application/json: {"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}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4577,13 +4961,15 @@ examples:
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
sendChatCompletionRequest:
speakeasy-default-send-chat-completion-request:
requestBody:
- application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1}
+ application/json: {"messages": [{"content": "You are a helpful assistant.", "role": "system"}, {"content": "What is the capital of France?", "role": "user"}], "stream": false}
responses:
"200":
- application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"}
+ application/json: {"choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "id": "chatcmpl-123", "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4629,10 +5015,10 @@ examples:
createEmbeddings:
speakeasy-default-create-embeddings:
requestBody:
- application/json: {"input": "", "model": "Taurus"}
+ application/json: {"input": "The quick brown fox jumps over the lazy dog", "model": "openai/text-embedding-3-small"}
responses:
"200":
- application/json: {"object": "list", "data": [], "model": "Model S"}
+ application/json: {"data": [{"embedding": [0.0023064255, -0.009327292, 0.015797347], "object": "embedding"}], "model": "openai/text-embedding-3-small", "object": "list"}
text/event-stream: ""
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
@@ -4658,7 +5044,7 @@ examples:
speakeasy-default-list-embeddings-models:
responses:
"200":
- application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
+ 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}}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -4667,10 +5053,10 @@ examples:
speakeasy-default-get-generation:
parameters:
query:
- id: ""
+ id: "gen-1234567890"
responses:
"200":
- application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": [], "user_agent": "", "http_referer": ""}}
+ 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": ""}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"402":
@@ -4700,7 +5086,7 @@ examples:
speakeasy-default-get-models:
responses:
"200":
- application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
+ 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}}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -4709,7 +5095,7 @@ examples:
speakeasy-default-list-models-user:
responses:
"200":
- application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
+ 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}}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -4720,11 +5106,11 @@ examples:
speakeasy-default-list-endpoints:
parameters:
path:
- author: ""
- slug: ""
+ author: "openai"
+ slug: "gpt-4"
responses:
"200":
- application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}}
+ application/json: {"data": {"architecture": {"input_modalities": ["text"], "instruct_type": "chatml", "modality": "text->text", "output_modalities": ["text"], "tokenizer": "GPT"}, "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "endpoints": [{"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", "prompt": "0.00003"}, "provider_name": "OpenAI", "quantization": "fp16", "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}], "id": "openai/gpt-4", "name": "GPT-4"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
@@ -4733,21 +5119,21 @@ examples:
speakeasy-default-list-endpoints-zdr:
responses:
"200":
- application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}
+ application/json: {"data": [{"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", "prompt": "0.00003"}, "provider_name": "OpenAI", "quantization": "fp16", "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}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listProviders:
speakeasy-default-list-providers:
responses:
"200":
- application/json: {"data": [{"name": "OpenAI", "slug": "openai", "privacy_policy_url": "https://openai.com/privacy"}]}
+ application/json: {"data": [{"name": "OpenAI", "privacy_policy_url": "https://openai.com/privacy", "slug": "openai"}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
list:
speakeasy-default-list:
responses:
"200":
- application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}]}
+ 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}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"429":
@@ -4760,7 +5146,7 @@ examples:
application/json: {"name": "My New API Key"}
responses:
"201":
- application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}, "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}, "key": "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"}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4778,7 +5164,7 @@ examples:
application/json: {}
responses:
"200":
- application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}}
+ 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}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4812,7 +5198,7 @@ examples:
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
responses:
"200":
- application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}}
+ 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}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -4825,7 +5211,7 @@ examples:
speakeasy-default-get-current-key:
responses:
"200":
- application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
+ application/json: {"data": {"byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_monthly": 17.38, "byok_usage_weekly": 17.38, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "include_byok_in_limit": false, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "label": "sk-or-v1-au7...890", "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "rate_limit": {"interval": "1h", "note": "This field is deprecated and safe to ignore.", "requests": 1000}, "usage": 25.5, "usage_daily": 25.5, "usage_monthly": 25.5, "usage_weekly": 25.5}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -4834,7 +5220,7 @@ examples:
speakeasy-default-list-guardrails:
responses:
"200":
- application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1}
+ application/json: {"data": [{"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -4845,7 +5231,7 @@ examples:
application/json: {"name": "My New Guardrail"}
responses:
"201":
- application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4859,7 +5245,7 @@ examples:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
- application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -4875,7 +5261,7 @@ examples:
application/json: {}
responses:
"200":
- application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z"}}
+ application/json: {"data": {"created_at": "2025-08-24T10:30:00Z", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -4902,7 +5288,7 @@ examples:
speakeasy-default-list-key-assignments:
responses:
"200":
- application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25}
+ application/json: {"data": [{"assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "key_label": "prod-key", "key_name": "Production Key"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -4911,7 +5297,7 @@ examples:
speakeasy-default-list-member-assignments:
responses:
"200":
- application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
+ application/json: {"data": [{"assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "id": "550e8400-e29b-41d4-a716-446655440000", "organization_id": "org_xyz789", "user_id": "user_abc123"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -4923,7 +5309,7 @@ examples:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
- application/json: {"data": [], "total_count": 25}
+ application/json: {"data": [{"assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "key_label": "prod-key", "key_name": "Production Key"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -4955,7 +5341,7 @@ examples:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
- application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
+ application/json: {"data": [{"assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "id": "550e8400-e29b-41d4-a716-446655440000", "organization_id": "org_xyz789", "user_id": "user_abc123"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -5035,7 +5421,7 @@ examples:
application/json: {"callback_url": "https://myapp.com/auth/callback"}
responses:
"200":
- application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}}
+ application/json: {"data": {"app_id": 12345, "created_at": "2025-08-24T10:30:00Z", "id": "auth_code_xyz789"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -5044,4 +5430,106 @@ examples:
application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ listOrganizationMembers:
+ speakeasy-default-list-organization-members:
+ responses:
+ "200":
+ application/json: {"data": [{"email": "jane.doe@example.com", "first_name": "Jane", "id": "user_2dHFtVWx2n56w6HkM0000000000", "last_name": "Doe", "role": "org:member"}], "total_count": 25}
+ "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"}}
+ createRerank:
+ speakeasy-default-create-rerank:
+ requestBody:
+ application/json: {"documents": ["Paris is the capital of France.", "Berlin is the capital of Germany."], "model": "cohere/rerank-v3.5", "query": "What is the capital of France?"}
+ responses:
+ "200":
+ application/json: {"model": "cohere/rerank-v3.5", "results": [{"document": {"text": "Paris is the capital of France."}, "index": 0, "relevance_score": 0.98}]}
+ text/event-stream: ""
+ "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"}}
+ createVideos:
+ speakeasy-default-create-videos:
+ requestBody:
+ application/json: {"model": "google/veo-3.1", "prompt": "A serene mountain landscape at sunset"}
+ responses:
+ "202":
+ application/json: {"id": "job-abc123", "polling_url": "/api/v1/videos/job-abc123", "status": "pending"}
+ "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"}}
+ getVideos:
+ speakeasy-default-get-videos:
+ parameters:
+ path:
+ jobId: "job-abc123"
+ responses:
+ "200":
+ application/json: {"id": "job-abc123", "polling_url": "/api/v1/videos/job-abc123", "status": "pending"}
+ "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"}}
+ listVideosContent:
+ speakeasy-default-list-videos-content:
+ parameters:
+ path:
+ jobId: "job-abc123"
+ query:
+ index: 0
+ responses:
+ "200":
+ application/octet-stream: "x-file: example.file"
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "401":
+ application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
+ "404":
+ application/json: {"error": {"code": 404, "message": "Resource not found"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
+ "502":
+ application/json: {"error": {"code": 502, "message": "Provider returned error"}}
+ listVideosModels:
+ speakeasy-default-list-videos-models:
+ responses:
+ "200":
+ application/json: {"data": [{"allowed_passthrough_parameters": [], "canonical_slug": "google/veo-3.1", "created": 1700000000, "generate_audio": true, "id": "google/veo-3.1", "name": "Veo 3.1", "seed": null, "supported_aspect_ratios": ["16:9"], "supported_durations": [5, 8], "supported_frame_images": ["first_frame", "last_frame"], "supported_resolutions": ["720p"], "supported_sizes": null}]}
+ "400":
+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
+ "500":
+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: "## Python SDK Changes:\n* `open_router.api_keys.list()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.data.[]` **Changed** **Breaking** :warning:\n* `open_router.guardrails.get()`: `response.data` **Changed** **Breaking** :warning:\n* `open_router.o_auth.create_auth_code()`: `response.data.app_id` **Changed** **Breaking** :warning:\n* `open_router.guardrails.bulk_unassign_members()`: `response.unassigned_count` **Changed** **Breaking** :warning:\n* `open_router.guardrails.bulk_unassign_keys()`: `response.unassigned_count` **Changed** **Breaking** :warning:\n* `open_router.guardrails.bulk_assign_members()`: `response.assigned_count` **Changed** **Breaking** :warning:\n* `open_router.guardrails.list_guardrail_member_assignments()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.total_count` **Changed** **Breaking** :warning:\n* `open_router.beta.responses.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `open_router.analytics.get_user_activity()`: \n * `request` **Changed**\n * `response.data.[]` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `open_router.chat.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `open_router.embeddings.generate()`: \n * `request.provider` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `open_router.embeddings.list_models()`: `response.data.[]` **Changed** **Breaking** :warning:\n* `open_router.generations.get_generation()`: `response.data` **Changed** **Breaking** :warning:\n* `open_router.models.count()`: `response.data.count` **Changed** **Breaking** :warning:\n* `open_router.models.list()`: `response.data.[]` **Changed** **Breaking** :warning:\n* `open_router.models.list_for_user()`: `response.data.[]` **Changed** **Breaking** :warning:\n* `open_router.endpoints.list_zdr_endpoints()`: `response.data.[]` **Changed** **Breaking** :warning:\n* `open_router.guardrails.bulk_assign_keys()`: `response.assigned_count` **Changed** **Breaking** :warning:\n* `open_router.guardrails.list_member_assignments()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.total_count` **Changed** **Breaking** :warning:\n* `open_router.api_keys.create()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.data` **Changed** **Breaking** :warning:\n* `open_router.api_keys.update()`: \n * `request.limit` **Changed** **Breaking** :warning:\n * `response.data` **Changed** **Breaking** :warning:\n* `open_router.api_keys.get()`: `response.data` **Changed** **Breaking** :warning:\n* `open_router.api_keys.get_current_key_metadata()`: `response.data` **Changed** **Breaking** :warning:\n* `open_router.guardrails.list()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `open_router.guardrails.create()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.data` **Changed** **Breaking** :warning:\n* `open_router.endpoints.list()`: `response.data` **Changed** **Breaking** :warning:\n* `open_router.guardrails.update()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.data` **Changed** **Breaking** :warning:\n* `open_router.guardrails.list_key_assignments()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.total_count` **Changed** **Breaking** :warning:\n* `open_router.guardrails.list_guardrail_key_assignments()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.total_count` **Changed** **Breaking** :warning:\n* `open_router.organization.list_members()`: **Added**\n* `open_router.rerank.rerank()`: **Added**\n* `open_router.credits.create_coinbase_charge()`: **Deleted** **Breaking** :warning:\n* `open_router.video_generation.list_videos_models()`: **Added**\n* `open_router.video_generation.get_video_content()`: **Added**\n* `open_router.video_generation.get_generation()`: **Added**\n* `open_router.video_generation.generate()`: **Added**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 50ea340..131ea59 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -32,7 +32,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
- version: 0.8.1
+ version: 0.9.0
additionalDependencies:
dev: {}
main: {}
@@ -59,7 +59,7 @@ python:
flattenGlobalSecurity: true
flattenRequests: true
flatteningOrder: parameters-first
- forwardCompatibleUnionsByDefault: "tagged-only"
+ forwardCompatibleUnionsByDefault: tagged-only
imports:
option: openapi
paths:
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 71cbd75..ace156c 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -1,1915 +1,2779 @@
-openapi: 3.1.0
-info:
- title: OpenRouter API
- version: 1.0.0
- description: OpenAI-compatible API with additional OpenRouter features
- contact:
- name: OpenRouter Support
- url: https://openrouter.ai/docs
- email: support@openrouter.ai
- license:
- name: MIT
- url: https://opensource.org/licenses/MIT
-servers:
- - url: https://openrouter.ai/api/v1
- description: Production server
- x-speakeasy-server-id: production
-security:
- - apiKey: []
-externalDocs:
- description: OpenRouter Documentation
- url: https://openrouter.ai/docs
components:
+ parameters:
+ AppIdentifier:
+ name: HTTP-Referer
+ in: header
+ schema:
+ type: string
+ description: |
+ The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+ AppDisplayName:
+ name: X-OpenRouter-Title
+ in: header
+ schema:
+ type: string
+ description: |
+ The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+ AppCategories:
+ name: X-OpenRouter-Categories
+ in: header
+ schema:
+ type: string
+ description: |
+ Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
schemas:
- OpenAIResponsesResponseStatus:
- type: string
- enum:
- - completed
- - incomplete
- - in_progress
- - failed
- - cancelled
- - queued
- x-speakeasy-unknown-values: allow
- FileCitation:
- type: object
+ ActivityItem:
+ example:
+ 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
properties:
- type:
+ byok_usage_inference:
+ description: BYOK inference cost in USD (external credits spent)
+ example: 0.012
+ format: double
+ type: number
+ completion_tokens:
+ description: Total completion tokens generated
+ example: 125
+ type: integer
+ date:
+ description: Date of the activity (YYYY-MM-DD format)
+ example: '2025-08-24'
type: string
+ endpoint_id:
+ description: Unique identifier for the endpoint
+ example: 550e8400-e29b-41d4-a716-446655440000
+ type: string
+ model:
+ description: Model slug (e.g., "openai/gpt-4.1")
+ example: openai/gpt-4.1
+ type: string
+ model_permaslug:
+ description: Model permaslug (e.g., "openai/gpt-4.1-2025-04-14")
+ example: openai/gpt-4.1-2025-04-14
+ type: string
+ prompt_tokens:
+ description: Total prompt tokens used
+ example: 50
+ type: integer
+ provider_name:
+ description: Name of the provider serving this endpoint
+ example: OpenAI
+ type: string
+ reasoning_tokens:
+ description: Total reasoning tokens used
+ example: 25
+ type: integer
+ requests:
+ description: Number of requests made
+ example: 5
+ type: integer
+ usage:
+ description: Total cost in USD (OpenRouter credits spent)
+ example: 0.015
+ format: double
+ type: number
+ required:
+ - date
+ - model
+ - model_permaslug
+ - endpoint_id
+ - provider_name
+ - usage
+ - byok_usage_inference
+ - requests
+ - prompt_tokens
+ - completion_tokens
+ - reasoning_tokens
+ type: object
+ ActivityResponse:
+ 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
+ properties:
+ data:
+ description: List of activity items
+ items:
+ $ref: '#/components/schemas/ActivityItem'
+ type: array
+ required:
+ - data
+ type: object
+ AnnotationAddedEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseAnnotationAddedEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when a text annotation is added to output
+ example:
+ annotation:
+ end_index: 7
+ start_index: 0
+ title: Example
+ type: url_citation
+ url: https://example.com
+ annotation_index: 0
+ content_index: 0
+ item_id: item-1
+ output_index: 0
+ sequence_number: 5
+ type: response.output_text.annotation.added
+ AnthropicBase64ImageSource:
+ example:
+ data: /9j/4AAQ...
+ media_type: image/jpeg
+ type: base64
+ properties:
+ data:
+ type: string
+ media_type:
+ $ref: '#/components/schemas/AnthropicImageMimeType'
+ type:
enum:
- - file_citation
+ - base64
+ type: string
+ required:
+ - type
+ - media_type
+ - data
+ type: object
+ AnthropicBase64PdfSource:
+ example:
+ data: JVBERi0x...
+ media_type: application/pdf
+ type: base64
+ properties:
+ data:
+ type: string
+ media_type:
+ enum:
+ - application/pdf
+ type: string
+ type:
+ enum:
+ - base64
+ type: string
+ required:
+ - type
+ - media_type
+ - data
+ type: object
+ AnthropicBaseUsageIteration:
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: 0
+ cache_read_input_tokens: 0
+ input_tokens: 100
+ output_tokens: 50
+ properties:
+ cache_creation:
+ $ref: '#/components/schemas/AnthropicIterationCacheCreation'
+ cache_creation_input_tokens:
+ type: integer
+ cache_read_input_tokens:
+ type: integer
+ input_tokens:
+ type: integer
+ output_tokens:
+ type: integer
+ type: object
+ AnthropicBashCodeExecutionContent:
+ discriminator:
+ mapping:
+ bash_code_execution_result: '#/components/schemas/AnthropicBashCodeExecutionResult'
+ bash_code_execution_tool_result_error: '#/components/schemas/AnthropicBashCodeExecutionToolResultError'
+ propertyName: type
+ example:
+ content: []
+ return_code: 0
+ stderr: ''
+ stdout: Hello
+ type: bash_code_execution_result
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResultError'
+ - $ref: '#/components/schemas/AnthropicBashCodeExecutionResult'
+ AnthropicBashCodeExecutionOutput:
+ example:
+ file_id: file_01abc
+ type: bash_code_execution_output
+ properties:
file_id:
type: string
- filename:
+ type:
+ enum:
+ - bash_code_execution_output
+ type: string
+ required:
+ - file_id
+ - type
+ type: object
+ AnthropicBashCodeExecutionResult:
+ example:
+ content: []
+ return_code: 0
+ stderr: ''
+ stdout: Hello
+ type: bash_code_execution_result
+ properties:
+ content:
+ items:
+ $ref: '#/components/schemas/AnthropicBashCodeExecutionOutput'
+ type: array
+ return_code:
+ type: integer
+ stderr:
+ type: string
+ stdout:
+ type: string
+ type:
+ enum:
+ - bash_code_execution_result
+ type: string
+ required:
+ - content
+ - return_code
+ - stderr
+ - stdout
+ - type
+ type: object
+ AnthropicBashCodeExecutionToolResult:
+ example:
+ content:
+ content: []
+ return_code: 0
+ stderr: ''
+ stdout: Hello
+ type: bash_code_execution_result
+ tool_use_id: srvtoolu_01abc
+ type: bash_code_execution_tool_result
+ properties:
+ content:
+ $ref: '#/components/schemas/AnthropicBashCodeExecutionContent'
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - bash_code_execution_tool_result
+ type: string
+ required:
+ - type
+ - content
+ - tool_use_id
+ type: object
+ AnthropicBashCodeExecutionToolResultError:
+ example:
+ error_code: unavailable
+ type: bash_code_execution_tool_result_error
+ properties:
+ error_code:
+ enum:
+ - invalid_tool_input
+ - unavailable
+ - too_many_requests
+ - execution_time_exceeded
+ - output_file_too_large
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - bash_code_execution_tool_result_error
+ type: string
+ required:
+ - error_code
+ - type
+ type: object
+ AnthropicCacheControlDirective:
+ example:
+ type: ephemeral
+ properties:
+ ttl:
+ $ref: '#/components/schemas/AnthropicCacheControlTtl'
+ type:
+ enum:
+ - ephemeral
+ type: string
+ required:
+ - type
+ type: object
+ AnthropicCacheControlTtl:
+ enum:
+ - 5m
+ - 1h
+ example: 5m
+ type: string
+ x-speakeasy-unknown-values: allow
+ AnthropicCacheCreation:
+ example:
+ ephemeral_1h_input_tokens: 0
+ ephemeral_5m_input_tokens: 100
+ nullable: true
+ properties:
+ ephemeral_1h_input_tokens:
+ type: integer
+ ephemeral_5m_input_tokens:
+ type: integer
+ required:
+ - ephemeral_5m_input_tokens
+ - ephemeral_1h_input_tokens
+ type: object
+ AnthropicCaller:
+ discriminator:
+ mapping:
+ code_execution_20250825: '#/components/schemas/AnthropicCodeExecution20250825Caller'
+ code_execution_20260120: '#/components/schemas/AnthropicCodeExecution20260120Caller'
+ direct: '#/components/schemas/AnthropicDirectCaller'
+ propertyName: type
+ example:
+ type: direct
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicDirectCaller'
+ - $ref: '#/components/schemas/AnthropicCodeExecution20250825Caller'
+ - $ref: '#/components/schemas/AnthropicCodeExecution20260120Caller'
+ AnthropicCitationCharLocation:
+ example:
+ cited_text: Example cited text
+ document_index: 0
+ document_title: null
+ end_char_index: 18
+ file_id: null
+ start_char_index: 0
+ type: char_location
+ properties:
+ cited_text:
+ type: string
+ document_index:
+ type: integer
+ document_title:
+ nullable: true
+ type: string
+ end_char_index:
+ type: integer
+ file_id:
+ nullable: true
+ type: string
+ start_char_index:
+ type: integer
+ type:
+ enum:
+ - char_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - document_index
+ - document_title
+ - start_char_index
+ - end_char_index
+ - file_id
+ type: object
+ AnthropicCitationCharLocationParam:
+ example:
+ cited_text: Example cited text
+ document_index: 0
+ document_title: null
+ end_char_index: 18
+ start_char_index: 0
+ type: char_location
+ properties:
+ cited_text:
+ type: string
+ document_index:
+ type: integer
+ document_title:
+ nullable: true
+ type: string
+ end_char_index:
+ type: integer
+ start_char_index:
+ type: integer
+ type:
+ enum:
+ - char_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - document_index
+ - document_title
+ - start_char_index
+ - end_char_index
+ type: object
+ AnthropicCitationContentBlockLocation:
+ example:
+ cited_text: Example cited text
+ document_index: 0
+ document_title: null
+ end_block_index: 1
+ file_id: null
+ start_block_index: 0
+ type: content_block_location
+ properties:
+ cited_text:
+ type: string
+ document_index:
+ type: integer
+ document_title:
+ nullable: true
+ type: string
+ end_block_index:
+ type: integer
+ file_id:
+ nullable: true
+ type: string
+ start_block_index:
+ type: integer
+ type:
+ enum:
+ - content_block_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - document_index
+ - document_title
+ - start_block_index
+ - end_block_index
+ - file_id
+ type: object
+ AnthropicCitationContentBlockLocationParam:
+ example:
+ cited_text: Example cited text
+ document_index: 0
+ document_title: null
+ end_block_index: 1
+ start_block_index: 0
+ type: content_block_location
+ properties:
+ cited_text:
+ type: string
+ document_index:
+ type: integer
+ document_title:
+ nullable: true
+ type: string
+ end_block_index:
+ type: integer
+ start_block_index:
+ type: integer
+ type:
+ enum:
+ - content_block_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - document_index
+ - document_title
+ - start_block_index
+ - end_block_index
+ type: object
+ AnthropicCitationPageLocation:
+ example:
+ cited_text: Example cited text
+ document_index: 0
+ document_title: null
+ end_page_number: 2
+ file_id: null
+ start_page_number: 1
+ type: page_location
+ properties:
+ cited_text:
+ type: string
+ document_index:
+ type: integer
+ document_title:
+ nullable: true
+ type: string
+ end_page_number:
+ type: integer
+ file_id:
+ nullable: true
+ type: string
+ start_page_number:
+ type: integer
+ type:
+ enum:
+ - page_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - document_index
+ - document_title
+ - start_page_number
+ - end_page_number
+ - file_id
+ type: object
+ AnthropicCitationPageLocationParam:
+ example:
+ cited_text: Example cited text
+ document_index: 0
+ document_title: null
+ end_page_number: 2
+ start_page_number: 1
+ type: page_location
+ properties:
+ cited_text:
+ type: string
+ document_index:
+ type: integer
+ document_title:
+ nullable: true
+ type: string
+ end_page_number:
+ type: integer
+ start_page_number:
+ type: integer
+ type:
+ enum:
+ - page_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - document_index
+ - document_title
+ - start_page_number
+ - end_page_number
+ type: object
+ AnthropicCitationsConfig:
+ example:
+ enabled: true
+ nullable: true
+ properties:
+ enabled:
+ type: boolean
+ required:
+ - enabled
+ type: object
+ AnthropicCitationSearchResultLocation:
+ example:
+ cited_text: Example cited text
+ end_block_index: 1
+ search_result_index: 0
+ source: example_source
+ start_block_index: 0
+ title: Example Result
+ type: search_result_location
+ properties:
+ cited_text:
+ type: string
+ end_block_index:
+ type: integer
+ search_result_index:
+ type: integer
+ source:
+ type: string
+ start_block_index:
+ type: integer
+ title:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - search_result_location
+ type: string
+ required:
+ - type
+ - cited_text
+ - search_result_index
+ - source
+ - title
+ - start_block_index
+ - end_block_index
+ type: object
+ AnthropicCitationWebSearchResultLocation:
+ example:
+ cited_text: Example cited text
+ encrypted_index: enc_idx_0
+ title: Example Page
+ type: web_search_result_location
+ url: https://example.com
+ properties:
+ cited_text:
+ type: string
+ encrypted_index:
+ type: string
+ title:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - web_search_result_location
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - cited_text
+ - encrypted_index
+ - title
+ - url
+ type: object
+ AnthropicCodeExecution20250825Caller:
+ example:
+ tool_id: toolu_01abc
+ type: code_execution_20250825
+ properties:
+ tool_id:
+ type: string
+ type:
+ enum:
+ - code_execution_20250825
+ type: string
+ required:
+ - type
+ - tool_id
+ type: object
+ AnthropicCodeExecution20260120Caller:
+ example:
+ tool_id: toolu_01abc
+ type: code_execution_20260120
+ properties:
+ tool_id:
+ type: string
+ type:
+ enum:
+ - code_execution_20260120
+ type: string
+ required:
+ - type
+ - tool_id
+ type: object
+ AnthropicCodeExecutionContent:
+ discriminator:
+ mapping:
+ code_execution_result: '#/components/schemas/AnthropicCodeExecutionResult'
+ code_execution_tool_result_error: '#/components/schemas/AnthropicCodeExecutionToolResultError'
+ encrypted_code_execution_result: '#/components/schemas/AnthropicEncryptedCodeExecutionResult'
+ propertyName: type
+ example:
+ content: []
+ return_code: 0
+ stderr: ''
+ stdout: Hello
+ type: code_execution_result
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicCodeExecutionToolResultError'
+ - $ref: '#/components/schemas/AnthropicCodeExecutionResult'
+ - $ref: '#/components/schemas/AnthropicEncryptedCodeExecutionResult'
+ AnthropicCodeExecutionOutput:
+ example:
+ file_id: file_01abc
+ type: code_execution_output
+ properties:
+ file_id:
+ type: string
+ type:
+ enum:
+ - code_execution_output
+ type: string
+ required:
+ - file_id
+ - type
+ type: object
+ AnthropicCodeExecutionResult:
+ example:
+ content: []
+ return_code: 0
+ stderr: ''
+ stdout: Hello
+ type: code_execution_result
+ properties:
+ content:
+ items:
+ $ref: '#/components/schemas/AnthropicCodeExecutionOutput'
+ type: array
+ return_code:
+ type: integer
+ stderr:
+ type: string
+ stdout:
+ type: string
+ type:
+ enum:
+ - code_execution_result
+ type: string
+ required:
+ - content
+ - return_code
+ - stderr
+ - stdout
+ - type
+ type: object
+ AnthropicCodeExecutionToolResult:
+ example:
+ content:
+ content: []
+ return_code: 0
+ stderr: ''
+ stdout: Hello
+ type: code_execution_result
+ tool_use_id: srvtoolu_01abc
+ type: code_execution_tool_result
+ properties:
+ content:
+ $ref: '#/components/schemas/AnthropicCodeExecutionContent'
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - code_execution_tool_result
+ type: string
+ required:
+ - type
+ - content
+ - tool_use_id
+ type: object
+ AnthropicCodeExecutionToolResultError:
+ example:
+ error_code: unavailable
+ type: code_execution_tool_result_error
+ properties:
+ error_code:
+ $ref: '#/components/schemas/AnthropicServerToolErrorCode'
+ type:
+ enum:
+ - code_execution_tool_result_error
+ type: string
+ required:
+ - error_code
+ - type
+ type: object
+ AnthropicCompactionBlock:
+ example:
+ content: Compacted summary of conversation.
+ type: compaction
+ properties:
+ content:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - compaction
+ type: string
+ required:
+ - type
+ - content
+ type: object
+ AnthropicCompactionUsageIteration:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicBaseUsageIteration'
+ - properties:
+ type:
+ enum:
+ - compaction
+ type: string
+ required:
+ - type
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: 0
+ cache_read_input_tokens: 0
+ input_tokens: 50
+ output_tokens: 25
+ type: compaction
+ AnthropicContainer:
+ example:
+ expires_at: '2026-04-08T00:00:00Z'
+ id: ctr_01abc
+ nullable: true
+ properties:
+ expires_at:
+ type: string
+ id:
+ type: string
+ required:
+ - id
+ - expires_at
+ type: object
+ AnthropicContainerUpload:
+ example:
+ file_id: file_01abc
+ type: container_upload
+ properties:
+ file_id:
+ type: string
+ type:
+ enum:
+ - container_upload
type: string
- index:
- type: number
required:
- type
- file_id
- - filename
- - index
- example:
- type: file_citation
- file_id: file-abc123
- filename: research_paper.pdf
- index: 0
- URLCitation:
type: object
+ AnthropicDirectCaller:
+ example:
+ type: direct
properties:
type:
- type: string
enum:
- - url_citation
- url:
+ - direct
+ type: string
+ required:
+ - type
+ type: object
+ AnthropicDocumentBlock:
+ example:
+ citations: null
+ source:
+ data: Hello, world!
+ media_type: text/plain
+ type: text
+ title: null
+ type: document
+ properties:
+ citations:
+ $ref: '#/components/schemas/AnthropicCitationsConfig'
+ source:
+ anyOf:
+ - $ref: '#/components/schemas/AnthropicBase64PdfSource'
+ - $ref: '#/components/schemas/AnthropicPlainTextSource'
+ title:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - document
+ type: string
+ required:
+ - citations
+ - source
+ - title
+ - type
+ type: object
+ AnthropicDocumentBlockParam:
+ example:
+ source:
+ data: Hello, world!
+ media_type: text/plain
+ type: text
+ type: document
+ properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ citations:
+ nullable: true
+ properties:
+ enabled:
+ type: boolean
+ type: object
+ context:
+ nullable: true
+ type: string
+ source:
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicBase64PdfSource'
+ - $ref: '#/components/schemas/AnthropicPlainTextSource'
+ - properties:
+ content:
+ anyOf:
+ - type: string
+ - items:
+ discriminator:
+ mapping:
+ image: '#/components/schemas/AnthropicImageBlockParam'
+ text: '#/components/schemas/AnthropicTextBlockParam'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicTextBlockParam'
+ - $ref: '#/components/schemas/AnthropicImageBlockParam'
+ type: array
+ type:
+ enum:
+ - content
+ type: string
+ required:
+ - type
+ - content
+ type: object
+ - $ref: '#/components/schemas/AnthropicUrlPdfSource'
+ title:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - document
+ type: string
+ required:
+ - type
+ - source
+ type: object
+ AnthropicEncryptedCodeExecutionResult:
+ example:
+ content: []
+ encrypted_stdout: enc_stdout
+ return_code: 0
+ stderr: ''
+ type: encrypted_code_execution_result
+ properties:
+ content:
+ items:
+ $ref: '#/components/schemas/AnthropicCodeExecutionOutput'
+ type: array
+ encrypted_stdout:
+ type: string
+ return_code:
+ type: integer
+ stderr:
+ type: string
+ type:
+ enum:
+ - encrypted_code_execution_result
+ type: string
+ required:
+ - content
+ - encrypted_stdout
+ - return_code
+ - stderr
+ - type
+ type: object
+ AnthropicImageBlockParam:
+ example:
+ source:
+ data: /9j/4AAQ...
+ media_type: image/jpeg
+ type: base64
+ type: image
+ properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ source:
+ discriminator:
+ mapping:
+ base64: '#/components/schemas/AnthropicBase64ImageSource'
+ url: '#/components/schemas/AnthropicUrlImageSource'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicBase64ImageSource'
+ - $ref: '#/components/schemas/AnthropicUrlImageSource'
+ type:
+ enum:
+ - image
+ type: string
+ required:
+ - type
+ - source
+ type: object
+ AnthropicImageMimeType:
+ enum:
+ - image/jpeg
+ - image/png
+ - image/gif
+ - image/webp
+ example: image/jpeg
+ type: string
+ x-speakeasy-unknown-values: allow
+ AnthropicInputTokensClearAtLeast:
+ example:
+ type: input_tokens
+ value: 50000
+ nullable: true
+ properties:
+ type:
+ enum:
+ - input_tokens
+ type: string
+ value:
+ type: integer
+ required:
+ - type
+ - value
+ type: object
+ AnthropicInputTokensTrigger:
+ example:
+ type: input_tokens
+ value: 100000
+ properties:
+ type:
+ enum:
+ - input_tokens
+ type: string
+ value:
+ type: integer
+ required:
+ - type
+ - value
+ type: object
+ AnthropicIterationCacheCreation:
+ default: null
+ example:
+ ephemeral_1h_input_tokens: 0
+ ephemeral_5m_input_tokens: 0
+ nullable: true
+ properties:
+ ephemeral_1h_input_tokens:
+ type: integer
+ ephemeral_5m_input_tokens:
+ type: integer
+ type: object
+ AnthropicMessageUsageIteration:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicBaseUsageIteration'
+ - properties:
+ type:
+ enum:
+ - message
+ type: string
+ required:
+ - type
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: 0
+ cache_read_input_tokens: 0
+ input_tokens: 100
+ output_tokens: 50
+ type: message
+ AnthropicPlainTextSource:
+ example:
+ data: Hello, world!
+ media_type: text/plain
+ type: text
+ properties:
+ data:
+ type: string
+ media_type:
+ enum:
+ - text/plain
+ type: string
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ - media_type
+ - data
+ type: object
+ AnthropicRedactedThinkingBlock:
+ example:
+ data: cmVkYWN0ZWQ=
+ type: redacted_thinking
+ properties:
+ data:
+ type: string
+ type:
+ enum:
+ - redacted_thinking
+ type: string
+ required:
+ - type
+ - data
+ type: object
+ AnthropicRefusalStopDetails:
+ description: Structured information about a refusal
+ example:
+ category: cyber
+ explanation: The request was refused due to policy.
+ type: refusal
+ nullable: true
+ properties:
+ category:
+ enum:
+ - cyber
+ - bio
+ - null
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ explanation:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - refusal
+ type: string
+ required:
+ - type
+ - category
+ - explanation
+ type: object
+ AnthropicSearchResultBlockParam:
+ example:
+ content:
+ - text: Result content
+ type: text
+ source: example_source
+ title: Example Result
+ type: search_result
+ properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ citations:
+ properties:
+ enabled:
+ type: boolean
+ type: object
+ content:
+ items:
+ $ref: '#/components/schemas/AnthropicTextBlockParam'
+ type: array
+ source:
type: string
title:
type: string
- start_index:
- type: number
- end_index:
- type: number
+ type:
+ enum:
+ - search_result
+ type: string
+ required:
+ - type
+ - source
+ - title
+ - content
+ type: object
+ AnthropicServerToolErrorCode:
+ enum:
+ - invalid_tool_input
+ - unavailable
+ - too_many_requests
+ - execution_time_exceeded
+ example: unavailable
+ type: string
+ x-speakeasy-unknown-values: allow
+ AnthropicServerToolName:
+ enum:
+ - web_search
+ - web_fetch
+ - code_execution
+ - bash_code_execution
+ - text_editor_code_execution
+ - tool_search_tool_regex
+ - tool_search_tool_bm25
+ example: web_search
+ type: string
+ x-speakeasy-unknown-values: allow
+ AnthropicServerToolUsage:
+ example:
+ web_fetch_requests: 0
+ web_search_requests: 1
+ nullable: true
+ properties:
+ web_fetch_requests:
+ type: integer
+ web_search_requests:
+ type: integer
+ required:
+ - web_search_requests
+ - web_fetch_requests
+ type: object
+ AnthropicServerToolUseBlock:
+ example:
+ caller:
+ type: direct
+ id: srvtoolu_01abc
+ input:
+ query: latest news
+ name: web_search
+ type: server_tool_use
+ properties:
+ caller:
+ $ref: '#/components/schemas/AnthropicCaller'
+ id:
+ type: string
+ input:
+ nullable: true
+ name:
+ $ref: '#/components/schemas/AnthropicServerToolName'
+ type:
+ enum:
+ - server_tool_use
+ type: string
+ required:
+ - type
+ - id
+ - caller
+ - name
+ type: object
+ AnthropicServiceTier:
+ enum:
+ - standard
+ - priority
+ - batch
+ - null
+ example: standard
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ AnthropicSpeed:
+ enum:
+ - fast
+ - standard
+ - null
+ example: standard
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ AnthropicTextBlock:
+ example:
+ citations: null
+ text: Hello, world!
+ type: text
+ properties:
+ citations:
+ items:
+ $ref: '#/components/schemas/AnthropicTextCitation'
+ nullable: true
+ type: array
+ text:
+ type: string
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ - text
+ - citations
+ type: object
+ AnthropicTextBlockParam:
+ example:
+ text: Hello, world!
+ type: text
+ properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ citations:
+ items:
+ discriminator:
+ mapping:
+ char_location: '#/components/schemas/AnthropicCitationCharLocationParam'
+ content_block_location: '#/components/schemas/AnthropicCitationContentBlockLocationParam'
+ page_location: '#/components/schemas/AnthropicCitationPageLocationParam'
+ search_result_location: '#/components/schemas/AnthropicCitationSearchResultLocation'
+ web_search_result_location: '#/components/schemas/AnthropicCitationWebSearchResultLocation'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicCitationCharLocationParam'
+ - $ref: '#/components/schemas/AnthropicCitationPageLocationParam'
+ - $ref: '#/components/schemas/AnthropicCitationContentBlockLocationParam'
+ - $ref: '#/components/schemas/AnthropicCitationWebSearchResultLocation'
+ - $ref: '#/components/schemas/AnthropicCitationSearchResultLocation'
+ nullable: true
+ type: array
+ text:
+ type: string
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ - text
+ type: object
+ AnthropicTextCitation:
+ discriminator:
+ mapping:
+ char_location: '#/components/schemas/AnthropicCitationCharLocation'
+ content_block_location: '#/components/schemas/AnthropicCitationContentBlockLocation'
+ page_location: '#/components/schemas/AnthropicCitationPageLocation'
+ search_result_location: '#/components/schemas/AnthropicCitationSearchResultLocation'
+ web_search_result_location: '#/components/schemas/AnthropicCitationWebSearchResultLocation'
+ propertyName: type
+ example:
+ cited_text: Example text
+ document_index: 0
+ document_title: null
+ end_char_index: 10
+ file_id: null
+ start_char_index: 0
+ type: char_location
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicCitationCharLocation'
+ - $ref: '#/components/schemas/AnthropicCitationPageLocation'
+ - $ref: '#/components/schemas/AnthropicCitationContentBlockLocation'
+ - $ref: '#/components/schemas/AnthropicCitationWebSearchResultLocation'
+ - $ref: '#/components/schemas/AnthropicCitationSearchResultLocation'
+ AnthropicTextEditorCodeExecutionContent:
+ discriminator:
+ mapping:
+ text_editor_code_execution_create_result: '#/components/schemas/AnthropicTextEditorCodeExecutionCreateResult'
+ text_editor_code_execution_str_replace_result: '#/components/schemas/AnthropicTextEditorCodeExecutionStrReplaceResult'
+ text_editor_code_execution_tool_result_error: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResultError'
+ text_editor_code_execution_view_result: '#/components/schemas/AnthropicTextEditorCodeExecutionViewResult'
+ propertyName: type
+ example:
+ content: file content
+ file_type: text
+ num_lines: 10
+ start_line: 1
+ total_lines: 10
+ type: text_editor_code_execution_view_result
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResultError'
+ - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionViewResult'
+ - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionCreateResult'
+ - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionStrReplaceResult'
+ AnthropicTextEditorCodeExecutionCreateResult:
+ example:
+ is_file_update: false
+ type: text_editor_code_execution_create_result
+ properties:
+ is_file_update:
+ type: boolean
+ type:
+ enum:
+ - text_editor_code_execution_create_result
+ type: string
+ required:
+ - is_file_update
+ - type
+ type: object
+ AnthropicTextEditorCodeExecutionStrReplaceResult:
+ example:
+ lines: null
+ new_lines: null
+ new_start: null
+ old_lines: null
+ old_start: null
+ type: text_editor_code_execution_str_replace_result
+ properties:
+ lines:
+ items:
+ type: string
+ nullable: true
+ type: array
+ new_lines:
+ type: integer
+ new_start:
+ type: integer
+ old_lines:
+ type: integer
+ old_start:
+ type: integer
+ type:
+ enum:
+ - text_editor_code_execution_str_replace_result
+ type: string
+ required:
+ - lines
+ - new_lines
+ - new_start
+ - old_lines
+ - old_start
+ - type
+ type: object
+ AnthropicTextEditorCodeExecutionToolResult:
+ example:
+ content:
+ content: file content
+ file_type: text
+ num_lines: 10
+ start_line: 1
+ total_lines: 10
+ type: text_editor_code_execution_view_result
+ tool_use_id: srvtoolu_01abc
+ type: text_editor_code_execution_tool_result
+ properties:
+ content:
+ $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionContent'
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - text_editor_code_execution_tool_result
+ type: string
+ required:
+ - type
+ - content
+ - tool_use_id
+ type: object
+ AnthropicTextEditorCodeExecutionToolResultError:
+ example:
+ error_code: unavailable
+ error_message: null
+ type: text_editor_code_execution_tool_result_error
+ properties:
+ error_code:
+ enum:
+ - invalid_tool_input
+ - unavailable
+ - too_many_requests
+ - execution_time_exceeded
+ - file_not_found
+ type: string
+ x-speakeasy-unknown-values: allow
+ error_message:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - text_editor_code_execution_tool_result_error
+ type: string
+ required:
+ - error_code
+ - error_message
+ - type
+ type: object
+ AnthropicTextEditorCodeExecutionViewResult:
+ example:
+ content: file content
+ file_type: text
+ num_lines: 10
+ start_line: 1
+ total_lines: 10
+ type: text_editor_code_execution_view_result
+ properties:
+ content:
+ type: string
+ file_type:
+ enum:
+ - text
+ - image
+ - pdf
+ type: string
+ x-speakeasy-unknown-values: allow
+ num_lines:
+ type: integer
+ start_line:
+ type: integer
+ total_lines:
+ type: integer
+ type:
+ enum:
+ - text_editor_code_execution_view_result
+ type: string
+ required:
+ - content
+ - file_type
+ - num_lines
+ - start_line
+ - total_lines
+ - type
+ type: object
+ AnthropicThinkingBlock:
+ example:
+ signature: sig_abc123
+ thinking: Let me think about this...
+ type: thinking
+ properties:
+ signature:
+ type: string
+ thinking:
+ type: string
+ type:
+ enum:
+ - thinking
+ type: string
+ required:
+ - type
+ - thinking
+ - signature
+ type: object
+ AnthropicThinkingTurns:
+ example:
+ type: thinking_turns
+ value: 3
+ properties:
+ type:
+ enum:
+ - thinking_turns
+ type: string
+ value:
+ type: integer
+ required:
+ - type
+ - value
+ type: object
+ AnthropicToolReference:
+ example:
+ tool_name: my_tool
+ type: tool_reference
+ properties:
+ tool_name:
+ type: string
+ type:
+ enum:
+ - tool_reference
+ type: string
+ required:
+ - tool_name
+ - type
+ type: object
+ AnthropicToolSearchContent:
+ discriminator:
+ mapping:
+ tool_search_tool_result_error: '#/components/schemas/AnthropicToolSearchResultError'
+ tool_search_tool_search_result: '#/components/schemas/AnthropicToolSearchResult'
+ propertyName: type
+ example:
+ tool_references:
+ - tool_name: my_tool
+ type: tool_reference
+ type: tool_search_tool_search_result
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicToolSearchResultError'
+ - $ref: '#/components/schemas/AnthropicToolSearchResult'
+ AnthropicToolSearchResult:
+ example:
+ tool_references:
+ - tool_name: my_tool
+ type: tool_reference
+ type: tool_search_tool_search_result
+ properties:
+ tool_references:
+ items:
+ $ref: '#/components/schemas/AnthropicToolReference'
+ type: array
+ type:
+ enum:
+ - tool_search_tool_search_result
+ type: string
+ required:
+ - tool_references
+ - type
+ type: object
+ AnthropicToolSearchResultError:
+ example:
+ error_code: unavailable
+ error_message: null
+ type: tool_search_tool_result_error
+ properties:
+ error_code:
+ $ref: '#/components/schemas/AnthropicServerToolErrorCode'
+ error_message:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - tool_search_tool_result_error
+ type: string
+ required:
+ - error_code
+ - error_message
+ - type
+ type: object
+ AnthropicToolSearchToolResult:
+ example:
+ content:
+ tool_references:
+ - tool_name: my_tool
+ type: tool_reference
+ type: tool_search_tool_search_result
+ tool_use_id: srvtoolu_01abc
+ type: tool_search_tool_result
+ properties:
+ content:
+ $ref: '#/components/schemas/AnthropicToolSearchContent'
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - tool_search_tool_result
+ type: string
+ required:
+ - type
+ - content
+ - tool_use_id
+ type: object
+ AnthropicToolUseBlock:
+ example:
+ caller:
+ type: direct
+ id: toolu_01abc
+ input:
+ location: San Francisco
+ name: get_weather
+ type: tool_use
+ properties:
+ caller:
+ $ref: '#/components/schemas/AnthropicCaller'
+ id:
+ type: string
+ input:
+ nullable: true
+ name:
+ type: string
+ type:
+ enum:
+ - tool_use
+ type: string
+ required:
+ - type
+ - id
+ - caller
+ - name
+ type: object
+ AnthropicToolUsesKeep:
+ example:
+ type: tool_uses
+ value: 5
+ properties:
+ type:
+ enum:
+ - tool_uses
+ type: string
+ value:
+ type: integer
+ required:
+ - type
+ - value
+ type: object
+ AnthropicToolUsesTrigger:
+ example:
+ type: tool_uses
+ value: 10
+ properties:
+ type:
+ enum:
+ - tool_uses
+ type: string
+ value:
+ type: integer
+ required:
+ - type
+ - value
+ type: object
+ AnthropicUnknownUsageIteration:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicBaseUsageIteration'
+ - properties:
+ type:
+ type: string
+ required:
+ - type
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: 0
+ cache_read_input_tokens: 0
+ input_tokens: 100
+ output_tokens: 50
+ type: unknown
+ AnthropicUrlImageSource:
+ example:
+ type: url
+ url: https://example.com/image.jpg
+ properties:
+ type:
+ enum:
+ - url
+ type: string
+ url:
+ type: string
required:
- type
- url
- - title
- - start_index
- - end_index
- example:
- type: url_citation
- start_index: 0
- end_index: 42
- title: OpenRouter Documentation
- url: https://openrouter.ai/docs
- FilePath:
type: object
+ AnthropicUrlPdfSource:
+ example:
+ type: url
+ url: https://example.com/document.pdf
properties:
type:
- type: string
enum:
- - file_path
- file_id:
+ - url
+ type: string
+ url:
type: string
- index:
- type: number
required:
- type
- - file_id
- - index
+ - url
+ type: object
+ AnthropicUsage:
example:
- type: file_path
- file_id: file-xyz789
- index: 0
- OpenAIResponsesAnnotation:
+ cache_creation: null
+ cache_creation_input_tokens: null
+ cache_read_input_tokens: null
+ inference_geo: null
+ input_tokens: 100
+ output_tokens: 50
+ server_tool_use: null
+ service_tier: standard
+ properties:
+ cache_creation:
+ $ref: '#/components/schemas/AnthropicCacheCreation'
+ cache_creation_input_tokens:
+ type: integer
+ cache_read_input_tokens:
+ type: integer
+ inference_geo:
+ nullable: true
+ type: string
+ input_tokens:
+ type: integer
+ output_tokens:
+ type: integer
+ server_tool_use:
+ $ref: '#/components/schemas/AnthropicServerToolUsage'
+ service_tier:
+ $ref: '#/components/schemas/AnthropicServiceTier'
+ required:
+ - input_tokens
+ - output_tokens
+ - cache_creation_input_tokens
+ - cache_read_input_tokens
+ - cache_creation
+ - inference_geo
+ - server_tool_use
+ - service_tier
+ type: object
+ AnthropicUsageIteration:
anyOf:
- - $ref: '#/components/schemas/FileCitation'
- - $ref: '#/components/schemas/URLCitation'
- - $ref: '#/components/schemas/FilePath'
- ResponseOutputText:
- type: object
- properties:
- type:
- type: string
- enum:
- - output_text
- text:
- type: string
- annotations:
- type: array
- items:
- $ref: '#/components/schemas/OpenAIResponsesAnnotation'
- logprobs:
- type: array
- items:
- type: object
- properties:
- token:
- type: string
- bytes:
- type: array
- items:
- type: number
- logprob:
- type: number
- top_logprobs:
- type: array
- items:
- type: object
- properties:
- token:
- type: string
- bytes:
- type: array
- items:
- type: number
- logprob:
- type: number
- required:
- - token
- - bytes
- - logprob
- required:
- - token
- - bytes
- - logprob
- - top_logprobs
- required:
- - type
- - text
+ - $ref: '#/components/schemas/AnthropicCompactionUsageIteration'
+ - $ref: '#/components/schemas/AnthropicMessageUsageIteration'
+ - $ref: '#/components/schemas/AnthropicUnknownUsageIteration'
example:
- type: output_text
- text: The capital of France is Paris.
- annotations:
- - type: url_citation
- start_index: 0
- end_index: 42
- title: Paris - Wikipedia
- url: https://en.wikipedia.org/wiki/Paris
- OpenAIResponsesRefusalContent:
- type: object
- properties:
- type:
- type: string
- enum:
- - refusal
- refusal:
- type: string
- required:
- - type
- - refusal
+ cache_creation: null
+ cache_creation_input_tokens: 0
+ cache_read_input_tokens: 0
+ input_tokens: 100
+ output_tokens: 50
+ type: message
+ AnthropicWebFetchBlock:
example:
- type: refusal
- refusal: I'm sorry, I cannot assist with that request
- OutputMessage:
- type: object
- properties:
- id:
- type: string
- role:
- type: string
- enum:
- - assistant
- type:
- type: string
- enum:
- - message
- status:
- anyOf:
- - type: string
- enum:
- - completed
- - type: string
- enum:
- - incomplete
- - type: string
- enum:
- - in_progress
content:
- type: array
- items:
- anyOf:
- - $ref: '#/components/schemas/ResponseOutputText'
- - $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
- phase:
- anyOf:
- - type: string
- enum:
- - commentary
- - type: string
- enum:
- - final_answer
- - nullable: true
- description: >-
- The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.
+ citations: null
+ source:
+ data: ''
+ media_type: text/plain
+ type: text
+ title: null
+ type: document
+ retrieved_at: null
+ type: web_fetch_result
+ url: https://example.com
+ properties:
+ content:
+ $ref: '#/components/schemas/AnthropicDocumentBlock'
+ retrieved_at:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - web_fetch_result
+ type: string
+ url:
+ type: string
required:
- - id
- - role
- - type
- content
- example:
- id: msg-abc123
- role: assistant
- type: message
- status: completed
- content:
- - type: output_text
- text: Hello! How can I help you today?
- OutputMessageItem:
- allOf:
- - $ref: '#/components/schemas/OutputMessage'
- - type: object
- properties: {}
- example:
- id: msg-123
- type: message
- role: assistant
- status: completed
- content:
- - type: output_text
- text: Hello! How can I help you?
- annotations: []
- description: An output message item
- ReasoningTextContent:
+ - retrieved_at
+ - type
+ - url
type: object
+ AnthropicWebFetchContent:
+ discriminator:
+ mapping:
+ web_fetch_result: '#/components/schemas/AnthropicWebFetchBlock'
+ web_fetch_tool_result_error: '#/components/schemas/AnthropicWebFetchToolResultError'
+ propertyName: type
+ example:
+ content:
+ citations: null
+ source:
+ data: ''
+ media_type: text/plain
+ type: text
+ title: null
+ type: document
+ retrieved_at: null
+ type: web_fetch_result
+ url: https://example.com
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicWebFetchToolResultError'
+ - $ref: '#/components/schemas/AnthropicWebFetchBlock'
+ AnthropicWebFetchToolResult:
+ example:
+ caller:
+ type: direct
+ content:
+ content:
+ citations: null
+ source:
+ data: ''
+ media_type: text/plain
+ type: text
+ title: null
+ type: document
+ retrieved_at: null
+ type: web_fetch_result
+ url: https://example.com
+ tool_use_id: srvtoolu_01abc
+ type: web_fetch_tool_result
properties:
- type:
+ caller:
+ $ref: '#/components/schemas/AnthropicCaller'
+ content:
+ $ref: '#/components/schemas/AnthropicWebFetchContent'
+ tool_use_id:
type: string
+ type:
enum:
- - reasoning_text
- text:
+ - web_fetch_tool_result
type: string
required:
- type
- - text
- example:
- type: reasoning_text
- text: Let me think step by step about this problem...
- ReasoningSummaryText:
+ - caller
+ - content
+ - tool_use_id
type: object
+ AnthropicWebFetchToolResultError:
+ example:
+ error_code: unavailable
+ type: web_fetch_tool_result_error
properties:
- type:
- type: string
+ error_code:
enum:
- - summary_text
- text:
+ - invalid_tool_input
+ - url_too_long
+ - url_not_allowed
+ - url_not_accessible
+ - unsupported_content_type
+ - too_many_requests
+ - max_uses_exceeded
+ - unavailable
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - web_fetch_tool_result_error
type: string
required:
- type
- - text
- example:
- type: summary_text
- text: Analyzed the problem using first principles
- OutputItemReasoning:
+ - error_code
type: object
+ AnthropicWebSearchResult:
+ example:
+ encrypted_content: enc_content_0
+ page_age: null
+ title: Example Page
+ type: web_search_result
+ url: https://example.com
properties:
- type:
- type: string
- enum:
- - reasoning
- id:
- type: string
- content:
- type: array
- items:
- $ref: '#/components/schemas/ReasoningTextContent'
- summary:
- type: array
- items:
- $ref: '#/components/schemas/ReasoningSummaryText'
encrypted_content:
type: string
+ page_age:
nullable: true
- status:
- anyOf:
- - type: string
- enum:
- - completed
- - type: string
- enum:
- - incomplete
- - type: string
- enum:
- - in_progress
+ type: string
+ title:
+ type: string
+ type:
+ enum:
+ - web_search_result
+ type: string
+ url:
+ type: string
required:
- type
- - id
- - summary
+ - encrypted_content
+ - page_age
+ - title
+ - url
+ type: object
+ AnthropicWebSearchResultBlockParam:
example:
- type: reasoning
- id: reasoning-abc123
- summary:
- - type: summary_text
- text: Analyzed the problem using first principles
- OutputReasoningItem:
- allOf:
- - $ref: '#/components/schemas/OutputItemReasoning'
- - type: object
- properties:
- content:
+ encrypted_content: enc_content_0
+ title: Example Page
+ type: web_search_result
+ url: https://example.com
+ properties:
+ encrypted_content:
+ type: string
+ page_age:
+ nullable: true
+ type: string
+ title:
+ type: string
+ type:
+ enum:
+ - web_search_result
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - encrypted_content
+ - title
+ - url
+ type: object
+ AnthropicWebSearchToolResult:
+ example:
+ caller:
+ type: direct
+ content: []
+ tool_use_id: srvtoolu_01abc
+ type: web_search_tool_result
+ properties:
+ caller:
+ $ref: '#/components/schemas/AnthropicCaller'
+ content:
+ anyOf:
+ - items:
+ $ref: '#/components/schemas/AnthropicWebSearchResult'
type: array
- nullable: true
- items:
- $ref: '#/components/schemas/ReasoningTextContent'
- signature:
- type: string
- nullable: true
- description: A signature for the reasoning content, used for verification
- example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
- format:
- type: string
- nullable: true
- enum:
- - unknown
- - openai-responses-v1
- - azure-openai-responses-v1
- - xai-responses-v1
- - anthropic-claude-v1
- - google-gemini-v1
- description: The format of the reasoning content
- example: anthropic-claude-v1
- x-speakeasy-unknown-values: allow
- example:
- id: reasoning-123
- type: reasoning
- status: completed
- summary:
- - type: summary_text
- text: Analyzed the problem and found the optimal solution.
- content:
- - type: reasoning_text
- text: First, we analyze the problem...
- signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
- format: anthropic-claude-v1
- description: An output item containing reasoning
- OutputItemFunctionCall:
- type: object
- properties:
+ - $ref: '#/components/schemas/AnthropicWebSearchToolResultError'
+ tool_use_id:
+ type: string
type:
- type: string
enum:
- - function_call
- id:
+ - web_search_tool_result
type: string
- name:
- type: string
- arguments:
- type: string
- call_id:
- type: string
- status:
- anyOf:
- - type: string
- enum:
- - completed
- - type: string
- enum:
- - incomplete
- - type: string
- enum:
- - in_progress
required:
- type
- - name
- - arguments
- - call_id
- example:
- type: function_call
- id: call-abc123
- name: get_weather
- arguments: '{"location":"San Francisco","unit":"celsius"}'
- call_id: call-abc123
- OutputFunctionCallItem:
- allOf:
- - $ref: '#/components/schemas/OutputItemFunctionCall'
- - type: object
- properties: {}
- example:
- type: function_call
- id: call-abc123
- name: get_weather
- arguments: '{"location":"San Francisco","unit":"celsius"}'
- call_id: call-abc123
- WebSearchStatus:
- type: string
- enum:
- - completed
- - searching
- - in_progress
- - failed
- example: completed
- x-speakeasy-unknown-values: allow
- OutputItemWebSearchCall:
+ - caller
+ - tool_use_id
+ - content
type: object
+ AnthropicWebSearchToolResultError:
+ example:
+ error_code: unavailable
+ type: web_search_tool_result_error
properties:
- type:
- type: string
+ error_code:
enum:
- - web_search_call
- id:
+ - invalid_tool_input
+ - unavailable
+ - max_uses_exceeded
+ - too_many_requests
+ - query_too_long
+ - request_too_large
type: string
- action:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - search
- query:
- type: string
- queries:
- type: array
- items:
- type: string
- sources:
- type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- required:
- - type
- - query
- - type: object
- properties:
- type:
- type: string
- enum:
- - open_page
- url:
- type: string
- nullable: true
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - find_in_page
- pattern:
- type: string
- url:
- type: string
- required:
- - type
- - pattern
- - url
- status:
- $ref: '#/components/schemas/WebSearchStatus'
- required:
- - type
- - id
- - action
- - status
- example:
- type: web_search_call
- id: search-abc123
- action:
- type: search
- query: OpenAI API
- status: completed
- OutputWebSearchCallItem:
- allOf:
- - $ref: '#/components/schemas/OutputItemWebSearchCall'
- - type: object
- properties: {}
- example:
- type: web_search_call
- id: search-abc123
- action:
- type: search
- query: OpenAI API
- status: completed
- OutputItemFileSearchCall:
- type: object
- properties:
- type:
- type: string
- enum:
- - file_search_call
- id:
- type: string
- queries:
- type: array
- items:
- type: string
- status:
- $ref: '#/components/schemas/WebSearchStatus'
- required:
- - type
- - id
- - queries
- - status
- example:
- type: file_search_call
- id: filesearch-abc123
- queries:
- - machine learning algorithms
- - neural networks
- status: completed
- OutputFileSearchCallItem:
- allOf:
- - $ref: '#/components/schemas/OutputItemFileSearchCall'
- - type: object
- properties: {}
- example:
- type: file_search_call
- id: filesearch-abc123
- queries:
- - machine learning algorithms
- - neural networks
- status: completed
- ImageGenerationStatus:
- type: string
- enum:
- - in_progress
- - completed
- - generating
- - failed
- example: completed
- x-speakeasy-unknown-values: allow
- OutputItemImageGenerationCall:
- type: object
- properties:
- type:
- type: string
- enum:
- - image_generation_call
- id:
- type: string
- result:
- type: string
- nullable: true
- default: null
- status:
- $ref: '#/components/schemas/ImageGenerationStatus'
- required:
- - type
- - id
- - status
- example:
- type: image_generation_call
- id: imagegen-abc123
- result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
- status: completed
- OutputImageGenerationCallItem:
- allOf:
- - $ref: '#/components/schemas/OutputItemImageGenerationCall'
- - type: object
- properties: {}
- example:
- type: image_generation_call
- id: imagegen-abc123
- result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
- status: completed
- OutputServerToolItem:
- type: object
- properties:
- type:
- type: string
- pattern: '^openrouter:'
- description: Server tool type (e.g. openrouter:datetime, openrouter:web_search)
- id:
- type: string
- status:
- type: string
- enum:
- - completed
- - in_progress
- - incomplete
x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - web_search_tool_result_error
+ type: string
required:
- type
- - status
- additionalProperties:
- nullable: true
- description: A generic OpenRouter server tool output item
- example:
- type: openrouter:web_search
- id: ws_tmp_abc123
- status: completed
- OutputItems:
- anyOf:
- - $ref: '#/components/schemas/OutputMessageItem'
- - $ref: '#/components/schemas/OutputReasoningItem'
- - $ref: '#/components/schemas/OutputFunctionCallItem'
- - $ref: '#/components/schemas/OutputWebSearchCallItem'
- - $ref: '#/components/schemas/OutputFileSearchCallItem'
- - $ref: '#/components/schemas/OutputImageGenerationCallItem'
- - $ref: '#/components/schemas/OutputServerToolItem'
- description: An output item from the response
- example:
- id: msg-abc123
- role: assistant
- type: message
- status: completed
- content:
- - type: output_text
- text: Hello! How can I help you today?
- ResponsesErrorField:
+ - error_code
type: object
+ AnthropicWebSearchToolUserLocation:
+ example:
+ city: San Francisco
+ country: US
+ region: California
+ timezone: America/Los_Angeles
+ type: approximate
nullable: true
properties:
- code:
+ city:
+ nullable: true
type: string
+ country:
+ nullable: true
+ type: string
+ region:
+ nullable: true
+ type: string
+ timezone:
+ nullable: true
+ type: string
+ type:
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
- x-speakeasy-unknown-values: allow
+ - approximate
+ type: string
+ required:
+ - type
+ type: object
+ ApplyPatchServerTool:
+ description: Apply patch tool configuration
+ example:
+ type: apply_patch
+ properties:
+ type:
+ enum:
+ - apply_patch
+ type: string
+ required:
+ - type
+ type: object
+ AutoRouterPlugin:
+ example:
+ allowed_models:
+ - anthropic/*
+ - openai/gpt-4o
+ enabled: true
+ id: auto-router
+ properties:
+ allowed_models:
+ description: >-
+ List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
+ example:
+ - anthropic/*
+ - openai/gpt-4o
+ - google/*
+ items:
+ type: string
+ type: array
+ enabled:
+ description: Set to false to disable the auto-router plugin for this request. Defaults to true.
+ type: boolean
+ id:
+ enum:
+ - auto-router
+ type: string
+ required:
+ - id
+ type: object
+ BadGatewayResponse:
+ description: Bad Gateway - Provider/upstream API failure
+ example:
+ error:
+ code: 502
+ message: Provider returned error
+ properties:
+ error:
+ $ref: '#/components/schemas/BadGatewayResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ BadGatewayResponseErrorData:
+ description: Error data for BadGatewayResponse
+ example:
+ code: 502
+ message: Provider returned error
+ properties:
+ code:
+ type: integer
message:
type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
required:
- code
- message
- description: Error information returned from the API
+ type: object
+ BadRequestResponse:
+ description: Bad Request - Invalid request parameters or malformed input
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ properties:
+ error:
+ $ref: '#/components/schemas/BadRequestResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ BadRequestResponseErrorData:
+ description: Error data for BadRequestResponse
+ example:
+ code: 400
+ message: Invalid request parameters
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ BaseAnnotationAddedEvent:
+ description: Event emitted when a text annotation is added to output
+ example:
+ annotation:
+ end_index: 7
+ start_index: 0
+ title: Example
+ type: url_citation
+ url: https://example.com
+ annotation_index: 0
+ content_index: 0
+ item_id: item-1
+ output_index: 0
+ sequence_number: 5
+ type: response.output_text.annotation.added
+ properties:
+ annotation:
+ $ref: '#/components/schemas/OpenAIResponsesAnnotation'
+ annotation_index:
+ type: integer
+ content_index:
+ type: integer
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.output_text.annotation.added
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - content_index
+ - sequence_number
+ - annotation_index
+ - annotation
+ type: object
+ BaseContentPartAddedEvent:
+ description: Event emitted when a new content part is added to an output item
+ example:
+ content_index: 0
+ item_id: item-1
+ output_index: 0
+ part:
+ annotations: []
+ text: ''
+ type: output_text
+ sequence_number: 3
+ type: response.content_part.added
+ properties:
+ content_index:
+ type: integer
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ part:
+ anyOf:
+ - $ref: '#/components/schemas/ResponseOutputText'
+ - $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.content_part.added
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - content_index
+ - part
+ - sequence_number
+ type: object
+ BaseContentPartDoneEvent:
+ description: Event emitted when a content part is complete
+ example:
+ content_index: 0
+ item_id: item-1
+ output_index: 0
+ part:
+ annotations: []
+ text: Hello! How can I help you?
+ type: output_text
+ sequence_number: 7
+ type: response.content_part.done
+ properties:
+ content_index:
+ type: integer
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ part:
+ anyOf:
+ - $ref: '#/components/schemas/ResponseOutputText'
+ - $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.content_part.done
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - content_index
+ - part
+ - sequence_number
+ type: object
+ BaseErrorEvent:
+ description: Event emitted when an error occurs during streaming
example:
code: rate_limit_exceeded
message: Rate limit exceeded. Please try again later.
- IncompleteDetails:
- type: object
- nullable: true
+ param: null
+ sequence_number: 2
+ type: error
properties:
- reason:
- type: string
- enum:
- - max_output_tokens
- - content_filter
- x-speakeasy-unknown-values: allow
- OpenAIResponsesUsage:
- type: object
- properties:
- input_tokens:
- type: number
- input_tokens_details:
- type: object
- properties:
- cached_tokens:
- type: number
- required:
- - cached_tokens
- output_tokens:
- type: number
- output_tokens_details:
- type: object
- properties:
- reasoning_tokens:
- type: number
- required:
- - reasoning_tokens
- total_tokens:
- type: number
- required:
- - input_tokens
- - input_tokens_details
- - output_tokens
- - output_tokens_details
- - total_tokens
- Usage:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesUsage'
- - type: object
+ code:
nullable: true
- properties:
- cost:
- type: number
- nullable: true
- description: Cost of the completion
- is_byok:
- type: boolean
- description: Whether a request was made using a Bring Your Own Key configuration
- cost_details:
- type: object
- properties:
- upstream_inference_cost:
- type: number
- nullable: true
- upstream_inference_input_cost:
- type: number
- upstream_inference_output_cost:
- type: number
- required:
- - upstream_inference_input_cost
- - upstream_inference_output_cost
- description: Token usage information for the response
- example:
- input_tokens: 10
- output_tokens: 25
- total_tokens: 35
- input_tokens_details:
- cached_tokens: 0
- output_tokens_details:
- reasoning_tokens: 0
- cost: 0.0012
- cost_details:
- upstream_inference_cost: null
- upstream_inference_input_cost: 0.0008
- upstream_inference_output_cost: 0.0004
- InputText:
- type: object
- properties:
- type:
type: string
- enum:
- - input_text
- text:
- type: string
- required:
- - type
- - text
- description: Text input content item
- example:
- type: input_text
- text: Hello, how can I help you?
- InputImage:
- type: object
- properties:
- type:
- type: string
- enum:
- - input_image
- detail:
- type: string
- enum:
- - auto
- - high
- - low
- x-speakeasy-unknown-values: allow
- image_url:
+ message:
type: string
+ param:
nullable: true
- required:
- - type
- - detail
- description: Image input content item
- example:
- type: input_image
- detail: auto
- image_url: https://example.com/image.jpg
- InputFile:
- type: object
- properties:
+ type: string
+ sequence_number:
+ type: integer
type:
- type: string
enum:
- - input_file
- file_id:
- type: string
- nullable: true
- file_data:
- type: string
- filename:
- type: string
- file_url:
+ - error
type: string
required:
- type
- description: File input content item
- example:
- type: input_file
- file_id: file-abc123
- filename: document.pdf
- InputAudio:
+ - code
+ - message
+ - param
+ - sequence_number
type: object
+ BaseFunctionCallArgsDeltaEvent:
+ description: Event emitted when function call arguments are being streamed
+ example:
+ delta: '{"city": "..."}'
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ type: response.function_call_arguments.delta
properties:
- type:
+ delta:
type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
enum:
- - input_audio
- input_audio:
- type: object
- properties:
- data:
- type: string
- format:
- type: string
- enum:
- - mp3
- - wav
- x-speakeasy-unknown-values: allow
- required:
- - data
- - format
+ - response.function_call_arguments.delta
+ type: string
required:
- type
- - input_audio
- description: Audio input content item
+ - item_id
+ - output_index
+ - delta
+ - sequence_number
+ type: object
+ BaseFunctionCallArgsDoneEvent:
+ description: Event emitted when function call arguments streaming is complete
example:
- type: input_audio
- input_audio:
- data: SGVsbG8gV29ybGQ=
- format: mp3
- ToolCallStatusEnum:
- type: string
- nullable: true
- enum:
- - in_progress
- - completed
- - incomplete
- example: completed
- x-speakeasy-unknown-values: allow
+ arguments: '{"city": "San Francisco", "units": "celsius"}'
+ item_id: item-1
+ name: get_weather
+ output_index: 0
+ sequence_number: 6
+ type: response.function_call_arguments.done
+ properties:
+ arguments:
+ type: string
+ item_id:
+ type: string
+ name:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.function_call_arguments.done
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - name
+ - arguments
+ - sequence_number
+ type: object
BaseInputs:
anyOf:
- type: string
- - type: array
- items:
+ - items:
anyOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - message
- role:
- anyOf:
- - type: string
- enum:
- - user
- - type: string
- enum:
- - system
- - type: string
- enum:
- - assistant
- - type: string
- enum:
- - developer
+ - properties:
content:
anyOf:
- - type: array
- items:
+ - items:
+ discriminator:
+ mapping:
+ input_audio: '#/components/schemas/InputAudio'
+ input_file: '#/components/schemas/InputFile'
+ input_image: '#/components/schemas/InputImage'
+ input_text: '#/components/schemas/InputText'
+ propertyName: type
oneOf:
- $ref: '#/components/schemas/InputText'
- $ref: '#/components/schemas/InputImage'
- $ref: '#/components/schemas/InputFile'
- $ref: '#/components/schemas/InputAudio'
- discriminator:
- propertyName: type
- mapping:
- input_text: '#/components/schemas/InputText'
- input_image: '#/components/schemas/InputImage'
- input_file: '#/components/schemas/InputFile'
- input_audio: '#/components/schemas/InputAudio'
+ type: array
- type: string
phase:
anyOf:
- - type: string
- enum:
+ - enum:
- commentary
- - type: string
- enum:
+ type: string
+ - enum:
- final_answer
+ type: string
- nullable: true
- required:
- - role
- - content
- - type: object
- properties:
- id:
- type: string
- type:
- type: string
- enum:
- - message
role:
anyOf:
- - type: string
- enum:
+ - enum:
- user
- - type: string
- enum:
+ type: string
+ - enum:
- system
- - type: string
- enum:
+ type: string
+ - enum:
+ - assistant
+ type: string
+ - enum:
- developer
- content:
- type: array
- items:
- oneOf:
- - $ref: '#/components/schemas/InputText'
- - $ref: '#/components/schemas/InputImage'
- - $ref: '#/components/schemas/InputFile'
- - $ref: '#/components/schemas/InputAudio'
- discriminator:
- propertyName: type
- mapping:
- input_text: '#/components/schemas/InputText'
- input_image: '#/components/schemas/InputImage'
- input_file: '#/components/schemas/InputFile'
- input_audio: '#/components/schemas/InputAudio'
+ type: string
+ type:
+ enum:
+ - message
+ type: string
required:
- - id
- role
- content
- - type: object
- properties:
- type:
- type: string
- enum:
- - function_call_output
- id:
- type: string
- nullable: true
- call_id:
- type: string
- output:
- anyOf:
- - type: string
- - type: array
- items:
- oneOf:
- - $ref: '#/components/schemas/InputText'
- - $ref: '#/components/schemas/InputImage'
- - $ref: '#/components/schemas/InputFile'
- discriminator:
- propertyName: type
- mapping:
- input_text: '#/components/schemas/InputText'
- input_image: '#/components/schemas/InputImage'
- input_file: '#/components/schemas/InputFile'
- status:
- $ref: '#/components/schemas/ToolCallStatusEnum'
- required:
- - type
- - call_id
- - output
- - type: object
- properties:
- type:
- type: string
- enum:
- - function_call
- call_id:
- type: string
- name:
- type: string
- arguments:
- type: string
- id:
- type: string
- status:
- $ref: '#/components/schemas/ToolCallStatusEnum'
- required:
- - type
- - call_id
- - name
- - arguments
+ type: object
+ - $ref: '#/components/schemas/OpenAIResponseInputMessageItem'
+ - $ref: '#/components/schemas/OpenAIResponseFunctionToolCallOutput'
+ - $ref: '#/components/schemas/OpenAIResponseFunctionToolCall'
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
- $ref: '#/components/schemas/OutputMessage'
+ type: array
- nullable: true
- RequestMetadata:
- type: object
- nullable: true
- additionalProperties:
- type: string
- maxLength: 512
- 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:
- user_id: '123'
- session_id: abc-def-ghi
- FunctionTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - function
- name:
- type: string
- description:
- type: string
- nullable: true
- strict:
- type: boolean
- nullable: true
- parameters:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - type
- - name
- - parameters
- description: Function tool definition
+ - content: What is the weather today?
+ role: user
+ BaseMessagesResult:
+ description: Base Anthropic Messages API response before OpenRouter extensions
example:
- type: function
- name: get_weather
- description: Get the current weather in a location
- parameters:
- type: object
- properties:
- location:
- type: string
- description: The city and state
- unit:
- type: string
- enum:
- - celsius
- - fahrenheit
- x-speakeasy-unknown-values: allow
- required:
- - location
- SearchContextSizeEnum:
- type: string
- enum:
- - low
- - medium
- - high
- description: Size of the search context for web search tools
- example: medium
- x-speakeasy-unknown-values: allow
- Preview_WebSearchUserLocation:
- type: object
- nullable: true
+ container: null
+ content:
+ - citations: null
+ text: Hello!
+ type: text
+ id: msg_01XFDUDYJgAACzvnptvVoYEL
+ model: claude-sonnet-4-5-20250929
+ role: assistant
+ stop_details: null
+ stop_reason: end_turn
+ stop_sequence: null
+ type: message
+ usage:
+ cache_creation_input_tokens: null
+ cache_read_input_tokens: null
+ input_tokens: 12
+ output_tokens: 8
properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- nullable: true
- country:
- type: string
- nullable: true
- region:
- type: string
- nullable: true
- timezone:
- type: string
- nullable: true
- required:
- - type
- Preview_WebSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_preview
- search_context_size:
- $ref: '#/components/schemas/SearchContextSizeEnum'
- user_location:
- $ref: '#/components/schemas/Preview_WebSearchUserLocation'
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- filters:
- type: object
- nullable: true
- properties:
- allowed_domains:
- type: array
- nullable: true
- items:
- type: string
- excluded_domains:
- type: array
- nullable: true
- items:
- type: string
- required:
- - type
- description: Web search preview tool configuration
- example:
- type: web_search_preview
- Preview_20250311_WebSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_preview_2025_03_11
- search_context_size:
- $ref: '#/components/schemas/SearchContextSizeEnum'
- user_location:
- $ref: '#/components/schemas/Preview_WebSearchUserLocation'
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- filters:
- type: object
- nullable: true
- properties:
- allowed_domains:
- type: array
- nullable: true
- items:
- type: string
- excluded_domains:
- type: array
- nullable: true
- items:
- type: string
- required:
- - type
- description: Web search preview tool configuration (2025-03-11 version)
- example:
- type: web_search_preview_2025_03_11
- WebSearchUserLocation:
- type: object
- nullable: true
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- nullable: true
- country:
- type: string
- nullable: true
- region:
- type: string
- nullable: true
- timezone:
- type: string
- nullable: true
- description: User location information for web search
- example:
- type: approximate
- city: San Francisco
- country: USA
- region: California
- timezone: America/Los_Angeles
- Legacy_WebSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search
- filters:
- type: object
- nullable: true
- properties:
- allowed_domains:
- type: array
- nullable: true
- items:
- type: string
- excluded_domains:
- type: array
- nullable: true
- items:
- type: string
- search_context_size:
- $ref: '#/components/schemas/SearchContextSizeEnum'
- user_location:
- $ref: '#/components/schemas/WebSearchUserLocation'
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- required:
- - type
- description: Web search tool configuration
- example:
- type: web_search
- engine: auto
- filters:
- allowed_domains:
- - example.com
- WebSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_2025_08_26
- filters:
- type: object
- nullable: true
- properties:
- allowed_domains:
- type: array
- nullable: true
- items:
- type: string
- excluded_domains:
- type: array
- nullable: true
- items:
- type: string
- search_context_size:
- $ref: '#/components/schemas/SearchContextSizeEnum'
- user_location:
- $ref: '#/components/schemas/WebSearchUserLocation'
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- required:
- - type
- description: Web search tool configuration (2025-08-26 version)
- example:
- type: web_search_2025_08_26
- engine: auto
- filters:
- allowed_domains:
- - example.com
- CompoundFilter:
- type: object
- properties:
- type:
- type: string
- enum:
- - and
- - or
- x-speakeasy-unknown-values: allow
- filters:
- type: array
- items:
- type: object
- additionalProperties:
- nullable: true
- required:
- - type
- - filters
- description: A compound filter that combines multiple comparison or compound filters
- FileSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - file_search
- vector_store_ids:
- type: array
- items:
- type: string
- filters:
- anyOf:
- - type: object
- properties:
- key:
- type: string
- type:
- type: string
- enum:
- - eq
- - ne
- - gt
- - gte
- - lt
- - lte
- x-speakeasy-unknown-values: allow
- value:
- anyOf:
- - type: string
- - type: number
- - type: boolean
- - type: array
- items:
- anyOf:
- - type: string
- - type: number
- required:
- - key
- - type
- - value
- - $ref: '#/components/schemas/CompoundFilter'
- - nullable: true
- max_num_results:
- type: integer
- minimum: 1
- maximum: 50
- ranking_options:
- type: object
- properties:
- ranker:
- type: string
- enum:
- - auto
- - default-2024-11-15
- x-speakeasy-unknown-values: allow
- score_threshold:
- type: number
- required:
- - type
- - vector_store_ids
- description: File search tool configuration
- example:
- type: file_search
- vector_store_ids:
- - vs_abc123
- ComputerUseServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - computer_use_preview
- display_height:
- type: number
- display_width:
- type: number
- environment:
- type: string
- enum:
- - windows
- - mac
- - linux
- - ubuntu
- - browser
- x-speakeasy-unknown-values: allow
- required:
- - type
- - display_height
- - display_width
- - environment
- description: Computer use preview tool configuration
- example:
- type: computer_use_preview
- display_height: 768
- display_width: 1024
- environment: linux
- CodeInterpreterServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - code_interpreter
container:
- anyOf:
- - type: string
- - type: object
- properties:
- type:
- type: string
- enum:
- - auto
- file_ids:
- type: array
- items:
- type: string
- memory_limit:
- type: string
- nullable: true
- enum:
- - 1g
- - 4g
- - 16g
- - 64g
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - container
- description: Code interpreter tool configuration
- example:
- type: code_interpreter
- container: auto
- McpServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - mcp
- server_label:
- type: string
- allowed_tools:
- anyOf:
- - type: array
- items:
- type: string
- - type: object
- properties:
- tool_names:
- type: array
- items:
- type: string
- read_only:
- type: boolean
- - nullable: true
- - nullable: true
- authorization:
- type: string
- connector_id:
- type: string
- enum:
- - connector_dropbox
- - connector_gmail
- - connector_googlecalendar
- - connector_googledrive
- - connector_microsoftteams
- - connector_outlookcalendar
- - connector_outlookemail
- - connector_sharepoint
- x-speakeasy-unknown-values: allow
- headers:
- type: object
- nullable: true
- additionalProperties:
- type: string
- require_approval:
- anyOf:
- - type: object
- properties:
- never:
- type: object
- properties:
- tool_names:
- type: array
- items:
- type: string
- always:
- type: object
- properties:
- tool_names:
- type: array
- items:
- type: string
- - type: string
- enum:
- - always
- - type: string
- enum:
- - never
- - nullable: true
- - nullable: true
- server_description:
- type: string
- server_url:
- type: string
- required:
- - type
- - server_label
- description: MCP (Model Context Protocol) tool configuration
- example:
- type: mcp
- server_label: my-server
- server_url: https://example.com/mcp
- ImageGenerationServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - image_generation
- background:
- type: string
- enum:
- - transparent
- - opaque
- - auto
- x-speakeasy-unknown-values: allow
- input_fidelity:
- type: string
- nullable: true
- enum:
- - high
- - low
- x-speakeasy-unknown-values: allow
- input_image_mask:
- type: object
- properties:
- image_url:
- type: string
- file_id:
- type: string
- model:
- type: string
- enum:
- - gpt-image-1
- - gpt-image-1-mini
- x-speakeasy-unknown-values: allow
- moderation:
- type: string
- enum:
- - auto
- - low
- x-speakeasy-unknown-values: allow
- output_compression:
- type: number
- output_format:
- type: string
- enum:
- - png
- - webp
- - jpeg
- x-speakeasy-unknown-values: allow
- partial_images:
- type: number
- quality:
- type: string
- enum:
- - low
- - medium
- - high
- - auto
- x-speakeasy-unknown-values: allow
- size:
- type: string
- enum:
- - 1024x1024
- - 1024x1536
- - 1536x1024
- - auto
- x-speakeasy-unknown-values: allow
- required:
- - type
- description: Image generation tool configuration
- example:
- type: image_generation
- quality: high
- CodexLocalShellTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - local_shell
- required:
- - type
- description: Local shell tool configuration
- example:
- type: local_shell
- ShellServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - shell
- required:
- - type
- description: Shell tool configuration
- example:
- type: shell
- ApplyPatchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - apply_patch
- required:
- - type
- description: Apply patch tool configuration
- example:
- type: apply_patch
- CustomTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - custom
- name:
- type: string
- description:
- type: string
- format:
- anyOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - grammar
- definition:
- type: string
- syntax:
- type: string
- enum:
- - lark
- - regex
- x-speakeasy-unknown-values: allow
- required:
- - type
- - definition
- - syntax
- required:
- - type
- - name
- description: Custom tool configuration
- example:
- type: custom
- name: my_tool
- OpenAIResponsesToolChoice:
- anyOf:
- - type: string
- enum:
- - auto
- - type: string
- enum:
- - none
- - type: string
- enum:
- - required
- - type: object
- properties:
- type:
- type: string
- enum:
- - function
- name:
- type: string
- required:
- - type
- - name
- - type: object
- properties:
- type:
- anyOf:
- - type: string
- enum:
- - web_search_preview_2025_03_11
- - type: string
- enum:
- - web_search_preview
- required:
- - type
- StoredPromptTemplate:
- type: object
- nullable: true
- properties:
+ $ref: '#/components/schemas/AnthropicContainer'
+ content:
+ items:
+ $ref: '#/components/schemas/ORAnthropicContentBlock'
+ type: array
id:
type: string
- variables:
- type: object
+ model:
+ type: string
+ role:
+ enum:
+ - assistant
+ type: string
+ stop_details:
+ $ref: '#/components/schemas/AnthropicRefusalStopDetails'
+ stop_reason:
+ $ref: '#/components/schemas/ORAnthropicStopReason'
+ stop_sequence:
nullable: true
- additionalProperties:
- anyOf:
- - type: string
- - $ref: '#/components/schemas/InputText'
- - $ref: '#/components/schemas/InputImage'
- - $ref: '#/components/schemas/InputFile'
+ type: string
+ type:
+ enum:
+ - message
+ type: string
+ usage:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicUsage'
+ - properties:
+ iterations:
+ items:
+ $ref: '#/components/schemas/AnthropicUsageIteration'
+ type: array
+ speed:
+ $ref: '#/components/schemas/AnthropicSpeed'
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: null
+ cache_read_input_tokens: null
+ inference_geo: null
+ input_tokens: 100
+ output_tokens: 50
+ server_tool_use: null
+ service_tier: standard
required:
- id
- ReasoningEffortEnum:
- type: string
- nullable: true
- enum:
- - xhigh
- - high
- - medium
- - low
- - minimal
- - none
- x-speakeasy-unknown-values: allow
- ReasoningSummaryVerbosityEnum:
- type: string
- nullable: true
- enum:
- - auto
- - concise
- - detailed
- example: auto
- x-speakeasy-unknown-values: allow
- BaseReasoningConfig:
+ - type
+ - role
+ - container
+ - content
+ - model
+ - stop_reason
+ - stop_details
+ - stop_sequence
+ - usage
type: object
+ BaseReasoningConfig:
+ example:
+ effort: medium
+ summary: auto
nullable: true
properties:
effort:
- $ref: '#/components/schemas/ReasoningEffortEnum'
+ $ref: '#/components/schemas/ReasoningEffort'
summary:
- $ref: '#/components/schemas/ReasoningSummaryVerbosityEnum'
- TruncationEnum:
- type: string
- nullable: true
- enum:
- - auto
- - disabled
- x-speakeasy-unknown-values: allow
- FormatTextConfig:
+ $ref: '#/components/schemas/ReasoningSummaryVerbosity'
type: object
+ BaseReasoningDeltaEvent:
+ 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
properties:
- type:
+ content_index:
+ type: integer
+ delta:
type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
enum:
- - text
+ - response.reasoning_text.delta
+ type: string
required:
- type
- description: Plain text response format
- example:
- type: text
- FormatJsonObjectConfig:
+ - output_index
+ - item_id
+ - content_index
+ - delta
+ - sequence_number
type: object
+ BaseReasoningDoneEvent:
+ 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
properties:
- type:
+ content_index:
+ type: integer
+ item_id:
type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ text:
+ type: string
+ type:
enum:
- - json_object
+ - response.reasoning_text.done
+ type: string
required:
- type
- description: JSON object response format
- example:
- type: json_object
- FormatJsonSchemaConfig:
+ - output_index
+ - item_id
+ - content_index
+ - text
+ - sequence_number
type: object
+ BaseReasoningSummaryPartAddedEvent:
+ 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
properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ part:
+ $ref: '#/components/schemas/ReasoningSummaryText'
+ sequence_number:
+ type: integer
+ summary_index:
+ type: integer
type:
- type: string
enum:
- - json_schema
- name:
+ - response.reasoning_summary_part.added
type: string
- description:
- type: string
- strict:
- type: boolean
- nullable: true
- schema:
- type: object
- additionalProperties:
- nullable: true
required:
- type
- - name
- - schema
- description: JSON schema constrained response format
- example:
- type: json_schema
- name: user_info
- description: User information schema
- schema:
- type: object
- properties:
- name:
- type: string
- age:
- type: number
- required:
- - name
- Formats:
- anyOf:
- - $ref: '#/components/schemas/FormatTextConfig'
- - $ref: '#/components/schemas/FormatJsonObjectConfig'
- - $ref: '#/components/schemas/FormatJsonSchemaConfig'
- description: Text response format configuration
- example:
- type: text
- TextConfig:
+ - output_index
+ - item_id
+ - summary_index
+ - part
+ - sequence_number
type: object
- properties:
- format:
- $ref: '#/components/schemas/Formats'
- verbosity:
- type: string
- nullable: true
- enum:
- - high
- - low
- - medium
- x-speakeasy-unknown-values: allow
- description: Text output configuration including format and verbosity
+ BaseReasoningSummaryPartDoneEvent:
+ description: Event emitted when a reasoning summary part is complete
example:
- format:
- type: text
- verbosity: medium
- ServiceTierEnum:
- type: string
- nullable: true
- enum:
- - auto
- - default
- - flex
- - priority
- - scale
- x-speakeasy-unknown-values: allow
+ 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
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ part:
+ $ref: '#/components/schemas/ReasoningSummaryText'
+ sequence_number:
+ type: integer
+ summary_index:
+ type: integer
+ type:
+ enum:
+ - response.reasoning_summary_part.done
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - summary_index
+ - part
+ - sequence_number
+ type: object
+ BaseReasoningSummaryTextDeltaEvent:
+ 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
+ properties:
+ delta:
+ type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ summary_index:
+ type: integer
+ type:
+ enum:
+ - response.reasoning_summary_text.delta
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - summary_index
+ - delta
+ - sequence_number
+ type: object
+ BaseReasoningSummaryTextDoneEvent:
+ 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
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ summary_index:
+ type: integer
+ text:
+ type: string
+ type:
+ enum:
+ - response.reasoning_summary_text.done
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - summary_index
+ - text
+ - sequence_number
+ type: object
+ BaseRefusalDeltaEvent:
+ 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
+ properties:
+ content_index:
+ type: integer
+ delta:
+ type: string
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.refusal.delta
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - content_index
+ - delta
+ - sequence_number
+ type: object
+ BaseRefusalDoneEvent:
+ 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
+ properties:
+ content_index:
+ type: integer
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ refusal:
+ type: string
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.refusal.done
+ type: string
+ required:
+ - type
+ - output_index
+ - item_id
+ - content_index
+ - refusal
+ - sequence_number
+ type: object
BaseResponsesResult:
- type: object
+ example:
+ completed_at: 1704067210
+ 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
properties:
+ background:
+ nullable: true
+ type: boolean
+ completed_at:
+ type: integer
+ created_at:
+ type: integer
+ error:
+ $ref: '#/components/schemas/ResponsesErrorField'
+ frequency_penalty:
+ format: double
+ type: number
id:
type: string
- object:
- type: string
- enum:
- - response
- created_at:
- type: number
+ incomplete_details:
+ $ref: '#/components/schemas/IncompleteDetails'
+ instructions:
+ $ref: '#/components/schemas/BaseInputs'
+ max_output_tokens:
+ type: integer
+ max_tool_calls:
+ type: integer
+ metadata:
+ $ref: '#/components/schemas/RequestMetadata'
model:
type: string
- status:
- $ref: '#/components/schemas/OpenAIResponsesResponseStatus'
- completed_at:
- type: number
- nullable: true
+ object:
+ enum:
+ - response
+ type: string
output:
- type: array
items:
+ discriminator:
+ mapping:
+ file_search_call: '#/components/schemas/OutputItemFileSearchCall'
+ function_call: '#/components/schemas/OutputItemFunctionCall'
+ image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
+ message: '#/components/schemas/OutputMessage'
+ reasoning: '#/components/schemas/OutputItemReasoning'
+ web_search_call: '#/components/schemas/OutputItemWebSearchCall'
+ propertyName: type
oneOf:
- $ref: '#/components/schemas/OutputMessage'
- $ref: '#/components/schemas/OutputItemReasoning'
@@ -1917,83 +2781,66 @@ components:
- $ref: '#/components/schemas/OutputItemWebSearchCall'
- $ref: '#/components/schemas/OutputItemFileSearchCall'
- $ref: '#/components/schemas/OutputItemImageGenerationCall'
- discriminator:
- propertyName: type
- mapping:
- message: '#/components/schemas/OutputMessage'
- reasoning: '#/components/schemas/OutputItemReasoning'
- function_call: '#/components/schemas/OutputItemFunctionCall'
- web_search_call: '#/components/schemas/OutputItemWebSearchCall'
- file_search_call: '#/components/schemas/OutputItemFileSearchCall'
- image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
- user:
- type: string
- nullable: true
+ type: array
output_text:
type: string
- prompt_cache_key:
- type: string
- nullable: true
- safety_identifier:
- type: string
- nullable: true
- error:
- $ref: '#/components/schemas/ResponsesErrorField'
- incomplete_details:
- $ref: '#/components/schemas/IncompleteDetails'
- usage:
- $ref: '#/components/schemas/OpenAIResponsesUsage'
- max_tool_calls:
- type: number
- nullable: true
- top_logprobs:
- type: number
- max_output_tokens:
- type: number
- nullable: true
- temperature:
- type: number
- nullable: true
- top_p:
- type: number
- nullable: true
+ parallel_tool_calls:
+ type: boolean
presence_penalty:
+ format: double
type: number
+ previous_response_id:
nullable: true
- frequency_penalty:
+ type: string
+ prompt:
+ $ref: '#/components/schemas/StoredPromptTemplate'
+ prompt_cache_key:
+ nullable: true
+ type: string
+ reasoning:
+ $ref: '#/components/schemas/BaseReasoningConfig'
+ safety_identifier:
+ nullable: true
+ type: string
+ service_tier:
+ $ref: '#/components/schemas/ServiceTier'
+ status:
+ $ref: '#/components/schemas/OpenAIResponsesResponseStatus'
+ store:
+ type: boolean
+ temperature:
+ format: double
type: number
- nullable: true
- instructions:
- $ref: '#/components/schemas/BaseInputs'
- metadata:
- $ref: '#/components/schemas/RequestMetadata'
+ text:
+ $ref: '#/components/schemas/TextConfig'
+ tool_choice:
+ $ref: '#/components/schemas/OpenAIResponsesToolChoice'
tools:
- type: array
items:
oneOf:
- allOf:
- $ref: '#/components/schemas/FunctionTool'
- - type: object
- properties: {}
+ - properties: {}
+ type: object
description: Function tool definition
example:
- type: function
- name: get_weather
description: Get the current weather in a location
+ name: get_weather
parameters:
- type: object
properties:
location:
- type: string
description: The city and state
- unit:
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'
@@ -2007,28 +2854,19 @@ components:
- $ref: '#/components/schemas/ShellServerTool'
- $ref: '#/components/schemas/ApplyPatchServerTool'
- $ref: '#/components/schemas/CustomTool'
- tool_choice:
- $ref: '#/components/schemas/OpenAIResponsesToolChoice'
- parallel_tool_calls:
- type: boolean
- prompt:
- $ref: '#/components/schemas/StoredPromptTemplate'
- background:
- type: boolean
- nullable: true
- previous_response_id:
- type: string
- nullable: true
- reasoning:
- $ref: '#/components/schemas/BaseReasoningConfig'
- service_tier:
- $ref: '#/components/schemas/ServiceTierEnum'
- store:
- type: boolean
+ type: array
+ top_logprobs:
+ type: integer
+ top_p:
+ format: double
+ type: number
truncation:
- $ref: '#/components/schemas/TruncationEnum'
- text:
- $ref: '#/components/schemas/TextConfig'
+ $ref: '#/components/schemas/Truncation'
+ usage:
+ $ref: '#/components/schemas/OpenAIResponsesUsage'
+ user:
+ nullable: true
+ type: string
required:
- id
- object
@@ -2048,2366 +2886,3231 @@ components:
- tools
- tool_choice
- parallel_tool_calls
- OpenResponsesResult:
- allOf:
- - $ref: '#/components/schemas/BaseResponsesResult'
- - type: object
- properties:
- output:
- type: array
- items:
- $ref: '#/components/schemas/OutputItems'
- usage:
- $ref: '#/components/schemas/Usage'
- service_tier:
- type: string
- nullable: true
- description: Complete non-streaming response from the Responses API
- example:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: completed
- output:
- - type: message
- id: msg-abc123
- status: completed
- role: assistant
- content:
- - type: output_text
- text: Hello! How can I help you today?
- annotations: []
- usage:
- input_tokens: 10
- output_tokens: 25
- total_tokens: 35
- input_tokens_details:
- cached_tokens: 0
- output_tokens_details:
- reasoning_tokens: 0
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- temperature: null
- top_p: null
- max_output_tokens: null
- metadata: null
- instructions: null
- CreatedEvent:
type: object
- properties:
- type:
- type: string
- enum:
- - response.created
- response:
- $ref: '#/components/schemas/BaseResponsesResult'
- sequence_number:
- type: number
- required:
- - type
- - response
- - sequence_number
- description: Event emitted when a response is created
+ BaseTextDeltaEvent:
+ description: Event emitted when a text delta is streamed
example:
- type: response.created
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: in_progress
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 0
- InProgressEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.in_progress
- response:
- $ref: '#/components/schemas/BaseResponsesResult'
- sequence_number:
- type: number
- required:
- - type
- - response
- - sequence_number
- description: Event emitted when a response is in progress
- example:
- type: response.in_progress
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: in_progress
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 1
- CompletedEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.completed
- response:
- $ref: '#/components/schemas/BaseResponsesResult'
- sequence_number:
- type: number
- required:
- - type
- - response
- - sequence_number
- description: Event emitted when a response has completed successfully
- example:
- type: response.completed
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: completed
- output:
- - id: item-1
- type: message
- status: completed
- role: assistant
- content:
- - type: output_text
- text: Hello! How can I help you?
- annotations: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 10
- IncompleteEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.incomplete
- response:
- $ref: '#/components/schemas/BaseResponsesResult'
- sequence_number:
- type: number
- required:
- - type
- - response
- - sequence_number
- description: Event emitted when a response is incomplete
- example:
- type: response.incomplete
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: incomplete
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 5
- FailedEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.failed
- response:
- $ref: '#/components/schemas/BaseResponsesResult'
- sequence_number:
- type: number
- required:
- - type
- - response
- - sequence_number
- description: Event emitted when a response has failed
- example:
- type: response.failed
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: failed
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 3
- BaseErrorEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- code:
- type: string
- nullable: true
- message:
- type: string
- param:
- type: string
- nullable: true
- sequence_number:
- type: number
- required:
- - type
- - code
- - message
- - param
- - sequence_number
- description: Event emitted when an error occurs during streaming
- example:
- type: error
- code: rate_limit_exceeded
- message: Rate limit exceeded. Please try again later.
- param: null
- sequence_number: 2
- ErrorEvent:
- allOf:
- - $ref: '#/components/schemas/BaseErrorEvent'
- - type: object
- properties: {}
- description: Event emitted when an error occurs during streaming
- example:
- type: error
- code: rate_limit_exceeded
- message: Rate limit exceeded. Please try again later.
- param: null
- sequence_number: 2
- OutputItemAddedEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.output_item.added
- output_index:
- type: number
- item:
- oneOf:
- - $ref: '#/components/schemas/OutputMessage'
- - $ref: '#/components/schemas/OutputItemReasoning'
- - $ref: '#/components/schemas/OutputItemFunctionCall'
- - $ref: '#/components/schemas/OutputItemWebSearchCall'
- - $ref: '#/components/schemas/OutputItemFileSearchCall'
- - $ref: '#/components/schemas/OutputItemImageGenerationCall'
- discriminator:
- propertyName: type
- mapping:
- message: '#/components/schemas/OutputMessage'
- reasoning: '#/components/schemas/OutputItemReasoning'
- function_call: '#/components/schemas/OutputItemFunctionCall'
- web_search_call: '#/components/schemas/OutputItemWebSearchCall'
- file_search_call: '#/components/schemas/OutputItemFileSearchCall'
- image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
- sequence_number:
- type: number
- required:
- - type
- - output_index
- - item
- - sequence_number
- description: Event emitted when a new output item is added to the response
- example:
- type: response.output_item.added
+ content_index: 0
+ delta: Hello
+ item_id: item-1
+ logprobs: []
output_index: 0
- item:
- id: item-1
- type: message
- status: in_progress
- role: assistant
- content: []
- sequence_number: 2
- OutputItemDoneEvent:
- type: object
+ sequence_number: 4
+ type: response.output_text.delta
properties:
- type:
+ content_index:
+ type: integer
+ delta:
type: string
- enum:
- - response.output_item.done
- output_index:
- type: number
- item:
- oneOf:
- - $ref: '#/components/schemas/OutputMessage'
- - $ref: '#/components/schemas/OutputItemReasoning'
- - $ref: '#/components/schemas/OutputItemFunctionCall'
- - $ref: '#/components/schemas/OutputItemWebSearchCall'
- - $ref: '#/components/schemas/OutputItemFileSearchCall'
- - $ref: '#/components/schemas/OutputItemImageGenerationCall'
- discriminator:
- propertyName: type
- mapping:
- message: '#/components/schemas/OutputMessage'
- reasoning: '#/components/schemas/OutputItemReasoning'
- function_call: '#/components/schemas/OutputItemFunctionCall'
- web_search_call: '#/components/schemas/OutputItemWebSearchCall'
- file_search_call: '#/components/schemas/OutputItemFileSearchCall'
- image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
- sequence_number:
- type: number
- required:
- - type
- - output_index
- - item
- - sequence_number
- description: Event emitted when an output item is complete
- example:
- type: response.output_item.done
- output_index: 0
- item:
- id: item-1
- type: message
- status: completed
- role: assistant
- content:
- - type: output_text
- text: Hello! How can I help you?
- annotations: []
- sequence_number: 8
- BaseContentPartAddedEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.content_part.added
- output_index:
- type: number
item_id:
type: string
- content_index:
- type: number
- part:
- anyOf:
- - $ref: '#/components/schemas/ResponseOutputText'
- - $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ logprobs:
+ items:
+ $ref: '#/components/schemas/OpenResponsesLogProbs'
+ type: array
+ output_index:
+ type: integer
sequence_number:
- type: number
+ type: integer
+ type:
+ enum:
+ - response.output_text.delta
+ type: string
+ required:
+ - type
+ - logprobs
+ - output_index
+ - item_id
+ - content_index
+ - delta
+ - sequence_number
+ type: object
+ BaseTextDoneEvent:
+ 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
+ properties:
+ content_index:
+ type: integer
+ item_id:
+ type: string
+ logprobs:
+ items:
+ $ref: '#/components/schemas/OpenResponsesLogProbs'
+ type: array
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ text:
+ type: string
+ type:
+ enum:
+ - response.output_text.done
+ type: string
required:
- type
- output_index
- item_id
- content_index
- - part
+ - text
- sequence_number
- description: Event emitted when a new content part is added to an output item
+ - logprobs
+ type: object
+ BigNumberUnion:
+ description: Price per million prompt tokens
+ example: 1000
+ type: string
+ BulkAssignKeysRequest:
example:
- type: response.content_part.added
- output_index: 0
- item_id: item-1
- content_index: 0
- part:
- type: output_text
- text: ''
- annotations: []
- sequence_number: 3
+ key_hashes:
+ - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ properties:
+ key_hashes:
+ description: Array of API key hashes to assign to the guardrail
+ example:
+ - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ items:
+ minLength: 1
+ type: string
+ minItems: 1
+ type: array
+ required:
+ - key_hashes
+ type: object
+ BulkAssignKeysResponse:
+ example:
+ assigned_count: 3
+ properties:
+ assigned_count:
+ description: Number of keys successfully assigned
+ example: 3
+ type: integer
+ required:
+ - assigned_count
+ type: object
+ BulkAssignMembersRequest:
+ example:
+ member_user_ids:
+ - user_abc123
+ - user_def456
+ properties:
+ member_user_ids:
+ description: Array of member user IDs to assign to the guardrail
+ example:
+ - user_abc123
+ - user_def456
+ items:
+ minLength: 1
+ type: string
+ minItems: 1
+ type: array
+ required:
+ - member_user_ids
+ type: object
+ BulkAssignMembersResponse:
+ example:
+ assigned_count: 2
+ properties:
+ assigned_count:
+ description: Number of members successfully assigned
+ example: 2
+ type: integer
+ required:
+ - assigned_count
+ type: object
+ BulkUnassignKeysRequest:
+ example:
+ key_hashes:
+ - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ properties:
+ key_hashes:
+ description: Array of API key hashes to unassign from the guardrail
+ example:
+ - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ items:
+ minLength: 1
+ type: string
+ minItems: 1
+ type: array
+ required:
+ - key_hashes
+ type: object
+ BulkUnassignKeysResponse:
+ example:
+ unassigned_count: 3
+ properties:
+ unassigned_count:
+ description: Number of keys successfully unassigned
+ example: 3
+ type: integer
+ required:
+ - unassigned_count
+ type: object
+ BulkUnassignMembersRequest:
+ example:
+ member_user_ids:
+ - user_abc123
+ - user_def456
+ properties:
+ member_user_ids:
+ description: Array of member user IDs to unassign from the guardrail
+ example:
+ - user_abc123
+ - user_def456
+ items:
+ minLength: 1
+ type: string
+ minItems: 1
+ type: array
+ required:
+ - member_user_ids
+ type: object
+ BulkUnassignMembersResponse:
+ example:
+ unassigned_count: 2
+ properties:
+ unassigned_count:
+ description: Number of members successfully unassigned
+ example: 2
+ type: integer
+ required:
+ - unassigned_count
+ type: object
+ ChatAssistantImages:
+ description: Generated images from image generation models
+ example:
+ - image_url:
+ url: data:image/png;base64,iVBORw0KGgo...
+ items:
+ properties:
+ image_url:
+ properties:
+ url:
+ description: URL or base64-encoded data of the generated image
+ type: string
+ required:
+ - url
+ type: object
+ required:
+ - image_url
+ type: object
+ type: array
+ ChatAssistantMessage:
+ description: Assistant message for requests and responses
+ example:
+ content: The capital of France is Paris.
+ role: assistant
+ properties:
+ audio:
+ $ref: '#/components/schemas/ChatAudioOutput'
+ content:
+ anyOf:
+ - type: string
+ - items:
+ $ref: '#/components/schemas/ChatContentItems'
+ type: array
+ - nullable: true
+ description: Assistant message content
+ images:
+ $ref: '#/components/schemas/ChatAssistantImages'
+ name:
+ description: Optional name for the assistant
+ type: string
+ reasoning:
+ description: Reasoning output
+ nullable: true
+ type: string
+ reasoning_details:
+ $ref: '#/components/schemas/ChatReasoningDetails'
+ refusal:
+ description: Refusal message if content was refused
+ nullable: true
+ type: string
+ role:
+ enum:
+ - assistant
+ type: string
+ tool_calls:
+ description: Tool calls made by the assistant
+ items:
+ $ref: '#/components/schemas/ChatToolCall'
+ type: array
+ required:
+ - role
+ type: object
+ ChatAudioOutput:
+ description: Audio output data or reference
+ example:
+ data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f
+ expires_at: 1677652400
+ id: audio_abc123
+ transcript: Hello! How can I help you today?
+ properties:
+ data:
+ description: Base64 encoded audio data
+ type: string
+ expires_at:
+ description: Audio expiration timestamp
+ type: integer
+ id:
+ description: Audio output identifier
+ type: string
+ transcript:
+ description: Audio transcript
+ type: string
+ type: object
+ ChatChoice:
+ description: Chat completion choice
+ example:
+ finish_reason: stop
+ index: 0
+ logprobs: null
+ message:
+ content: The capital of France is Paris.
+ role: assistant
+ properties:
+ finish_reason:
+ $ref: '#/components/schemas/ChatFinishReasonEnum'
+ index:
+ description: Choice index
+ example: 0
+ type: integer
+ logprobs:
+ $ref: '#/components/schemas/ChatTokenLogprobs'
+ message:
+ $ref: '#/components/schemas/ChatAssistantMessage'
+ required:
+ - finish_reason
+ - index
+ - message
+ type: object
+ ChatContentAudio:
+ description: Audio input content part. Supported audio formats vary by provider.
+ example:
+ input_audio:
+ data: SGVsbG8gV29ybGQ=
+ format: wav
+ type: input_audio
+ properties:
+ input_audio:
+ properties:
+ data:
+ description: Base64 encoded audio data
+ type: string
+ format:
+ description: >-
+ Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.
+ type: string
+ required:
+ - data
+ - format
+ type: object
+ type:
+ enum:
+ - input_audio
+ type: string
+ required:
+ - type
+ - input_audio
+ type: object
+ ChatContentCacheControl:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ - properties: {}
+ type: object
+ description: Cache control for the content part
+ example:
+ ttl: 5m
+ type: ephemeral
+ ChatContentFile:
+ description: File content part for document processing
+ example:
+ file:
+ file_data: https://example.com/document.pdf
+ filename: document.pdf
+ type: file
+ properties:
+ file:
+ properties:
+ file_data:
+ description: File content as base64 data URL or URL
+ type: string
+ file_id:
+ description: File ID for previously uploaded files
+ type: string
+ filename:
+ description: Original filename
+ type: string
+ type: object
+ type:
+ enum:
+ - file
+ type: string
+ required:
+ - type
+ - file
+ type: object
+ ChatContentImage:
+ description: Image content part for vision models
+ example:
+ image_url:
+ detail: auto
+ url: https://example.com/image.jpg
+ type: image_url
+ properties:
+ image_url:
+ properties:
+ detail:
+ description: Image detail level for vision models
+ enum:
+ - auto
+ - low
+ - high
+ type: string
+ x-speakeasy-unknown-values: allow
+ url:
+ description: 'URL of the image (data: URLs supported)'
+ type: string
+ required:
+ - url
+ type: object
+ type:
+ enum:
+ - image_url
+ type: string
+ required:
+ - type
+ - image_url
+ type: object
+ ChatContentItems:
+ description: Content part for chat completion messages
+ discriminator:
+ mapping:
+ file: '#/components/schemas/ChatContentFile'
+ image_url: '#/components/schemas/ChatContentImage'
+ input_audio: '#/components/schemas/ChatContentAudio'
+ input_video: '#/components/schemas/Legacy_ChatContentVideo'
+ text: '#/components/schemas/ChatContentText'
+ video_url: '#/components/schemas/ChatContentVideo'
+ propertyName: type
+ example:
+ text: Hello, world!
+ type: text
+ oneOf:
+ - $ref: '#/components/schemas/ChatContentText'
+ - $ref: '#/components/schemas/ChatContentImage'
+ - $ref: '#/components/schemas/ChatContentAudio'
+ - $ref: '#/components/schemas/Legacy_ChatContentVideo'
+ - $ref: '#/components/schemas/ChatContentVideo'
+ - $ref: '#/components/schemas/ChatContentFile'
+ ChatContentText:
+ description: Text content part
+ example:
+ text: Hello, world!
+ type: text
+ properties:
+ cache_control:
+ $ref: '#/components/schemas/ChatContentCacheControl'
+ text:
+ type: string
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ - text
+ type: object
+ ChatContentVideo:
+ description: Video input content part
+ example:
+ type: video_url
+ video_url:
+ url: https://example.com/video.mp4
+ properties:
+ type:
+ enum:
+ - video_url
+ type: string
+ video_url:
+ $ref: '#/components/schemas/ChatContentVideoInput'
+ required:
+ - type
+ - video_url
+ type: object
+ ChatContentVideoInput:
+ description: Video input object
+ example:
+ url: https://example.com/video.mp4
+ properties:
+ url:
+ description: 'URL of the video (data: URLs supported)'
+ type: string
+ required:
+ - url
+ type: object
+ ChatDebugOptions:
+ description: Debug options for inspecting request transformations (streaming only)
+ example:
+ echo_upstream_body: true
+ properties:
+ echo_upstream_body:
+ description: >-
+ If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.
+ example: true
+ type: boolean
+ type: object
+ ChatDeveloperMessage:
+ description: Developer message
+ example:
+ content: This is a message from the developer.
+ role: developer
+ properties:
+ content:
+ anyOf:
+ - type: string
+ - items:
+ $ref: '#/components/schemas/ChatContentText'
+ type: array
+ description: Developer message content
+ example: This is a message from the developer.
+ name:
+ description: Optional name for the developer message
+ example: Developer
+ type: string
+ role:
+ enum:
+ - developer
+ type: string
+ required:
+ - role
+ - content
+ type: object
+ ChatFinishReasonEnum:
+ enum:
+ - tool_calls
+ - stop
+ - length
+ - content_filter
+ - error
+ - null
+ example: stop
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ChatFormatGrammarConfig:
+ description: Custom grammar response format
+ example:
+ grammar: root ::= "yes" | "no"
+ type: grammar
+ properties:
+ grammar:
+ description: Custom grammar for text generation
+ example: root ::= "yes" | "no"
+ type: string
+ type:
+ enum:
+ - grammar
+ type: string
+ required:
+ - type
+ - grammar
+ type: object
+ ChatFormatJsonSchemaConfig:
+ description: JSON Schema response format for structured outputs
+ example:
+ json_schema:
+ name: math_response
+ schema:
+ properties:
+ answer:
+ type: number
+ required:
+ - answer
+ type: object
+ type: json_schema
+ properties:
+ json_schema:
+ $ref: '#/components/schemas/ChatJsonSchemaConfig'
+ type:
+ enum:
+ - json_schema
+ type: string
+ required:
+ - type
+ - json_schema
+ type: object
+ ChatFormatPythonConfig:
+ description: Python code response format
+ example:
+ type: python
+ properties:
+ type:
+ enum:
+ - python
+ type: string
+ required:
+ - type
+ type: object
+ ChatFormatTextConfig:
+ description: Default text response format
+ example:
+ type: text
+ properties:
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ type: object
+ ChatFunctionTool:
+ anyOf:
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/ChatContentCacheControl'
+ function:
+ description: Function definition for tool calling
+ example:
+ description: Get the current weather for a location
+ name: get_weather
+ parameters:
+ properties:
+ location:
+ description: City name
+ type: string
+ required:
+ - location
+ type: object
+ properties:
+ description:
+ description: Function description for the model
+ example: Get the current weather for a location
+ type: string
+ name:
+ description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)
+ example: get_weather
+ maxLength: 64
+ type: string
+ parameters:
+ additionalProperties:
+ nullable: true
+ description: Function parameters as JSON Schema object
+ example:
+ properties:
+ location:
+ description: City name
+ type: string
+ required:
+ - location
+ type: object
+ type: object
+ strict:
+ description: Enable strict schema adherence
+ example: false
+ nullable: true
+ type: boolean
+ required:
+ - name
+ type: object
+ type:
+ enum:
+ - function
+ type: string
+ required:
+ - type
+ - function
+ type: object
+ - $ref: '#/components/schemas/DatetimeServerTool'
+ - $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
+ - $ref: '#/components/schemas/ChatWebSearchShorthand'
+ description: Tool definition for function calling (regular function or OpenRouter built-in server tool)
+ example:
+ function:
+ description: Get the current weather for a location
+ name: get_weather
+ parameters:
+ properties:
+ location:
+ description: City name
+ type: string
+ unit:
+ enum:
+ - celsius
+ - fahrenheit
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - location
+ type: object
+ type: function
+ ChatJsonSchemaConfig:
+ description: JSON Schema configuration object
+ example:
+ description: A mathematical response
+ name: math_response
+ schema:
+ properties:
+ answer:
+ type: number
+ required:
+ - answer
+ type: object
+ strict: true
+ properties:
+ description:
+ description: Schema description for the model
+ example: A mathematical response
+ type: string
+ name:
+ description: Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)
+ example: math_response
+ maxLength: 64
+ type: string
+ schema:
+ additionalProperties:
+ nullable: true
+ description: JSON Schema object
+ example:
+ properties:
+ answer:
+ type: number
+ required:
+ - answer
+ type: object
+ type: object
+ strict:
+ description: Enable strict schema adherence
+ example: false
+ nullable: true
+ type: boolean
+ required:
+ - name
+ type: object
+ ChatMessages:
+ description: Chat completion message with role-based discrimination
+ discriminator:
+ mapping:
+ assistant: '#/components/schemas/ChatAssistantMessage'
+ developer: '#/components/schemas/ChatDeveloperMessage'
+ system: '#/components/schemas/ChatSystemMessage'
+ tool: '#/components/schemas/ChatToolMessage'
+ user: '#/components/schemas/ChatUserMessage'
+ propertyName: role
+ example:
+ content: What is the capital of France?
+ role: user
+ oneOf:
+ - $ref: '#/components/schemas/ChatSystemMessage'
+ - $ref: '#/components/schemas/ChatUserMessage'
+ - $ref: '#/components/schemas/ChatDeveloperMessage'
+ - $ref: '#/components/schemas/ChatAssistantMessage'
+ - $ref: '#/components/schemas/ChatToolMessage'
+ ChatModelNames:
+ description: Models to use for completion
+ example:
+ - openai/gpt-4
+ - openai/gpt-4o
+ items:
+ allOf:
+ - $ref: '#/components/schemas/ModelName'
+ - description: Available OpenRouter chat completion models
+ type: array
+ ChatNamedToolChoice:
+ description: Named tool choice for specific function
+ example:
+ function:
+ name: get_weather
+ type: function
+ properties:
+ function:
+ properties:
+ name:
+ description: Function name to call
+ example: get_weather
+ type: string
+ required:
+ - name
+ type: object
+ type:
+ enum:
+ - function
+ type: string
+ required:
+ - type
+ - function
+ type: object
+ ChatReasoningDetails:
+ description: Reasoning details for extended thinking models
+ example:
+ - thinking: Let me work through this step by step...
+ type: thinking
+ items:
+ $ref: '#/components/schemas/ReasoningDetailUnion'
+ type: array
+ ChatReasoningSummaryVerbosityEnum:
+ enum:
+ - auto
+ - concise
+ - detailed
+ - null
+ example: concise
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ChatRequest:
+ description: Chat completion request parameters
+ example:
+ 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
+ properties:
+ cache_control:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ - description: >-
+ Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
+ debug:
+ $ref: '#/components/schemas/ChatDebugOptions'
+ frequency_penalty:
+ description: Frequency penalty (-2.0 to 2.0)
+ example: 0
+ format: double
+ type: number
+ image_config:
+ additionalProperties:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ - items:
+ nullable: true
+ type: array
+ description: >-
+ 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.
+ example:
+ aspect_ratio: '16:9'
+ type: object
+ logit_bias:
+ additionalProperties:
+ format: double
+ type: number
+ description: Token logit bias adjustments
+ example:
+ '50256': -100
+ nullable: true
+ type: object
+ logprobs:
+ description: Return log probabilities
+ example: false
+ nullable: true
+ type: boolean
+ max_completion_tokens:
+ description: Maximum tokens in completion
+ example: 100
+ type: integer
+ max_tokens:
+ description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.'
+ example: 100
+ type: integer
+ messages:
+ description: List of messages for the conversation
+ example:
+ - content: Hello!
+ role: user
+ items:
+ $ref: '#/components/schemas/ChatMessages'
+ minItems: 1
+ type: array
+ metadata:
+ additionalProperties:
+ type: string
+ description: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ example:
+ session_id: session-456
+ user_id: user-123
+ type: object
+ modalities:
+ description: Output modalities for the response. Supported values are "text", "image", and "audio".
+ example:
+ - text
+ - image
+ items:
+ enum:
+ - text
+ - image
+ - audio
+ type: string
+ x-speakeasy-unknown-values: allow
+ type: array
+ model:
+ $ref: '#/components/schemas/ModelName'
+ models:
+ $ref: '#/components/schemas/ChatModelNames'
+ parallel_tool_calls:
+ description: >-
+ Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ example: true
+ 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:
+ description: Presence penalty (-2.0 to 2.0)
+ example: 0
+ format: double
+ type: number
+ provider:
+ $ref: '#/components/schemas/ProviderPreferences'
+ reasoning:
+ description: Configuration options for reasoning models
+ example:
+ effort: medium
+ summary: concise
+ properties:
+ effort:
+ description: Constrains effort on reasoning for reasoning models
+ enum:
+ - xhigh
+ - high
+ - medium
+ - low
+ - minimal
+ - none
+ - null
+ example: medium
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ summary:
+ $ref: '#/components/schemas/ChatReasoningSummaryVerbosityEnum'
+ type: object
+ response_format:
+ description: Response format configuration
+ discriminator:
+ mapping:
+ grammar: '#/components/schemas/ChatFormatGrammarConfig'
+ json_object: '#/components/schemas/FormatJsonObjectConfig'
+ json_schema: '#/components/schemas/ChatFormatJsonSchemaConfig'
+ python: '#/components/schemas/ChatFormatPythonConfig'
+ text: '#/components/schemas/ChatFormatTextConfig'
+ propertyName: type
+ example:
+ type: json_object
+ oneOf:
+ - $ref: '#/components/schemas/ChatFormatTextConfig'
+ - $ref: '#/components/schemas/FormatJsonObjectConfig'
+ - $ref: '#/components/schemas/ChatFormatJsonSchemaConfig'
+ - $ref: '#/components/schemas/ChatFormatGrammarConfig'
+ - $ref: '#/components/schemas/ChatFormatPythonConfig'
+ route:
+ $ref: '#/components/schemas/DeprecatedRoute'
+ seed:
+ description: Random seed for deterministic outputs
+ example: 42
+ type: integer
+ service_tier:
+ description: The service tier to use for processing this request.
+ enum:
+ - auto
+ - default
+ - flex
+ - priority
+ - scale
+ - null
+ example: auto
+ 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
+ stop:
+ anyOf:
+ - type: string
+ - items:
+ type: string
+ maxItems: 4
+ type: array
+ - nullable: true
+ description: Stop sequences (up to 4)
+ example:
+ - ""
+ stream:
+ default: false
+ description: Enable streaming response
+ example: false
+ type: boolean
+ stream_options:
+ $ref: '#/components/schemas/ChatStreamOptions'
+ temperature:
+ description: Sampling temperature (0-2)
+ example: 0.7
+ format: double
+ type: number
+ tool_choice:
+ $ref: '#/components/schemas/ChatToolChoice'
+ tools:
+ description: Available tools for function calling
+ example:
+ - function:
+ description: Get weather
+ name: get_weather
+ type: function
+ items:
+ $ref: '#/components/schemas/ChatFunctionTool'
+ type: array
+ top_logprobs:
+ description: Number of top log probabilities to return (0-20)
+ example: 5
+ type: integer
+ top_p:
+ description: Nucleus sampling parameter (0-1)
+ example: 1
+ format: double
+ type: number
+ trace:
+ $ref: '#/components/schemas/TraceConfig'
+ user:
+ description: Unique user identifier
+ example: user-123
+ type: string
+ required:
+ - messages
+ type: object
+ ChatResult:
+ description: Chat completion response
+ example:
+ choices:
+ - finish_reason: stop
+ index: 0
+ message:
+ content: The capital of France is Paris.
+ role: assistant
+ created: 1677652288
+ id: chatcmpl-123
+ model: openai/gpt-4
+ object: chat.completion
+ usage:
+ completion_tokens: 15
+ prompt_tokens: 10
+ total_tokens: 25
+ properties:
+ choices:
+ description: List of completion choices
+ items:
+ $ref: '#/components/schemas/ChatChoice'
+ type: array
+ created:
+ description: Unix timestamp of creation
+ example: 1677652288
+ type: integer
+ id:
+ description: Unique completion identifier
+ example: chatcmpl-123
+ type: string
+ model:
+ description: Model used for completion
+ example: openai/gpt-4
+ type: string
+ object:
+ enum:
+ - chat.completion
+ type: string
+ service_tier:
+ description: The service tier used by the upstream provider for this request
+ example: default
+ nullable: true
+ type: string
+ system_fingerprint:
+ description: System fingerprint
+ example: fp_44709d6fcb
+ nullable: true
+ type: string
+ usage:
+ $ref: '#/components/schemas/ChatUsage'
+ required:
+ - id
+ - choices
+ - created
+ - model
+ - object
+ - system_fingerprint
+ type: object
+ ChatStreamChoice:
+ description: Streaming completion choice chunk
+ example:
+ delta:
+ content: Hello
+ role: assistant
+ finish_reason: null
+ index: 0
+ properties:
+ delta:
+ $ref: '#/components/schemas/ChatStreamDelta'
+ finish_reason:
+ $ref: '#/components/schemas/ChatFinishReasonEnum'
+ index:
+ description: Choice index
+ example: 0
+ type: integer
+ logprobs:
+ $ref: '#/components/schemas/ChatTokenLogprobs'
+ required:
+ - delta
+ - finish_reason
+ - index
+ type: object
+ ChatStreamChunk:
+ description: Streaming chat completion chunk
+ example:
+ 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:
+ choices:
+ description: List of streaming chunk choices
+ items:
+ $ref: '#/components/schemas/ChatStreamChoice'
+ type: array
+ created:
+ description: Unix timestamp of creation
+ example: 1677652288
+ type: integer
+ error:
+ description: Error information
+ example:
+ code: 429
+ message: Rate limit exceeded
+ properties:
+ code:
+ description: Error code
+ example: 429
+ format: int32
+ type: integer
+ message:
+ description: Error message
+ example: Rate limit exceeded
+ type: string
+ required:
+ - message
+ - code
+ type: object
+ id:
+ description: Unique chunk identifier
+ example: chatcmpl-123
+ type: string
+ model:
+ description: Model used for completion
+ example: openai/gpt-4
+ type: string
+ object:
+ enum:
+ - chat.completion.chunk
+ type: string
+ service_tier:
+ description: The service tier used by the upstream provider for this request
+ example: default
+ nullable: true
+ type: string
+ system_fingerprint:
+ description: System fingerprint
+ example: fp_44709d6fcb
+ type: string
+ usage:
+ $ref: '#/components/schemas/ChatUsage'
+ required:
+ - id
+ - choices
+ - created
+ - model
+ - object
+ type: object
+ x-speakeasy-entity: ChatStreamChunk
+ ChatStreamDelta:
+ description: Delta changes in streaming response
+ example:
+ content: Hello
+ role: assistant
+ properties:
+ audio:
+ allOf:
+ - $ref: '#/components/schemas/ChatAudioOutput'
+ - description: Audio output data
+ content:
+ description: Message content delta
+ example: Hello
+ nullable: true
+ type: string
+ reasoning:
+ description: Reasoning content delta
+ example: I need to
+ nullable: true
+ type: string
+ reasoning_details:
+ $ref: '#/components/schemas/ChatStreamReasoningDetails'
+ refusal:
+ description: Refusal message delta
+ example: null
+ nullable: true
+ type: string
+ role:
+ description: The role of the message author
+ enum:
+ - assistant
+ example: assistant
+ type: string
+ tool_calls:
+ description: Tool calls delta
+ items:
+ $ref: '#/components/schemas/ChatStreamToolCall'
+ type: array
+ type: object
+ ChatStreamOptions:
+ description: Streaming configuration options
+ example:
+ include_usage: true
+ nullable: true
+ properties:
+ include_usage:
+ deprecated: true
+ description: 'Deprecated: This field has no effect. Full usage details are always included.'
+ example: true
+ type: boolean
+ type: object
+ ChatStreamReasoningDetails:
+ description: Reasoning details for extended thinking models
+ example:
+ - text: Let me think about this...
+ type: text
+ items:
+ $ref: '#/components/schemas/ReasoningDetailUnion'
+ type: array
+ ChatStreamToolCall:
+ description: Tool call delta for streaming responses
+ example:
+ function:
+ arguments: '{"location": "..."}'
+ name: get_weather
+ id: call_abc123
+ index: 0
+ type: function
+ properties:
+ function:
+ description: Function call details
+ properties:
+ arguments:
+ description: Function arguments as JSON string
+ example: '{"location": "..."}'
+ type: string
+ name:
+ description: Function name
+ example: get_weather
+ type: string
+ type: object
+ id:
+ description: Tool call identifier
+ example: call_abc123
+ type: string
+ index:
+ description: Tool call index in the array
+ example: 0
+ type: integer
+ type:
+ description: Tool call type
+ enum:
+ - function
+ example: function
+ type: string
+ required:
+ - index
+ type: object
+ ChatSystemMessage:
+ description: System message for setting behavior
+ example:
+ content: You are a helpful assistant.
+ name: Assistant Config
+ role: system
+ properties:
+ content:
+ anyOf:
+ - type: string
+ - items:
+ $ref: '#/components/schemas/ChatContentText'
+ type: array
+ description: System message content
+ example: You are a helpful assistant.
+ name:
+ description: Optional name for the system message
+ example: Assistant Config
+ type: string
+ role:
+ enum:
+ - system
+ type: string
+ required:
+ - role
+ - content
+ type: object
+ ChatTokenLogprob:
+ description: Token log probability information
+ example:
+ bytes: null
+ logprob: -0.612345
+ token: ' Hello'
+ top_logprobs:
+ - bytes: null
+ logprob: -0.612345
+ token: ' Hello'
+ properties:
+ bytes:
+ description: UTF-8 bytes of the token
+ items:
+ type: integer
+ nullable: true
+ type: array
+ logprob:
+ description: Log probability of the token
+ format: double
+ type: number
+ token:
+ description: The token
+ type: string
+ top_logprobs:
+ description: Top alternative tokens with probabilities
+ items:
+ properties:
+ bytes:
+ items:
+ type: integer
+ nullable: true
+ type: array
+ logprob:
+ format: double
+ type: number
+ token:
+ type: string
+ required:
+ - token
+ - logprob
+ - bytes
+ type: object
+ type: array
+ required:
+ - token
+ - logprob
+ - bytes
+ - top_logprobs
+ type: object
+ ChatTokenLogprobs:
+ description: Log probabilities for the completion
+ example:
+ content:
+ - bytes: null
+ logprob: -0.612345
+ token: ' Hello'
+ top_logprobs: []
+ refusal: null
+ nullable: true
+ properties:
+ content:
+ description: Log probabilities for content tokens
+ items:
+ $ref: '#/components/schemas/ChatTokenLogprob'
+ nullable: true
+ type: array
+ refusal:
+ description: Log probabilities for refusal tokens
+ items:
+ $ref: '#/components/schemas/ChatTokenLogprob'
+ nullable: true
+ type: array
+ required:
+ - content
+ type: object
+ ChatToolCall:
+ description: Tool call made by the assistant
+ example:
+ function:
+ arguments: '{"location": "Boston, MA"}'
+ name: get_current_weather
+ id: call_abc123
+ type: function
+ properties:
+ function:
+ properties:
+ arguments:
+ description: Function arguments as JSON string
+ type: string
+ name:
+ description: Function name to call
+ type: string
+ required:
+ - name
+ - arguments
+ type: object
+ id:
+ description: Tool call identifier
+ type: string
+ type:
+ enum:
+ - function
+ type: string
+ required:
+ - id
+ - type
+ - function
+ type: object
+ ChatToolChoice:
+ anyOf:
+ - enum:
+ - none
+ type: string
+ - enum:
+ - auto
+ type: string
+ - enum:
+ - required
+ type: string
+ - $ref: '#/components/schemas/ChatNamedToolChoice'
+ description: Tool choice configuration
+ example: auto
+ ChatToolMessage:
+ description: Tool response message
+ example:
+ content: The weather in San Francisco is 72°F and sunny.
+ role: tool
+ tool_call_id: call_abc123
+ properties:
+ content:
+ anyOf:
+ - type: string
+ - items:
+ $ref: '#/components/schemas/ChatContentItems'
+ type: array
+ description: Tool response content
+ example: The weather in San Francisco is 72°F and sunny.
+ role:
+ enum:
+ - tool
+ type: string
+ tool_call_id:
+ description: ID of the assistant message tool call this message responds to
+ example: call_abc123
+ type: string
+ required:
+ - role
+ - content
+ - tool_call_id
+ type: object
+ ChatUsage:
+ description: Token usage statistics
+ example:
+ completion_tokens: 15
+ completion_tokens_details:
+ reasoning_tokens: 5
+ prompt_tokens: 10
+ prompt_tokens_details:
+ cached_tokens: 2
+ total_tokens: 25
+ properties:
+ completion_tokens:
+ description: Number of tokens in the completion
+ type: integer
+ completion_tokens_details:
+ description: Detailed completion token usage
+ nullable: true
+ properties:
+ accepted_prediction_tokens:
+ description: Accepted prediction tokens
+ type: integer
+ audio_tokens:
+ description: Tokens used for audio output
+ type: integer
+ reasoning_tokens:
+ description: Tokens used for reasoning
+ type: integer
+ rejected_prediction_tokens:
+ description: Rejected prediction tokens
+ type: integer
+ type: object
+ prompt_tokens:
+ description: Number of tokens in the prompt
+ type: integer
+ prompt_tokens_details:
+ description: Detailed prompt token usage
+ nullable: true
+ properties:
+ audio_tokens:
+ description: Audio input tokens
+ type: integer
+ cache_write_tokens:
+ description: Tokens written to cache. Only returned for models with explicit caching and cache write pricing.
+ type: integer
+ cached_tokens:
+ description: Cached prompt tokens
+ type: integer
+ video_tokens:
+ description: Video input tokens
+ type: integer
+ type: object
+ total_tokens:
+ description: Total number of tokens
+ type: integer
+ required:
+ - completion_tokens
+ - prompt_tokens
+ - total_tokens
+ type: object
+ ChatUserMessage:
+ description: User message
+ example:
+ content: What is the capital of France?
+ role: user
+ properties:
+ content:
+ anyOf:
+ - type: string
+ - items:
+ $ref: '#/components/schemas/ChatContentItems'
+ type: array
+ description: User message content
+ example: What is the capital of France?
+ name:
+ description: Optional name for the user
+ example: User
+ type: string
+ role:
+ enum:
+ - user
+ type: string
+ required:
+ - role
+ - content
+ type: object
+ ChatWebSearchShorthand:
+ description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search.
+ example:
+ type: web_search_preview
+ 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.
+ items:
+ type: string
+ type: array
+ engine:
+ $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.
+ 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
+ parameters:
+ $ref: '#/components/schemas/WebSearchConfig'
+ search_context_size:
+ $ref: '#/components/schemas/SearchQualityLevel'
+ type:
+ enum:
+ - web_search
+ - web_search_preview
+ - web_search_preview_2025_03_11
+ - web_search_2025_08_26
+ type: string
+ x-speakeasy-unknown-values: allow
+ user_location:
+ $ref: '#/components/schemas/WebSearchUserLocationServerTool'
+ required:
+ - type
+ type: object
+ CodeInterpreterCallItem:
+ description: A code interpreter execution call with outputs
+ example:
+ code: print("Hello, World!")
+ container_id: container-xyz789
+ id: code-abc123
+ outputs:
+ - logs: Hello, World!
+ type: logs
+ status: completed
+ type: code_interpreter_call
+ properties:
+ code:
+ nullable: true
+ type: string
+ container_id:
+ type: string
+ id:
+ type: string
+ outputs:
+ items:
+ anyOf:
+ - properties:
+ type:
+ enum:
+ - image
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - url
+ type: object
+ - properties:
+ logs:
+ type: string
+ type:
+ enum:
+ - logs
+ type: string
+ required:
+ - type
+ - logs
+ type: object
+ nullable: true
+ type: array
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - code_interpreter_call
+ type: string
+ required:
+ - type
+ - id
+ - code
+ - outputs
+ - status
+ - container_id
+ type: object
+ CodeInterpreterServerTool:
+ description: Code interpreter tool configuration
+ example:
+ container: auto
+ type: code_interpreter
+ properties:
+ container:
+ anyOf:
+ - type: string
+ - properties:
+ file_ids:
+ items:
+ type: string
+ type: array
+ memory_limit:
+ enum:
+ - 1g
+ - 4g
+ - 16g
+ - 64g
+ - null
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - auto
+ type: string
+ required:
+ - type
+ type: object
+ type:
+ enum:
+ - code_interpreter
+ type: string
+ required:
+ - type
+ - container
+ type: object
+ CodexLocalShellTool:
+ description: Local shell tool configuration
+ example:
+ type: local_shell
+ properties:
+ type:
+ enum:
+ - local_shell
+ type: string
+ required:
+ - type
+ type: object
+ CompletedEvent:
+ 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:
+ - content:
+ - annotations: []
+ text: Hello! How can I help you?
+ type: output_text
+ id: item-1
+ role: assistant
+ status: completed
+ type: message
+ parallel_tool_calls: true
+ status: completed
+ temperature: null
+ tool_choice: auto
+ tools: []
+ top_p: null
+ sequence_number: 10
+ type: response.completed
+ properties:
+ response:
+ $ref: '#/components/schemas/BaseResponsesResult'
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.completed
+ type: string
+ required:
+ - type
+ - response
+ - sequence_number
+ type: object
+ CompoundFilter:
+ description: A compound filter that combines multiple comparison or compound filters
+ example:
+ filters:
+ - key: author
+ type: eq
+ value: Alice
+ type: and
+ properties:
+ filters:
+ items:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: array
+ type:
+ enum:
+ - and
+ - or
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - type
+ - filters
+ type: object
+ ComputerUseServerTool:
+ description: Computer use preview tool configuration
+ example:
+ display_height: 768
+ display_width: 1024
+ environment: linux
+ type: computer_use_preview
+ properties:
+ display_height:
+ type: integer
+ display_width:
+ type: integer
+ environment:
+ enum:
+ - windows
+ - mac
+ - linux
+ - ubuntu
+ - browser
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - computer_use_preview
+ type: string
+ required:
+ - type
+ - display_height
+ - display_width
+ - environment
+ type: object
+ ConflictResponse:
+ description: Conflict - Resource conflict or concurrent modification
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ properties:
+ error:
+ $ref: '#/components/schemas/ConflictResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ ConflictResponseErrorData:
+ description: Error data for ConflictResponse
+ example:
+ code: 409
+ message: Resource conflict. Please try again later.
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
ContentPartAddedEvent:
allOf:
- $ref: '#/components/schemas/BaseContentPartAddedEvent'
- - type: object
- properties:
+ - properties:
part:
anyOf:
- $ref: '#/components/schemas/ResponseOutputText'
- $ref: '#/components/schemas/ReasoningTextContent'
- $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ type: object
description: Event emitted when a new content part is added to an output item
example:
- type: response.content_part.added
- output_index: 0
- item_id: item-1
content_index: 0
+ item_id: item-1
+ output_index: 0
part:
- type: output_text
+ annotations: []
text: ''
- annotations: []
- sequence_number: 3
- BaseContentPartDoneEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.content_part.done
- output_index:
- type: number
- item_id:
- type: string
- content_index:
- type: number
- part:
- anyOf:
- - $ref: '#/components/schemas/ResponseOutputText'
- - $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
- sequence_number:
- type: number
- required:
- - type
- - output_index
- - item_id
- - content_index
- - part
- - sequence_number
- description: Event emitted when a content part is complete
- example:
- type: response.content_part.done
- output_index: 0
- item_id: item-1
- content_index: 0
- part:
type: output_text
- text: Hello! How can I help you?
- annotations: []
- sequence_number: 7
+ sequence_number: 3
+ type: response.content_part.added
ContentPartDoneEvent:
allOf:
- $ref: '#/components/schemas/BaseContentPartDoneEvent'
- - type: object
- properties:
+ - properties:
part:
anyOf:
- $ref: '#/components/schemas/ResponseOutputText'
- $ref: '#/components/schemas/ReasoningTextContent'
- $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ type: object
description: Event emitted when a content part is complete
example:
- type: response.content_part.done
- output_index: 0
- item_id: item-1
content_index: 0
+ item_id: item-1
+ output_index: 0
part:
- type: output_text
- text: Hello! How can I help you?
annotations: []
+ text: Hello! How can I help you?
+ type: output_text
sequence_number: 7
- OpenResponsesTopLogprobs:
- type: object
- properties:
- token:
- type: string
- logprob:
- type: number
- bytes:
- type: array
- items:
- type: number
- description: Alternative token with its log probability
+ type: response.content_part.done
+ ContentPartImage:
example:
- token: hello
- logprob: -0.5
- OpenResponsesLogProbs:
- type: object
+ image_url:
+ url: https://example.com/image.png
+ type: image_url
properties:
- logprob:
- type: number
- token:
- type: string
- top_logprobs:
- type: array
- items:
- $ref: '#/components/schemas/OpenResponsesTopLogprobs'
- bytes:
- type: array
- items:
- type: number
- required:
- - logprob
- - token
- description: Log probability information for a token
- example:
- logprob: -0.1
- token: world
- top_logprobs:
- - token: hello
- logprob: -0.5
- BaseTextDeltaEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.output_text.delta
- logprobs:
- type: array
- items:
- $ref: '#/components/schemas/OpenResponsesLogProbs'
- output_index:
- type: number
- item_id:
- type: string
- content_index:
- type: number
- delta:
- type: string
- sequence_number:
- type: number
- required:
- - type
- - logprobs
- - output_index
- - item_id
- - content_index
- - delta
- - sequence_number
- description: Event emitted when a text delta is streamed
- example:
- type: response.output_text.delta
- logprobs: []
- output_index: 0
- item_id: item-1
- content_index: 0
- delta: Hello
- sequence_number: 4
- TextDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseTextDeltaEvent'
- - type: object
+ image_url:
properties:
- logprobs:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/OpenResponsesLogProbs'
- - type: object
- properties:
- top_logprobs:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/OpenResponsesTopLogprobs'
- - type: object
- properties: {}
- description: Alternative token with its log probability
- example:
- token: hello
- logprob: -0.5
- description: Log probability information for a token
- example:
- logprob: -0.1
- token: world
- top_logprobs:
- - token: hello
- logprob: -0.5
- description: Event emitted when a text delta is streamed
- example:
- type: response.output_text.delta
- logprobs: []
- output_index: 0
- item_id: item-1
- content_index: 0
- delta: Hello
- sequence_number: 4
- BaseTextDoneEvent:
- type: object
- properties:
+ url:
+ type: string
+ required:
+ - url
+ type: object
type:
- type: string
enum:
- - response.output_text.done
- output_index:
- type: number
- item_id:
+ - image_url
type: string
- content_index:
- type: number
- text:
+ required:
+ - type
+ - image_url
+ type: object
+ ContextCompressionEngine:
+ description: The compression engine to use. Defaults to "middle-out".
+ enum:
+ - middle-out
+ example: middle-out
+ type: string
+ ContextCompressionPlugin:
+ example:
+ enabled: true
+ engine: middle-out
+ id: context-compression
+ properties:
+ enabled:
+ description: Set to false to disable the context-compression plugin for this request. Defaults to true.
+ type: boolean
+ engine:
+ $ref: '#/components/schemas/ContextCompressionEngine'
+ id:
+ enum:
+ - context-compression
type: string
+ required:
+ - id
+ type: object
+ CreatedEvent:
+ description: Event emitted when a response is created
+ 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
+ properties:
+ response:
+ $ref: '#/components/schemas/BaseResponsesResult'
sequence_number:
- type: number
- logprobs:
- type: array
+ type: integer
+ type:
+ enum:
+ - response.created
+ type: string
+ required:
+ - type
+ - response
+ - sequence_number
+ type: object
+ CreateGuardrailRequest:
+ example:
+ 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
+ properties:
+ allowed_models:
+ description: Array of model identifiers (slug or canonical_slug accepted)
+ example:
+ - openai/gpt-5.2
+ - anthropic/claude-4.5-opus-20251124
+ - deepseek/deepseek-r1-0528:free
items:
- $ref: '#/components/schemas/OpenResponsesLogProbs'
- required:
- - type
- - output_index
- - item_id
- - content_index
- - text
- - sequence_number
- - logprobs
- description: Event emitted when text streaming is complete
- example:
- type: response.output_text.done
- output_index: 0
- item_id: item-1
- content_index: 0
- text: Hello! How can I help you?
- sequence_number: 6
- logprobs: []
- TextDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseTextDoneEvent'
- - type: object
- properties:
- logprobs:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/OpenResponsesLogProbs'
- - type: object
- properties:
- top_logprobs:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/OpenResponsesTopLogprobs'
- - type: object
- properties: {}
- description: Alternative token with its log probability
- example:
- token: hello
- logprob: -0.5
- description: Log probability information for a token
- example:
- logprob: -0.1
- token: world
- top_logprobs:
- - token: hello
- logprob: -0.5
- description: Event emitted when text streaming is complete
- example:
- type: response.output_text.done
- output_index: 0
- item_id: item-1
- content_index: 0
- text: Hello! How can I help you?
- sequence_number: 6
- logprobs: []
- BaseRefusalDeltaEvent:
- type: object
- properties:
- type:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ allowed_providers:
+ description: List of allowed provider IDs
+ example:
+ - openai
+ - anthropic
+ - deepseek
+ items:
+ type: string
+ minItems: 1
+ nullable: true
+ type: array
+ description:
+ description: Description of the guardrail
+ example: A guardrail for limiting API usage
+ maxLength: 1000
+ nullable: true
type: string
- enum:
- - response.refusal.delta
- output_index:
- type: number
- item_id:
- type: string
- content_index:
- type: number
- delta:
- type: string
- sequence_number:
- type: number
- required:
- - type
- - output_index
- - item_id
- - content_index
- - delta
- - sequence_number
- description: Event emitted when a refusal delta is streamed
- example:
- type: response.refusal.delta
- output_index: 0
- item_id: item-1
- content_index: 0
- delta: I'm sorry
- sequence_number: 4
- RefusalDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseRefusalDeltaEvent'
- - type: object
- properties: {}
- description: Event emitted when a refusal delta is streamed
- example:
- type: response.refusal.delta
- output_index: 0
- item_id: item-1
- content_index: 0
- delta: I'm sorry
- sequence_number: 4
- BaseRefusalDoneEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.refusal.done
- output_index:
- type: number
- item_id:
- type: string
- content_index:
- type: number
- refusal:
- type: string
- sequence_number:
- type: number
- required:
- - type
- - output_index
- - item_id
- - content_index
- - refusal
- - sequence_number
- description: Event emitted when refusal streaming is complete
- example:
- type: response.refusal.done
- output_index: 0
- item_id: item-1
- content_index: 0
- refusal: I'm sorry, but I can't assist with that request.
- sequence_number: 6
- RefusalDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseRefusalDoneEvent'
- - type: object
- properties: {}
- description: Event emitted when refusal streaming is complete
- example:
- type: response.refusal.done
- output_index: 0
- item_id: item-1
- content_index: 0
- refusal: I'm sorry, but I can't assist with that request.
- sequence_number: 6
- BaseAnnotationAddedEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.output_text.annotation.added
- output_index:
- type: number
- item_id:
- type: string
- content_index:
- type: number
- sequence_number:
- type: number
- annotation_index:
- type: number
- annotation:
- $ref: '#/components/schemas/OpenAIResponsesAnnotation'
- required:
- - type
- - output_index
- - item_id
- - content_index
- - sequence_number
- - annotation_index
- - annotation
- description: Event emitted when a text annotation is added to output
- example:
- type: response.output_text.annotation.added
- output_index: 0
- item_id: item-1
- content_index: 0
- sequence_number: 5
- annotation_index: 0
- annotation:
- type: url_citation
- url: https://example.com
- title: Example
- start_index: 0
- end_index: 7
- AnnotationAddedEvent:
- allOf:
- - $ref: '#/components/schemas/BaseAnnotationAddedEvent'
- - type: object
- properties: {}
- description: Event emitted when a text annotation is added to output
- example:
- type: response.output_text.annotation.added
- output_index: 0
- item_id: item-1
- content_index: 0
- sequence_number: 5
- annotation_index: 0
- annotation:
- type: url_citation
- url: https://example.com
- title: Example
- start_index: 0
- end_index: 7
- BaseFunctionCallArgsDeltaEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.function_call_arguments.delta
- item_id:
- type: string
- output_index:
- type: number
- delta:
- type: string
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - delta
- - sequence_number
- description: Event emitted when function call arguments are being streamed
- example:
- type: response.function_call_arguments.delta
- item_id: item-1
- output_index: 0
- delta: '{"city": "San'
- sequence_number: 4
- FunctionCallArgsDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent'
- - type: object
- properties: {}
- description: Event emitted when function call arguments are being streamed
- example:
- type: response.function_call_arguments.delta
- item_id: item-1
- output_index: 0
- delta: '{"city": "San'
- sequence_number: 4
- BaseFunctionCallArgsDoneEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.function_call_arguments.done
- item_id:
- type: string
- output_index:
+ enforce_zdr:
+ description: Whether to enforce zero data retention
+ example: false
+ 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: Spending limit in USD
+ example: 50
+ format: double
type: number
name:
+ description: Name for the new guardrail
+ example: My New Guardrail
+ maxLength: 200
+ minLength: 1
type: string
- arguments:
- type: string
- sequence_number:
- type: number
+ reset_interval:
+ $ref: '#/components/schemas/GuardrailInterval'
required:
- - type
- - item_id
- - output_index
- name
- - arguments
- - sequence_number
- description: Event emitted when function call arguments streaming is complete
- example:
- type: response.function_call_arguments.done
- item_id: item-1
- output_index: 0
- name: get_weather
- arguments: '{"city": "San Francisco", "units": "celsius"}'
- sequence_number: 6
- FunctionCallArgsDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseFunctionCallArgsDoneEvent'
- - type: object
- properties: {}
- description: Event emitted when function call arguments streaming is complete
- example:
- type: response.function_call_arguments.done
- item_id: item-1
- output_index: 0
- name: get_weather
- arguments: '{"city": "San Francisco", "units": "celsius"}'
- sequence_number: 6
- BaseReasoningDeltaEvent:
type: object
+ CreateGuardrailResponse:
+ example:
+ data:
+ allowed_models: null
+ allowed_providers:
+ - openai
+ - anthropic
+ - google
+ created_at: '2025-08-24T10:30:00Z'
+ description: A guardrail for limiting API usage
+ enforce_zdr: false
+ id: 550e8400-e29b-41d4-a716-446655440000
+ ignored_models: null
+ ignored_providers: null
+ limit_usd: 50
+ name: My New Guardrail
+ reset_interval: monthly
+ updated_at: null
properties:
+ data:
+ allOf:
+ - $ref: '#/components/schemas/Guardrail'
+ - description: The created guardrail
+ required:
+ - data
+ type: object
+ CustomTool:
+ description: Custom tool configuration
+ example:
+ name: my_tool
+ type: custom
+ properties:
+ description:
+ type: string
+ format:
+ anyOf:
+ - properties:
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ definition:
+ type: string
+ syntax:
+ enum:
+ - lark
+ - regex
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - grammar
+ type: string
+ required:
+ - type
+ - definition
+ - syntax
+ type: object
+ name:
+ type: string
type:
- type: string
enum:
- - response.reasoning_text.delta
- output_index:
- type: number
- item_id:
+ - custom
type: string
- content_index:
- type: number
- delta:
- type: string
- sequence_number:
- type: number
required:
- type
- - output_index
- - item_id
- - content_index
- - delta
- - sequence_number
- description: Event emitted when reasoning text delta is streamed
- example:
- type: response.reasoning_text.delta
- output_index: 0
- item_id: item-1
- content_index: 0
- delta: First, we need
- sequence_number: 4
- ReasoningDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningDeltaEvent'
- - type: object
- properties: {}
- description: Event emitted when reasoning text delta is streamed
- example:
- type: response.reasoning_text.delta
- output_index: 0
- item_id: item-1
- content_index: 0
- delta: First, we need
- sequence_number: 4
- BaseReasoningDoneEvent:
+ - name
type: object
+ DatetimeServerTool:
+ description: 'OpenRouter built-in server tool: returns the current date and time'
+ example:
+ parameters:
+ timezone: America/New_York
+ type: openrouter:datetime
properties:
+ parameters:
+ $ref: '#/components/schemas/DatetimeServerToolConfig'
type:
- type: string
enum:
- - response.reasoning_text.done
- output_index:
- type: number
- item_id:
+ - openrouter:datetime
type: string
- content_index:
- type: number
- text:
- type: string
- sequence_number:
- type: number
required:
- type
- - output_index
- - item_id
- - content_index
- - text
- - sequence_number
- description: Event emitted when reasoning text streaming is complete
- example:
- type: response.reasoning_text.done
- output_index: 0
- item_id: item-1
- content_index: 0
- text: First, we need to identify the key components and then combine them logically.
- sequence_number: 6
- ReasoningDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningDoneEvent'
- - type: object
- properties: {}
- description: Event emitted when reasoning text streaming is complete
- example:
- type: response.reasoning_text.done
- output_index: 0
- item_id: item-1
- content_index: 0
- text: First, we need to identify the key components and then combine them logically.
- sequence_number: 6
- BaseReasoningSummaryPartAddedEvent:
type: object
+ DatetimeServerToolConfig:
+ description: Configuration for the openrouter:datetime server tool
+ example:
+ timezone: America/New_York
properties:
+ timezone:
+ description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC.
+ example: America/New_York
+ type: string
+ type: object
+ DefaultParameters:
+ additionalProperties: false
+ description: Default parameters for this model
+ example:
+ frequency_penalty: 0
+ presence_penalty: 0
+ repetition_penalty: 1
+ temperature: 0.7
+ top_k: 0
+ top_p: 0.9
+ nullable: true
+ properties:
+ frequency_penalty:
+ format: double
+ type: number
+ presence_penalty:
+ format: double
+ type: number
+ repetition_penalty:
+ format: double
+ type: number
+ temperature:
+ format: double
+ type: number
+ top_k:
+ minimum: 0
+ nullable: true
+ type: integer
+ top_p:
+ format: double
+ type: number
+ type: object
+ DeleteGuardrailResponse:
+ example:
+ deleted: true
+ properties:
+ deleted:
+ const: true
+ description: Confirmation that the guardrail was deleted
+ example: true
+ type: boolean
+ required:
+ - deleted
+ type: object
+ DeprecatedRoute:
+ deprecated: true
+ description: >-
+ **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
+ enum:
+ - fallback
+ - sort
+ - null
+ example: fallback
+ nullable: true
+ type: string
+ x-fern-ignore: true
+ x-speakeasy-deprecation-message: Use providers.sort.partition instead.
+ x-speakeasy-ignore: true
+ x-speakeasy-unknown-values: allow
+ EasyInputMessage:
+ example:
+ content: What is the weather today?
+ role: user
+ properties:
+ content:
+ anyOf:
+ - items:
+ oneOf:
+ - $ref: '#/components/schemas/InputText'
+ - allOf:
+ - $ref: '#/components/schemas/InputImage'
+ - properties: {}
+ type: object
+ description: Image input content item
+ example:
+ detail: auto
+ image_url: https://example.com/image.jpg
+ type: input_image
+ - $ref: '#/components/schemas/InputFile'
+ - $ref: '#/components/schemas/InputAudio'
+ - $ref: '#/components/schemas/InputVideo'
+ type: array
+ - type: string
+ - nullable: true
+ phase:
+ anyOf:
+ - enum:
+ - commentary
+ type: string
+ - enum:
+ - final_answer
+ type: string
+ - nullable: true
+ description: >-
+ The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.
+ example: final_answer
+ role:
+ anyOf:
+ - enum:
+ - user
+ type: string
+ - enum:
+ - system
+ type: string
+ - enum:
+ - assistant
+ type: string
+ - enum:
+ - developer
+ type: string
type:
- type: string
enum:
- - response.reasoning_summary_part.added
- output_index:
- type: number
- item_id:
+ - message
type: string
- summary_index:
- type: number
- part:
- $ref: '#/components/schemas/ReasoningSummaryText'
- sequence_number:
- type: number
required:
- - type
- - output_index
- - item_id
- - summary_index
- - part
- - sequence_number
- description: Event emitted when a reasoning summary part is added
- example:
- type: response.reasoning_summary_part.added
- output_index: 0
- item_id: item-1
- summary_index: 0
- part:
- type: summary_text
- text: ''
- sequence_number: 3
- ReasoningSummaryPartAddedEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent'
- - type: object
- properties: {}
- description: Event emitted when a reasoning summary part is added
- example:
- type: response.reasoning_summary_part.added
- output_index: 0
- item_id: item-1
- summary_index: 0
- part:
- type: summary_text
- text: ''
- sequence_number: 3
- BaseReasoningSummaryPartDoneEvent:
+ - role
type: object
- properties:
- type:
- type: string
- enum:
- - response.reasoning_summary_part.done
- output_index:
- type: number
- item_id:
- type: string
- summary_index:
- type: number
- part:
- $ref: '#/components/schemas/ReasoningSummaryText'
- sequence_number:
- type: number
- required:
- - type
- - output_index
- - item_id
- - summary_index
- - part
- - sequence_number
- description: Event emitted when a reasoning summary part is complete
- example:
- type: response.reasoning_summary_part.done
- output_index: 0
- item_id: item-1
- summary_index: 0
- part:
- type: summary_text
- text: Analyzing the problem step by step to find the optimal solution.
- sequence_number: 7
- ReasoningSummaryPartDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent'
- - type: object
- properties: {}
- description: Event emitted when a reasoning summary part is complete
- example:
- type: response.reasoning_summary_part.done
- output_index: 0
- item_id: item-1
- summary_index: 0
- part:
- type: summary_text
- text: Analyzing the problem step by step to find the optimal solution.
- sequence_number: 7
- BaseReasoningSummaryTextDeltaEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.reasoning_summary_text.delta
- item_id:
- type: string
- output_index:
- type: number
- summary_index:
- type: number
- delta:
- type: string
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - summary_index
- - delta
- - sequence_number
- description: Event emitted when reasoning summary text delta is streamed
- example:
- type: response.reasoning_summary_text.delta
- item_id: item-1
- output_index: 0
- summary_index: 0
- delta: Analyzing
- sequence_number: 4
- ReasoningSummaryTextDeltaEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent'
- - type: object
- properties: {}
- description: Event emitted when reasoning summary text delta is streamed
- example:
- type: response.reasoning_summary_text.delta
- item_id: item-1
- output_index: 0
- summary_index: 0
- delta: Analyzing
- sequence_number: 4
- BaseReasoningSummaryTextDoneEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.reasoning_summary_text.done
- item_id:
- type: string
- output_index:
- type: number
- summary_index:
- type: number
- text:
- type: string
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - summary_index
- - text
- - sequence_number
- description: Event emitted when reasoning summary text streaming is complete
- example:
- type: response.reasoning_summary_text.done
- item_id: item-1
- output_index: 0
- summary_index: 0
- text: Analyzing the problem step by step to find the optimal solution.
- sequence_number: 6
- ReasoningSummaryTextDoneEvent:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent'
- - type: object
- properties: {}
- description: Event emitted when reasoning summary text streaming is complete
- example:
- type: response.reasoning_summary_text.done
- item_id: item-1
- output_index: 0
- summary_index: 0
- text: Analyzing the problem step by step to find the optimal solution.
- sequence_number: 6
- OpenAIResponsesImageGenCallInProgress:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.image_generation_call.in_progress
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- ImageGenCallInProgressEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesImageGenCallInProgress'
- - type: object
- properties: {}
- description: Image generation call in progress
- example:
- type: response.image_generation_call.in_progress
- output_index: 0
- sequence_number: 1
- item_id: call-123
- OpenAIResponsesImageGenCallGenerating:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.image_generation_call.generating
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- ImageGenCallGeneratingEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesImageGenCallGenerating'
- - type: object
- properties: {}
- description: Image generation call is generating
- example:
- type: response.image_generation_call.generating
- output_index: 0
- sequence_number: 2
- item_id: call-123
- OpenAIResponsesImageGenCallPartialImage:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.image_generation_call.partial_image
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- partial_image_b64:
- type: string
- partial_image_index:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- - partial_image_b64
- - partial_image_index
- ImageGenCallPartialImageEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesImageGenCallPartialImage'
- - type: object
- properties: {}
- description: Image generation call with partial image
- example:
- type: response.image_generation_call.partial_image
- output_index: 0
- sequence_number: 3
- item_id: call-123
- partial_image_b64: base64encodedimage...
- partial_image_index: 0
- OpenAIResponsesImageGenCallCompleted:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.image_generation_call.completed
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- ImageGenCallCompletedEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted'
- - type: object
- properties: {}
- description: Image generation call completed
- example:
- type: response.image_generation_call.completed
- output_index: 0
- sequence_number: 4
- item_id: call-123
- OpenAIResponsesWebSearchCallInProgress:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.web_search_call.in_progress
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- WebSearchCallInProgressEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress'
- - type: object
- properties: {}
- description: Web search call in progress
- example:
- type: response.web_search_call.in_progress
- output_index: 0
- sequence_number: 1
- item_id: ws-123
- OpenAIResponsesWebSearchCallSearching:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.web_search_call.searching
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- WebSearchCallSearchingEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching'
- - type: object
- properties: {}
- description: Web search call is searching
- example:
- type: response.web_search_call.searching
- output_index: 0
- sequence_number: 2
- item_id: ws-123
- OpenAIResponsesSearchCompleted:
- type: object
- properties:
- type:
- type: string
- enum:
- - response.web_search_call.completed
- item_id:
- type: string
- output_index:
- type: number
- sequence_number:
- type: number
- required:
- - type
- - item_id
- - output_index
- - sequence_number
- WebSearchCallCompletedEvent:
- allOf:
- - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted'
- - type: object
- properties: {}
- description: Web search call completed
- example:
- type: response.web_search_call.completed
- output_index: 0
- sequence_number: 3
- item_id: ws-123
- StreamEvents:
- oneOf:
- - allOf:
- - $ref: '#/components/schemas/CreatedEvent'
- - type: object
- properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
- description: Event emitted when a response is created
- example:
- type: response.created
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: in_progress
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 0
- - allOf:
- - $ref: '#/components/schemas/InProgressEvent'
- - type: object
- properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
- description: Event emitted when a response is in progress
- example:
- type: response.in_progress
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: in_progress
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 1
- - allOf:
- - $ref: '#/components/schemas/CompletedEvent'
- - type: object
- properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
- description: Event emitted when a response has completed successfully
- example:
- type: response.completed
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: completed
- output:
- - id: item-1
- type: message
- status: completed
- role: assistant
- content:
- - type: output_text
- text: Hello! How can I help you?
- annotations: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 10
- - allOf:
- - $ref: '#/components/schemas/IncompleteEvent'
- - type: object
- properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
- description: Event emitted when a response is incomplete
- example:
- type: response.incomplete
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: incomplete
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 5
- - allOf:
- - $ref: '#/components/schemas/FailedEvent'
- - type: object
- properties:
- response:
- $ref: '#/components/schemas/OpenResponsesResult'
- description: Event emitted when a response has failed
- example:
- type: response.failed
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: failed
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 3
- - $ref: '#/components/schemas/ErrorEvent'
- - allOf:
- - $ref: '#/components/schemas/OutputItemAddedEvent'
- - type: object
- properties:
- item:
- $ref: '#/components/schemas/OutputItems'
- description: Event emitted when a new output item is added to the response
- example:
- type: response.output_item.added
- output_index: 0
- item:
- id: item-1
- type: message
- status: in_progress
- role: assistant
- content: []
- sequence_number: 2
- - allOf:
- - $ref: '#/components/schemas/OutputItemDoneEvent'
- - type: object
- properties:
- item:
- $ref: '#/components/schemas/OutputItems'
- description: Event emitted when an output item is complete
- example:
- type: response.output_item.done
- output_index: 0
- item:
- id: item-1
- type: message
- status: completed
- role: assistant
- content:
- - type: output_text
- text: Hello! How can I help you?
- annotations: []
- sequence_number: 8
- - $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'
- description: Union of all possible event types emitted during response streaming
- example:
- type: response.created
- response:
- id: resp-abc123
- object: response
- created_at: 1704067200
- model: gpt-4
- status: in_progress
- output: []
- tools: []
- tool_choice: auto
- parallel_tool_calls: true
- error: null
- incomplete_details: null
- metadata: null
- instructions: null
- temperature: null
- top_p: null
- max_output_tokens: null
- sequence_number: 0
- BadRequestResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for BadRequestResponse
- example:
- code: 400
- message: Invalid request parameters
- BadRequestResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/BadRequestResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Bad Request - Invalid request parameters or malformed input
- example:
- error:
- code: 400
- message: Invalid request parameters
- UnauthorizedResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for UnauthorizedResponse
- example:
- code: 401
- message: Missing Authentication header
- UnauthorizedResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/UnauthorizedResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Unauthorized - Authentication required or invalid credentials
- example:
- error:
- code: 401
- message: Missing Authentication header
- PaymentRequiredResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for PaymentRequiredResponse
- example:
- code: 402
- message: Insufficient credits. Add more using https://openrouter.ai/credits
- PaymentRequiredResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/PaymentRequiredResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Payment Required - Insufficient credits or quota to complete request
- example:
- error:
- code: 402
- message: Insufficient credits. Add more using https://openrouter.ai/credits
- NotFoundResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for NotFoundResponse
- example:
- code: 404
- message: Resource not found
- NotFoundResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/NotFoundResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Not Found - Resource does not exist
- example:
- error:
- code: 404
- message: Resource not found
- RequestTimeoutResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for RequestTimeoutResponse
- example:
- code: 408
- message: Operation timed out. Please try again later.
- RequestTimeoutResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/RequestTimeoutResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Request Timeout - Operation exceeded time limit
- example:
- error:
- code: 408
- message: Operation timed out. Please try again later.
- GoneResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for GoneResponse
- example:
- 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.
- GoneResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/GoneResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- 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.
- PayloadTooLargeResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for PayloadTooLargeResponse
- example:
- code: 413
- message: Request payload too large
- PayloadTooLargeResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/PayloadTooLargeResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Payload Too Large - Request payload exceeds size limits
- example:
- error:
- code: 413
- message: Request payload too large
- UnprocessableEntityResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for UnprocessableEntityResponse
- example:
- code: 422
- message: Invalid argument
- UnprocessableEntityResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/UnprocessableEntityResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Unprocessable Entity - Semantic validation failure
- example:
- error:
- code: 422
- message: Invalid argument
- TooManyRequestsResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for TooManyRequestsResponse
- example:
- code: 429
- message: Rate limit exceeded
- TooManyRequestsResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/TooManyRequestsResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Too Many Requests - Rate limit exceeded
- example:
- error:
- code: 429
- message: Rate limit exceeded
- InternalServerResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for InternalServerResponse
- example:
- code: 500
- message: Internal Server Error
- InternalServerResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/InternalServerResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Internal Server Error - Unexpected server error
- example:
- error:
- code: 500
- message: Internal Server Error
- BadGatewayResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for BadGatewayResponse
- example:
- code: 502
- message: Provider returned error
- BadGatewayResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/BadGatewayResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Bad Gateway - Provider/upstream API failure
- example:
- error:
- code: 502
- message: Provider returned error
- ServiceUnavailableResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for ServiceUnavailableResponse
- example:
- code: 503
- message: Service temporarily unavailable
- ServiceUnavailableResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Service Unavailable - Service temporarily unavailable
- example:
- error:
- code: 503
- message: Service temporarily unavailable
- EdgeNetworkTimeoutResponseErrorData:
- type: object
- properties:
- code:
- type: integer
- message:
- type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
- required:
- - code
- - message
- description: Error data for EdgeNetworkTimeoutResponse
- example:
- code: 524
- message: Request timed out. Please try again later.
EdgeNetworkTimeoutResponse:
- type: object
- properties:
- error:
- $ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
description: Infrastructure Timeout - Provider request timed out at edge network
example:
error:
code: 524
message: Request timed out. Please try again later.
- ProviderOverloadedResponseErrorData:
+ properties:
+ error:
+ $ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
type: object
+ EdgeNetworkTimeoutResponseErrorData:
+ description: Error data for EdgeNetworkTimeoutResponse
+ example:
+ code: 524
+ message: Request timed out. Please try again later.
properties:
code:
type: integer
message:
type: string
metadata:
- type: object
- nullable: true
additionalProperties:
nullable: true
+ nullable: true
+ type: object
required:
- code
- message
- description: Error data for ProviderOverloadedResponse
- example:
- code: 529
- message: Provider returned error
- ProviderOverloadedResponse:
type: object
- properties:
- error:
- $ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Provider Overloaded - Provider is temporarily overloaded
- example:
- error:
- code: 529
- message: Provider returned error
- ReasoningItem:
+ EndpointStatus:
+ enum:
+ - 0
+ - -1
+ - -2
+ - -3
+ - -5
+ - -10
+ example: 0
+ type: integer
+ x-speakeasy-unknown-values: allow
+ ErrorEvent:
allOf:
- - $ref: '#/components/schemas/OutputItemReasoning'
- - type: object
- properties:
- content:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/ReasoningTextContent'
- signature:
- type: string
- nullable: true
- format:
- type: string
- nullable: true
- enum:
- - unknown
- - openai-responses-v1
- - azure-openai-responses-v1
- - xai-responses-v1
- - anthropic-claude-v1
- - google-gemini-v1
- x-speakeasy-unknown-values: allow
+ - $ref: '#/components/schemas/BaseErrorEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when an error occurs during streaming
example:
- type: reasoning
- id: reasoning-abc123
- summary:
- - type: summary_text
- text: Step by step analysis
- description: Reasoning output item with signature and format extensions
- InputVideo:
- type: object
+ code: rate_limit_exceeded
+ message: Rate limit exceeded. Please try again later.
+ param: null
+ sequence_number: 2
+ type: error
+ FailedEvent:
+ 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
properties:
+ response:
+ $ref: '#/components/schemas/BaseResponsesResult'
+ sequence_number:
+ type: integer
type:
- type: string
enum:
- - input_video
- video_url:
+ - response.failed
type: string
- description: A base64 data URL or remote URL that resolves to a video file
required:
- type
- - video_url
- description: Video input content item
+ - response
+ - sequence_number
+ type: object
+ FileCitation:
example:
- type: input_video
- video_url: https://example.com/video.mp4
- EasyInputMessage:
- type: object
+ file_id: file-abc123
+ filename: research_paper.pdf
+ index: 0
+ type: file_citation
properties:
- type:
+ file_id:
type: string
+ filename:
+ type: string
+ index:
+ type: integer
+ type:
enum:
- - message
- role:
- anyOf:
- - type: string
- enum:
- - user
- - type: string
- enum:
- - system
- - type: string
- enum:
- - assistant
- - type: string
- enum:
- - developer
- content:
- anyOf:
- - type: array
- items:
- oneOf:
- - $ref: '#/components/schemas/InputText'
- - allOf:
- - $ref: '#/components/schemas/InputImage'
- - type: object
- properties: {}
- description: Image input content item
- example:
- type: input_image
- detail: auto
- image_url: https://example.com/image.jpg
- - $ref: '#/components/schemas/InputFile'
- - $ref: '#/components/schemas/InputAudio'
- - $ref: '#/components/schemas/InputVideo'
- - type: string
- - nullable: true
- phase:
- anyOf:
- - type: string
- enum:
- - commentary
- - type: string
- enum:
- - final_answer
- - nullable: true
- description: >-
- The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.
- example: final_answer
+ - file_citation
+ type: string
required:
- - role
- InputMessageItem:
+ - type
+ - file_id
+ - filename
+ - index
type: object
+ FileParserPlugin:
+ example:
+ enabled: true
+ id: file-parser
+ pdf:
+ engine: cloudflare-ai
properties:
+ enabled:
+ description: Set to false to disable the file-parser plugin for this request. Defaults to true.
+ type: boolean
id:
+ enum:
+ - file-parser
+ type: string
+ pdf:
+ $ref: '#/components/schemas/PDFParserOptions'
+ required:
+ - id
+ type: object
+ FilePath:
+ example:
+ file_id: file-xyz789
+ index: 0
+ type: file_path
+ properties:
+ file_id:
+ type: string
+ index:
+ type: integer
+ type:
+ enum:
+ - file_path
+ type: string
+ required:
+ - type
+ - file_id
+ - index
+ type: object
+ FileSearchServerTool:
+ description: File search tool configuration
+ example:
+ type: file_search
+ vector_store_ids:
+ - vs_abc123
+ properties:
+ filters:
+ anyOf:
+ - properties:
+ key:
+ type: string
+ type:
+ enum:
+ - eq
+ - ne
+ - gt
+ - gte
+ - lt
+ - lte
+ type: string
+ x-speakeasy-unknown-values: allow
+ value:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ - type: boolean
+ - items:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ type: array
+ required:
+ - key
+ - type
+ - value
+ type: object
+ - $ref: '#/components/schemas/CompoundFilter'
+ - nullable: true
+ max_num_results:
+ type: integer
+ ranking_options:
+ properties:
+ ranker:
+ enum:
+ - auto
+ - default-2024-11-15
+ type: string
+ x-speakeasy-unknown-values: allow
+ score_threshold:
+ format: double
+ type: number
+ type: object
+ type:
+ enum:
+ - file_search
+ type: string
+ vector_store_ids:
+ items:
+ type: string
+ type: array
+ required:
+ - type
+ - vector_store_ids
+ type: object
+ ForbiddenResponse:
+ description: Forbidden - Authentication successful but insufficient permissions
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ properties:
+ error:
+ $ref: '#/components/schemas/ForbiddenResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ ForbiddenResponseErrorData:
+ description: Error data for ForbiddenResponse
+ example:
+ code: 403
+ message: Only management keys can perform this operation
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ FormatJsonObjectConfig:
+ description: JSON object response format
+ example:
+ type: json_object
+ properties:
+ type:
+ enum:
+ - json_object
+ type: string
+ required:
+ - type
+ type: object
+ FormatJsonSchemaConfig:
+ description: JSON schema constrained response format
+ example:
+ description: User information schema
+ name: user_info
+ schema:
+ properties:
+ age:
+ type: number
+ name:
+ type: string
+ required:
+ - name
+ type: object
+ type: json_schema
+ properties:
+ description:
+ type: string
+ name:
+ type: string
+ schema:
+ additionalProperties:
+ nullable: true
+ type: object
+ strict:
+ nullable: true
+ type: boolean
+ type:
+ enum:
+ - json_schema
+ type: string
+ required:
+ - type
+ - name
+ - schema
+ type: object
+ Formats:
+ anyOf:
+ - $ref: '#/components/schemas/FormatTextConfig'
+ - $ref: '#/components/schemas/FormatJsonObjectConfig'
+ - $ref: '#/components/schemas/FormatJsonSchemaConfig'
+ description: Text response format configuration
+ example:
+ type: text
+ FormatTextConfig:
+ description: Plain text response format
+ example:
+ type: text
+ properties:
+ type:
+ enum:
+ - text
+ type: string
+ required:
+ - type
+ type: object
+ FrameImage:
+ allOf:
+ - $ref: '#/components/schemas/ContentPartImage'
+ - properties:
+ frame_type:
+ description: Whether this image represents the first or last frame of the video
+ enum:
+ - first_frame
+ - last_frame
+ example: first_frame
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - frame_type
+ type: object
+ example:
+ image_url:
+ url: https://example.com/image.png
+ type: image_url
+ FunctionCallArgsDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when function call arguments are being streamed
+ example:
+ delta: '{"city": "..."}'
+ item_id: item-1
+ output_index: 0
+ sequence_number: 4
+ type: response.function_call_arguments.delta
+ FunctionCallArgsDoneEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseFunctionCallArgsDoneEvent'
+ - properties: {}
+ type: object
+ description: Event emitted when function call arguments streaming is complete
+ example:
+ arguments: '{"city": "San Francisco", "units": "celsius"}'
+ item_id: item-1
+ name: get_weather
+ output_index: 0
+ sequence_number: 6
+ type: response.function_call_arguments.done
+ FunctionCallItem:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponseFunctionToolCall'
+ - properties: {}
+ required:
+ - id
+ type: object
+ description: A function call initiated by the model
+ example:
+ arguments: '{"location":"San Francisco"}'
+ call_id: call-abc123
+ id: call-abc123
+ name: get_weather
+ status: completed
+ type: function_call
+ FunctionCallOutputItem:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponseFunctionToolCallOutput'
+ - properties:
+ output:
+ anyOf:
+ - type: string
+ - items:
+ oneOf:
+ - $ref: '#/components/schemas/InputText'
+ - allOf:
+ - $ref: '#/components/schemas/InputImage'
+ - properties: {}
+ type: object
+ description: Image input content item
+ example:
+ detail: auto
+ image_url: https://example.com/image.jpg
+ type: input_image
+ - $ref: '#/components/schemas/InputFile'
+ type: array
+ type: object
+ description: The output from a function call execution
+ example:
+ call_id: call-abc123
+ id: output-abc123
+ output: '{"temperature":72,"conditions":"sunny"}'
+ status: completed
+ type: function_call_output
+ FunctionTool:
+ 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
+ properties:
+ description:
+ nullable: true
+ type: string
+ name:
+ type: string
+ parameters:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ strict:
+ nullable: true
+ type: boolean
+ type:
+ enum:
+ - function
+ type: string
+ required:
+ - type
+ - name
+ - parameters
+ type: object
+ GetGuardrailResponse:
+ 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'
+ 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
+ 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'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ GoneResponseErrorData:
+ description: Error data for GoneResponse
+ example:
+ 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:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ Guardrail:
+ example:
+ 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'
+ properties:
+ allowed_models:
+ description: Array of model canonical_slugs (immutable identifiers)
+ example:
+ - openai/gpt-5.2-20251211
+ - anthropic/claude-4.5-opus-20251124
+ - deepseek/deepseek-r1-0528:free
+ items:
+ type: string
+ nullable: true
+ type: array
+ allowed_providers:
+ description: List of allowed provider IDs
+ example:
+ - openai
+ - anthropic
+ - google
+ items:
+ type: string
+ nullable: true
+ type: array
+ created_at:
+ description: ISO 8601 timestamp of when the guardrail was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ description:
+ description: Description of the guardrail
+ example: Guardrail for production environment
+ nullable: true
+ type: string
+ enforce_zdr:
+ description: Whether to enforce zero data retention
+ example: false
+ nullable: true
+ type: boolean
+ id:
+ description: Unique identifier for the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ ignored_models:
+ description: Array of model canonical_slugs to exclude from routing
+ example:
+ - openai/gpt-4o-mini-2024-07-18
+ items:
+ type: string
+ nullable: true
+ type: array
+ ignored_providers:
+ description: List of provider IDs to exclude from routing
+ example:
+ - azure
+ items:
+ type: string
+ nullable: true
+ type: array
+ limit_usd:
+ description: Spending limit in USD
+ example: 100
+ format: double
+ type: number
+ name:
+ description: Name of the guardrail
+ example: Production Guardrail
+ type: string
+ reset_interval:
+ $ref: '#/components/schemas/GuardrailInterval'
+ updated_at:
+ description: ISO 8601 timestamp of when the guardrail was last updated
+ example: '2025-08-24T15:45:00Z'
+ nullable: true
+ type: string
+ required:
+ - id
+ - name
+ - created_at
+ type: object
+ GuardrailInterval:
+ description: Interval at which the limit resets (daily, weekly, monthly)
+ enum:
+ - daily
+ - weekly
+ - monthly
+ - null
+ example: monthly
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ ImageGenCallCompletedEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted'
+ - properties: {}
+ type: object
+ description: Image generation call completed
+ example:
+ item_id: call-123
+ output_index: 0
+ sequence_number: 4
+ type: response.image_generation_call.completed
+ ImageGenCallGeneratingEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesImageGenCallGenerating'
+ - properties: {}
+ type: object
+ description: Image generation call is generating
+ example:
+ item_id: call-123
+ output_index: 0
+ sequence_number: 2
+ type: response.image_generation_call.generating
+ ImageGenCallInProgressEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesImageGenCallInProgress'
+ - properties: {}
+ type: object
+ description: Image generation call in progress
+ example:
+ item_id: call-123
+ output_index: 0
+ sequence_number: 1
+ type: response.image_generation_call.in_progress
+ ImageGenCallPartialImageEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesImageGenCallPartialImage'
+ - properties: {}
+ type: object
+ description: Image generation call with partial image
+ example:
+ item_id: call-123
+ output_index: 0
+ partial_image_b64: base64encodedimage...
+ partial_image_index: 0
+ sequence_number: 3
+ type: response.image_generation_call.partial_image
+ ImageGenerationServerTool:
+ description: Image generation tool configuration
+ example:
+ quality: high
+ type: image_generation
+ properties:
+ background:
+ enum:
+ - transparent
+ - opaque
+ - auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ input_fidelity:
+ enum:
+ - high
+ - low
+ - null
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ input_image_mask:
+ properties:
+ file_id:
+ type: string
+ image_url:
+ type: string
+ type: object
+ model:
+ enum:
+ - gpt-image-1
+ - gpt-image-1-mini
+ type: string
+ x-speakeasy-unknown-values: allow
+ moderation:
+ enum:
+ - auto
+ - low
+ type: string
+ x-speakeasy-unknown-values: allow
+ output_compression:
+ type: integer
+ output_format:
+ enum:
+ - png
+ - webp
+ - jpeg
+ type: string
+ x-speakeasy-unknown-values: allow
+ partial_images:
+ type: integer
+ quality:
+ enum:
+ - low
+ - medium
+ - high
+ - auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ size:
+ enum:
+ - 1024x1024
+ - 1024x1536
+ - 1536x1024
+ - auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - image_generation
+ type: string
+ required:
+ - type
+ type: object
+ ImageGenerationStatus:
+ enum:
+ - in_progress
+ - completed
+ - generating
+ - failed
+ example: completed
+ type: string
+ x-speakeasy-unknown-values: allow
+ IncompleteDetails:
+ example:
+ reason: max_output_tokens
+ nullable: true
+ properties:
+ reason:
+ enum:
+ - max_output_tokens
+ - content_filter
+ type: string
+ x-speakeasy-unknown-values: allow
+ type: object
+ IncompleteEvent:
+ 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
+ properties:
+ response:
+ $ref: '#/components/schemas/BaseResponsesResult'
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.incomplete
+ type: string
+ required:
+ - type
+ - response
+ - sequence_number
+ type: object
+ InProgressEvent:
+ description: Event emitted when a response is in progress
+ 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: 1
+ type: response.in_progress
+ properties:
+ response:
+ $ref: '#/components/schemas/BaseResponsesResult'
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.in_progress
+ type: string
+ required:
+ - type
+ - response
+ - sequence_number
+ type: object
+ InputAudio:
+ description: Audio input content item
+ example:
+ input_audio:
+ data: SGVsbG8gV29ybGQ=
+ format: mp3
+ type: input_audio
+ properties:
+ input_audio:
+ properties:
+ data:
+ type: string
+ format:
+ enum:
+ - mp3
+ - wav
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - data
+ - format
+ type: object
+ type:
+ enum:
+ - input_audio
+ type: string
+ required:
+ - type
+ - input_audio
+ type: object
+ InputFile:
+ description: File input content item
+ example:
+ file_id: file-abc123
+ filename: document.pdf
+ type: input_file
+ properties:
+ file_data:
+ type: string
+ file_id:
+ nullable: true
+ type: string
+ file_url:
+ type: string
+ filename:
type: string
type:
- type: string
enum:
- - message
- role:
- anyOf:
- - type: string
- enum:
- - user
- - type: string
- enum:
- - system
- - type: string
- enum:
- - developer
- content:
- type: array
+ - input_file
+ type: string
+ required:
+ - type
+ type: object
+ InputImage:
+ description: Image input content item
+ example:
+ detail: auto
+ image_url: https://example.com/image.jpg
+ type: input_image
+ properties:
+ detail:
+ enum:
+ - auto
+ - high
+ - low
+ type: string
+ x-speakeasy-unknown-values: allow
+ image_url:
nullable: true
+ type: string
+ type:
+ enum:
+ - input_image
+ type: string
+ required:
+ - type
+ - detail
+ type: object
+ InputMessageItem:
+ example:
+ content:
+ - text: Hello, how are you?
+ type: input_text
+ id: msg-abc123
+ role: user
+ type: message
+ properties:
+ content:
items:
oneOf:
- $ref: '#/components/schemas/InputText'
- allOf:
- $ref: '#/components/schemas/InputImage'
- - type: object
- properties: {}
+ - properties: {}
+ type: object
description: Image input content item
example:
- type: input_image
detail: auto
image_url: https://example.com/image.jpg
+ type: input_image
- $ref: '#/components/schemas/InputFile'
- $ref: '#/components/schemas/InputAudio'
- $ref: '#/components/schemas/InputVideo'
+ nullable: true
+ type: array
+ id:
+ type: string
+ role:
+ anyOf:
+ - enum:
+ - user
+ type: string
+ - enum:
+ - system
+ type: string
+ - enum:
+ - developer
+ type: string
+ type:
+ enum:
+ - message
+ type: string
required:
- role
- FunctionCallItem:
type: object
- properties:
- type:
- type: string
- enum:
- - function_call
- call_id:
- type: string
- name:
- type: string
- arguments:
- type: string
- id:
- type: string
- status:
- $ref: '#/components/schemas/ToolCallStatusEnum'
- required:
- - type
- - call_id
- - name
- - arguments
- - id
- description: A function call initiated by the model
- example:
- id: call-abc123
- type: function_call
- call_id: call-abc123
- name: get_weather
- arguments: '{"location":"San Francisco"}'
- status: completed
- FunctionCallOutputItem:
- type: object
- properties:
- type:
- type: string
- enum:
- - function_call_output
- id:
- type: string
- nullable: true
- call_id:
- type: string
- output:
- anyOf:
- - type: string
- - type: array
- items:
- oneOf:
- - $ref: '#/components/schemas/InputText'
- - allOf:
- - $ref: '#/components/schemas/InputImage'
- - type: object
- properties: {}
- description: Image input content item
- example:
- type: input_image
- detail: auto
- image_url: https://example.com/image.jpg
- - $ref: '#/components/schemas/InputFile'
- status:
- $ref: '#/components/schemas/ToolCallStatusEnum'
- required:
- - type
- - call_id
- - output
- description: The output from a function call execution
- example:
- type: function_call_output
- id: output-abc123
- call_id: call-abc123
- output: '{"temperature":72,"conditions":"sunny"}'
- status: completed
- OutputDatetimeItem:
- type: object
- properties:
- type:
- type: string
- enum:
- - openrouter:datetime
- id:
- type: string
- status:
- type: string
- enum:
- - completed
- - in_progress
- - incomplete
- x-speakeasy-unknown-values: allow
- datetime:
- type: string
- description: ISO 8601 datetime string
- timezone:
- type: string
- description: IANA timezone name
- required:
- - type
- - status
- - datetime
- - timezone
- description: An openrouter:datetime server tool output item
- example:
- type: openrouter:datetime
- id: dt_tmp_abc123
- status: completed
- datetime: '2026-03-12T14:30:00.000Z'
- timezone: UTC
+ InputModality:
+ enum:
+ - text
+ - image
+ - file
+ - audio
+ - video
+ example: text
+ type: string
+ x-speakeasy-unknown-values: allow
Inputs:
anyOf:
- type: string
- - type: array
- items:
+ - items:
anyOf:
- $ref: '#/components/schemas/ReasoningItem'
- $ref: '#/components/schemas/EasyInputMessage'
@@ -4416,175 +6119,4000 @@ components:
- $ref: '#/components/schemas/FunctionCallOutputItem'
- allOf:
- $ref: '#/components/schemas/OutputMessageItem'
- - type: object
- properties:
+ - properties:
content:
anyOf:
- - type: array
- items:
+ - items:
anyOf:
- $ref: '#/components/schemas/ResponseOutputText'
- $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ type: array
- type: string
- nullable: true
+ type: object
+ description: An output message item
example:
+ content:
+ - annotations: []
+ text: Hello! How can I help you?
+ type: output_text
id: msg-123
- type: message
role: assistant
status: completed
- content:
- - type: output_text
- text: Hello! How can I help you?
- annotations: []
- description: An output message item
+ type: message
- allOf:
- $ref: '#/components/schemas/OutputReasoningItem'
- - type: object
- properties:
+ - properties:
summary:
- type: array
- nullable: true
items:
$ref: '#/components/schemas/ReasoningSummaryText'
+ nullable: true
+ type: array
+ type: object
+ description: An output item containing reasoning
example:
+ content:
+ - text: First, we analyze the problem...
+ type: reasoning_text
+ format: anthropic-claude-v1
id: reasoning-123
- type: reasoning
+ signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
status: completed
summary:
- - type: summary_text
- text: Analyzed the problem and found the optimal solution.
- content:
- - type: reasoning_text
- text: First, we analyze the problem...
- signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
- format: anthropic-claude-v1
- description: An output item containing reasoning
+ - text: Analyzed the problem and found the optimal solution.
+ type: summary_text
+ type: reasoning
- $ref: '#/components/schemas/OutputFunctionCallItem'
- $ref: '#/components/schemas/OutputWebSearchCallItem'
- $ref: '#/components/schemas/OutputFileSearchCallItem'
- $ref: '#/components/schemas/OutputImageGenerationCallItem'
- $ref: '#/components/schemas/OutputDatetimeItem'
- - $ref: '#/components/schemas/OutputServerToolItem'
+ - $ref: '#/components/schemas/OutputWebSearchServerToolItem'
+ type: array
description: Input for a response request - can be a string or array of items
example:
- - role: user
- content: What is the weather today?
- DatetimeServerTool:
+ - content: What is the weather today?
+ role: user
+ InputText:
+ description: Text input content item
+ example:
+ text: Hello, how can I help you?
+ type: input_text
+ properties:
+ text:
+ type: string
+ type:
+ enum:
+ - input_text
+ type: string
+ required:
+ - type
+ - text
type: object
+ InputVideo:
+ description: Video input content item
+ example:
+ type: input_video
+ video_url: https://example.com/video.mp4
properties:
type:
- type: string
enum:
- - openrouter:datetime
- parameters:
+ - input_video
+ type: string
+ video_url:
+ description: A base64 data URL or remote URL that resolves to a video file
+ type: string
+ required:
+ - type
+ - video_url
+ type: object
+ InstructType:
+ description: Instruction format type
+ enum:
+ - none
+ - airoboros
+ - alpaca
+ - alpaca-modif
+ - chatml
+ - claude
+ - code-llama
+ - gemma
+ - llama2
+ - llama3
+ - mistral
+ - nemotron
+ - neural
+ - openchat
+ - phi3
+ - rwkv
+ - vicuna
+ - zephyr
+ - deepseek-r1
+ - deepseek-v3.1
+ - qwq
+ - qwen3
+ - null
+ example: chatml
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ InternalServerResponse:
+ description: Internal Server Error - Unexpected server error
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ properties:
+ error:
+ $ref: '#/components/schemas/InternalServerResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ InternalServerResponseErrorData:
+ description: Error data for InternalServerResponse
+ example:
+ code: 500
+ message: Internal Server Error
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
type: object
- properties:
- timezone:
+ required:
+ - code
+ - message
+ type: object
+ KeyAssignment:
+ example:
+ assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ key_label: prod-key
+ key_name: Production Key
+ properties:
+ assigned_by:
+ description: User ID of who made the assignment
+ example: user_abc123
+ nullable: true
+ type: string
+ created_at:
+ description: ISO 8601 timestamp of when the assignment was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ guardrail_id:
+ description: ID of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440001
+ format: uuid
+ type: string
+ id:
+ description: Unique identifier for the assignment
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ key_hash:
+ description: Hash of the assigned API key
+ example: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ type: string
+ key_label:
+ description: Label of the API key
+ example: prod-key
+ type: string
+ key_name:
+ description: Name of the API key
+ example: Production Key
+ type: string
+ required:
+ - id
+ - key_hash
+ - guardrail_id
+ - key_name
+ - key_label
+ - assigned_by
+ - created_at
+ type: object
+ Legacy_ChatContentVideo:
+ deprecated: true
+ description: Video input content part (legacy format - deprecated)
+ example:
+ type: input_video
+ video_url:
+ url: https://example.com/video.mp4
+ properties:
+ type:
+ enum:
+ - input_video
+ type: string
+ video_url:
+ $ref: '#/components/schemas/ChatContentVideoInput'
+ required:
+ - type
+ - video_url
+ type: object
+ Legacy_WebSearchServerTool:
+ description: Web search tool configuration
+ example:
+ engine: auto
+ filters:
+ allowed_domains:
+ - example.com
+ type: web_search
+ properties:
+ engine:
+ $ref: '#/components/schemas/WebSearchEngineEnum'
+ filters:
+ $ref: '#/components/schemas/WebSearchDomainFilter'
+ 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
+ search_context_size:
+ $ref: '#/components/schemas/SearchContextSizeEnum'
+ type:
+ enum:
+ - web_search
+ type: string
+ user_location:
+ $ref: '#/components/schemas/WebSearchUserLocation'
+ required:
+ - type
+ type: object
+ ListEndpointsResponse:
+ description: List of available endpoints for a model
+ example:
+ architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ output_modalities:
+ - text
+ tokenizer: GPT
+ created: 1692901234
+ description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
+ endpoints:
+ - 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_name: GPT-4
+ name: 'OpenAI: GPT-4'
+ pricing:
+ completion: '0.00006'
+ image: '0'
+ prompt: '0.00003'
+ request: '0'
+ provider_name: OpenAI
+ quantization: fp16
+ status: default
+ supported_parameters:
+ - temperature
+ - top_p
+ - max_tokens
+ - frequency_penalty
+ - presence_penalty
+ 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
+ id: openai/gpt-4
+ name: GPT-4
+ properties:
+ architecture:
+ allOf:
+ - $ref: '#/components/schemas/ModelArchitecture'
+ - example:
+ instruct_type: chatml
+ modality: text
+ tokenizer: GPT
+ properties:
+ input_modalities:
+ description: Supported input modalities
+ items:
+ $ref: '#/components/schemas/InputModality'
+ type: array
+ instruct_type:
+ $ref: '#/components/schemas/InstructType'
+ modality:
+ description: Primary modality of the model
+ example: text
+ nullable: true
+ type: string
+ output_modalities:
+ description: Supported output modalities
+ items:
+ $ref: '#/components/schemas/OutputModality'
+ type: array
+ tokenizer:
+ allOf:
+ - $ref: '#/components/schemas/ModelGroup'
+ - nullable: true
+ required:
+ - tokenizer
+ - instruct_type
+ - modality
+ - input_modalities
+ - output_modalities
+ created:
+ description: Unix timestamp of when the model was created
+ example: 1692901234
+ type: integer
+ description:
+ description: Description of the model
+ example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
+ type: string
+ endpoints:
+ description: List of available endpoints for this model
+ items:
+ $ref: '#/components/schemas/PublicEndpoint'
+ type: array
+ id:
+ description: Unique identifier for the model
+ example: openai/gpt-4
+ type: string
+ name:
+ description: Display name of the model
+ example: GPT-4
+ type: string
+ required:
+ - id
+ - name
+ - created
+ - description
+ - architecture
+ - endpoints
+ type: object
+ ListGuardrailsResponse:
+ 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'
+ total_count: 1
+ properties:
+ data:
+ description: List of guardrails
+ items:
+ $ref: '#/components/schemas/Guardrail'
+ type: array
+ total_count:
+ description: Total number of guardrails
+ example: 25
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ ListKeyAssignmentsResponse:
+ example:
+ data:
+ - assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ key_label: prod-key
+ key_name: Production Key
+ total_count: 1
+ properties:
+ data:
+ description: List of key assignments
+ items:
+ $ref: '#/components/schemas/KeyAssignment'
+ type: array
+ total_count:
+ description: Total number of key assignments for this guardrail
+ example: 25
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ ListMemberAssignmentsResponse:
+ example:
+ data:
+ - assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ organization_id: org_xyz789
+ user_id: user_abc123
+ total_count: 1
+ properties:
+ data:
+ description: List of member assignments
+ items:
+ $ref: '#/components/schemas/MemberAssignment'
+ type: array
+ total_count:
+ description: Total number of member assignments
+ example: 10
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ McpServerTool:
+ description: MCP (Model Context Protocol) tool configuration
+ example:
+ server_label: my-server
+ server_url: https://example.com/mcp
+ type: mcp
+ properties:
+ allowed_tools:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - properties:
+ read_only:
+ type: boolean
+ tool_names:
+ items:
+ type: string
+ type: array
+ type: object
+ - nullable: true
+ authorization:
+ type: string
+ connector_id:
+ enum:
+ - connector_dropbox
+ - connector_gmail
+ - connector_googlecalendar
+ - connector_googledrive
+ - connector_microsoftteams
+ - connector_outlookcalendar
+ - connector_outlookemail
+ - connector_sharepoint
+ type: string
+ x-speakeasy-unknown-values: allow
+ headers:
+ additionalProperties:
+ type: string
+ nullable: true
+ type: object
+ require_approval:
+ anyOf:
+ - properties:
+ always:
+ properties:
+ tool_names:
+ items:
+ type: string
+ type: array
+ type: object
+ never:
+ properties:
+ tool_names:
+ items:
+ type: string
+ type: array
+ type: object
+ type: object
+ - enum:
+ - always
type: string
- description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC.
- example: America/New_York
+ - enum:
+ - never
+ type: string
+ - nullable: true
+ server_description:
+ type: string
+ server_label:
+ type: string
+ server_url:
+ type: string
+ type:
+ enum:
+ - mcp
+ type: string
required:
- type
- description: 'OpenRouter built-in server tool: returns the current date and time'
- example:
- type: openrouter:datetime
- parameters:
- timezone: America/New_York
- WebSearchServerTool_OpenRouter:
+ - server_label
type: object
+ MemberAssignment:
+ example:
+ assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ organization_id: org_xyz789
+ user_id: user_abc123
properties:
+ assigned_by:
+ description: User ID of who made the assignment
+ example: user_abc123
+ nullable: true
+ type: string
+ created_at:
+ description: ISO 8601 timestamp of when the assignment was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ guardrail_id:
+ description: ID of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440001
+ format: uuid
+ type: string
+ id:
+ description: Unique identifier for the assignment
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ organization_id:
+ description: Organization ID
+ example: org_xyz789
+ type: string
+ user_id:
+ description: Clerk user ID of the assigned member
+ example: user_abc123
+ type: string
+ required:
+ - id
+ - user_id
+ - organization_id
+ - guardrail_id
+ - assigned_by
+ - created_at
+ type: object
+ MessagesContentBlockDeltaEvent:
+ description: Event sent when content is added to a content block
+ example:
+ delta:
+ text: Hello
+ type: text_delta
+ index: 0
+ type: content_block_delta
+ properties:
+ delta:
+ oneOf:
+ - properties:
+ text:
+ type: string
+ type:
+ enum:
+ - text_delta
+ type: string
+ required:
+ - type
+ - text
+ type: object
+ - properties:
+ partial_json:
+ type: string
+ type:
+ enum:
+ - input_json_delta
+ type: string
+ required:
+ - type
+ - partial_json
+ type: object
+ - properties:
+ thinking:
+ type: string
+ type:
+ enum:
+ - thinking_delta
+ type: string
+ required:
+ - type
+ - thinking
+ type: object
+ - properties:
+ signature:
+ type: string
+ type:
+ enum:
+ - signature_delta
+ type: string
+ required:
+ - type
+ - signature
+ type: object
+ - properties:
+ citation:
+ discriminator:
+ mapping:
+ char_location: '#/components/schemas/AnthropicCitationCharLocation'
+ content_block_location: '#/components/schemas/AnthropicCitationContentBlockLocation'
+ page_location: '#/components/schemas/AnthropicCitationPageLocation'
+ search_result_location: '#/components/schemas/AnthropicCitationSearchResultLocation'
+ web_search_result_location: '#/components/schemas/AnthropicCitationWebSearchResultLocation'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicCitationCharLocation'
+ - $ref: '#/components/schemas/AnthropicCitationPageLocation'
+ - $ref: '#/components/schemas/AnthropicCitationContentBlockLocation'
+ - $ref: '#/components/schemas/AnthropicCitationWebSearchResultLocation'
+ - $ref: '#/components/schemas/AnthropicCitationSearchResultLocation'
+ type:
+ enum:
+ - citations_delta
+ type: string
+ required:
+ - type
+ - citation
+ type: object
+ - properties:
+ content:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - compaction_delta
+ type: string
+ required:
+ - type
+ - content
+ type: object
+ index:
+ type: integer
+ type:
+ enum:
+ - content_block_delta
+ type: string
+ required:
+ - type
+ - index
+ - delta
+ type: object
+ MessagesContentBlockStartEvent:
+ description: Event sent when a new content block starts
+ example:
+ content_block:
+ text: ''
+ type: text
+ index: 0
+ type: content_block_start
+ properties:
+ content_block:
+ anyOf:
+ - $ref: '#/components/schemas/AnthropicTextBlock'
+ - $ref: '#/components/schemas/AnthropicToolUseBlock'
+ - $ref: '#/components/schemas/AnthropicThinkingBlock'
+ - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock'
+ - $ref: '#/components/schemas/AnthropicServerToolUseBlock'
+ - $ref: '#/components/schemas/AnthropicWebSearchToolResult'
+ - $ref: '#/components/schemas/AnthropicWebFetchToolResult'
+ - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult'
+ - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResult'
+ - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult'
+ - $ref: '#/components/schemas/AnthropicToolSearchToolResult'
+ - $ref: '#/components/schemas/AnthropicContainerUpload'
+ - $ref: '#/components/schemas/AnthropicCompactionBlock'
+ - properties:
+ content:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - compaction
+ type: string
+ required:
+ - type
+ - content
+ type: object
+ index:
+ type: integer
+ type:
+ enum:
+ - content_block_start
+ type: string
+ required:
+ - type
+ - index
+ - content_block
+ type: object
+ MessagesContentBlockStopEvent:
+ description: Event sent when a content block is complete
+ example:
+ index: 0
+ type: content_block_stop
+ properties:
+ index:
+ type: integer
+ type:
+ enum:
+ - content_block_stop
+ type: string
+ required:
+ - type
+ - index
+ type: object
+ MessagesDeltaEvent:
+ description: Event sent when the message metadata changes (e.g., stop_reason)
+ example:
+ delta:
+ stop_details: null
+ stop_reason: end_turn
+ stop_sequence: null
+ type: message_delta
+ usage:
+ output_tokens: 15
+ properties:
+ delta:
+ properties:
+ container:
+ $ref: '#/components/schemas/AnthropicContainer'
+ stop_details:
+ $ref: '#/components/schemas/AnthropicRefusalStopDetails'
+ stop_reason:
+ $ref: '#/components/schemas/ORAnthropicStopReason'
+ stop_sequence:
+ nullable: true
+ type: string
+ required:
+ - container
+ - stop_details
+ - stop_reason
+ - stop_sequence
+ type: object
+ type:
+ enum:
+ - message_delta
+ type: string
+ usage:
+ properties:
+ cache_creation_input_tokens:
+ nullable: true
+ type: integer
+ cache_read_input_tokens:
+ nullable: true
+ type: integer
+ input_tokens:
+ nullable: true
+ type: integer
+ iterations:
+ items:
+ $ref: '#/components/schemas/AnthropicUsageIteration'
+ type: array
+ output_tokens:
+ type: integer
+ server_tool_use:
+ nullable: true
+ properties:
+ web_fetch_requests:
+ type: integer
+ web_search_requests:
+ type: integer
+ required:
+ - web_search_requests
+ - web_fetch_requests
+ type: object
+ required:
+ - input_tokens
+ - output_tokens
+ - cache_creation_input_tokens
+ - cache_read_input_tokens
+ - server_tool_use
+ type: object
+ required:
+ - type
+ - delta
+ - usage
+ type: object
+ MessagesErrorDetail:
+ example:
+ message: Invalid request parameters
+ type: invalid_request_error
+ properties:
+ message:
+ type: string
type:
type: string
- enum:
- - openrouter:web_search
- parameters:
- type: object
- properties:
- max_results:
- type: number
- minimum: 1
- maximum: 25
- description: Maximum number of search results to return per search call. Defaults to 5.
- example: 5
- max_total_results:
- type: number
- minimum: 1
- 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
required:
- type
- description: 'OpenRouter built-in server tool: searches the web for current information'
+ - message
+ type: object
+ MessagesErrorEvent:
+ description: Error event in the stream
example:
- type: openrouter:web_search
- parameters:
- max_results: 5
- TextExtendedConfig:
- allOf:
- - $ref: '#/components/schemas/TextConfig'
- - type: object
- properties: {}
- description: Text output configuration including format and verbosity
+ error:
+ message: Overloaded
+ type: overloaded_error
+ type: error
+ properties:
+ error:
+ properties:
+ message:
+ type: string
+ type:
+ type: string
+ required:
+ - type
+ - message
+ type: object
+ type:
+ enum:
+ - error
+ type: string
+ required:
+ - type
+ - error
+ type: object
+ MessagesErrorResponse:
example:
+ error:
+ message: Invalid request parameters
+ type: invalid_request_error
+ type: error
+ properties:
+ error:
+ $ref: '#/components/schemas/MessagesErrorDetail'
+ type:
+ enum:
+ - error
+ type: string
+ required:
+ - type
+ - error
+ type: object
+ MessagesMessageParam:
+ description: Anthropic message with OpenRouter extensions
+ example:
+ content: Hello, how are you?
+ role: user
+ properties:
+ content:
+ anyOf:
+ - type: string
+ - items:
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicTextBlockParam'
+ - $ref: '#/components/schemas/AnthropicImageBlockParam'
+ - $ref: '#/components/schemas/AnthropicDocumentBlockParam'
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ id:
+ type: string
+ input:
+ nullable: true
+ name:
+ type: string
+ type:
+ enum:
+ - tool_use
+ type: string
+ required:
+ - type
+ - id
+ - name
+ type: object
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ content:
+ anyOf:
+ - type: string
+ - items:
+ anyOf:
+ - $ref: '#/components/schemas/AnthropicTextBlockParam'
+ - $ref: '#/components/schemas/AnthropicImageBlockParam'
+ - properties:
+ tool_name:
+ type: string
+ type:
+ enum:
+ - tool_reference
+ type: string
+ required:
+ - type
+ - tool_name
+ type: object
+ - $ref: '#/components/schemas/AnthropicSearchResultBlockParam'
+ - $ref: '#/components/schemas/AnthropicDocumentBlockParam'
+ type: array
+ is_error:
+ type: boolean
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - tool_result
+ type: string
+ required:
+ - type
+ - tool_use_id
+ type: object
+ - properties:
+ signature:
+ type: string
+ thinking:
+ type: string
+ type:
+ enum:
+ - thinking
+ type: string
+ required:
+ - type
+ - thinking
+ - signature
+ type: object
+ - properties:
+ data:
+ type: string
+ type:
+ enum:
+ - redacted_thinking
+ type: string
+ required:
+ - type
+ - data
+ type: object
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ id:
+ type: string
+ input:
+ nullable: true
+ name:
+ $ref: '#/components/schemas/AnthropicServerToolName'
+ type:
+ enum:
+ - server_tool_use
+ type: string
+ required:
+ - type
+ - id
+ - name
+ type: object
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ content:
+ anyOf:
+ - items:
+ $ref: '#/components/schemas/AnthropicWebSearchResultBlockParam'
+ type: array
+ - properties:
+ error_code:
+ enum:
+ - invalid_tool_input
+ - unavailable
+ - max_uses_exceeded
+ - too_many_requests
+ - query_too_long
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - web_search_tool_result_error
+ type: string
+ required:
+ - type
+ - error_code
+ type: object
+ tool_use_id:
+ type: string
+ type:
+ enum:
+ - web_search_tool_result
+ type: string
+ required:
+ - type
+ - tool_use_id
+ - content
+ type: object
+ - $ref: '#/components/schemas/AnthropicSearchResultBlockParam'
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ content:
+ nullable: true
+ type: string
+ type:
+ enum:
+ - compaction
+ type: string
+ required:
+ - type
+ - content
+ type: object
+ type: array
+ role:
+ enum:
+ - user
+ - assistant
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - role
+ - content
+ type: object
+ MessagesOutputConfig:
+ description: Configuration for controlling output behavior. Supports the effort parameter and structured output format.
+ example:
+ effort: medium
+ 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`.
+ enum:
+ - low
+ - medium
+ - high
+ - max
+ - null
+ example: medium
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
format:
- type: text
- verbosity: medium
- ReasoningConfig:
- allOf:
- - $ref: '#/components/schemas/BaseReasoningConfig'
- - type: object
+ description: >-
+ A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).
nullable: true
properties:
- max_tokens:
- type: number
- nullable: true
- enabled:
- type: boolean
- nullable: true
- description: Configuration for reasoning mode in the response
+ schema:
+ additionalProperties:
+ nullable: true
+ type: object
+ type:
+ enum:
+ - json_schema
+ type: string
+ required:
+ - type
+ - schema
+ type: object
+ type: object
+ MessagesPingEvent:
+ description: Keep-alive ping event
example:
- summary: auto
- enabled: true
- OutputModalityEnum:
- type: string
+ type: ping
+ properties:
+ type:
+ enum:
+ - ping
+ type: string
+ required:
+ - type
+ type: object
+ MessagesRequest:
+ description: Request schema for Anthropic Messages API endpoint
+ example:
+ max_tokens: 1024
+ messages:
+ - content: Hello, how are you?
+ role: user
+ model: anthropic/claude-4.5-sonnet-20250929
+ temperature: 0.7
+ properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ context_management:
+ nullable: true
+ properties:
+ edits:
+ items:
+ oneOf:
+ - properties:
+ clear_at_least:
+ $ref: '#/components/schemas/AnthropicInputTokensClearAtLeast'
+ clear_tool_inputs:
+ anyOf:
+ - type: boolean
+ - items:
+ type: string
+ type: array
+ - nullable: true
+ exclude_tools:
+ items:
+ type: string
+ nullable: true
+ type: array
+ keep:
+ $ref: '#/components/schemas/AnthropicToolUsesKeep'
+ trigger:
+ discriminator:
+ mapping:
+ input_tokens: '#/components/schemas/AnthropicInputTokensTrigger'
+ tool_uses: '#/components/schemas/AnthropicToolUsesTrigger'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicInputTokensTrigger'
+ - $ref: '#/components/schemas/AnthropicToolUsesTrigger'
+ type:
+ enum:
+ - clear_tool_uses_20250919
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ keep:
+ anyOf:
+ - $ref: '#/components/schemas/AnthropicThinkingTurns'
+ - properties:
+ type:
+ enum:
+ - all
+ type: string
+ required:
+ - type
+ type: object
+ - enum:
+ - all
+ type: string
+ type:
+ enum:
+ - clear_thinking_20251015
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ instructions:
+ nullable: true
+ type: string
+ pause_after_compaction:
+ type: boolean
+ trigger:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicInputTokensTrigger'
+ - nullable: true
+ properties: {}
+ type: object
+ example:
+ type: input_tokens
+ value: 100000
+ type:
+ enum:
+ - compact_20260112
+ type: string
+ required:
+ - type
+ type: object
+ type: array
+ type: object
+ max_tokens:
+ type: integer
+ messages:
+ items:
+ $ref: '#/components/schemas/MessagesMessageParam'
+ nullable: true
+ type: array
+ metadata:
+ properties:
+ user_id:
+ nullable: true
+ type: string
+ type: object
+ model:
+ type: string
+ models:
+ items:
+ type: string
+ type: array
+ output_config:
+ $ref: '#/components/schemas/MessagesOutputConfig'
+ 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
+ provider:
+ $ref: '#/components/schemas/ProviderPreferences'
+ route:
+ $ref: '#/components/schemas/DeprecatedRoute'
+ service_tier:
+ enum:
+ - auto
+ - standard_only
+ type: string
+ x-speakeasy-unknown-values: allow
+ session_id:
+ description: >-
+ A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ maxLength: 256
+ type: string
+ speed:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicSpeed'
+ - description: >-
+ Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted.
+ example: fast
+ stop_sequences:
+ items:
+ type: string
+ type: array
+ stream:
+ type: boolean
+ system:
+ anyOf:
+ - type: string
+ - items:
+ $ref: '#/components/schemas/AnthropicTextBlockParam'
+ type: array
+ temperature:
+ format: double
+ type: number
+ thinking:
+ oneOf:
+ - properties:
+ budget_tokens:
+ type: integer
+ type:
+ enum:
+ - enabled
+ type: string
+ required:
+ - type
+ - budget_tokens
+ type: object
+ - properties:
+ type:
+ enum:
+ - disabled
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ type:
+ enum:
+ - adaptive
+ type: string
+ required:
+ - type
+ type: object
+ tool_choice:
+ oneOf:
+ - properties:
+ disable_parallel_tool_use:
+ type: boolean
+ type:
+ enum:
+ - auto
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ disable_parallel_tool_use:
+ type: boolean
+ type:
+ enum:
+ - any
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ type:
+ enum:
+ - none
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ disable_parallel_tool_use:
+ type: boolean
+ name:
+ type: string
+ type:
+ enum:
+ - tool
+ type: string
+ required:
+ - type
+ - name
+ type: object
+ tools:
+ items:
+ anyOf:
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ description:
+ type: string
+ input_schema:
+ additionalProperties:
+ nullable: true
+ properties:
+ properties:
+ nullable: true
+ required:
+ items:
+ type: string
+ nullable: true
+ type: array
+ type:
+ default: object
+ type: string
+ type: object
+ name:
+ type: string
+ type:
+ enum:
+ - custom
+ type: string
+ required:
+ - name
+ - input_schema
+ type: object
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ name:
+ enum:
+ - bash
+ type: string
+ type:
+ enum:
+ - bash_20250124
+ type: string
+ required:
+ - type
+ - name
+ type: object
+ - properties:
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ name:
+ enum:
+ - str_replace_editor
+ type: string
+ type:
+ enum:
+ - text_editor_20250124
+ type: string
+ required:
+ - type
+ - name
+ type: object
+ - properties:
+ allowed_domains:
+ items:
+ type: string
+ nullable: true
+ type: array
+ blocked_domains:
+ items:
+ type: string
+ nullable: true
+ type: array
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ max_uses:
+ type: integer
+ name:
+ enum:
+ - web_search
+ type: string
+ type:
+ enum:
+ - web_search_20250305
+ type: string
+ user_location:
+ $ref: '#/components/schemas/AnthropicWebSearchToolUserLocation'
+ required:
+ - type
+ - name
+ type: object
+ - properties:
+ allowed_callers:
+ items:
+ enum:
+ - direct
+ - code_execution_20250825
+ - code_execution_20260120
+ type: string
+ x-speakeasy-unknown-values: allow
+ type: array
+ allowed_domains:
+ items:
+ type: string
+ nullable: true
+ type: array
+ blocked_domains:
+ items:
+ type: string
+ nullable: true
+ type: array
+ cache_control:
+ $ref: '#/components/schemas/AnthropicCacheControlDirective'
+ max_uses:
+ type: integer
+ name:
+ enum:
+ - web_search
+ type: string
+ type:
+ enum:
+ - web_search_20260209
+ type: string
+ user_location:
+ $ref: '#/components/schemas/AnthropicWebSearchToolUserLocation'
+ required:
+ - type
+ - name
+ type: object
+ - $ref: '#/components/schemas/DatetimeServerTool'
+ - $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
+ type: array
+ top_k:
+ type: integer
+ top_p:
+ format: double
+ type: number
+ trace:
+ $ref: '#/components/schemas/TraceConfig'
+ 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
+ required:
+ - model
+ - messages
+ type: object
+ MessagesResult:
+ allOf:
+ - $ref: '#/components/schemas/BaseMessagesResult'
+ - properties:
+ provider:
+ $ref: '#/components/schemas/ProviderName'
+ usage:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicUsage'
+ - properties:
+ cost:
+ format: double
+ type: number
+ cost_details:
+ nullable: true
+ properties:
+ upstream_inference_completions_cost:
+ format: double
+ type: number
+ upstream_inference_cost:
+ format: double
+ type: number
+ upstream_inference_prompt_cost:
+ format: double
+ type: number
+ required:
+ - upstream_inference_prompt_cost
+ - upstream_inference_completions_cost
+ type: object
+ is_byok:
+ type: boolean
+ iterations:
+ items:
+ $ref: '#/components/schemas/AnthropicUsageIteration'
+ type: array
+ service_tier:
+ nullable: true
+ type: string
+ speed:
+ $ref: '#/components/schemas/AnthropicSpeed'
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: null
+ cache_read_input_tokens: null
+ inference_geo: null
+ input_tokens: 100
+ output_tokens: 50
+ server_tool_use: null
+ service_tier: standard
+ type: object
+ description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions
+ example:
+ container: null
+ content:
+ - citations: null
+ text: Hello! I'm doing well, thank you for asking.
+ type: text
+ id: msg_01XFDUDYJgAACzvnptvVoYEL
+ model: claude-sonnet-4-5-20250929
+ role: assistant
+ stop_details: null
+ stop_reason: end_turn
+ stop_sequence: null
+ type: message
+ usage:
+ cache_creation: null
+ cache_creation_input_tokens: null
+ cache_read_input_tokens: null
+ inference_geo: null
+ input_tokens: 12
+ output_tokens: 15
+ server_tool_use: null
+ service_tier: standard
+ MessagesStartEvent:
+ description: Event sent at the start of a streaming message
+ example:
+ message:
+ content: []
+ id: msg_01XFDUDYJgAACzvnptvVoYEL
+ model: claude-sonnet-4-5-20250929
+ role: assistant
+ stop_details: null
+ stop_reason: null
+ stop_sequence: null
+ type: message
+ usage:
+ input_tokens: 12
+ output_tokens: 0
+ type: message_start
+ properties:
+ message:
+ properties:
+ container:
+ $ref: '#/components/schemas/AnthropicContainer'
+ content:
+ items:
+ $ref: '#/components/schemas/ORAnthropicContentBlock'
+ type: array
+ id:
+ type: string
+ model:
+ type: string
+ 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
+ type: string
+ x-speakeasy-unknown-values: allow
+ role:
+ enum:
+ - assistant
+ type: string
+ stop_details:
+ $ref: '#/components/schemas/AnthropicRefusalStopDetails'
+ stop_reason:
+ nullable: true
+ stop_sequence:
+ nullable: true
+ type:
+ enum:
+ - message
+ type: string
+ usage:
+ allOf:
+ - $ref: '#/components/schemas/AnthropicUsage'
+ - properties:
+ iterations:
+ items:
+ $ref: '#/components/schemas/AnthropicUsageIteration'
+ type: array
+ speed:
+ $ref: '#/components/schemas/AnthropicSpeed'
+ type: object
+ example:
+ cache_creation: null
+ cache_creation_input_tokens: null
+ cache_read_input_tokens: null
+ inference_geo: null
+ input_tokens: 100
+ output_tokens: 50
+ server_tool_use: null
+ service_tier: standard
+ required:
+ - id
+ - type
+ - role
+ - container
+ - content
+ - model
+ - stop_reason
+ - stop_details
+ - stop_sequence
+ - usage
+ type: object
+ type:
+ enum:
+ - message_start
+ type: string
+ required:
+ - type
+ - message
+ type: object
+ MessagesStopEvent:
+ description: Event sent when the message is complete
+ example:
+ type: message_stop
+ properties:
+ type:
+ enum:
+ - message_stop
+ type: string
+ required:
+ - type
+ type: object
+ MessagesStreamEvents:
+ description: Union of all possible streaming events
+ discriminator:
+ mapping:
+ content_block_delta: '#/components/schemas/MessagesContentBlockDeltaEvent'
+ content_block_start: '#/components/schemas/MessagesContentBlockStartEvent'
+ content_block_stop: '#/components/schemas/MessagesContentBlockStopEvent'
+ error: '#/components/schemas/MessagesErrorEvent'
+ message_delta: '#/components/schemas/MessagesDeltaEvent'
+ message_start: '#/components/schemas/MessagesStartEvent'
+ message_stop: '#/components/schemas/MessagesStopEvent'
+ ping: '#/components/schemas/MessagesPingEvent'
+ propertyName: type
+ example:
+ delta:
+ text: Hello
+ type: text_delta
+ index: 0
+ type: content_block_delta
+ oneOf:
+ - $ref: '#/components/schemas/MessagesStartEvent'
+ - $ref: '#/components/schemas/MessagesDeltaEvent'
+ - $ref: '#/components/schemas/MessagesStopEvent'
+ - $ref: '#/components/schemas/MessagesContentBlockStartEvent'
+ - $ref: '#/components/schemas/MessagesContentBlockDeltaEvent'
+ - $ref: '#/components/schemas/MessagesContentBlockStopEvent'
+ - $ref: '#/components/schemas/MessagesPingEvent'
+ - $ref: '#/components/schemas/MessagesErrorEvent'
+ Model:
+ description: Information about an AI model available on OpenRouter
+ example:
+ architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ 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
+ properties:
+ architecture:
+ $ref: '#/components/schemas/ModelArchitecture'
+ canonical_slug:
+ description: Canonical slug for the model
+ example: openai/gpt-4
+ type: string
+ context_length:
+ description: Maximum context length in tokens
+ example: 8192
+ type: integer
+ created:
+ description: Unix timestamp of when the model was created
+ example: 1692901234
+ type: integer
+ default_parameters:
+ $ref: '#/components/schemas/DefaultParameters'
+ description:
+ description: Description of the model
+ example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
+ type: string
+ expiration_date:
+ description: The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.
+ example: '2025-06-01'
+ nullable: true
+ type: string
+ hugging_face_id:
+ description: Hugging Face model identifier, if applicable
+ example: microsoft/DialoGPT-medium
+ nullable: true
+ type: string
+ id:
+ description: Unique identifier for the model
+ example: openai/gpt-4
+ type: string
+ knowledge_cutoff:
+ description: The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown.
+ example: '2024-10-01'
+ nullable: true
+ type: string
+ links:
+ $ref: '#/components/schemas/ModelLinks'
+ name:
+ description: Display name of the model
+ example: GPT-4
+ type: string
+ per_request_limits:
+ $ref: '#/components/schemas/PerRequestLimits'
+ pricing:
+ $ref: '#/components/schemas/PublicPricing'
+ supported_parameters:
+ description: List of supported parameters for this model
+ items:
+ $ref: '#/components/schemas/Parameter'
+ type: array
+ top_provider:
+ $ref: '#/components/schemas/TopProviderInfo'
+ required:
+ - id
+ - canonical_slug
+ - name
+ - created
+ - pricing
+ - context_length
+ - architecture
+ - top_provider
+ - per_request_limits
+ - supported_parameters
+ - default_parameters
+ - links
+ type: object
+ ModelArchitecture:
+ description: Model architecture information
+ example:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ output_modalities:
+ - text
+ tokenizer: GPT
+ properties:
+ input_modalities:
+ description: Supported input modalities
+ items:
+ $ref: '#/components/schemas/InputModality'
+ type: array
+ instruct_type:
+ description: Instruction format type
+ enum:
+ - none
+ - airoboros
+ - alpaca
+ - alpaca-modif
+ - chatml
+ - claude
+ - code-llama
+ - gemma
+ - llama2
+ - llama3
+ - mistral
+ - nemotron
+ - neural
+ - openchat
+ - phi3
+ - rwkv
+ - vicuna
+ - zephyr
+ - deepseek-r1
+ - deepseek-v3.1
+ - qwq
+ - qwen3
+ - null
+ example: chatml
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ modality:
+ description: Primary modality of the model
+ example: text->text
+ nullable: true
+ type: string
+ output_modalities:
+ description: Supported output modalities
+ items:
+ $ref: '#/components/schemas/OutputModality'
+ type: array
+ tokenizer:
+ $ref: '#/components/schemas/ModelGroup'
+ required:
+ - modality
+ - input_modalities
+ - output_modalities
+ type: object
+ ModelGroup:
+ description: Tokenizer type used by the model
enum:
- - text
- - image
- x-speakeasy-unknown-values: allow
- ResponseIncludesEnum:
+ - Router
+ - Media
+ - Other
+ - GPT
+ - Claude
+ - Gemini
+ - Gemma
+ - Grok
+ - Cohere
+ - Nova
+ - Qwen
+ - Yi
+ - DeepSeek
+ - Mistral
+ - Llama2
+ - Llama3
+ - Llama4
+ - PaLM
+ - RWKV
+ - Qwen3
+ example: GPT
type: string
- enum:
- - file_search_call.results
- - message.input_image.image_url
- - computer_call_output.output.image_url
- - reasoning.encrypted_content
- - code_interpreter_call.outputs
x-speakeasy-unknown-values: allow
+ ModelLinks:
+ description: Related API endpoints and resources for this model.
+ example:
+ details: /api/v1/models/openai/gpt-5.4/endpoints
+ properties:
+ details:
+ description: URL for the model details/endpoints API
+ example: /api/v1/models/openai/gpt-5.4/endpoints
+ type: string
+ required:
+ - details
+ type: object
+ ModelName:
+ description: Model to use for completion
+ example: openai/gpt-4
+ type: string
+ ModelsCountResponse:
+ description: Model count data
+ example:
+ data:
+ count: 150
+ properties:
+ data:
+ description: Model count data
+ example:
+ count: 150
+ properties:
+ count:
+ description: Total number of available models
+ example: 150
+ type: integer
+ required:
+ - count
+ type: object
+ required:
+ - data
+ type: object
+ ModelsListResponse:
+ description: List of available models
+ example:
+ data:
+ - architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ 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
+ - frequency_penalty
+ - presence_penalty
+ top_provider:
+ context_length: 8192
+ is_moderated: true
+ max_completion_tokens: 4096
+ properties:
+ data:
+ $ref: '#/components/schemas/ModelsListResponseData'
+ required:
+ - data
+ type: object
+ ModelsListResponseData:
+ description: List of available models
+ example:
+ - architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ 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
+ items:
+ $ref: '#/components/schemas/Model'
+ type: array
+ ModerationPlugin:
+ example:
+ id: moderation
+ properties:
+ id:
+ enum:
+ - moderation
+ type: string
+ required:
+ - id
+ type: object
+ NotFoundResponse:
+ description: Not Found - Resource does not exist
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ properties:
+ error:
+ $ref: '#/components/schemas/NotFoundResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ NotFoundResponseErrorData:
+ description: Error data for NotFoundResponse
+ example:
+ code: 404
+ message: Resource not found
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ OpenAIResponseFunctionToolCall:
+ example:
+ arguments: '{"location":"San Francisco"}'
+ call_id: call-abc123
+ id: fc-abc123
+ name: get_weather
+ status: completed
+ type: function_call
+ properties:
+ arguments:
+ type: string
+ call_id:
+ type: string
+ id:
+ type: string
+ name:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - function_call
+ type: string
+ required:
+ - type
+ - call_id
+ - name
+ - arguments
+ type: object
+ OpenAIResponseFunctionToolCallOutput:
+ example:
+ call_id: call-abc123
+ output: '{"temperature":72,"conditions":"sunny"}'
+ type: function_call_output
+ properties:
+ call_id:
+ type: string
+ id:
+ nullable: true
+ type: string
+ output:
+ anyOf:
+ - type: string
+ - items:
+ discriminator:
+ mapping:
+ input_file: '#/components/schemas/InputFile'
+ input_image: '#/components/schemas/InputImage'
+ input_text: '#/components/schemas/InputText'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/InputText'
+ - $ref: '#/components/schemas/InputImage'
+ - $ref: '#/components/schemas/InputFile'
+ type: array
+ status:
+ allOf:
+ - $ref: '#/components/schemas/ToolCallStatus'
+ - nullable: true
+ type:
+ enum:
+ - function_call_output
+ type: string
+ required:
+ - type
+ - call_id
+ - output
+ type: object
+ OpenAIResponseInputMessageItem:
+ example:
+ content:
+ - text: Hello, how are you?
+ type: input_text
+ id: msg-abc123
+ role: user
+ type: message
+ properties:
+ content:
+ items:
+ discriminator:
+ mapping:
+ input_audio: '#/components/schemas/InputAudio'
+ input_file: '#/components/schemas/InputFile'
+ input_image: '#/components/schemas/InputImage'
+ input_text: '#/components/schemas/InputText'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/InputText'
+ - $ref: '#/components/schemas/InputImage'
+ - $ref: '#/components/schemas/InputFile'
+ - $ref: '#/components/schemas/InputAudio'
+ type: array
+ id:
+ type: string
+ role:
+ anyOf:
+ - enum:
+ - user
+ type: string
+ - enum:
+ - system
+ type: string
+ - enum:
+ - developer
+ type: string
+ type:
+ enum:
+ - message
+ type: string
+ required:
+ - id
+ - role
+ - content
+ type: object
+ OpenAIResponsesAnnotation:
+ anyOf:
+ - $ref: '#/components/schemas/FileCitation'
+ - $ref: '#/components/schemas/URLCitation'
+ - $ref: '#/components/schemas/FilePath'
+ example:
+ file_id: file-abc123
+ filename: research_paper.pdf
+ index: 0
+ type: file_citation
+ OpenAIResponsesImageGenCallCompleted:
+ example:
+ item_id: ig_abc123
+ output_index: 0
+ sequence_number: 4
+ type: response.image_generation_call.completed
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.image_generation_call.completed
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ type: object
+ OpenAIResponsesImageGenCallGenerating:
+ example:
+ item_id: ig_abc123
+ output_index: 0
+ sequence_number: 2
+ type: response.image_generation_call.generating
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.image_generation_call.generating
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ type: object
+ OpenAIResponsesImageGenCallInProgress:
+ example:
+ item_id: ig_abc123
+ output_index: 0
+ sequence_number: 1
+ type: response.image_generation_call.in_progress
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.image_generation_call.in_progress
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ type: object
+ OpenAIResponsesImageGenCallPartialImage:
+ example:
+ item_id: ig_abc123
+ output_index: 0
+ partial_image_b64: iVBORw0KGgo...
+ partial_image_index: 0
+ sequence_number: 3
+ type: response.image_generation_call.partial_image
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ partial_image_b64:
+ type: string
+ partial_image_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.image_generation_call.partial_image
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ - partial_image_b64
+ - partial_image_index
+ type: object
+ OpenAIResponsesRefusalContent:
+ example:
+ refusal: I'm sorry, I cannot assist with that request
+ type: refusal
+ properties:
+ refusal:
+ type: string
+ type:
+ enum:
+ - refusal
+ type: string
+ required:
+ - type
+ - refusal
+ type: object
+ OpenAIResponsesResponseStatus:
+ enum:
+ - completed
+ - incomplete
+ - in_progress
+ - failed
+ - cancelled
+ - queued
+ example: completed
+ type: string
+ x-speakeasy-unknown-values: allow
+ OpenAIResponsesSearchCompleted:
+ example:
+ item_id: ws_abc123
+ output_index: 0
+ sequence_number: 5
+ type: response.web_search_call.completed
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.web_search_call.completed
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ type: object
+ OpenAIResponsesToolChoice:
+ anyOf:
+ - enum:
+ - auto
+ type: string
+ - enum:
+ - none
+ type: string
+ - enum:
+ - required
+ type: string
+ - properties:
+ name:
+ type: string
+ type:
+ enum:
+ - function
+ type: string
+ required:
+ - type
+ - name
+ type: object
+ - properties:
+ type:
+ anyOf:
+ - enum:
+ - web_search_preview_2025_03_11
+ type: string
+ - enum:
+ - web_search_preview
+ type: string
+ required:
+ - type
+ type: object
+ - $ref: '#/components/schemas/ToolChoiceAllowed'
+ example: auto
OpenAIResponsesTruncation:
- type: string
- nullable: true
enum:
- auto
- disabled
+ - null
example: auto
- x-speakeasy-unknown-values: allow
- DataCollection:
- type: string
nullable: true
- enum:
- - deny
- - allow
- 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.
- example: allow
- x-speakeasy-unknown-values: allow
- ProviderName:
type: string
+ x-speakeasy-unknown-values: allow
+ OpenAIResponsesUsage:
+ example:
+ input_tokens: 100
+ input_tokens_details:
+ cached_tokens: 0
+ output_tokens: 50
+ output_tokens_details:
+ reasoning_tokens: 0
+ total_tokens: 150
+ properties:
+ input_tokens:
+ type: integer
+ input_tokens_details:
+ properties:
+ cached_tokens:
+ type: integer
+ required:
+ - cached_tokens
+ type: object
+ output_tokens:
+ type: integer
+ output_tokens_details:
+ properties:
+ reasoning_tokens:
+ type: integer
+ required:
+ - reasoning_tokens
+ type: object
+ total_tokens:
+ type: integer
+ required:
+ - input_tokens
+ - input_tokens_details
+ - output_tokens
+ - output_tokens_details
+ - total_tokens
+ type: object
+ OpenAIResponsesWebSearchCallInProgress:
+ example:
+ item_id: ws_abc123
+ output_index: 0
+ sequence_number: 1
+ type: response.web_search_call.in_progress
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.web_search_call.in_progress
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ type: object
+ OpenAIResponsesWebSearchCallSearching:
+ example:
+ item_id: ws_abc123
+ output_index: 0
+ sequence_number: 2
+ type: response.web_search_call.searching
+ properties:
+ item_id:
+ type: string
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.web_search_call.searching
+ type: string
+ required:
+ - type
+ - item_id
+ - output_index
+ - sequence_number
+ type: object
+ OpenResponsesCreatedEvent:
+ allOf:
+ - $ref: '#/components/schemas/CreatedEvent'
+ - properties:
+ response:
+ $ref: '#/components/schemas/OpenResponsesResult'
+ type: object
+ description: Event emitted when a response is created
+ 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
+ OpenResponsesInProgressEvent:
+ allOf:
+ - $ref: '#/components/schemas/InProgressEvent'
+ - properties:
+ response:
+ $ref: '#/components/schemas/OpenResponsesResult'
+ type: object
+ description: Event emitted when a response is in progress
+ 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: 1
+ type: response.in_progress
+ OpenResponsesLogProbs:
+ description: Log probability information for a token
+ example:
+ logprob: -0.1
+ token: world
+ top_logprobs:
+ - logprob: -0.5
+ token: hello
+ properties:
+ bytes:
+ items:
+ type: integer
+ type: array
+ logprob:
+ format: double
+ type: number
+ token:
+ type: string
+ top_logprobs:
+ items:
+ $ref: '#/components/schemas/OpenResponsesTopLogprobs'
+ type: array
+ required:
+ - logprob
+ - token
+ type: object
+ OpenResponsesResult:
+ allOf:
+ - $ref: '#/components/schemas/BaseResponsesResult'
+ - properties:
+ output:
+ items:
+ $ref: '#/components/schemas/OutputItems'
+ type: array
+ service_tier:
+ nullable: true
+ type: string
+ usage:
+ $ref: '#/components/schemas/Usage'
+ type: object
+ description: Complete non-streaming response from the Responses API
+ example:
+ 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:
+ - content:
+ - annotations: []
+ text: Hello! How can I help you today?
+ type: output_text
+ id: msg-abc123
+ role: assistant
+ status: completed
+ type: message
+ parallel_tool_calls: true
+ status: completed
+ temperature: null
+ tool_choice: auto
+ tools: []
+ top_p: null
+ usage:
+ input_tokens: 10
+ input_tokens_details:
+ cached_tokens: 0
+ output_tokens: 25
+ output_tokens_details:
+ reasoning_tokens: 0
+ total_tokens: 35
+ OpenResponsesTopLogprobs:
+ description: Alternative token with its log probability
+ example:
+ logprob: -0.5
+ token: hello
+ properties:
+ bytes:
+ items:
+ type: integer
+ type: array
+ logprob:
+ format: double
+ type: number
+ token:
+ type: string
+ type: object
+ OpenRouterWebSearchServerTool:
+ description: 'OpenRouter built-in server tool: searches the web for current information'
+ example:
+ parameters:
+ max_results: 5
+ type: openrouter:web_search
+ properties:
+ parameters:
+ $ref: '#/components/schemas/WebSearchConfig'
+ type:
+ enum:
+ - openrouter:web_search
+ type: string
+ required:
+ - type
+ type: object
+ ORAnthropicContentBlock:
+ discriminator:
+ mapping:
+ bash_code_execution_tool_result: '#/components/schemas/AnthropicBashCodeExecutionToolResult'
+ code_execution_tool_result: '#/components/schemas/AnthropicCodeExecutionToolResult'
+ compaction: '#/components/schemas/AnthropicCompactionBlock'
+ container_upload: '#/components/schemas/AnthropicContainerUpload'
+ redacted_thinking: '#/components/schemas/AnthropicRedactedThinkingBlock'
+ server_tool_use: '#/components/schemas/AnthropicServerToolUseBlock'
+ text: '#/components/schemas/AnthropicTextBlock'
+ text_editor_code_execution_tool_result: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult'
+ thinking: '#/components/schemas/AnthropicThinkingBlock'
+ tool_search_tool_result: '#/components/schemas/AnthropicToolSearchToolResult'
+ tool_use: '#/components/schemas/AnthropicToolUseBlock'
+ web_fetch_tool_result: '#/components/schemas/AnthropicWebFetchToolResult'
+ web_search_tool_result: '#/components/schemas/AnthropicWebSearchToolResult'
+ propertyName: type
+ example:
+ citations: null
+ text: Hello, world!
+ type: text
+ oneOf:
+ - $ref: '#/components/schemas/AnthropicTextBlock'
+ - $ref: '#/components/schemas/AnthropicToolUseBlock'
+ - $ref: '#/components/schemas/AnthropicThinkingBlock'
+ - $ref: '#/components/schemas/AnthropicRedactedThinkingBlock'
+ - $ref: '#/components/schemas/AnthropicServerToolUseBlock'
+ - $ref: '#/components/schemas/AnthropicWebSearchToolResult'
+ - $ref: '#/components/schemas/AnthropicWebFetchToolResult'
+ - $ref: '#/components/schemas/AnthropicCodeExecutionToolResult'
+ - $ref: '#/components/schemas/AnthropicBashCodeExecutionToolResult'
+ - $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionToolResult'
+ - $ref: '#/components/schemas/AnthropicToolSearchToolResult'
+ - $ref: '#/components/schemas/AnthropicContainerUpload'
+ - $ref: '#/components/schemas/AnthropicCompactionBlock'
+ ORAnthropicStopReason:
+ enum:
+ - end_turn
+ - max_tokens
+ - stop_sequence
+ - tool_use
+ - pause_turn
+ - refusal
+ - compaction
+ - null
+ example: end_turn
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ OutputApplyPatchServerToolItem:
+ description: An openrouter:apply_patch server tool output item
+ example:
+ filePath: /src/main.ts
+ id: ap_tmp_abc123
+ status: completed
+ type: openrouter:apply_patch
+ properties:
+ filePath:
+ type: string
+ id:
+ type: string
+ patch:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:apply_patch
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputBashServerToolItem:
+ description: An openrouter:bash server tool output item
+ example:
+ command: ls -la
+ exitCode: 0
+ id: bash_tmp_abc123
+ status: completed
+ stdout: |
+ total 0
+ type: openrouter:bash
+ properties:
+ command:
+ type: string
+ exitCode:
+ type: integer
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ stderr:
+ type: string
+ stdout:
+ type: string
+ type:
+ enum:
+ - openrouter:bash
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputBrowserUseServerToolItem:
+ description: An openrouter:browser_use server tool output item
+ example:
+ action: screenshot
+ id: bu_tmp_abc123
+ status: completed
+ type: openrouter:browser_use
+ properties:
+ action:
+ type: string
+ id:
+ type: string
+ screenshotB64:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:browser_use
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputCodeInterpreterCallItem:
+ allOf:
+ - $ref: '#/components/schemas/CodeInterpreterCallItem'
+ - properties: {}
+ type: object
+ description: A code interpreter execution call with outputs
+ example:
+ code: print("hello")
+ container_id: ctr-xyz789
+ id: ci-abc123
+ outputs:
+ - logs: |
+ hello
+ type: logs
+ status: completed
+ type: code_interpreter_call
+ OutputCodeInterpreterServerToolItem:
+ description: An openrouter:code_interpreter server tool output item
+ example:
+ code: print("hello")
+ id: ci_tmp_abc123
+ language: python
+ status: completed
+ stdout: |
+ hello
+ type: openrouter:code_interpreter
+ properties:
+ code:
+ type: string
+ exitCode:
+ type: integer
+ id:
+ type: string
+ language:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ stderr:
+ type: string
+ stdout:
+ type: string
+ type:
+ enum:
+ - openrouter:code_interpreter
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputComputerCallItem:
+ example:
+ action:
+ type: screenshot
+ call_id: call-abc123
+ id: cu-abc123
+ pending_safety_checks: []
+ status: completed
+ type: computer_call
+ properties:
+ action:
+ nullable: true
+ call_id:
+ type: string
+ id:
+ type: string
+ pending_safety_checks:
+ items:
+ properties:
+ code:
+ type: string
+ id:
+ type: string
+ message:
+ type: string
+ required:
+ - id
+ - code
+ - message
+ type: object
+ type: array
+ status:
+ enum:
+ - completed
+ - incomplete
+ - in_progress
+ type: string
+ x-speakeasy-unknown-values: allow
+ type:
+ enum:
+ - computer_call
+ type: string
+ required:
+ - type
+ - call_id
+ - status
+ - pending_safety_checks
+ type: object
+ OutputDatetimeItem:
+ description: An openrouter:datetime server tool output item
+ example:
+ datetime: '2026-03-12T14:30:00.000Z'
+ id: dt_tmp_abc123
+ status: completed
+ timezone: UTC
+ type: openrouter:datetime
+ properties:
+ datetime:
+ description: ISO 8601 datetime string
+ type: string
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ timezone:
+ description: IANA timezone name
+ type: string
+ type:
+ enum:
+ - openrouter:datetime
+ type: string
+ required:
+ - status
+ - type
+ - datetime
+ - timezone
+ type: object
+ OutputFileSearchCallItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemFileSearchCall'
+ - properties: {}
+ type: object
+ example:
+ id: fs-abc123
+ queries:
+ - search term
+ results: []
+ status: completed
+ type: file_search_call
+ OutputFileSearchServerToolItem:
+ description: An openrouter:file_search server tool output item
+ example:
+ id: fs_tmp_abc123
+ queries:
+ - search term
+ status: completed
+ type: openrouter:file_search
+ properties:
+ id:
+ type: string
+ queries:
+ items:
+ type: string
+ type: array
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:file_search
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputFunctionCallItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemFunctionCall'
+ - properties: {}
+ type: object
+ example:
+ arguments: '{"location":"San Francisco"}'
+ call_id: call-abc123
+ id: fc-abc123
+ name: get_weather
+ status: completed
+ type: function_call
+ OutputImageGenerationCallItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemImageGenerationCall'
+ - properties: {}
+ type: object
+ example:
+ id: img-abc123
+ result: null
+ status: completed
+ type: image_generation_call
+ OutputImageGenerationServerToolItem:
+ description: An openrouter:image_generation server tool output item
+ example:
+ id: ig_tmp_abc123
+ imageUrl: https://example.com/image.png
+ status: completed
+ type: openrouter:image_generation
+ properties:
+ id:
+ type: string
+ imageB64:
+ type: string
+ imageUrl:
+ type: string
+ revisedPrompt:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:image_generation
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputItemAddedEvent:
+ 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
+ properties:
+ item:
+ discriminator:
+ mapping:
+ file_search_call: '#/components/schemas/OutputItemFileSearchCall'
+ function_call: '#/components/schemas/OutputItemFunctionCall'
+ image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
+ message: '#/components/schemas/OutputMessage'
+ reasoning: '#/components/schemas/OutputItemReasoning'
+ web_search_call: '#/components/schemas/OutputItemWebSearchCall'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/OutputMessage'
+ - $ref: '#/components/schemas/OutputItemReasoning'
+ - $ref: '#/components/schemas/OutputItemFunctionCall'
+ - $ref: '#/components/schemas/OutputItemWebSearchCall'
+ - $ref: '#/components/schemas/OutputItemFileSearchCall'
+ - $ref: '#/components/schemas/OutputItemImageGenerationCall'
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.output_item.added
+ type: string
+ required:
+ - type
+ - output_index
+ - item
+ - sequence_number
+ type: object
+ OutputItemDoneEvent:
+ 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
+ properties:
+ item:
+ discriminator:
+ mapping:
+ file_search_call: '#/components/schemas/OutputItemFileSearchCall'
+ function_call: '#/components/schemas/OutputItemFunctionCall'
+ image_generation_call: '#/components/schemas/OutputItemImageGenerationCall'
+ message: '#/components/schemas/OutputMessage'
+ reasoning: '#/components/schemas/OutputItemReasoning'
+ web_search_call: '#/components/schemas/OutputItemWebSearchCall'
+ propertyName: type
+ oneOf:
+ - $ref: '#/components/schemas/OutputMessage'
+ - $ref: '#/components/schemas/OutputItemReasoning'
+ - $ref: '#/components/schemas/OutputItemFunctionCall'
+ - $ref: '#/components/schemas/OutputItemWebSearchCall'
+ - $ref: '#/components/schemas/OutputItemFileSearchCall'
+ - $ref: '#/components/schemas/OutputItemImageGenerationCall'
+ output_index:
+ type: integer
+ sequence_number:
+ type: integer
+ type:
+ enum:
+ - response.output_item.done
+ type: string
+ required:
+ - type
+ - output_index
+ - item
+ - sequence_number
+ type: object
+ OutputItemFileSearchCall:
+ example:
+ id: filesearch-abc123
+ queries:
+ - machine learning algorithms
+ - neural networks
+ status: completed
+ type: file_search_call
+ properties:
+ id:
+ type: string
+ queries:
+ items:
+ type: string
+ type: array
+ status:
+ $ref: '#/components/schemas/WebSearchStatus'
+ type:
+ enum:
+ - file_search_call
+ type: string
+ required:
+ - type
+ - id
+ - queries
+ - status
+ type: object
+ OutputItemFunctionCall:
+ example:
+ arguments: '{"location":"San Francisco","unit":"celsius"}'
+ call_id: call-abc123
+ id: call-abc123
+ name: get_weather
+ type: function_call
+ properties:
+ arguments:
+ type: string
+ call_id:
+ type: string
+ id:
+ type: string
+ name:
+ type: string
+ status:
+ anyOf:
+ - enum:
+ - completed
+ type: string
+ - enum:
+ - incomplete
+ type: string
+ - enum:
+ - in_progress
+ type: string
+ type:
+ enum:
+ - function_call
+ type: string
+ required:
+ - type
+ - name
+ - arguments
+ - call_id
+ type: object
+ OutputItemImageGenerationCall:
+ example:
+ id: imagegen-abc123
+ result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
+ status: completed
+ type: image_generation_call
+ properties:
+ id:
+ type: string
+ result:
+ default: null
+ nullable: true
+ type: string
+ status:
+ $ref: '#/components/schemas/ImageGenerationStatus'
+ type:
+ enum:
+ - image_generation_call
+ type: string
+ required:
+ - type
+ - id
+ - status
+ type: object
+ OutputItemReasoning:
+ example:
+ id: reasoning-abc123
+ summary:
+ - text: Analyzed the problem using first principles
+ type: summary_text
+ type: reasoning
+ properties:
+ content:
+ items:
+ $ref: '#/components/schemas/ReasoningTextContent'
+ type: array
+ encrypted_content:
+ nullable: true
+ type: string
+ id:
+ type: string
+ status:
+ anyOf:
+ - enum:
+ - completed
+ type: string
+ - enum:
+ - incomplete
+ type: string
+ - enum:
+ - in_progress
+ type: string
+ summary:
+ items:
+ $ref: '#/components/schemas/ReasoningSummaryText'
+ type: array
+ type:
+ enum:
+ - reasoning
+ type: string
+ required:
+ - type
+ - id
+ - summary
+ type: object
+ OutputItems:
+ description: An output item from the response
+ discriminator:
+ mapping:
+ code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem'
+ computer_call: '#/components/schemas/OutputComputerCallItem'
+ file_search_call: '#/components/schemas/OutputFileSearchCallItem'
+ function_call: '#/components/schemas/OutputFunctionCallItem'
+ image_generation_call: '#/components/schemas/OutputImageGenerationCallItem'
+ message: '#/components/schemas/OutputMessageItem'
+ openrouter:apply_patch: '#/components/schemas/OutputApplyPatchServerToolItem'
+ openrouter:bash: '#/components/schemas/OutputBashServerToolItem'
+ openrouter:browser_use: '#/components/schemas/OutputBrowserUseServerToolItem'
+ openrouter:code_interpreter: '#/components/schemas/OutputCodeInterpreterServerToolItem'
+ openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
+ openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
+ openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
+ openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
+ openrouter:memory: '#/components/schemas/OutputMemoryServerToolItem'
+ openrouter:text_editor: '#/components/schemas/OutputTextEditorServerToolItem'
+ openrouter:tool_search: '#/components/schemas/OutputToolSearchServerToolItem'
+ openrouter:web_fetch: '#/components/schemas/OutputWebFetchServerToolItem'
+ openrouter:web_search: '#/components/schemas/OutputWebSearchServerToolItem'
+ reasoning: '#/components/schemas/OutputReasoningItem'
+ web_search_call: '#/components/schemas/OutputWebSearchCallItem'
+ propertyName: type
+ example:
+ content:
+ - text: Hello! How can I help you today?
+ type: output_text
+ id: msg-abc123
+ role: assistant
+ status: completed
+ type: message
+ oneOf:
+ - $ref: '#/components/schemas/OutputMessageItem'
+ - $ref: '#/components/schemas/OutputReasoningItem'
+ - $ref: '#/components/schemas/OutputFunctionCallItem'
+ - $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'
+ OutputItemWebSearchCall:
+ example:
+ action:
+ query: OpenAI API
+ type: search
+ id: search-abc123
+ status: completed
+ type: web_search_call
+ properties:
+ action:
+ oneOf:
+ - properties:
+ queries:
+ items:
+ type: string
+ type: array
+ query:
+ type: string
+ sources:
+ items:
+ $ref: '#/components/schemas/WebSearchSource'
+ type: array
+ type:
+ enum:
+ - search
+ type: string
+ required:
+ - type
+ - query
+ type: object
+ - properties:
+ type:
+ enum:
+ - open_page
+ type: string
+ url:
+ nullable: true
+ type: string
+ required:
+ - type
+ type: object
+ - properties:
+ pattern:
+ type: string
+ type:
+ enum:
+ - find_in_page
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - pattern
+ - url
+ type: object
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/WebSearchStatus'
+ type:
+ enum:
+ - web_search_call
+ type: string
+ required:
+ - type
+ - id
+ - action
+ - status
+ type: object
+ OutputMcpServerToolItem:
+ description: An openrouter:mcp server tool output item
+ example:
+ id: mcp_tmp_abc123
+ serverLabel: my-server
+ status: completed
+ toolName: get_data
+ type: openrouter:mcp
+ properties:
+ id:
+ type: string
+ serverLabel:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ toolName:
+ type: string
+ type:
+ enum:
+ - openrouter:mcp
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputMemoryServerToolItem:
+ description: An openrouter:memory server tool output item
+ example:
+ action: read
+ id: mem_tmp_abc123
+ key: user_preference
+ status: completed
+ type: openrouter:memory
+ properties:
+ action:
+ enum:
+ - read
+ - write
+ - delete
+ type: string
+ x-speakeasy-unknown-values: allow
+ id:
+ type: string
+ key:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:memory
+ type: string
+ value:
+ nullable: true
+ required:
+ - status
+ - type
+ type: object
+ OutputMessage:
+ example:
+ content:
+ - text: Hello! How can I help you today?
+ type: output_text
+ id: msg-abc123
+ role: assistant
+ status: completed
+ type: message
+ properties:
+ content:
+ items:
+ anyOf:
+ - $ref: '#/components/schemas/ResponseOutputText'
+ - $ref: '#/components/schemas/OpenAIResponsesRefusalContent'
+ type: array
+ id:
+ type: string
+ phase:
+ anyOf:
+ - enum:
+ - commentary
+ type: string
+ - enum:
+ - final_answer
+ type: string
+ - nullable: true
+ description: >-
+ The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.
+ role:
+ enum:
+ - assistant
+ type: string
+ status:
+ anyOf:
+ - enum:
+ - completed
+ type: string
+ - enum:
+ - incomplete
+ type: string
+ - enum:
+ - in_progress
+ type: string
+ type:
+ enum:
+ - message
+ type: string
+ required:
+ - id
+ - role
+ - type
+ - content
+ type: object
+ OutputMessageItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputMessage'
+ - properties: {}
+ type: object
+ description: An output message item
+ example:
+ content:
+ - annotations: []
+ text: Hello! How can I help you?
+ type: output_text
+ id: msg-123
+ role: assistant
+ status: completed
+ type: message
+ OutputModality:
+ enum:
+ - text
+ - image
+ - embeddings
+ - audio
+ - video
+ - rerank
+ example: text
+ type: string
+ x-speakeasy-unknown-values: allow
+ OutputModalityEnum:
+ enum:
+ - text
+ - image
+ example: text
+ type: string
+ x-speakeasy-unknown-values: allow
+ OutputReasoningItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemReasoning'
+ - properties:
+ content:
+ items:
+ $ref: '#/components/schemas/ReasoningTextContent'
+ nullable: true
+ type: array
+ format:
+ $ref: '#/components/schemas/ReasoningFormat'
+ signature:
+ description: A signature for the reasoning content, used for verification
+ example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
+ nullable: true
+ type: string
+ type: object
+ description: An output item containing reasoning
+ example:
+ content:
+ - text: First, we analyze the problem...
+ type: reasoning_text
+ format: anthropic-claude-v1
+ id: reasoning-123
+ signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
+ status: completed
+ summary:
+ - text: Analyzed the problem and found the optimal solution.
+ type: summary_text
+ type: reasoning
+ OutputTextEditorServerToolItem:
+ description: An openrouter:text_editor server tool output item
+ example:
+ command: view
+ filePath: /src/main.ts
+ id: te_tmp_abc123
+ status: completed
+ type: openrouter:text_editor
+ properties:
+ command:
+ enum:
+ - view
+ - create
+ - str_replace
+ - insert
+ type: string
+ x-speakeasy-unknown-values: allow
+ filePath:
+ type: string
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:text_editor
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputToolSearchServerToolItem:
+ description: An openrouter:tool_search server tool output item
+ example:
+ id: ts_tmp_abc123
+ query: weather tools
+ status: completed
+ type: openrouter:tool_search
+ properties:
+ id:
+ type: string
+ query:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:tool_search
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputWebFetchServerToolItem:
+ description: An openrouter:web_fetch server tool output item
+ example:
+ id: wf_tmp_abc123
+ status: completed
+ title: Example Domain
+ type: openrouter:web_fetch
+ url: https://example.com
+ properties:
+ content:
+ type: string
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ title:
+ type: string
+ type:
+ enum:
+ - openrouter:web_fetch
+ type: string
+ url:
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ OutputWebSearchCallItem:
+ allOf:
+ - $ref: '#/components/schemas/OutputItemWebSearchCall'
+ - properties: {}
+ type: object
+ example:
+ id: ws-abc123
+ status: completed
+ type: web_search_call
+ OutputWebSearchServerToolItem:
+ description: An openrouter:web_search server tool output item
+ example:
+ id: ws_tmp_abc123
+ status: completed
+ type: openrouter:web_search
+ properties:
+ id:
+ type: string
+ status:
+ $ref: '#/components/schemas/ToolCallStatus'
+ type:
+ enum:
+ - openrouter:web_search
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ Parameter:
+ enum:
+ - temperature
+ - top_p
+ - top_k
+ - min_p
+ - top_a
+ - frequency_penalty
+ - presence_penalty
+ - repetition_penalty
+ - max_tokens
+ - max_completion_tokens
+ - logit_bias
+ - logprobs
+ - top_logprobs
+ - seed
+ - response_format
+ - structured_outputs
+ - stop
+ - tools
+ - tool_choice
+ - parallel_tool_calls
+ - include_reasoning
+ - reasoning
+ - reasoning_effort
+ - web_search_options
+ - verbosity
+ example: temperature
+ type: string
+ x-speakeasy-unknown-values: allow
+ PayloadTooLargeResponse:
+ description: Payload Too Large - Request payload exceeds size limits
+ example:
+ error:
+ code: 413
+ message: Request payload too large
+ properties:
+ error:
+ $ref: '#/components/schemas/PayloadTooLargeResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ PayloadTooLargeResponseErrorData:
+ description: Error data for PayloadTooLargeResponse
+ example:
+ code: 413
+ message: Request payload too large
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ PaymentRequiredResponse:
+ description: Payment Required - Insufficient credits or quota to complete request
+ example:
+ error:
+ code: 402
+ message: Insufficient credits. Add more using https://openrouter.ai/credits
+ properties:
+ error:
+ $ref: '#/components/schemas/PaymentRequiredResponseErrorData'
+ user_id:
+ nullable: true
+ type: string
+ required:
+ - error
+ type: object
+ PaymentRequiredResponseErrorData:
+ description: Error data for PaymentRequiredResponse
+ example:
+ code: 402
+ message: Insufficient credits. Add more using https://openrouter.ai/credits
+ properties:
+ code:
+ type: integer
+ message:
+ type: string
+ metadata:
+ additionalProperties:
+ nullable: true
+ nullable: true
+ type: object
+ required:
+ - code
+ - message
+ type: object
+ PDFParserEngine:
+ anyOf:
+ - enum:
+ - mistral-ocr
+ - native
+ - cloudflare-ai
+ type: string
+ x-speakeasy-unknown-values: allow
+ - enum:
+ - pdf-text
+ type: string
+ description: >-
+ The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai".
+ example: cloudflare-ai
+ PDFParserOptions:
+ description: Options for PDF parsing.
+ example:
+ engine: cloudflare-ai
+ properties:
+ engine:
+ $ref: '#/components/schemas/PDFParserEngine'
+ type: object
+ PercentileLatencyCutoffs:
+ description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
+ example:
+ p50: 5
+ p90: 10
+ properties:
+ p50:
+ description: Maximum p50 latency (seconds)
+ format: double
+ type: number
+ p75:
+ description: Maximum p75 latency (seconds)
+ format: double
+ type: number
+ p90:
+ description: Maximum p90 latency (seconds)
+ format: double
+ type: number
+ p99:
+ description: Maximum p99 latency (seconds)
+ format: double
+ type: number
+ type: object
+ PercentileStats:
+ description: >-
+ Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
+ example:
+ p50: 25.5
+ p75: 35.2
+ p90: 48.7
+ p99: 85.3
+ nullable: true
+ properties:
+ p50:
+ description: Median (50th percentile)
+ example: 25.5
+ format: double
+ type: number
+ p75:
+ description: 75th percentile
+ example: 35.2
+ format: double
+ type: number
+ p90:
+ description: 90th percentile
+ example: 48.7
+ format: double
+ type: number
+ p99:
+ description: 99th percentile
+ example: 85.3
+ format: double
+ type: number
+ required:
+ - p50
+ - p75
+ - p90
+ - p99
+ type: object
+ PercentileThroughputCutoffs:
+ description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
+ example:
+ p50: 100
+ p90: 50
+ properties:
+ p50:
+ description: Minimum p50 throughput (tokens/sec)
+ format: double
+ type: number
+ p75:
+ description: Minimum p75 throughput (tokens/sec)
+ format: double
+ type: number
+ p90:
+ description: Minimum p90 throughput (tokens/sec)
+ format: double
+ type: number
+ p99:
+ description: Minimum p99 throughput (tokens/sec)
+ format: double
+ type: number
+ type: object
+ PerRequestLimits:
+ description: Per-request token limits
+ example:
+ completion_tokens: 1000
+ prompt_tokens: 1000
+ nullable: true
+ properties:
+ completion_tokens:
+ description: Maximum completion tokens per request
+ example: 1000
+ type: number
+ prompt_tokens:
+ description: Maximum prompt tokens per request
+ example: 1000
+ type: number
+ required:
+ - prompt_tokens
+ - completion_tokens
+ type: object
+ PreferredMaxLatency:
+ anyOf:
+ - format: double
+ type: number
+ - $ref: '#/components/schemas/PercentileLatencyCutoffs'
+ - nullable: true
+ description: >-
+ Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
+ example: 5
+ PreferredMinThroughput:
+ anyOf:
+ - format: double
+ type: number
+ - $ref: '#/components/schemas/PercentileThroughputCutoffs'
+ - nullable: true
+ description: >-
+ Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
+ example: 100
+ Preview_20250311_WebSearchServerTool:
+ description: Web search preview tool configuration (2025-03-11 version)
+ example:
+ type: web_search_preview_2025_03_11
+ properties:
+ engine:
+ $ref: '#/components/schemas/WebSearchEngineEnum'
+ filters:
+ $ref: '#/components/schemas/WebSearchDomainFilter'
+ 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
+ search_context_size:
+ $ref: '#/components/schemas/SearchContextSizeEnum'
+ type:
+ enum:
+ - web_search_preview_2025_03_11
+ type: string
+ user_location:
+ $ref: '#/components/schemas/Preview_WebSearchUserLocation'
+ required:
+ - type
+ type: object
+ Preview_WebSearchServerTool:
+ description: Web search preview tool configuration
+ example:
+ type: web_search_preview
+ properties:
+ engine:
+ $ref: '#/components/schemas/WebSearchEngineEnum'
+ filters:
+ $ref: '#/components/schemas/WebSearchDomainFilter'
+ 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
+ search_context_size:
+ $ref: '#/components/schemas/SearchContextSizeEnum'
+ type:
+ enum:
+ - web_search_preview
+ type: string
+ user_location:
+ $ref: '#/components/schemas/Preview_WebSearchUserLocation'
+ required:
+ - type
+ type: object
+ Preview_WebSearchUserLocation:
+ example:
+ city: San Francisco
+ country: USA
+ region: California
+ timezone: America/Los_Angeles
+ type: approximate
+ nullable: true
+ 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
+ required:
+ - type
+ type: object
+ ProviderName:
enum:
- AkashML
- AI21
@@ -4610,6 +10138,7 @@ components:
- Crusoe
- DeepInfra
- DeepSeek
+ - DekaLLM
- Featherless
- Fireworks
- Friendli
@@ -4644,6 +10173,7 @@ components:
- Parasail
- Perplexity
- Phala
+ - Recraft
- Reka
- Relace
- SambaNova
@@ -4663,9 +10193,594 @@ components:
- Z.AI
- FakeProvider
example: OpenAI
- x-speakeasy-unknown-values: allow
- Quantization:
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
+ 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
+ - 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
+ 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:
+ type: integer
+ max_prompt_tokens:
+ 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
+ type: number
+ uptime_last_30m:
+ format: double
+ 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
+ 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
@@ -4677,181 +10792,641 @@ components:
- fp32
- unknown
example: fp16
- x-speakeasy-unknown-values: allow
- ProviderSort:
type: string
- enum:
- - price
- - throughput
- - latency
- - exacto
- description: The provider sorting strategy (price, throughput, latency)
- example: price
x-speakeasy-unknown-values: allow
- ProviderSortConfig:
- type: object
- properties:
- by:
- type: string
- nullable: true
- enum:
- - price
- - throughput
- - latency
- - exacto
- description: The provider sorting strategy (price, throughput, latency)
- example: price
- x-speakeasy-unknown-values: allow
- partition:
- type: string
- nullable: true
- enum:
- - model
- - none
- 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.
- example: model
- x-speakeasy-unknown-values: allow
- description: The provider sorting strategy (price, throughput, latency)
- example:
- by: price
- partition: model
- BigNumberUnion:
- type: string
- description: Price per million prompt tokens
- example: 1000
- PercentileThroughputCutoffs:
- type: object
- properties:
- p50:
- type: number
- nullable: true
- description: Minimum p50 throughput (tokens/sec)
- p75:
- type: number
- nullable: true
- description: Minimum p75 throughput (tokens/sec)
- p90:
- type: number
- nullable: true
- description: Minimum p90 throughput (tokens/sec)
- p99:
- type: number
- nullable: true
- description: Minimum p99 throughput (tokens/sec)
- description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
- example:
- p50: 100
- p90: 50
- PreferredMinThroughput:
- anyOf:
- - type: number
- - $ref: '#/components/schemas/PercentileThroughputCutoffs'
+ ReasoningConfig:
+ allOf:
+ - $ref: '#/components/schemas/BaseReasoningConfig'
- nullable: true
- description: >-
- Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
- example: 100
- PercentileLatencyCutoffs:
- type: object
- properties:
- p50:
- type: number
- nullable: true
- description: Maximum p50 latency (seconds)
- p75:
- type: number
- nullable: true
- description: Maximum p75 latency (seconds)
- p90:
- type: number
- nullable: true
- description: Maximum p90 latency (seconds)
- p99:
- type: number
- nullable: true
- description: Maximum p99 latency (seconds)
- description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
+ properties:
+ enabled:
+ nullable: true
+ type: boolean
+ max_tokens:
+ type: integer
+ type: object
+ description: Configuration for reasoning mode in the response
example:
- p50: 5
- p90: 10
- PreferredMaxLatency:
- anyOf:
- - type: number
- - $ref: '#/components/schemas/PercentileLatencyCutoffs'
- - nullable: true
- description: >-
- Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
- example: 5
- WebSearchEngine:
- type: string
- enum:
- - native
- - exa
- - firecrawl
- - parallel
- description: The search engine to use for web search.
- x-speakeasy-unknown-values: allow
- PDFParserEngine:
- anyOf:
- - type: string
- enum:
- - mistral-ocr
- - native
- - cloudflare-ai
- x-speakeasy-unknown-values: allow
- - type: string
- enum:
- - pdf-text
- description: >-
- The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai".
- PDFParserOptions:
- type: object
+ 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:
- engine:
- $ref: '#/components/schemas/PDFParserEngine'
- description: Options for PDF parsing.
- ContextCompressionEngine:
- type: string
+ 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:
- - middle-out
- description: The compression engine to use. Defaults to "middle-out".
+ - 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'
+ 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:
- type: object
+ 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
+ type: number
+ image_config:
+ additionalProperties:
+ anyOf:
+ - type: string
+ - format: double
+ type: number
+ description: >-
+ Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ example:
+ aspect_ratio: '16:9'
+ type: object
+ include:
+ items:
+ $ref: '#/components/schemas/ResponseIncludesEnum'
+ nullable: true
+ type: array
input:
$ref: '#/components/schemas/Inputs'
instructions:
- type: string
nullable: true
+ type: string
+ max_output_tokens:
+ type: integer
+ max_tool_calls:
+ type: integer
metadata:
$ref: '#/components/schemas/RequestMetadata'
- tools:
+ 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
+ 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
+ type: number
+ text:
+ $ref: '#/components/schemas/TextExtendedConfig'
+ tool_choice:
+ $ref: '#/components/schemas/OpenAIResponsesToolChoice'
+ tools:
items:
anyOf:
- allOf:
- $ref: '#/components/schemas/FunctionTool'
- - type: object
- properties: {}
+ - properties: {}
+ type: object
description: Function tool definition
example:
- type: function
- name: get_weather
description: Get the current weather in a location
+ name: get_weather
parameters:
- type: object
properties:
location:
- type: string
description: The city and state
- unit:
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'
@@ -4867,10660 +11442,3271 @@ components:
- $ref: '#/components/schemas/CustomTool'
- $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
- tool_choice:
- $ref: '#/components/schemas/OpenAIResponsesToolChoice'
- parallel_tool_calls:
- type: boolean
- nullable: true
- model:
- type: string
- models:
type: array
- items:
- type: string
- text:
- $ref: '#/components/schemas/TextExtendedConfig'
- reasoning:
- $ref: '#/components/schemas/ReasoningConfig'
- max_output_tokens:
- type: number
- nullable: true
- temperature:
- type: number
- nullable: true
- minimum: 0
- maximum: 2
- top_p:
- type: number
- nullable: true
- minimum: 0
+ top_k:
+ type: integer
top_logprobs:
type: integer
- nullable: true
- minimum: 0
- maximum: 20
- max_tool_calls:
- type: integer
- nullable: true
- presence_penalty:
+ top_p:
+ format: double
type: number
- nullable: true
- minimum: -2
- maximum: 2
- frequency_penalty:
- type: number
- nullable: true
- minimum: -2
- maximum: 2
- top_k:
- type: number
- image_config:
- type: object
- additionalProperties:
- anyOf:
- - type: string
- - type: number
- description: >-
- Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- example:
- aspect_ratio: '16:9'
- modalities:
- type: array
- items:
- $ref: '#/components/schemas/OutputModalityEnum'
- description: Output modalities for the response. Supported values are "text" and "image".
- example:
- - text
- - image
- prompt_cache_key:
- type: string
- nullable: true
- previous_response_id:
- type: string
- nullable: true
- prompt:
- $ref: '#/components/schemas/StoredPromptTemplate'
- include:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/ResponseIncludesEnum'
- background:
- type: boolean
- nullable: true
- safety_identifier:
- type: string
- nullable: true
- store:
- type: boolean
- const: false
- default: false
- service_tier:
- type: string
- nullable: true
- enum:
- - auto
- - default
- - flex
- - priority
- - scale
- default: auto
- x-speakeasy-unknown-values: allow
+ trace:
+ $ref: '#/components/schemas/TraceConfig'
truncation:
$ref: '#/components/schemas/OpenAIResponsesTruncation'
- stream:
- type: boolean
- default: false
- provider:
- type: object
- nullable: true
- properties:
- allow_fallbacks:
- type: boolean
- nullable: true
- 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.
-
- require_parameters:
- type: boolean
- nullable: true
- 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.
- data_collection:
- $ref: '#/components/schemas/DataCollection'
- zdr:
- type: boolean
- nullable: true
- 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
- enforce_distillable_text:
- type: boolean
- nullable: true
- 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
- order:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- 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.
- only:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
- ignore:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
- quantizations:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/Quantization'
- description: A list of quantization levels to filter the provider by.
- 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
- max_price:
- type: object
- properties:
- prompt:
- $ref: '#/components/schemas/BigNumberUnion'
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per million completion tokens
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per image
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per audio unit
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per request
- description: >-
- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
- preferred_min_throughput:
- $ref: '#/components/schemas/PreferredMinThroughput'
- preferred_max_latency:
- $ref: '#/components/schemas/PreferredMaxLatency'
- additionalProperties: false
- description: When multiple model providers are available, optionally indicate your routing preference.
- plugins:
- type: array
- items:
- oneOf:
- - type: object
- properties:
- id:
- type: string
- enum:
- - auto-router
- enabled:
- type: boolean
- description: Set to false to disable the auto-router plugin for this request. Defaults to true.
- allowed_models:
- type: array
- items:
- type: string
- description: >-
- List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
- example:
- - anthropic/*
- - openai/gpt-4o
- - google/*
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - moderation
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - web
- enabled:
- type: boolean
- description: Set to false to disable the web-search plugin for this request. Defaults to true.
- max_results:
- type: number
- search_prompt:
- type: string
- engine:
- $ref: '#/components/schemas/WebSearchEngine'
- include_domains:
- type: array
- items:
- type: string
- description: >-
- A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
- example:
- - example.com
- - '*.substack.com'
- - openai.com/blog
- exclude_domains:
- type: array
- items:
- type: string
- description: >-
- A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
- example:
- - example.com
- - '*.substack.com'
- - openai.com/blog
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - file-parser
- enabled:
- type: boolean
- description: Set to false to disable the file-parser plugin for this request. Defaults to true.
- pdf:
- $ref: '#/components/schemas/PDFParserOptions'
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - response-healing
- enabled:
- type: boolean
- description: Set to false to disable the response-healing plugin for this request. Defaults to true.
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - context-compression
- enabled:
- type: boolean
- description: Set to false to disable the context-compression plugin for this request. Defaults to true.
- engine:
- $ref: '#/components/schemas/ContextCompressionEngine'
- required:
- - id
- description: Plugins you want to enable for this request, including their settings.
- route:
- type: string
- nullable: true
- enum:
- - fallback
- - sort
- deprecated: true
- description: >-
- **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
- x-speakeasy-deprecation-message: Use providers.sort.partition instead.
- x-speakeasy-ignore: true
- x-fern-ignore: true
- x-speakeasy-unknown-values: allow
user:
- type: string
- maxLength: 256
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.
- session_id:
- type: string
maxLength: 256
- 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.
- trace:
- type: object
- properties:
- trace_id:
- type: string
- trace_name:
- type: string
- span_name:
- type: string
- generation_name:
- type: string
- parent_span_id:
- type: string
- 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.
- description: Request schema for Responses endpoint
+ 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
+ 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:
- model: anthropic/claude-4.5-sonnet-20250929
- input:
- - type: message
- content: Hello, how are you?
- role: user
- temperature: 0.7
- top_p: 0.9
- tools:
- - type: function
- name: get_current_weather
- description: Get the current weather in a given location
- parameters:
- type: object
- properties:
- location:
- type: string
- BaseMessagesResult:
- type: object
+ error:
+ code: 503
+ message: Service temporarily unavailable
properties:
- id:
- type: string
- type:
- type: string
- enum:
- - message
- role:
- type: string
- enum:
- - assistant
- container:
- type: object
+ error:
+ $ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
+ user_id:
nullable: true
- properties:
- id:
- type: string
- expires_at:
- type: string
- required:
- - id
- - expires_at
- content:
- type: array
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- required:
- - type
- - text
- - citations
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_use
- id:
- type: string
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- name:
- type: string
- input:
- nullable: true
- required:
- - type
- - id
- - caller
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - thinking
- thinking:
- type: string
- signature:
- type: string
- required:
- - type
- - thinking
- - signature
- - type: object
- properties:
- type:
- type: string
- enum:
- - redacted_thinking
- data:
- type: string
- required:
- - type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - server_tool_use
- id:
- type: string
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- name:
- type: string
- enum:
- - web_search
- - web_fetch
- - code_execution
- - bash_code_execution
- - text_editor_code_execution
- - tool_search_tool_regex
- - tool_search_tool_bm25
- x-speakeasy-unknown-values: allow
- input:
- nullable: true
- required:
- - type
- - id
- - caller
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- tool_use_id:
- type: string
- content:
- anyOf:
- - type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result
- encrypted_content:
- type: string
- page_age:
- type: string
- nullable: true
- title:
- type: string
- url:
- type: string
- required:
- - type
- - encrypted_content
- - page_age
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - max_uses_exceeded
- - too_many_requests
- - query_too_long
- - request_too_large
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- required:
- - type
- - caller
- - tool_use_id
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_fetch_tool_result
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- content:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_fetch_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - url_too_long
- - url_not_allowed
- - url_not_accessible
- - unsupported_content_type
- - too_many_requests
- - max_uses_exceeded
- - unavailable
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- - type: object
- properties:
- content:
- type: object
- properties:
- citations:
- type: object
- nullable: true
- properties:
- enabled:
- type: boolean
- required:
- - enabled
- source:
- anyOf:
- - type: object
- properties:
- data:
- type: string
- media_type:
- type: string
- enum:
- - application/pdf
- type:
- type: string
- enum:
- - base64
- required:
- - data
- - media_type
- - type
- - type: object
- properties:
- data:
- type: string
- media_type:
- type: string
- enum:
- - text/plain
- type:
- type: string
- enum:
- - text
- required:
- - data
- - media_type
- - type
- title:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - document
- required:
- - citations
- - source
- - title
- - type
- retrieved_at:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - web_fetch_result
- url:
- type: string
- required:
- - content
- - retrieved_at
- - type
- - url
- tool_use_id:
- type: string
- required:
- - type
- - caller
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- x-speakeasy-unknown-values: allow
- type:
- type: string
- enum:
- - code_execution_tool_result_error
- required:
- - error_code
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - code_execution_output
- required:
- - file_id
- - type
- return_code:
- type: number
- stderr:
- type: string
- stdout:
- type: string
- type:
- type: string
- enum:
- - code_execution_result
- required:
- - content
- - return_code
- - stderr
- - stdout
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - code_execution_output
- required:
- - file_id
- - type
- encrypted_stdout:
- type: string
- return_code:
- type: number
- stderr:
- type: string
- type:
- type: string
- enum:
- - encrypted_code_execution_result
- required:
- - content
- - encrypted_stdout
- - return_code
- - stderr
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - bash_code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- - output_file_too_large
- x-speakeasy-unknown-values: allow
- type:
- type: string
- enum:
- - bash_code_execution_tool_result_error
- required:
- - error_code
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - bash_code_execution_output
- required:
- - file_id
- - type
- return_code:
- type: number
- stderr:
- type: string
- stdout:
- type: string
- type:
- type: string
- enum:
- - bash_code_execution_result
- required:
- - content
- - return_code
- - stderr
- - stdout
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - text_editor_code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- - file_not_found
- x-speakeasy-unknown-values: allow
- error_message:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_tool_result_error
- required:
- - error_code
- - error_message
- - type
- - type: object
- properties:
- content:
- type: string
- file_type:
- type: string
- enum:
- - text
- - image
- - pdf
- x-speakeasy-unknown-values: allow
- num_lines:
- type: number
- nullable: true
- start_line:
- type: number
- nullable: true
- total_lines:
- type: number
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_view_result
- required:
- - content
- - file_type
- - num_lines
- - start_line
- - total_lines
- - type
- - type: object
- properties:
- is_file_update:
- type: boolean
- type:
- type: string
- enum:
- - text_editor_code_execution_create_result
- required:
- - is_file_update
- - type
- - type: object
- properties:
- lines:
- type: array
- nullable: true
- items:
- type: string
- new_lines:
- type: number
- nullable: true
- new_start:
- type: number
- nullable: true
- old_lines:
- type: number
- nullable: true
- old_start:
- type: number
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_str_replace_result
- required:
- - lines
- - new_lines
- - new_start
- - old_lines
- - old_start
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_search_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- x-speakeasy-unknown-values: allow
- error_message:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - tool_search_tool_result_error
- required:
- - error_code
- - error_message
- - type
- - type: object
- properties:
- tool_references:
- type: array
- items:
- type: object
- properties:
- tool_name:
- type: string
- type:
- type: string
- enum:
- - tool_reference
- required:
- - tool_name
- - type
- type:
- type: string
- enum:
- - tool_search_tool_search_result
- required:
- - tool_references
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - container_upload
- file_id:
- type: string
- required:
- - type
- - file_id
- model:
type: string
- stop_reason:
- type: string
- nullable: true
- enum:
- - end_turn
- - max_tokens
- - stop_sequence
- - tool_use
- - pause_turn
- - refusal
- x-speakeasy-unknown-values: allow
- stop_sequence:
- type: string
- nullable: true
- usage:
- type: object
- properties:
- input_tokens:
- type: number
- output_tokens:
- type: number
- cache_creation_input_tokens:
- type: number
- nullable: true
- cache_read_input_tokens:
- type: number
- nullable: true
- cache_creation:
- type: object
- nullable: true
- properties:
- ephemeral_5m_input_tokens:
- type: number
- ephemeral_1h_input_tokens:
- type: number
- required:
- - ephemeral_5m_input_tokens
- - ephemeral_1h_input_tokens
- inference_geo:
- type: string
- nullable: true
- server_tool_use:
- type: object
- nullable: true
- properties:
- web_search_requests:
- type: number
- web_fetch_requests:
- type: number
- required:
- - web_search_requests
- - web_fetch_requests
- service_tier:
- type: string
- nullable: true
- enum:
- - standard
- - priority
- - batch
- x-speakeasy-unknown-values: allow
- speed:
- type: string
- nullable: true
- enum:
- - fast
- - standard
- x-speakeasy-unknown-values: allow
- required:
- - input_tokens
- - output_tokens
- - cache_creation_input_tokens
- - cache_read_input_tokens
- - cache_creation
- - inference_geo
- - server_tool_use
- - service_tier
required:
- - id
- - type
- - role
- - container
- - content
- - model
- - stop_reason
- - stop_sequence
- - usage
- MessagesResult:
- allOf:
- - $ref: '#/components/schemas/BaseMessagesResult'
- - type: object
- properties:
- usage:
- type: object
- properties:
- input_tokens:
- type: number
- output_tokens:
- type: number
- cache_creation_input_tokens:
- type: number
- nullable: true
- cache_read_input_tokens:
- type: number
- nullable: true
- cache_creation:
- type: object
- nullable: true
- properties:
- ephemeral_5m_input_tokens:
- type: number
- ephemeral_1h_input_tokens:
- type: number
- required:
- - ephemeral_5m_input_tokens
- - ephemeral_1h_input_tokens
- inference_geo:
- type: string
- nullable: true
- server_tool_use:
- type: object
- nullable: true
- properties:
- web_search_requests:
- type: number
- web_fetch_requests:
- type: number
- required:
- - web_search_requests
- - web_fetch_requests
- service_tier:
- type: string
- nullable: true
- speed:
- type: string
- nullable: true
- enum:
- - fast
- - standard
- x-speakeasy-unknown-values: allow
- cost:
- type: number
- nullable: true
- is_byok:
- type: boolean
- cost_details:
- type: object
- nullable: true
- properties:
- upstream_inference_cost:
- type: number
- nullable: true
- upstream_inference_prompt_cost:
- type: number
- upstream_inference_completions_cost:
- type: number
- required:
- - upstream_inference_prompt_cost
- - upstream_inference_completions_cost
- required:
- - input_tokens
- - output_tokens
- - cache_creation_input_tokens
- - cache_read_input_tokens
- - cache_creation
- - inference_geo
- - server_tool_use
- - service_tier
- provider:
- type: string
- 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
- - 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
- - Reka
- - Relace
- - SambaNova
- - Seed
- - SiliconFlow
- - Sourceful
- - StepFun
- - Stealth
- - StreamLake
- - Switchpoint
- - Together
- - Upstage
- - Venice
- - WandB
- - Xiaomi
- - xAI
- - Z.AI
- - FakeProvider
- x-speakeasy-unknown-values: allow
- description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions
+ - error
+ type: object
+ ServiceUnavailableResponseErrorData:
+ description: Error data for ServiceUnavailableResponse
example:
- id: msg_01XFDUDYJgAACzvnptvVoYEL
- type: message
- role: assistant
- container: null
- content:
- - type: text
- text: Hello! I'm doing well, thank you for asking.
- citations: null
- model: claude-sonnet-4-5-20250929
- stop_reason: end_turn
- stop_sequence: null
- usage:
- input_tokens: 12
- output_tokens: 15
- cache_creation_input_tokens: null
- cache_read_input_tokens: null
- cache_creation: null
- inference_geo: null
- server_tool_use: null
- service_tier: standard
- MessagesStartEvent:
- type: object
- properties:
- type:
- type: string
- enum:
- - message_start
- message:
- type: object
- properties:
- id:
- type: string
- type:
- type: string
- enum:
- - message
- role:
- type: string
- enum:
- - assistant
- container:
- type: object
- nullable: true
- properties:
- id:
- type: string
- expires_at:
- type: string
- required:
- - id
- - expires_at
- content:
- type: array
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- required:
- - type
- - text
- - citations
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_use
- id:
- type: string
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- name:
- type: string
- input:
- nullable: true
- required:
- - type
- - id
- - caller
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - thinking
- thinking:
- type: string
- signature:
- type: string
- required:
- - type
- - thinking
- - signature
- - type: object
- properties:
- type:
- type: string
- enum:
- - redacted_thinking
- data:
- type: string
- required:
- - type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - server_tool_use
- id:
- type: string
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- name:
- type: string
- enum:
- - web_search
- - web_fetch
- - code_execution
- - bash_code_execution
- - text_editor_code_execution
- - tool_search_tool_regex
- - tool_search_tool_bm25
- x-speakeasy-unknown-values: allow
- input:
- nullable: true
- required:
- - type
- - id
- - caller
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- tool_use_id:
- type: string
- content:
- anyOf:
- - type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result
- encrypted_content:
- type: string
- page_age:
- type: string
- nullable: true
- title:
- type: string
- url:
- type: string
- required:
- - type
- - encrypted_content
- - page_age
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - max_uses_exceeded
- - too_many_requests
- - query_too_long
- - request_too_large
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- required:
- - type
- - caller
- - tool_use_id
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_fetch_tool_result
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- content:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_fetch_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - url_too_long
- - url_not_allowed
- - url_not_accessible
- - unsupported_content_type
- - too_many_requests
- - max_uses_exceeded
- - unavailable
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- - type: object
- properties:
- content:
- type: object
- properties:
- citations:
- type: object
- nullable: true
- properties:
- enabled:
- type: boolean
- required:
- - enabled
- source:
- anyOf:
- - type: object
- properties:
- data:
- type: string
- media_type:
- type: string
- enum:
- - application/pdf
- type:
- type: string
- enum:
- - base64
- required:
- - data
- - media_type
- - type
- - type: object
- properties:
- data:
- type: string
- media_type:
- type: string
- enum:
- - text/plain
- type:
- type: string
- enum:
- - text
- required:
- - data
- - media_type
- - type
- title:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - document
- required:
- - citations
- - source
- - title
- - type
- retrieved_at:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - web_fetch_result
- url:
- type: string
- required:
- - content
- - retrieved_at
- - type
- - url
- tool_use_id:
- type: string
- required:
- - type
- - caller
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- x-speakeasy-unknown-values: allow
- type:
- type: string
- enum:
- - code_execution_tool_result_error
- required:
- - error_code
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - code_execution_output
- required:
- - file_id
- - type
- return_code:
- type: number
- stderr:
- type: string
- stdout:
- type: string
- type:
- type: string
- enum:
- - code_execution_result
- required:
- - content
- - return_code
- - stderr
- - stdout
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - code_execution_output
- required:
- - file_id
- - type
- encrypted_stdout:
- type: string
- return_code:
- type: number
- stderr:
- type: string
- type:
- type: string
- enum:
- - encrypted_code_execution_result
- required:
- - content
- - encrypted_stdout
- - return_code
- - stderr
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - bash_code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- - output_file_too_large
- x-speakeasy-unknown-values: allow
- type:
- type: string
- enum:
- - bash_code_execution_tool_result_error
- required:
- - error_code
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - bash_code_execution_output
- required:
- - file_id
- - type
- return_code:
- type: number
- stderr:
- type: string
- stdout:
- type: string
- type:
- type: string
- enum:
- - bash_code_execution_result
- required:
- - content
- - return_code
- - stderr
- - stdout
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - text_editor_code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- - file_not_found
- x-speakeasy-unknown-values: allow
- error_message:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_tool_result_error
- required:
- - error_code
- - error_message
- - type
- - type: object
- properties:
- content:
- type: string
- file_type:
- type: string
- enum:
- - text
- - image
- - pdf
- x-speakeasy-unknown-values: allow
- num_lines:
- type: number
- nullable: true
- start_line:
- type: number
- nullable: true
- total_lines:
- type: number
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_view_result
- required:
- - content
- - file_type
- - num_lines
- - start_line
- - total_lines
- - type
- - type: object
- properties:
- is_file_update:
- type: boolean
- type:
- type: string
- enum:
- - text_editor_code_execution_create_result
- required:
- - is_file_update
- - type
- - type: object
- properties:
- lines:
- type: array
- nullable: true
- items:
- type: string
- new_lines:
- type: number
- nullable: true
- new_start:
- type: number
- nullable: true
- old_lines:
- type: number
- nullable: true
- old_start:
- type: number
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_str_replace_result
- required:
- - lines
- - new_lines
- - new_start
- - old_lines
- - old_start
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_search_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- x-speakeasy-unknown-values: allow
- error_message:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - tool_search_tool_result_error
- required:
- - error_code
- - error_message
- - type
- - type: object
- properties:
- tool_references:
- type: array
- items:
- type: object
- properties:
- tool_name:
- type: string
- type:
- type: string
- enum:
- - tool_reference
- required:
- - tool_name
- - type
- type:
- type: string
- enum:
- - tool_search_tool_search_result
- required:
- - tool_references
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - container_upload
- file_id:
- type: string
- required:
- - type
- - file_id
- model:
- type: string
- stop_reason:
- nullable: true
- stop_sequence:
- nullable: true
- usage:
- type: object
- properties:
- input_tokens:
- type: number
- output_tokens:
- type: number
- cache_creation_input_tokens:
- type: number
- nullable: true
- cache_read_input_tokens:
- type: number
- nullable: true
- cache_creation:
- type: object
- nullable: true
- properties:
- ephemeral_5m_input_tokens:
- type: number
- ephemeral_1h_input_tokens:
- type: number
- required:
- - ephemeral_5m_input_tokens
- - ephemeral_1h_input_tokens
- inference_geo:
- type: string
- nullable: true
- server_tool_use:
- type: object
- nullable: true
- properties:
- web_search_requests:
- type: number
- web_fetch_requests:
- type: number
- required:
- - web_search_requests
- - web_fetch_requests
- service_tier:
- type: string
- nullable: true
- enum:
- - standard
- - priority
- - batch
- x-speakeasy-unknown-values: allow
- speed:
- type: string
- nullable: true
- enum:
- - fast
- - standard
- x-speakeasy-unknown-values: allow
- required:
- - input_tokens
- - output_tokens
- - cache_creation_input_tokens
- - cache_read_input_tokens
- - cache_creation
- - inference_geo
- - server_tool_use
- - service_tier
- provider:
- type: string
- 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
- - 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
- - Reka
- - Relace
- - SambaNova
- - Seed
- - SiliconFlow
- - Sourceful
- - StepFun
- - Stealth
- - StreamLake
- - Switchpoint
- - Together
- - Upstage
- - Venice
- - WandB
- - Xiaomi
- - xAI
- - Z.AI
- - FakeProvider
- x-speakeasy-unknown-values: allow
- required:
- - id
- - type
- - role
- - container
- - content
- - model
- - stop_reason
- - stop_sequence
- - usage
- required:
- - type
- - message
- description: Event sent at the start of a streaming message
- MessagesStreamEvents:
- oneOf:
- - $ref: '#/components/schemas/MessagesStartEvent'
- - type: object
- properties:
- type:
- type: string
- enum:
- - message_delta
- delta:
- type: object
- properties:
- container:
- type: object
- nullable: true
- properties:
- id:
- type: string
- expires_at:
- type: string
- required:
- - id
- - expires_at
- stop_reason:
- type: string
- nullable: true
- enum:
- - end_turn
- - max_tokens
- - stop_sequence
- - tool_use
- - pause_turn
- - refusal
- x-speakeasy-unknown-values: allow
- stop_sequence:
- type: string
- nullable: true
- required:
- - container
- - stop_reason
- - stop_sequence
- usage:
- type: object
- properties:
- input_tokens:
- type: number
- nullable: true
- output_tokens:
- type: number
- cache_creation_input_tokens:
- type: number
- nullable: true
- cache_read_input_tokens:
- type: number
- nullable: true
- server_tool_use:
- type: object
- nullable: true
- properties:
- web_search_requests:
- type: number
- web_fetch_requests:
- type: number
- required:
- - web_search_requests
- - web_fetch_requests
- required:
- - input_tokens
- - output_tokens
- - cache_creation_input_tokens
- - cache_read_input_tokens
- - server_tool_use
- required:
- - type
- - delta
- - usage
- - type: object
- properties:
- type:
- type: string
- enum:
- - message_stop
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_start
- index:
- type: number
- content_block:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- required:
- - type
- - text
- - citations
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_use
- id:
- type: string
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- name:
- type: string
- input:
- nullable: true
- required:
- - type
- - id
- - caller
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - thinking
- thinking:
- type: string
- signature:
- type: string
- required:
- - type
- - thinking
- - signature
- - type: object
- properties:
- type:
- type: string
- enum:
- - redacted_thinking
- data:
- type: string
- required:
- - type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - server_tool_use
- id:
- type: string
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- name:
- type: string
- enum:
- - web_search
- - web_fetch
- - code_execution
- - bash_code_execution
- - text_editor_code_execution
- - tool_search_tool_regex
- - tool_search_tool_bm25
- x-speakeasy-unknown-values: allow
- input:
- nullable: true
- required:
- - type
- - id
- - caller
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- tool_use_id:
- type: string
- content:
- anyOf:
- - type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result
- encrypted_content:
- type: string
- page_age:
- type: string
- nullable: true
- title:
- type: string
- url:
- type: string
- required:
- - type
- - encrypted_content
- - page_age
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - max_uses_exceeded
- - too_many_requests
- - query_too_long
- - request_too_large
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- required:
- - type
- - caller
- - tool_use_id
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_fetch_tool_result
- caller:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - direct
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20250825
- tool_id:
- type: string
- required:
- - type
- - tool_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_20260120
- tool_id:
- type: string
- required:
- - type
- - tool_id
- content:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_fetch_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - url_too_long
- - url_not_allowed
- - url_not_accessible
- - unsupported_content_type
- - too_many_requests
- - max_uses_exceeded
- - unavailable
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- - type: object
- properties:
- content:
- type: object
- properties:
- citations:
- type: object
- nullable: true
- properties:
- enabled:
- type: boolean
- required:
- - enabled
- source:
- anyOf:
- - type: object
- properties:
- data:
- type: string
- media_type:
- type: string
- enum:
- - application/pdf
- type:
- type: string
- enum:
- - base64
- required:
- - data
- - media_type
- - type
- - type: object
- properties:
- data:
- type: string
- media_type:
- type: string
- enum:
- - text/plain
- type:
- type: string
- enum:
- - text
- required:
- - data
- - media_type
- - type
- title:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - document
- required:
- - citations
- - source
- - title
- - type
- retrieved_at:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - web_fetch_result
- url:
- type: string
- required:
- - content
- - retrieved_at
- - type
- - url
- tool_use_id:
- type: string
- required:
- - type
- - caller
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- x-speakeasy-unknown-values: allow
- type:
- type: string
- enum:
- - code_execution_tool_result_error
- required:
- - error_code
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - code_execution_output
- required:
- - file_id
- - type
- return_code:
- type: number
- stderr:
- type: string
- stdout:
- type: string
- type:
- type: string
- enum:
- - code_execution_result
- required:
- - content
- - return_code
- - stderr
- - stdout
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - code_execution_output
- required:
- - file_id
- - type
- encrypted_stdout:
- type: string
- return_code:
- type: number
- stderr:
- type: string
- type:
- type: string
- enum:
- - encrypted_code_execution_result
- required:
- - content
- - encrypted_stdout
- - return_code
- - stderr
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - bash_code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- - output_file_too_large
- x-speakeasy-unknown-values: allow
- type:
- type: string
- enum:
- - bash_code_execution_tool_result_error
- required:
- - error_code
- - type
- - type: object
- properties:
- content:
- type: array
- items:
- type: object
- properties:
- file_id:
- type: string
- type:
- type: string
- enum:
- - bash_code_execution_output
- required:
- - file_id
- - type
- return_code:
- type: number
- stderr:
- type: string
- stdout:
- type: string
- type:
- type: string
- enum:
- - bash_code_execution_result
- required:
- - content
- - return_code
- - stderr
- - stdout
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - text_editor_code_execution_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- - file_not_found
- x-speakeasy-unknown-values: allow
- error_message:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_tool_result_error
- required:
- - error_code
- - error_message
- - type
- - type: object
- properties:
- content:
- type: string
- file_type:
- type: string
- enum:
- - text
- - image
- - pdf
- x-speakeasy-unknown-values: allow
- num_lines:
- type: number
- nullable: true
- start_line:
- type: number
- nullable: true
- total_lines:
- type: number
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_view_result
- required:
- - content
- - file_type
- - num_lines
- - start_line
- - total_lines
- - type
- - type: object
- properties:
- is_file_update:
- type: boolean
- type:
- type: string
- enum:
- - text_editor_code_execution_create_result
- required:
- - is_file_update
- - type
- - type: object
- properties:
- lines:
- type: array
- nullable: true
- items:
- type: string
- new_lines:
- type: number
- nullable: true
- new_start:
- type: number
- nullable: true
- old_lines:
- type: number
- nullable: true
- old_start:
- type: number
- nullable: true
- type:
- type: string
- enum:
- - text_editor_code_execution_str_replace_result
- required:
- - lines
- - new_lines
- - new_start
- - old_lines
- - old_start
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_search_tool_result
- content:
- oneOf:
- - type: object
- properties:
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - too_many_requests
- - execution_time_exceeded
- x-speakeasy-unknown-values: allow
- error_message:
- type: string
- nullable: true
- type:
- type: string
- enum:
- - tool_search_tool_result_error
- required:
- - error_code
- - error_message
- - type
- - type: object
- properties:
- tool_references:
- type: array
- items:
- type: object
- properties:
- tool_name:
- type: string
- type:
- type: string
- enum:
- - tool_reference
- required:
- - tool_name
- - type
- type:
- type: string
- enum:
- - tool_search_tool_search_result
- required:
- - tool_references
- - type
- tool_use_id:
- type: string
- required:
- - type
- - content
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - container_upload
- file_id:
- type: string
- required:
- - type
- - file_id
- required:
- - type
- - index
- - content_block
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_delta
- index:
- type: number
- delta:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text_delta
- text:
- type: string
- required:
- - type
- - text
- - type: object
- properties:
- type:
- type: string
- enum:
- - input_json_delta
- partial_json:
- type: string
- required:
- - type
- - partial_json
- - type: object
- properties:
- type:
- type: string
- enum:
- - thinking_delta
- thinking:
- type: string
- required:
- - type
- - thinking
- - type: object
- properties:
- type:
- type: string
- enum:
- - signature_delta
- signature:
- type: string
- required:
- - type
- - signature
- - type: object
- properties:
- type:
- type: string
- enum:
- - citations_delta
- citation:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- file_id:
- type: string
- nullable: true
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - file_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- required:
- - type
- - citation
- required:
- - type
- - index
- - delta
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_stop
- index:
- type: number
- required:
- - type
- - index
- - type: object
- properties:
- type:
- type: string
- enum:
- - ping
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- description: Union of all possible streaming events
- MessagesMessageParam:
- type: object
- properties:
- role:
- type: string
- enum:
- - user
- - assistant
- x-speakeasy-unknown-values: allow
- content:
- anyOf:
- - type: string
- - type: array
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- - type: object
- properties:
- type:
- type: string
- enum:
- - image
- source:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - base64
- media_type:
- type: string
- enum:
- - image/jpeg
- - image/png
- - image/gif
- - image/webp
- x-speakeasy-unknown-values: allow
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- - type: object
- properties:
- type:
- type: string
- enum:
- - document
- source:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - base64
- media_type:
- type: string
- enum:
- - application/pdf
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- media_type:
- type: string
- enum:
- - text/plain
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - content
- content:
- anyOf:
- - type: string
- - type: array
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- - type: object
- properties:
- type:
- type: string
- enum:
- - image
- source:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - base64
- media_type:
- type: string
- enum:
- - image/jpeg
- - image/png
- - image/gif
- - image/webp
- x-speakeasy-unknown-values: allow
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- required:
- - type
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- citations:
- type: object
- nullable: true
- properties:
- enabled:
- type: boolean
- context:
- type: string
- nullable: true
- title:
- type: string
- nullable: true
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_use
- id:
- type: string
- name:
- type: string
- input:
- nullable: true
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - id
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_result
- tool_use_id:
- type: string
- content:
- anyOf:
- - type: string
- - type: array
- items:
- anyOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- - type: object
- properties:
- type:
- type: string
- enum:
- - image
- source:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - base64
- media_type:
- type: string
- enum:
- - image/jpeg
- - image/png
- - image/gif
- - image/webp
- x-speakeasy-unknown-values: allow
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_reference
- tool_name:
- type: string
- required:
- - type
- - tool_name
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result
- source:
- type: string
- title:
- type: string
- content:
- type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- citations:
- type: object
- properties:
- enabled:
- type: boolean
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- - title
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - document
- source:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - base64
- media_type:
- type: string
- enum:
- - application/pdf
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- media_type:
- type: string
- enum:
- - text/plain
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - content
- content:
- anyOf:
- - type: string
- - type: array
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- - type: object
- properties:
- type:
- type: string
- enum:
- - image
- source:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - base64
- media_type:
- type: string
- enum:
- - image/jpeg
- - image/png
- - image/gif
- - image/webp
- x-speakeasy-unknown-values: allow
- data:
- type: string
- required:
- - type
- - media_type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- required:
- - type
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - url
- url:
- type: string
- required:
- - type
- - url
- citations:
- type: object
- nullable: true
- properties:
- enabled:
- type: boolean
- context:
- type: string
- nullable: true
- title:
- type: string
- nullable: true
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- is_error:
- type: boolean
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - tool_use_id
- - type: object
- properties:
- type:
- type: string
- enum:
- - thinking
- thinking:
- type: string
- signature:
- type: string
- required:
- - type
- - thinking
- - signature
- - type: object
- properties:
- type:
- type: string
- enum:
- - redacted_thinking
- data:
- type: string
- required:
- - type
- - data
- - type: object
- properties:
- type:
- type: string
- enum:
- - server_tool_use
- id:
- type: string
- name:
- type: string
- enum:
- - web_search
- - web_fetch
- - code_execution
- - bash_code_execution
- - text_editor_code_execution
- - tool_search_tool_regex
- - tool_search_tool_bm25
- x-speakeasy-unknown-values: allow
- input:
- nullable: true
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - id
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result
- tool_use_id:
- type: string
- content:
- anyOf:
- - type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result
- encrypted_content:
- type: string
- title:
- type: string
- url:
- type: string
- page_age:
- type: string
- nullable: true
- required:
- - type
- - encrypted_content
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_tool_result_error
- error_code:
- type: string
- enum:
- - invalid_tool_input
- - unavailable
- - max_uses_exceeded
- - too_many_requests
- - query_too_long
- x-speakeasy-unknown-values: allow
- required:
- - type
- - error_code
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - tool_use_id
- - content
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result
- source:
- type: string
- title:
- type: string
- content:
- type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- citations:
- type: object
- properties:
- enabled:
- type: boolean
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - source
- - title
- - content
- required:
- - role
- - content
- description: Anthropic message with OpenRouter extensions
- MessagesWebSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - openrouter:web_search
- parameters:
- type: object
- properties:
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- max_total_results:
- type: number
- minimum: 1
- 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
- search_context_size:
- type: string
- enum:
- - low
- - medium
- - high
- 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.
- x-speakeasy-unknown-values: allow
- user_location:
- type: object
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- region:
- type: string
- country:
- type: string
- timezone:
- type: string
- description: Approximate user location for location-biased results.
- allowed_domains:
- type: array
- items:
- type: string
- description: >-
- Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- excluded_domains:
- type: array
- items:
- type: string
- description: >-
- Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- required:
- - type
- description: 'OpenRouter built-in server tool: searches the web for current information'
- example:
- type: openrouter:web_search
- parameters:
- max_results: 5
- MessagesOutputConfig:
- type: object
- properties:
- effort:
- type: string
- nullable: true
- enum:
- - low
- - medium
- - high
- - max
- 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`.
- example: medium
- x-speakeasy-unknown-values: allow
- format:
- type: object
- nullable: true
- properties:
- type:
- type: string
- enum:
- - json_schema
- schema:
- type: object
- additionalProperties:
- nullable: true
- required:
- - type
- - schema
- description: >-
- A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).
- description: Configuration for controlling output behavior. Supports the effort parameter and structured output format.
- MessagesRequest:
- type: object
- properties:
- model:
- type: string
- max_tokens:
- type: number
- messages:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/MessagesMessageParam'
- system:
- anyOf:
- - type: string
- - type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- citations:
- type: array
- nullable: true
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - char_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_char_index:
- type: number
- end_char_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_char_index
- - end_char_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - page_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_page_number:
- type: number
- end_page_number:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_page_number
- - end_page_number
- - type: object
- properties:
- type:
- type: string
- enum:
- - content_block_location
- cited_text:
- type: string
- document_index:
- type: number
- document_title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - document_index
- - document_title
- - start_block_index
- - end_block_index
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_result_location
- cited_text:
- type: string
- encrypted_index:
- type: string
- title:
- type: string
- nullable: true
- url:
- type: string
- required:
- - type
- - cited_text
- - encrypted_index
- - title
- - url
- - type: object
- properties:
- type:
- type: string
- enum:
- - search_result_location
- cited_text:
- type: string
- search_result_index:
- type: number
- source:
- type: string
- title:
- type: string
- nullable: true
- start_block_index:
- type: number
- end_block_index:
- type: number
- required:
- - type
- - cited_text
- - search_result_index
- - source
- - title
- - start_block_index
- - end_block_index
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - text
- metadata:
- type: object
- properties:
- user_id:
- type: string
- nullable: true
- stop_sequences:
- type: array
- items:
- type: string
- temperature:
- type: number
- top_p:
- type: number
- top_k:
- type: number
- tools:
- type: array
- items:
- anyOf:
- - type: object
- properties:
- name:
- type: string
- description:
- type: string
- input_schema:
- type: object
- properties:
- type:
- type: string
- default: object
- properties:
- nullable: true
- required:
- type: array
- nullable: true
- items:
- type: string
- additionalProperties:
- nullable: true
- type:
- type: string
- enum:
- - custom
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - name
- - input_schema
- - type: object
- properties:
- type:
- type: string
- enum:
- - bash_20250124
- name:
- type: string
- enum:
- - bash
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - text_editor_20250124
- name:
- type: string
- enum:
- - str_replace_editor
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_20250305
- name:
- type: string
- enum:
- - web_search
- allowed_domains:
- type: array
- nullable: true
- items:
- type: string
- blocked_domains:
- type: array
- nullable: true
- items:
- type: string
- max_uses:
- type: number
- nullable: true
- user_location:
- type: object
- nullable: true
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- nullable: true
- country:
- type: string
- nullable: true
- region:
- type: string
- nullable: true
- timezone:
- type: string
- nullable: true
- required:
- - type
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - name
- - type: object
- properties:
- type:
- type: string
- enum:
- - web_search_20260209
- name:
- type: string
- enum:
- - web_search
- allowed_callers:
- type: array
- items:
- type: string
- enum:
- - direct
- - code_execution_20250825
- - code_execution_20260120
- x-speakeasy-unknown-values: allow
- allowed_domains:
- type: array
- nullable: true
- items:
- type: string
- blocked_domains:
- type: array
- nullable: true
- items:
- type: string
- max_uses:
- type: number
- nullable: true
- user_location:
- type: object
- nullable: true
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- nullable: true
- country:
- type: string
- nullable: true
- region:
- type: string
- nullable: true
- timezone:
- type: string
- nullable: true
- required:
- - type
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- required:
- - type
- - name
- - $ref: '#/components/schemas/DatetimeServerTool'
- - $ref: '#/components/schemas/MessagesWebSearchServerTool'
- tool_choice:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - auto
- disable_parallel_tool_use:
- type: boolean
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - any
- disable_parallel_tool_use:
- type: boolean
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - none
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool
- name:
- type: string
- disable_parallel_tool_use:
- type: boolean
- required:
- - type
- - name
- thinking:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - enabled
- budget_tokens:
- type: number
- required:
- - type
- - budget_tokens
- - type: object
- properties:
- type:
- type: string
- enum:
- - disabled
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - adaptive
- required:
- - type
- service_tier:
- type: string
- enum:
- - auto
- - standard_only
- x-speakeasy-unknown-values: allow
- output_config:
- $ref: '#/components/schemas/MessagesOutputConfig'
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- stream:
- type: boolean
- context_management:
- type: object
- nullable: true
- properties:
- edits:
- type: array
- items:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - clear_tool_uses_20250919
- clear_at_least:
- type: object
- nullable: true
- properties:
- type:
- type: string
- enum:
- - input_tokens
- value:
- type: number
- required:
- - type
- - value
- clear_tool_inputs:
- anyOf:
- - type: boolean
- - type: array
- items:
- type: string
- - nullable: true
- exclude_tools:
- type: array
- nullable: true
- items:
- type: string
- keep:
- type: object
- properties:
- type:
- type: string
- enum:
- - tool_uses
- value:
- type: number
- required:
- - type
- - value
- trigger:
- oneOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - input_tokens
- value:
- type: number
- required:
- - type
- - value
- - type: object
- properties:
- type:
- type: string
- enum:
- - tool_uses
- value:
- type: number
- required:
- - type
- - value
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - clear_thinking_20251015
- keep:
- anyOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - thinking_turns
- value:
- type: number
- required:
- - type
- - value
- - type: object
- properties:
- type:
- type: string
- enum:
- - all
- required:
- - type
- - type: string
- enum:
- - all
- required:
- - type
- - type: object
- properties:
- type:
- type: string
- enum:
- - compact_20260112
- instructions:
- type: string
- nullable: true
- pause_after_compaction:
- type: boolean
- trigger:
- type: object
- nullable: true
- properties:
- type:
- type: string
- enum:
- - input_tokens
- value:
- type: number
- required:
- - type
- - value
- required:
- - type
- provider:
- type: object
- nullable: true
- properties:
- allow_fallbacks:
- type: boolean
- nullable: true
- 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.
-
- require_parameters:
- type: boolean
- nullable: true
- 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.
- data_collection:
- $ref: '#/components/schemas/DataCollection'
- zdr:
- type: boolean
- nullable: true
- 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
- enforce_distillable_text:
- type: boolean
- nullable: true
- 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
- order:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- 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.
- only:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
- ignore:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
- quantizations:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/Quantization'
- description: A list of quantization levels to filter the provider by.
- sort:
- allOf:
- - $ref: '#/components/schemas/ProviderSort'
- - 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.
- max_price:
- type: object
- properties:
- prompt:
- $ref: '#/components/schemas/BigNumberUnion'
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per million completion tokens
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per image
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per audio unit
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per request
- description: >-
- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
- preferred_min_throughput:
- $ref: '#/components/schemas/PreferredMinThroughput'
- preferred_max_latency:
- $ref: '#/components/schemas/PreferredMaxLatency'
- additionalProperties: false
- description: When multiple model providers are available, optionally indicate your routing preference.
- plugins:
- type: array
- items:
- oneOf:
- - type: object
- properties:
- id:
- type: string
- enum:
- - auto-router
- enabled:
- type: boolean
- description: Set to false to disable the auto-router plugin for this request. Defaults to true.
- allowed_models:
- type: array
- items:
- type: string
- description: >-
- List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
- example:
- - anthropic/*
- - openai/gpt-4o
- - google/*
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - moderation
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - web
- enabled:
- type: boolean
- description: Set to false to disable the web-search plugin for this request. Defaults to true.
- max_results:
- type: number
- search_prompt:
- type: string
- engine:
- $ref: '#/components/schemas/WebSearchEngine'
- include_domains:
- type: array
- items:
- type: string
- description: >-
- A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
- example:
- - example.com
- - '*.substack.com'
- - openai.com/blog
- exclude_domains:
- type: array
- items:
- type: string
- description: >-
- A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
- example:
- - example.com
- - '*.substack.com'
- - openai.com/blog
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - file-parser
- enabled:
- type: boolean
- description: Set to false to disable the file-parser plugin for this request. Defaults to true.
- pdf:
- $ref: '#/components/schemas/PDFParserOptions'
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - response-healing
- enabled:
- type: boolean
- description: Set to false to disable the response-healing plugin for this request. Defaults to true.
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - context-compression
- enabled:
- type: boolean
- description: Set to false to disable the context-compression plugin for this request. Defaults to true.
- engine:
- $ref: '#/components/schemas/ContextCompressionEngine'
- required:
- - id
- description: Plugins you want to enable for this request, including their settings.
- route:
- type: string
- nullable: true
- enum:
- - fallback
- - sort
- deprecated: true
- description: >-
- **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
- x-speakeasy-deprecation-message: Use providers.sort.partition instead.
- x-speakeasy-ignore: true
- x-fern-ignore: true
- x-speakeasy-unknown-values: allow
- user:
- type: string
- maxLength: 256
- 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.
- session_id:
- type: string
- maxLength: 256
- 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.
- trace:
- type: object
- properties:
- trace_id:
- type: string
- trace_name:
- type: string
- span_name:
- type: string
- generation_name:
- type: string
- parent_span_id:
- type: string
- 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.
- models:
- type: array
- items:
- type: string
- speed:
- type: string
- enum:
- - fast
- - standard
- description: >-
- Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted.
- example: fast
- x-speakeasy-unknown-values: allow
- required:
- - model
- - messages
- description: Request schema for Anthropic Messages API endpoint
- example:
- model: anthropic/claude-4.5-sonnet-20250929
- max_tokens: 1024
- messages:
- - role: user
- content: Hello, how are you?
- temperature: 0.7
- ActivityItem:
- type: object
- properties:
- date:
- type: string
- description: Date of the activity (YYYY-MM-DD format)
- example: '2025-08-24'
- model:
- type: string
- description: Model slug (e.g., "openai/gpt-4.1")
- example: openai/gpt-4.1
- model_permaslug:
- type: string
- description: Model permaslug (e.g., "openai/gpt-4.1-2025-04-14")
- example: openai/gpt-4.1-2025-04-14
- endpoint_id:
- type: string
- description: Unique identifier for the endpoint
- example: 550e8400-e29b-41d4-a716-446655440000
- provider_name:
- type: string
- description: Name of the provider serving this endpoint
- example: OpenAI
- usage:
- type: number
- description: Total cost in USD (OpenRouter credits spent)
- example: 0.015
- byok_usage_inference:
- type: number
- description: BYOK inference cost in USD (external credits spent)
- example: 0.012
- requests:
- type: number
- description: Number of requests made
- example: 5
- prompt_tokens:
- type: number
- description: Total prompt tokens used
- example: 50
- completion_tokens:
- type: number
- description: Total completion tokens generated
- example: 125
- reasoning_tokens:
- type: number
- description: Total reasoning tokens used
- example: 25
- required:
- - date
- - model
- - model_permaslug
- - endpoint_id
- - provider_name
- - usage
- - byok_usage_inference
- - requests
- - prompt_tokens
- - completion_tokens
- - reasoning_tokens
- example:
- date: '2025-08-24'
- model: openai/gpt-4.1
- model_permaslug: openai/gpt-4.1-2025-04-14
- endpoint_id: 550e8400-e29b-41d4-a716-446655440000
- provider_name: OpenAI
- usage: 0.015
- byok_usage_inference: 0.012
- requests: 5
- prompt_tokens: 50
- completion_tokens: 125
- reasoning_tokens: 25
- ForbiddenResponseErrorData:
- type: object
+ code: 503
+ message: Service temporarily unavailable
properties:
code:
type: integer
message:
type: string
metadata:
- type: object
- nullable: true
additionalProperties:
nullable: true
+ nullable: true
+ type: object
required:
- code
- message
- description: Error data for ForbiddenResponse
- example:
- code: 403
- message: Only management keys can perform this operation
- ForbiddenResponse:
type: object
- properties:
- error:
- $ref: '#/components/schemas/ForbiddenResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Forbidden - Authentication successful but insufficient permissions
+ ShellServerTool:
+ description: Shell tool configuration
example:
- error:
- code: 403
- message: Only management keys can perform this operation
- ChatFinishReasonEnum:
- type: string
- enum:
- - tool_calls
- - stop
- - length
- - content_filter
- - error
- example: stop
- x-speakeasy-unknown-values: allow
- ChatContentCacheControl:
- type: object
+ type: shell
properties:
type:
- type: string
enum:
- - ephemeral
- ttl:
+ - shell
type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
required:
- type
- description: Cache control for the content part
- example:
- type: ephemeral
- ttl: 5m
- ChatContentText:
type: object
- properties:
- type:
- type: string
- enum:
- - text
- text:
- type: string
- cache_control:
- $ref: '#/components/schemas/ChatContentCacheControl'
- required:
- - type
- - text
- description: Text content part
+ StoredPromptTemplate:
example:
- type: text
- text: Hello, world!
- ChatContentImage:
- type: object
- properties:
- type:
- type: string
- enum:
- - image_url
- image_url:
- type: object
- properties:
- url:
- type: string
- description: 'URL of the image (data: URLs supported)'
- detail:
- type: string
- enum:
- - auto
- - low
- - high
- description: Image detail level for vision models
- x-speakeasy-unknown-values: allow
- required:
- - url
- required:
- - type
- - image_url
- description: Image content part for vision models
- example:
- type: image_url
- image_url:
- url: https://example.com/image.jpg
- detail: auto
- ChatContentAudio:
- type: object
- properties:
- type:
- type: string
- enum:
- - input_audio
- input_audio:
- type: object
- properties:
- data:
- type: string
- description: Base64 encoded audio data
- format:
- type: string
- description: >-
- Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.
- required:
- - data
- - format
- required:
- - type
- - input_audio
- description: Audio input content part. Supported audio formats vary by provider.
- example:
- type: input_audio
- input_audio:
- data: SGVsbG8gV29ybGQ=
- format: wav
- Legacy_ChatContentVideo:
- type: object
- properties:
- type:
- type: string
- enum:
- - input_video
- video_url:
- $ref: '#/components/schemas/ChatContentVideoInput'
- required:
- - type
- - video_url
- description: Video input content part (legacy format - deprecated)
- deprecated: true
- example:
- type: input_video
- video_url:
- url: https://example.com/video.mp4
- ChatContentVideoInput:
- type: object
- properties:
- url:
- type: string
- description: 'URL of the video (data: URLs supported)'
- required:
- - url
- description: Video input object
- ChatContentVideo:
- type: object
- properties:
- type:
- type: string
- enum:
- - video_url
- video_url:
- $ref: '#/components/schemas/ChatContentVideoInput'
- required:
- - type
- - video_url
- description: Video input content part
- example:
- type: video_url
- video_url:
- url: https://example.com/video.mp4
- ChatContentFile:
- type: object
- properties:
- type:
- type: string
- enum:
- - file
- file:
- type: object
- properties:
- file_data:
- type: string
- description: File content as base64 data URL or URL
- file_id:
- type: string
- description: File ID for previously uploaded files
- filename:
- type: string
- description: Original filename
- required:
- - type
- - file
- description: File content part for document processing
- example:
- type: file
- file:
- file_data: https://example.com/document.pdf
- filename: document.pdf
- ChatContentItems:
- oneOf:
- - $ref: '#/components/schemas/ChatContentText'
- - $ref: '#/components/schemas/ChatContentImage'
- - $ref: '#/components/schemas/ChatContentAudio'
- - oneOf:
- - $ref: '#/components/schemas/Legacy_ChatContentVideo'
- - $ref: '#/components/schemas/ChatContentVideo'
- discriminator:
- propertyName: type
- mapping:
- input_video: '#/components/schemas/Legacy_ChatContentVideo'
- video_url: '#/components/schemas/ChatContentVideo'
- - $ref: '#/components/schemas/ChatContentFile'
- discriminator:
- propertyName: type
- description: Content part for chat completion messages
- example:
- type: text
- text: Hello, world!
- ChatToolCall:
- type: object
- properties:
- id:
- type: string
- description: Tool call identifier
- type:
- type: string
- enum:
- - function
- function:
- type: object
- properties:
- name:
- type: string
- description: Function name to call
- arguments:
- type: string
- description: Function arguments as JSON string
- required:
- - name
- - arguments
- required:
- - id
- - type
- - function
- description: Tool call made by the assistant
- example:
- id: call_abc123
- type: function
- function:
- name: get_current_weather
- arguments: '{"location": "Boston, MA"}'
- ReasoningDetailSummary:
- type: object
- properties:
- type:
- type: string
- enum:
- - reasoning.summary
- summary:
- type: string
- id:
- type: string
- nullable: true
- format:
- type: string
- nullable: true
- enum:
- - unknown
- - openai-responses-v1
- - azure-openai-responses-v1
- - xai-responses-v1
- - anthropic-claude-v1
- - google-gemini-v1
- x-speakeasy-unknown-values: allow
- index:
- type: number
- required:
- - type
- - summary
- description: Reasoning detail summary schema
- example:
- type: reasoning.summary
- summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
- ReasoningDetailEncrypted:
- type: object
- properties:
- type:
- type: string
- enum:
- - reasoning.encrypted
- data:
- type: string
- id:
- type: string
- nullable: true
- format:
- type: string
- nullable: true
- enum:
- - unknown
- - openai-responses-v1
- - azure-openai-responses-v1
- - xai-responses-v1
- - anthropic-claude-v1
- - google-gemini-v1
- x-speakeasy-unknown-values: allow
- index:
- type: number
- required:
- - type
- - data
- description: Reasoning detail encrypted schema
- example:
- type: reasoning.encrypted
- data: encrypted data
- ReasoningDetailText:
- type: object
- properties:
- type:
- type: string
- enum:
- - reasoning.text
- text:
- type: string
- nullable: true
- signature:
- type: string
- nullable: true
- id:
- type: string
- nullable: true
- format:
- type: string
- nullable: true
- enum:
- - unknown
- - openai-responses-v1
- - azure-openai-responses-v1
- - xai-responses-v1
- - anthropic-claude-v1
- - google-gemini-v1
- x-speakeasy-unknown-values: allow
- index:
- type: number
- required:
- - type
- description: Reasoning detail text schema
- example:
- type: reasoning.text
- text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
- signature: signature
- ReasoningDetailUnion:
- oneOf:
- - $ref: '#/components/schemas/ReasoningDetailSummary'
- - $ref: '#/components/schemas/ReasoningDetailEncrypted'
- - $ref: '#/components/schemas/ReasoningDetailText'
- discriminator:
- propertyName: type
- mapping:
- reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
- reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
- reasoning.text: '#/components/schemas/ReasoningDetailText'
- description: Reasoning detail union schema
- example:
- type: reasoning.summary
- summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...
- ChatReasoningDetails:
- type: array
- items:
- $ref: '#/components/schemas/ReasoningDetailUnion'
- description: Reasoning details for extended thinking models
- ChatAssistantImages:
- type: array
- items:
- type: object
- properties:
- image_url:
- type: object
- properties:
- url:
- type: string
- description: URL or base64-encoded data of the generated image
- required:
- - url
- required:
- - image_url
- description: Generated images from image generation models
- example:
- - image_url:
- url: data:image/png;base64,iVBORw0KGgo...
- ChatAudioOutput:
- type: object
- properties:
- id:
- type: string
- description: Audio output identifier
- expires_at:
- type: number
- description: Audio expiration timestamp
- data:
- type: string
- description: Base64 encoded audio data
- transcript:
- type: string
- description: Audio transcript
- description: Audio output data or reference
- example:
- id: audio_abc123
- expires_at: 1677652400
- data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f
- transcript: Hello! How can I help you today?
- ChatAssistantMessage:
- type: object
- properties:
- role:
- type: string
- enum:
- - assistant
- content:
- anyOf:
- - type: string
- - type: array
- items:
- $ref: '#/components/schemas/ChatContentItems'
- - nullable: true
- description: Assistant message content
- name:
- type: string
- description: Optional name for the assistant
- tool_calls:
- type: array
- items:
- $ref: '#/components/schemas/ChatToolCall'
- description: Tool calls made by the assistant
- refusal:
- type: string
- nullable: true
- description: Refusal message if content was refused
- reasoning:
- type: string
- nullable: true
- description: Reasoning output
- reasoning_details:
- $ref: '#/components/schemas/ChatReasoningDetails'
- images:
- $ref: '#/components/schemas/ChatAssistantImages'
- audio:
- $ref: '#/components/schemas/ChatAudioOutput'
- required:
- - role
- description: Assistant message for requests and responses
- example:
- role: assistant
- content: The capital of France is Paris.
- ChatTokenLogprob:
- type: object
- properties:
- token:
- type: string
- description: The token
- logprob:
- type: number
- description: Log probability of the token
- bytes:
- type: array
- nullable: true
- items:
- type: number
- description: UTF-8 bytes of the token
- top_logprobs:
- type: array
- items:
- type: object
- properties:
- token:
- type: string
- logprob:
- type: number
- bytes:
- type: array
- nullable: true
- items:
- type: number
- required:
- - token
- - logprob
- - bytes
- description: Top alternative tokens with probabilities
- required:
- - token
- - logprob
- - bytes
- - top_logprobs
- description: Token log probability information
- example:
- token: ' Hello'
- logprob: -0.612345
- bytes: null
- top_logprobs:
- - token: ' Hello'
- logprob: -0.612345
- bytes: null
- ChatTokenLogprobs:
- type: object
+ id: prompt-abc123
+ variables:
+ name: John
nullable: true
- properties:
- content:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/ChatTokenLogprob'
- description: Log probabilities for content tokens
- refusal:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/ChatTokenLogprob'
- description: Log probabilities for refusal tokens
- required:
- - content
- description: Log probabilities for the completion
- example:
- content:
- - token: ' Hello'
- logprob: -0.612345
- bytes: null
- top_logprobs: []
- refusal: null
- ChatChoice:
- type: object
- properties:
- finish_reason:
- anyOf:
- - $ref: '#/components/schemas/ChatFinishReasonEnum'
- - nullable: true
- - nullable: true
- index:
- type: number
- description: Choice index
- example: 0
- message:
- $ref: '#/components/schemas/ChatAssistantMessage'
- logprobs:
- $ref: '#/components/schemas/ChatTokenLogprobs'
- required:
- - finish_reason
- - index
- - message
- description: Chat completion choice
- example:
- finish_reason: stop
- index: 0
- message:
- role: assistant
- content: The capital of France is Paris.
- logprobs: null
- ChatUsage:
- type: object
- properties:
- completion_tokens:
- type: number
- description: Number of tokens in the completion
- prompt_tokens:
- type: number
- description: Number of tokens in the prompt
- total_tokens:
- type: number
- description: Total number of tokens
- completion_tokens_details:
- type: object
- nullable: true
- properties:
- reasoning_tokens:
- type: number
- nullable: true
- description: Tokens used for reasoning
- audio_tokens:
- type: number
- nullable: true
- description: Tokens used for audio output
- accepted_prediction_tokens:
- type: number
- nullable: true
- description: Accepted prediction tokens
- rejected_prediction_tokens:
- type: number
- nullable: true
- description: Rejected prediction tokens
- description: Detailed completion token usage
- prompt_tokens_details:
- type: object
- nullable: true
- properties:
- cached_tokens:
- type: number
- description: Cached prompt tokens
- cache_write_tokens:
- type: number
- description: Tokens written to cache. Only returned for models with explicit caching and cache write pricing.
- audio_tokens:
- type: number
- description: Audio input tokens
- video_tokens:
- type: number
- description: Video input tokens
- description: Detailed prompt token usage
- required:
- - completion_tokens
- - prompt_tokens
- - total_tokens
- description: Token usage statistics
- example:
- completion_tokens: 15
- prompt_tokens: 10
- total_tokens: 25
- completion_tokens_details:
- reasoning_tokens: 5
- prompt_tokens_details:
- cached_tokens: 2
- ChatResult:
- type: object
properties:
id:
type: string
- description: Unique completion identifier
- example: chatcmpl-123
- choices:
- type: array
- items:
- $ref: '#/components/schemas/ChatChoice'
- description: List of completion choices
- created:
- type: number
- description: Unix timestamp of creation
- example: 1677652288
- model:
- type: string
- description: Model used for completion
- example: openai/gpt-4
- object:
- type: string
- enum:
- - chat.completion
- system_fingerprint:
- type: string
- nullable: true
- description: System fingerprint
- example: fp_44709d6fcb
- service_tier:
- type: string
- nullable: true
- description: The service tier used by the upstream provider for this request
- example: default
- usage:
- $ref: '#/components/schemas/ChatUsage'
- required:
- - id
- - choices
- - created
- - model
- - object
- - system_fingerprint
- description: Chat completion response
- example:
- id: chatcmpl-123
- object: chat.completion
- created: 1677652288
- model: openai/gpt-4
- choices:
- - index: 0
- message:
- role: assistant
- content: The capital of France is Paris.
- finish_reason: stop
- usage:
- prompt_tokens: 10
- completion_tokens: 15
- total_tokens: 25
- ChatStreamToolCall:
- type: object
- properties:
- index:
- type: number
- description: Tool call index in the array
- example: 0
- id:
- type: string
- description: Tool call identifier
- example: call_abc123
- type:
- type: string
- enum:
- - function
- description: Tool call type
- example: function
- function:
- type: object
- properties:
- name:
- type: string
- description: Function name
- example: get_weather
- arguments:
- type: string
- description: Function arguments as JSON string
- example: '{"location":'
- description: Function call details
- required:
- - index
- description: Tool call delta for streaming responses
- example:
- index: 0
- id: call_abc123
- type: function
- function:
- name: get_weather
- arguments: '{"location":'
- ChatStreamDelta:
- type: object
- properties:
- role:
- type: string
- enum:
- - assistant
- description: The role of the message author
- example: assistant
- content:
- type: string
- nullable: true
- description: Message content delta
- example: Hello
- reasoning:
- type: string
- nullable: true
- description: Reasoning content delta
- example: I need to
- refusal:
- type: string
- nullable: true
- description: Refusal message delta
- example: null
- tool_calls:
- type: array
- items:
- $ref: '#/components/schemas/ChatStreamToolCall'
- description: Tool calls delta
- reasoning_details:
- $ref: '#/components/schemas/ChatReasoningDetails'
- audio:
- allOf:
- - $ref: '#/components/schemas/ChatAudioOutput'
- - description: Audio output data
- description: Delta changes in streaming response
- example:
- role: assistant
- content: Hello
- ChatStreamChoice:
- type: object
- properties:
- delta:
- $ref: '#/components/schemas/ChatStreamDelta'
- finish_reason:
- anyOf:
- - $ref: '#/components/schemas/ChatFinishReasonEnum'
- - nullable: true
- - nullable: true
- index:
- type: number
- description: Choice index
- example: 0
- logprobs:
- $ref: '#/components/schemas/ChatTokenLogprobs'
- required:
- - delta
- - finish_reason
- - index
- description: Streaming completion choice chunk
- example:
- index: 0
- delta:
- role: assistant
- content: Hello
- finish_reason: null
- ChatStreamChunk:
- type: object
- properties:
- id:
- type: string
- description: Unique chunk identifier
- example: chatcmpl-123
- choices:
- type: array
- items:
- $ref: '#/components/schemas/ChatStreamChoice'
- description: List of streaming chunk choices
- created:
- type: number
- description: Unix timestamp of creation
- example: 1677652288
- model:
- type: string
- description: Model used for completion
- example: openai/gpt-4
- object:
- type: string
- enum:
- - chat.completion.chunk
- system_fingerprint:
- type: string
- description: System fingerprint
- example: fp_44709d6fcb
- service_tier:
- type: string
- nullable: true
- description: The service tier used by the upstream provider for this request
- example: default
- error:
- type: object
- properties:
- message:
- type: string
- description: Error message
- example: Rate limit exceeded
- code:
- type: number
- description: Error code
- example: 429
- required:
- - message
- - code
- description: Error information
- example:
- message: Rate limit exceeded
- code: 429
- usage:
- $ref: '#/components/schemas/ChatUsage'
- required:
- - id
- - choices
- - created
- - model
- - object
- description: Streaming chat completion chunk
- x-speakeasy-entity: ChatStreamChunk
- example:
- id: chatcmpl-123
- object: chat.completion.chunk
- created: 1677652288
- model: openai/gpt-4
- choices:
- - index: 0
- delta:
- role: assistant
- content: Hello
- finish_reason: null
- ChatSystemMessage:
- type: object
- properties:
- role:
- type: string
- enum:
- - system
- content:
- anyOf:
- - type: string
- - type: array
- items:
- $ref: '#/components/schemas/ChatContentText'
- description: System message content
- example: You are a helpful assistant.
- name:
- type: string
- description: Optional name for the system message
- example: Assistant Config
- required:
- - role
- - content
- description: System message for setting behavior
- example:
- role: system
- content: You are a helpful assistant.
- name: Assistant Config
- ChatUserMessage:
- type: object
- properties:
- role:
- type: string
- enum:
- - user
- content:
- anyOf:
- - type: string
- - type: array
- items:
- $ref: '#/components/schemas/ChatContentItems'
- description: User message content
- example: What is the capital of France?
- name:
- type: string
- description: Optional name for the user
- example: User
- required:
- - role
- - content
- description: User message
- example:
- role: user
- content: What is the capital of France?
- ChatDeveloperMessage:
- type: object
- properties:
- role:
- type: string
- enum:
- - developer
- content:
- anyOf:
- - type: string
- - type: array
- items:
- $ref: '#/components/schemas/ChatContentText'
- description: Developer message content
- example: This is a message from the developer.
- name:
- type: string
- description: Optional name for the developer message
- example: Developer
- required:
- - role
- - content
- description: Developer message
- example:
- role: developer
- content: This is a message from the developer.
- ChatToolMessage:
- type: object
- properties:
- role:
- type: string
- enum:
- - tool
- content:
- anyOf:
- - type: string
- - type: array
- items:
- $ref: '#/components/schemas/ChatContentItems'
- description: Tool response content
- example: The weather in San Francisco is 72°F and sunny.
- tool_call_id:
- type: string
- description: ID of the assistant message tool call this message responds to
- example: call_abc123
- required:
- - role
- - content
- - tool_call_id
- description: Tool response message
- example:
- role: tool
- content: The weather in San Francisco is 72°F and sunny.
- tool_call_id: call_abc123
- ChatMessages:
- oneOf:
- - $ref: '#/components/schemas/ChatSystemMessage'
- - $ref: '#/components/schemas/ChatUserMessage'
- - $ref: '#/components/schemas/ChatDeveloperMessage'
- - $ref: '#/components/schemas/ChatAssistantMessage'
- - $ref: '#/components/schemas/ChatToolMessage'
- discriminator:
- propertyName: role
- description: Chat completion message with role-based discrimination
- example:
- role: user
- content: What is the capital of France?
- ModelName:
- type: string
- description: Model to use for completion
- example: openai/gpt-4
- ChatModelNames:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/ModelName'
- - description: Available OpenRouter chat completion models
- description: Models to use for completion
- example:
- - openai/gpt-4
- - openai/gpt-4o
- ChatReasoningSummaryVerbosityEnum:
- type: string
- enum:
- - auto
- - concise
- - detailed
- x-speakeasy-unknown-values: allow
- ChatFormatTextConfig:
- type: object
- properties:
- type:
- type: string
- enum:
- - text
- required:
- - type
- description: Default text response format
- example:
- type: text
- ChatJsonSchemaConfig:
- type: object
- properties:
- name:
- type: string
- maxLength: 64
- description: Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)
- example: math_response
- description:
- type: string
- description: Schema description for the model
- example: A mathematical response
- schema:
- type: object
+ variables:
additionalProperties:
- nullable: true
- description: JSON Schema object
- example:
- type: object
- properties:
- answer:
- type: number
- required:
- - answer
- strict:
- type: boolean
+ anyOf:
+ - type: string
+ - $ref: '#/components/schemas/InputText'
+ - $ref: '#/components/schemas/InputImage'
+ - $ref: '#/components/schemas/InputFile'
nullable: true
- description: Enable strict schema adherence
- example: false
- required:
- - name
- description: JSON Schema configuration object
- example:
- name: math_response
- description: A mathematical response
- schema:
type: object
- properties:
- answer:
- type: number
- required:
- - answer
- strict: true
- ChatFormatJsonSchemaConfig:
- type: object
- properties:
- type:
- type: string
- enum:
- - json_schema
- json_schema:
- $ref: '#/components/schemas/ChatJsonSchemaConfig'
required:
- - type
- - json_schema
- description: JSON Schema response format for structured outputs
- example:
- type: json_schema
- json_schema:
- name: math_response
- schema:
- type: object
- properties:
- answer:
- type: number
- required:
- - answer
- ChatFormatGrammarConfig:
+ - id
type: object
- properties:
- type:
- type: string
- enum:
- - grammar
- grammar:
- type: string
- description: Custom grammar for text generation
- example: root ::= "yes" | "no"
- required:
- - type
- - grammar
- description: Custom grammar response format
+ 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:
- type: grammar
- grammar: root ::= "yes" | "no"
- ChatFormatPythonConfig:
- type: object
- properties:
- type:
- type: string
- enum:
- - python
- required:
- - type
- description: Python code response format
- example:
- type: python
- ChatStreamOptions:
- type: object
- nullable: true
- properties:
- include_usage:
- type: boolean
- description: 'Deprecated: This field has no effect. Full usage details are always included.'
- example: true
- deprecated: true
- description: Streaming configuration options
- example:
- include_usage: true
- ChatNamedToolChoice:
- type: object
- properties:
- type:
- type: string
- enum:
- - function
- function:
+ 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
- properties:
- name:
- type: string
- description: Function name to call
- example: get_weather
- required:
- - name
- required:
- - type
- - function
- description: Named tool choice for specific function
+ description: Event emitted when a response has completed successfully
example:
- type: function
- function:
- name: get_weather
- ChatToolChoice:
- anyOf:
- - type: string
- enum:
- - none
- - type: string
- enum:
- - auto
- - type: string
- enum:
- - required
- - $ref: '#/components/schemas/ChatNamedToolChoice'
- description: Tool choice configuration
- example: auto
- ChatWebSearchServerTool:
- type: object
- properties:
- type:
- type: string
- enum:
- - openrouter:web_search
- parameters:
+ 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
- properties:
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- max_total_results:
- type: number
- minimum: 1
- 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
- search_context_size:
- type: string
- enum:
- - low
- - medium
- - high
- 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.
- x-speakeasy-unknown-values: allow
- user_location:
- type: object
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- region:
- type: string
- country:
- type: string
- timezone:
- type: string
- description: Approximate user location for location-biased results.
- allowed_domains:
- type: array
+ 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:
- type: string
- description: >-
- Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- excluded_domains:
+ $ref: '#/components/schemas/StreamLogprobTopLogprob'
type: array
- items:
- type: string
- description: >-
- Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- required:
- - type
- description: 'OpenRouter built-in server tool: searches the web for current information'
+ type: object
+ description: Log probability information for a token
example:
- type: openrouter:web_search
- parameters:
- engine: auto
- max_results: 5
- ChatWebSearchShorthand:
- type: object
+ 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
+ TextConfig:
+ description: Text output configuration including format and verbosity
+ example:
+ format:
+ type: text
+ verbosity: medium
properties:
- type:
- type: string
- enum:
- - web_search
- - web_search_preview
- - web_search_preview_2025_03_11
- - web_search_2025_08_26
- x-speakeasy-unknown-values: allow
- engine:
- type: string
- enum:
- - auto
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- max_total_results:
- type: number
- minimum: 1
- 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
- search_context_size:
- type: string
+ format:
+ $ref: '#/components/schemas/Formats'
+ verbosity:
enum:
+ - high
- low
- medium
- - high
- 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.
+ - null
+ nullable: true
+ type: string
x-speakeasy-unknown-values: allow
- user_location:
+ type: object
+ TextDeltaEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseTextDeltaEvent'
+ - properties:
+ logprobs:
+ items:
+ $ref: '#/components/schemas/StreamLogprob'
+ type: array
type: object
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- region:
- type: string
- country:
- type: string
- timezone:
- type: string
- description: Approximate user location for location-biased results.
- allowed_domains:
- type: array
- items:
- type: string
- description: >-
- Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- excluded_domains:
- type: array
- items:
- type: string
- description: >-
- Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- parameters:
+ 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
- properties:
- engine:
- type: string
- enum:
+ 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: {}
+ 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
- - native
- - exa
- - firecrawl
- - parallel
- description: >-
- 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.
- example: auto
- x-speakeasy-unknown-values: allow
- max_results:
- type: number
- minimum: 1
- maximum: 25
- 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
- max_total_results:
- type: number
- minimum: 1
- 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
- search_context_size:
type: string
- enum:
- - low
- - medium
- - high
- 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.
- x-speakeasy-unknown-values: allow
- user_location:
- type: object
- properties:
- type:
- type: string
- enum:
- - approximate
- city:
- type: string
- region:
- type: string
- country:
- type: string
- timezone:
- type: string
- description: Approximate user location for location-biased results.
- allowed_domains:
- type: array
- items:
- type: string
- description: >-
- Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
- excluded_domains:
- type: array
- items:
- type: string
- description: >-
- Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.
+ - enum:
+ - required
+ type: string
+ tools:
+ items:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: array
+ type:
+ enum:
+ - allowed_tools
+ type: string
required:
- type
- description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search.
- ChatFunctionTool:
- anyOf:
- - type: object
- properties:
- type:
- type: string
- enum:
- - function
- function:
- type: object
- properties:
- name:
- type: string
- maxLength: 64
- description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)
- example: get_weather
- description:
- type: string
- description: Function description for the model
- example: Get the current weather for a location
- parameters:
- type: object
- additionalProperties:
- nullable: true
- description: Function parameters as JSON Schema object
- example:
- type: object
- properties:
- location:
- type: string
- description: City name
- required:
- - location
- strict:
- type: boolean
- nullable: true
- description: Enable strict schema adherence
- example: false
- required:
- - name
- description: Function definition for tool calling
- example:
- name: get_weather
- description: Get the current weather for a location
- parameters:
- type: object
- properties:
- location:
- type: string
- description: City name
- required:
- - location
- cache_control:
- $ref: '#/components/schemas/ChatContentCacheControl'
- required:
- - type
- - function
- - $ref: '#/components/schemas/DatetimeServerTool'
- - $ref: '#/components/schemas/ChatWebSearchServerTool'
- - $ref: '#/components/schemas/ChatWebSearchShorthand'
- description: Tool definition for function calling (regular function or OpenRouter built-in server tool)
- example:
- type: function
- function:
- name: get_weather
- description: Get the current weather for a location
- parameters:
- type: object
- properties:
- location:
- type: string
- description: City name
- unit:
- type: string
- enum:
- - celsius
- - fahrenheit
- x-speakeasy-unknown-values: allow
- required:
- - location
- ChatDebugOptions:
+ - mode
+ - tools
type: object
- properties:
- echo_upstream_body:
- type: boolean
- description: >-
- If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.
- example: true
- description: Debug options for inspecting request transformations (streaming only)
+ TooManyRequestsResponse:
+ description: Too Many Requests - Rate limit exceeded
example:
- echo_upstream_body: true
- ChatRequest:
- type: object
+ error:
+ code: 429
+ message: Rate limit exceeded
properties:
- provider:
- type: object
+ error:
+ $ref: '#/components/schemas/TooManyRequestsResponseErrorData'
+ user_id:
nullable: true
- properties:
- allow_fallbacks:
- type: boolean
- nullable: true
- 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.
-
- require_parameters:
- type: boolean
- nullable: true
- 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.
- data_collection:
- $ref: '#/components/schemas/DataCollection'
- zdr:
- type: boolean
- nullable: true
- 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
- enforce_distillable_text:
- type: boolean
- nullable: true
- 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
- order:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- 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.
- only:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
- ignore:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
- quantizations:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/Quantization'
- description: A list of quantization levels to filter the provider by.
- sort:
- allOf:
- - $ref: '#/components/schemas/ProviderSort'
- - 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.
- max_price:
- type: object
- properties:
- prompt:
- $ref: '#/components/schemas/BigNumberUnion'
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per million completion tokens
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per image
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per audio unit
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per request
- description: >-
- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
- preferred_min_throughput:
- $ref: '#/components/schemas/PreferredMinThroughput'
- preferred_max_latency:
- $ref: '#/components/schemas/PreferredMaxLatency'
- additionalProperties: false
- description: When multiple model providers are available, optionally indicate your routing preference.
- plugins:
- type: array
- items:
- oneOf:
- - type: object
- properties:
- id:
- type: string
- enum:
- - auto-router
- enabled:
- type: boolean
- description: Set to false to disable the auto-router plugin for this request. Defaults to true.
- allowed_models:
- type: array
- items:
- type: string
- description: >-
- List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
- example:
- - anthropic/*
- - openai/gpt-4o
- - google/*
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - moderation
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - web
- enabled:
- type: boolean
- description: Set to false to disable the web-search plugin for this request. Defaults to true.
- max_results:
- type: number
- search_prompt:
- type: string
- engine:
- $ref: '#/components/schemas/WebSearchEngine'
- include_domains:
- type: array
- items:
- type: string
- description: >-
- A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
- example:
- - example.com
- - '*.substack.com'
- - openai.com/blog
- exclude_domains:
- type: array
- items:
- type: string
- description: >-
- A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
- example:
- - example.com
- - '*.substack.com'
- - openai.com/blog
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - file-parser
- enabled:
- type: boolean
- description: Set to false to disable the file-parser plugin for this request. Defaults to true.
- pdf:
- $ref: '#/components/schemas/PDFParserOptions'
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - response-healing
- enabled:
- type: boolean
- description: Set to false to disable the response-healing plugin for this request. Defaults to true.
- required:
- - id
- - type: object
- properties:
- id:
- type: string
- enum:
- - context-compression
- enabled:
- type: boolean
- description: Set to false to disable the context-compression plugin for this request. Defaults to true.
- engine:
- $ref: '#/components/schemas/ContextCompressionEngine'
- required:
- - id
- description: Plugins you want to enable for this request, including their settings.
- route:
type: string
- nullable: true
- enum:
- - fallback
- - sort
- deprecated: true
- description: >-
- **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
- x-speakeasy-deprecation-message: Use providers.sort.partition instead.
- x-speakeasy-ignore: true
- x-fern-ignore: true
- x-speakeasy-unknown-values: allow
- user:
+ required:
+ - error
+ type: object
+ TooManyRequestsResponseErrorData:
+ description: Error data for TooManyRequestsResponse
+ example:
+ code: 429
+ message: Rate limit exceeded
+ properties:
+ code:
+ type: integer
+ message:
type: string
- description: Unique user identifier
- example: user-123
- session_id:
- type: string
- maxLength: 256
- 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.
- trace:
- type: object
- properties:
- trace_id:
- type: string
- trace_name:
- type: string
- span_name:
- type: string
- generation_name:
- type: string
- parent_span_id:
- type: string
+ metadata:
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.
- messages:
- type: array
- items:
- $ref: '#/components/schemas/ChatMessages'
- minItems: 1
- description: List of messages for the conversation
- example:
- - role: user
- content: Hello!
- model:
- $ref: '#/components/schemas/ModelName'
- models:
- $ref: '#/components/schemas/ChatModelNames'
- frequency_penalty:
- type: number
nullable: true
- minimum: -2
- maximum: 2
- description: Frequency penalty (-2.0 to 2.0)
- example: 0
- logit_bias:
type: object
- nullable: true
- additionalProperties:
- type: number
- description: Token logit bias adjustments
- example:
- '50256': -100
- logprobs:
- type: boolean
- nullable: true
- description: Return log probabilities
- example: false
- top_logprobs:
- type: number
- nullable: true
- minimum: 0
- maximum: 20
- description: Number of top log probabilities to return (0-20)
- example: 5
- max_completion_tokens:
- type: number
- nullable: true
- minimum: 1
- description: Maximum tokens in completion
- example: 100
- max_tokens:
- type: number
- nullable: true
- minimum: 1
- description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.'
- example: 100
- metadata:
- type: object
- additionalProperties:
- type: string
- description: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
- example:
- user_id: user-123
- session_id: session-456
- presence_penalty:
- type: number
- nullable: true
- minimum: -2
- maximum: 2
- description: Presence penalty (-2.0 to 2.0)
- example: 0
- reasoning:
- type: object
- properties:
- effort:
- type: string
- nullable: true
- enum:
- - xhigh
- - high
- - medium
- - low
- - minimal
- - none
- description: Constrains effort on reasoning for reasoning models
- example: medium
- x-speakeasy-unknown-values: allow
- summary:
- anyOf:
- - $ref: '#/components/schemas/ChatReasoningSummaryVerbosityEnum'
- - nullable: true
- - nullable: true
- description: Configuration options for reasoning models
- example:
- effort: medium
- summary: concise
- response_format:
- oneOf:
- - $ref: '#/components/schemas/ChatFormatTextConfig'
- - $ref: '#/components/schemas/FormatJsonObjectConfig'
- - $ref: '#/components/schemas/ChatFormatJsonSchemaConfig'
- - $ref: '#/components/schemas/ChatFormatGrammarConfig'
- - $ref: '#/components/schemas/ChatFormatPythonConfig'
- discriminator:
- propertyName: type
- description: Response format configuration
- example:
- type: json_object
- seed:
- type: integer
- nullable: true
- description: Random seed for deterministic outputs
- example: 42
- stop:
- anyOf:
- - type: string
- - type: array
- items:
- type: string
- maxItems: 4
- - nullable: true
- description: Stop sequences (up to 4)
- example:
- - ""
- stream:
- type: boolean
- default: false
- description: Enable streaming response
- example: false
- stream_options:
- $ref: '#/components/schemas/ChatStreamOptions'
- temperature:
- type: number
- nullable: true
- minimum: 0
- maximum: 2
- default: 1
- description: Sampling temperature (0-2)
- example: 0.7
- parallel_tool_calls:
- type: boolean
- nullable: true
- tool_choice:
- $ref: '#/components/schemas/ChatToolChoice'
- tools:
- type: array
- items:
- $ref: '#/components/schemas/ChatFunctionTool'
- description: Available tools for function calling
- example:
- - type: function
- function:
- name: get_weather
- description: Get weather
- top_p:
- type: number
- nullable: true
- minimum: 0
- maximum: 1
- default: 1
- description: Nucleus sampling parameter (0-1)
- example: 1
- debug:
- $ref: '#/components/schemas/ChatDebugOptions'
- image_config:
- type: object
- additionalProperties:
- anyOf:
- - type: string
- - type: number
- - type: array
- items:
- nullable: true
- description: >-
- 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.
- example:
- aspect_ratio: '16:9'
- modalities:
- type: array
- items:
- type: string
- enum:
- - text
- - image
- - audio
- x-speakeasy-unknown-values: allow
- description: Output modalities for the response. Supported values are "text", "image", and "audio".
- example:
- - text
- - image
- cache_control:
- type: object
- properties:
- type:
- type: string
- enum:
- - ephemeral
- ttl:
- type: string
- enum:
- - 5m
- - 1h
- x-speakeasy-unknown-values: allow
- required:
- - type
- description: >-
- Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- service_tier:
- type: string
- nullable: true
- enum:
- - auto
- - default
- - flex
- - priority
- - scale
- description: The service tier to use for processing this request.
- example: auto
- x-speakeasy-unknown-values: allow
required:
- - messages
- description: Chat completion request parameters
- example:
- messages:
- - role: system
- content: You are a helpful assistant.
- - role: user
- content: What is the capital of France?
- model: openai/gpt-4
- temperature: 0.7
- max_tokens: 150
- ProviderPreferences:
+ - code
+ - message
type: object
- properties:
- allow_fallbacks:
- type: boolean
- nullable: true
- 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.
-
- require_parameters:
- type: boolean
- nullable: true
- 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.
- data_collection:
- $ref: '#/components/schemas/DataCollection'
- zdr:
- type: boolean
- nullable: true
- 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
- enforce_distillable_text:
- type: boolean
- nullable: true
- 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
- order:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- 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.
- only:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
- ignore:
- type: array
- nullable: true
- items:
- anyOf:
- - $ref: '#/components/schemas/ProviderName'
- - type: string
- description: >-
- List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
- quantizations:
- type: array
- nullable: true
- items:
- $ref: '#/components/schemas/Quantization'
- description: A list of quantization levels to filter the provider by.
- sort:
- allOf:
- - $ref: '#/components/schemas/ProviderSort'
- - 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.
- max_price:
- type: object
- properties:
- prompt:
- $ref: '#/components/schemas/BigNumberUnion'
- completion:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per million completion tokens
- image:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per image
- audio:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per audio unit
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: Price per request
- description: >-
- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
- preferred_min_throughput:
- $ref: '#/components/schemas/PreferredMinThroughput'
- preferred_max_latency:
- $ref: '#/components/schemas/PreferredMaxLatency'
- description: Provider routing preferences for the request.
- PublicPricing:
- type: object
- properties:
- prompt:
- 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
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- image:
- 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
- image_output:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- 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
- input_audio_cache:
- 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
- internal_reasoning:
- 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
- discount:
- type: number
- required:
- - prompt
- - completion
- description: Pricing information for the model
- example:
- prompt: '0.00003'
- completion: '0.00006'
- request: '0'
- image: '0'
- ModelGroup:
- type: string
- enum:
- - Router
- - Media
- - Other
- - GPT
- - Claude
- - Gemini
- - Grok
- - Cohere
- - Nova
- - Qwen
- - Yi
- - DeepSeek
- - Mistral
- - Llama2
- - Llama3
- - Llama4
- - PaLM
- - RWKV
- - Qwen3
- example: GPT
- description: Tokenizer type used by the model
- x-speakeasy-unknown-values: allow
- InputModality:
- type: string
- enum:
- - text
- - image
- - file
- - audio
- - video
- example: text
- x-speakeasy-unknown-values: allow
- OutputModality:
- type: string
- enum:
- - text
- - image
- - embeddings
- - audio
- - video
- example: text
- x-speakeasy-unknown-values: allow
- ModelArchitecture:
- type: object
- properties:
- tokenizer:
- $ref: '#/components/schemas/ModelGroup'
- instruct_type:
- type: string
- nullable: true
- enum:
- - none
- - airoboros
- - alpaca
- - alpaca-modif
- - chatml
- - claude
- - code-llama
- - gemma
- - llama2
- - llama3
- - mistral
- - nemotron
- - neural
- - openchat
- - phi3
- - rwkv
- - vicuna
- - zephyr
- - deepseek-r1
- - deepseek-v3.1
- - qwq
- - qwen3
- example: chatml
- description: Instruction format type
- x-speakeasy-unknown-values: allow
- modality:
- type: string
- nullable: true
- description: Primary modality of the model
- example: text->text
- input_modalities:
- type: array
- items:
- $ref: '#/components/schemas/InputModality'
- description: Supported input modalities
- output_modalities:
- type: array
- items:
- $ref: '#/components/schemas/OutputModality'
- description: Supported output modalities
- required:
- - modality
- - input_modalities
- - output_modalities
- description: Model architecture information
- example:
- tokenizer: GPT
- instruct_type: chatml
- modality: text->text
- input_modalities:
- - text
- output_modalities:
- - text
TopProviderInfo:
- type: object
- properties:
- context_length:
- type: number
- nullable: true
- description: Context length from the top provider
- example: 8192
- max_completion_tokens:
- type: number
- nullable: true
- description: Maximum completion tokens from the top provider
- example: 4096
- is_moderated:
- type: boolean
- description: Whether the top provider moderates content
- example: true
- required:
- - is_moderated
description: Information about the top provider for this model
example:
context_length: 8192
- max_completion_tokens: 4096
is_moderated: true
- PerRequestLimits:
- type: object
- nullable: true
+ max_completion_tokens: 4096
properties:
- prompt_tokens:
- type: number
- example: 1000
- description: Maximum prompt tokens per request
- completion_tokens:
- type: number
- example: 1000
- description: Maximum completion tokens per request
- required:
- - prompt_tokens
- - completion_tokens
- description: Per-request token limits
- example:
- prompt_tokens: 1000
- completion_tokens: 1000
- Parameter:
- type: string
- enum:
- - temperature
- - top_p
- - top_k
- - min_p
- - top_a
- - frequency_penalty
- - presence_penalty
- - repetition_penalty
- - max_tokens
- - logit_bias
- - logprobs
- - top_logprobs
- - seed
- - response_format
- - structured_outputs
- - stop
- - tools
- - tool_choice
- - parallel_tool_calls
- - include_reasoning
- - reasoning
- - reasoning_effort
- - web_search_options
- - verbosity
- example: temperature
- x-speakeasy-unknown-values: allow
- DefaultParameters:
- type: object
- nullable: true
- properties:
- temperature:
- type: number
- nullable: true
- minimum: 0
- maximum: 2
- top_p:
- type: number
- nullable: true
- minimum: 0
- maximum: 1
- top_k:
+ context_length:
+ description: Context length from the top provider
+ example: 8192
type: integer
- nullable: true
- minimum: 0
- frequency_penalty:
- type: number
- nullable: true
- minimum: -2
- maximum: 2
- presence_penalty:
- type: number
- nullable: true
- minimum: -2
- maximum: 2
- repetition_penalty:
- type: number
- nullable: true
- minimum: 0
- maximum: 2
- additionalProperties: false
- description: Default parameters for this model
- example:
- temperature: 0.7
- top_p: 0.9
- top_k: 0
- frequency_penalty: 0
- presence_penalty: 0
- repetition_penalty: 1
- Model:
+ 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
+ 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:
+ 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:
+ 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
+ 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)
+ 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
+ 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: 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
+ type: number
+ cost_details:
+ properties:
+ upstream_inference_cost:
+ format: double
+ 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
+ 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:
+ description: >-
+ Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body.
+ example:
+ google-vertex:
+ output_config:
+ effort: low
+ properties:
+ 01ai:
+ additionalProperties:
+ nullable: true
+ type: object
+ ai21:
+ additionalProperties:
+ nullable: true
+ type: object
+ aion-labs:
+ additionalProperties:
+ nullable: true
+ type: object
+ akashml:
+ additionalProperties:
+ nullable: true
+ type: object
+ alibaba:
+ additionalProperties:
+ nullable: true
+ type: object
+ amazon-bedrock:
+ additionalProperties:
+ nullable: true
+ type: object
+ amazon-nova:
+ additionalProperties:
+ nullable: true
+ type: object
+ ambient:
+ additionalProperties:
+ nullable: true
+ type: object
+ anthropic:
+ additionalProperties:
+ nullable: true
+ type: object
+ anyscale:
+ additionalProperties:
+ nullable: true
+ type: object
+ arcee-ai:
+ additionalProperties:
+ nullable: true
+ type: object
+ atlas-cloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ atoma:
+ additionalProperties:
+ nullable: true
+ type: object
+ avian:
+ additionalProperties:
+ nullable: true
+ type: object
+ azure:
+ additionalProperties:
+ nullable: true
+ type: object
+ baseten:
+ additionalProperties:
+ nullable: true
+ type: object
+ black-forest-labs:
+ additionalProperties:
+ nullable: true
+ type: object
+ byteplus:
+ additionalProperties:
+ nullable: true
+ type: object
+ centml:
+ additionalProperties:
+ nullable: true
+ type: object
+ cerebras:
+ additionalProperties:
+ nullable: true
+ type: object
+ chutes:
+ additionalProperties:
+ nullable: true
+ type: object
+ cirrascale:
+ additionalProperties:
+ nullable: true
+ type: object
+ clarifai:
+ additionalProperties:
+ nullable: true
+ type: object
+ cloudflare:
+ additionalProperties:
+ nullable: true
+ type: object
+ cohere:
+ additionalProperties:
+ nullable: true
+ type: object
+ crofai:
+ additionalProperties:
+ nullable: true
+ type: object
+ crusoe:
+ additionalProperties:
+ nullable: true
+ type: object
+ deepinfra:
+ additionalProperties:
+ nullable: true
+ type: object
+ deepseek:
+ additionalProperties:
+ nullable: true
+ type: object
+ dekallm:
+ additionalProperties:
+ nullable: true
+ type: object
+ enfer:
+ additionalProperties:
+ nullable: true
+ type: object
+ fake-provider:
+ additionalProperties:
+ nullable: true
+ type: object
+ featherless:
+ additionalProperties:
+ nullable: true
+ type: object
+ fireworks:
+ additionalProperties:
+ nullable: true
+ type: object
+ friendli:
+ additionalProperties:
+ nullable: true
+ type: object
+ gmicloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ google-ai-studio:
+ additionalProperties:
+ nullable: true
+ type: object
+ google-vertex:
+ additionalProperties:
+ nullable: true
+ type: object
+ gopomelo:
+ additionalProperties:
+ nullable: true
+ type: object
+ groq:
+ additionalProperties:
+ nullable: true
+ type: object
+ huggingface:
+ additionalProperties:
+ nullable: true
+ type: object
+ hyperbolic:
+ additionalProperties:
+ nullable: true
+ type: object
+ hyperbolic-quantized:
+ additionalProperties:
+ nullable: true
+ type: object
+ inception:
+ additionalProperties:
+ nullable: true
+ type: object
+ inceptron:
+ additionalProperties:
+ nullable: true
+ type: object
+ inference-net:
+ additionalProperties:
+ nullable: true
+ type: object
+ infermatic:
+ additionalProperties:
+ nullable: true
+ type: object
+ inflection:
+ additionalProperties:
+ nullable: true
+ type: object
+ inocloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ io-net:
+ additionalProperties:
+ nullable: true
+ type: object
+ ionstream:
+ additionalProperties:
+ nullable: true
+ type: object
+ klusterai:
+ additionalProperties:
+ nullable: true
+ type: object
+ lambda:
+ additionalProperties:
+ nullable: true
+ type: object
+ lepton:
+ additionalProperties:
+ nullable: true
+ type: object
+ liquid:
+ additionalProperties:
+ nullable: true
+ type: object
+ lynn:
+ additionalProperties:
+ nullable: true
+ type: object
+ lynn-private:
+ additionalProperties:
+ nullable: true
+ type: object
+ mancer:
+ additionalProperties:
+ nullable: true
+ type: object
+ mancer-old:
+ additionalProperties:
+ nullable: true
+ type: object
+ mara:
+ additionalProperties:
+ nullable: true
+ type: object
+ meta:
+ additionalProperties:
+ nullable: true
+ type: object
+ minimax:
+ additionalProperties:
+ nullable: true
+ type: object
+ mistral:
+ additionalProperties:
+ nullable: true
+ type: object
+ modal:
+ additionalProperties:
+ nullable: true
+ type: object
+ modelrun:
+ additionalProperties:
+ nullable: true
+ type: object
+ modular:
+ additionalProperties:
+ nullable: true
+ type: object
+ moonshotai:
+ additionalProperties:
+ nullable: true
+ type: object
+ morph:
+ additionalProperties:
+ nullable: true
+ type: object
+ ncompass:
+ additionalProperties:
+ nullable: true
+ type: object
+ nebius:
+ additionalProperties:
+ nullable: true
+ type: object
+ nextbit:
+ additionalProperties:
+ nullable: true
+ type: object
+ nineteen:
+ additionalProperties:
+ nullable: true
+ type: object
+ novita:
+ additionalProperties:
+ nullable: true
+ type: object
+ nvidia:
+ additionalProperties:
+ nullable: true
+ type: object
+ octoai:
+ additionalProperties:
+ nullable: true
+ type: object
+ open-inference:
+ additionalProperties:
+ nullable: true
+ type: object
+ openai:
+ additionalProperties:
+ nullable: true
+ type: object
+ parasail:
+ additionalProperties:
+ nullable: true
+ type: object
+ perplexity:
+ additionalProperties:
+ nullable: true
+ type: object
+ phala:
+ additionalProperties:
+ nullable: true
+ type: object
+ recraft:
+ additionalProperties:
+ nullable: true
+ type: object
+ recursal:
+ additionalProperties:
+ nullable: true
+ type: object
+ reflection:
+ additionalProperties:
+ nullable: true
+ type: object
+ reka:
+ additionalProperties:
+ nullable: true
+ type: object
+ relace:
+ additionalProperties:
+ nullable: true
+ type: object
+ replicate:
+ additionalProperties:
+ nullable: true
+ type: object
+ sambanova:
+ additionalProperties:
+ nullable: true
+ type: object
+ sambanova-cloaked:
+ additionalProperties:
+ nullable: true
+ type: object
+ seed:
+ additionalProperties:
+ nullable: true
+ type: object
+ sf-compute:
+ additionalProperties:
+ nullable: true
+ type: object
+ siliconflow:
+ additionalProperties:
+ nullable: true
+ type: object
+ sourceful:
+ additionalProperties:
+ nullable: true
+ type: object
+ stealth:
+ additionalProperties:
+ nullable: true
+ type: object
+ stepfun:
+ additionalProperties:
+ nullable: true
+ type: object
+ streamlake:
+ additionalProperties:
+ nullable: true
+ type: object
+ switchpoint:
+ additionalProperties:
+ nullable: true
+ type: object
+ targon:
+ additionalProperties:
+ nullable: true
+ type: object
+ together:
+ additionalProperties:
+ nullable: true
+ type: object
+ together-lite:
+ additionalProperties:
+ nullable: true
+ type: object
+ ubicloud:
+ additionalProperties:
+ nullable: true
+ type: object
+ upstage:
+ additionalProperties:
+ nullable: true
+ type: object
+ venice:
+ additionalProperties:
+ nullable: true
+ type: object
+ wandb:
+ additionalProperties:
+ nullable: true
+ type: object
+ xai:
+ additionalProperties:
+ nullable: true
+ type: object
+ xiaomi:
+ additionalProperties:
+ nullable: true
+ type: object
+ z-ai:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: object
+ type: object
+ resolution:
+ description: Resolution of the generated video
+ enum:
+ - 480p
+ - 720p
+ - 1080p
+ - 1K
+ - 2K
+ - 4K
+ example: 720p
+ type: string
+ x-speakeasy-unknown-values: allow
+ seed:
+ description: >-
+ If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
+ type: integer
+ size:
+ description: >-
+ Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio.
+ example: 1280x720
+ type: string
+ required:
+ - prompt
+ - model
+ type: object
+ VideoGenerationResponse:
+ example:
+ generation_id: gen-xyz789
+ id: job-abc123
+ polling_url: /api/v1/videos/job-abc123
+ status: pending
+ properties:
+ error:
+ type: string
+ generation_id:
+ description: The generation ID associated with this video generation job. Available once the job has been processed.
+ type: string
id:
type: string
- description: Unique identifier for the model
- example: openai/gpt-4
- canonical_slug:
+ polling_url:
type: string
+ status:
+ enum:
+ - pending
+ - in_progress
+ - completed
+ - failed
+ - cancelled
+ - expired
+ type: string
+ x-speakeasy-unknown-values: allow
+ unsigned_urls:
+ items:
+ type: string
+ type: array
+ usage:
+ $ref: '#/components/schemas/VideoGenerationUsage'
+ required:
+ - id
+ - polling_url
+ - status
+ type: object
+ VideoGenerationUsage:
+ description: Usage and cost information for the video generation. Available once the job has completed.
+ example:
+ cost: 0.5
+ is_byok: false
+ properties:
+ cost:
+ description: The cost of the video generation in USD.
+ format: double
+ type: number
+ is_byok:
+ description: Whether the request was made using a Bring Your Own Key configuration.
+ type: boolean
+ type: object
+ VideoModel:
+ example:
+ 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
+ properties:
+ allowed_passthrough_parameters:
+ description: List of parameters that are allowed to be passed through to the provider
+ items:
+ type: string
+ type: array
+ canonical_slug:
description: Canonical slug for the model
example: openai/gpt-4
- hugging_face_id:
type: string
- nullable: true
- description: Hugging Face model identifier, if applicable
- example: microsoft/DialoGPT-medium
- name:
- type: string
- description: Display name of the model
- example: GPT-4
created:
- type: number
description: Unix timestamp of when the model was created
example: 1692901234
+ type: integer
description:
- type: string
description: Description of the model
example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
- pricing:
- $ref: '#/components/schemas/PublicPricing'
- context_length:
- type: number
+ type: string
+ generate_audio:
+ description: Whether the model supports generating audio alongside video
nullable: true
- description: Maximum context length in tokens
- example: 8192
- architecture:
- $ref: '#/components/schemas/ModelArchitecture'
- top_provider:
- $ref: '#/components/schemas/TopProviderInfo'
- per_request_limits:
- $ref: '#/components/schemas/PerRequestLimits'
- supported_parameters:
- type: array
+ type: boolean
+ hugging_face_id:
+ description: Hugging Face model identifier, if applicable
+ example: microsoft/DialoGPT-medium
+ nullable: true
+ type: string
+ id:
+ description: Unique identifier for the model
+ example: openai/gpt-4
+ type: string
+ name:
+ description: Display name of the model
+ example: GPT-4
+ type: string
+ pricing_skus:
+ additionalProperties:
+ type: string
+ description: Pricing SKUs with provider prefix stripped, values as strings
+ nullable: true
+ type: object
+ seed:
+ description: Whether the model supports deterministic generation via seed parameter
+ nullable: true
+ type: boolean
+ supported_aspect_ratios:
+ description: Supported output aspect ratios
items:
- $ref: '#/components/schemas/Parameter'
- description: List of supported parameters for this model
- default_parameters:
- $ref: '#/components/schemas/DefaultParameters'
- knowledge_cutoff:
- type: string
+ enum:
+ - '16:9'
+ - '9:16'
+ - '1:1'
+ - '4:3'
+ - '3:4'
+ - '21:9'
+ - '9:21'
+ type: string
+ x-speakeasy-unknown-values: allow
nullable: true
- description: The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown.
- example: '2024-10-01'
- expiration_date:
- type: string
+ type: array
+ supported_durations:
+ description: Supported video durations in seconds
+ items:
+ type: integer
nullable: true
- description: The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.
- example: '2025-06-01'
+ type: array
+ supported_frame_images:
+ description: Supported frame image types (e.g. first_frame, last_frame)
+ items:
+ enum:
+ - first_frame
+ - last_frame
+ type: string
+ x-speakeasy-unknown-values: allow
+ nullable: true
+ type: array
+ supported_resolutions:
+ description: Supported output resolutions
+ items:
+ enum:
+ - 480p
+ - 720p
+ - 1080p
+ - 1K
+ - 2K
+ - 4K
+ type: string
+ x-speakeasy-unknown-values: allow
+ nullable: true
+ type: array
+ supported_sizes:
+ description: Supported output sizes (width x height)
+ items:
+ enum:
+ - 480x480
+ - 480x640
+ - 480x854
+ - 480x1120
+ - 640x480
+ - 720x720
+ - 720x960
+ - 720x1280
+ - 720x1680
+ - 854x480
+ - 960x720
+ - 1080x1080
+ - 1080x1440
+ - 1080x1920
+ - 1080x2520
+ - 1120x480
+ - 1280x720
+ - 1440x1080
+ - 1680x720
+ - 1920x1080
+ - 2160x2160
+ - 2160x2880
+ - 2160x3840
+ - 2160x5040
+ - 2520x1080
+ - 2880x2160
+ - 3840x2160
+ - 5040x2160
+ type: string
+ x-speakeasy-unknown-values: allow
+ nullable: true
+ type: array
required:
- id
- canonical_slug
- name
- created
- - pricing
- - context_length
- - architecture
- - top_provider
- - per_request_limits
- - supported_parameters
- - default_parameters
- description: Information about an AI model available on OpenRouter
- example:
- id: openai/gpt-4
- canonical_slug: openai/gpt-4
- name: GPT-4
- created: 1692901234
- description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
- pricing:
- prompt: '0.00003'
- completion: '0.00006'
- request: '0'
- image: '0'
- context_length: 8192
- architecture:
- tokenizer: GPT
- instruct_type: chatml
- modality: text->text
- input_modalities:
- - text
- output_modalities:
- - text
- top_provider:
- context_length: 8192
- max_completion_tokens: 4096
- is_moderated: true
- per_request_limits: null
- supported_parameters:
- - temperature
- - top_p
- - max_tokens
- default_parameters: null
- knowledge_cutoff: null
- expiration_date: null
- ModelsListResponseData:
- type: array
- items:
- $ref: '#/components/schemas/Model'
- description: List of available models
- ModelsListResponse:
+ - supported_resolutions
+ - supported_aspect_ratios
+ - supported_sizes
+ - supported_durations
+ - supported_frame_images
+ - generate_audio
+ - seed
+ - allowed_passthrough_parameters
type: object
+ VideoModelsListResponse:
+ 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
properties:
data:
- $ref: '#/components/schemas/ModelsListResponseData'
+ items:
+ $ref: '#/components/schemas/VideoModel'
+ type: array
required:
- data
- description: List of available models
- example:
- data:
- - id: openai/gpt-4
- canonical_slug: openai/gpt-4
- name: GPT-4
- created: 1692901234
- description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
- pricing:
- prompt: '0.00003'
- completion: '0.00006'
- request: '0'
- image: '0'
- context_length: 8192
- architecture:
- tokenizer: GPT
- instruct_type: chatml
- modality: text->text
- input_modalities:
- - text
- output_modalities:
- - text
- top_provider:
- context_length: 8192
- max_completion_tokens: 4096
- is_moderated: true
- per_request_limits: null
- supported_parameters:
- - temperature
- - top_p
- - max_tokens
- - frequency_penalty
- - presence_penalty
- default_parameters: null
- knowledge_cutoff: null
- expiration_date: null
- ModelsCountResponse:
type: object
- properties:
- data:
+ WebSearchCallCompletedEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted'
+ - properties: {}
type: object
- properties:
- count:
- type: number
- description: Total number of available models
- example: 150
- required:
- - count
- description: Model count data
- example:
- count: 150
- required:
- - data
- description: Model count data
+ description: Web search call completed
example:
- data:
- count: 150
- InstructType:
+ item_id: ws-123
+ output_index: 0
+ sequence_number: 3
+ type: response.web_search_call.completed
+ WebSearchCallInProgressEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress'
+ - properties: {}
+ type: object
+ description: Web search call in progress
+ example:
+ item_id: ws-123
+ output_index: 0
+ sequence_number: 1
+ type: response.web_search_call.in_progress
+ WebSearchCallSearchingEvent:
+ allOf:
+ - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching'
+ - properties: {}
+ type: object
+ description: Web search call is searching
+ example:
+ item_id: ws-123
+ output_index: 0
+ sequence_number: 2
+ type: response.web_search_call.searching
+ WebSearchConfig:
+ example:
+ max_results: 5
+ search_context_size: medium
+ 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.
+ items:
+ type: string
+ type: array
+ engine:
+ $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.
+ 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
+ WebSearchDomainFilter:
+ example:
+ allowed_domains:
+ - example.com
+ excluded_domains:
+ - spam.com
+ nullable: true
+ properties:
+ allowed_domains:
+ items:
+ type: string
+ nullable: true
+ type: array
+ excluded_domains:
+ items:
+ type: string
+ nullable: true
+ type: array
+ type: object
+ WebSearchEngine:
+ description: The search engine to use for web search.
+ enum:
+ - native
+ - exa
+ - firecrawl
+ - parallel
+ example: exa
type: string
- nullable: true
- enum:
- - none
- - airoboros
- - alpaca
- - alpaca-modif
- - chatml
- - claude
- - code-llama
- - gemma
- - llama2
- - llama3
- - mistral
- - nemotron
- - neural
- - openchat
- - phi3
- - rwkv
- - vicuna
- - zephyr
- - deepseek-r1
- - deepseek-v3.1
- - qwq
- - qwen3
- description: Instruction format type
x-speakeasy-unknown-values: allow
- EndpointStatus:
- type: integer
- enum:
- - 0
- - -1
- - -2
- - -3
- - -5
- - -10
- example: 0
- x-speakeasy-unknown-values: allow
- PercentileStats:
- type: object
- nullable: true
- properties:
- p50:
- type: number
- description: Median (50th percentile)
- example: 25.5
- p75:
- type: number
- description: 75th percentile
- example: 35.2
- p90:
- type: number
- description: 90th percentile
- example: 48.7
- p99:
- type: number
- description: 99th percentile
- example: 85.3
- required:
- - p50
- - p75
- - p90
- - p99
+ WebSearchEngineEnum:
description: >-
- Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
- PublicEndpoint:
- type: object
- properties:
- name:
- type: string
- model_id:
- type: string
- description: The unique identifier for the model (permaslug)
- example: openai/gpt-4
- model_name:
- type: string
- context_length:
- type: number
- pricing:
- type: object
- properties:
- prompt:
- 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
- request:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- image:
- 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
- image_output:
- allOf:
- - $ref: '#/components/schemas/BigNumberUnion'
- - description: A number or string value representing a large number
- 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
- input_audio_cache:
- 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
- internal_reasoning:
- 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
- discount:
- type: number
- required:
- - prompt
- - completion
- provider_name:
- $ref: '#/components/schemas/ProviderName'
- tag:
- type: string
- quantization:
- allOf:
- - $ref: '#/components/schemas/Quantization'
- - nullable: true
- max_completion_tokens:
- type: number
- nullable: true
- max_prompt_tokens:
- type: number
- nullable: true
- supported_parameters:
- type: array
- items:
- $ref: '#/components/schemas/Parameter'
- status:
- $ref: '#/components/schemas/EndpointStatus'
- uptime_last_30m:
- type: number
- nullable: true
- supports_implicit_caching:
- type: boolean
- latency_last_30m:
- $ref: '#/components/schemas/PercentileStats'
- 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.
- required:
- - name
- - model_id
- - model_name
- - context_length
- - pricing
- - provider_name
- - tag
- - quantization
- - max_completion_tokens
- - max_prompt_tokens
- - supported_parameters
- - uptime_last_30m
- - supports_implicit_caching
- - latency_last_30m
- - throughput_last_30m
- description: Information about a specific model endpoint
+ 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.
+ enum:
+ - auto
+ - native
+ - exa
+ - firecrawl
+ - parallel
+ example: auto
+ type: string
+ x-speakeasy-unknown-values: allow
+ WebSearchPlugin:
example:
- name: 'OpenAI: GPT-4'
- model_id: openai/gpt-4
- model_name: GPT-4
- context_length: 8192
- pricing:
- prompt: '0.00003'
- completion: '0.00006'
- request: '0'
- image: '0'
- provider_name: OpenAI
- tag: openai
- quantization: fp16
- max_completion_tokens: 4096
- max_prompt_tokens: 8192
- supported_parameters:
- - temperature
- - top_p
- - max_tokens
- status: 0
- uptime_last_30m: 99.5
- supports_implicit_caching: true
- latency_last_30m:
- p50: 0.25
- p75: 0.35
- p90: 0.48
- p99: 0.85
- throughput_last_30m:
- p50: 45.2
- p75: 38.5
- p90: 28.3
- p99: 15.1
- ListEndpointsResponse:
- type: object
+ enabled: true
+ id: web
+ max_results: 5
properties:
- id:
- type: string
- description: Unique identifier for the model
- example: openai/gpt-4
- name:
- type: string
- description: Display name of the model
- example: GPT-4
- created:
- type: number
- description: Unix timestamp of when the model was created
- example: 1692901234
- description:
- type: string
- description: Description of the model
- example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
- architecture:
- allOf:
- - $ref: '#/components/schemas/ModelArchitecture'
- - properties:
- tokenizer:
- allOf:
- - $ref: '#/components/schemas/ModelGroup'
- - nullable: true
- instruct_type:
- $ref: '#/components/schemas/InstructType'
- modality:
- type: string
- nullable: true
- description: Primary modality of the model
- example: text
- input_modalities:
- type: array
- items:
- $ref: '#/components/schemas/InputModality'
- description: Supported input modalities
- output_modalities:
- type: array
- items:
- $ref: '#/components/schemas/OutputModality'
- description: Supported output modalities
- required:
- - tokenizer
- - instruct_type
- - modality
- - input_modalities
- - output_modalities
- example:
- tokenizer: GPT
- instruct_type: chatml
- modality: text
- endpoints:
- type: array
+ enabled:
+ description: Set to false to disable the web-search plugin for this request. Defaults to true.
+ type: boolean
+ engine:
+ $ref: '#/components/schemas/WebSearchEngine'
+ exclude_domains:
+ description: >-
+ A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
+ example:
+ - example.com
+ - '*.substack.com'
+ - openai.com/blog
items:
- $ref: '#/components/schemas/PublicEndpoint'
- description: List of available endpoints for this model
+ type: string
+ type: array
+ id:
+ enum:
+ - web
+ type: string
+ include_domains:
+ description: >-
+ A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
+ example:
+ - example.com
+ - '*.substack.com'
+ - openai.com/blog
+ items:
+ type: string
+ type: array
+ max_results:
+ type: integer
+ search_prompt:
+ type: string
required:
- id
- - name
- - created
- - description
- - architecture
- - endpoints
- description: List of available endpoints for a model
- example:
- id: openai/gpt-4
- name: GPT-4
- created: 1692901234
- description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
- architecture:
- tokenizer: GPT
- instruct_type: chatml
- modality: text->text
- input_modalities:
- - text
- output_modalities:
- - text
- endpoints:
- - name: 'OpenAI: GPT-4'
- model_name: GPT-4
- context_length: 8192
- pricing:
- prompt: '0.00003'
- completion: '0.00006'
- request: '0'
- image: '0'
- provider_name: OpenAI
- tag: openai
- quantization: fp16
- max_completion_tokens: 4096
- max_prompt_tokens: 8192
- supported_parameters:
- - temperature
- - top_p
- - max_tokens
- - frequency_penalty
- - presence_penalty
- status: default
- uptime_last_30m: 99.5
- supports_implicit_caching: true
- latency_last_30m:
- p50: 0.25
- p75: 0.35
- p90: 0.48
- p99: 0.85
- throughput_last_30m:
- p50: 45.2
- p75: 38.5
- p90: 28.3
- p99: 15.1
- ConflictResponseErrorData:
type: object
+ WebSearchServerTool:
+ description: Web search tool configuration (2025-08-26 version)
+ example:
+ engine: auto
+ filters:
+ allowed_domains:
+ - example.com
+ type: web_search_2025_08_26
properties:
- code:
+ engine:
+ $ref: '#/components/schemas/WebSearchEngineEnum'
+ filters:
+ $ref: '#/components/schemas/WebSearchDomainFilter'
+ 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
- message:
+ search_context_size:
+ $ref: '#/components/schemas/SearchContextSizeEnum'
+ type:
+ enum:
+ - web_search_2025_08_26
type: string
- metadata:
- type: object
- nullable: true
- additionalProperties:
- nullable: true
+ user_location:
+ $ref: '#/components/schemas/WebSearchUserLocation'
required:
- - code
- - message
- description: Error data for ConflictResponse
- example:
- code: 409
- message: Resource conflict. Please try again later.
- ConflictResponse:
+ - type
type: object
- properties:
- error:
- $ref: '#/components/schemas/ConflictResponseErrorData'
- user_id:
- type: string
- nullable: true
- required:
- - error
- description: Conflict - Resource conflict or concurrent modification
+ WebSearchServerTool_OpenRouter:
+ description: 'OpenRouter built-in server tool: searches the web for current information'
example:
- error:
- code: 409
- message: Resource conflict. Please try again later.
- parameters:
- AppIdentifier:
- name: HTTP-Referer
- in: header
- schema:
- type: string
- description: |
- The app identifier should be your app's URL and is used as the primary identifier for rankings.
- This is used to track API usage per application.
- AppDisplayName:
- name: X-OpenRouter-Title
- in: header
- schema:
- type: string
- description: |
- The app display name allows you to customize how your app appears in OpenRouter's dashboard.
- AppCategories:
- name: X-OpenRouter-Categories
- in: header
- schema:
- type: string
- description: |
- Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
+ parameters:
+ max_results: 5
+ 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
+ type:
+ enum:
+ - openrouter:web_search
+ type: string
+ required:
+ - type
+ type: object
+ WebSearchSource:
+ example:
+ type: url
+ url: https://example.com/article
+ properties:
+ type:
+ enum:
+ - url
+ type: string
+ url:
+ type: string
+ required:
+ - type
+ - url
+ type: object
+ WebSearchStatus:
+ enum:
+ - completed
+ - searching
+ - in_progress
+ - failed
+ example: completed
+ type: string
+ x-speakeasy-unknown-values: allow
+ WebSearchUserLocation:
+ description: User location information for web search
+ example:
+ city: San Francisco
+ country: USA
+ region: California
+ timezone: America/Los_Angeles
+ type: approximate
+ nullable: true
+ 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
+ WebSearchUserLocationServerTool:
+ description: Approximate user location for location-biased results.
+ example:
+ city: San Francisco
+ country: US
+ region: California
+ timezone: America/Los_Angeles
+ type: approximate
+ properties:
+ city:
+ type: string
+ country:
+ type: string
+ region:
+ type: string
+ timezone:
+ type: string
+ type:
+ enum:
+ - approximate
+ type: string
+ type: object
securitySchemes:
apiKey:
- type: http
- scheme: bearer
description: API key as bearer token in Authorization header
+ scheme: bearer
+ type: http
bearer:
- type: http
- scheme: bearer
description: API key as bearer token in Authorization header
+ scheme: bearer
+ type: http
+externalDocs:
+ description: OpenRouter Documentation
+ url: https://openrouter.ai/docs
+info:
+ contact:
+ email: support@openrouter.ai
+ name: OpenRouter Support
+ url: https://openrouter.ai/docs
+ description: OpenAI-compatible API with additional OpenRouter features
+ license:
+ name: MIT
+ url: https://opensource.org/licenses/MIT
+ title: OpenRouter API
+ version: 1.0.0
+openapi: 3.1.0
paths:
- /responses:
- post:
- x-speakeasy-name-override: send
- x-speakeasy-stream-request-field: stream
- tags:
- - beta.responses
- summary: Create a response
- description: Creates a streaming or non-streaming response using OpenResponses API format
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResponsesRequest'
- required: true
- responses:
- '200':
- description: Successful response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OpenResponsesResult'
- text/event-stream:
- schema:
- type: object
- properties:
- data:
- $ref: '#/components/schemas/StreamEvents'
- required:
- - data
- x-speakeasy-sse-sentinel: '[DONE]'
- '400':
- description: Bad Request - Invalid request parameters or malformed input
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Authentication required or invalid credentials
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '402':
- description: Payment Required - Insufficient credits or quota to complete request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentRequiredResponse'
- '404':
- description: Not Found - Resource does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '408':
- description: Request Timeout - Operation exceeded time limit
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RequestTimeoutResponse'
- '413':
- description: Payload Too Large - Request payload exceeds size limits
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PayloadTooLargeResponse'
- '422':
- description: Unprocessable Entity - Semantic validation failure
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnprocessableEntityResponse'
- '429':
- description: Too Many Requests - Rate limit exceeded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- '500':
- description: Internal Server Error - Unexpected server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- '502':
- description: Bad Gateway - Provider/upstream API failure
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadGatewayResponse'
- '503':
- description: Service Unavailable - Service temporarily unavailable
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ServiceUnavailableResponse'
- '524':
- description: Infrastructure Timeout - Request timed out at our edge network
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
- '529':
- description: Provider Overloaded - Provider is temporarily overloaded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProviderOverloadedResponse'
- operationId: createResponses
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /messages:
- post:
- x-speakeasy-ignore: true
- x-speakeasy-name-override: create
- x-speakeasy-stream-request-field: stream
- tags:
- - Anthropic Messages
- summary: Create a message
- description: >-
- Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/MessagesRequest'
- required: true
- responses:
- '200':
- description: Successful response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/MessagesResult'
- text/event-stream:
- schema:
- type: object
- properties:
- event:
- type: string
- data:
- $ref: '#/components/schemas/MessagesStreamEvents'
- required:
- - event
- - data
- x-speakeasy-sse-sentinel: '[DONE]'
- '400':
- description: Invalid request error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '401':
- description: Authentication error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '403':
- description: Permission denied error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '404':
- description: Not found error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '429':
- description: Rate limit error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '500':
- description: API error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '503':
- description: Overloaded error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- '529':
- description: Overloaded error
- content:
- application/json:
- schema:
- type: object
- properties:
- type:
- type: string
- enum:
- - error
- error:
- type: object
- properties:
- type:
- type: string
- message:
- type: string
- required:
- - type
- - message
- required:
- - type
- - error
- operationId: createMessages
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
/activity:
get:
- tags:
- - Analytics
- operationId: getUserActivity
- summary: Get user activity grouped by endpoint
description: >-
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getUserActivity
parameters:
- - schema:
- type: string
+ - description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
+ in: query
+ name: date
+ required: false
+ schema:
description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
example: '2025-08-24'
- required: false
- description: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
- name: date
+ type: string
+ - description: Filter by API key hash (SHA-256 hex string, as returned by the keys API).
in: query
+ name: api_key_hash
+ required: false
+ schema:
+ description: Filter by API key hash (SHA-256 hex string, as returned by the keys API).
+ example: abc123def456...
+ type: string
+ - description: Filter by org member user ID. Only applicable for organization accounts.
+ in: query
+ name: user_id
+ required: false
+ schema:
+ description: Filter by org member user ID. Only applicable for organization accounts.
+ example: user_abc123
+ type: string
responses:
'200':
- description: Returns user activity data grouped by endpoint
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
schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/ActivityItem'
- description: List of activity items
- required:
- - data
- example:
- data:
- - date: '2025-08-24'
- model: openai/gpt-4.1
- model_permaslug: openai/gpt-4.1-2025-04-14
- endpoint_id: 550e8400-e29b-41d4-a716-446655440000
- provider_name: OpenAI
- usage: 0.015
- byok_usage_inference: 0.012
- requests: 5
- prompt_tokens: 50
- completion_tokens: 125
- reasoning_tokens: 25
+ $ref: '#/components/schemas/ActivityResponse'
+ description: Returns user activity data grouped by endpoint
'400':
- description: Bad Request - Invalid date format or date range
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':
- description: Unauthorized - Authentication required or invalid credentials
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
'403':
- description: Forbidden - Only management keys can fetch activity
content:
application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
schema:
$ref: '#/components/schemas/ForbiddenResponse'
- '500':
- description: Internal Server Error - Unexpected server error
+ 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"
+ /auth/keys:
+ post:
+ description: Exchange an authorization code from the PKCE flow for a user-controlled API key
+ operationId: exchangeAuthCodeForAPIKey
+ requestBody:
+ content:
+ application/json:
+ example:
+ code: auth_code_abc123def456
+ code_challenge_method: S256
+ code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
+ schema:
+ example:
+ code: auth_code_abc123def456
+ code_challenge_method: S256
+ code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
+ properties:
+ code:
+ description: The authorization code received from the OAuth redirect
+ example: auth_code_abc123def456
+ type: string
+ code_challenge_method:
+ description: The method used to generate the code challenge
+ enum:
+ - S256
+ - plain
+ - null
+ example: S256
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ code_verifier:
+ description: The code verifier if code_challenge was used in the authorization request
+ example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
+ type: string
+ required:
+ - code
+ type: object
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ key: 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
+ user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah
+ schema:
+ example:
+ key: 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
+ user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah
+ properties:
+ key:
+ description: The API key to use for OpenRouter requests
+ example: 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
+ type: string
+ user_id:
+ description: User ID associated with the API key
+ example: user_2yOPcMpKoQhcd4bVgSMlELRaIah
+ nullable: true
+ type: string
+ required:
+ - key
+ - user_id
+ type: object
+ description: Successfully exchanged code for an API key
+ '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
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: Only management keys can perform this operation
+ schema:
+ $ref: '#/components/schemas/ForbiddenResponse'
+ description: Forbidden - Authentication successful but insufficient permissions
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Exchange authorization code for API key
+ tags:
+ - OAuth
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /auth/keys/code:
+ post:
+ description: Create an authorization code for the PKCE flow to generate a user-controlled API key
+ operationId: createAuthKeysCode
+ requestBody:
+ content:
+ application/json:
+ example:
+ callback_url: https://myapp.com/auth/callback
+ code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
+ code_challenge_method: S256
+ limit: 100
+ schema:
+ example:
+ callback_url: https://myapp.com/auth/callback
+ code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
+ code_challenge_method: S256
+ limit: 100
+ properties:
+ callback_url:
+ description: >-
+ The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed.
+ example: https://myapp.com/auth/callback
+ format: uri
+ type: string
+ code_challenge:
+ description: PKCE code challenge for enhanced security
+ example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
+ type: string
+ code_challenge_method:
+ description: The method used to generate the code challenge
+ enum:
+ - S256
+ - plain
+ example: S256
+ type: string
+ x-speakeasy-unknown-values: allow
+ expires_at:
+ description: Optional expiration time for the API key to be created
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ key_label:
+ description: Optional custom label for the API key. Defaults to the app name if not provided.
+ example: My Custom Key
+ maxLength: 100
+ type: string
+ limit:
+ description: Credit limit for the API key to be created
+ example: 100
+ format: double
+ type: number
+ spawn_agent:
+ description: Agent identifier for spawn telemetry
+ example: my-agent
+ type: string
+ x-fern-ignore: true
+ x-speakeasy-ignore: true
+ spawn_cloud:
+ description: Cloud identifier for spawn telemetry
+ example: aws-us-east-1
+ type: string
+ x-fern-ignore: true
+ x-speakeasy-ignore: true
+ usage_limit_type:
+ description: Optional credit limit reset interval. When set, the credit limit resets on this interval.
+ enum:
+ - daily
+ - weekly
+ - monthly
+ example: monthly
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - callback_url
+ type: object
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ app_id: 12345
+ created_at: '2025-08-24T10:30:00Z'
+ id: auth_code_xyz789
+ schema:
+ example:
+ data:
+ app_id: 12345
+ created_at: '2025-08-24T10:30:00Z'
+ id: auth_code_xyz789
+ properties:
+ data:
+ description: Auth code data
+ example:
+ app_id: 12345
+ created_at: '2025-08-24T10:30:00Z'
+ id: auth_code_xyz789
+ properties:
+ app_id:
+ description: The application ID associated with this auth code
+ example: 12345
+ type: integer
+ created_at:
+ description: ISO 8601 timestamp of when the auth code was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ id:
+ description: The authorization code ID to use in the exchange request
+ example: auth_code_xyz789
+ type: string
+ required:
+ - id
+ - app_id
+ - created_at
+ type: object
+ required:
+ - data
+ type: object
+ description: Successfully created authorization code
+ '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
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: Resource conflict. Please try again later.
+ schema:
+ $ref: '#/components/schemas/ConflictResponse'
+ description: Conflict - Resource conflict or concurrent modification
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Create authorization code
+ tags:
+ - OAuth
+ x-speakeasy-name-override: createAuthCode
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/chat/completions:
post:
- x-speakeasy-group: chat
- x-speakeasy-name-override: send
- x-speakeasy-stream-request-field: stream
- tags:
- - Chat
- summary: Create a chat completion
- operationId: sendChatCompletionRequest
description: >-
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
+ operationId: sendChatCompletionRequest
requestBody:
content:
application/json:
+ example:
+ 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
schema:
$ref: '#/components/schemas/ChatRequest'
required: true
responses:
'200':
- description: Successful chat completion response
content:
application/json:
+ example:
+ choices:
+ - finish_reason: stop
+ index: 0
+ message:
+ content: The capital of France is Paris.
+ role: assistant
+ created: 1677652288
+ id: chatcmpl-123
+ model: openai/gpt-4
+ object: chat.completion
+ usage:
+ completion_tokens: 10
+ prompt_tokens: 25
+ total_tokens: 35
schema:
$ref: '#/components/schemas/ChatResult'
text/event-stream:
+ 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
schema:
- type: object
properties:
data:
$ref: '#/components/schemas/ChatStreamChunk'
required:
- data
+ type: object
x-speakeasy-sse-sentinel: '[DONE]'
+ description: Successful chat completion response
'400':
- description: Bad Request - Invalid request parameters or malformed input
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':
- description: Unauthorized - Authentication required or invalid credentials
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
'402':
- description: Payment Required - Insufficient credits or quota to complete request
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':
- description: Not Found - Resource does not exist
content:
application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
'408':
- description: Request Timeout - Operation exceeded time limit
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':
- description: Payload Too Large - Request payload exceeds size limits
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':
- description: Unprocessable Entity - Semantic validation failure
content:
application/json:
+ example:
+ error:
+ code: 422
+ message: Invalid argument
schema:
$ref: '#/components/schemas/UnprocessableEntityResponse'
+ description: Unprocessable Entity - Semantic validation failure
'429':
- description: Too Many Requests - Rate limit exceeded
content:
application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
'500':
- description: Internal Server Error - Unexpected server error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
'502':
- description: Bad Gateway - Provider/upstream API failure
content:
application/json:
+ example:
+ error:
+ code: 502
+ message: Provider returned error
schema:
$ref: '#/components/schemas/BadGatewayResponse'
+ description: Bad Gateway - Provider/upstream API failure
'503':
- description: Service Unavailable - Service temporarily unavailable
content:
application/json:
+ example:
+ error:
+ code: 503
+ message: Service temporarily unavailable
schema:
$ref: '#/components/schemas/ServiceUnavailableResponse'
+ description: Service Unavailable - Service temporarily unavailable
'524':
- description: Infrastructure Timeout - Request timed out at our edge network
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':
- description: Provider Overloaded - Provider is temporarily overloaded
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 chat completion
+ tags:
+ - Chat
+ x-speakeasy-group: chat
+ x-speakeasy-name-override: send
+ x-speakeasy-stream-request-field: stream
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/credits:
get:
- x-speakeasy-name-override: getCredits
- tags:
- - Credits
- summary: Get remaining credits
- operationId: getCredits
description: >-
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getCredits
responses:
'200':
- description: Returns the total credits purchased and used
content:
application/json:
+ example:
+ data:
+ total_credits: 100.5
+ total_usage: 25.75
schema:
- type: object
- properties:
- data:
- type: object
- properties:
- total_credits:
- type: number
- description: Total credits purchased
- example: 100.5
- total_usage:
- type: number
- description: Total credits used
- example: 25.75
- required:
- - total_credits
- - total_usage
- example:
- total_credits: 100.5
- total_usage: 25.75
- required:
- - data
description: Total credits purchased and used
example:
data:
total_credits: 100.5
total_usage: 25.75
+ properties:
+ data:
+ example:
+ total_credits: 100.5
+ total_usage: 25.75
+ properties:
+ total_credits:
+ description: Total credits purchased
+ example: 100.5
+ format: double
+ type: number
+ total_usage:
+ description: Total credits used
+ example: 25.75
+ format: double
+ type: number
+ required:
+ - total_credits
+ - total_usage
+ type: object
+ required:
+ - data
+ type: object
+ description: Returns the total credits purchased and used
'401':
- description: Unauthorized - Authentication required or invalid credentials
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
'403':
- description: Forbidden - Only management keys can fetch credits
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':
- description: Internal Server Error - Unexpected server error
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 remaining credits
+ tags:
+ - Credits
+ x-speakeasy-name-override: getCredits
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/credits/coinbase:
post:
- security: []
- x-speakeasy-name-override: createCoinbaseCharge
deprecated: true
- tags:
- - Credits
- summary: Deprecated Coinbase Commerce charge endpoint
+ description: >-
+ Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead.
operationId: createCoinbaseCharge
- description: Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead.
responses:
+ '200':
+ description: This endpoint is deprecated and will never return a 200 response.
'410':
- description: Gone - Coinbase Commerce charge creation has been removed
content:
application/json:
+ 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.
schema:
$ref: '#/components/schemas/GoneResponse'
+ description: Gone - Endpoint has been permanently removed or deprecated
+ security: []
+ summary: Deprecated Coinbase Commerce charge endpoint
+ tags:
+ - Credits
+ x-fern-ignore: true
+ x-speakeasy-ignore: true
+ x-speakeasy-name-override: createCoinbaseCharge
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/embeddings:
post:
- x-speakeasy-name-override: generate
- tags:
- - Embeddings
- summary: Submit an embedding request
description: Submits an embedding request to the embeddings router
+ operationId: createEmbeddings
requestBody:
content:
application/json:
schema:
- type: object
+ description: Embeddings request input
+ example:
+ dimensions: 1536
+ input: The quick brown fox jumps over the lazy dog
+ model: openai/text-embedding-3-small
properties:
+ dimensions:
+ description: The number of dimensions for the output embeddings
+ example: 1536
+ minimum: 1
+ type: integer
+ encoding_format:
+ description: The format of the output embeddings
+ enum:
+ - float
+ - base64
+ example: float
+ type: string
+ x-speakeasy-unknown-values: allow
input:
anyOf:
- type: string
- - type: array
- items:
+ - items:
type: string
- - type: array
- items:
+ type: array
+ - items:
type: number
- - type: array
- items:
- type: array
+ type: array
+ - items:
items:
type: number
- - type: array
- items:
- type: object
+ type: array
+ type: array
+ - items:
properties:
content:
- type: array
items:
oneOf:
- - type: object
- properties:
- type:
+ - properties:
+ text:
type: string
+ type:
enum:
- text
- text:
type: string
required:
- type
- text
- - type: object
- properties:
- type:
- type: string
- enum:
- - image_url
+ type: object
+ - properties:
image_url:
- type: object
properties:
url:
type: string
required:
- url
+ type: object
+ type:
+ enum:
+ - image_url
+ type: string
required:
- type
- image_url
+ type: object
+ type: array
required:
- content
+ type: object
+ type: array
+ description: Text, token, or multimodal input(s) to embed
+ example: The quick brown fox jumps over the lazy dog
+ input_type:
+ description: The type of input (e.g. search_query, search_document)
+ example: search_query
+ type: string
model:
- type: string
- encoding_format:
- type: string
- enum:
- - float
- - base64
- x-speakeasy-unknown-values: allow
- dimensions:
- type: integer
- minimum: 0
- exclusiveMinimum: true
- user:
+ description: The model to use for embeddings
+ example: openai/text-embedding-3-small
type: string
provider:
- $ref: '#/components/schemas/ProviderPreferences'
- input_type:
+ allOf:
+ - $ref: '#/components/schemas/ProviderPreferences'
+ - description: Provider routing preferences for the request.
+ user:
+ description: A unique identifier for the end-user
+ example: user-1234
type: string
required:
- input
- model
+ type: object
required: true
responses:
'200':
- description: Embedding response
content:
application/json:
schema:
- type: object
- properties:
- id:
- type: string
- object:
- type: string
- enum:
- - list
+ description: Embeddings response containing embedding vectors
+ example:
data:
- type: array
+ - embedding:
+ - 0.0023064255
+ - -0.009327292
+ - 0.015797347
+ index: 0
+ object: embedding
+ model: openai/text-embedding-3-small
+ object: list
+ usage:
+ prompt_tokens: 8
+ total_tokens: 8
+ properties:
+ data:
+ description: List of embedding objects
+ example:
+ - embedding:
+ - 0.0023064255
+ - -0.009327292
+ - 0.015797347
+ index: 0
+ object: embedding
items:
- type: object
+ description: A single embedding object
+ example:
+ embedding:
+ - 0.0023064255
+ - -0.009327292
+ - 0.015797347
+ index: 0
+ object: embedding
properties:
- object:
- type: string
- enum:
- - embedding
embedding:
anyOf:
- - type: array
- items:
+ - items:
type: number
+ type: array
- type: string
+ description: Embedding vector as an array of floats or a base64 string
+ example:
+ - 0.0023064255
+ - -0.009327292
+ - 0.015797347
index:
- type: number
+ description: Index of the embedding in the input list
+ example: 0
+ type: integer
+ object:
+ enum:
+ - embedding
+ type: string
required:
- object
- embedding
+ type: object
+ type: array
+ id:
+ description: Unique identifier for the embeddings response
+ example: embd-1234567890
+ type: string
model:
+ description: The model used for embeddings
+ example: openai/text-embedding-3-small
+ type: string
+ object:
+ enum:
+ - list
type: string
usage:
- type: object
+ description: Token usage statistics
+ example:
+ prompt_tokens: 8
+ total_tokens: 8
properties:
- prompt_tokens:
- type: number
- total_tokens:
- type: number
cost:
+ description: Cost of the request in credits
+ example: 0.0001
+ format: double
type: number
+ prompt_tokens:
+ description: Number of tokens in the input
+ example: 8
+ type: integer
+ total_tokens:
+ description: Total number of tokens used
+ example: 8
+ type: integer
required:
- prompt_tokens
- total_tokens
+ type: object
required:
- object
- data
- model
+ type: object
text/event-stream:
+ example: 'data: [DONE]'
schema:
- type: string
description: Not used for embeddings - embeddings do not support streaming
+ type: string
x-speakeasy-sse-sentinel: '[DONE]'
+ description: Embedding response
'400':
- description: Bad Request - Invalid request parameters or malformed input
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':
- description: Unauthorized - Authentication required or invalid credentials
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
'402':
- description: Payment Required - Insufficient credits or quota to complete request
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':
- description: Not Found - Resource does not exist
content:
application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
'429':
- description: Too Many Requests - Rate limit exceeded
content:
application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
'500':
- description: Internal Server Error - Unexpected server error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
'502':
- description: Bad Gateway - Provider/upstream API failure
content:
application/json:
+ example:
+ error:
+ code: 502
+ message: Provider returned error
schema:
$ref: '#/components/schemas/BadGatewayResponse'
+ description: Bad Gateway - Provider/upstream API failure
'503':
- description: Service Unavailable - Service temporarily unavailable
content:
application/json:
+ example:
+ error:
+ code: 503
+ message: Service temporarily unavailable
schema:
$ref: '#/components/schemas/ServiceUnavailableResponse'
+ description: Service Unavailable - Service temporarily unavailable
'524':
- description: Cloudflare Timeout - Provider request timed out at CDN edge
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':
- description: Provider Overloaded - Provider is temporarily overloaded
content:
application/json:
+ example:
+ error:
+ code: 529
+ message: Provider returned error
schema:
$ref: '#/components/schemas/ProviderOverloadedResponse'
- operationId: createEmbeddings
+ description: Provider Overloaded - Provider is temporarily overloaded
+ summary: Submit an embedding request
+ tags:
+ - Embeddings
+ x-speakeasy-name-override: generate
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/embeddings/models:
get:
+ description: Returns a list of all available embeddings models and their properties
+ operationId: listEmbeddingsModels
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - architecture:
+ input_modalities:
+ - text
+ instruct_type: null
+ modality: text->text
+ output_modalities:
+ - embeddings
+ tokenizer: GPT
+ canonical_slug: openai/text-embedding-3-small
+ context_length: 8192
+ created: 1692901234
+ default_parameters: null
+ description: OpenAI text embedding model optimized for performance.
+ expiration_date: null
+ id: openai/text-embedding-3-small
+ knowledge_cutoff: null
+ links:
+ details: /api/v1/models/openai/text-embedding-3-small/endpoints
+ name: Text Embedding 3 Small
+ per_request_limits: null
+ pricing:
+ completion: '0'
+ image: '0'
+ prompt: '0.00000002'
+ request: '0'
+ supported_parameters: []
+ top_provider:
+ context_length: 8192
+ is_moderated: false
+ max_completion_tokens: null
+ schema:
+ $ref: '#/components/schemas/ModelsListResponse'
+ description: Returns a list of embeddings models
+ '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
+ '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 embeddings models
tags:
- Embeddings
x-speakeasy-name-override: listModels
- summary: List all embeddings models
- description: Returns a list of all available embeddings models and their properties
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /endpoints/zdr:
+ get:
+ operationId: listEndpointsZdr
responses:
'200':
- description: Returns a list of embeddings models
content:
application/json:
+ example:
+ data:
+ - 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: default
+ 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
schema:
- $ref: '#/components/schemas/ModelsListResponse'
- '400':
- description: Bad Request - Invalid request parameters
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
+ example:
+ data:
+ - 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: default
+ 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:
+ data:
+ items:
+ $ref: '#/components/schemas/PublicEndpoint'
+ type: array
+ required:
+ - data
+ type: object
+ description: Returns a list of endpoints
'500':
- description: Internal Server Error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
- operationId: listEmbeddingsModels
+ description: Internal Server Error - Unexpected server error
+ summary: Preview the impact of ZDR on the available endpoints
+ tags:
+ - Endpoints
+ x-speakeasy-name-override: listZdrEndpoints
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/generation:
get:
- tags:
- - Generations
- summary: Get request & usage metadata for a generation
+ operationId: getGeneration
parameters:
- - schema:
- type: string
- minLength: 1
- required: true
- name: id
+ - description: The generation ID
in: query
+ name: id
+ required: true
+ schema:
+ description: The generation ID
+ example: gen-1234567890
+ minLength: 1
+ type: string
responses:
'200':
- description: Returns the request metadata for this generation
content:
application/json:
+ example:
+ data:
+ api_type: null
+ 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: null
+ 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: 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:
- type: object
+ description: Generation response
properties:
data:
- type: object
+ description: Generation data
properties:
- id:
- type: string
- description: Unique identifier for the generation
- example: gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG
- upstream_id:
- type: string
- nullable: true
- description: Upstream provider's identifier for this generation
- example: chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946
- total_cost:
- type: number
- description: Total cost of the generation in USD
- example: 0.0015
- cache_discount:
- type: number
- nullable: true
- description: Discount applied due to caching
- example: 0.0002
- upstream_inference_cost:
- type: number
- nullable: true
- description: Cost charged by the upstream provider
- example: 0.0012
- created_at:
- type: string
- description: ISO 8601 timestamp of when the generation was created
- example: '2024-07-15T23:33:19.433273+00:00'
- model:
- type: string
- description: Model used for the generation
- example: sao10k/l3-stheno-8b
- app_id:
- type: number
- nullable: true
- description: ID of the app that made the request
- example: 12345
- streamed:
- type: boolean
- nullable: true
- description: Whether the response was streamed
- example: true
- cancelled:
- type: boolean
- nullable: true
- description: Whether the generation was cancelled
- example: false
- provider_name:
- type: string
- nullable: true
- description: Name of the provider that served the request
- example: Infermatic
- latency:
- type: number
- nullable: true
- description: Total latency in milliseconds
- example: 1250
- moderation_latency:
- type: number
- nullable: true
- description: Moderation latency in milliseconds
- example: 50
- generation_time:
- type: number
- nullable: true
- description: Time taken for generation in milliseconds
- example: 1200
- finish_reason:
- type: string
- nullable: true
- description: Reason the generation finished
- example: stop
- tokens_prompt:
- type: number
- nullable: true
- description: Number of tokens in the prompt
- example: 10
- tokens_completion:
- type: number
- nullable: true
- description: Number of tokens in the completion
- example: 25
- native_tokens_prompt:
- type: number
- nullable: true
- description: Native prompt tokens as reported by provider
- example: 10
- native_tokens_completion:
- type: number
- nullable: true
- description: Native completion tokens as reported by provider
- example: 25
- native_tokens_completion_images:
- type: number
- nullable: true
- description: Native completion image tokens as reported by provider
- example: 0
- native_tokens_reasoning:
- type: number
- nullable: true
- description: Native reasoning tokens as reported by provider
- example: 5
- native_tokens_cached:
- type: number
- nullable: true
- description: Native cached tokens as reported by provider
- example: 3
- num_media_prompt:
- type: number
- nullable: true
- description: Number of media items in the prompt
- example: 1
- num_input_audio_prompt:
- type: number
- nullable: true
- description: Number of audio inputs in the prompt
- example: 0
- num_media_completion:
- type: number
- nullable: true
- description: Number of media items in the completion
- example: 0
- num_search_results:
- type: number
- nullable: true
- description: Number of search results included
- example: 5
- origin:
- type: string
- description: Origin URL of the request
- example: https://openrouter.ai/
- usage:
- type: number
- description: Usage amount in USD
- example: 0.0015
- is_byok:
- type: boolean
- description: Whether this used bring-your-own-key
- example: false
- native_finish_reason:
- type: string
- nullable: true
- description: Native finish reason as reported by provider
- example: stop
- external_user:
- type: string
- nullable: true
- description: External user identifier
- example: user-123
api_type:
- type: string
- nullable: true
+ description: Type of API used for the generation
enum:
- completions
- embeddings
+ - rerank
- video
- description: Type of API used for the generation
- x-speakeasy-unknown-values: allow
- router:
- type: string
+ - null
nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ app_id:
+ description: ID of the app that made the request
+ example: 12345
+ type: integer
+ cache_discount:
+ description: Discount applied due to caching
+ example: 0.0002
+ format: double
+ 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
+ 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
+ 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
+ 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
+ type: integer
+ native_tokens_completion:
+ description: Native completion tokens as reported by provider
+ example: 25
+ type: integer
+ native_tokens_completion_images:
+ description: Native completion image tokens as reported by provider
+ example: 0
+ type: integer
+ native_tokens_prompt:
+ description: Native prompt tokens as reported by provider
+ example: 10
+ type: integer
+ native_tokens_reasoning:
+ description: Native reasoning tokens as reported by provider
+ example: 5
+ type: integer
+ num_input_audio_prompt:
+ description: Number of audio inputs in the prompt
+ example: 0
+ type: integer
+ num_media_completion:
+ description: Number of media items in the completion
+ example: 0
+ type: integer
+ num_media_prompt:
+ description: Number of media items in the prompt
+ example: 1
+ type: integer
+ num_search_results:
+ description: Number of search results included
+ example: 5
+ 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
- provider_responses:
- type: array
nullable: true
- items:
- type: object
- properties:
- id:
- type: string
- endpoint_id:
- type: string
- model_permaslug:
- type: string
- provider_name:
- type: string
- 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
- - 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
- - Reka
- - Relace
- - SambaNova
- - Seed
- - SiliconFlow
- - Sourceful
- - StepFun
- - Stealth
- - StreamLake
- - Switchpoint
- - Together
- - Upstage
- - Venice
- - WandB
- - Xiaomi
- - xAI
- - Z.AI
- - FakeProvider
- x-speakeasy-unknown-values: allow
- status:
- type: number
- nullable: true
- latency:
- type: number
- is_byok:
- type: boolean
- required:
- - status
- description: List of provider responses for this generation, including fallback attempts
+ 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
+ type: integer
+ tokens_prompt:
+ description: Number of tokens in the prompt
+ example: 10
+ 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
+ type: number
+ usage:
+ description: Usage amount in USD
+ example: 0.0015
+ format: double
+ type: number
user_agent:
- type: string
- nullable: true
description: User-Agent header from the request
- http_referer:
- type: string
nullable: true
- description: Referer header from the request
+ type: string
required:
- id
- upstream_id
@@ -15558,113 +14744,2789 @@ paths:
- provider_responses
- user_agent
- http_referer
- description: Generation data
+ type: object
required:
- data
- description: Generation response
+ type: object
+ description: Returns the request metadata for this generation
'401':
- description: Unauthorized - Authentication required or invalid credentials
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
'402':
- description: Payment Required - Insufficient credits or quota to complete request
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':
- description: Not Found - Generation not found
content:
application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
'429':
- description: Too Many Requests - Rate limit exceeded
content:
application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
'500':
- description: Internal Server Error - Unexpected server error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
'502':
- description: Bad Gateway - Provider/upstream API failure
content:
application/json:
+ example:
+ error:
+ code: 502
+ message: Provider returned error
schema:
$ref: '#/components/schemas/BadGatewayResponse'
+ description: Bad Gateway - Provider/upstream API failure
'524':
- description: Infrastructure Timeout - Request timed out at our edge network
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':
- description: Provider Overloaded - Provider is temporarily overloaded
content:
application/json:
+ example:
+ error:
+ code: 529
+ message: Provider returned error
schema:
$ref: '#/components/schemas/ProviderOverloadedResponse'
- operationId: getGeneration
+ description: Provider Overloaded - Provider is temporarily overloaded
+ summary: Get request & usage metadata for a generation
+ tags:
+ - Generations
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
- /models/count:
+ /guardrails:
get:
- tags:
- - Models
- x-speakeasy-name-override: count
- summary: Get total count of available models
+ description: >-
+ List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listGuardrails
parameters:
- - schema:
- type: string
- description: >-
- Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
- example: text
- required: false
- description: >-
- Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
- name: output_modalities
+ - 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
+ 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':
- description: Returns the total count of available models
content:
application/json:
+ 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'
+ total_count: 1
schema:
- $ref: '#/components/schemas/ModelsCountResponse'
- '400':
- description: Bad Request - Invalid output_modalities value
+ $ref: '#/components/schemas/ListGuardrailsResponse'
+ description: List of guardrails
+ '401':
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
- $ref: '#/components/schemas/BadRequestResponse'
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
'500':
- description: Internal Server Error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
- operationId: listModelsCount
+ description: Internal Server Error - Unexpected server error
+ summary: List guardrails
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: list
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ post:
+ description: >-
+ Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: createGuardrail
+ requestBody:
+ content:
+ application/json:
+ example:
+ 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
+ schema:
+ $ref: '#/components/schemas/CreateGuardrailRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ example:
+ data:
+ allowed_models: null
+ allowed_providers:
+ - openai
+ - anthropic
+ - google
+ created_at: '2025-08-24T10:30:00Z'
+ description: A guardrail for limiting API usage
+ enforce_zdr: false
+ id: 550e8400-e29b-41d4-a716-446655440000
+ ignored_models: null
+ ignored_providers: null
+ limit_usd: 50
+ name: My New Guardrail
+ reset_interval: monthly
+ updated_at: null
+ schema:
+ $ref: '#/components/schemas/CreateGuardrailResponse'
+ description: Guardrail created successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Create a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: create
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/{id}:
+ delete:
+ description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: deleteGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail to delete
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail to delete
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ deleted: true
+ schema:
+ $ref: '#/components/schemas/DeleteGuardrailResponse'
+ description: Guardrail deleted successfully
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Delete a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: delete
+ get:
+ description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail to retrieve
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail to retrieve
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ 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'
+ schema:
+ $ref: '#/components/schemas/GetGuardrailResponse'
+ description: Guardrail details
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Get a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: get
+ patch:
+ description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: updateGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail to update
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail to update
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ description: Updated description
+ limit_usd: 75
+ name: Updated Guardrail Name
+ reset_interval: weekly
+ schema:
+ $ref: '#/components/schemas/UpdateGuardrailRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ 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'
+ schema:
+ $ref: '#/components/schemas/UpdateGuardrailResponse'
+ description: Guardrail updated successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Update a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: update
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/{id}/assignments/keys:
+ get:
+ description: >-
+ List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listGuardrailKeyAssignments
+ parameters:
+ - description: The unique identifier of the guardrail
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ key_label: prod-key
+ key_name: Production Key
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListKeyAssignmentsResponse'
+ description: List of key assignments
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List key assignments for a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: listGuardrailKeyAssignments
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ post:
+ description: >-
+ Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: bulkAssignKeysToGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ key_hashes:
+ - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ schema:
+ $ref: '#/components/schemas/BulkAssignKeysRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ assigned_count: 3
+ schema:
+ $ref: '#/components/schemas/BulkAssignKeysResponse'
+ description: Assignment result
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Bulk assign keys to a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: bulkAssignKeys
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/{id}/assignments/keys/remove:
+ post:
+ description: >-
+ Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: bulkUnassignKeysFromGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ key_hashes:
+ - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ schema:
+ $ref: '#/components/schemas/BulkUnassignKeysRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ unassigned_count: 3
+ schema:
+ $ref: '#/components/schemas/BulkUnassignKeysResponse'
+ description: Unassignment result
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Bulk unassign keys from a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: bulkUnassignKeys
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/{id}/assignments/members:
+ get:
+ description: >-
+ List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listGuardrailMemberAssignments
+ parameters:
+ - description: The unique identifier of the guardrail
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ - description: Number of records to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of records to skip for pagination
+ example: 0
+ minimum: 0
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ organization_id: org_xyz789
+ user_id: user_abc123
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListMemberAssignmentsResponse'
+ description: List of member assignments
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List member assignments for a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: listGuardrailMemberAssignments
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ post:
+ description: >-
+ Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: bulkAssignMembersToGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ member_user_ids:
+ - user_abc123
+ - user_def456
+ schema:
+ $ref: '#/components/schemas/BulkAssignMembersRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ assigned_count: 2
+ schema:
+ $ref: '#/components/schemas/BulkAssignMembersResponse'
+ description: Assignment result
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Bulk assign members to a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: bulkAssignMembers
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/{id}/assignments/members/remove:
+ post:
+ description: >-
+ Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: bulkUnassignMembersFromGuardrail
+ parameters:
+ - description: The unique identifier of the guardrail
+ in: path
+ name: id
+ required: true
+ schema:
+ description: The unique identifier of the guardrail
+ example: 550e8400-e29b-41d4-a716-446655440000
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ member_user_ids:
+ - user_abc123
+ - user_def456
+ schema:
+ $ref: '#/components/schemas/BulkUnassignMembersRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ unassigned_count: 2
+ schema:
+ $ref: '#/components/schemas/BulkUnassignMembersResponse'
+ description: Unassignment result
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Bulk unassign members from a guardrail
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: bulkUnassignMembers
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/assignments/keys:
+ get:
+ description: >-
+ List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listKeyAssignments
+ 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
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ key_hash: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
+ key_label: prod-key
+ key_name: Production Key
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListKeyAssignmentsResponse'
+ description: List of key assignments
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List all key assignments
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: listKeyAssignments
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /guardrails/assignments/members:
+ get:
+ description: >-
+ List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listMemberAssignments
+ 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
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - assigned_by: user_abc123
+ created_at: '2025-08-24T10:30:00Z'
+ guardrail_id: 550e8400-e29b-41d4-a716-446655440001
+ id: 550e8400-e29b-41d4-a716-446655440000
+ organization_id: org_xyz789
+ user_id: user_abc123
+ total_count: 1
+ schema:
+ $ref: '#/components/schemas/ListMemberAssignmentsResponse'
+ description: List of member assignments
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List all member assignments
+ tags:
+ - Guardrails
+ x-speakeasy-name-override: listMemberAssignments
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /key:
+ get:
+ description: Get information on the API key associated with the current authentication session
+ operationId: getCurrentKey
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ byok_usage: 17.38
+ byok_usage_daily: 17.38
+ byok_usage_monthly: 17.38
+ byok_usage_weekly: 17.38
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ expires_at: '2027-12-31T23:59:59Z'
+ include_byok_in_limit: false
+ is_free_tier: false
+ is_management_key: false
+ is_provisioning_key: false
+ label: sk-or-v1-au7...890
+ limit: 100
+ limit_remaining: 74.5
+ limit_reset: monthly
+ rate_limit:
+ interval: 1h
+ note: This field is deprecated and safe to ignore.
+ requests: 1000
+ usage: 25.5
+ usage_daily: 25.5
+ usage_monthly: 25.5
+ usage_weekly: 25.5
+ schema:
+ example:
+ data:
+ byok_usage: 17.38
+ byok_usage_daily: 17.38
+ byok_usage_monthly: 17.38
+ byok_usage_weekly: 17.38
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ expires_at: '2027-12-31T23:59:59Z'
+ include_byok_in_limit: false
+ is_free_tier: false
+ is_management_key: false
+ is_provisioning_key: false
+ label: sk-or-v1-au7...890
+ limit: 100
+ limit_remaining: 74.5
+ limit_reset: monthly
+ rate_limit:
+ interval: 1h
+ note: This field is deprecated and safe to ignore.
+ requests: 1000
+ usage: 25.5
+ usage_daily: 25.5
+ usage_monthly: 25.5
+ usage_weekly: 25.5
+ properties:
+ data:
+ description: Current API key information
+ example:
+ byok_usage: 17.38
+ byok_usage_daily: 17.38
+ byok_usage_monthly: 17.38
+ byok_usage_weekly: 17.38
+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
+ expires_at: '2027-12-31T23:59:59Z'
+ include_byok_in_limit: false
+ is_free_tier: false
+ is_management_key: false
+ is_provisioning_key: false
+ label: sk-or-v1-au7...890
+ limit: 100
+ limit_remaining: 74.5
+ limit_reset: monthly
+ rate_limit:
+ interval: 1h
+ note: This field is deprecated and safe to ignore.
+ requests: 1000
+ usage: 25.5
+ usage_daily: 25.5
+ usage_monthly: 25.5
+ usage_weekly: 25.5
+ properties:
+ byok_usage:
+ description: Total external BYOK usage (in USD) for the API key
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_daily:
+ description: External BYOK usage (in USD) for the current UTC day
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_monthly:
+ description: External BYOK usage (in USD) for current UTC month
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_weekly:
+ description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 17.38
+ format: double
+ type: number
+ creator_user_id:
+ description: >-
+ The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ nullable: true
+ type: string
+ expires_at:
+ description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ include_byok_in_limit:
+ description: Whether to include external BYOK usage in the credit limit
+ example: false
+ type: boolean
+ is_free_tier:
+ description: Whether this is a free tier API key
+ example: false
+ type: boolean
+ is_management_key:
+ description: Whether this is a management key
+ example: false
+ type: boolean
+ is_provisioning_key:
+ deprecated: true
+ description: Whether this is a management key
+ example: false
+ type: boolean
+ label:
+ description: Human-readable label for the API key
+ example: sk-or-v1-0e6...1c96
+ type: string
+ limit:
+ description: Spending limit for the API key in USD
+ example: 100
+ format: double
+ type: number
+ limit_remaining:
+ description: Remaining spending limit in USD
+ example: 74.5
+ format: double
+ type: number
+ limit_reset:
+ description: Type of limit reset for the API key
+ example: monthly
+ nullable: true
+ type: string
+ rate_limit:
+ deprecated: true
+ description: Legacy rate limit information about a key. Will always return -1.
+ example:
+ interval: 1h
+ note: This field is deprecated and safe to ignore.
+ requests: 1000
+ properties:
+ interval:
+ description: Rate limit interval
+ example: 1h
+ type: string
+ note:
+ description: Note about the rate limit
+ example: This field is deprecated and safe to ignore.
+ type: string
+ requests:
+ description: Number of requests allowed per interval
+ example: 1000
+ type: integer
+ required:
+ - requests
+ - interval
+ - note
+ type: object
+ usage:
+ description: Total OpenRouter credit usage (in USD) for the API key
+ example: 25.5
+ format: double
+ type: number
+ usage_daily:
+ description: OpenRouter credit usage (in USD) for the current UTC day
+ example: 25.5
+ format: double
+ type: number
+ usage_monthly:
+ description: OpenRouter credit usage (in USD) for the current UTC month
+ example: 25.5
+ format: double
+ type: number
+ usage_weekly:
+ description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 25.5
+ format: double
+ type: number
+ required:
+ - label
+ - limit
+ - usage
+ - usage_daily
+ - usage_weekly
+ - usage_monthly
+ - byok_usage
+ - byok_usage_daily
+ - byok_usage_weekly
+ - byok_usage_monthly
+ - is_free_tier
+ - is_management_key
+ - is_provisioning_key
+ - limit_remaining
+ - limit_reset
+ - include_byok_in_limit
+ - creator_user_id
+ - rate_limit
+ type: object
+ required:
+ - data
+ type: object
+ description: API key details
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '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 current API key
+ tags:
+ - API Keys
+ x-speakeasy-name-override: getCurrentKeyMetadata
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /keys:
+ get:
+ description: >-
+ List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: list
+ parameters:
+ - description: Whether to include disabled API keys in the response
+ in: query
+ name: include_disabled
+ required: false
+ schema:
+ description: Whether to include disabled API keys in the response
+ example: 'false'
+ type: boolean
+ x-openrouter-type: boolean
+ - description: Number of API keys to skip for pagination
+ in: query
+ name: offset
+ required: false
+ schema:
+ description: Number of API keys to skip for pagination
+ example: 0
+ minimum: 0
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ 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
+ expires_at: '2027-12-31T23:59:59Z'
+ 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
+ schema:
+ example:
+ 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
+ expires_at: '2027-12-31T23:59:59Z'
+ 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
+ properties:
+ data:
+ description: List of API keys
+ items:
+ example:
+ 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
+ properties:
+ byok_usage:
+ description: Total external BYOK usage (in USD) for the API key
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_daily:
+ description: External BYOK usage (in USD) for the current UTC day
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_monthly:
+ description: External BYOK usage (in USD) for current UTC month
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_weekly:
+ description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 17.38
+ format: double
+ type: number
+ created_at:
+ description: ISO 8601 timestamp of when the API key was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ creator_user_id:
+ description: >-
+ The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ nullable: true
+ type: string
+ disabled:
+ description: Whether the API key is disabled
+ example: false
+ type: boolean
+ expires_at:
+ description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ hash:
+ description: Unique hash identifier for the API key
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ include_byok_in_limit:
+ description: Whether to include external BYOK usage in the credit limit
+ example: false
+ type: boolean
+ label:
+ description: Human-readable label for the API key
+ example: sk-or-v1-0e6...1c96
+ type: string
+ limit:
+ description: Spending limit for the API key in USD
+ example: 100
+ format: double
+ type: number
+ limit_remaining:
+ description: Remaining spending limit in USD
+ example: 74.5
+ format: double
+ type: number
+ limit_reset:
+ description: Type of limit reset for the API key
+ example: monthly
+ nullable: true
+ type: string
+ name:
+ description: Name of the API key
+ example: My Production Key
+ type: string
+ updated_at:
+ description: ISO 8601 timestamp of when the API key was last updated
+ example: '2025-08-24T15:45:00Z'
+ nullable: true
+ type: string
+ usage:
+ description: Total OpenRouter credit usage (in USD) for the API key
+ example: 25.5
+ format: double
+ type: number
+ usage_daily:
+ description: OpenRouter credit usage (in USD) for the current UTC day
+ example: 25.5
+ format: double
+ type: number
+ usage_monthly:
+ description: OpenRouter credit usage (in USD) for the current UTC month
+ example: 25.5
+ format: double
+ type: number
+ usage_weekly:
+ description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 25.5
+ format: double
+ type: number
+ required:
+ - hash
+ - name
+ - label
+ - disabled
+ - limit
+ - limit_remaining
+ - limit_reset
+ - include_byok_in_limit
+ - usage
+ - usage_daily
+ - usage_weekly
+ - usage_monthly
+ - byok_usage
+ - byok_usage_daily
+ - byok_usage_weekly
+ - byok_usage_monthly
+ - created_at
+ - updated_at
+ - creator_user_id
+ type: object
+ type: array
+ required:
+ - data
+ type: object
+ description: List of API keys
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: Rate limit exceeded
+ schema:
+ $ref: '#/components/schemas/TooManyRequestsResponse'
+ description: Too Many Requests - Rate limit exceeded
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List API keys
+ tags:
+ - API Keys
+ x-speakeasy-name-override: list
+ post:
+ description: >-
+ Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: createKeys
+ requestBody:
+ content:
+ application/json:
+ example:
+ expires_at: '2027-12-31T23:59:59Z'
+ include_byok_in_limit: true
+ limit: 50
+ limit_reset: monthly
+ name: My New API Key
+ schema:
+ example:
+ expires_at: '2027-12-31T23:59:59Z'
+ include_byok_in_limit: true
+ limit: 50
+ limit_reset: monthly
+ name: My New API Key
+ properties:
+ creator_user_id:
+ description: >-
+ Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key.
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ minLength: 1
+ nullable: true
+ type: string
+ expires_at:
+ description: >-
+ Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ include_byok_in_limit:
+ description: Whether to include BYOK usage in the limit
+ example: true
+ type: boolean
+ limit:
+ description: Optional spending limit for the API key in USD
+ example: 50
+ format: double
+ type: number
+ limit_reset:
+ description: >-
+ 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.
+ enum:
+ - daily
+ - weekly
+ - monthly
+ - null
+ example: monthly
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ name:
+ description: Name for the new API key
+ example: My New API Key
+ minLength: 1
+ type: string
+ required:
+ - name
+ type: object
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ example:
+ 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
+ expires_at: '2027-12-31T23:59:59Z'
+ 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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
+ schema:
+ example:
+ 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
+ expires_at: '2027-12-31T23:59:59Z'
+ 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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
+ properties:
+ data:
+ description: The created API key information
+ example:
+ 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
+ properties:
+ byok_usage:
+ description: Total external BYOK usage (in USD) for the API key
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_daily:
+ description: External BYOK usage (in USD) for the current UTC day
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_monthly:
+ description: External BYOK usage (in USD) for current UTC month
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_weekly:
+ description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 17.38
+ format: double
+ type: number
+ created_at:
+ description: ISO 8601 timestamp of when the API key was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ creator_user_id:
+ description: >-
+ The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ nullable: true
+ type: string
+ disabled:
+ description: Whether the API key is disabled
+ example: false
+ type: boolean
+ expires_at:
+ description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ hash:
+ description: Unique hash identifier for the API key
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ include_byok_in_limit:
+ description: Whether to include external BYOK usage in the credit limit
+ example: false
+ type: boolean
+ label:
+ description: Human-readable label for the API key
+ example: sk-or-v1-0e6...1c96
+ type: string
+ limit:
+ description: Spending limit for the API key in USD
+ example: 100
+ format: double
+ type: number
+ limit_remaining:
+ description: Remaining spending limit in USD
+ example: 74.5
+ format: double
+ type: number
+ limit_reset:
+ description: Type of limit reset for the API key
+ example: monthly
+ nullable: true
+ type: string
+ name:
+ description: Name of the API key
+ example: My Production Key
+ type: string
+ updated_at:
+ description: ISO 8601 timestamp of when the API key was last updated
+ example: '2025-08-24T15:45:00Z'
+ nullable: true
+ type: string
+ usage:
+ description: Total OpenRouter credit usage (in USD) for the API key
+ example: 25.5
+ format: double
+ type: number
+ usage_daily:
+ description: OpenRouter credit usage (in USD) for the current UTC day
+ example: 25.5
+ format: double
+ type: number
+ usage_monthly:
+ description: OpenRouter credit usage (in USD) for the current UTC month
+ example: 25.5
+ format: double
+ type: number
+ usage_weekly:
+ description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 25.5
+ format: double
+ type: number
+ required:
+ - hash
+ - name
+ - label
+ - disabled
+ - limit
+ - limit_remaining
+ - limit_reset
+ - include_byok_in_limit
+ - usage
+ - usage_daily
+ - usage_weekly
+ - usage_monthly
+ - byok_usage
+ - byok_usage_daily
+ - byok_usage_weekly
+ - byok_usage_monthly
+ - created_at
+ - updated_at
+ - creator_user_id
+ type: object
+ key:
+ description: The actual API key string (only shown once)
+ example: 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
+ type: string
+ required:
+ - data
+ - key
+ type: object
+ description: API key created successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '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: Create a new API key
+ tags:
+ - API Keys
+ x-speakeasy-name-override: create
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /keys/{hash}:
+ delete:
+ description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: deleteKeys
+ parameters:
+ - description: The hash identifier of the API key to delete
+ in: path
+ name: hash
+ required: true
+ schema:
+ description: The hash identifier of the API key to delete
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ deleted: true
+ schema:
+ example:
+ deleted: true
+ properties:
+ deleted:
+ const: true
+ description: Confirmation that the API key was deleted
+ example: true
+ type: boolean
+ required:
+ - deleted
+ type: object
+ description: API key deleted successfully
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '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: Delete an API key
+ tags:
+ - API Keys
+ x-speakeasy-name-override: delete
+ get:
+ description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: getKey
+ parameters:
+ - description: The hash identifier of the API key to retrieve
+ in: path
+ name: hash
+ required: true
+ schema:
+ description: The hash identifier of the API key to retrieve
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ 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
+ expires_at: '2027-12-31T23:59:59Z'
+ 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
+ schema:
+ example:
+ 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
+ expires_at: '2027-12-31T23:59:59Z'
+ 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
+ properties:
+ data:
+ description: The API key information
+ example:
+ 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
+ properties:
+ byok_usage:
+ description: Total external BYOK usage (in USD) for the API key
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_daily:
+ description: External BYOK usage (in USD) for the current UTC day
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_monthly:
+ description: External BYOK usage (in USD) for current UTC month
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_weekly:
+ description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 17.38
+ format: double
+ type: number
+ created_at:
+ description: ISO 8601 timestamp of when the API key was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ creator_user_id:
+ description: >-
+ The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ nullable: true
+ type: string
+ disabled:
+ description: Whether the API key is disabled
+ example: false
+ type: boolean
+ expires_at:
+ description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ hash:
+ description: Unique hash identifier for the API key
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ include_byok_in_limit:
+ description: Whether to include external BYOK usage in the credit limit
+ example: false
+ type: boolean
+ label:
+ description: Human-readable label for the API key
+ example: sk-or-v1-0e6...1c96
+ type: string
+ limit:
+ description: Spending limit for the API key in USD
+ example: 100
+ format: double
+ type: number
+ limit_remaining:
+ description: Remaining spending limit in USD
+ example: 74.5
+ format: double
+ type: number
+ limit_reset:
+ description: Type of limit reset for the API key
+ example: monthly
+ nullable: true
+ type: string
+ name:
+ description: Name of the API key
+ example: My Production Key
+ type: string
+ updated_at:
+ description: ISO 8601 timestamp of when the API key was last updated
+ example: '2025-08-24T15:45:00Z'
+ nullable: true
+ type: string
+ usage:
+ description: Total OpenRouter credit usage (in USD) for the API key
+ example: 25.5
+ format: double
+ type: number
+ usage_daily:
+ description: OpenRouter credit usage (in USD) for the current UTC day
+ example: 25.5
+ format: double
+ type: number
+ usage_monthly:
+ description: OpenRouter credit usage (in USD) for the current UTC month
+ example: 25.5
+ format: double
+ type: number
+ usage_weekly:
+ description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 25.5
+ format: double
+ type: number
+ required:
+ - hash
+ - name
+ - label
+ - disabled
+ - limit
+ - limit_remaining
+ - limit_reset
+ - include_byok_in_limit
+ - usage
+ - usage_daily
+ - usage_weekly
+ - usage_monthly
+ - byok_usage
+ - byok_usage_daily
+ - byok_usage_weekly
+ - byok_usage_monthly
+ - created_at
+ - updated_at
+ - creator_user_id
+ type: object
+ required:
+ - data
+ type: object
+ description: API key details
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '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: Get a single API key
+ tags:
+ - API Keys
+ x-speakeasy-name-override: get
+ patch:
+ description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: updateKeys
+ parameters:
+ - description: The hash identifier of the API key to update
+ in: path
+ name: hash
+ required: true
+ schema:
+ description: The hash identifier of the API key to update
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ requestBody:
+ content:
+ application/json:
+ example:
+ disabled: false
+ include_byok_in_limit: true
+ limit: 75
+ limit_reset: daily
+ name: Updated API Key Name
+ schema:
+ example:
+ disabled: false
+ include_byok_in_limit: true
+ limit: 75
+ limit_reset: daily
+ name: Updated API Key Name
+ properties:
+ disabled:
+ description: Whether to disable the API key
+ example: false
+ type: boolean
+ include_byok_in_limit:
+ description: Whether to include BYOK usage in the limit
+ example: true
+ type: boolean
+ limit:
+ description: New spending limit for the API key in USD
+ example: 75
+ format: double
+ type: number
+ limit_reset:
+ description: >-
+ New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
+ enum:
+ - daily
+ - weekly
+ - monthly
+ - null
+ example: daily
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ name:
+ description: New name for the API key
+ example: Updated API Key Name
+ type: string
+ type: object
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ 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
+ expires_at: null
+ 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
+ schema:
+ example:
+ 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
+ expires_at: null
+ 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
+ properties:
+ data:
+ description: The updated API key information
+ example:
+ 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
+ properties:
+ byok_usage:
+ description: Total external BYOK usage (in USD) for the API key
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_daily:
+ description: External BYOK usage (in USD) for the current UTC day
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_monthly:
+ description: External BYOK usage (in USD) for current UTC month
+ example: 17.38
+ format: double
+ type: number
+ byok_usage_weekly:
+ description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 17.38
+ format: double
+ type: number
+ created_at:
+ description: ISO 8601 timestamp of when the API key was created
+ example: '2025-08-24T10:30:00Z'
+ type: string
+ creator_user_id:
+ description: >-
+ The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ nullable: true
+ type: string
+ disabled:
+ description: Whether the API key is disabled
+ example: false
+ type: boolean
+ expires_at:
+ description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
+ example: '2027-12-31T23:59:59Z'
+ format: date-time
+ nullable: true
+ type: string
+ hash:
+ description: Unique hash identifier for the API key
+ example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
+ type: string
+ include_byok_in_limit:
+ description: Whether to include external BYOK usage in the credit limit
+ example: false
+ type: boolean
+ label:
+ description: Human-readable label for the API key
+ example: sk-or-v1-0e6...1c96
+ type: string
+ limit:
+ description: Spending limit for the API key in USD
+ example: 100
+ format: double
+ type: number
+ limit_remaining:
+ description: Remaining spending limit in USD
+ example: 74.5
+ format: double
+ type: number
+ limit_reset:
+ description: Type of limit reset for the API key
+ example: monthly
+ nullable: true
+ type: string
+ name:
+ description: Name of the API key
+ example: My Production Key
+ type: string
+ updated_at:
+ description: ISO 8601 timestamp of when the API key was last updated
+ example: '2025-08-24T15:45:00Z'
+ nullable: true
+ type: string
+ usage:
+ description: Total OpenRouter credit usage (in USD) for the API key
+ example: 25.5
+ format: double
+ type: number
+ usage_daily:
+ description: OpenRouter credit usage (in USD) for the current UTC day
+ example: 25.5
+ format: double
+ type: number
+ usage_monthly:
+ description: OpenRouter credit usage (in USD) for the current UTC month
+ example: 25.5
+ format: double
+ type: number
+ usage_weekly:
+ description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
+ example: 25.5
+ format: double
+ type: number
+ required:
+ - hash
+ - name
+ - label
+ - disabled
+ - limit
+ - limit_remaining
+ - limit_reset
+ - include_byok_in_limit
+ - usage
+ - usage_daily
+ - usage_weekly
+ - usage_monthly
+ - byok_usage
+ - byok_usage_daily
+ - byok_usage_weekly
+ - byok_usage_monthly
+ - created_at
+ - updated_at
+ - creator_user_id
+ type: object
+ required:
+ - data
+ type: object
+ description: API key updated successfully
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ code: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '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: Update an API key
+ tags:
+ - API Keys
+ x-speakeasy-name-override: update
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /messages:
+ post:
+ description: >-
+ Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
+ operationId: createMessages
+ requestBody:
+ content:
+ application/json:
+ example:
+ max_tokens: 1024
+ messages:
+ - content: Hello, how are you?
+ role: user
+ model: anthropic/claude-sonnet-4
+ schema:
+ $ref: '#/components/schemas/MessagesRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ content:
+ - text: I'm doing well, thank you for asking! How can I help you today?
+ type: text
+ id: msg_abc123
+ model: anthropic/claude-sonnet-4
+ role: assistant
+ stop_reason: end_turn
+ type: message
+ usage:
+ input_tokens: 12
+ output_tokens: 18
+ schema:
+ $ref: '#/components/schemas/MessagesResult'
+ text/event-stream:
+ example:
+ data:
+ delta:
+ text: Hello
+ type: text_delta
+ index: 0
+ type: content_block_delta
+ event: content_block_delta
+ schema:
+ properties:
+ data:
+ $ref: '#/components/schemas/MessagesStreamEvents'
+ event:
+ type: string
+ required:
+ - event
+ - data
+ type: object
+ x-speakeasy-sse-sentinel: '[DONE]'
+ description: Successful response
+ '400':
+ content:
+ application/json:
+ example:
+ error:
+ message: 'Invalid request: messages is required'
+ type: invalid_request_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Invalid request error
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ message: Invalid API key
+ type: authentication_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Authentication error
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ message: Permission denied
+ type: permission_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Permission denied error
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ message: Model not found
+ type: not_found_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Not found error
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ message: Rate limit exceeded
+ type: rate_limit_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Rate limit error
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ message: Internal server error
+ type: api_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: API error
+ '503':
+ content:
+ application/json:
+ example:
+ error:
+ message: Service temporarily overloaded
+ type: overloaded_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Overloaded error
+ '529':
+ content:
+ application/json:
+ example:
+ error:
+ message: Provider is temporarily overloaded
+ type: overloaded_error
+ type: error
+ schema:
+ $ref: '#/components/schemas/MessagesErrorResponse'
+ description: Overloaded error
+ summary: Create a message
+ tags:
+ - Anthropic Messages
+ x-speakeasy-ignore: true
+ x-speakeasy-name-override: create
+ x-speakeasy-stream-request-field: stream
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/models:
get:
- tags:
- - Models
- x-speakeasy-name-override: list
- summary: List all models and their properties
+ operationId: getModels
parameters:
- - schema:
- type: string
+ - description: Filter models by use case category
+ in: query
+ name: category
+ required: false
+ schema:
+ description: Filter models by use case category
enum:
- programming
- roleplay
@@ -15678,473 +17540,544 @@ paths:
- health
- trivia
- academia
- description: Filter models by use case category
example: programming
+ type: string
x-speakeasy-unknown-values: allow
- required: false
- description: Filter models by use case category
- name: category
+ - description: Filter models by supported parameter (comma-separated)
in: query
- - schema:
- type: string
- required: false
name: supported_parameters
- in: query
- - schema:
+ required: false
+ schema:
+ description: Filter models by supported parameter (comma-separated)
+ example: temperature
type: string
+ - description: >-
+ Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
+ in: query
+ name: output_modalities
+ required: false
+ schema:
description: >-
Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
example: text
- required: false
- description: >-
- Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
- name: output_modalities
- in: query
+ type: string
responses:
'200':
- description: Returns a list of models or RSS feed
content:
application/json:
+ example:
+ data:
+ - architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ 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
schema:
$ref: '#/components/schemas/ModelsListResponse'
+ description: Returns a list of models or RSS feed
'400':
- description: Bad Request - Invalid request parameters
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
'500':
- description: Internal Server Error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
- operationId: getModels
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /models/user:
- get:
+ description: Internal Server Error - Unexpected server error
+ summary: List all models and their properties
tags:
- Models
- x-speakeasy-name-override: listForUser
- description: >-
- List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/logging#enterprise-eu-in-region-routing).
- summary: List models filtered by user provider preferences, privacy settings, and guardrails
- security:
- - bearer: []
- responses:
- '200':
- description: Returns a list of models filtered by user provider preferences
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ModelsListResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - No eligible endpoints found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- operationId: listModelsUser
+ x-speakeasy-name-override: list
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/models/{author}/{slug}/endpoints:
get:
- tags:
- - Endpoints
operationId: listEndpoints
- x-speakeasy-name-override: list
- summary: List all endpoints for a model
parameters:
- - schema:
- type: string
- required: true
+ - description: The author/organization of the model
+ in: path
name: author
- in: path
- - schema:
- type: string
required: true
- name: slug
+ schema:
+ description: The author/organization of the model
+ example: openai
+ type: string
+ - description: The model slug
in: path
+ name: slug
+ required: true
+ schema:
+ description: The model slug
+ example: gpt-4
+ type: string
responses:
'200':
- description: Returns a list of endpoints
content:
application/json:
+ example:
+ data:
+ architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ output_modalities:
+ - text
+ tokenizer: GPT
+ created: 1692901234
+ description: GPT-4 is a large multimodal model.
+ endpoints: []
+ id: openai/gpt-4
+ name: GPT-4
schema:
- type: object
+ example:
+ data:
+ architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ output_modalities:
+ - text
+ tokenizer: GPT
+ created: 1692901234
+ description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
+ endpoints:
+ - 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: default
+ 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
+ id: openai/gpt-4
+ name: GPT-4
properties:
data:
$ref: '#/components/schemas/ListEndpointsResponse'
required:
- data
+ type: object
+ description: Returns a list of endpoints
'404':
- description: Not Found - Model does not exist
content:
application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
'500':
- description: Internal Server Error - Unexpected server error
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 endpoints for a model
+ tags:
+ - Endpoints
+ x-speakeasy-name-override: list
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
- /endpoints/zdr:
+ /models/count:
get:
- tags:
- - Endpoints
- x-speakeasy-name-override: listZdrEndpoints
- summary: Preview the impact of ZDR on the available endpoints
+ operationId: listModelsCount
+ parameters:
+ - description: >-
+ Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
+ in: query
+ name: output_modalities
+ required: false
+ schema:
+ description: >-
+ Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
+ example: text
+ type: string
responses:
'200':
- description: Returns a list of endpoints
content:
application/json:
+ example:
+ data:
+ count: 150
schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/PublicEndpoint'
- required:
- - data
- '500':
- description: Internal Server Error - Unexpected server error
+ $ref: '#/components/schemas/ModelsCountResponse'
+ description: Returns the total count of available models
+ '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
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
- operationId: listEndpointsZdr
+ description: Internal Server Error - Unexpected server error
+ summary: Get total count of available models
+ tags:
+ - Models
+ x-speakeasy-name-override: count
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /models/user:
+ get:
+ description: >-
+ List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
+ operationId: listModelsUser
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - architecture:
+ input_modalities:
+ - text
+ instruct_type: chatml
+ modality: text->text
+ 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
+ schema:
+ $ref: '#/components/schemas/ModelsListResponse'
+ description: Returns a list of models filtered by user provider preferences
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ security:
+ - bearer: []
+ summary: List models filtered by user provider preferences, privacy settings, and guardrails
+ tags:
+ - Models
+ x-speakeasy-name-override: listForUser
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+ /organization/members:
+ get:
+ description: >-
+ List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ operationId: listOrganizationMembers
+ 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
+ type: integer
+ - description: Maximum number of records to return (max 100)
+ in: query
+ name: limit
+ required: false
+ schema:
+ description: Maximum number of records to return (max 100)
+ example: 50
+ maximum: 100
+ minimum: 1
+ type: integer
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ - email: jane.doe@example.com
+ first_name: Jane
+ id: user_2dHFtVWx2n56w6HkM0000000000
+ last_name: Doe
+ role: member
+ total_count: 25
+ schema:
+ properties:
+ data:
+ description: List of organization members
+ items:
+ properties:
+ email:
+ description: Email address of the member
+ example: jane.doe@example.com
+ type: string
+ first_name:
+ description: First name of the member
+ example: Jane
+ nullable: true
+ type: string
+ id:
+ description: User ID of the organization member
+ example: user_2dHFtVWx2n56w6HkM0000000000
+ type: string
+ last_name:
+ description: Last name of the member
+ example: Doe
+ nullable: true
+ type: string
+ role:
+ description: Role of the member in the organization
+ enum:
+ - org:admin
+ - org:member
+ example: org:member
+ type: string
+ x-speakeasy-unknown-values: allow
+ required:
+ - id
+ - first_name
+ - last_name
+ - email
+ - role
+ type: object
+ type: array
+ total_count:
+ description: Total number of members in the organization
+ example: 25
+ type: integer
+ required:
+ - data
+ - total_count
+ type: object
+ description: List of organization members
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
+ schema:
+ $ref: '#/components/schemas/UnauthorizedResponse'
+ description: Unauthorized - Authentication required or invalid credentials
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: Resource not found
+ schema:
+ $ref: '#/components/schemas/NotFoundResponse'
+ description: Not Found - Resource does not exist
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: List organization members
+ tags:
+ - Organization
+ x-speakeasy-name-override: listMembers
+ x-speakeasy-pagination:
+ inputs:
+ - in: parameters
+ name: offset
+ type: offset
+ - in: parameters
+ name: limit
+ type: limit
+ outputs:
+ results: $.data
+ type: offsetLimit
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/providers:
get:
- tags:
- - Providers
- x-speakeasy-name-override: list
- summary: List all providers
operationId: listProviders
responses:
'200':
- description: Returns a list of providers
content:
application/json:
+ example:
+ data:
+ - datacenters:
+ - US
+ - IE
+ headquarters: US
+ name: OpenAI
+ privacy_policy_url: https://openai.com/privacy
+ slug: openai
+ status_page_url: https://status.openai.com
+ terms_of_service_url: https://openai.com/terms
schema:
- type: object
+ example:
+ data:
+ - datacenters:
+ - US
+ - IE
+ headquarters: US
+ name: OpenAI
+ privacy_policy_url: https://openai.com/privacy
+ slug: openai
+ status_page_url: https://status.openai.com
+ terms_of_service_url: https://openai.com/terms
properties:
data:
- type: array
items:
- type: object
- properties:
- name:
- type: string
- description: Display name of the provider
- example: OpenAI
- slug:
- type: string
- description: URL-friendly identifier for the provider
- example: openai
- privacy_policy_url:
- type: string
- nullable: true
- description: URL to the provider's privacy policy
- example: https://openai.com/privacy
- terms_of_service_url:
- type: string
- nullable: true
- description: URL to the provider's terms of service
- example: https://openai.com/terms
- status_page_url:
- type: string
- nullable: true
- description: URL to the provider's status page
- example: https://status.openai.com
- headquarters:
- type: string
- nullable: true
- enum:
- - AD
- - AE
- - AF
- - AG
- - AI
- - AL
- - AM
- - AO
- - AQ
- - AR
- - AS
- - AT
- - AU
- - AW
- - AX
- - AZ
- - BA
- - BB
- - BD
- - BE
- - BF
- - BG
- - BH
- - BI
- - BJ
- - BL
- - BM
- - BN
- - BO
- - BQ
- - BR
- - BS
- - BT
- - BV
- - BW
- - BY
- - BZ
- - CA
- - CC
- - CD
- - CF
- - CG
- - CH
- - CI
- - CK
- - CL
- - CM
- - CN
- - CO
- - CR
- - CU
- - CV
- - CW
- - CX
- - CY
- - CZ
- - DE
- - DJ
- - DK
- - DM
- - DO
- - DZ
- - EC
- - EE
- - EG
- - EH
- - ER
- - ES
- - ET
- - FI
- - FJ
- - FK
- - FM
- - FO
- - FR
- - GA
- - GB
- - GD
- - GE
- - GF
- - GG
- - GH
- - GI
- - GL
- - GM
- - GN
- - GP
- - GQ
- - GR
- - GS
- - GT
- - GU
- - GW
- - GY
- - HK
- - HM
- - HN
- - HR
- - HT
- - HU
- - ID
- - IE
- - IL
- - IM
- - IN
- - IO
- - IQ
- - IR
- - IS
- - IT
- - JE
- - JM
- - JO
- - JP
- - KE
- - KG
- - KH
- - KI
- - KM
- - KN
- - KP
- - KR
- - KW
- - KY
- - KZ
- - LA
- - LB
- - LC
- - LI
- - LK
- - LR
- - LS
- - LT
- - LU
- - LV
- - LY
- - MA
- - MC
- - MD
- - ME
- - MF
- - MG
- - MH
- - MK
- - ML
- - MM
- - MN
- - MO
- - MP
- - MQ
- - MR
- - MS
- - MT
- - MU
- - MV
- - MW
- - MX
- - MY
- - MZ
- - NA
- - NC
- - NE
- - NF
- - NG
- - NI
- - NL
- - 'NO'
- - NP
- - NR
- - NU
- - NZ
- - OM
- - PA
- - PE
- - PF
- - PG
- - PH
- - PK
- - PL
- - PM
- - PN
- - PR
- - PS
- - PT
- - PW
- - PY
- - QA
- - RE
- - RO
- - RS
- - RU
- - RW
- - SA
- - SB
- - SC
- - SD
- - SE
- - SG
- - SH
- - SI
- - SJ
- - SK
- - SL
- - SM
- - SN
- - SO
- - SR
- - SS
- - ST
- - SV
- - SX
- - SY
- - SZ
- - TC
- - TD
- - TF
- - TG
- - TH
- - TJ
- - TK
- - TL
- - TM
- - TN
- - TO
- - TR
- - TT
- - TV
- - TW
- - TZ
- - UA
- - UG
- - UM
- - US
- - UY
- - UZ
- - VA
- - VC
- - VE
- - VG
- - VI
- - VN
- - VU
- - WF
- - WS
- - YE
- - YT
- - ZA
- - ZM
- - ZW
- description: ISO 3166-1 Alpha-2 country code of the provider headquarters
- example: US
- x-speakeasy-unknown-values: allow
+ example:
datacenters:
- type: array
- nullable: true
+ - US
+ - IE
+ headquarters: US
+ name: OpenAI
+ privacy_policy_url: https://openai.com/privacy
+ slug: openai
+ status_page_url: https://status.openai.com
+ terms_of_service_url: https://openai.com/terms
+ properties:
+ datacenters:
+ description: ISO 3166-1 Alpha-2 country codes of the provider datacenter locations
+ example:
+ - US
+ - IE
items:
- type: string
enum:
- AD
- AE
@@ -16395,3072 +18328,1129 @@ paths:
- ZA
- ZM
- ZW
+ type: string
x-speakeasy-unknown-values: allow
- description: ISO 3166-1 Alpha-2 country codes of the provider datacenter locations
- example:
- - US
+ nullable: true
+ type: array
+ headquarters:
+ description: ISO 3166-1 Alpha-2 country code of the provider headquarters
+ enum:
+ - AD
+ - AE
+ - AF
+ - AG
+ - AI
+ - AL
+ - AM
+ - AO
+ - AQ
+ - AR
+ - AS
+ - AT
+ - AU
+ - AW
+ - AX
+ - AZ
+ - BA
+ - BB
+ - BD
+ - BE
+ - BF
+ - BG
+ - BH
+ - BI
+ - BJ
+ - BL
+ - BM
+ - BN
+ - BO
+ - BQ
+ - BR
+ - BS
+ - BT
+ - BV
+ - BW
+ - BY
+ - BZ
+ - CA
+ - CC
+ - CD
+ - CF
+ - CG
+ - CH
+ - CI
+ - CK
+ - CL
+ - CM
+ - CN
+ - CO
+ - CR
+ - CU
+ - CV
+ - CW
+ - CX
+ - CY
+ - CZ
+ - DE
+ - DJ
+ - DK
+ - DM
+ - DO
+ - DZ
+ - EC
+ - EE
+ - EG
+ - EH
+ - ER
+ - ES
+ - ET
+ - FI
+ - FJ
+ - FK
+ - FM
+ - FO
+ - FR
+ - GA
+ - GB
+ - GD
+ - GE
+ - GF
+ - GG
+ - GH
+ - GI
+ - GL
+ - GM
+ - GN
+ - GP
+ - GQ
+ - GR
+ - GS
+ - GT
+ - GU
+ - GW
+ - GY
+ - HK
+ - HM
+ - HN
+ - HR
+ - HT
+ - HU
+ - ID
- IE
+ - IL
+ - IM
+ - IN
+ - IO
+ - IQ
+ - IR
+ - IS
+ - IT
+ - JE
+ - JM
+ - JO
+ - JP
+ - KE
+ - KG
+ - KH
+ - KI
+ - KM
+ - KN
+ - KP
+ - KR
+ - KW
+ - KY
+ - KZ
+ - LA
+ - LB
+ - LC
+ - LI
+ - LK
+ - LR
+ - LS
+ - LT
+ - LU
+ - LV
+ - LY
+ - MA
+ - MC
+ - MD
+ - ME
+ - MF
+ - MG
+ - MH
+ - MK
+ - ML
+ - MM
+ - MN
+ - MO
+ - MP
+ - MQ
+ - MR
+ - MS
+ - MT
+ - MU
+ - MV
+ - MW
+ - MX
+ - MY
+ - MZ
+ - NA
+ - NC
+ - NE
+ - NF
+ - NG
+ - NI
+ - NL
+ - 'NO'
+ - NP
+ - NR
+ - NU
+ - NZ
+ - OM
+ - PA
+ - PE
+ - PF
+ - PG
+ - PH
+ - PK
+ - PL
+ - PM
+ - PN
+ - PR
+ - PS
+ - PT
+ - PW
+ - PY
+ - QA
+ - RE
+ - RO
+ - RS
+ - RU
+ - RW
+ - SA
+ - SB
+ - SC
+ - SD
+ - SE
+ - SG
+ - SH
+ - SI
+ - SJ
+ - SK
+ - SL
+ - SM
+ - SN
+ - SO
+ - SR
+ - SS
+ - ST
+ - SV
+ - SX
+ - SY
+ - SZ
+ - TC
+ - TD
+ - TF
+ - TG
+ - TH
+ - TJ
+ - TK
+ - TL
+ - TM
+ - TN
+ - TO
+ - TR
+ - TT
+ - TV
+ - TW
+ - TZ
+ - UA
+ - UG
+ - UM
+ - US
+ - UY
+ - UZ
+ - VA
+ - VC
+ - VE
+ - VG
+ - VI
+ - VN
+ - VU
+ - WF
+ - WS
+ - YE
+ - YT
+ - ZA
+ - ZM
+ - ZW
+ - null
+ example: US
+ nullable: true
+ type: string
+ x-speakeasy-unknown-values: allow
+ name:
+ description: Display name of the provider
+ example: OpenAI
+ type: string
+ privacy_policy_url:
+ description: URL to the provider's privacy policy
+ example: https://openai.com/privacy
+ nullable: true
+ type: string
+ slug:
+ description: URL-friendly identifier for the provider
+ example: openai
+ type: string
+ status_page_url:
+ description: URL to the provider's status page
+ example: https://status.openai.com
+ nullable: true
+ type: string
+ terms_of_service_url:
+ description: URL to the provider's terms of service
+ example: https://openai.com/terms
+ nullable: true
+ type: string
required:
- name
- slug
- privacy_policy_url
- example:
- name: OpenAI
- slug: openai
- privacy_policy_url: https://openai.com/privacy
- terms_of_service_url: https://openai.com/terms
- status_page_url: https://status.openai.com
- headquarters: US
- datacenters:
- - US
- - IE
+ type: object
+ type: array
required:
- data
+ type: object
+ description: Returns a list of providers
'500':
- description: Internal Server Error - Unexpected server error
content:
application/json:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /keys:
- get:
- operationId: list
+ description: Internal Server Error - Unexpected server error
+ summary: List all providers
+ tags:
+ - Providers
x-speakeasy-name-override: list
- tags:
- - API Keys
- summary: List API keys
- description: >-
- List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: Whether to include disabled API keys in the response
- example: 'false'
- required: false
- description: Whether to include disabled API keys in the response
- name: include_disabled
- in: query
- - schema:
- type: string
- description: Number of API keys to skip for pagination
- example: '0'
- required: false
- description: Number of API keys to skip for pagination
- name: offset
- in: query
+ 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':
- description: List of API keys
content:
application/json:
schema:
- type: object
+ 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:
- data:
- type: array
+ 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:
- type: object
- properties:
- hash:
- type: string
- description: Unique hash identifier for the API key
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name:
- type: string
- description: Name of the API key
- example: My Production Key
- label:
- type: string
- description: Human-readable label for the API key
- example: sk-or-v1-0e6...1c96
- disabled:
- type: boolean
- description: Whether the API key is disabled
- example: false
- limit:
- type: number
- nullable: true
- description: Spending limit for the API key in USD
- example: 100
- limit_remaining:
- type: number
- nullable: true
- description: Remaining spending limit in USD
- example: 74.5
- limit_reset:
- type: string
- nullable: true
- description: Type of limit reset for the API key
- example: monthly
- include_byok_in_limit:
- type: boolean
- description: Whether to include external BYOK usage in the credit limit
- example: false
- usage:
- type: number
- description: Total OpenRouter credit usage (in USD) for the API key
- example: 25.5
- usage_daily:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC day
- example: 25.5
- usage_weekly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
- example: 25.5
- usage_monthly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC month
- example: 25.5
- byok_usage:
- type: number
- description: Total external BYOK usage (in USD) for the API key
- example: 17.38
- byok_usage_daily:
- type: number
- description: External BYOK usage (in USD) for the current UTC day
- example: 17.38
- byok_usage_weekly:
- type: number
- description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
- example: 17.38
- byok_usage_monthly:
- type: number
- description: External BYOK usage (in USD) for current UTC month
- example: 17.38
- created_at:
- type: string
- description: ISO 8601 timestamp of when the API key was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the API key was last updated
- example: '2025-08-24T15:45:00Z'
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
- example: '2027-12-31T23:59:59Z'
- creator_user_id:
- type: string
- nullable: true
- description: >-
- The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
- example: user_2dHFtVWx2n56w6HkM0000000000
- required:
- - hash
- - name
- - label
- - disabled
- - limit
- - limit_remaining
- - limit_reset
- - include_byok_in_limit
- - usage
- - usage_daily
- - usage_weekly
- - usage_monthly
- - byok_usage
- - byok_usage_daily
- - byok_usage_weekly
- - byok_usage_monthly
- - created_at
- - updated_at
- - creator_user_id
+ description: A single rerank result
example:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My Production Key
- label: sk-or-v1-0e6...1c96
- disabled: false
- limit: 100
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- description: List of API keys
- required:
- - data
- example:
- data:
- - hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My Production Key
- label: Production API Key
- disabled: false
- limit: 100
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '429':
- description: Too Many Requests - Rate limit exceeded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- post:
- x-speakeasy-name-override: create
- tags:
- - API Keys
- summary: Create a new API key
- description: >-
- Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- minLength: 1
- description: Name for the new API key
- example: My New API Key
- limit:
- type: number
- nullable: true
- description: Optional spending limit for the API key in USD
- example: 50
- limit_reset:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: >-
- 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.
- example: monthly
- x-speakeasy-unknown-values: allow
- include_byok_in_limit:
- type: boolean
- description: Whether to include BYOK usage in the limit
- example: true
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: >-
- Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
- example: '2027-12-31T23:59:59Z'
- required:
- - name
- example:
- name: My New API Key
- limit: 50
- limit_reset: monthly
- include_byok_in_limit: true
- expires_at: '2027-12-31T23:59:59Z'
- required: true
- responses:
- '201':
- description: API key created successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- hash:
- type: string
- description: Unique hash identifier for the API key
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name:
- type: string
- description: Name of the API key
- example: My Production Key
- label:
- type: string
- description: Human-readable label for the API key
- example: sk-or-v1-0e6...1c96
- disabled:
- type: boolean
- description: Whether the API key is disabled
- example: false
- limit:
- type: number
- nullable: true
- description: Spending limit for the API key in USD
- example: 100
- limit_remaining:
- type: number
- nullable: true
- description: Remaining spending limit in USD
- example: 74.5
- limit_reset:
- type: string
- nullable: true
- description: Type of limit reset for the API key
- example: monthly
- include_byok_in_limit:
- type: boolean
- description: Whether to include external BYOK usage in the credit limit
- example: false
- usage:
- type: number
- description: Total OpenRouter credit usage (in USD) for the API key
- example: 25.5
- usage_daily:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC day
- example: 25.5
- usage_weekly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
- example: 25.5
- usage_monthly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC month
- example: 25.5
- byok_usage:
- type: number
- description: Total external BYOK usage (in USD) for the API key
- example: 17.38
- byok_usage_daily:
- type: number
- description: External BYOK usage (in USD) for the current UTC day
- example: 17.38
- byok_usage_weekly:
- type: number
- description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
- example: 17.38
- byok_usage_monthly:
- type: number
- description: External BYOK usage (in USD) for current UTC month
- example: 17.38
- created_at:
- type: string
- description: ISO 8601 timestamp of when the API key was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the API key was last updated
- example: '2025-08-24T15:45:00Z'
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
- example: '2027-12-31T23:59:59Z'
- creator_user_id:
- type: string
- nullable: true
- description: >-
- The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
- example: user_2dHFtVWx2n56w6HkM0000000000
- required:
- - hash
- - name
- - label
- - disabled
- - limit
- - limit_remaining
- - limit_reset
- - include_byok_in_limit
- - usage
- - usage_daily
- - usage_weekly
- - usage_monthly
- - byok_usage
- - byok_usage_daily
- - byok_usage_weekly
- - byok_usage_monthly
- - created_at
- - updated_at
- - creator_user_id
- example:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My Production Key
- label: sk-or-v1-0e6...1c96
- disabled: false
- limit: 100
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- description: The created API key information
- key:
- type: string
- description: The actual API key string (only shown once)
- example: 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
- required:
- - data
- - key
- example:
- data:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My New API Key
- label: My New API Key
- disabled: false
- limit: 50
- limit_remaining: 50
- limit_reset: monthly
- include_byok_in_limit: true
- usage: 0
- usage_daily: 0
- usage_weekly: 0
- usage_monthly: 0
- byok_usage: 0
- byok_usage_daily: 0
- byok_usage_weekly: 0
- byok_usage_monthly: 0
- created_at: '2025-08-24T10:30:00Z'
- updated_at: null
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- key: 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
- '400':
- description: Bad Request - Invalid request parameters
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '429':
- description: Too Many Requests - Rate limit exceeded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- operationId: createKeys
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /keys/{hash}:
- patch:
- x-speakeasy-name-override: update
- tags:
- - API Keys
- summary: Update an API key
- description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: The hash identifier of the API key to update
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- required: true
- description: The hash identifier of the API key to update
- name: hash
- in: path
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- description: New name for the API key
- example: Updated API Key Name
- disabled:
- type: boolean
- description: Whether to disable the API key
- example: false
- limit:
- type: number
- nullable: true
- description: New spending limit for the API key in USD
- example: 75
- limit_reset:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: >-
- New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
- example: daily
- x-speakeasy-unknown-values: allow
- include_byok_in_limit:
- type: boolean
- description: Whether to include BYOK usage in the limit
- example: true
- example:
- name: Updated API Key Name
- disabled: false
- limit: 75
- limit_reset: daily
- include_byok_in_limit: true
- required: true
- responses:
- '200':
- description: API key updated successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- hash:
- type: string
- description: Unique hash identifier for the API key
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name:
- type: string
- description: Name of the API key
- example: My Production Key
- label:
- type: string
- description: Human-readable label for the API key
- example: sk-or-v1-0e6...1c96
- disabled:
- type: boolean
- description: Whether the API key is disabled
- example: false
- limit:
- type: number
- nullable: true
- description: Spending limit for the API key in USD
- example: 100
- limit_remaining:
- type: number
- nullable: true
- description: Remaining spending limit in USD
- example: 74.5
- limit_reset:
- type: string
- nullable: true
- description: Type of limit reset for the API key
- example: monthly
- include_byok_in_limit:
- type: boolean
- description: Whether to include external BYOK usage in the credit limit
- example: false
- usage:
- type: number
- description: Total OpenRouter credit usage (in USD) for the API key
- example: 25.5
- usage_daily:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC day
- example: 25.5
- usage_weekly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
- example: 25.5
- usage_monthly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC month
- example: 25.5
- byok_usage:
- type: number
- description: Total external BYOK usage (in USD) for the API key
- example: 17.38
- byok_usage_daily:
- type: number
- description: External BYOK usage (in USD) for the current UTC day
- example: 17.38
- byok_usage_weekly:
- type: number
- description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
- example: 17.38
- byok_usage_monthly:
- type: number
- description: External BYOK usage (in USD) for current UTC month
- example: 17.38
- created_at:
- type: string
- description: ISO 8601 timestamp of when the API key was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the API key was last updated
- example: '2025-08-24T15:45:00Z'
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
- example: '2027-12-31T23:59:59Z'
- creator_user_id:
- type: string
- nullable: true
- description: >-
- The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
- example: user_2dHFtVWx2n56w6HkM0000000000
- required:
- - hash
- - name
- - label
- - disabled
- - limit
- - limit_remaining
- - limit_reset
- - include_byok_in_limit
- - usage
- - usage_daily
- - usage_weekly
- - usage_monthly
- - byok_usage
- - byok_usage_daily
- - byok_usage_weekly
- - byok_usage_monthly
- - created_at
- - updated_at
- - creator_user_id
- example:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My Production Key
- label: sk-or-v1-0e6...1c96
- disabled: false
- limit: 100
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- description: The updated API key information
- required:
- - data
- example:
- data:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: Updated API Key Name
- label: Updated API Key Name
- disabled: false
- limit: 75
- limit_remaining: 49.5
- limit_reset: daily
- include_byok_in_limit: true
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T16:00:00Z'
- expires_at: null
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- '400':
- description: Bad Request - Invalid request parameters
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - API key does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '429':
- description: Too Many Requests - Rate limit exceeded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- operationId: updateKeys
- delete:
- x-speakeasy-name-override: delete
- tags:
- - API Keys
- summary: Delete an API key
- description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: The hash identifier of the API key to delete
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- required: true
- description: The hash identifier of the API key to delete
- name: hash
- in: path
- responses:
- '200':
- description: API key deleted successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- deleted:
- type: boolean
- const: true
- description: Confirmation that the API key was deleted
- example: true
- required:
- - deleted
- example:
- deleted: true
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - API key does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '429':
- description: Too Many Requests - Rate limit exceeded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- operationId: deleteKeys
- get:
- operationId: getKey
- x-speakeasy-name-override: get
- tags:
- - API Keys
- summary: Get a single API key
- description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: The hash identifier of the API key to retrieve
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- required: true
- description: The hash identifier of the API key to retrieve
- name: hash
- in: path
- responses:
- '200':
- description: API key details
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- hash:
- type: string
- description: Unique hash identifier for the API key
- example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name:
- type: string
- description: Name of the API key
- example: My Production Key
- label:
- type: string
- description: Human-readable label for the API key
- example: sk-or-v1-0e6...1c96
- disabled:
- type: boolean
- description: Whether the API key is disabled
- example: false
- limit:
- type: number
- nullable: true
- description: Spending limit for the API key in USD
- example: 100
- limit_remaining:
- type: number
- nullable: true
- description: Remaining spending limit in USD
- example: 74.5
- limit_reset:
- type: string
- nullable: true
- description: Type of limit reset for the API key
- example: monthly
- include_byok_in_limit:
- type: boolean
- description: Whether to include external BYOK usage in the credit limit
- example: false
- usage:
- type: number
- description: Total OpenRouter credit usage (in USD) for the API key
- example: 25.5
- usage_daily:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC day
- example: 25.5
- usage_weekly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
- example: 25.5
- usage_monthly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC month
- example: 25.5
- byok_usage:
- type: number
- description: Total external BYOK usage (in USD) for the API key
- example: 17.38
- byok_usage_daily:
- type: number
- description: External BYOK usage (in USD) for the current UTC day
- example: 17.38
- byok_usage_weekly:
- type: number
- description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
- example: 17.38
- byok_usage_monthly:
- type: number
- description: External BYOK usage (in USD) for current UTC month
- example: 17.38
- created_at:
- type: string
- description: ISO 8601 timestamp of when the API key was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the API key was last updated
- example: '2025-08-24T15:45:00Z'
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
- example: '2027-12-31T23:59:59Z'
- creator_user_id:
- type: string
- nullable: true
- description: >-
- The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
- example: user_2dHFtVWx2n56w6HkM0000000000
- required:
- - hash
- - name
- - label
- - disabled
- - limit
- - limit_remaining
- - limit_reset
- - include_byok_in_limit
- - usage
- - usage_daily
- - usage_weekly
- - usage_monthly
- - byok_usage
- - byok_usage_daily
- - byok_usage_weekly
- - byok_usage_monthly
- - created_at
- - updated_at
- - creator_user_id
- example:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My Production Key
- label: sk-or-v1-0e6...1c96
- disabled: false
- limit: 100
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- description: The API key information
- required:
- - data
- example:
- data:
- hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943
- name: My Production Key
- label: Production API Key
- disabled: false
- limit: 100
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - API key does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '429':
- description: Too Many Requests - Rate limit exceeded
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TooManyRequestsResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails:
- get:
- operationId: listGuardrails
- x-speakeasy-name-override: list
- tags:
- - Guardrails
- summary: List guardrails
- description: >-
- List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: Number of records to skip for pagination
- example: '0'
- required: false
- description: Number of records to skip for pagination
- name: offset
- in: query
- - schema:
- type: string
- description: Maximum number of records to return (max 100)
- example: '50'
- required: false
- description: Maximum number of records to return (max 100)
- name: limit
- in: query
- responses:
- '200':
- description: List of guardrails
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
+ document:
+ text: Paris is the capital of France.
+ index: 0
+ relevance_score: 0.98
properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- name:
- type: string
- description: Name of the guardrail
- example: Production Guardrail
- description:
- type: string
- nullable: true
- description: Description of the guardrail
- example: Guardrail for production environment
- limit_usd:
+ 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
- nullable: true
- minimum: 0
- exclusiveMinimum: true
- description: Spending limit in USD
- example: 100
- reset_interval:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: Interval at which the limit resets (daily, weekly, monthly)
- example: monthly
- x-speakeasy-unknown-values: allow
- allowed_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of allowed provider IDs
- example:
- - openai
- - anthropic
- - google
- ignored_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of provider IDs to exclude from routing
- example:
- - azure
- allowed_models:
- type: array
- nullable: true
- items:
- type: string
- description: Array of model canonical_slugs (immutable identifiers)
- example:
- - openai/gpt-5.2-20251211
- - anthropic/claude-4.5-opus-20251124
- - deepseek/deepseek-r1-0528:free
- enforce_zdr:
- type: boolean
- nullable: true
- description: Whether to enforce zero data retention
- example: false
- created_at:
- type: string
- description: ISO 8601 timestamp of when the guardrail was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the guardrail was last updated
- example: '2025-08-24T15:45:00Z'
required:
- - id
- - name
- - created_at
- example:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: Production Guardrail
- description: Guardrail for production environment
- limit_usd: 100
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- description: List of guardrails
- total_count:
- type: number
- description: Total number of guardrails
- example: 25
+ - 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
- - total_count
- example:
- data:
- - id: 550e8400-e29b-41d4-a716-446655440000
- name: Production Guardrail
- description: Guardrail for production environment
- limit_usd: 100
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- total_count: 1
- '401':
- description: Unauthorized - Missing or invalid authentication
+ - model
+ - results
+ type: object
+ 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:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- post:
- operationId: createGuardrail
- x-speakeasy-name-override: create
- tags:
- - Guardrails
- summary: Create a guardrail
- description: >-
- Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- minLength: 1
- maxLength: 200
- description: Name for the new guardrail
- example: My New Guardrail
- description:
- type: string
- nullable: true
- maxLength: 1000
- description: Description of the guardrail
- example: A guardrail for limiting API usage
- limit_usd:
- type: number
- nullable: true
- minimum: 0
- exclusiveMinimum: true
- description: Spending limit in USD
- example: 50
- reset_interval:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: Interval at which the limit resets (daily, weekly, monthly)
- example: monthly
- x-speakeasy-unknown-values: allow
- allowed_providers:
- type: array
- nullable: true
- items:
- type: string
- minItems: 1
- description: List of allowed provider IDs
- example:
- - openai
- - anthropic
- - deepseek
- ignored_providers:
- type: array
- nullable: true
- items:
- type: string
- minItems: 1
- description: List of provider IDs to exclude from routing
- example:
- - azure
- allowed_models:
- type: array
- nullable: true
- items:
- type: string
- minItems: 1
- description: Array of model identifiers (slug or canonical_slug accepted)
- example:
- - openai/gpt-5.2
- - anthropic/claude-4.5-opus-20251124
- - deepseek/deepseek-r1-0528:free
- enforce_zdr:
- type: boolean
- nullable: true
- description: Whether to enforce zero data retention
- example: false
- required:
- - name
example:
- name: My New Guardrail
- description: A guardrail for limiting API usage
- limit_usd: 50
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - deepseek
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- required: true
- responses:
- '201':
- description: Guardrail created successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- name:
- type: string
- description: Name of the guardrail
- example: Production Guardrail
- description:
- type: string
- nullable: true
- description: Description of the guardrail
- example: Guardrail for production environment
- limit_usd:
- type: number
- nullable: true
- minimum: 0
- exclusiveMinimum: true
- description: Spending limit in USD
- example: 100
- reset_interval:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: Interval at which the limit resets (daily, weekly, monthly)
- example: monthly
- x-speakeasy-unknown-values: allow
- allowed_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of allowed provider IDs
- example:
- - openai
- - anthropic
- - google
- ignored_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of provider IDs to exclude from routing
- example:
- - azure
- allowed_models:
- type: array
- nullable: true
- items:
- type: string
- description: Array of model canonical_slugs (immutable identifiers)
- example:
- - openai/gpt-5.2-20251211
- - anthropic/claude-4.5-opus-20251124
- - deepseek/deepseek-r1-0528:free
- enforce_zdr:
- type: boolean
- nullable: true
- description: Whether to enforce zero data retention
- example: false
- created_at:
- type: string
- description: ISO 8601 timestamp of when the guardrail was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the guardrail was last updated
- example: '2025-08-24T15:45:00Z'
- required:
- - id
- - name
- - created_at
- example:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: Production Guardrail
- description: Guardrail for production environment
- limit_usd: 100
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- description: The created guardrail
- required:
- - data
- example:
- data:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: My New Guardrail
- description: A guardrail for limiting API usage
- limit_usd: 50
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: null
- '400':
- description: Bad Request - Invalid request parameters
- content:
- application/json:
+ error:
+ code: 400
+ message: Invalid request parameters
schema:
$ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/{id}:
- get:
- operationId: getGuardrail
- x-speakeasy-name-override: get
- tags:
- - Guardrails
- summary: Get a guardrail
- description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail to retrieve
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail to retrieve
- name: id
- in: path
- responses:
- '200':
- description: Guardrail details
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- name:
- type: string
- description: Name of the guardrail
- example: Production Guardrail
- description:
- type: string
- nullable: true
- description: Description of the guardrail
- example: Guardrail for production environment
- limit_usd:
- type: number
- nullable: true
- minimum: 0
- exclusiveMinimum: true
- description: Spending limit in USD
- example: 100
- reset_interval:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: Interval at which the limit resets (daily, weekly, monthly)
- example: monthly
- x-speakeasy-unknown-values: allow
- allowed_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of allowed provider IDs
- example:
- - openai
- - anthropic
- - google
- ignored_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of provider IDs to exclude from routing
- example:
- - azure
- allowed_models:
- type: array
- nullable: true
- items:
- type: string
- description: Array of model canonical_slugs (immutable identifiers)
- example:
- - openai/gpt-5.2-20251211
- - anthropic/claude-4.5-opus-20251124
- - deepseek/deepseek-r1-0528:free
- enforce_zdr:
- type: boolean
- nullable: true
- description: Whether to enforce zero data retention
- example: false
- created_at:
- type: string
- description: ISO 8601 timestamp of when the guardrail was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the guardrail was last updated
- example: '2025-08-24T15:45:00Z'
- required:
- - id
- - name
- - created_at
- example:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: Production Guardrail
- description: Guardrail for production environment
- limit_usd: 100
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- description: The guardrail
- required:
- - data
- example:
- data:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: Production Guardrail
- description: Guardrail for production environment
- limit_usd: 100
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - Guardrail does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- patch:
- operationId: updateGuardrail
- x-speakeasy-name-override: update
- tags:
- - Guardrails
- summary: Update a guardrail
- description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail to update
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail to update
- name: id
- in: path
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- minLength: 1
- maxLength: 200
- description: New name for the guardrail
- example: Updated Guardrail Name
- description:
- type: string
- nullable: true
- maxLength: 1000
- description: New description for the guardrail
- example: Updated description
- limit_usd:
- type: number
- nullable: true
- minimum: 0
- exclusiveMinimum: true
- description: New spending limit in USD
- example: 75
- reset_interval:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: Interval at which the limit resets (daily, weekly, monthly)
- example: monthly
- x-speakeasy-unknown-values: allow
- allowed_providers:
- type: array
- nullable: true
- items:
- type: string
- minItems: 1
- description: New list of allowed provider IDs
- example:
- - openai
- - anthropic
- - deepseek
- ignored_providers:
- type: array
- nullable: true
- items:
- type: string
- minItems: 1
- description: List of provider IDs to exclude from routing
- example:
- - azure
- allowed_models:
- type: array
- nullable: true
- items:
- type: string
- minItems: 1
- description: Array of model identifiers (slug or canonical_slug accepted)
- example:
- - openai/gpt-5.2
- enforce_zdr:
- type: boolean
- nullable: true
- description: Whether to enforce zero data retention
- example: true
- example:
- name: Updated Guardrail Name
- description: Updated description
- limit_usd: 75
- reset_interval: weekly
- required: true
- responses:
- '200':
- description: Guardrail updated successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- name:
- type: string
- description: Name of the guardrail
- example: Production Guardrail
- description:
- type: string
- nullable: true
- description: Description of the guardrail
- example: Guardrail for production environment
- limit_usd:
- type: number
- nullable: true
- minimum: 0
- exclusiveMinimum: true
- description: Spending limit in USD
- example: 100
- reset_interval:
- type: string
- nullable: true
- enum:
- - daily
- - weekly
- - monthly
- description: Interval at which the limit resets (daily, weekly, monthly)
- example: monthly
- x-speakeasy-unknown-values: allow
- allowed_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of allowed provider IDs
- example:
- - openai
- - anthropic
- - google
- ignored_providers:
- type: array
- nullable: true
- items:
- type: string
- description: List of provider IDs to exclude from routing
- example:
- - azure
- allowed_models:
- type: array
- nullable: true
- items:
- type: string
- description: Array of model canonical_slugs (immutable identifiers)
- example:
- - openai/gpt-5.2-20251211
- - anthropic/claude-4.5-opus-20251124
- - deepseek/deepseek-r1-0528:free
- enforce_zdr:
- type: boolean
- nullable: true
- description: Whether to enforce zero data retention
- example: false
- created_at:
- type: string
- description: ISO 8601 timestamp of when the guardrail was created
- example: '2025-08-24T10:30:00Z'
- updated_at:
- type: string
- nullable: true
- description: ISO 8601 timestamp of when the guardrail was last updated
- example: '2025-08-24T15:45:00Z'
- required:
- - id
- - name
- - created_at
- example:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: Production Guardrail
- description: Guardrail for production environment
- limit_usd: 100
- reset_interval: monthly
- allowed_providers:
- - openai
- - anthropic
- - google
- ignored_providers: null
- allowed_models: null
- enforce_zdr: false
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T15:45:00Z'
- description: The updated guardrail
- required:
- - data
- example:
- data:
- id: 550e8400-e29b-41d4-a716-446655440000
- name: Updated Guardrail Name
- description: Updated description
- limit_usd: 75
- reset_interval: weekly
- allowed_providers:
- - openai
- ignored_providers: null
- allowed_models: null
- enforce_zdr: true
- created_at: '2025-08-24T10:30:00Z'
- updated_at: '2025-08-24T16:00:00Z'
- '400':
- description: Bad Request - Invalid request parameters
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - Guardrail does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- delete:
- operationId: deleteGuardrail
- x-speakeasy-name-override: delete
- tags:
- - Guardrails
- summary: Delete a guardrail
- description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail to delete
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail to delete
- name: id
- in: path
- responses:
- '200':
- description: Guardrail deleted successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- deleted:
- type: boolean
- const: true
- description: Confirmation that the guardrail was deleted
- example: true
- required:
- - deleted
- example:
- deleted: true
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Not Found - Guardrail does not exist
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/assignments/keys:
- get:
- operationId: listKeyAssignments
- x-speakeasy-name-override: listKeyAssignments
- tags:
- - Guardrails
- summary: List all key assignments
- description: >-
- List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: Number of records to skip for pagination
- example: '0'
- required: false
- description: Number of records to skip for pagination
- name: offset
- in: query
- - schema:
- type: string
- description: Maximum number of records to return (max 100)
- example: '50'
- required: false
- description: Maximum number of records to return (max 100)
- name: limit
- in: query
- responses:
- '200':
- description: List of key assignments
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the assignment
- example: 550e8400-e29b-41d4-a716-446655440000
- key_hash:
- type: string
- description: Hash of the assigned API key
- example: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
- guardrail_id:
- type: string
- format: uuid
- description: ID of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440001
- key_name:
- type: string
- description: Name of the API key
- example: Production Key
- key_label:
- type: string
- description: Label of the API key
- example: prod-key
- assigned_by:
- type: string
- nullable: true
- description: User ID of who made the assignment
- example: user_abc123
- created_at:
- type: string
- description: ISO 8601 timestamp of when the assignment was created
- example: '2025-08-24T10:30:00Z'
- required:
- - id
- - key_hash
- - guardrail_id
- - key_name
- - key_label
- - assigned_by
- - created_at
- description: List of key assignments
- total_count:
- type: number
- description: Total number of key assignments for this guardrail
- example: 25
- required:
- - data
- - total_count
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/assignments/members:
- get:
- operationId: listMemberAssignments
- x-speakeasy-name-override: listMemberAssignments
- tags:
- - Guardrails
- summary: List all member assignments
- description: >-
- List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- description: Number of records to skip for pagination
- example: '0'
- required: false
- description: Number of records to skip for pagination
- name: offset
- in: query
- - schema:
- type: string
- description: Maximum number of records to return (max 100)
- example: '50'
- required: false
- description: Maximum number of records to return (max 100)
- name: limit
- in: query
- responses:
- '200':
- description: List of member assignments
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the assignment
- example: 550e8400-e29b-41d4-a716-446655440000
- user_id:
- type: string
- description: Clerk user ID of the assigned member
- example: user_abc123
- organization_id:
- type: string
- description: Organization ID
- example: org_xyz789
- guardrail_id:
- type: string
- format: uuid
- description: ID of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440001
- assigned_by:
- type: string
- nullable: true
- description: User ID of who made the assignment
- example: user_abc123
- created_at:
- type: string
- description: ISO 8601 timestamp of when the assignment was created
- example: '2025-08-24T10:30:00Z'
- required:
- - id
- - user_id
- - organization_id
- - guardrail_id
- - assigned_by
- - created_at
- description: List of member assignments
- total_count:
- type: number
- description: Total number of member assignments
- example: 10
- required:
- - data
- - total_count
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/{id}/assignments/keys:
- get:
- operationId: listGuardrailKeyAssignments
- x-speakeasy-name-override: listGuardrailKeyAssignments
- tags:
- - Guardrails
- summary: List key assignments for a guardrail
- description: >-
- List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail
- name: id
- in: path
- - schema:
- type: string
- description: Number of records to skip for pagination
- example: '0'
- required: false
- description: Number of records to skip for pagination
- name: offset
- in: query
- - schema:
- type: string
- description: Maximum number of records to return (max 100)
- example: '50'
- required: false
- description: Maximum number of records to return (max 100)
- name: limit
- in: query
- responses:
- '200':
- description: List of key assignments
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the assignment
- example: 550e8400-e29b-41d4-a716-446655440000
- key_hash:
- type: string
- description: Hash of the assigned API key
- example: c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
- guardrail_id:
- type: string
- format: uuid
- description: ID of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440001
- key_name:
- type: string
- description: Name of the API key
- example: Production Key
- key_label:
- type: string
- description: Label of the API key
- example: prod-key
- assigned_by:
- type: string
- nullable: true
- description: User ID of who made the assignment
- example: user_abc123
- created_at:
- type: string
- description: ISO 8601 timestamp of when the assignment was created
- example: '2025-08-24T10:30:00Z'
- required:
- - id
- - key_hash
- - guardrail_id
- - key_name
- - key_label
- - assigned_by
- - created_at
- description: List of key assignments
- total_count:
- type: number
- description: Total number of key assignments for this guardrail
- example: 25
- required:
- - data
- - total_count
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Guardrail not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- post:
- operationId: bulkAssignKeysToGuardrail
- x-speakeasy-name-override: bulkAssignKeys
- tags:
- - Guardrails
- summary: Bulk assign keys to a guardrail
- description: >-
- Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail
- name: id
- in: path
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- key_hashes:
- type: array
- items:
- type: string
- minLength: 1
- minItems: 1
- description: Array of API key hashes to assign to the guardrail
- example:
- - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
- required:
- - key_hashes
- required: true
- responses:
- '200':
- description: Assignment result
- content:
- application/json:
- schema:
- type: object
- properties:
- assigned_count:
- type: number
- description: Number of keys successfully assigned
- example: 3
- required:
- - assigned_count
- '400':
- description: Bad Request - Invalid input
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Guardrail not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/{id}/assignments/members:
- get:
- operationId: listGuardrailMemberAssignments
- x-speakeasy-name-override: listGuardrailMemberAssignments
- tags:
- - Guardrails
- summary: List member assignments for a guardrail
- description: >-
- List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail
- name: id
- in: path
- - schema:
- type: string
- description: Number of records to skip for pagination
- example: '0'
- required: false
- description: Number of records to skip for pagination
- name: offset
- in: query
- - schema:
- type: string
- description: Maximum number of records to return (max 100)
- example: '50'
- required: false
- description: Maximum number of records to return (max 100)
- name: limit
- in: query
- responses:
- '200':
- description: List of member assignments
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the assignment
- example: 550e8400-e29b-41d4-a716-446655440000
- user_id:
- type: string
- description: Clerk user ID of the assigned member
- example: user_abc123
- organization_id:
- type: string
- description: Organization ID
- example: org_xyz789
- guardrail_id:
- type: string
- format: uuid
- description: ID of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440001
- assigned_by:
- type: string
- nullable: true
- description: User ID of who made the assignment
- example: user_abc123
- created_at:
- type: string
- description: ISO 8601 timestamp of when the assignment was created
- example: '2025-08-24T10:30:00Z'
- required:
- - id
- - user_id
- - organization_id
- - guardrail_id
- - assigned_by
- - created_at
- description: List of member assignments
- total_count:
- type: number
- description: Total number of member assignments
- example: 10
- required:
- - data
- - total_count
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Guardrail not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- post:
- operationId: bulkAssignMembersToGuardrail
- x-speakeasy-name-override: bulkAssignMembers
- tags:
- - Guardrails
- summary: Bulk assign members to a guardrail
- description: >-
- Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail
- name: id
- in: path
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- member_user_ids:
- type: array
- items:
- type: string
- minLength: 1
- minItems: 1
- description: Array of member user IDs to assign to the guardrail
- example:
- - user_abc123
- - user_def456
- required:
- - member_user_ids
- required: true
- responses:
- '200':
- description: Assignment result
- content:
- application/json:
- schema:
- type: object
- properties:
- assigned_count:
- type: number
- description: Number of members successfully assigned
- example: 2
- required:
- - assigned_count
- '400':
- description: Bad Request - Invalid input
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Guardrail not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/{id}/assignments/keys/remove:
- post:
- operationId: bulkUnassignKeysFromGuardrail
- x-speakeasy-name-override: bulkUnassignKeys
- tags:
- - Guardrails
- summary: Bulk unassign keys from a guardrail
- description: >-
- Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail
- name: id
- in: path
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- key_hashes:
- type: array
- items:
- type: string
- minLength: 1
- minItems: 1
- description: Array of API key hashes to unassign from the guardrail
- example:
- - c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93
- required:
- - key_hashes
- required: true
- responses:
- '200':
- description: Unassignment result
- content:
- application/json:
- schema:
- type: object
- properties:
- unassigned_count:
- type: number
- description: Number of keys successfully unassigned
- example: 3
- required:
- - unassigned_count
- '400':
- description: Bad Request - Invalid input
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Guardrail not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /guardrails/{id}/assignments/members/remove:
- post:
- operationId: bulkUnassignMembersFromGuardrail
- x-speakeasy-name-override: bulkUnassignMembers
- tags:
- - Guardrails
- summary: Bulk unassign members from a guardrail
- description: >-
- Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- parameters:
- - schema:
- type: string
- format: uuid
- description: The unique identifier of the guardrail
- example: 550e8400-e29b-41d4-a716-446655440000
- required: true
- description: The unique identifier of the guardrail
- name: id
- in: path
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- member_user_ids:
- type: array
- items:
- type: string
- minLength: 1
- minItems: 1
- description: Array of member user IDs to unassign from the guardrail
- example:
- - user_abc123
- - user_def456
- required:
- - member_user_ids
- required: true
- responses:
- '200':
- description: Unassignment result
- content:
- application/json:
- schema:
- type: object
- properties:
- unassigned_count:
- type: number
- description: Number of members successfully unassigned
- example: 2
- required:
- - unassigned_count
- '400':
- description: Bad Request - Invalid input
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BadRequestResponse'
- '401':
- description: Unauthorized - Missing or invalid authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '404':
- description: Guardrail not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotFoundResponse'
- '500':
- description: Internal Server Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /key:
- get:
- operationId: getCurrentKey
- x-speakeasy-name-override: getCurrentKeyMetadata
- tags:
- - API Keys
- summary: Get current API key
- description: Get information on the API key associated with the current authentication session
- responses:
- '200':
- description: API key details
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- label:
- type: string
- description: Human-readable label for the API key
- example: sk-or-v1-0e6...1c96
- limit:
- type: number
- nullable: true
- description: Spending limit for the API key in USD
- example: 100
- usage:
- type: number
- description: Total OpenRouter credit usage (in USD) for the API key
- example: 25.5
- usage_daily:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC day
- example: 25.5
- usage_weekly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
- example: 25.5
- usage_monthly:
- type: number
- description: OpenRouter credit usage (in USD) for the current UTC month
- example: 25.5
- byok_usage:
- type: number
- description: Total external BYOK usage (in USD) for the API key
- example: 17.38
- byok_usage_daily:
- type: number
- description: External BYOK usage (in USD) for the current UTC day
- example: 17.38
- byok_usage_weekly:
- type: number
- description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
- example: 17.38
- byok_usage_monthly:
- type: number
- description: External BYOK usage (in USD) for current UTC month
- example: 17.38
- is_free_tier:
- type: boolean
- description: Whether this is a free tier API key
- example: false
- is_management_key:
- type: boolean
- description: Whether this is a management key
- example: false
- is_provisioning_key:
- type: boolean
- description: Whether this is a management key
- deprecated: true
- example: false
- limit_remaining:
- type: number
- nullable: true
- description: Remaining spending limit in USD
- example: 74.5
- limit_reset:
- type: string
- nullable: true
- description: Type of limit reset for the API key
- example: monthly
- include_byok_in_limit:
- type: boolean
- description: Whether to include external BYOK usage in the credit limit
- example: false
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration
- example: '2027-12-31T23:59:59Z'
- creator_user_id:
- type: string
- nullable: true
- description: >-
- The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
- example: user_2dHFtVWx2n56w6HkM0000000000
- rate_limit:
- type: object
- properties:
- requests:
- type: number
- description: Number of requests allowed per interval
- example: 1000
- interval:
- type: string
- description: Rate limit interval
- example: 1h
- note:
- type: string
- description: Note about the rate limit
- example: This field is deprecated and safe to ignore.
- required:
- - requests
- - interval
- - note
- description: Legacy rate limit information about a key. Will always return -1.
- deprecated: true
- example:
- requests: 1000
- interval: 1h
- note: This field is deprecated and safe to ignore.
- required:
- - label
- - limit
- - usage
- - usage_daily
- - usage_weekly
- - usage_monthly
- - byok_usage
- - byok_usage_daily
- - byok_usage_weekly
- - byok_usage_monthly
- - is_free_tier
- - is_management_key
- - is_provisioning_key
- - limit_remaining
- - limit_reset
- - include_byok_in_limit
- - creator_user_id
- - rate_limit
- description: Current API key information
- example:
- label: sk-or-v1-au7...890
- limit: 100
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- is_free_tier: false
- is_management_key: false
- is_provisioning_key: false
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- rate_limit:
- requests: 1000
- interval: 1h
- note: This field is deprecated and safe to ignore.
- required:
- - data
- example:
- data:
- label: sk-or-v1-au7...890
- limit: 100
- usage: 25.5
- usage_daily: 25.5
- usage_weekly: 25.5
- usage_monthly: 25.5
- byok_usage: 17.38
- byok_usage_daily: 17.38
- byok_usage_weekly: 17.38
- byok_usage_monthly: 17.38
- is_free_tier: false
- is_management_key: false
- is_provisioning_key: false
- limit_remaining: 74.5
- limit_reset: monthly
- include_byok_in_limit: false
- expires_at: '2027-12-31T23:59:59Z'
- creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
- rate_limit:
- requests: 1000
- interval: 1h
- note: This field is deprecated and safe to ignore.
- '401':
- description: Unauthorized - Authentication required or invalid credentials
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UnauthorizedResponse'
- '500':
- description: Internal Server Error - Unexpected server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InternalServerResponse'
- parameters:
- - $ref: "#/components/parameters/AppIdentifier"
- - $ref: "#/components/parameters/AppDisplayName"
- - $ref: "#/components/parameters/AppCategories"
- /auth/keys:
- post:
- operationId: exchangeAuthCodeForAPIKey
- tags:
- - OAuth
- summary: Exchange authorization code for API key
- description: Exchange an authorization code from the PKCE flow for a user-controlled API key
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- code:
- type: string
- description: The authorization code received from the OAuth redirect
- example: auth_code_abc123def456
- code_verifier:
- type: string
- description: The code verifier if code_challenge was used in the authorization request
- example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
- code_challenge_method:
- type: string
- nullable: true
- enum:
- - S256
- - plain
- description: The method used to generate the code challenge
- example: S256
- x-speakeasy-unknown-values: allow
- required:
- - code
- example:
- code: auth_code_abc123def456
- code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
- code_challenge_method: S256
- required: true
- responses:
- '200':
- description: Successfully exchanged code for an API key
- content:
- application/json:
- schema:
- type: object
- properties:
- key:
- type: string
- description: The API key to use for OpenRouter requests
- example: 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
- user_id:
- type: string
- nullable: true
- description: User ID associated with the API key
- example: user_2yOPcMpKoQhcd4bVgSMlELRaIah
- required:
- - key
- - user_id
- example:
- key: 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
- user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah
- '400':
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/BadRequestResponse'
- '403':
- description: Forbidden - Authentication successful but insufficient permissions
+ $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/ForbiddenResponse'
+ $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':
- description: Internal Server Error - Unexpected server error
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"
- /auth/keys/code:
+ /responses:
post:
- x-speakeasy-name-override: createAuthCode
- tags:
- - OAuth
- summary: Create authorization code
- description: Create an authorization code for the PKCE flow to generate a user-controlled API key
+ description: Creates a streaming or non-streaming response using OpenResponses API format
+ operationId: createResponses
requestBody:
content:
application/json:
+ example:
+ input: Tell me a joke
+ model: openai/gpt-4o
schema:
- type: object
- properties:
- callback_url:
- type: string
- format: uri
- description: >-
- The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed.
- example: https://myapp.com/auth/callback
- code_challenge:
- type: string
- description: PKCE code challenge for enhanced security
- example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
- code_challenge_method:
- type: string
- enum:
- - S256
- - plain
- description: The method used to generate the code challenge
- example: S256
- x-speakeasy-unknown-values: allow
- limit:
- type: number
- description: Credit limit for the API key to be created
- example: 100
- expires_at:
- type: string
- nullable: true
- format: date-time
- description: Optional expiration time for the API key to be created
- key_label:
- type: string
- maxLength: 100
- description: Optional custom label for the API key. Defaults to the app name if not provided.
- example: My Custom Key
- usage_limit_type:
- type: string
- enum:
- - daily
- - weekly
- - monthly
- description: Optional credit limit reset interval. When set, the credit limit resets on this interval.
- example: monthly
- x-speakeasy-unknown-values: allow
- spawn_agent:
- type: string
- description: Agent identifier for spawn telemetry
- x-speakeasy-ignore: true
- x-fern-ignore: true
- spawn_cloud:
- type: string
- description: Cloud identifier for spawn telemetry
- x-speakeasy-ignore: true
- x-fern-ignore: true
- required:
- - callback_url
- example:
- callback_url: https://myapp.com/auth/callback
- code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
- code_challenge_method: S256
- limit: 100
+ $ref: '#/components/schemas/ResponsesRequest'
required: true
responses:
'200':
- description: Successfully created authorization code
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:
- type: object
properties:
data:
- type: object
- properties:
- id:
- type: string
- description: The authorization code ID to use in the exchange request
- example: auth_code_xyz789
- app_id:
- type: number
- description: The application ID associated with this auth code
- example: 12345
- created_at:
- type: string
- description: ISO 8601 timestamp of when the auth code was created
- example: '2025-08-24T10:30:00Z'
- required:
- - id
- - app_id
- - created_at
- description: Auth code data
- example:
- id: auth_code_xyz789
- app_id: 12345
- created_at: '2025-08-24T10:30:00Z'
+ $ref: '#/components/schemas/StreamEvents'
required:
- data
+ type: object
+ x-speakeasy-sse-sentinel: '[DONE]'
+ description: Successful response
'400':
- description: Bad Request - Invalid request parameters or malformed input
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':
- description: Unauthorized - Authentication required or invalid credentials
content:
application/json:
+ example:
+ error:
+ code: 401
+ message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
- '409':
- description: Conflict - App upsert conflict during auth code creation
+ 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/ConflictResponse'
- '500':
- description: Internal Server Error - Unexpected server error
+ $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'
- operationId: createAuthKeysCode
+ 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:
+ example:
+ error:
+ code: 500
+ message: Internal Server Error
+ schema:
+ $ref: '#/components/schemas/InternalServerResponse'
+ description: Internal Server Error - Unexpected server error
+ summary: Poll video generation status
+ tags:
+ - Video Generation
+ x-speakeasy-name-override: getGeneration
+ 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
+ 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/octet-stream:
+ example:
+ schema:
+ format: binary
+ type: string
+ description: Video content 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
+ '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':
+ 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: 400
+ message: Invalid request parameters
+ schema:
+ $ref: '#/components/schemas/BadRequestResponse'
+ description: Bad Request - Invalid request parameters or malformed input
+ '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 video generation models
+ tags:
+ - Video Generation
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
+security:
+ - apiKey: []
+servers:
+ - description: Production server
+ url: https://openrouter.ai/api/v1
+ x-speakeasy-server-id: production
tags:
- - name: API Keys
- description: API key management endpoints
- - name: Analytics
- description: Analytics and usage endpoints
- - name: Anthropic Messages
- description: Anthropic Messages endpoints
- - name: Chat
- description: Chat completion endpoints
- - name: Credits
- description: Credit management endpoints
- - name: Embeddings
- description: Text embedding endpoints
- - name: Endpoints
- description: Endpoint information
- - name: Generations
- description: Generation history endpoints
- - name: Guardrails
- description: Guardrails endpoints
- - name: Models
- description: Model information endpoints
- - name: OAuth
- description: OAuth authentication endpoints
- - name: Providers
- description: Provider information endpoints
- - name: beta.responses
- description: beta.responses endpoints
+ - description: API key management endpoints
+ name: API Keys
+ - description: Analytics and usage endpoints
+ name: Analytics
+ - description: Anthropic Messages endpoints
+ name: Anthropic Messages
+ - description: Chat completion endpoints
+ name: Chat
+ - description: Credit management endpoints
+ name: Credits
+ - description: Text embedding endpoints
+ name: Embeddings
+ - description: Endpoint information
+ name: Endpoints
+ - description: Generation history endpoints
+ name: Generations
+ - description: Guardrails endpoints
+ name: Guardrails
+ - description: Model information endpoints
+ name: Models
+ - description: OAuth authentication endpoints
+ name: OAuth
+ - description: Organization endpoints
+ name: Organization
+ - description: Provider information endpoints
+ name: Providers
+ - description: Rerank endpoints
+ name: Rerank
+ - description: Video Generation endpoints
+ name: Video Generation
+ - description: beta.responses endpoints
+ name: beta.responses
x-fern-base-path: /
x-retry-strategy:
- type: exponential
initialDelay: 500
- maxDelay: 60000
maxAttempts: 3
+ maxDelay: 60000
+ type: exponential
+x-speakeasy-retries:
+ backoff:
+ exponent: 1.5
+ initialInterval: 500
+ maxElapsedTime: 3600000
+ maxInterval: 60000
+ retryConnectionErrors: true
+ statusCodes:
+ - 5XX
+ strategy: backoff
x-speakeasy-globals:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 36cac57..225ec64 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:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
- sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
+ sourceRevisionDigest: sha256:17976e34475ee87867828c00c8e2d0c66ebb004832cf9c34b937c70b2887fafb
+ sourceBlobDigest: sha256:1e517208c3664b60ade61442469e33564727eb61906514aab26d32cac4cd8ebe
tags:
- latest
+ - speakeasy-sdk-regen-1775954251
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
- sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
+ sourceRevisionDigest: sha256:17976e34475ee87867828c00c8e2d0c66ebb004832cf9c34b937c70b2887fafb
+ sourceBlobDigest: sha256:1e517208c3664b60ade61442469e33564727eb61906514aab26d32cac4cd8ebe
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:c368e0601d6b667625dd99ffcd53e69e3dc98a4b518a45444add6457dde83b22
+ codeSamplesRevisionDigest: sha256:51de2c56d26b7522fc0e0774cfc6eb2e7d79a32d463ab345c7b5194e513e9060
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
@@ -26,6 +27,8 @@ workflow:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
+ - location: .speakeasy/overlays/allof-simplify.overlay.yaml
+ - location: .speakeasy/overlays/boolean-query-params.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
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/README.md b/README.md
index 5f7e784..35f11f1 100644
--- a/README.md
+++ b/README.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..b1961f9 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-04-14 00:39:13
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.9.0] .
+### Releases
+- [PyPI v0.9.0] https://pypi.org/project/openrouter/0.9.0 - .
\ No newline at end of file
diff --git a/USAGE.md b/USAGE.md
index dfa6a25..9c1506b 100644
--- a/USAGE.md
+++ b/USAGE.md
@@ -12,12 +12,10 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.beta.responses.send(service_tier="auto", stream=False)
+ res = open_router.analytics.get_user_activity()
- with res as event_stream:
- for event in event_stream:
- # handle event
- print(event, flush=True)
+ # Handle response
+ print(res)
```
@@ -39,12 +37,10 @@ async def main():
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
+ res = await open_router.analytics.get_user_activity_async()
- async with res as event_stream:
- async for event in event_stream:
- # handle event
- print(event, flush=True)
+ # Handle response
+ print(res)
asyncio.run(main())
```
diff --git a/docs/components/activityitem.md b/docs/components/activityitem.md
index 570bc52..9cbfb1a 100644
--- a/docs/components/activityitem.md
+++ b/docs/components/activityitem.md
@@ -5,14 +5,14 @@
| Field | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
+| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
+| `completion_tokens` | *int* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `date_` | *str* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 |
+| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
| `model` | *str* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 |
| `model_permaslug` | *str* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 |
-| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
+| `prompt_tokens` | *int* | :heavy_check_mark: | Total prompt tokens used | 50 |
| `provider_name` | *str* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI |
-| `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 |
-| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
-| `requests` | *float* | :heavy_check_mark: | Number of requests made | 5 |
-| `prompt_tokens` | *float* | :heavy_check_mark: | Total prompt tokens used | 50 |
-| `completion_tokens` | *float* | :heavy_check_mark: | Total completion tokens generated | 125 |
-| `reasoning_tokens` | *float* | :heavy_check_mark: | Total reasoning tokens used | 25 |
\ No newline at end of file
+| `reasoning_tokens` | *int* | :heavy_check_mark: | Total reasoning tokens used | 25 |
+| `requests` | *int* | :heavy_check_mark: | Number of requests made | 5 |
+| `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 |
\ No newline at end of file
diff --git a/docs/components/architecture.md b/docs/components/architecture.md
index f646f15..335e010 100644
--- a/docs/components/architecture.md
+++ b/docs/components/architecture.md
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
-| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
-| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | |
-| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
-| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
\ No newline at end of file
+| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | chatml |
+| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
+| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
+| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
\ No newline at end of file
diff --git a/docs/components/completiontokensdetails.md b/docs/components/completiontokensdetails.md
index 1fa23d6..4a816dc 100644
--- a/docs/components/completiontokensdetails.md
+++ b/docs/components/completiontokensdetails.md
@@ -7,7 +7,7 @@ Detailed completion token usage
| Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
-| `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for reasoning |
-| `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for audio output |
-| `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Accepted prediction tokens |
-| `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Rejected prediction tokens |
\ No newline at end of file
+| `accepted_prediction_tokens` | *Optional[int]* | :heavy_minus_sign: | Accepted prediction tokens |
+| `audio_tokens` | *Optional[int]* | :heavy_minus_sign: | Tokens used for audio output |
+| `reasoning_tokens` | *Optional[int]* | :heavy_minus_sign: | Tokens used for reasoning |
+| `rejected_prediction_tokens` | *Optional[int]* | :heavy_minus_sign: | Rejected prediction tokens |
\ No newline at end of file
diff --git a/docs/components/costdetails.md b/docs/components/costdetails.md
index ada009c..8a64aa0 100644
--- a/docs/components/costdetails.md
+++ b/docs/components/costdetails.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
-| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
+| `upstream_inference_cost` | *Optional[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
diff --git a/docs/components/data.md b/docs/components/data.md
index 8d840f6..386321b 100644
--- a/docs/components/data.md
+++ b/docs/components/data.md
@@ -7,4 +7,4 @@ Model count data
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
-| `count` | *float* | :heavy_check_mark: | Total number of available models | 150 |
\ No newline at end of file
+| `count` | *int* | :heavy_check_mark: | Total number of available models | 150 |
\ No newline at end of file
diff --git a/docs/components/defaultparameters.md b/docs/components/defaultparameters.md
index da72f0d..59ba90a 100644
--- a/docs/components/defaultparameters.md
+++ b/docs/components/defaultparameters.md
@@ -5,11 +5,11 @@ Default parameters for this model
## Fields
-| Field | Type | Required | Description |
-| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
-| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
-| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
+| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | N/A |
+| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | N/A |
+| `repetition_penalty` | *Optional[float]* | :heavy_minus_sign: | N/A |
+| `temperature` | *Optional[float]* | :heavy_minus_sign: | N/A |
+| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
+| `top_p` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/docs/components/error.md b/docs/components/error.md
index 7765bfc..a64dcf8 100644
--- a/docs/components/error.md
+++ b/docs/components/error.md
@@ -7,5 +7,5 @@ Error information
| Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
-| `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded |
-| `code` | *float* | :heavy_check_mark: | Error code | 429 |
\ No newline at end of file
+| `code` | *int* | :heavy_check_mark: | Error code | 429 |
+| `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded |
\ No newline at end of file
diff --git a/docs/components/filecitation.md b/docs/components/filecitation.md
index d967303..f03ca15 100644
--- a/docs/components/filecitation.md
+++ b/docs/components/filecitation.md
@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
-| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A |
| `filename` | *str* | :heavy_check_mark: | N/A |
-| `index` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `index` | *int* | :heavy_check_mark: | N/A |
+| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/filepath.md b/docs/components/filepath.md
index 68dc392..cc41f2d 100644
--- a/docs/components/filepath.md
+++ b/docs/components/filepath.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
-| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A |
-| `index` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `index` | *int* | :heavy_check_mark: | N/A |
+| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/inputtokensdetails.md b/docs/components/inputtokensdetails.md
index 40de8ec..7b6d823 100644
--- a/docs/components/inputtokensdetails.md
+++ b/docs/components/inputtokensdetails.md
@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `cached_tokens` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `cached_tokens` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/listendpointsresponse.md b/docs/components/listendpointsresponse.md
index 89050e4..5a0af7d 100644
--- a/docs/components/listendpointsresponse.md
+++ b/docs/components/listendpointsresponse.md
@@ -7,9 +7,9 @@ List of available endpoints for a model
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
-| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
-| `created` | *float* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
+| `architecture` | [components.Architecture](../components/architecture.md) | :heavy_check_mark: | N/A | {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
} |
+| `created` | *int* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `description` | *str* | :heavy_check_mark: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
-| `architecture` | [components.Architecture](../components/architecture.md) | :heavy_check_mark: | N/A | {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
} |
-| `endpoints` | List[[components.PublicEndpoint](../components/publicendpoint.md)] | :heavy_check_mark: | List of available endpoints for this model | |
\ No newline at end of file
+| `endpoints` | List[[components.PublicEndpoint](../components/publicendpoint.md)] | :heavy_check_mark: | List of available endpoints for this model | |
+| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
+| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
\ No newline at end of file
diff --git a/docs/components/model.md b/docs/components/model.md
index 5db2d56..d7a1f24 100644
--- a/docs/components/model.md
+++ b/docs/components/model.md
@@ -7,18 +7,19 @@ Information about an AI model available on OpenRouter
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
+| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
} |
| `canonical_slug` | *str* | :heavy_check_mark: | Canonical slug for the model | openai/gpt-4 |
-| `hugging_face_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
-| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
-| `created` | *float* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
+| `context_length` | *int* | :heavy_check_mark: | Maximum context length in tokens | 8192 |
+| `created` | *int* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
+| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1,
"temperature": 0.7,
"top_k": 0,
"top_p": 0.9
} |
| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
-| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
} |
-| `context_length` | *Nullable[float]* | :heavy_check_mark: | Maximum context length in tokens | 8192 |
-| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
} |
-| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {
"context_length": 8192,
"max_completion_tokens": 4096,
"is_moderated": true
} |
-| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"prompt_tokens": 1000,
"completion_tokens": 1000
} |
-| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
-| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"temperature": 0.7,
"top_p": 0.9,
"top_k": 0,
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1
} |
+| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
+| `hugging_face_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
+| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `knowledge_cutoff` | *OptionalNullable[str]* | :heavy_minus_sign: | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 |
-| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
\ No newline at end of file
+| `links` | [components.ModelLinks](../components/modellinks.md) | :heavy_check_mark: | Related API endpoints and resources for this model. | {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} |
+| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
+| `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 | |
+| `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/modelarchitecture.md b/docs/components/modelarchitecture.md
index 63f4c32..7579049 100644
--- a/docs/components/modelarchitecture.md
+++ b/docs/components/modelarchitecture.md
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
-| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
+| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `instruct_type` | [OptionalNullable[components.ModelArchitectureInstructType]](../components/modelarchitectureinstructtype.md) | :heavy_minus_sign: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text->text |
-| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
-| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
\ No newline at end of file
+| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
+| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
\ No newline at end of file
diff --git a/docs/components/modelgroup.md b/docs/components/modelgroup.md
index 377c57c..80ef8a0 100644
--- a/docs/components/modelgroup.md
+++ b/docs/components/modelgroup.md
@@ -13,6 +13,7 @@ Tokenizer type used by the model
| `GPT` | GPT |
| `CLAUDE` | Claude |
| `GEMINI` | Gemini |
+| `GEMMA` | Gemma |
| `GROK` | Grok |
| `COHERE` | Cohere |
| `NOVA` | Nova |
diff --git a/docs/components/modelslistresponse.md b/docs/components/modelslistresponse.md
index dacf9fa..fb5d458 100644
--- a/docs/components/modelslistresponse.md
+++ b/docs/components/modelslistresponse.md
@@ -5,6 +5,6 @@ List of available models
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
-| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models |
\ 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"
],
"top_provider": {
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] |
\ No newline at end of file
diff --git a/docs/components/openairesponsesrefusalcontent.md b/docs/components/openairesponsesrefusalcontent.md
index 4709b80..ea13450 100644
--- a/docs/components/openairesponsesrefusalcontent.md
+++ b/docs/components/openairesponsesrefusalcontent.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
-| `type` | [components.OpenAIResponsesRefusalContentType](../components/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A |
-| `refusal` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `refusal` | *str* | :heavy_check_mark: | N/A |
+| `type` | [components.OpenAIResponsesRefusalContentType](../components/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/openairesponsestoolchoicefunction.md b/docs/components/openairesponsestoolchoicefunction.md
index 6889a23..9163b3d 100644
--- a/docs/components/openairesponsestoolchoicefunction.md
+++ b/docs/components/openairesponsestoolchoicefunction.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
-| `type` | [components.OpenAIResponsesToolChoiceTypeFunction](../components/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A |
-| `name` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `name` | *str* | :heavy_check_mark: | N/A |
+| `type` | [components.OpenAIResponsesToolChoiceTypeFunction](../components/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/openairesponsestoolchoiceunion.md b/docs/components/openairesponsestoolchoiceunion.md
index 7ab787b..7e503bb 100644
--- a/docs/components/openairesponsestoolchoiceunion.md
+++ b/docs/components/openairesponsestoolchoiceunion.md
@@ -33,3 +33,9 @@ value: components.OpenAIResponsesToolChoiceFunction = /* values here */
value: components.OpenAIResponsesToolChoice = /* values here */
```
+### `components.ToolChoiceAllowed`
+
+```python
+value: components.ToolChoiceAllowed = /* values here */
+```
+
diff --git a/docs/components/outputitemimagegenerationcall.md b/docs/components/outputitemimagegenerationcall.md
index 125c363..735eb05 100644
--- a/docs/components/outputitemimagegenerationcall.md
+++ b/docs/components/outputitemimagegenerationcall.md
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
-| `type` | [components.OutputItemImageGenerationCallType](../components/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
| `id` | *str* | :heavy_check_mark: | N/A | |
| `result` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
\ No newline at end of file
+| `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
+| `type` | [components.OutputItemImageGenerationCallType](../components/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/components/outputmessage.md b/docs/components/outputmessage.md
index 4cb87d5..e59886c 100644
--- a/docs/components/outputmessage.md
+++ b/docs/components/outputmessage.md
@@ -5,9 +5,9 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | N/A |
-| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A |
-| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A |
-| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A |
| `content` | List[[components.OutputMessageContent](../components/outputmessagecontent.md)] | :heavy_check_mark: | N/A |
-| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. |
\ No newline at end of file
+| `id` | *str* | :heavy_check_mark: | N/A |
+| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. |
+| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A |
+| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A |
+| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/outputmodality.md b/docs/components/outputmodality.md
index faae463..7b8edcf 100644
--- a/docs/components/outputmodality.md
+++ b/docs/components/outputmodality.md
@@ -9,4 +9,5 @@
| `IMAGE` | image |
| `EMBEDDINGS` | embeddings |
| `AUDIO` | audio |
-| `VIDEO` | video |
\ No newline at end of file
+| `VIDEO` | video |
+| `RERANK` | rerank |
\ No newline at end of file
diff --git a/docs/components/outputtokensdetails.md b/docs/components/outputtokensdetails.md
index 430d40b..59bf427 100644
--- a/docs/components/outputtokensdetails.md
+++ b/docs/components/outputtokensdetails.md
@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `reasoning_tokens` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `reasoning_tokens` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/parameter.md b/docs/components/parameter.md
index b638d09..c00420e 100644
--- a/docs/components/parameter.md
+++ b/docs/components/parameter.md
@@ -3,29 +3,30 @@
## Values
-| Name | Value |
-| --------------------- | --------------------- |
-| `TEMPERATURE` | temperature |
-| `TOP_P` | top_p |
-| `TOP_K` | top_k |
-| `MIN_P` | min_p |
-| `TOP_A` | top_a |
-| `FREQUENCY_PENALTY` | frequency_penalty |
-| `PRESENCE_PENALTY` | presence_penalty |
-| `REPETITION_PENALTY` | repetition_penalty |
-| `MAX_TOKENS` | max_tokens |
-| `LOGIT_BIAS` | logit_bias |
-| `LOGPROBS` | logprobs |
-| `TOP_LOGPROBS` | top_logprobs |
-| `SEED` | seed |
-| `RESPONSE_FORMAT` | response_format |
-| `STRUCTURED_OUTPUTS` | structured_outputs |
-| `STOP` | stop |
-| `TOOLS` | tools |
-| `TOOL_CHOICE` | tool_choice |
-| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
-| `INCLUDE_REASONING` | include_reasoning |
-| `REASONING` | reasoning |
-| `REASONING_EFFORT` | reasoning_effort |
-| `WEB_SEARCH_OPTIONS` | web_search_options |
-| `VERBOSITY` | verbosity |
\ No newline at end of file
+| Name | Value |
+| ----------------------- | ----------------------- |
+| `TEMPERATURE` | temperature |
+| `TOP_P` | top_p |
+| `TOP_K` | top_k |
+| `MIN_P` | min_p |
+| `TOP_A` | top_a |
+| `FREQUENCY_PENALTY` | frequency_penalty |
+| `PRESENCE_PENALTY` | presence_penalty |
+| `REPETITION_PENALTY` | repetition_penalty |
+| `MAX_TOKENS` | max_tokens |
+| `MAX_COMPLETION_TOKENS` | max_completion_tokens |
+| `LOGIT_BIAS` | logit_bias |
+| `LOGPROBS` | logprobs |
+| `TOP_LOGPROBS` | top_logprobs |
+| `SEED` | seed |
+| `RESPONSE_FORMAT` | response_format |
+| `STRUCTURED_OUTPUTS` | structured_outputs |
+| `STOP` | stop |
+| `TOOLS` | tools |
+| `TOOL_CHOICE` | tool_choice |
+| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
+| `INCLUDE_REASONING` | include_reasoning |
+| `REASONING` | reasoning |
+| `REASONING_EFFORT` | reasoning_effort |
+| `WEB_SEARCH_OPTIONS` | web_search_options |
+| `VERBOSITY` | verbosity |
\ No newline at end of file
diff --git a/docs/components/pdfparseroptions.md b/docs/components/pdfparseroptions.md
index 6bd9967..05a4fc4 100644
--- a/docs/components/pdfparseroptions.md
+++ b/docs/components/pdfparseroptions.md
@@ -5,6 +5,6 @@ Options for PDF parsing.
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
-| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
+| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". | cloudflare-ai |
\ No newline at end of file
diff --git a/docs/components/percentilelatencycutoffs.md b/docs/components/percentilelatencycutoffs.md
index 6a2c04f..7533ba0 100644
--- a/docs/components/percentilelatencycutoffs.md
+++ b/docs/components/percentilelatencycutoffs.md
@@ -7,7 +7,7 @@ Percentile-based latency cutoffs. All specified cutoffs must be met for an endpo
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
-| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p50 latency (seconds) |
-| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p75 latency (seconds) |
-| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p90 latency (seconds) |
-| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p99 latency (seconds) |
\ No newline at end of file
+| `p50` | *Optional[float]* | :heavy_minus_sign: | Maximum p50 latency (seconds) |
+| `p75` | *Optional[float]* | :heavy_minus_sign: | Maximum p75 latency (seconds) |
+| `p90` | *Optional[float]* | :heavy_minus_sign: | Maximum p90 latency (seconds) |
+| `p99` | *Optional[float]* | :heavy_minus_sign: | Maximum p99 latency (seconds) |
\ No newline at end of file
diff --git a/docs/components/percentilethroughputcutoffs.md b/docs/components/percentilethroughputcutoffs.md
index dff209d..41f258f 100644
--- a/docs/components/percentilethroughputcutoffs.md
+++ b/docs/components/percentilethroughputcutoffs.md
@@ -7,7 +7,7 @@ Percentile-based throughput cutoffs. All specified cutoffs must be met for an en
| Field | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
-| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) |
-| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) |
-| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) |
-| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) |
\ No newline at end of file
+| `p50` | *Optional[float]* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) |
+| `p75` | *Optional[float]* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) |
+| `p90` | *Optional[float]* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) |
+| `p99` | *Optional[float]* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) |
\ No newline at end of file
diff --git a/docs/components/perrequestlimits.md b/docs/components/perrequestlimits.md
index 607ebc6..f42074d 100644
--- a/docs/components/perrequestlimits.md
+++ b/docs/components/perrequestlimits.md
@@ -7,5 +7,5 @@ Per-request token limits
| Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
-| `prompt_tokens` | *float* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 |
-| `completion_tokens` | *float* | :heavy_check_mark: | Maximum completion tokens per request | 1000 |
\ No newline at end of file
+| `completion_tokens` | *float* | :heavy_check_mark: | Maximum completion tokens per request | 1000 |
+| `prompt_tokens` | *float* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 |
\ No newline at end of file
diff --git a/docs/components/pricing.md b/docs/components/pricing.md
index a997dda..084b83a 100644
--- a/docs/components/pricing.md
+++ b/docs/components/pricing.md
@@ -5,17 +5,17 @@
| Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
-| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
-| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
-| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
+| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
+| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
+| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
\ No newline at end of file
diff --git a/docs/components/prompttokensdetails.md b/docs/components/prompttokensdetails.md
index a929f87..ecc924e 100644
--- a/docs/components/prompttokensdetails.md
+++ b/docs/components/prompttokensdetails.md
@@ -7,7 +7,7 @@ Detailed prompt token usage
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
-| `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | Cached prompt tokens |
-| `cache_write_tokens` | *Optional[float]* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. |
-| `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | Audio input tokens |
-| `video_tokens` | *Optional[float]* | :heavy_minus_sign: | Video input tokens |
\ No newline at end of file
+| `audio_tokens` | *Optional[int]* | :heavy_minus_sign: | Audio input tokens |
+| `cache_write_tokens` | *Optional[int]* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. |
+| `cached_tokens` | *Optional[int]* | :heavy_minus_sign: | Cached prompt tokens |
+| `video_tokens` | *Optional[int]* | :heavy_minus_sign: | Video input tokens |
\ No newline at end of file
diff --git a/docs/components/providername.md b/docs/components/providername.md
index 25d8ded..22effdd 100644
--- a/docs/components/providername.md
+++ b/docs/components/providername.md
@@ -29,6 +29,7 @@
| `CRUSOE` | Crusoe |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
+| `DEKA_LLM` | DekaLLM |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
@@ -63,6 +64,7 @@
| `PARASAIL` | Parasail |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
+| `RECRAFT` | Recraft |
| `REKA` | Reka |
| `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova |
diff --git a/docs/components/providerpreferences.md b/docs/components/providerpreferences.md
index c95276b..2321236 100644
--- a/docs/components/providerpreferences.md
+++ b/docs/components/providerpreferences.md
@@ -1,6 +1,6 @@
# ProviderPreferences
-Provider routing preferences for the request.
+When multiple model providers are available, optionally indicate your routing preference.
## Fields
@@ -8,15 +8,15 @@ Provider routing preferences for the request.
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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.
| |
-| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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. | |
| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | 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. | allow |
-| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
-| `order` | List[[components.ProviderPreferencesOrder](../components/providerpreferencesorder.md)] | :heavy_minus_sign: | 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. | |
-| `only` | List[[components.ProviderPreferencesOnly](../components/providerpreferencesonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
-| `ignore` | List[[components.ProviderPreferencesIgnore](../components/providerpreferencesignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
-| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
-| `sort` | [OptionalNullable[components.ProviderPreferencesSortUnion]](../components/providerpreferencessortunion.md) | :heavy_minus_sign: | N/A | price |
-| `max_price` | [Optional[components.ProviderPreferencesMaxPrice]](../components/providerpreferencesmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
+| `ignore` | List[[components.Ignore](../components/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | [
"openai",
"anthropic"
] |
+| `max_price` | [Optional[components.MaxPrice]](../components/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
+| `only` | List[[components.Only](../components/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | [
"openai",
"anthropic"
] |
+| `order` | List[[components.Order](../components/order.md)] | :heavy_minus_sign: | 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. | [
"openai",
"anthropic"
] |
+| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 |
| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 |
-| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 |
\ No newline at end of file
+| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
+| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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. | |
+| `sort` | [OptionalNullable[components.Sort]](../components/sort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
+| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesby.md b/docs/components/providerpreferencesby.md
deleted file mode 100644
index 2af40e5..0000000
--- a/docs/components/providerpreferencesby.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ProviderPreferencesBy
-
-The provider sorting strategy (price, throughput, latency)
-
-
-## Values
-
-| Name | Value |
-| ------------ | ------------ |
-| `PRICE` | price |
-| `THROUGHPUT` | throughput |
-| `LATENCY` | latency |
-| `EXACTO` | exacto |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesignore.md b/docs/components/providerpreferencesignore.md
deleted file mode 100644
index 2d18b70..0000000
--- a/docs/components/providerpreferencesignore.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# ProviderPreferencesIgnore
-
-
-## Supported Types
-
-### `components.ProviderName`
-
-```python
-value: components.ProviderName = /* values here */
-```
-
-### `str`
-
-```python
-value: str = /* values here */
-```
-
diff --git a/docs/components/providerpreferencesmaxprice.md b/docs/components/providerpreferencesmaxprice.md
deleted file mode 100644
index fb14872..0000000
--- a/docs/components/providerpreferencesmaxprice.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# ProviderPreferencesMaxPrice
-
-The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
-| `prompt` | *Optional[str]* | :heavy_minus_sign: | Price per million prompt tokens | 1000 |
-| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesonly.md b/docs/components/providerpreferencesonly.md
deleted file mode 100644
index be68765..0000000
--- a/docs/components/providerpreferencesonly.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# ProviderPreferencesOnly
-
-
-## Supported Types
-
-### `components.ProviderName`
-
-```python
-value: components.ProviderName = /* values here */
-```
-
-### `str`
-
-```python
-value: str = /* values here */
-```
-
diff --git a/docs/components/providerpreferencesorder.md b/docs/components/providerpreferencesorder.md
deleted file mode 100644
index ccc7218..0000000
--- a/docs/components/providerpreferencesorder.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# ProviderPreferencesOrder
-
-
-## Supported Types
-
-### `components.ProviderName`
-
-```python
-value: components.ProviderName = /* values here */
-```
-
-### `str`
-
-```python
-value: str = /* values here */
-```
-
diff --git a/docs/components/providerpreferencespartition.md b/docs/components/providerpreferencespartition.md
deleted file mode 100644
index 147aefe..0000000
--- a/docs/components/providerpreferencespartition.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ProviderPreferencesPartition
-
-Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
-
-
-## Values
-
-| Name | Value |
-| ------- | ------- |
-| `MODEL` | model |
-| `NONE` | none |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesprovidersort.md b/docs/components/providerpreferencesprovidersort.md
deleted file mode 100644
index 2f06e03..0000000
--- a/docs/components/providerpreferencesprovidersort.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ProviderPreferencesProviderSort
-
-The provider sorting strategy (price, throughput, latency)
-
-
-## Values
-
-| Name | Value |
-| ------------ | ------------ |
-| `PRICE` | price |
-| `THROUGHPUT` | throughput |
-| `LATENCY` | latency |
-| `EXACTO` | exacto |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesprovidersortconfig.md b/docs/components/providerpreferencesprovidersortconfig.md
deleted file mode 100644
index 95e5f05..0000000
--- a/docs/components/providerpreferencesprovidersortconfig.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# ProviderPreferencesProviderSortConfig
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `by` | [OptionalNullable[components.ProviderPreferencesBy]](../components/providerpreferencesby.md) | :heavy_minus_sign: | The provider sorting strategy (price, throughput, latency) | price |
-| `partition` | [OptionalNullable[components.ProviderPreferencesPartition]](../components/providerpreferencespartition.md) | :heavy_minus_sign: | Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. | model |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesprovidersortconfigenum.md b/docs/components/providerpreferencesprovidersortconfigenum.md
deleted file mode 100644
index 3e50142..0000000
--- a/docs/components/providerpreferencesprovidersortconfigenum.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ProviderPreferencesProviderSortConfigEnum
-
-
-## Values
-
-| Name | Value |
-| ------------ | ------------ |
-| `PRICE` | price |
-| `THROUGHPUT` | throughput |
-| `LATENCY` | latency |
-| `EXACTO` | exacto |
\ No newline at end of file
diff --git a/docs/components/providerpreferencesprovidersortconfigunion.md b/docs/components/providerpreferencesprovidersortconfigunion.md
deleted file mode 100644
index 3b811f7..0000000
--- a/docs/components/providerpreferencesprovidersortconfigunion.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# ProviderPreferencesProviderSortConfigUnion
-
-
-## Supported Types
-
-### `components.ProviderPreferencesProviderSortConfig`
-
-```python
-value: components.ProviderPreferencesProviderSortConfig = /* values here */
-```
-
-### `components.ProviderPreferencesProviderSortConfigEnum`
-
-```python
-value: components.ProviderPreferencesProviderSortConfigEnum = /* values here */
-```
-
diff --git a/docs/components/providerpreferencessortenum.md b/docs/components/providerpreferencessortenum.md
deleted file mode 100644
index 70cdaa9..0000000
--- a/docs/components/providerpreferencessortenum.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ProviderPreferencesSortEnum
-
-
-## Values
-
-| Name | Value |
-| ------------ | ------------ |
-| `PRICE` | price |
-| `THROUGHPUT` | throughput |
-| `LATENCY` | latency |
-| `EXACTO` | exacto |
\ No newline at end of file
diff --git a/docs/components/providerpreferencessortunion.md b/docs/components/providerpreferencessortunion.md
deleted file mode 100644
index 172baac..0000000
--- a/docs/components/providerpreferencessortunion.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# ProviderPreferencesSortUnion
-
-The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
-
-
-## Supported Types
-
-### `components.ProviderPreferencesProviderSort`
-
-```python
-value: components.ProviderPreferencesProviderSort = /* values here */
-```
-
-### `components.ProviderPreferencesProviderSortConfigUnion`
-
-```python
-value: components.ProviderPreferencesProviderSortConfigUnion = /* values here */
-```
-
-### `components.ProviderPreferencesSortEnum`
-
-```python
-value: components.ProviderPreferencesSortEnum = /* values here */
-```
-
diff --git a/docs/components/publicendpoint.md b/docs/components/publicendpoint.md
index 147ff51..7a67576 100644
--- a/docs/components/publicendpoint.md
+++ b/docs/components/publicendpoint.md
@@ -7,19 +7,21 @@ Information about a specific model endpoint
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `name` | *str* | :heavy_check_mark: | N/A | |
+| `context_length` | *int* | :heavy_check_mark: | N/A | |
+| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | {
"p50": 25.5,
"p75": 35.2,
"p90": 48.7,
"p99": 85.3
} |
+| `max_completion_tokens` | *int* | :heavy_check_mark: | N/A | |
+| `max_prompt_tokens` | *int* | :heavy_check_mark: | N/A | |
| `model_id` | *str* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 |
| `model_name` | *str* | :heavy_check_mark: | N/A | |
-| `context_length` | *float* | :heavy_check_mark: | N/A | |
+| `name` | *str* | :heavy_check_mark: | N/A | |
| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | |
| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI |
-| `tag` | *str* | :heavy_check_mark: | N/A | |
| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 |
-| `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
-| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
-| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
-| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
+| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
-| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | |
-| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| `tag` | *str* | :heavy_check_mark: | N/A | |
+| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | {
"p50": 25.5,
"p75": 35.2,
"p90": 48.7,
"p99": 85.3
} |
+| `uptime_last_1d` | *float* | :heavy_check_mark: | 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. | |
+| `uptime_last_30m` | *float* | :heavy_check_mark: | N/A | |
+| `uptime_last_5m` | *float* | :heavy_check_mark: | 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. | |
\ No newline at end of file
diff --git a/docs/components/publicpricing.md b/docs/components/publicpricing.md
index c7ac704..b96d4af 100644
--- a/docs/components/publicpricing.md
+++ b/docs/components/publicpricing.md
@@ -7,17 +7,17 @@ Pricing information for the model
| Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
-| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
-| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
-| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
+| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
+| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
+| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
\ No newline at end of file
diff --git a/docs/components/reasoning.md b/docs/components/reasoning.md
index 0a8755d..a56f26b 100644
--- a/docs/components/reasoning.md
+++ b/docs/components/reasoning.md
@@ -5,7 +5,7 @@ Configuration options for reasoning models
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
-| `effort` | [OptionalNullable[components.Effort]](../components/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium |
-| `summary` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| `effort` | [OptionalNullable[components.Effort]](../components/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium |
+| `summary` | [OptionalNullable[components.ChatReasoningSummaryVerbosityEnum]](../components/chatreasoningsummaryverbosityenum.md) | :heavy_minus_sign: | N/A | concise |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailencrypted.md b/docs/components/reasoningdetailencrypted.md
index 685b2f4..44d9d2d 100644
--- a/docs/components/reasoningdetailencrypted.md
+++ b/docs/components/reasoningdetailencrypted.md
@@ -5,10 +5,10 @@ Reasoning detail encrypted schema
## Fields
-| Field | Type | Required | Description |
-| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
-| `type` | [components.ReasoningDetailEncryptedType](../components/reasoningdetailencryptedtype.md) | :heavy_check_mark: | N/A |
-| `data` | *str* | :heavy_check_mark: | N/A |
-| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-| `format_` | [OptionalNullable[components.ReasoningDetailEncryptedFormat]](../components/reasoningdetailencryptedformat.md) | :heavy_minus_sign: | N/A |
-| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `data` | *str* | :heavy_check_mark: | N/A | |
+| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown |
+| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `type` | [components.ReasoningDetailEncryptedType](../components/reasoningdetailencryptedtype.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailencryptedformat.md b/docs/components/reasoningdetailencryptedformat.md
deleted file mode 100644
index 5648e15..0000000
--- a/docs/components/reasoningdetailencryptedformat.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ReasoningDetailEncryptedFormat
-
-
-## Values
-
-| Name | Value |
-| --------------------------- | --------------------------- |
-| `UNKNOWN` | unknown |
-| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
-| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
-| `XAI_RESPONSES_V1` | xai-responses-v1 |
-| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
-| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailsummary.md b/docs/components/reasoningdetailsummary.md
index 33fcfdf..1a6e291 100644
--- a/docs/components/reasoningdetailsummary.md
+++ b/docs/components/reasoningdetailsummary.md
@@ -5,10 +5,10 @@ Reasoning detail summary schema
## Fields
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
-| `type` | [components.ReasoningDetailSummaryType](../components/reasoningdetailsummarytype.md) | :heavy_check_mark: | N/A |
-| `summary` | *str* | :heavy_check_mark: | N/A |
-| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-| `format_` | [OptionalNullable[components.ReasoningDetailSummaryFormat]](../components/reasoningdetailsummaryformat.md) | :heavy_minus_sign: | N/A |
-| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown |
+| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `summary` | *str* | :heavy_check_mark: | N/A | |
+| `type` | [components.ReasoningDetailSummaryType](../components/reasoningdetailsummarytype.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailsummaryformat.md b/docs/components/reasoningdetailsummaryformat.md
deleted file mode 100644
index 2eae737..0000000
--- a/docs/components/reasoningdetailsummaryformat.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ReasoningDetailSummaryFormat
-
-
-## Values
-
-| Name | Value |
-| --------------------------- | --------------------------- |
-| `UNKNOWN` | unknown |
-| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
-| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
-| `XAI_RESPONSES_V1` | xai-responses-v1 |
-| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
-| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailtext.md b/docs/components/reasoningdetailtext.md
index 5e224c0..52b1133 100644
--- a/docs/components/reasoningdetailtext.md
+++ b/docs/components/reasoningdetailtext.md
@@ -5,11 +5,11 @@ Reasoning detail text schema
## Fields
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
-| `type` | [components.ReasoningDetailTextType](../components/reasoningdetailtexttype.md) | :heavy_check_mark: | N/A |
-| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-| `format_` | [OptionalNullable[components.ReasoningDetailTextFormat]](../components/reasoningdetailtextformat.md) | :heavy_minus_sign: | N/A |
-| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown |
+| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `type` | [components.ReasoningDetailTextType](../components/reasoningdetailtexttype.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailtextformat.md b/docs/components/reasoningdetailtextformat.md
deleted file mode 100644
index 8a48d10..0000000
--- a/docs/components/reasoningdetailtextformat.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ReasoningDetailTextFormat
-
-
-## Values
-
-| Name | Value |
-| --------------------------- | --------------------------- |
-| `UNKNOWN` | unknown |
-| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
-| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
-| `XAI_RESPONSES_V1` | xai-responses-v1 |
-| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
-| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
\ No newline at end of file
diff --git a/docs/components/reasoningdetailunion.md b/docs/components/reasoningdetailunion.md
index af977b3..015b016 100644
--- a/docs/components/reasoningdetailunion.md
+++ b/docs/components/reasoningdetailunion.md
@@ -5,18 +5,18 @@ Reasoning detail union schema
## Supported Types
-### `components.ReasoningDetailSummary`
-
-```python
-value: components.ReasoningDetailSummary = /* values here */
-```
-
### `components.ReasoningDetailEncrypted`
```python
value: components.ReasoningDetailEncrypted = /* values here */
```
+### `components.ReasoningDetailSummary`
+
+```python
+value: components.ReasoningDetailSummary = /* values here */
+```
+
### `components.ReasoningDetailText`
```python
diff --git a/docs/components/reasoningsummarytext.md b/docs/components/reasoningsummarytext.md
index 7bee8c5..9786305 100644
--- a/docs/components/reasoningsummarytext.md
+++ b/docs/components/reasoningsummarytext.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
-| `type` | [components.ReasoningSummaryTextType](../components/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A |
-| `text` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `text` | *str* | :heavy_check_mark: | N/A |
+| `type` | [components.ReasoningSummaryTextType](../components/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/reasoningtextcontent.md b/docs/components/reasoningtextcontent.md
index 40aa10a..500d7a1 100644
--- a/docs/components/reasoningtextcontent.md
+++ b/docs/components/reasoningtextcontent.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
-| `type` | [components.ReasoningTextContentType](../components/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A |
-| `text` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `text` | *str* | :heavy_check_mark: | N/A |
+| `type` | [components.ReasoningTextContentType](../components/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/responseformat.md b/docs/components/responseformat.md
index db3b376..86cd005 100644
--- a/docs/components/responseformat.md
+++ b/docs/components/responseformat.md
@@ -5,10 +5,10 @@ Response format configuration
## Supported Types
-### `components.ChatFormatTextConfig`
+### `components.ChatFormatGrammarConfig`
```python
-value: components.ChatFormatTextConfig = /* values here */
+value: components.ChatFormatGrammarConfig = /* values here */
```
### `components.FormatJSONObjectConfig`
@@ -23,15 +23,15 @@ value: components.FormatJSONObjectConfig = /* values here */
value: components.ChatFormatJSONSchemaConfig = /* values here */
```
-### `components.ChatFormatGrammarConfig`
-
-```python
-value: components.ChatFormatGrammarConfig = /* values here */
-```
-
### `components.ChatFormatPythonConfig`
```python
value: components.ChatFormatPythonConfig = /* values here */
```
+### `components.ChatFormatTextConfig`
+
+```python
+value: components.ChatFormatTextConfig = /* values here */
+```
+
diff --git a/docs/components/responseoutputtext.md b/docs/components/responseoutputtext.md
index 1c8bea4..ad73bf9 100644
--- a/docs/components/responseoutputtext.md
+++ b/docs/components/responseoutputtext.md
@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
-| `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A |
-| `text` | *str* | :heavy_check_mark: | N/A |
| `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A |
-| `logprobs` | List[[components.ResponseOutputTextLogprob](../components/responseoutputtextlogprob.md)] | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| `logprobs` | List[[components.Logprob](../components/logprob.md)] | :heavy_minus_sign: | N/A |
+| `text` | *str* | :heavy_check_mark: | N/A |
+| `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/responseoutputtexttoplogprob.md b/docs/components/responseoutputtexttoplogprob.md
index 4122cab..73e27f2 100644
--- a/docs/components/responseoutputtexttoplogprob.md
+++ b/docs/components/responseoutputtexttoplogprob.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `token` | *str* | :heavy_check_mark: | N/A |
-| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
-| `logprob` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `bytes_` | List[*int*] | :heavy_check_mark: | N/A |
+| `logprob` | *float* | :heavy_check_mark: | N/A |
+| `token` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/tokenizer.md b/docs/components/tokenizer.md
index 375af17..3811d6e 100644
--- a/docs/components/tokenizer.md
+++ b/docs/components/tokenizer.md
@@ -13,6 +13,7 @@ Tokenizer type used by the model
| `GPT` | GPT |
| `CLAUDE` | Claude |
| `GEMINI` | Gemini |
+| `GEMMA` | Gemma |
| `GROK` | Grok |
| `COHERE` | Cohere |
| `NOVA` | Nova |
diff --git a/docs/components/topproviderinfo.md b/docs/components/topproviderinfo.md
index 1353919..239aaeb 100644
--- a/docs/components/topproviderinfo.md
+++ b/docs/components/topproviderinfo.md
@@ -7,6 +7,6 @@ Information about the top provider for this model
| Field | Type | Required | Description | Example |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
-| `context_length` | *OptionalNullable[float]* | :heavy_minus_sign: | Context length from the top provider | 8192 |
-| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 |
-| `is_moderated` | *bool* | :heavy_check_mark: | Whether the top provider moderates content | true |
\ No newline at end of file
+| `context_length` | *Optional[int]* | :heavy_minus_sign: | Context length from the top provider | 8192 |
+| `is_moderated` | *bool* | :heavy_check_mark: | Whether the top provider moderates content | true |
+| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 |
\ No newline at end of file
diff --git a/docs/components/typeresponsecompleted.md b/docs/components/typeresponsecompleted.md
deleted file mode 100644
index 77875c6..0000000
--- a/docs/components/typeresponsecompleted.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseCompleted
-
-
-## Values
-
-| Name | Value |
-| -------------------- | -------------------- |
-| `RESPONSE_COMPLETED` | response.completed |
\ No newline at end of file
diff --git a/docs/components/typeresponsecreated.md b/docs/components/typeresponsecreated.md
deleted file mode 100644
index 364b68b..0000000
--- a/docs/components/typeresponsecreated.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseCreated
-
-
-## Values
-
-| Name | Value |
-| ------------------ | ------------------ |
-| `RESPONSE_CREATED` | response.created |
\ No newline at end of file
diff --git a/docs/components/typeresponsefailed.md b/docs/components/typeresponsefailed.md
deleted file mode 100644
index 6ce2836..0000000
--- a/docs/components/typeresponsefailed.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseFailed
-
-
-## Values
-
-| Name | Value |
-| ----------------- | ----------------- |
-| `RESPONSE_FAILED` | response.failed |
\ No newline at end of file
diff --git a/docs/components/typeresponseincomplete.md b/docs/components/typeresponseincomplete.md
deleted file mode 100644
index 3fea878..0000000
--- a/docs/components/typeresponseincomplete.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseIncomplete
-
-
-## Values
-
-| Name | Value |
-| --------------------- | --------------------- |
-| `RESPONSE_INCOMPLETE` | response.incomplete |
\ No newline at end of file
diff --git a/docs/components/typeresponseinprogress.md b/docs/components/typeresponseinprogress.md
deleted file mode 100644
index 6f2328e..0000000
--- a/docs/components/typeresponseinprogress.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseInProgress
-
-
-## Values
-
-| Name | Value |
-| ---------------------- | ---------------------- |
-| `RESPONSE_IN_PROGRESS` | response.in_progress |
\ No newline at end of file
diff --git a/docs/components/typeresponseoutputitemadded.md b/docs/components/typeresponseoutputitemadded.md
deleted file mode 100644
index b29c71e..0000000
--- a/docs/components/typeresponseoutputitemadded.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseOutputItemAdded
-
-
-## Values
-
-| Name | Value |
-| ---------------------------- | ---------------------------- |
-| `RESPONSE_OUTPUT_ITEM_ADDED` | response.output_item.added |
\ No newline at end of file
diff --git a/docs/components/typeresponseoutputitemdone.md b/docs/components/typeresponseoutputitemdone.md
deleted file mode 100644
index 4c6f4a6..0000000
--- a/docs/components/typeresponseoutputitemdone.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# TypeResponseOutputItemDone
-
-
-## Values
-
-| Name | Value |
-| --------------------------- | --------------------------- |
-| `RESPONSE_OUTPUT_ITEM_DONE` | response.output_item.done |
\ No newline at end of file
diff --git a/docs/components/urlcitation.md b/docs/components/urlcitation.md
index d98eb3b..06d9697 100644
--- a/docs/components/urlcitation.md
+++ b/docs/components/urlcitation.md
@@ -5,8 +5,8 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
-| `type` | [components.URLCitationType](../components/urlcitationtype.md) | :heavy_check_mark: | N/A |
-| `url` | *str* | :heavy_check_mark: | N/A |
+| `end_index` | *int* | :heavy_check_mark: | N/A |
+| `start_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *str* | :heavy_check_mark: | N/A |
-| `start_index` | *float* | :heavy_check_mark: | N/A |
-| `end_index` | *float* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `type` | [components.URLCitationType](../components/urlcitationtype.md) | :heavy_check_mark: | N/A |
+| `url` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/operations/apitype.md b/docs/operations/apitype.md
index 15a3041..ffff0b9 100644
--- a/docs/operations/apitype.md
+++ b/docs/operations/apitype.md
@@ -9,4 +9,5 @@ Type of API used for the generation
| ------------- | ------------- |
| `COMPLETIONS` | completions |
| `EMBEDDINGS` | embeddings |
+| `RERANK` | rerank |
| `VIDEO` | video |
\ No newline at end of file
diff --git a/docs/operations/bulkassignkeystoguardrailrequest.md b/docs/operations/bulkassignkeystoguardrailrequest.md
index ea428c6..b179068 100644
--- a/docs/operations/bulkassignkeystoguardrailrequest.md
+++ b/docs/operations/bulkassignkeystoguardrailrequest.md
@@ -9,4 +9,4 @@
| `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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| `bulk_assign_keys_request` | [components.BulkAssignKeysRequest](../components/bulkassignkeysrequest.md) | :heavy_check_mark: | N/A | {
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
} |
\ No newline at end of file
diff --git a/docs/operations/bulkassignkeystoguardrailrequestbody.md b/docs/operations/bulkassignkeystoguardrailrequestbody.md
deleted file mode 100644
index 38b45b3..0000000
--- a/docs/operations/bulkassignkeystoguardrailrequestbody.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# BulkAssignKeysToGuardrailRequestBody
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
-| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] |
\ No newline at end of file
diff --git a/docs/operations/bulkassignkeystoguardrailresponse.md b/docs/operations/bulkassignkeystoguardrailresponse.md
deleted file mode 100644
index 11f3e69..0000000
--- a/docs/operations/bulkassignkeystoguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# BulkAssignKeysToGuardrailResponse
-
-Assignment result
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
-| `assigned_count` | *float* | :heavy_check_mark: | Number of keys successfully assigned | 3 |
\ No newline at end of file
diff --git a/docs/operations/bulkassignmemberstoguardrailrequest.md b/docs/operations/bulkassignmemberstoguardrailrequest.md
index beaf174..f15474f 100644
--- a/docs/operations/bulkassignmemberstoguardrailrequest.md
+++ b/docs/operations/bulkassignmemberstoguardrailrequest.md
@@ -9,4 +9,4 @@
| `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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `request_body` | [operations.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| `bulk_assign_members_request` | [components.BulkAssignMembersRequest](../components/bulkassignmembersrequest.md) | :heavy_check_mark: | N/A | {
"member_user_ids": [
"user_abc123",
"user_def456"
]
} |
\ No newline at end of file
diff --git a/docs/operations/bulkassignmemberstoguardrailrequestbody.md b/docs/operations/bulkassignmemberstoguardrailrequestbody.md
deleted file mode 100644
index 505532f..0000000
--- a/docs/operations/bulkassignmemberstoguardrailrequestbody.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# BulkAssignMembersToGuardrailRequestBody
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
-| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [
"user_abc123",
"user_def456"
] |
\ No newline at end of file
diff --git a/docs/operations/bulkassignmemberstoguardrailresponse.md b/docs/operations/bulkassignmemberstoguardrailresponse.md
deleted file mode 100644
index 402d357..0000000
--- a/docs/operations/bulkassignmemberstoguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# BulkAssignMembersToGuardrailResponse
-
-Assignment result
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
-| `assigned_count` | *float* | :heavy_check_mark: | Number of members successfully assigned | 2 |
\ No newline at end of file
diff --git a/docs/operations/bulkunassignkeysfromguardrailrequest.md b/docs/operations/bulkunassignkeysfromguardrailrequest.md
index b80c239..eb2cae6 100644
--- a/docs/operations/bulkunassignkeysfromguardrailrequest.md
+++ b/docs/operations/bulkunassignkeysfromguardrailrequest.md
@@ -9,4 +9,4 @@
| `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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `request_body` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| `bulk_unassign_keys_request` | [components.BulkUnassignKeysRequest](../components/bulkunassignkeysrequest.md) | :heavy_check_mark: | N/A | {
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
} |
\ No newline at end of file
diff --git a/docs/operations/bulkunassignkeysfromguardrailrequestbody.md b/docs/operations/bulkunassignkeysfromguardrailrequestbody.md
deleted file mode 100644
index 5f4b2bd..0000000
--- a/docs/operations/bulkunassignkeysfromguardrailrequestbody.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# BulkUnassignKeysFromGuardrailRequestBody
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
-| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] |
\ No newline at end of file
diff --git a/docs/operations/bulkunassignkeysfromguardrailresponse.md b/docs/operations/bulkunassignkeysfromguardrailresponse.md
deleted file mode 100644
index f789d2a..0000000
--- a/docs/operations/bulkunassignkeysfromguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# BulkUnassignKeysFromGuardrailResponse
-
-Unassignment result
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
-| `unassigned_count` | *float* | :heavy_check_mark: | Number of keys successfully unassigned | 3 |
\ No newline at end of file
diff --git a/docs/operations/bulkunassignmembersfromguardrailrequest.md b/docs/operations/bulkunassignmembersfromguardrailrequest.md
index 90a9475..31832c5 100644
--- a/docs/operations/bulkunassignmembersfromguardrailrequest.md
+++ b/docs/operations/bulkunassignmembersfromguardrailrequest.md
@@ -9,4 +9,4 @@
| `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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `request_body` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
+| `bulk_unassign_members_request` | [components.BulkUnassignMembersRequest](../components/bulkunassignmembersrequest.md) | :heavy_check_mark: | N/A | {
"member_user_ids": [
"user_abc123",
"user_def456"
]
} |
\ No newline at end of file
diff --git a/docs/operations/bulkunassignmembersfromguardrailrequestbody.md b/docs/operations/bulkunassignmembersfromguardrailrequestbody.md
deleted file mode 100644
index 76855da..0000000
--- a/docs/operations/bulkunassignmembersfromguardrailrequestbody.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# BulkUnassignMembersFromGuardrailRequestBody
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
-| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [
"user_abc123",
"user_def456"
] |
\ No newline at end of file
diff --git a/docs/operations/bulkunassignmembersfromguardrailresponse.md b/docs/operations/bulkunassignmembersfromguardrailresponse.md
deleted file mode 100644
index 76e85b2..0000000
--- a/docs/operations/bulkunassignmembersfromguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# BulkUnassignMembersFromGuardrailResponse
-
-Unassignment result
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
-| `unassigned_count` | *float* | :heavy_check_mark: | Number of members successfully unassigned | 2 |
\ No newline at end of file
diff --git a/docs/operations/contentimageurl.md b/docs/operations/contentimageurl.md
index 3a624d5..7fedfe3 100644
--- a/docs/operations/contentimageurl.md
+++ b/docs/operations/contentimageurl.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
-| `type` | [operations.TypeImageURL](../operations/typeimageurl.md) | :heavy_check_mark: | N/A |
-| `image_url` | [operations.ImageURL](../operations/imageurl.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `image_url` | [operations.ImageURL](../operations/imageurl.md) | :heavy_check_mark: | N/A |
+| `type` | [operations.TypeImageURL](../operations/typeimageurl.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/operations/contenttext.md b/docs/operations/contenttext.md
index 11ffb7a..522f497 100644
--- a/docs/operations/contenttext.md
+++ b/docs/operations/contenttext.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
-| `type` | [operations.TypeText](../operations/typetext.md) | :heavy_check_mark: | N/A |
-| `text` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| `text` | *str* | :heavy_check_mark: | N/A |
+| `type` | [operations.TypeText](../operations/typetext.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/operations/createauthkeyscodedata.md b/docs/operations/createauthkeyscodedata.md
index 81adde9..23309c7 100644
--- a/docs/operations/createauthkeyscodedata.md
+++ b/docs/operations/createauthkeyscodedata.md
@@ -7,6 +7,6 @@ Auth code data
| Field | Type | Required | Description | Example |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | The authorization code ID to use in the exchange request | auth_code_xyz789 |
-| `app_id` | *float* | :heavy_check_mark: | The application ID associated with this auth code | 12345 |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z |
\ No newline at end of file
+| `app_id` | *int* | :heavy_check_mark: | The application ID associated with this auth code | 12345 |
+| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z |
+| `id` | *str* | :heavy_check_mark: | The authorization code ID to use in the exchange request | auth_code_xyz789 |
\ No newline at end of file
diff --git a/docs/operations/createauthkeyscoderequestbody.md b/docs/operations/createauthkeyscoderequestbody.md
index 76ceb7b..787c57a 100644
--- a/docs/operations/createauthkeyscoderequestbody.md
+++ b/docs/operations/createauthkeyscoderequestbody.md
@@ -8,7 +8,7 @@
| `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | https://myapp.com/auth/callback |
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
-| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
-| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
+| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | 2027-12-31T23:59:59Z |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
+| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
\ No newline at end of file
diff --git a/docs/operations/createauthkeyscoderesponse.md b/docs/operations/createauthkeyscoderesponse.md
index acad71c..8951a7a 100644
--- a/docs/operations/createauthkeyscoderesponse.md
+++ b/docs/operations/createauthkeyscoderesponse.md
@@ -7,4 +7,4 @@ Successfully created authorization code
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `data` | [operations.CreateAuthKeysCodeData](../operations/createauthkeyscodedata.md) | :heavy_check_mark: | Auth code data | {
"id": "auth_code_xyz789",
"app_id": 12345,
"created_at": "2025-08-24T10:30:00Z"
} |
\ No newline at end of file
+| `data` | [operations.CreateAuthKeysCodeData](../operations/createauthkeyscodedata.md) | :heavy_check_mark: | Auth code data | {
"app_id": 12345,
"created_at": "2025-08-24T10:30:00Z",
"id": "auth_code_xyz789"
} |
\ No newline at end of file
diff --git a/docs/operations/createcoinbasechargeglobals.md b/docs/operations/createcoinbasechargeglobals.md
deleted file mode 100644
index dcc7d37..0000000
--- a/docs/operations/createcoinbasechargeglobals.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# CreateCoinbaseChargeGlobals
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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.
|
\ No newline at end of file
diff --git a/docs/operations/createcoinbasechargerequest.md b/docs/operations/createcoinbasechargerequest.md
deleted file mode 100644
index 9a425d3..0000000
--- a/docs/operations/createcoinbasechargerequest.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# CreateCoinbaseChargeRequest
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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.
|
\ No newline at end of file
diff --git a/docs/operations/createembeddingsdata.md b/docs/operations/createembeddingsdata.md
index 297dc69..c473e71 100644
--- a/docs/operations/createembeddingsdata.md
+++ b/docs/operations/createembeddingsdata.md
@@ -1,10 +1,12 @@
# CreateEmbeddingsData
+A single embedding object
+
## Fields
-| Field | Type | Required | Description |
-| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
-| `object` | [operations.ObjectEmbedding](../operations/objectembedding.md) | :heavy_check_mark: | N/A |
-| `embedding` | [operations.Embedding](../operations/embedding.md) | :heavy_check_mark: | N/A |
-| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
+| `embedding` | [operations.Embedding](../operations/embedding.md) | :heavy_check_mark: | Embedding vector as an array of floats or a base64 string | [
0.0023064255,
-0.009327292,
0.015797347
] |
+| `index` | *Optional[int]* | :heavy_minus_sign: | Index of the embedding in the input list | 0 |
+| `object` | [operations.ObjectEmbedding](../operations/objectembedding.md) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/operations/createembeddingsrequest.md b/docs/operations/createembeddingsrequest.md
index f0c5d83..9b7a73a 100644
--- a/docs/operations/createembeddingsrequest.md
+++ b/docs/operations/createembeddingsrequest.md
@@ -3,9 +3,9 @@
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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.
|
-| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A |
\ 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.
| |
+| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | {
"dimensions": 1536,
"input": "The quick brown fox jumps over the lazy dog",
"model": "openai/text-embedding-3-small"
} |
\ No newline at end of file
diff --git a/docs/operations/createembeddingsrequestbody.md b/docs/operations/createembeddingsrequestbody.md
index e4229b3..9ea8938 100644
--- a/docs/operations/createembeddingsrequestbody.md
+++ b/docs/operations/createembeddingsrequestbody.md
@@ -1,14 +1,16 @@
# CreateEmbeddingsRequestBody
+Embeddings request input
+
## Fields
-| Field | Type | Required | Description |
-| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
-| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
-| `model` | *str* | :heavy_check_mark: | N/A |
-| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
-| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
-| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `provider` | [Optional[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
-| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `dimensions` | *Optional[int]* | :heavy_minus_sign: | The number of dimensions for the output embeddings | 1536 |
+| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | The format of the output embeddings | float |
+| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog |
+| `input_type` | *Optional[str]* | :heavy_minus_sign: | The type of input (e.g. search_query, search_document) | search_query |
+| `model` | *str* | :heavy_check_mark: | The model to use for embeddings | openai/text-embedding-3-small |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | N/A | {
"allow_fallbacks": true
} |
+| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the end-user | user-1234 |
\ No newline at end of file
diff --git a/docs/operations/createembeddingsresponsebody.md b/docs/operations/createembeddingsresponsebody.md
index 2252cfd..1ff75cb 100644
--- a/docs/operations/createembeddingsresponsebody.md
+++ b/docs/operations/createembeddingsresponsebody.md
@@ -1,14 +1,14 @@
# CreateEmbeddingsResponseBody
-Embedding response
+Embeddings response containing embedding vectors
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
-| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A |
-| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | N/A |
-| `model` | *str* | :heavy_check_mark: | N/A |
-| `usage` | [Optional[operations.Usage]](../operations/usage.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
+| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | List of embedding objects | [
{
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
],
"index": 0,
"object": "embedding"
}
] |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the embeddings response | embd-1234567890 |
+| `model` | *str* | :heavy_check_mark: | The model used for embeddings | openai/text-embedding-3-small |
+| `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A | |
+| `usage` | [Optional[operations.CreateEmbeddingsUsage]](../operations/createembeddingsusage.md) | :heavy_minus_sign: | Token usage statistics | {
"prompt_tokens": 8,
"total_tokens": 8
} |
\ No newline at end of file
diff --git a/docs/operations/createguardraildata.md b/docs/operations/createguardraildata.md
deleted file mode 100644
index 0cfc0cf..0000000
--- a/docs/operations/createguardraildata.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# CreateGuardrailData
-
-The created guardrail
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
-| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalResponse]](../operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
\ No newline at end of file
diff --git a/docs/operations/createguardrailrequest.md b/docs/operations/createguardrailrequest.md
index 1f1c944..5a414e2 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.
| |
-| `request_body` | [operations.CreateGuardrailRequestBody](../operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false
} |
\ 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"
],
"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
diff --git a/docs/operations/createguardrailrequestbody.md b/docs/operations/createguardrailrequestbody.md
deleted file mode 100644
index 843fd1e..0000000
--- a/docs/operations/createguardrailrequestbody.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# CreateGuardrailRequestBody
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
-| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
-| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `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"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
\ No newline at end of file
diff --git a/docs/operations/createguardrailresetintervalrequest.md b/docs/operations/createguardrailresetintervalrequest.md
deleted file mode 100644
index 4d591a7..0000000
--- a/docs/operations/createguardrailresetintervalrequest.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# CreateGuardrailResetIntervalRequest
-
-Interval at which the limit resets (daily, weekly, monthly)
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `DAILY` | daily |
-| `WEEKLY` | weekly |
-| `MONTHLY` | monthly |
\ No newline at end of file
diff --git a/docs/operations/createguardrailresetintervalresponse.md b/docs/operations/createguardrailresetintervalresponse.md
deleted file mode 100644
index b49fa04..0000000
--- a/docs/operations/createguardrailresetintervalresponse.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# CreateGuardrailResetIntervalResponse
-
-Interval at which the limit resets (daily, weekly, monthly)
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `DAILY` | daily |
-| `WEEKLY` | weekly |
-| `MONTHLY` | monthly |
\ No newline at end of file
diff --git a/docs/operations/createguardrailresponse.md b/docs/operations/createguardrailresponse.md
deleted file mode 100644
index 4cf770b..0000000
--- a/docs/operations/createguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# CreateGuardrailResponse
-
-Guardrail created successfully
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.CreateGuardrailData](../operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} |
\ No newline at end of file
diff --git a/docs/operations/createkeysdata.md b/docs/operations/createkeysdata.md
index 6bbf38d..054ae84 100644
--- a/docs/operations/createkeysdata.md
+++ b/docs/operations/createkeysdata.md
@@ -7,23 +7,23 @@ The created API key information
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
-| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
-| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
-| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
-| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
-| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
-| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
-| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
-| `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_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
-| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
-| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
+| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
-| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
\ No newline at end of file
+| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
+| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
+| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
+| `limit` | *float* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
+| `limit_remaining` | *float* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
+| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
+| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
+| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `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
diff --git a/docs/operations/createkeysrequest.md b/docs/operations/createkeysrequest.md
index 281d4e8..f587de7 100644
--- a/docs/operations/createkeysrequest.md
+++ b/docs/operations/createkeysrequest.md
@@ -8,4 +8,4 @@
| `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.
| |
-| `request_body` | [operations.CreateKeysRequestBody](../operations/createkeysrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New API Key",
"limit": 50,
"limit_reset": "monthly",
"include_byok_in_limit": true,
"expires_at": "2027-12-31T23:59:59Z"
} |
\ No newline at end of file
+| `request_body` | [operations.CreateKeysRequestBody](../operations/createkeysrequestbody.md) | :heavy_check_mark: | N/A | {
"expires_at": "2027-12-31T23:59:59Z",
"include_byok_in_limit": true,
"limit": 50,
"limit_reset": "monthly",
"name": "My New API Key"
} |
\ No newline at end of file
diff --git a/docs/operations/createkeysrequestbody.md b/docs/operations/createkeysrequestbody.md
index 067a1d5..e43517f 100644
--- a/docs/operations/createkeysrequestbody.md
+++ b/docs/operations/createkeysrequestbody.md
@@ -5,8 +5,9 @@
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
-| `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 |
+| `creator_user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
-| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
\ No newline at end of file
+| `limit` | *Optional[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
diff --git a/docs/operations/createkeysresponse.md b/docs/operations/createkeysresponse.md
index 2db8887..e749075 100644
--- a/docs/operations/createkeysresponse.md
+++ b/docs/operations/createkeysresponse.md
@@ -7,5 +7,5 @@ API key created successfully
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"
} |
+| `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
diff --git a/docs/operations/createresponsesrequest.md b/docs/operations/createresponsesrequest.md
index 6436099..479750c 100644
--- a/docs/operations/createresponsesrequest.md
+++ b/docs/operations/createresponsesrequest.md
@@ -8,4 +8,4 @@
| `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.
| |
-| `responses_request` | [components.ResponsesRequest](../components/responsesrequest.md) | :heavy_check_mark: | N/A | {
"model": "anthropic/claude-4.5-sonnet-20250929",
"input": [
{
"type": "message",
"content": "Hello, how are you?",
"role": "user"
}
],
"temperature": 0.7,
"top_p": 0.9,
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
}
}
]
} |
\ No newline at end of file
+| `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
index 6190ddd..b6dddbc 100644
--- a/docs/operations/createresponsesresponsebody.md
+++ b/docs/operations/createresponsesresponsebody.md
@@ -7,4 +7,4 @@ Successful response
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.StreamEvents](../components/streamevents.md) | :heavy_check_mark: | Union of all possible event types emitted during response streaming | {
"type": "response.created",
"response": {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "in_progress",
"output": [],
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"metadata": null,
"instructions": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null
},
"sequence_number": 0
} |
\ No newline at end of file
+| `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/deleteguardrailresponse.md b/docs/operations/deleteguardrailresponse.md
deleted file mode 100644
index b548b9f..0000000
--- a/docs/operations/deleteguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# DeleteGuardrailResponse
-
-Guardrail deleted successfully
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
-| `deleted` | *Literal[True]* | :heavy_check_mark: | Confirmation that the guardrail was deleted | true |
\ No newline at end of file
diff --git a/docs/operations/embedding.md b/docs/operations/embedding.md
index 59f08e3..f6344ca 100644
--- a/docs/operations/embedding.md
+++ b/docs/operations/embedding.md
@@ -1,5 +1,7 @@
# Embedding
+Embedding vector as an array of floats or a base64 string
+
## Supported Types
diff --git a/docs/operations/encodingformat.md b/docs/operations/encodingformat.md
index 7d5941c..7f532c1 100644
--- a/docs/operations/encodingformat.md
+++ b/docs/operations/encodingformat.md
@@ -1,5 +1,7 @@
# EncodingFormat
+The format of the output embeddings
+
## Values
diff --git a/docs/operations/exchangeauthcodeforapikeyrequest.md b/docs/operations/exchangeauthcodeforapikeyrequest.md
index d818ef4..05bbc42 100644
--- a/docs/operations/exchangeauthcodeforapikeyrequest.md
+++ b/docs/operations/exchangeauthcodeforapikeyrequest.md
@@ -8,4 +8,4 @@
| `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.
| |
-| `request_body` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../operations/exchangeauthcodeforapikeyrequestbody.md) | :heavy_check_mark: | N/A | {
"code": "auth_code_abc123def456",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"code_challenge_method": "S256"
} |
\ No newline at end of file
+| `request_body` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../operations/exchangeauthcodeforapikeyrequestbody.md) | :heavy_check_mark: | N/A | {
"code": "auth_code_abc123def456",
"code_challenge_method": "S256",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
} |
\ No newline at end of file
diff --git a/docs/operations/exchangeauthcodeforapikeyrequestbody.md b/docs/operations/exchangeauthcodeforapikeyrequestbody.md
index 1543d58..6361a13 100644
--- a/docs/operations/exchangeauthcodeforapikeyrequestbody.md
+++ b/docs/operations/exchangeauthcodeforapikeyrequestbody.md
@@ -6,5 +6,5 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
-| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
-| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
\ No newline at end of file
+| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
+| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
\ No newline at end of file
diff --git a/docs/operations/getcurrentkeydata.md b/docs/operations/getcurrentkeydata.md
index 4c5ad95..3f5e088 100644
--- a/docs/operations/getcurrentkeydata.md
+++ b/docs/operations/getcurrentkeydata.md
@@ -7,22 +7,22 @@ Current API key information
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
-| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
-| `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_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
-| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
-| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
+| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
+| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
+| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
| `is_free_tier` | *bool* | :heavy_check_mark: | Whether this is a free tier API key | false |
| `is_management_key` | *bool* | :heavy_check_mark: | Whether this is a management key | false |
| ~~`is_provisioning_key`~~ | *bool* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Whether this is a management key | false |
-| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
+| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
+| `limit` | *float* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
+| `limit_remaining` | *float* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
-| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
-| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
-| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
-| ~~`rate_limit`~~ | [operations.RateLimit](../operations/ratelimit.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Legacy rate limit information about a key. Will always return -1. | {
"requests": 1000,
"interval": "1h",
"note": "This field is deprecated and safe to ignore."
} |
\ No newline at end of file
+| ~~`rate_limit`~~ | [operations.RateLimit](../operations/ratelimit.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Legacy rate limit information about a key. Will always return -1. | {
"interval": "1h",
"note": "This field is deprecated and safe to ignore.",
"requests": 1000
} |
+| `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
diff --git a/docs/operations/getcurrentkeyresponse.md b/docs/operations/getcurrentkeyresponse.md
index 8f279e2..2855d5b 100644
--- a/docs/operations/getcurrentkeyresponse.md
+++ b/docs/operations/getcurrentkeyresponse.md
@@ -7,4 +7,4 @@ API key details
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {
"label": "sk-or-v1-au7...890",
"limit": 100,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"is_free_tier": false,
"is_management_key": false,
"is_provisioning_key": false,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"rate_limit": {
"requests": 1000,
"interval": "1h",
"note": "This field is deprecated and safe to ignore."
}
} |
\ No newline at end of file
+| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_monthly": 17.38,
"byok_usage_weekly": 17.38,
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"expires_at": "2027-12-31T23:59:59Z",
"include_byok_in_limit": false,
"is_free_tier": false,
"is_management_key": false,
"is_provisioning_key": false,
"label": "sk-or-v1-au7...890",
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"rate_limit": {
"interval": "1h",
"note": "This field is deprecated and safe to ignore.",
"requests": 1000
},
"usage": 25.5,
"usage_daily": 25.5,
"usage_monthly": 25.5,
"usage_weekly": 25.5
} |
\ No newline at end of file
diff --git a/docs/operations/getgenerationdata.md b/docs/operations/getgenerationdata.md
index a980f2a..cf02875 100644
--- a/docs/operations/getgenerationdata.md
+++ b/docs/operations/getgenerationdata.md
@@ -7,39 +7,41 @@ Generation data
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG |
-| `upstream_id` | *Nullable[str]* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 |
-| `total_cost` | *float* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 |
-| `cache_discount` | *Nullable[float]* | :heavy_check_mark: | Discount applied due to caching | 0.0002 |
-| `upstream_inference_cost` | *Nullable[float]* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 |
-| `model` | *str* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b |
-| `app_id` | *Nullable[float]* | :heavy_check_mark: | ID of the app that made the request | 12345 |
-| `streamed` | *Nullable[bool]* | :heavy_check_mark: | Whether the response was streamed | true |
-| `cancelled` | *Nullable[bool]* | :heavy_check_mark: | Whether the generation was cancelled | false |
-| `provider_name` | *Nullable[str]* | :heavy_check_mark: | Name of the provider that served the request | Infermatic |
-| `latency` | *Nullable[float]* | :heavy_check_mark: | Total latency in milliseconds | 1250 |
-| `moderation_latency` | *Nullable[float]* | :heavy_check_mark: | Moderation latency in milliseconds | 50 |
-| `generation_time` | *Nullable[float]* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 |
-| `finish_reason` | *Nullable[str]* | :heavy_check_mark: | Reason the generation finished | stop |
-| `tokens_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of tokens in the prompt | 10 |
-| `tokens_completion` | *Nullable[float]* | :heavy_check_mark: | Number of tokens in the completion | 25 |
-| `native_tokens_prompt` | *Nullable[float]* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 |
-| `native_tokens_completion` | *Nullable[float]* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 |
-| `native_tokens_completion_images` | *Nullable[float]* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 |
-| `native_tokens_reasoning` | *Nullable[float]* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 |
-| `native_tokens_cached` | *Nullable[float]* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 |
-| `num_media_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of media items in the prompt | 1 |
-| `num_input_audio_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 |
-| `num_media_completion` | *Nullable[float]* | :heavy_check_mark: | Number of media items in the completion | 0 |
-| `num_search_results` | *Nullable[float]* | :heavy_check_mark: | Number of search results included | 5 |
-| `origin` | *str* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ |
-| `usage` | *float* | :heavy_check_mark: | Usage amount in USD | 0.0015 |
-| `is_byok` | *bool* | :heavy_check_mark: | Whether this used bring-your-own-key | false |
-| `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop |
-| `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 |
| `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | |
+| `app_id` | *int* | :heavy_check_mark: | ID of the app that made the request | 12345 |
+| `cache_discount` | *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` | *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` | *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` | *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` | *int* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 |
+| `native_tokens_completion` | *int* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 |
+| `native_tokens_completion_images` | *int* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 |
+| `native_tokens_prompt` | *int* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 |
+| `native_tokens_reasoning` | *int* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 |
+| `num_input_audio_prompt` | *int* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 |
+| `num_media_completion` | *int* | :heavy_check_mark: | Number of media items in the completion | 0 |
+| `num_media_prompt` | *int* | :heavy_check_mark: | Number of media items in the prompt | 1 |
+| `num_search_results` | *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 |
-| `provider_responses` | List[[operations.ProviderResponse](../operations/providerresponse.md)] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | |
-| `user_agent` | *Nullable[str]* | :heavy_check_mark: | User-Agent header from the request | |
-| `http_referer` | *Nullable[str]* | :heavy_check_mark: | Referer header from the request | |
\ No newline at end of file
+| `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` | *int* | :heavy_check_mark: | Number of tokens in the completion | 25 |
+| `tokens_prompt` | *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` | *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/getgenerationrequest.md b/docs/operations/getgenerationrequest.md
index 5fa33b6..8c54a7a 100644
--- a/docs/operations/getgenerationrequest.md
+++ b/docs/operations/getgenerationrequest.md
@@ -3,9 +3,9 @@
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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.
|
-| `id` | *str* | :heavy_check_mark: | N/A |
\ 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.
| |
+| `id` | *str* | :heavy_check_mark: | The generation ID | gen-1234567890 |
\ No newline at end of file
diff --git a/docs/operations/getguardraildata.md b/docs/operations/getguardraildata.md
deleted file mode 100644
index 25bde01..0000000
--- a/docs/operations/getguardraildata.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# GetGuardrailData
-
-The guardrail
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
-| `reset_interval` | [OptionalNullable[operations.GetGuardrailResetInterval]](../operations/getguardrailresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
\ No newline at end of file
diff --git a/docs/operations/getguardrailresetinterval.md b/docs/operations/getguardrailresetinterval.md
deleted file mode 100644
index 48f4f0e..0000000
--- a/docs/operations/getguardrailresetinterval.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# GetGuardrailResetInterval
-
-Interval at which the limit resets (daily, weekly, monthly)
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `DAILY` | daily |
-| `WEEKLY` | weekly |
-| `MONTHLY` | monthly |
\ No newline at end of file
diff --git a/docs/operations/getguardrailresponse.md b/docs/operations/getguardrailresponse.md
deleted file mode 100644
index 08739b6..0000000
--- a/docs/operations/getguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# GetGuardrailResponse
-
-Guardrail details
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.GetGuardrailData](../operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} |
\ No newline at end of file
diff --git a/docs/operations/getkeydata.md b/docs/operations/getkeydata.md
index c4f0b56..8821e8f 100644
--- a/docs/operations/getkeydata.md
+++ b/docs/operations/getkeydata.md
@@ -7,23 +7,23 @@ The API key information
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
-| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
-| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
-| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
-| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
-| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
-| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
-| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
-| `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_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
-| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
-| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
+| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
-| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
\ No newline at end of file
+| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
+| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
+| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
+| `limit` | *float* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
+| `limit_remaining` | *float* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
+| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
+| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
+| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `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
diff --git a/docs/operations/getkeyresponse.md b/docs/operations/getkeyresponse.md
index 16994d0..7959a40 100644
--- a/docs/operations/getkeyresponse.md
+++ b/docs/operations/getkeyresponse.md
@@ -7,4 +7,4 @@ API key details
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"
} |
\ No newline at end of file
+| `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
diff --git a/docs/operations/getmodelsrequest.md b/docs/operations/getmodelsrequest.md
index 1a66d5a..afb02bf 100644
--- a/docs/operations/getmodelsrequest.md
+++ b/docs/operations/getmodelsrequest.md
@@ -9,5 +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.
| |
| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
-| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
\ No newline at end of file
diff --git a/docs/operations/getuseractivityrequest.md b/docs/operations/getuseractivityrequest.md
index 6d4d521..302da8d 100644
--- a/docs/operations/getuseractivityrequest.md
+++ b/docs/operations/getuseractivityrequest.md
@@ -8,4 +8,6 @@
| `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.
| |
-| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
\ No newline at end of file
+| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
+| `api_key_hash` | *Optional[str]* | :heavy_minus_sign: | Filter by API key hash (SHA-256 hex string, as returned by the keys API). | abc123def456... |
+| `user_id` | *Optional[str]* | :heavy_minus_sign: | Filter by org member user ID. Only applicable for organization accounts. | user_abc123 |
\ No newline at end of file
diff --git a/docs/operations/getuseractivityresponse.md b/docs/operations/getuseractivityresponse.md
deleted file mode 100644
index 24cc9e1..0000000
--- a/docs/operations/getuseractivityresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# GetUserActivityResponse
-
-Returns user activity data grouped by endpoint
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
-| `data` | List[[components.ActivityItem](../components/activityitem.md)] | :heavy_check_mark: | List of activity items |
\ No newline at end of file
diff --git a/docs/operations/inputunion.md b/docs/operations/inputunion.md
index 75550b6..655cca3 100644
--- a/docs/operations/inputunion.md
+++ b/docs/operations/inputunion.md
@@ -1,5 +1,7 @@
# InputUnion
+Text, token, or multimodal input(s) to embed
+
## Supported Types
diff --git a/docs/operations/listdata.md b/docs/operations/listdata.md
index a265eca..c43c8c6 100644
--- a/docs/operations/listdata.md
+++ b/docs/operations/listdata.md
@@ -5,23 +5,23 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
-| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
-| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
-| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
-| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
-| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
-| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
-| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
-| `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_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
-| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
-| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
+| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
-| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
\ No newline at end of file
+| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
+| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
+| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
+| `limit` | *float* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
+| `limit_remaining` | *float* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
+| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
+| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
+| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `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
diff --git a/docs/operations/listendpointsrequest.md b/docs/operations/listendpointsrequest.md
index 86d4ace..49dea4f 100644
--- a/docs/operations/listendpointsrequest.md
+++ b/docs/operations/listendpointsrequest.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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.
|
-| `author` | *str* | :heavy_check_mark: | N/A |
-| `slug` | *str* | :heavy_check_mark: | N/A |
\ 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.
| |
+| `author` | *str* | :heavy_check_mark: | The author/organization of the model | openai |
+| `slug` | *str* | :heavy_check_mark: | The model slug | gpt-4 |
\ No newline at end of file
diff --git a/docs/operations/listendpointsresponse.md b/docs/operations/listendpointsresponse.md
index d4a7a58..130c768 100644
--- a/docs/operations/listendpointsresponse.md
+++ b/docs/operations/listendpointsresponse.md
@@ -5,6 +5,6 @@ Returns a list of endpoints
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.ListEndpointsResponse](../components/listendpointsresponse.md) | :heavy_check_mark: | List of available endpoints for a model | {
"id": "openai/gpt-4",
"name": "GPT-4",
"created": 1692901234,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"architecture": {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
},
"endpoints": [
{
"name": "OpenAI: GPT-4",
"model_name": "GPT-4",
"context_length": 8192,
"pricing": {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
},
"provider_name": "OpenAI",
"tag": "openai",
"quantization": "fp16",
"max_completion_tokens": 4096,
"max_prompt_tokens": 8192,
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"status": "default",
"uptime_last_30m": 99.5,
"supports_implicit_caching": true,
"latency_last_30m": {
"p50": 0.25,
"p75": 0.35,
"p90": 0.48,
"p99": 0.85
},
"throughput_last_30m": {
"p50": 45.2,
"p75": 38.5,
"p90": 28.3,
"p99": 15.1
}
}
]
} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `data` | [components.ListEndpointsResponse](../components/listendpointsresponse.md) | :heavy_check_mark: | List of available endpoints for a model | {
"architecture": {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"created": 1692901234,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"endpoints": [
{
"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_name": "GPT-4",
"name": "OpenAI: GPT-4",
"pricing": {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"provider_name": "OpenAI",
"quantization": "fp16",
"status": "default",
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"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
}
],
"id": "openai/gpt-4",
"name": "GPT-4"
} |
\ No newline at end of file
diff --git a/docs/operations/listguardrailkeyassignmentsdata.md b/docs/operations/listguardrailkeyassignmentsdata.md
deleted file mode 100644
index 285bd05..0000000
--- a/docs/operations/listguardrailkeyassignmentsdata.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# ListGuardrailKeyAssignmentsData
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
-| `key_hash` | *str* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 |
-| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
-| `key_name` | *str* | :heavy_check_mark: | Name of the API key | Production Key |
-| `key_label` | *str* | :heavy_check_mark: | Label of the API key | prod-key |
-| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
\ No newline at end of file
diff --git a/docs/operations/listguardrailkeyassignmentsrequest.md b/docs/operations/listguardrailkeyassignmentsrequest.md
index e78c271..1873ab9 100644
--- a/docs/operations/listguardrailkeyassignmentsrequest.md
+++ b/docs/operations/listguardrailkeyassignmentsrequest.md
@@ -9,5 +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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
\ No newline at end of file
+| `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
diff --git a/docs/operations/listguardrailkeyassignmentsresponse.md b/docs/operations/listguardrailkeyassignmentsresponse.md
index 90844cf..3ce3be7 100644
--- a/docs/operations/listguardrailkeyassignmentsresponse.md
+++ b/docs/operations/listguardrailkeyassignmentsresponse.md
@@ -1,11 +1,8 @@
# ListGuardrailKeyAssignmentsResponse
-List of key assignments
-
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
-| `data` | List[[operations.ListGuardrailKeyAssignmentsData](../operations/listguardrailkeyassignmentsdata.md)] | :heavy_check_mark: | List of key assignments | |
-| `total_count` | *float* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.ListKeyAssignmentsResponse](../components/listkeyassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"id": "550e8400-e29b-41d4-a716-446655440000",
"key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93",
"key_label": "prod-key",
"key_name": "Production Key"
}
],
"total_count": 1
} |
\ No newline at end of file
diff --git a/docs/operations/listguardrailmemberassignmentsdata.md b/docs/operations/listguardrailmemberassignmentsdata.md
deleted file mode 100644
index 9b3be4f..0000000
--- a/docs/operations/listguardrailmemberassignmentsdata.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ListGuardrailMemberAssignmentsData
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
-| `user_id` | *str* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 |
-| `organization_id` | *str* | :heavy_check_mark: | Organization ID | org_xyz789 |
-| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
-| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
\ No newline at end of file
diff --git a/docs/operations/listguardrailmemberassignmentsrequest.md b/docs/operations/listguardrailmemberassignmentsrequest.md
index 2ebeffb..962eb0c 100644
--- a/docs/operations/listguardrailmemberassignmentsrequest.md
+++ b/docs/operations/listguardrailmemberassignmentsrequest.md
@@ -9,5 +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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
\ No newline at end of file
+| `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
diff --git a/docs/operations/listguardrailmemberassignmentsresponse.md b/docs/operations/listguardrailmemberassignmentsresponse.md
index ae1be1a..766effb 100644
--- a/docs/operations/listguardrailmemberassignmentsresponse.md
+++ b/docs/operations/listguardrailmemberassignmentsresponse.md
@@ -1,11 +1,8 @@
# ListGuardrailMemberAssignmentsResponse
-List of member assignments
-
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
-| `data` | List[[operations.ListGuardrailMemberAssignmentsData](../operations/listguardrailmemberassignmentsdata.md)] | :heavy_check_mark: | List of member assignments | |
-| `total_count` | *float* | :heavy_check_mark: | Total number of member assignments | 10 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.ListMemberAssignmentsResponse](../components/listmemberassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "org_xyz789",
"user_id": "user_abc123"
}
],
"total_count": 1
} |
\ No newline at end of file
diff --git a/docs/operations/listguardrailsdata.md b/docs/operations/listguardrailsdata.md
deleted file mode 100644
index 4b94ae2..0000000
--- a/docs/operations/listguardrailsdata.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# ListGuardrailsData
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
-| `reset_interval` | [OptionalNullable[operations.ListGuardrailsResetInterval]](../operations/listguardrailsresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
\ No newline at end of file
diff --git a/docs/operations/listguardrailsrequest.md b/docs/operations/listguardrailsrequest.md
index 598440f..65946b1 100644
--- a/docs/operations/listguardrailsrequest.md
+++ b/docs/operations/listguardrailsrequest.md
@@ -8,5 +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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
\ No newline at end of file
+| `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
diff --git a/docs/operations/listguardrailsresetinterval.md b/docs/operations/listguardrailsresetinterval.md
deleted file mode 100644
index 0c651fc..0000000
--- a/docs/operations/listguardrailsresetinterval.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# ListGuardrailsResetInterval
-
-Interval at which the limit resets (daily, weekly, monthly)
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `DAILY` | daily |
-| `WEEKLY` | weekly |
-| `MONTHLY` | monthly |
\ No newline at end of file
diff --git a/docs/operations/listguardrailsresponse.md b/docs/operations/listguardrailsresponse.md
index ceb6728..3046aeb 100644
--- a/docs/operations/listguardrailsresponse.md
+++ b/docs/operations/listguardrailsresponse.md
@@ -1,11 +1,8 @@
# ListGuardrailsResponse
-List of guardrails
-
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
-| `data` | List[[operations.ListGuardrailsData](../operations/listguardrailsdata.md)] | :heavy_check_mark: | List of guardrails | |
-| `total_count` | *float* | :heavy_check_mark: | Total number of guardrails | 25 |
\ 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"
],
"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
diff --git a/docs/operations/listkeyassignmentsdata.md b/docs/operations/listkeyassignmentsdata.md
deleted file mode 100644
index fa93d0d..0000000
--- a/docs/operations/listkeyassignmentsdata.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# ListKeyAssignmentsData
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
-| `key_hash` | *str* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 |
-| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
-| `key_name` | *str* | :heavy_check_mark: | Name of the API key | Production Key |
-| `key_label` | *str* | :heavy_check_mark: | Label of the API key | prod-key |
-| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
\ No newline at end of file
diff --git a/docs/operations/listkeyassignmentsrequest.md b/docs/operations/listkeyassignmentsrequest.md
index c3db738..4902d03 100644
--- a/docs/operations/listkeyassignmentsrequest.md
+++ b/docs/operations/listkeyassignmentsrequest.md
@@ -8,5 +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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
\ No newline at end of file
+| `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
diff --git a/docs/operations/listkeyassignmentsresponse.md b/docs/operations/listkeyassignmentsresponse.md
index 9f6529c..a083a11 100644
--- a/docs/operations/listkeyassignmentsresponse.md
+++ b/docs/operations/listkeyassignmentsresponse.md
@@ -1,11 +1,8 @@
# ListKeyAssignmentsResponse
-List of key assignments
-
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
-| `data` | List[[operations.ListKeyAssignmentsData](../operations/listkeyassignmentsdata.md)] | :heavy_check_mark: | List of key assignments | |
-| `total_count` | *float* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.ListKeyAssignmentsResponse](../components/listkeyassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"id": "550e8400-e29b-41d4-a716-446655440000",
"key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93",
"key_label": "prod-key",
"key_name": "Production Key"
}
],
"total_count": 1
} |
\ No newline at end of file
diff --git a/docs/operations/listmemberassignmentsdata.md b/docs/operations/listmemberassignmentsdata.md
deleted file mode 100644
index 9d95d1e..0000000
--- a/docs/operations/listmemberassignmentsdata.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# ListMemberAssignmentsData
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
-| `user_id` | *str* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 |
-| `organization_id` | *str* | :heavy_check_mark: | Organization ID | org_xyz789 |
-| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
-| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
\ No newline at end of file
diff --git a/docs/operations/listmemberassignmentsrequest.md b/docs/operations/listmemberassignmentsrequest.md
index 61416c7..e58ec65 100644
--- a/docs/operations/listmemberassignmentsrequest.md
+++ b/docs/operations/listmemberassignmentsrequest.md
@@ -8,5 +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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
\ No newline at end of file
+| `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
diff --git a/docs/operations/listmemberassignmentsresponse.md b/docs/operations/listmemberassignmentsresponse.md
index 6a05f64..6ee5e60 100644
--- a/docs/operations/listmemberassignmentsresponse.md
+++ b/docs/operations/listmemberassignmentsresponse.md
@@ -1,11 +1,8 @@
# ListMemberAssignmentsResponse
-List of member assignments
-
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
-| `data` | List[[operations.ListMemberAssignmentsData](../operations/listmemberassignmentsdata.md)] | :heavy_check_mark: | List of member assignments | |
-| `total_count` | *float* | :heavy_check_mark: | Total number of member assignments | 10 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `result` | [components.ListMemberAssignmentsResponse](../components/listmemberassignmentsresponse.md) | :heavy_check_mark: | N/A | {
"data": [
{
"assigned_by": "user_abc123",
"created_at": "2025-08-24T10:30:00Z",
"guardrail_id": "550e8400-e29b-41d4-a716-446655440001",
"id": "550e8400-e29b-41d4-a716-446655440000",
"organization_id": "org_xyz789",
"user_id": "user_abc123"
}
],
"total_count": 1
} |
\ No newline at end of file
diff --git a/docs/operations/listprovidersdata.md b/docs/operations/listprovidersdata.md
index ec9b21b..5179c87 100644
--- a/docs/operations/listprovidersdata.md
+++ b/docs/operations/listprovidersdata.md
@@ -5,10 +5,10 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
-| `name` | *str* | :heavy_check_mark: | Display name of the provider | OpenAI |
-| `slug` | *str* | :heavy_check_mark: | URL-friendly identifier for the provider | openai |
-| `privacy_policy_url` | *Nullable[str]* | :heavy_check_mark: | URL to the provider's privacy policy | https://openai.com/privacy |
-| `terms_of_service_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's terms of service | https://openai.com/terms |
-| `status_page_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's status page | https://status.openai.com |
+| `datacenters` | List[[operations.Datacenter](../operations/datacenter.md)] | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country codes of the provider datacenter locations | [
"US",
"IE"
] |
| `headquarters` | [OptionalNullable[operations.Headquarters]](../operations/headquarters.md) | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country code of the provider headquarters | US |
-| `datacenters` | List[[operations.Datacenter](../operations/datacenter.md)] | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country codes of the provider datacenter locations | [
"US",
"IE"
] |
\ No newline at end of file
+| `name` | *str* | :heavy_check_mark: | Display name of the provider | OpenAI |
+| `privacy_policy_url` | *Nullable[str]* | :heavy_check_mark: | URL to the provider's privacy policy | https://openai.com/privacy |
+| `slug` | *str* | :heavy_check_mark: | URL-friendly identifier for the provider | openai |
+| `status_page_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's status page | https://status.openai.com |
+| `terms_of_service_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's terms of service | https://openai.com/terms |
\ No newline at end of file
diff --git a/docs/operations/listrequest.md b/docs/operations/listrequest.md
index 0118178..5507b0a 100644
--- a/docs/operations/listrequest.md
+++ b/docs/operations/listrequest.md
@@ -8,5 +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.
| |
-| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
\ No newline at end of file
+| `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
diff --git a/docs/operations/providername.md b/docs/operations/providername.md
deleted file mode 100644
index 5bff3c0..0000000
--- a/docs/operations/providername.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# ProviderName
-
-
-## Values
-
-| Name | Value |
-| ------------------- | ------------------- |
-| `ANY_SCALE` | AnyScale |
-| `ATOMA` | Atoma |
-| `CENT_ML` | Cent-ML |
-| `CROF_AI` | CrofAI |
-| `ENFER` | Enfer |
-| `GO_POMELO` | GoPomelo |
-| `HUGGING_FACE` | HuggingFace |
-| `HYPERBOLIC_2` | Hyperbolic 2 |
-| `INO_CLOUD` | InoCloud |
-| `KLUSTER` | Kluster |
-| `LAMBDA` | Lambda |
-| `LEPTON` | Lepton |
-| `LYNN_2` | Lynn 2 |
-| `LYNN` | Lynn |
-| `MANCER` | Mancer |
-| `META` | Meta |
-| `MODAL` | Modal |
-| `NINETEEN` | Nineteen |
-| `OCTO_AI` | OctoAI |
-| `RECURSAL` | Recursal |
-| `REFLECTION` | Reflection |
-| `REPLICATE` | Replicate |
-| `SAMBA_NOVA_2` | SambaNova 2 |
-| `SF_COMPUTE` | SF Compute |
-| `TARGON` | Targon |
-| `TOGETHER_2` | Together 2 |
-| `UBICLOUD` | Ubicloud |
-| `ONE_DOT_AI` | 01.AI |
-| `AKASH_ML` | AkashML |
-| `AI21` | AI21 |
-| `AION_LABS` | AionLabs |
-| `ALIBABA` | Alibaba |
-| `AMBIENT` | Ambient |
-| `AMAZON_BEDROCK` | Amazon Bedrock |
-| `AMAZON_NOVA` | Amazon Nova |
-| `ANTHROPIC` | Anthropic |
-| `ARCEE_AI` | Arcee AI |
-| `ATLAS_CLOUD` | AtlasCloud |
-| `AVIAN` | Avian |
-| `AZURE` | Azure |
-| `BASE_TEN` | BaseTen |
-| `BYTE_PLUS` | BytePlus |
-| `BLACK_FOREST_LABS` | Black Forest Labs |
-| `CEREBRAS` | Cerebras |
-| `CHUTES` | Chutes |
-| `CIRRASCALE` | Cirrascale |
-| `CLARIFAI` | Clarifai |
-| `CLOUDFLARE` | Cloudflare |
-| `COHERE` | Cohere |
-| `CRUSOE` | Crusoe |
-| `DEEP_INFRA` | DeepInfra |
-| `DEEP_SEEK` | DeepSeek |
-| `FEATHERLESS` | Featherless |
-| `FIREWORKS` | Fireworks |
-| `FRIENDLI` | Friendli |
-| `GMI_CLOUD` | GMICloud |
-| `GOOGLE` | Google |
-| `GOOGLE_AI_STUDIO` | Google AI Studio |
-| `GROQ` | Groq |
-| `HYPERBOLIC` | Hyperbolic |
-| `INCEPTION` | Inception |
-| `INCEPTRON` | Inceptron |
-| `INFERENCE_NET` | InferenceNet |
-| `IONSTREAM` | Ionstream |
-| `INFERMATIC` | Infermatic |
-| `IO_NET` | Io Net |
-| `INFLECTION` | Inflection |
-| `LIQUID` | Liquid |
-| `MARA` | Mara |
-| `MANCER_2` | Mancer 2 |
-| `MINIMAX` | Minimax |
-| `MODEL_RUN` | ModelRun |
-| `MISTRAL` | Mistral |
-| `MODULAR` | Modular |
-| `MOONSHOT_AI` | Moonshot AI |
-| `MORPH` | Morph |
-| `N_COMPASS` | NCompass |
-| `NEBIUS` | Nebius |
-| `NEXT_BIT` | NextBit |
-| `NOVITA` | Novita |
-| `NVIDIA` | Nvidia |
-| `OPEN_AI` | OpenAI |
-| `OPEN_INFERENCE` | OpenInference |
-| `PARASAIL` | Parasail |
-| `PERPLEXITY` | Perplexity |
-| `PHALA` | Phala |
-| `REKA` | Reka |
-| `RELACE` | Relace |
-| `SAMBA_NOVA` | SambaNova |
-| `SEED` | Seed |
-| `SILICON_FLOW` | SiliconFlow |
-| `SOURCEFUL` | Sourceful |
-| `STEP_FUN` | StepFun |
-| `STEALTH` | Stealth |
-| `STREAM_LAKE` | StreamLake |
-| `SWITCHPOINT` | Switchpoint |
-| `TOGETHER` | Together |
-| `UPSTAGE` | Upstage |
-| `VENICE` | Venice |
-| `WAND_B` | WandB |
-| `XIAOMI` | Xiaomi |
-| `X_AI` | xAI |
-| `Z_AI` | Z.AI |
-| `FAKE_PROVIDER` | FakeProvider |
\ No newline at end of file
diff --git a/docs/operations/providerresponse.md b/docs/operations/providerresponse.md
deleted file mode 100644
index cd0f8fb..0000000
--- a/docs/operations/providerresponse.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# ProviderResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
-| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `endpoint_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `model_permaslug` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `provider_name` | [Optional[operations.ProviderName]](../operations/providername.md) | :heavy_minus_sign: | N/A |
-| `status` | *Nullable[float]* | :heavy_check_mark: | N/A |
-| `latency` | *Optional[float]* | :heavy_minus_sign: | N/A |
-| `is_byok` | *Optional[bool]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/docs/operations/ratelimit.md b/docs/operations/ratelimit.md
index 635db2a..eeed372 100644
--- a/docs/operations/ratelimit.md
+++ b/docs/operations/ratelimit.md
@@ -9,6 +9,6 @@ Legacy rate limit information about a key. Will always return -1.
| Field | Type | Required | Description | Example |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
-| `requests` | *float* | :heavy_check_mark: | Number of requests allowed per interval | 1000 |
| `interval` | *str* | :heavy_check_mark: | Rate limit interval | 1h |
-| `note` | *str* | :heavy_check_mark: | Note about the rate limit | This field is deprecated and safe to ignore. |
\ No newline at end of file
+| `note` | *str* | :heavy_check_mark: | Note about the rate limit | This field is deprecated and safe to ignore. |
+| `requests` | *int* | :heavy_check_mark: | Number of requests allowed per interval | 1000 |
\ No newline at end of file
diff --git a/docs/operations/sendchatcompletionrequestrequest.md b/docs/operations/sendchatcompletionrequestrequest.md
index 2150e2f..f0a096f 100644
--- a/docs/operations/sendchatcompletionrequestrequest.md
+++ b/docs/operations/sendchatcompletionrequestrequest.md
@@ -8,4 +8,4 @@
| `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.
| |
-| `chat_request` | [components.ChatRequest](../components/chatrequest.md) | :heavy_check_mark: | N/A | {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the capital of France?"
}
],
"model": "openai/gpt-4",
"temperature": 0.7,
"max_tokens": 150
} |
\ No newline at end of file
+| `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
index 4c84044..ff4ce98 100644
--- a/docs/operations/sendchatcompletionrequestresponsebody.md
+++ b/docs/operations/sendchatcompletionrequestresponsebody.md
@@ -7,4 +7,4 @@ Successful chat completion response
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [components.ChatStreamChunk](../components/chatstreamchunk.md) | :heavy_check_mark: | Streaming chat completion chunk | {
"id": "chatcmpl-123",
"object": "chat.completion.chunk",
"created": 1677652288,
"model": "openai/gpt-4",
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "Hello"
},
"finish_reason": null
}
]
} |
\ No newline at end of file
+| `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/updateguardraildata.md b/docs/operations/updateguardraildata.md
deleted file mode 100644
index 2a97bda..0000000
--- a/docs/operations/updateguardraildata.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# UpdateGuardrailData
-
-The updated guardrail
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
-| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalResponse]](../operations/updateguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
-| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
\ No newline at end of file
diff --git a/docs/operations/updateguardrailrequest.md b/docs/operations/updateguardrailrequest.md
index 7ccfb1e..58ac81b 100644
--- a/docs/operations/updateguardrailrequest.md
+++ b/docs/operations/updateguardrailrequest.md
@@ -9,4 +9,4 @@
| `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.
| |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
-| `request_body` | [operations.UpdateGuardrailRequestBody](../operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated Guardrail Name",
"description": "Updated description",
"limit_usd": 75,
"reset_interval": "weekly"
} |
\ No newline at end of file
+| `update_guardrail_request` | [components.UpdateGuardrailRequest](../components/updateguardrailrequest.md) | :heavy_check_mark: | N/A | {
"description": "Updated description",
"limit_usd": 75,
"name": "Updated Guardrail Name",
"reset_interval": "weekly"
} |
\ No newline at end of file
diff --git a/docs/operations/updateguardrailrequestbody.md b/docs/operations/updateguardrailrequestbody.md
deleted file mode 100644
index 9365423..0000000
--- a/docs/operations/updateguardrailrequestbody.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# UpdateGuardrailRequestBody
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
-| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true |
\ No newline at end of file
diff --git a/docs/operations/updateguardrailresetintervalrequest.md b/docs/operations/updateguardrailresetintervalrequest.md
deleted file mode 100644
index b48624a..0000000
--- a/docs/operations/updateguardrailresetintervalrequest.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# UpdateGuardrailResetIntervalRequest
-
-Interval at which the limit resets (daily, weekly, monthly)
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `DAILY` | daily |
-| `WEEKLY` | weekly |
-| `MONTHLY` | monthly |
\ No newline at end of file
diff --git a/docs/operations/updateguardrailresetintervalresponse.md b/docs/operations/updateguardrailresetintervalresponse.md
deleted file mode 100644
index 64ccf85..0000000
--- a/docs/operations/updateguardrailresetintervalresponse.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# UpdateGuardrailResetIntervalResponse
-
-Interval at which the limit resets (daily, weekly, monthly)
-
-
-## Values
-
-| Name | Value |
-| --------- | --------- |
-| `DAILY` | daily |
-| `WEEKLY` | weekly |
-| `MONTHLY` | monthly |
\ No newline at end of file
diff --git a/docs/operations/updateguardrailresponse.md b/docs/operations/updateguardrailresponse.md
deleted file mode 100644
index 19b1364..0000000
--- a/docs/operations/updateguardrailresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# UpdateGuardrailResponse
-
-Guardrail updated successfully
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.UpdateGuardrailData](../operations/updateguardraildata.md) | :heavy_check_mark: | The updated guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} |
\ No newline at end of file
diff --git a/docs/operations/updatekeysdata.md b/docs/operations/updatekeysdata.md
index 9eec6b5..ba44333 100644
--- a/docs/operations/updatekeysdata.md
+++ b/docs/operations/updatekeysdata.md
@@ -7,23 +7,23 @@ The updated API key information
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
-| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
-| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
-| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
-| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
-| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
-| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
-| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
-| `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_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 |
-| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 |
| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 |
| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 |
-| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
+| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z |
-| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
+| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z |
-| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 |
\ No newline at end of file
+| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
+| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
+| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
+| `limit` | *float* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
+| `limit_remaining` | *float* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
+| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
+| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
+| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z |
+| `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
diff --git a/docs/operations/updatekeysrequest.md b/docs/operations/updatekeysrequest.md
index 75e5838..1e35e33 100644
--- a/docs/operations/updatekeysrequest.md
+++ b/docs/operations/updatekeysrequest.md
@@ -9,4 +9,4 @@
| `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.
| |
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
-| `request_body` | [operations.UpdateKeysRequestBody](../operations/updatekeysrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated API Key Name",
"disabled": false,
"limit": 75,
"limit_reset": "daily",
"include_byok_in_limit": true
} |
\ No newline at end of file
+| `request_body` | [operations.UpdateKeysRequestBody](../operations/updatekeysrequestbody.md) | :heavy_check_mark: | N/A | {
"disabled": false,
"include_byok_in_limit": true,
"limit": 75,
"limit_reset": "daily",
"name": "Updated API Key Name"
} |
\ No newline at end of file
diff --git a/docs/operations/updatekeysrequestbody.md b/docs/operations/updatekeysrequestbody.md
index 8d8ebb1..223702c 100644
--- a/docs/operations/updatekeysrequestbody.md
+++ b/docs/operations/updatekeysrequestbody.md
@@ -5,8 +5,8 @@
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the API key | Updated API Key Name |
| `disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to disable the API key | false |
-| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 |
+| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
+| `limit` | *Optional[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 |
| `limit_reset` | [OptionalNullable[operations.UpdateKeysLimitReset]](../operations/updatekeyslimitreset.md) | :heavy_minus_sign: | New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | daily |
-| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
\ No newline at end of file
+| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the API key | Updated API Key Name |
\ No newline at end of file
diff --git a/docs/operations/updatekeysresponse.md b/docs/operations/updatekeysresponse.md
index bf4c261..c1dde7c 100644
--- a/docs/operations/updatekeysresponse.md
+++ b/docs/operations/updatekeysresponse.md
@@ -7,4 +7,4 @@ API key updated successfully
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"
} |
\ No newline at end of file
+| `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
diff --git a/docs/operations/usage.md b/docs/operations/usage.md
deleted file mode 100644
index 90e9361..0000000
--- a/docs/operations/usage.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Usage
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------ | ------------------ | ------------------ | ------------------ |
-| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
-| `total_tokens` | *float* | :heavy_check_mark: | N/A |
-| `cost` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md
index 91805c7..44f7812 100644
--- a/docs/sdks/analytics/README.md
+++ b/docs/sdks/analytics/README.md
@@ -42,11 +42,13 @@ with OpenRouter(
| `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.
| |
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
+| `api_key_hash` | *Optional[str]* | :heavy_minus_sign: | Filter by API key hash (SHA-256 hex string, as returned by the keys API). | abc123def456... |
+| `user_id` | *Optional[str]* | :heavy_minus_sign: | Filter by org member user ID. Only applicable for organization accounts. | user_abc123 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
-**[operations.GetUserActivityResponse](../../operations/getuseractivityresponse.md)**
+**[components.ActivityResponse](../../components/activityresponse.md)**
### Errors
@@ -55,5 +57,6 @@ with OpenRouter(
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
+| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md
index d072fdd..83c2e81 100644
--- a/docs/sdks/apikeys/README.md
+++ b/docs/sdks/apikeys/README.md
@@ -6,12 +6,59 @@ API key management endpoints
### Available Operations
+* [get_current_key_metadata](#get_current_key_metadata) - Get current API key
* [list](#list) - List API keys
* [create](#create) - Create a new API key
-* [update](#update) - Update an API key
* [delete](#delete) - Delete an API key
* [get](#get) - Get a single API key
-* [get_current_key_metadata](#get_current_key_metadata) - Get current API key
+* [update](#update) - Update an API key
+
+## get_current_key_metadata
+
+Get information on the API key associated with the current authentication session
+
+### 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.api_keys.get_current_key_metadata()
+
+ # Handle response
+ print(res)
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `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
+
+**[operations.GetCurrentKeyResponse](../../operations/getcurrentkeyresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
## list
@@ -46,8 +93,8 @@ 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.
| |
-| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
+| `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 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -72,6 +119,7 @@ Create a new API key for the authenticated user. [Management key](/docs/guides/o
```python
from openrouter import OpenRouter
+from openrouter.utils import parse_datetime
import os
@@ -82,7 +130,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.api_keys.create(name="My New API Key")
+ res = open_router.api_keys.create(name="My New API Key", expires_at=parse_datetime("2027-12-31T23:59:59Z"), include_byok_in_limit=True, limit=50, limit_reset="monthly")
# Handle response
print(res)
@@ -97,10 +145,11 @@ 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.
| |
-| `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 |
-| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
+| `creator_user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. | user_2dHFtVWx2n56w6HkM0000000000 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
+| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
+| `limit` | *Optional[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 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -117,62 +166,6 @@ with OpenRouter(
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-## update
-
-Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
-### 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.api_keys.update(hash="f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943")
-
- # Handle response
- print(res)
-
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
-| `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.
| |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the API key | Updated API Key Name |
-| `disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to disable the API key | false |
-| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 |
-| `limit_reset` | [OptionalNullable[operations.UpdateKeysLimitReset]](../../operations/updatekeyslimitreset.md) | :heavy_minus_sign: | New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | daily |
-| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
-
-### Response
-
-**[operations.UpdateKeysResponse](../../operations/updatekeysresponse.md)**
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ----------------------------------- | ----------------------------------- | ----------------------------------- |
-| errors.BadRequestResponseError | 400 | application/json |
-| errors.UnauthorizedResponseError | 401 | application/json |
-| errors.NotFoundResponseError | 404 | application/json |
-| errors.TooManyRequestsResponseError | 429 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-
## delete
Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -273,13 +266,13 @@ with OpenRouter(
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-## get_current_key_metadata
+## update
-Get information on the API key associated with the current authentication session
+Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
### Example Usage
-
+
```python
from openrouter import OpenRouter
import os
@@ -292,7 +285,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.api_keys.get_current_key_metadata()
+ res = open_router.api_keys.update(hash="f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", disabled=False, include_byok_in_limit=True, limit=75, limit_reset="daily", name="Updated API Key Name")
# Handle response
print(res)
@@ -301,21 +294,30 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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. |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
+| `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.
| |
+| `disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to disable the API key | false |
+| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
+| `limit` | *Optional[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 |
+| `limit_reset` | [OptionalNullable[operations.UpdateKeysLimitReset]](../../operations/updatekeyslimitreset.md) | :heavy_minus_sign: | New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | daily |
+| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the API key | Updated API Key Name |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
-**[operations.GetCurrentKeyResponse](../../operations/getcurrentkeyresponse.md)**
+**[operations.UpdateKeysResponse](../../operations/updatekeysresponse.md)**
### Errors
-| Error Type | Status Code | Content Type |
-| ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| errors.UnauthorizedResponseError | 401 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
+| Error Type | Status Code | Content Type |
+| ----------------------------------- | ----------------------------------- | ----------------------------------- |
+| errors.BadRequestResponseError | 400 | application/json |
+| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.NotFoundResponseError | 404 | application/json |
+| errors.TooManyRequestsResponseError | 429 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md
index c28f38d..df4d756 100644
--- a/docs/sdks/chat/README.md
+++ b/docs/sdks/chat/README.md
@@ -27,14 +27,14 @@ with OpenRouter(
res = open_router.chat.send(messages=[
{
- "role": "system",
"content": "You are a helpful assistant.",
+ "role": "system",
},
{
- "role": "user",
"content": "What is the capital of France?",
+ "role": "user",
},
- ], stream=False, temperature=0.7, top_p=1)
+ ], max_tokens=150, model="openai/gpt-4", stream=False, temperature=0.7)
with res as event_stream:
for event in event_stream:
@@ -47,41 +47,41 @@ with OpenRouter(
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `messages` | List[[components.ChatMessages](../../components/chatmessages.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"role": "user",
"content": "Hello!"
}
] |
+| `messages` | List[[components.ChatMessages](../../components/chatmessages.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"content": "Hello!",
"role": "user"
}
] |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `provider` | [OptionalNullable[components.ChatRequestProvider]](../../components/chatrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
-| `plugins` | List[[components.ChatRequestPluginUnion](../../components/chatrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
-| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | user-123 |
-| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `trace` | [Optional[components.ChatRequestTrace]](../../components/chatrequesttrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | |
-| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | openai/gpt-4 |
-| `models` | List[*str*] | :heavy_minus_sign: | Models to use for completion | [
"openai/gpt-4",
"openai/gpt-4o"
] |
-| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 |
+| `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` | *Optional[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 |
+| `image_config` | Dict[str, [components.ChatRequestImageConfig](../../components/chatrequestimageconfig.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"
} |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | {
"50256": -100
} |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | false |
-| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 |
-| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | 100 |
-| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. | 100 |
-| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"user_id": "user-123",
"session_id": "session-456"
} |
-| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 |
+| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum tokens in completion | 100 |
+| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. | 100 |
+| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"session_id": "session-456",
"user_id": "user-123"
} |
+| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text", "image", and "audio". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | openai/gpt-4 |
+| `models` | List[*str*] | :heavy_minus_sign: | Models to use for completion | [
"openai/gpt-4",
"openai/gpt-4o"
] |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. | true |
+| `plugins` | List[[components.ChatRequestPlugin](../../components/chatrequestplugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | {
"allow_fallbacks": true
} |
| `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | Configuration options for reasoning models | {
"effort": "medium",
"summary": "concise"
} |
| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | Response format configuration | {
"type": "json_object"
} |
-| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | 42 |
+| `seed` | *Optional[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | 42 |
+| `service_tier` | [OptionalNullable[components.ChatRequestServiceTier]](../../components/chatrequestservicetier.md) | :heavy_minus_sign: | The service tier to use for processing this request. | auto |
+| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | [
""
] |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | Enable streaming response | false |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | Streaming configuration options | {
"include_usage": true
} |
-| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 |
| `tool_choice` | [Optional[components.ChatToolChoice]](../../components/chattoolchoice.md) | :heavy_minus_sign: | Tool choice configuration | auto |
-| `tools` | List[[components.ChatFunctionTool](../../components/chatfunctiontool.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather"
}
}
] |
-| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 |
-| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} |
-| `image_config` | Dict[str, [components.ChatRequestImageConfig](../../components/chatrequestimageconfig.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"
} |
-| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text", "image", and "audio". | [
"text",
"image"
] |
-| `cache_control` | [Optional[components.CacheControl]](../../components/cachecontrol.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | |
-| `service_tier` | [OptionalNullable[components.ChatRequestServiceTier]](../../components/chatrequestservicetier.md) | :heavy_minus_sign: | The service tier to use for processing this request. | auto |
+| `tools` | List[[components.ChatFunctionTool](../../components/chatfunctiontool.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"function": {
"description": "Get weather",
"name": "get_weather"
},
"type": "function"
}
] |
+| `top_logprobs` | *Optional[int]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 |
+| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | user-123 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/credits/README.md b/docs/sdks/credits/README.md
index 59bb0ab..1837ff5 100644
--- a/docs/sdks/credits/README.md
+++ b/docs/sdks/credits/README.md
@@ -7,7 +7,6 @@ Credit management endpoints
### Available Operations
* [get_credits](#get_credits) - Get remaining credits
-* [~~create_coinbase_charge~~](#create_coinbase_charge) - Deprecated Coinbase Commerce charge endpoint :warning: **Deprecated**
## get_credits
@@ -55,45 +54,4 @@ with OpenRouter(
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-
-## ~~create_coinbase_charge~~
-
-Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead.
-
-> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
-
-### Example Usage
-
-
-```python
-from openrouter import OpenRouter
-
-
-with OpenRouter(
- http_referer="",
- x_open_router_title="",
- x_open_router_categories="",
-) as open_router:
-
- open_router.credits.create_coinbase_charge()
-
- # Use the SDK ...
-
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `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. |
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ----------------------------- | ----------------------------- | ----------------------------- |
-| errors.GoneResponseError | 410 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/docs/sdks/embeddings/README.md b/docs/sdks/embeddings/README.md
index 0fb3077..b649f5b 100644
--- a/docs/sdks/embeddings/README.md
+++ b/docs/sdks/embeddings/README.md
@@ -28,7 +28,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.embeddings.generate(input="", model="Taurus")
+ res = open_router.embeddings.generate(input="The quick brown fox jumps over the lazy dog", model="openai/text-embedding-3-small")
# Handle response
print(res)
@@ -37,19 +37,19 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | N/A |
-| `model` | *str* | :heavy_check_mark: | N/A |
-| `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.
|
-| `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
-| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
-| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `provider` | [Optional[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
-| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `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 |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog |
+| `model` | *str* | :heavy_check_mark: | The model to use for embeddings | openai/text-embedding-3-small |
+| `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.
| |
+| `dimensions` | *Optional[int]* | :heavy_minus_sign: | The number of dimensions for the output embeddings | 1536 |
+| `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | The format of the output embeddings | float |
+| `input_type` | *Optional[str]* | :heavy_minus_sign: | The type of input (e.g. search_query, search_document) | search_query |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | N/A | {
"allow_fallbacks": true
} |
+| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the end-user | user-1234 |
+| `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/endpoints/README.md b/docs/sdks/endpoints/README.md
index 598fc20..2ce96e9 100644
--- a/docs/sdks/endpoints/README.md
+++ b/docs/sdks/endpoints/README.md
@@ -6,57 +6,8 @@ Endpoint information
### Available Operations
-* [list](#list) - List all endpoints for a model
* [list_zdr_endpoints](#list_zdr_endpoints) - Preview the impact of ZDR on the available endpoints
-
-## list
-
-List all endpoints for a model
-
-### 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.endpoints.list(author="", slug="")
-
- # Handle response
- print(res)
-
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `author` | *str* | :heavy_check_mark: | N/A |
-| `slug` | *str* | :heavy_check_mark: | N/A |
-| `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
-
-**[operations.ListEndpointsResponse](../../operations/listendpointsresponse.md)**
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| errors.NotFoundResponseError | 404 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+* [list](#list) - List all endpoints for a model
## list_zdr_endpoints
@@ -102,4 +53,53 @@ with OpenRouter(
| Error Type | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
+## list
+
+List all endpoints for a model
+
+### 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.endpoints.list(author="openai", slug="gpt-4")
+
+ # Handle response
+ print(res)
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `author` | *str* | :heavy_check_mark: | The author/organization of the model | openai |
+| `slug` | *str* | :heavy_check_mark: | The model slug | gpt-4 |
+| `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
+
+**[operations.ListEndpointsResponse](../../operations/listendpointsresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.NotFoundResponseError | 404 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/docs/sdks/generations/README.md b/docs/sdks/generations/README.md
index bf57d21..332b568 100644
--- a/docs/sdks/generations/README.md
+++ b/docs/sdks/generations/README.md
@@ -27,7 +27,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.generations.get_generation(id="")
+ res = open_router.generations.get_generation(id="gen-1234567890")
# Handle response
print(res)
@@ -36,13 +36,13 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | N/A |
-| `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. |
+| 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
diff --git a/docs/sdks/guardrails/README.md b/docs/sdks/guardrails/README.md
index fdcde88..6f3a20f 100644
--- a/docs/sdks/guardrails/README.md
+++ b/docs/sdks/guardrails/README.md
@@ -8,17 +8,17 @@ Guardrails endpoints
* [list](#list) - List guardrails
* [create](#create) - Create a guardrail
+* [delete](#delete) - Delete a guardrail
* [get](#get) - Get a guardrail
* [update](#update) - Update a guardrail
-* [delete](#delete) - Delete a guardrail
-* [list_key_assignments](#list_key_assignments) - List all key assignments
-* [list_member_assignments](#list_member_assignments) - List all member assignments
* [list_guardrail_key_assignments](#list_guardrail_key_assignments) - List key assignments for a guardrail
* [bulk_assign_keys](#bulk_assign_keys) - Bulk assign keys to a guardrail
+* [bulk_unassign_keys](#bulk_unassign_keys) - Bulk unassign keys from a guardrail
* [list_guardrail_member_assignments](#list_guardrail_member_assignments) - List member assignments for a guardrail
* [bulk_assign_members](#bulk_assign_members) - Bulk assign members to a guardrail
-* [bulk_unassign_keys](#bulk_unassign_keys) - Bulk unassign keys from a guardrail
* [bulk_unassign_members](#bulk_unassign_members) - Bulk unassign members from a guardrail
+* [list_key_assignments](#list_key_assignments) - List all key assignments
+* [list_member_assignments](#list_member_assignments) - List all member assignments
## list
@@ -41,8 +41,10 @@ with OpenRouter(
res = open_router.guardrails.list()
- # Handle response
- print(res)
+ while res is not None:
+ # Handle items
+
+ res = res.next()
```
@@ -53,8 +55,8 @@ 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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
+| `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 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -88,7 +90,11 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.guardrails.create(name="My New Guardrail")
+ res = open_router.guardrails.create(name="My New Guardrail", allowed_models=None, allowed_providers=[
+ "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")
# Handle response
print(res)
@@ -103,124 +109,19 @@ 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.
| |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
-| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
-| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] |
| `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 |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
-
-### Response
-
-**[operations.CreateGuardrailResponse](../../operations/createguardrailresponse.md)**
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| errors.BadRequestResponseError | 400 | application/json |
-| errors.UnauthorizedResponseError | 401 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-
-## get
-
-Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
-### 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.guardrails.get(id="550e8400-e29b-41d4-a716-446655440000")
-
- # Handle response
- print(res)
-
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 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.
| |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
-
-### Response
-
-**[operations.GetGuardrailResponse](../../operations/getguardrailresponse.md)**
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| errors.UnauthorizedResponseError | 401 | application/json |
-| errors.NotFoundResponseError | 404 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-
-## update
-
-Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
-### 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.guardrails.update(id="550e8400-e29b-41d4-a716-446655440000")
-
- # Handle response
- print(res)
-
-```
-
-### 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.
| |
-| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
-| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
-| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
-| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
-| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] |
+| `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"
] |
-| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] |
-| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true |
+| `limit_usd` | *Optional[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. | |
### Response
-**[operations.UpdateGuardrailResponse](../../operations/updateguardrailresponse.md)**
+**[components.CreateGuardrailResponse](../../components/createguardrailresponse.md)**
### Errors
@@ -228,7 +129,6 @@ with OpenRouter(
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
-| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
@@ -270,7 +170,7 @@ with OpenRouter(
### Response
-**[operations.DeleteGuardrailResponse](../../operations/deleteguardrailresponse.md)**
+**[components.DeleteGuardrailResponse](../../components/deleteguardrailresponse.md)**
### Errors
@@ -281,13 +181,13 @@ with OpenRouter(
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-## list_key_assignments
+## get
-List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
### Example Usage
-
+
```python
from openrouter import OpenRouter
import os
@@ -300,7 +200,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.guardrails.list_key_assignments()
+ res = open_router.guardrails.get(id="550e8400-e29b-41d4-a716-446655440000")
# Handle response
print(res)
@@ -311,32 +211,32 @@ with OpenRouter(
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
-**[operations.ListKeyAssignmentsResponse](../../operations/listkeyassignmentsresponse.md)**
+**[components.GetGuardrailResponse](../../components/getguardrailresponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-## list_member_assignments
+## update
-List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
### Example Usage
-
+
```python
from openrouter import OpenRouter
import os
@@ -349,7 +249,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.guardrails.list_member_assignments()
+ res = open_router.guardrails.update(id="550e8400-e29b-41d4-a716-446655440000", description="Updated description", limit_usd=75, name="Updated Guardrail Name", reset_interval="weekly")
# Handle response
print(res)
@@ -360,22 +260,32 @@ with OpenRouter(
| 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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
+| `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` | *Optional[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
-**[operations.ListMemberAssignmentsResponse](../../operations/listmemberassignmentsresponse.md)**
+**[components.UpdateGuardrailResponse](../../components/updateguardrailresponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
@@ -400,8 +310,10 @@ with OpenRouter(
res = open_router.guardrails.list_guardrail_key_assignments(id="550e8400-e29b-41d4-a716-446655440000")
- # Handle response
- print(res)
+ while res is not None:
+ # Handle items
+
+ res = res.next()
```
@@ -413,8 +325,8 @@ 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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
+| `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 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -471,7 +383,60 @@ with OpenRouter(
### Response
-**[operations.BulkAssignKeysToGuardrailResponse](../../operations/bulkassignkeystoguardrailresponse.md)**
+**[components.BulkAssignKeysResponse](../../components/bulkassignkeysresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.BadRequestResponseError | 400 | application/json |
+| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.NotFoundResponseError | 404 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
+## bulk_unassign_keys
+
+Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+### 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.guardrails.bulk_unassign_keys(id="550e8400-e29b-41d4-a716-446655440000", key_hashes=[
+ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93",
+ ])
+
+ # Handle response
+ print(res)
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
+| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] |
+| `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.BulkUnassignKeysResponse](../../components/bulkunassignkeysresponse.md)**
### Errors
@@ -504,8 +469,10 @@ with OpenRouter(
res = open_router.guardrails.list_guardrail_member_assignments(id="550e8400-e29b-41d4-a716-446655440000")
- # Handle response
- print(res)
+ while res is not None:
+ # Handle items
+
+ res = res.next()
```
@@ -517,8 +484,8 @@ 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.
| |
-| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
-| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
+| `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 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -576,60 +543,7 @@ with OpenRouter(
### Response
-**[operations.BulkAssignMembersToGuardrailResponse](../../operations/bulkassignmemberstoguardrailresponse.md)**
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| errors.BadRequestResponseError | 400 | application/json |
-| errors.UnauthorizedResponseError | 401 | application/json |
-| errors.NotFoundResponseError | 404 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-
-## bulk_unassign_keys
-
-Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
-### 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.guardrails.bulk_unassign_keys(id="550e8400-e29b-41d4-a716-446655440000", key_hashes=[
- "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93",
- ])
-
- # Handle response
- print(res)
-
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
-| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] |
-| `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
-
-**[operations.BulkUnassignKeysFromGuardrailResponse](../../operations/bulkunassignkeysfromguardrailresponse.md)**
+**[components.BulkAssignMembersResponse](../../components/bulkassignmembersresponse.md)**
### Errors
@@ -683,7 +597,7 @@ with OpenRouter(
### Response
-**[operations.BulkUnassignMembersFromGuardrailResponse](../../operations/bulkunassignmembersfromguardrailresponse.md)**
+**[components.BulkUnassignMembersResponse](../../components/bulkunassignmembersresponse.md)**
### Errors
@@ -693,4 +607,106 @@ with OpenRouter(
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
+## list_key_assignments
+
+List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+### 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.guardrails.list_key_assignments()
+
+ while res is not None:
+ # Handle items
+
+ res = res.next()
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `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 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+
+### Response
+
+**[operations.ListKeyAssignmentsResponse](../../operations/listkeyassignmentsresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
+## list_member_assignments
+
+List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+### 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.guardrails.list_member_assignments()
+
+ while res is not None:
+ # Handle items
+
+ res = res.next()
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `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 |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+
+### Response
+
+**[operations.ListMemberAssignmentsResponse](../../operations/listmemberassignmentsresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.UnauthorizedResponseError | 401 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md
index 3f63d9a..74618cb 100644
--- a/docs/sdks/models/README.md
+++ b/docs/sdks/models/README.md
@@ -6,10 +6,60 @@ Model information endpoints
### Available Operations
-* [count](#count) - Get total count of available models
* [list](#list) - List all models and their properties
+* [count](#count) - Get total count of available models
* [list_for_user](#list_for_user) - List models filtered by user provider preferences, privacy settings, and guardrails
+## list
+
+List all models and their properties
+
+### 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.models.list()
+
+ # Handle response
+ print(res)
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
+| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
+| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
+
+### Response
+
+**[components.ModelsListResponse](../../components/modelslistresponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ---------------------------------- | ---------------------------------- | ---------------------------------- |
+| errors.BadRequestResponseError | 400 | application/json |
+| errors.InternalServerResponseError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
## count
Get total count of available models
@@ -58,59 +108,9 @@ with OpenRouter(
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-## list
-
-List all models and their properties
-
-### 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.models.list()
-
- # Handle response
- print(res)
-
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
-| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
-| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
-
-### Response
-
-**[components.ModelsListResponse](../../components/modelslistresponse.md)**
-
-### Errors
-
-| Error Type | Status Code | Content Type |
-| ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| errors.BadRequestResponseError | 400 | application/json |
-| errors.InternalServerResponseError | 500 | application/json |
-| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
-
## list_for_user
-List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/logging#enterprise-eu-in-region-routing).
+List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
### Example Usage
diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md
index 704edee..562e2e8 100644
--- a/docs/sdks/oauth/README.md
+++ b/docs/sdks/oauth/README.md
@@ -28,7 +28,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.o_auth.exchange_auth_code_for_api_key(code="auth_code_abc123def456")
+ res = open_router.o_auth.exchange_auth_code_for_api_key(code="auth_code_abc123def456", code_challenge_method="S256", code_verifier="dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk")
# Handle response
print(res)
@@ -43,8 +43,8 @@ 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.
| |
-| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
+| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
@@ -79,7 +79,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
- res = open_router.o_auth.create_auth_code(callback_url="https://myapp.com/auth/callback")
+ res = open_router.o_auth.create_auth_code(callback_url="https://myapp.com/auth/callback", code_challenge="E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", code_challenge_method="S256", limit=100)
# Handle response
print(res)
@@ -96,9 +96,9 @@ 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.
| |
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
-| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
-| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
+| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | 2027-12-31T23:59:59Z |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
+| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md
index ab1574e..9f0b8db 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(service_tier="auto", stream=False)
+ res = open_router.beta.responses.send(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,40 +43,40 @@ 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.
| |
-| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"role": "user",
"content": "What is the weather today?"
}
] |
+| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | N/A | |
+| `image_config` | Dict[str, [components.ResponsesRequestImageConfig](../../components/responsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} |
+| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.md)] | :heavy_minus_sign: | N/A | |
+| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"content": "What is the weather today?",
"role": "user"
}
] |
| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"user_id": "123",
"session_id": "abc-def-ghi"
} |
-| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | |
-| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.md) | :heavy_minus_sign: | N/A | |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `max_output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"session_id": "abc-def-ghi",
"user_id": "123"
} |
+| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | |
| `models` | List[*str*] | :heavy_minus_sign: | N/A | |
-| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} |
-| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"summary": "auto",
"enabled": true
} |
-| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
-| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
-| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
-| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
-| `image_config` | Dict[str, [components.ResponsesRequestImageConfig](../../components/responsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} |
-| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
-| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.md) | :heavy_minus_sign: | N/A | |
-| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.md)] | :heavy_minus_sign: | N/A | |
-| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
+| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.md) | :heavy_minus_sign: | N/A | {
"id": "prompt-abc123",
"variables": {
"name": "John"
}
} |
+| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | {
"allow_fallbacks": true
} |
+| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"effort": "medium",
"summary": "auto"
} |
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.md) | :heavy_minus_sign: | N/A | |
-| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.md) | :heavy_minus_sign: | N/A | auto |
-| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
-| `provider` | [OptionalNullable[components.ResponsesRequestProvider]](../../components/responsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
-| `plugins` | List[[components.ResponsesRequestPluginUnion](../../components/responsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
-| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `trace` | [Optional[components.ResponsesRequestTrace]](../../components/responsesrequesttrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | |
+| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
+| `temperature` | *Optional[float]* | :heavy_minus_sign: | N/A | |
+| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} |
+| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.md) | :heavy_minus_sign: | N/A | auto |
+| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | |
+| `top_k` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `top_logprobs` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| `top_p` | *Optional[float]* | :heavy_minus_sign: | N/A | |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | {
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.md) | :heavy_minus_sign: | N/A | auto |
+| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/pyproject.toml b/pyproject.toml
index 71d7080..c820c26 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,15 +1,17 @@
[project]
name = "openrouter"
-version = "0.8.1"
+version = "0.9.0"
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",
"httpx >=0.28.1",
+ "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 1057ee9..9bfbdc0 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "0.8.1"
+__version__: str = "0.9.0"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.788.4"
-__user_agent__: str = "speakeasy-sdk/python 0.8.1 2.788.4 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 0.9.0 2.788.4 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/analytics.py b/src/openrouter/analytics.py
index 4d707db..ea004ea 100644
--- a/src/openrouter/analytics.py
+++ b/src/openrouter/analytics.py
@@ -19,11 +19,13 @@ class Analytics(BaseSDK):
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
date_: Optional[str] = None,
+ api_key_hash: Optional[str] = None,
+ user_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetUserActivityResponse:
+ ) -> components.ActivityResponse:
r"""Get user activity grouped by endpoint
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -36,6 +38,8 @@ class Analytics(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
+ :param api_key_hash: Filter by API key hash (SHA-256 hex string, as returned by the keys API).
+ :param user_id: Filter by org member user ID. Only applicable for organization accounts.
: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
@@ -56,6 +60,8 @@ class Analytics(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
date_=date_,
+ api_key_hash=api_key_hash,
+ user_id=user_id,
)
req = self._build_request(
@@ -83,10 +89,14 @@ class Analytics(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -99,13 +109,13 @@ class Analytics(BaseSDK):
),
),
request=req,
- error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
+ 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(operations.GetUserActivityResponse, http_res)
+ return unmarshal_json_response(components.ActivityResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -121,6 +131,11 @@ class Analytics(BaseSDK):
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
@@ -146,11 +161,13 @@ class Analytics(BaseSDK):
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
date_: Optional[str] = None,
+ api_key_hash: Optional[str] = None,
+ user_id: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetUserActivityResponse:
+ ) -> components.ActivityResponse:
r"""Get user activity grouped by endpoint
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -163,6 +180,8 @@ class Analytics(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
+ :param api_key_hash: Filter by API key hash (SHA-256 hex string, as returned by the keys API).
+ :param user_id: Filter by org member user ID. Only applicable for organization accounts.
: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
@@ -183,6 +202,8 @@ class Analytics(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
date_=date_,
+ api_key_hash=api_key_hash,
+ user_id=user_id,
)
req = self._build_request_async(
@@ -210,10 +231,14 @@ class Analytics(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -226,13 +251,13 @@ class Analytics(BaseSDK):
),
),
request=req,
- error_status_codes=["400", "401", "403", "4XX", "500", "5XX"],
+ 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(operations.GetUserActivityResponse, http_res)
+ return unmarshal_json_response(components.ActivityResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -248,6 +273,11 @@ class Analytics(BaseSDK):
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
diff --git a/src/openrouter/api_keys.py b/src/openrouter/api_keys.py
index 0c1e8d0..40474f7 100644
--- a/src/openrouter/api_keys.py
+++ b/src/openrouter/api_keys.py
@@ -13,14 +13,250 @@ from typing import Any, Mapping, Optional
class APIKeys(BaseSDK):
r"""API key management endpoints"""
+ def get_current_key_metadata(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.GetCurrentKeyResponse:
+ r"""Get current API key
+
+ Get information on the API key associated with the current authentication session
+
+ :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.GetCurrentKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/key",
+ 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.GetCurrentKeyGlobals(
+ 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="getCurrentKey",
+ 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,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(operations.GetCurrentKeyResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def get_current_key_metadata_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.GetCurrentKeyResponse:
+ r"""Get current API key
+
+ Get information on the API key associated with the current authentication session
+
+ :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.GetCurrentKeyRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/key",
+ 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.GetCurrentKeyGlobals(
+ 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="getCurrentKey",
+ 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,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(operations.GetCurrentKeyResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
def list(
self,
*,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- include_disabled: Optional[str] = None,
- offset: Optional[str] = None,
+ include_disabled: Optional[bool] = None,
+ offset: Optional[int] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -87,10 +323,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -144,8 +384,8 @@ class APIKeys(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- include_disabled: Optional[str] = None,
- offset: Optional[str] = None,
+ include_disabled: Optional[bool] = None,
+ offset: Optional[int] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -212,10 +452,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -270,10 +514,11 @@ class APIKeys(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- limit: OptionalNullable[float] = UNSET,
- limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
- include_byok_in_limit: Optional[bool] = None,
+ creator_user_id: OptionalNullable[str] = UNSET,
expires_at: OptionalNullable[datetime] = UNSET,
+ include_byok_in_limit: Optional[bool] = None,
+ limit: Optional[float] = None,
+ limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -291,10 +536,11 @@ class APIKeys(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param creator_user_id: Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key.
+ :param expires_at: Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
+ :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 include_byok_in_limit: Whether to include BYOK usage in the limit
- :param expires_at: Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
: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
@@ -315,11 +561,12 @@ class APIKeys(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
request_body=operations.CreateKeysRequestBody(
- name=name,
+ creator_user_id=creator_user_id,
+ expires_at=expires_at,
+ include_byok_in_limit=include_byok_in_limit,
limit=limit,
limit_reset=limit_reset,
- include_byok_in_limit=include_byok_in_limit,
- expires_at=expires_at,
+ name=name,
),
)
@@ -355,10 +602,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -418,10 +669,11 @@ class APIKeys(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- limit: OptionalNullable[float] = UNSET,
- limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
- include_byok_in_limit: Optional[bool] = None,
+ creator_user_id: OptionalNullable[str] = UNSET,
expires_at: OptionalNullable[datetime] = UNSET,
+ include_byok_in_limit: Optional[bool] = None,
+ limit: Optional[float] = None,
+ limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -439,10 +691,11 @@ class APIKeys(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param creator_user_id: Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key.
+ :param expires_at: Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
+ :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 include_byok_in_limit: Whether to include BYOK usage in the limit
- :param expires_at: Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
: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
@@ -463,11 +716,12 @@ class APIKeys(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
request_body=operations.CreateKeysRequestBody(
- name=name,
+ creator_user_id=creator_user_id,
+ expires_at=expires_at,
+ include_byok_in_limit=include_byok_in_limit,
limit=limit,
limit_reset=limit_reset,
- include_byok_in_limit=include_byok_in_limit,
- expires_at=expires_at,
+ name=name,
),
)
@@ -503,10 +757,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -559,318 +817,6 @@ class APIKeys(BaseSDK):
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
- def update(
- self,
- *,
- hash: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- name: Optional[str] = None,
- disabled: Optional[bool] = None,
- limit: OptionalNullable[float] = UNSET,
- limit_reset: OptionalNullable[operations.UpdateKeysLimitReset] = UNSET,
- include_byok_in_limit: 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,
- ) -> operations.UpdateKeysResponse:
- r"""Update an API key
-
- Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param hash: The hash identifier of the API key to update
- :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 name: New name for the API key
- :param disabled: Whether to disable the API key
- :param limit: New spending limit for the API key in USD
- :param limit_reset: New limit reset type 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 include_byok_in_limit: Whether to include BYOK usage in the limit
- :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.UpdateKeysRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- hash=hash,
- request_body=operations.UpdateKeysRequestBody(
- name=name,
- disabled=disabled,
- limit=limit,
- limit_reset=limit_reset,
- include_byok_in_limit=include_byok_in_limit,
- ),
- )
-
- req = self._build_request(
- method="PATCH",
- path="/keys/{hash}",
- 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.UpdateKeysGlobals(
- http_referer=self.sdk_configuration.globals.http_referer,
- x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
- x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
- ),
- security=self.sdk_configuration.security,
- get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
- False,
- False,
- "json",
- operations.UpdateKeysRequestBody,
- ),
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="updateKeys",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["400", "401", "404", "429", "4XX", "500", "5XX"],
- retry_config=retry_config,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.UpdateKeysResponse, http_res)
- if utils.match_response(http_res, "400", "application/json"):
- response_data = unmarshal_json_response(
- errors.BadRequestResponseErrorData, http_res
- )
- raise errors.BadRequestResponseError(response_data, http_res)
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "429", "application/json"):
- response_data = unmarshal_json_response(
- errors.TooManyRequestsResponseErrorData, http_res
- )
- raise errors.TooManyRequestsResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def update_async(
- self,
- *,
- hash: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- name: Optional[str] = None,
- disabled: Optional[bool] = None,
- limit: OptionalNullable[float] = UNSET,
- limit_reset: OptionalNullable[operations.UpdateKeysLimitReset] = UNSET,
- include_byok_in_limit: 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,
- ) -> operations.UpdateKeysResponse:
- r"""Update an API key
-
- Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param hash: The hash identifier of the API key to update
- :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 name: New name for the API key
- :param disabled: Whether to disable the API key
- :param limit: New spending limit for the API key in USD
- :param limit_reset: New limit reset type 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 include_byok_in_limit: Whether to include BYOK usage in the limit
- :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.UpdateKeysRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- hash=hash,
- request_body=operations.UpdateKeysRequestBody(
- name=name,
- disabled=disabled,
- limit=limit,
- limit_reset=limit_reset,
- include_byok_in_limit=include_byok_in_limit,
- ),
- )
-
- req = self._build_request_async(
- method="PATCH",
- path="/keys/{hash}",
- 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.UpdateKeysGlobals(
- http_referer=self.sdk_configuration.globals.http_referer,
- x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
- x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
- ),
- security=self.sdk_configuration.security,
- get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
- False,
- False,
- "json",
- operations.UpdateKeysRequestBody,
- ),
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="updateKeys",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["400", "401", "404", "429", "4XX", "500", "5XX"],
- retry_config=retry_config,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.UpdateKeysResponse, http_res)
- if utils.match_response(http_res, "400", "application/json"):
- response_data = unmarshal_json_response(
- errors.BadRequestResponseErrorData, http_res
- )
- raise errors.BadRequestResponseError(response_data, http_res)
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "429", "application/json"):
- response_data = unmarshal_json_response(
- errors.TooManyRequestsResponseErrorData, http_res
- )
- raise errors.TooManyRequestsResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
def delete(
self,
*,
@@ -942,10 +888,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -1069,10 +1019,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -1196,10 +1150,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -1323,10 +1281,14 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -1379,21 +1341,28 @@ class APIKeys(BaseSDK):
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
- def get_current_key_metadata(
+ def update(
self,
*,
+ hash: str,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ disabled: Optional[bool] = None,
+ include_byok_in_limit: Optional[bool] = None,
+ limit: Optional[float] = None,
+ limit_reset: OptionalNullable[operations.UpdateKeysLimitReset] = UNSET,
+ name: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetCurrentKeyResponse:
- r"""Get current API key
+ ) -> operations.UpdateKeysResponse:
+ r"""Update an API key
- Get information on the API key associated with the current authentication session
+ Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ :param hash: The hash identifier of the API key to update
: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.
@@ -1401,6 +1370,11 @@ class APIKeys(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param disabled: Whether to disable the API key
+ :param include_byok_in_limit: Whether to include BYOK usage in the limit
+ :param limit: New spending limit for the API key in USD
+ :param limit_reset: New limit reset type 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 name: New name for the API key
: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
@@ -1416,30 +1390,45 @@ class APIKeys(BaseSDK):
else:
base_url = self._get_url(base_url, url_variables)
- request = operations.GetCurrentKeyRequest(
+ request = operations.UpdateKeysRequest(
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ hash=hash,
+ request_body=operations.UpdateKeysRequestBody(
+ disabled=disabled,
+ include_byok_in_limit=include_byok_in_limit,
+ limit=limit,
+ limit_reset=limit_reset,
+ name=name,
+ ),
)
req = self._build_request(
- method="GET",
- path="/key",
+ method="PATCH",
+ path="/keys/{hash}",
base_url=base_url,
url_variables=url_variables,
request=request,
- request_body_required=False,
- request_has_path_params=False,
+ 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.GetCurrentKeyGlobals(
+ _globals=operations.UpdateKeysGlobals(
http_referer=self.sdk_configuration.globals.http_referer,
x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
),
security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ operations.UpdateKeysRequestBody,
+ ),
allow_empty_value=None,
timeout_ms=timeout_ms,
)
@@ -1447,34 +1436,53 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
config=self.sdk_configuration,
base_url=base_url or "",
- operation_id="getCurrentKey",
+ operation_id="updateKeys",
oauth2_scopes=None,
security_source=get_security_from_env(
self.sdk_configuration.security, components.Security
),
),
request=req,
- error_status_codes=["401", "4XX", "500", "5XX"],
+ error_status_codes=["400", "401", "404", "429", "4XX", "500", "5XX"],
retry_config=retry_config,
)
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.GetCurrentKeyResponse, http_res)
+ return unmarshal_json_response(operations.UpdateKeysResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
)
raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "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
@@ -1493,21 +1501,28 @@ class APIKeys(BaseSDK):
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
- async def get_current_key_metadata_async(
+ async def update_async(
self,
*,
+ hash: str,
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ disabled: Optional[bool] = None,
+ include_byok_in_limit: Optional[bool] = None,
+ limit: Optional[float] = None,
+ limit_reset: OptionalNullable[operations.UpdateKeysLimitReset] = UNSET,
+ name: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetCurrentKeyResponse:
- r"""Get current API key
+ ) -> operations.UpdateKeysResponse:
+ r"""Update an API key
- Get information on the API key associated with the current authentication session
+ Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+ :param hash: The hash identifier of the API key to update
: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.
@@ -1515,6 +1530,11 @@ class APIKeys(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param disabled: Whether to disable the API key
+ :param include_byok_in_limit: Whether to include BYOK usage in the limit
+ :param limit: New spending limit for the API key in USD
+ :param limit_reset: New limit reset type 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 name: New name for the API key
: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
@@ -1530,30 +1550,45 @@ class APIKeys(BaseSDK):
else:
base_url = self._get_url(base_url, url_variables)
- request = operations.GetCurrentKeyRequest(
+ request = operations.UpdateKeysRequest(
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
+ hash=hash,
+ request_body=operations.UpdateKeysRequestBody(
+ disabled=disabled,
+ include_byok_in_limit=include_byok_in_limit,
+ limit=limit,
+ limit_reset=limit_reset,
+ name=name,
+ ),
)
req = self._build_request_async(
- method="GET",
- path="/key",
+ method="PATCH",
+ path="/keys/{hash}",
base_url=base_url,
url_variables=url_variables,
request=request,
- request_body_required=False,
- request_has_path_params=False,
+ 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.GetCurrentKeyGlobals(
+ _globals=operations.UpdateKeysGlobals(
http_referer=self.sdk_configuration.globals.http_referer,
x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
),
security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ operations.UpdateKeysRequestBody,
+ ),
allow_empty_value=None,
timeout_ms=timeout_ms,
)
@@ -1561,34 +1596,53 @@ class APIKeys(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ 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="getCurrentKey",
+ operation_id="updateKeys",
oauth2_scopes=None,
security_source=get_security_from_env(
self.sdk_configuration.security, components.Security
),
),
request=req,
- error_status_codes=["401", "4XX", "500", "5XX"],
+ error_status_codes=["400", "401", "404", "429", "4XX", "500", "5XX"],
retry_config=retry_config,
)
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.GetCurrentKeyResponse, http_res)
+ return unmarshal_json_response(operations.UpdateKeysResponse, http_res)
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
)
raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "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
diff --git a/src/openrouter/chat.py b/src/openrouter/chat.py
index e7855d1..3949384 100644
--- a/src/openrouter/chat.py
+++ b/src/openrouter/chat.py
@@ -26,39 +26,52 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- provider: OptionalNullable[
+ cache_control: Optional[
Union[
- components.ChatRequestProvider, components.ChatRequestProviderTypedDict
- ]
- ] = UNSET,
- plugins: Optional[
- Union[
- List[components.ChatRequestPluginUnion],
- List[components.ChatRequestPluginUnionTypedDict],
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
]
] = None,
- user: Optional[str] = None,
- session_id: Optional[str] = None,
- trace: Optional[
- Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict]
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: Optional[float] = None,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ChatRequestImageConfig],
+ Dict[str, components.ChatRequestImageConfigTypedDict],
+ ]
] = None,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- frequency_penalty: OptionalNullable[float] = UNSET,
logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
logprobs: OptionalNullable[bool] = UNSET,
- top_logprobs: OptionalNullable[float] = UNSET,
- max_completion_tokens: OptionalNullable[float] = UNSET,
- max_tokens: OptionalNullable[float] = UNSET,
+ max_completion_tokens: Optional[int] = None,
+ max_tokens: Optional[int] = None,
metadata: Optional[Dict[str, str]] = None,
- presence_penalty: OptionalNullable[float] = UNSET,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
reasoning: Optional[
Union[components.Reasoning, components.ReasoningTypedDict]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
] = None,
- seed: OptionalNullable[int] = UNSET,
+ seed: Optional[int] = None,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
@@ -66,8 +79,7 @@ class Chat(BaseSDK):
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
- temperature: OptionalNullable[float] = 1,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ temperature: Optional[float] = None,
tool_choice: Optional[
Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
] = None,
@@ -77,21 +89,12 @@ class Chat(BaseSDK):
List[components.ChatFunctionToolTypedDict],
]
] = None,
- top_p: OptionalNullable[float] = 1,
- debug: Optional[
- Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
] = None,
- image_config: Optional[
- Union[
- Dict[str, components.ChatRequestImageConfig],
- Dict[str, components.ChatRequestImageConfigTypedDict],
- ]
- ] = None,
- modalities: Optional[List[components.Modality]] = None,
- cache_control: Optional[
- Union[components.CacheControl, components.CacheControlTypedDict]
- ] = None,
- service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -109,37 +112,37 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: Unique user identifier
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
- :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
- :param model: Model to use for completion
- :param models: Models to use for completion
+ :param cache_control:
+ :param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param logit_bias: Token logit bias adjustments
:param logprobs: Return log probabilities
- :param top_logprobs: Number of top log probabilities to return (0-20)
:param max_completion_tokens: Maximum tokens in completion
:param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
:param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
:param reasoning: Configuration options for reasoning models
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
- :param parallel_tool_calls:
:param tool_choice: Tool choice configuration
:param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
:param top_p: Nucleus sampling parameter (0-1)
- :param debug: Debug options for inspecting request transformations (streaming only)
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
- :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- :param service_tier: The service tier to use for processing this request.
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -157,39 +160,52 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- provider: OptionalNullable[
+ cache_control: Optional[
Union[
- components.ChatRequestProvider, components.ChatRequestProviderTypedDict
- ]
- ] = UNSET,
- plugins: Optional[
- Union[
- List[components.ChatRequestPluginUnion],
- List[components.ChatRequestPluginUnionTypedDict],
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
]
] = None,
- user: Optional[str] = None,
- session_id: Optional[str] = None,
- trace: Optional[
- Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict]
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: Optional[float] = None,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ChatRequestImageConfig],
+ Dict[str, components.ChatRequestImageConfigTypedDict],
+ ]
] = None,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- frequency_penalty: OptionalNullable[float] = UNSET,
logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
logprobs: OptionalNullable[bool] = UNSET,
- top_logprobs: OptionalNullable[float] = UNSET,
- max_completion_tokens: OptionalNullable[float] = UNSET,
- max_tokens: OptionalNullable[float] = UNSET,
+ max_completion_tokens: Optional[int] = None,
+ max_tokens: Optional[int] = None,
metadata: Optional[Dict[str, str]] = None,
- presence_penalty: OptionalNullable[float] = UNSET,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
reasoning: Optional[
Union[components.Reasoning, components.ReasoningTypedDict]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
] = None,
- seed: OptionalNullable[int] = UNSET,
+ seed: Optional[int] = None,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
@@ -197,8 +213,7 @@ class Chat(BaseSDK):
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
- temperature: OptionalNullable[float] = 1,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ temperature: Optional[float] = None,
tool_choice: Optional[
Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
] = None,
@@ -208,21 +223,12 @@ class Chat(BaseSDK):
List[components.ChatFunctionToolTypedDict],
]
] = None,
- top_p: OptionalNullable[float] = 1,
- debug: Optional[
- Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
] = None,
- image_config: Optional[
- Union[
- Dict[str, components.ChatRequestImageConfig],
- Dict[str, components.ChatRequestImageConfigTypedDict],
- ]
- ] = None,
- modalities: Optional[List[components.Modality]] = None,
- cache_control: Optional[
- Union[components.CacheControl, components.CacheControlTypedDict]
- ] = None,
- service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -240,37 +246,37 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: Unique user identifier
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
- :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
- :param model: Model to use for completion
- :param models: Models to use for completion
+ :param cache_control:
+ :param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param logit_bias: Token logit bias adjustments
:param logprobs: Return log probabilities
- :param top_logprobs: Number of top log probabilities to return (0-20)
:param max_completion_tokens: Maximum tokens in completion
:param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
:param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
:param reasoning: Configuration options for reasoning models
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
- :param parallel_tool_calls:
:param tool_choice: Tool choice configuration
:param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
:param top_p: Nucleus sampling parameter (0-1)
- :param debug: Debug options for inspecting request transformations (streaming only)
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
- :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- :param service_tier: The service tier to use for processing this request.
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -287,39 +293,52 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- provider: OptionalNullable[
+ cache_control: Optional[
Union[
- components.ChatRequestProvider, components.ChatRequestProviderTypedDict
- ]
- ] = UNSET,
- plugins: Optional[
- Union[
- List[components.ChatRequestPluginUnion],
- List[components.ChatRequestPluginUnionTypedDict],
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
]
] = None,
- user: Optional[str] = None,
- session_id: Optional[str] = None,
- trace: Optional[
- Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict]
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: Optional[float] = None,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ChatRequestImageConfig],
+ Dict[str, components.ChatRequestImageConfigTypedDict],
+ ]
] = None,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- frequency_penalty: OptionalNullable[float] = UNSET,
logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
logprobs: OptionalNullable[bool] = UNSET,
- top_logprobs: OptionalNullable[float] = UNSET,
- max_completion_tokens: OptionalNullable[float] = UNSET,
- max_tokens: OptionalNullable[float] = UNSET,
+ max_completion_tokens: Optional[int] = None,
+ max_tokens: Optional[int] = None,
metadata: Optional[Dict[str, str]] = None,
- presence_penalty: OptionalNullable[float] = UNSET,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
reasoning: Optional[
Union[components.Reasoning, components.ReasoningTypedDict]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
] = None,
- seed: OptionalNullable[int] = UNSET,
+ seed: Optional[int] = None,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
@@ -327,8 +346,7 @@ class Chat(BaseSDK):
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
- temperature: OptionalNullable[float] = 1,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ temperature: Optional[float] = None,
tool_choice: Optional[
Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
] = None,
@@ -338,21 +356,12 @@ class Chat(BaseSDK):
List[components.ChatFunctionToolTypedDict],
]
] = None,
- top_p: OptionalNullable[float] = 1,
- debug: Optional[
- Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
] = None,
- image_config: Optional[
- Union[
- Dict[str, components.ChatRequestImageConfig],
- Dict[str, components.ChatRequestImageConfigTypedDict],
- ]
- ] = None,
- modalities: Optional[List[components.Modality]] = None,
- cache_control: Optional[
- Union[components.CacheControl, components.CacheControlTypedDict]
- ] = None,
- service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -370,37 +379,37 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: Unique user identifier
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
- :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
- :param model: Model to use for completion
- :param models: Models to use for completion
+ :param cache_control:
+ :param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param logit_bias: Token logit bias adjustments
:param logprobs: Return log probabilities
- :param top_logprobs: Number of top log probabilities to return (0-20)
:param max_completion_tokens: Maximum tokens in completion
:param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
:param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
:param reasoning: Configuration options for reasoning models
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
- :param parallel_tool_calls:
:param tool_choice: Tool choice configuration
:param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
:param top_p: Nucleus sampling parameter (0-1)
- :param debug: Debug options for inspecting request transformations (streaming only)
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
- :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- :param service_tier: The service tier to use for processing this request.
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -422,30 +431,33 @@ class Chat(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
chat_request=components.ChatRequest(
- provider=utils.get_pydantic_model(
- provider, OptionalNullable[components.ChatRequestProvider]
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
),
- plugins=utils.get_pydantic_model(
- plugins, Optional[List[components.ChatRequestPluginUnion]]
- ),
- user=user,
- session_id=session_id,
- trace=utils.get_pydantic_model(
- trace, Optional[components.ChatRequestTrace]
+ debug=utils.get_pydantic_model(
+ debug, Optional[components.ChatDebugOptions]
),
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ logit_bias=logit_bias,
+ logprobs=logprobs,
+ max_completion_tokens=max_completion_tokens,
+ max_tokens=max_tokens,
messages=utils.get_pydantic_model(
messages, List[components.ChatMessages]
),
+ metadata=metadata,
+ modalities=modalities,
model=model,
models=models,
- frequency_penalty=frequency_penalty,
- logit_bias=logit_bias,
- logprobs=logprobs,
- top_logprobs=top_logprobs,
- max_completion_tokens=max_completion_tokens,
- max_tokens=max_tokens,
- metadata=metadata,
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ChatRequestPlugin]]
+ ),
presence_penalty=presence_penalty,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
reasoning=utils.get_pydantic_model(
reasoning, Optional[components.Reasoning]
),
@@ -453,29 +465,24 @@ class Chat(BaseSDK):
response_format, Optional[components.ResponseFormat]
),
seed=seed,
+ service_tier=service_tier,
+ session_id=session_id,
stop=stop,
stream=stream,
stream_options=utils.get_pydantic_model(
stream_options, OptionalNullable[components.ChatStreamOptions]
),
temperature=temperature,
- parallel_tool_calls=parallel_tool_calls,
tool_choice=utils.get_pydantic_model(
tool_choice, Optional[components.ChatToolChoice]
),
tools=utils.get_pydantic_model(
tools, Optional[List[components.ChatFunctionTool]]
),
+ top_logprobs=top_logprobs,
top_p=top_p,
- debug=utils.get_pydantic_model(
- debug, Optional[components.ChatDebugOptions]
- ),
- image_config=image_config,
- modalities=modalities,
- cache_control=utils.get_pydantic_model(
- cache_control, Optional[components.CacheControl]
- ),
- service_tier=service_tier,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ user=user,
),
)
@@ -507,10 +514,14 @@ class Chat(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -683,39 +694,52 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- provider: OptionalNullable[
+ cache_control: Optional[
Union[
- components.ChatRequestProvider, components.ChatRequestProviderTypedDict
- ]
- ] = UNSET,
- plugins: Optional[
- Union[
- List[components.ChatRequestPluginUnion],
- List[components.ChatRequestPluginUnionTypedDict],
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
]
] = None,
- user: Optional[str] = None,
- session_id: Optional[str] = None,
- trace: Optional[
- Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict]
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: Optional[float] = None,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ChatRequestImageConfig],
+ Dict[str, components.ChatRequestImageConfigTypedDict],
+ ]
] = None,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- frequency_penalty: OptionalNullable[float] = UNSET,
logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
logprobs: OptionalNullable[bool] = UNSET,
- top_logprobs: OptionalNullable[float] = UNSET,
- max_completion_tokens: OptionalNullable[float] = UNSET,
- max_tokens: OptionalNullable[float] = UNSET,
+ max_completion_tokens: Optional[int] = None,
+ max_tokens: Optional[int] = None,
metadata: Optional[Dict[str, str]] = None,
- presence_penalty: OptionalNullable[float] = UNSET,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
reasoning: Optional[
Union[components.Reasoning, components.ReasoningTypedDict]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
] = None,
- seed: OptionalNullable[int] = UNSET,
+ seed: Optional[int] = None,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
@@ -723,8 +747,7 @@ class Chat(BaseSDK):
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
- temperature: OptionalNullable[float] = 1,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ temperature: Optional[float] = None,
tool_choice: Optional[
Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
] = None,
@@ -734,21 +757,12 @@ class Chat(BaseSDK):
List[components.ChatFunctionToolTypedDict],
]
] = None,
- top_p: OptionalNullable[float] = 1,
- debug: Optional[
- Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
] = None,
- image_config: Optional[
- Union[
- Dict[str, components.ChatRequestImageConfig],
- Dict[str, components.ChatRequestImageConfigTypedDict],
- ]
- ] = None,
- modalities: Optional[List[components.Modality]] = None,
- cache_control: Optional[
- Union[components.CacheControl, components.CacheControlTypedDict]
- ] = None,
- service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -766,37 +780,37 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: Unique user identifier
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
- :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
- :param model: Model to use for completion
- :param models: Models to use for completion
+ :param cache_control:
+ :param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param logit_bias: Token logit bias adjustments
:param logprobs: Return log probabilities
- :param top_logprobs: Number of top log probabilities to return (0-20)
:param max_completion_tokens: Maximum tokens in completion
:param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
:param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
:param reasoning: Configuration options for reasoning models
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
- :param parallel_tool_calls:
:param tool_choice: Tool choice configuration
:param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
:param top_p: Nucleus sampling parameter (0-1)
- :param debug: Debug options for inspecting request transformations (streaming only)
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
- :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- :param service_tier: The service tier to use for processing this request.
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -814,39 +828,52 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- provider: OptionalNullable[
+ cache_control: Optional[
Union[
- components.ChatRequestProvider, components.ChatRequestProviderTypedDict
- ]
- ] = UNSET,
- plugins: Optional[
- Union[
- List[components.ChatRequestPluginUnion],
- List[components.ChatRequestPluginUnionTypedDict],
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
]
] = None,
- user: Optional[str] = None,
- session_id: Optional[str] = None,
- trace: Optional[
- Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict]
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: Optional[float] = None,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ChatRequestImageConfig],
+ Dict[str, components.ChatRequestImageConfigTypedDict],
+ ]
] = None,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- frequency_penalty: OptionalNullable[float] = UNSET,
logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
logprobs: OptionalNullable[bool] = UNSET,
- top_logprobs: OptionalNullable[float] = UNSET,
- max_completion_tokens: OptionalNullable[float] = UNSET,
- max_tokens: OptionalNullable[float] = UNSET,
+ max_completion_tokens: Optional[int] = None,
+ max_tokens: Optional[int] = None,
metadata: Optional[Dict[str, str]] = None,
- presence_penalty: OptionalNullable[float] = UNSET,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
reasoning: Optional[
Union[components.Reasoning, components.ReasoningTypedDict]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
] = None,
- seed: OptionalNullable[int] = UNSET,
+ seed: Optional[int] = None,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
@@ -854,8 +881,7 @@ class Chat(BaseSDK):
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
- temperature: OptionalNullable[float] = 1,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ temperature: Optional[float] = None,
tool_choice: Optional[
Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
] = None,
@@ -865,21 +891,12 @@ class Chat(BaseSDK):
List[components.ChatFunctionToolTypedDict],
]
] = None,
- top_p: OptionalNullable[float] = 1,
- debug: Optional[
- Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
] = None,
- image_config: Optional[
- Union[
- Dict[str, components.ChatRequestImageConfig],
- Dict[str, components.ChatRequestImageConfigTypedDict],
- ]
- ] = None,
- modalities: Optional[List[components.Modality]] = None,
- cache_control: Optional[
- Union[components.CacheControl, components.CacheControlTypedDict]
- ] = None,
- service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -897,37 +914,37 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: Unique user identifier
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
- :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
- :param model: Model to use for completion
- :param models: Models to use for completion
+ :param cache_control:
+ :param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param logit_bias: Token logit bias adjustments
:param logprobs: Return log probabilities
- :param top_logprobs: Number of top log probabilities to return (0-20)
:param max_completion_tokens: Maximum tokens in completion
:param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
:param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
:param reasoning: Configuration options for reasoning models
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
- :param parallel_tool_calls:
:param tool_choice: Tool choice configuration
:param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
:param top_p: Nucleus sampling parameter (0-1)
- :param debug: Debug options for inspecting request transformations (streaming only)
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
- :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- :param service_tier: The service tier to use for processing this request.
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -944,39 +961,52 @@ class Chat(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- provider: OptionalNullable[
+ cache_control: Optional[
Union[
- components.ChatRequestProvider, components.ChatRequestProviderTypedDict
- ]
- ] = UNSET,
- plugins: Optional[
- Union[
- List[components.ChatRequestPluginUnion],
- List[components.ChatRequestPluginUnionTypedDict],
+ components.AnthropicCacheControlDirective,
+ components.AnthropicCacheControlDirectiveTypedDict,
]
] = None,
- user: Optional[str] = None,
- session_id: Optional[str] = None,
- trace: Optional[
- Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict]
+ debug: Optional[
+ Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ ] = None,
+ frequency_penalty: Optional[float] = None,
+ image_config: Optional[
+ Union[
+ Dict[str, components.ChatRequestImageConfig],
+ Dict[str, components.ChatRequestImageConfigTypedDict],
+ ]
] = None,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- frequency_penalty: OptionalNullable[float] = UNSET,
logit_bias: OptionalNullable[Dict[str, float]] = UNSET,
logprobs: OptionalNullable[bool] = UNSET,
- top_logprobs: OptionalNullable[float] = UNSET,
- max_completion_tokens: OptionalNullable[float] = UNSET,
- max_tokens: OptionalNullable[float] = UNSET,
+ max_completion_tokens: Optional[int] = None,
+ max_tokens: Optional[int] = None,
metadata: Optional[Dict[str, str]] = None,
- presence_penalty: OptionalNullable[float] = UNSET,
+ modalities: Optional[List[components.Modality]] = None,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ChatRequestPlugin],
+ List[components.ChatRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
reasoning: Optional[
Union[components.Reasoning, components.ReasoningTypedDict]
] = None,
response_format: Optional[
Union[components.ResponseFormat, components.ResponseFormatTypedDict]
] = None,
- seed: OptionalNullable[int] = UNSET,
+ seed: Optional[int] = None,
+ service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ session_id: Optional[str] = None,
stop: OptionalNullable[
Union[components.Stop, components.StopTypedDict]
] = UNSET,
@@ -984,8 +1014,7 @@ class Chat(BaseSDK):
stream_options: OptionalNullable[
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
- temperature: OptionalNullable[float] = 1,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ temperature: Optional[float] = None,
tool_choice: Optional[
Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict]
] = None,
@@ -995,21 +1024,12 @@ class Chat(BaseSDK):
List[components.ChatFunctionToolTypedDict],
]
] = None,
- top_p: OptionalNullable[float] = 1,
- debug: Optional[
- Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict]
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
] = None,
- image_config: Optional[
- Union[
- Dict[str, components.ChatRequestImageConfig],
- Dict[str, components.ChatRequestImageConfigTypedDict],
- ]
- ] = None,
- modalities: Optional[List[components.Modality]] = None,
- cache_control: Optional[
- Union[components.CacheControl, components.CacheControlTypedDict]
- ] = None,
- service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -1027,37 +1047,37 @@ class Chat(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: Unique user identifier
- :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
- :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
- :param model: Model to use for completion
- :param models: Models to use for completion
+ :param cache_control:
+ :param debug: Debug options for inspecting request transformations (streaming only)
:param frequency_penalty: Frequency penalty (-2.0 to 2.0)
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
:param logit_bias: Token logit bias adjustments
:param logprobs: Return log probabilities
- :param top_logprobs: Number of top log probabilities to return (0-20)
:param max_completion_tokens: Maximum tokens in completion
:param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
:param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
+ :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
+ :param model: Model to use for completion
+ :param models: Models to use for completion
+ :param parallel_tool_calls: Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty: Presence penalty (-2.0 to 2.0)
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
:param reasoning: Configuration options for reasoning models
:param response_format: Response format configuration
:param seed: Random seed for deterministic outputs
+ :param service_tier: The service tier to use for processing this request.
+ :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
:param stop: Stop sequences (up to 4)
:param stream: Enable streaming response
:param stream_options: Streaming configuration options
:param temperature: Sampling temperature (0-2)
- :param parallel_tool_calls:
:param tool_choice: Tool choice configuration
:param tools: Available tools for function calling
+ :param top_logprobs: Number of top log probabilities to return (0-20)
:param top_p: Nucleus sampling parameter (0-1)
- :param debug: Debug options for inspecting request transformations (streaming only)
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".
- :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
- :param service_tier: The service tier to use for processing this request.
+ :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param user: Unique user identifier
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1079,30 +1099,33 @@ class Chat(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
chat_request=components.ChatRequest(
- provider=utils.get_pydantic_model(
- provider, OptionalNullable[components.ChatRequestProvider]
+ cache_control=utils.get_pydantic_model(
+ cache_control, Optional[components.AnthropicCacheControlDirective]
),
- plugins=utils.get_pydantic_model(
- plugins, Optional[List[components.ChatRequestPluginUnion]]
- ),
- user=user,
- session_id=session_id,
- trace=utils.get_pydantic_model(
- trace, Optional[components.ChatRequestTrace]
+ debug=utils.get_pydantic_model(
+ debug, Optional[components.ChatDebugOptions]
),
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ logit_bias=logit_bias,
+ logprobs=logprobs,
+ max_completion_tokens=max_completion_tokens,
+ max_tokens=max_tokens,
messages=utils.get_pydantic_model(
messages, List[components.ChatMessages]
),
+ metadata=metadata,
+ modalities=modalities,
model=model,
models=models,
- frequency_penalty=frequency_penalty,
- logit_bias=logit_bias,
- logprobs=logprobs,
- top_logprobs=top_logprobs,
- max_completion_tokens=max_completion_tokens,
- max_tokens=max_tokens,
- metadata=metadata,
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ChatRequestPlugin]]
+ ),
presence_penalty=presence_penalty,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
reasoning=utils.get_pydantic_model(
reasoning, Optional[components.Reasoning]
),
@@ -1110,29 +1133,24 @@ class Chat(BaseSDK):
response_format, Optional[components.ResponseFormat]
),
seed=seed,
+ service_tier=service_tier,
+ session_id=session_id,
stop=stop,
stream=stream,
stream_options=utils.get_pydantic_model(
stream_options, OptionalNullable[components.ChatStreamOptions]
),
temperature=temperature,
- parallel_tool_calls=parallel_tool_calls,
tool_choice=utils.get_pydantic_model(
tool_choice, Optional[components.ChatToolChoice]
),
tools=utils.get_pydantic_model(
tools, Optional[List[components.ChatFunctionTool]]
),
+ top_logprobs=top_logprobs,
top_p=top_p,
- debug=utils.get_pydantic_model(
- debug, Optional[components.ChatDebugOptions]
- ),
- image_config=image_config,
- modalities=modalities,
- cache_control=utils.get_pydantic_model(
- cache_control, Optional[components.CacheControl]
- ),
- service_tier=service_tier,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ user=user,
),
)
@@ -1164,10 +1182,14 @@ class Chat(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index f62b9c0..e4f9cbd 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -7,16 +7,28 @@ import sys
if TYPE_CHECKING:
from .activityitem import ActivityItem, ActivityItemTypedDict
+ from .activityresponse import ActivityResponse, ActivityResponseTypedDict
from .annotationaddedevent import (
AnnotationAddedEvent,
AnnotationAddedEventType,
AnnotationAddedEventTypedDict,
)
+ from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveType,
+ AnthropicCacheControlDirectiveTypedDict,
+ )
+ from .anthropiccachecontrolttl import AnthropicCacheControlTTL
from .applypatchservertool import (
ApplyPatchServerTool,
ApplyPatchServerToolType,
ApplyPatchServerToolTypedDict,
)
+ from .autorouterplugin import (
+ AutoRouterPlugin,
+ AutoRouterPluginID,
+ AutoRouterPluginTypedDict,
+ )
from .badgatewayresponseerrordata import (
BadGatewayResponseErrorData,
BadGatewayResponseErrorDataTypedDict,
@@ -30,45 +42,57 @@ if TYPE_CHECKING:
BaseInputsContent1TypedDict,
BaseInputsContent2,
BaseInputsContent2TypedDict,
- BaseInputsContent3,
- BaseInputsContent3TypedDict,
- BaseInputsFunctionCall,
- BaseInputsFunctionCallOutput,
- BaseInputsFunctionCallOutputTypedDict,
- BaseInputsFunctionCallTypedDict,
- BaseInputsMessage1,
- BaseInputsMessage1TypedDict,
- BaseInputsMessage2,
- BaseInputsMessage2TypedDict,
- BaseInputsOutput1,
- BaseInputsOutput1TypedDict,
- BaseInputsOutput2,
- BaseInputsOutput2TypedDict,
+ BaseInputsMessage,
+ BaseInputsMessageTypedDict,
BaseInputsPhaseCommentary,
BaseInputsPhaseFinalAnswer,
BaseInputsPhaseUnion,
BaseInputsPhaseUnionTypedDict,
BaseInputsRoleAssistant,
- BaseInputsRoleDeveloper1,
- BaseInputsRoleDeveloper2,
- BaseInputsRoleSystem1,
- BaseInputsRoleSystem2,
- BaseInputsRoleUnion1,
- BaseInputsRoleUnion1TypedDict,
- BaseInputsRoleUnion2,
- BaseInputsRoleUnion2TypedDict,
- BaseInputsRoleUser1,
- BaseInputsRoleUser2,
- BaseInputsTypeFunctionCall,
- BaseInputsTypeFunctionCallOutput,
- BaseInputsTypeMessage1,
- BaseInputsTypeMessage2,
+ BaseInputsRoleDeveloper,
+ BaseInputsRoleSystem,
+ BaseInputsRoleUnion,
+ BaseInputsRoleUnionTypedDict,
+ BaseInputsRoleUser,
+ BaseInputsType,
BaseInputsUnion,
BaseInputsUnion1,
BaseInputsUnion1TypedDict,
BaseInputsUnionTypedDict,
)
from .basereasoningconfig import BaseReasoningConfig, BaseReasoningConfigTypedDict
+ from .bulkassignkeysrequest import (
+ BulkAssignKeysRequest,
+ BulkAssignKeysRequestTypedDict,
+ )
+ from .bulkassignkeysresponse import (
+ BulkAssignKeysResponse,
+ BulkAssignKeysResponseTypedDict,
+ )
+ from .bulkassignmembersrequest import (
+ BulkAssignMembersRequest,
+ BulkAssignMembersRequestTypedDict,
+ )
+ from .bulkassignmembersresponse import (
+ BulkAssignMembersResponse,
+ BulkAssignMembersResponseTypedDict,
+ )
+ from .bulkunassignkeysrequest import (
+ BulkUnassignKeysRequest,
+ BulkUnassignKeysRequestTypedDict,
+ )
+ from .bulkunassignkeysresponse import (
+ BulkUnassignKeysResponse,
+ BulkUnassignKeysResponseTypedDict,
+ )
+ from .bulkunassignmembersrequest import (
+ BulkUnassignMembersRequest,
+ BulkUnassignMembersRequestTypedDict,
+ )
+ from .bulkunassignmembersresponse import (
+ BulkUnassignMembersResponse,
+ BulkUnassignMembersResponseTypedDict,
+ )
from .chatassistantimages import (
ChatAssistantImages,
ChatAssistantImagesImageURL,
@@ -93,7 +117,6 @@ if TYPE_CHECKING:
)
from .chatcontentcachecontrol import (
ChatContentCacheControl,
- ChatContentCacheControlTTL,
ChatContentCacheControlType,
ChatContentCacheControlTypedDict,
)
@@ -112,12 +135,7 @@ if TYPE_CHECKING:
ChatContentImageType,
ChatContentImageTypedDict,
)
- from .chatcontentitems import (
- ChatContentItems,
- ChatContentItems1,
- ChatContentItems1TypedDict,
- ChatContentItemsTypedDict,
- )
+ from .chatcontentitems import ChatContentItems, ChatContentItemsTypedDict
from .chatcontenttext import (
ChatContentText,
ChatContentTextType,
@@ -184,57 +202,12 @@ if TYPE_CHECKING:
)
from .chatreasoningsummaryverbosityenum import ChatReasoningSummaryVerbosityEnum
from .chatrequest import (
- CacheControl,
- CacheControlTypedDict,
ChatRequest,
- ChatRequestBy,
- ChatRequestIDAutoRouter,
- ChatRequestIDContextCompression,
- ChatRequestIDFileParser,
- ChatRequestIDModeration,
- ChatRequestIDResponseHealing,
- ChatRequestIDWeb,
- ChatRequestIgnore,
- ChatRequestIgnoreTypedDict,
ChatRequestImageConfig,
ChatRequestImageConfigTypedDict,
- ChatRequestMaxPrice,
- ChatRequestMaxPriceTypedDict,
- ChatRequestOnly,
- ChatRequestOnlyTypedDict,
- ChatRequestOrder,
- ChatRequestOrderTypedDict,
- ChatRequestPartition,
- ChatRequestPluginAutoRouter,
- ChatRequestPluginAutoRouterTypedDict,
- ChatRequestPluginContextCompression,
- ChatRequestPluginContextCompressionTypedDict,
- ChatRequestPluginFileParser,
- ChatRequestPluginFileParserTypedDict,
- ChatRequestPluginModeration,
- ChatRequestPluginModerationTypedDict,
- ChatRequestPluginResponseHealing,
- ChatRequestPluginResponseHealingTypedDict,
- ChatRequestPluginUnion,
- ChatRequestPluginUnionTypedDict,
- ChatRequestPluginWeb,
- ChatRequestPluginWebTypedDict,
- ChatRequestProvider,
- ChatRequestProviderSort,
- ChatRequestProviderSortConfig,
- ChatRequestProviderSortConfigEnum,
- ChatRequestProviderSortConfigTypedDict,
- ChatRequestProviderSortConfigUnion,
- ChatRequestProviderSortConfigUnionTypedDict,
- ChatRequestProviderTypedDict,
+ ChatRequestPlugin,
+ ChatRequestPluginTypedDict,
ChatRequestServiceTier,
- ChatRequestSortEnum,
- ChatRequestSortUnion,
- ChatRequestSortUnionTypedDict,
- ChatRequestTTL,
- ChatRequestTrace,
- ChatRequestTraceTypedDict,
- ChatRequestType,
ChatRequestTypedDict,
Effort,
Modality,
@@ -317,34 +290,10 @@ if TYPE_CHECKING:
ChatUserMessageRole,
ChatUserMessageTypedDict,
)
- from .chatwebsearchservertool import (
- ChatWebSearchServerTool,
- ChatWebSearchServerToolEngine,
- ChatWebSearchServerToolParameters,
- ChatWebSearchServerToolParametersType,
- ChatWebSearchServerToolParametersTypedDict,
- ChatWebSearchServerToolSearchContextSize,
- ChatWebSearchServerToolTypeOpenrouterWebSearch,
- ChatWebSearchServerToolTypedDict,
- ChatWebSearchServerToolUserLocation,
- ChatWebSearchServerToolUserLocationTypedDict,
- )
from .chatwebsearchshorthand import (
ChatWebSearchShorthand,
- ChatWebSearchShorthandEngine,
- ChatWebSearchShorthandParameters,
- ChatWebSearchShorthandParametersEngine,
- ChatWebSearchShorthandParametersSearchContextSize,
- ChatWebSearchShorthandParametersType,
- ChatWebSearchShorthandParametersTypedDict,
- ChatWebSearchShorthandParametersUserLocation,
- ChatWebSearchShorthandParametersUserLocationTypedDict,
- ChatWebSearchShorthandSearchContextSize,
ChatWebSearchShorthandType,
- ChatWebSearchShorthandTypeApproximate,
ChatWebSearchShorthandTypedDict,
- ChatWebSearchShorthandUserLocation,
- ChatWebSearchShorthandUserLocationTypedDict,
)
from .codeinterpreterservertool import (
CodeInterpreterServerTool,
@@ -391,7 +340,27 @@ if TYPE_CHECKING:
ContentPartDoneEventType,
ContentPartDoneEventTypedDict,
)
+ from .contentpartimage import (
+ ContentPartImage,
+ ContentPartImageImageURL,
+ ContentPartImageImageURLTypedDict,
+ ContentPartImageType,
+ ContentPartImageTypedDict,
+ )
from .contextcompressionengine import ContextCompressionEngine
+ from .contextcompressionplugin import (
+ ContextCompressionPlugin,
+ ContextCompressionPluginID,
+ ContextCompressionPluginTypedDict,
+ )
+ from .createguardrailrequest import (
+ CreateGuardrailRequest,
+ CreateGuardrailRequestTypedDict,
+ )
+ from .createguardrailresponse import (
+ CreateGuardrailResponse,
+ CreateGuardrailResponseTypedDict,
+ )
from .customtool import (
CustomTool,
CustomToolTypedDict,
@@ -406,15 +375,20 @@ if TYPE_CHECKING:
Syntax,
TypeCustom,
)
- from .datacollection import DataCollection
from .datetimeservertool import (
DatetimeServerTool,
- DatetimeServerToolParameters,
- DatetimeServerToolParametersTypedDict,
DatetimeServerToolType,
DatetimeServerToolTypedDict,
)
+ from .datetimeservertoolconfig import (
+ DatetimeServerToolConfig,
+ DatetimeServerToolConfigTypedDict,
+ )
from .defaultparameters import DefaultParameters, DefaultParametersTypedDict
+ from .deleteguardrailresponse import (
+ DeleteGuardrailResponse,
+ DeleteGuardrailResponseTypedDict,
+ )
from .easyinputmessage import (
EasyInputMessage,
EasyInputMessageContentInputImage,
@@ -445,15 +419,20 @@ if TYPE_CHECKING:
from .endpointstatus import EndpointStatus
from .errorevent import ErrorEvent, ErrorEventType, ErrorEventTypedDict
from .filecitation import FileCitation, FileCitationType, FileCitationTypedDict
+ from .fileparserplugin import (
+ FileParserPlugin,
+ FileParserPluginID,
+ FileParserPluginTypedDict,
+ )
from .filepath import FilePath, FilePathType, FilePathTypedDict
from .filesearchservertool import (
FileSearchServerTool,
- FileSearchServerToolFilters,
- FileSearchServerToolFiltersTypedDict,
FileSearchServerToolTypedDict,
Filters,
FiltersType,
FiltersTypedDict,
+ FiltersUnion,
+ FiltersUnionTypedDict,
Ranker,
RankingOptions,
RankingOptionsTypedDict,
@@ -483,6 +462,14 @@ if TYPE_CHECKING:
FormatTextConfigType,
FormatTextConfigTypedDict,
)
+ from .frameimage import (
+ FrameImage,
+ FrameImageImageURL,
+ FrameImageImageURLTypedDict,
+ FrameImageType,
+ FrameImageTypedDict,
+ FrameType,
+ )
from .functioncallargsdeltaevent import (
FunctionCallArgsDeltaEvent,
FunctionCallArgsDeltaEventType,
@@ -501,20 +488,23 @@ if TYPE_CHECKING:
from .functioncalloutputitem import (
FunctionCallOutputItem,
FunctionCallOutputItemDetail,
+ FunctionCallOutputItemOutputType,
FunctionCallOutputItemOutputUnion1,
FunctionCallOutputItemOutputUnion1TypedDict,
FunctionCallOutputItemOutputUnion2,
FunctionCallOutputItemOutputUnion2TypedDict,
+ FunctionCallOutputItemStatus,
FunctionCallOutputItemTypeFunctionCallOutput,
FunctionCallOutputItemTypedDict,
OutputInputImage,
OutputInputImageTypedDict,
- OutputType,
)
- from .goneresponseerrordata import (
- GoneResponseErrorData,
- GoneResponseErrorDataTypedDict,
+ from .getguardrailresponse import (
+ GetGuardrailResponse,
+ GetGuardrailResponseTypedDict,
)
+ from .guardrail import Guardrail, GuardrailTypedDict
+ from .guardrailinterval import GuardrailInterval
from .imagegencallcompletedevent import (
ImageGenCallCompletedEvent,
ImageGenCallCompletedEventType,
@@ -552,8 +542,8 @@ if TYPE_CHECKING:
from .imagegenerationstatus import ImageGenerationStatus
from .incompletedetails import IncompleteDetails, IncompleteDetailsTypedDict, Reason
from .inputaudio import (
+ FormatEnum,
InputAudio,
- InputAudioFormat,
InputAudioInputAudio,
InputAudioInputAudioTypedDict,
InputAudioType,
@@ -588,7 +578,6 @@ if TYPE_CHECKING:
InputsContent1TypedDict,
InputsContent2,
InputsContent2TypedDict,
- InputsFormat,
InputsMessage,
InputsMessageTypedDict,
InputsPhaseCommentary,
@@ -622,6 +611,7 @@ if TYPE_CHECKING:
InternalServerResponseErrorData,
InternalServerResponseErrorDataTypedDict,
)
+ from .keyassignment import KeyAssignment, KeyAssignmentTypedDict
from .legacy_chatcontentvideo import (
LegacyChatContentVideo,
LegacyChatContentVideoType,
@@ -629,9 +619,6 @@ if TYPE_CHECKING:
)
from .legacy_websearchservertool import (
LegacyWebSearchServerTool,
- LegacyWebSearchServerToolEngine,
- LegacyWebSearchServerToolFilters,
- LegacyWebSearchServerToolFiltersTypedDict,
LegacyWebSearchServerToolType,
LegacyWebSearchServerToolTypedDict,
)
@@ -642,9 +629,23 @@ if TYPE_CHECKING:
ListEndpointsResponseTypedDict,
Tokenizer,
)
+ from .listguardrailsresponse import (
+ ListGuardrailsResponse,
+ ListGuardrailsResponseTypedDict,
+ )
+ from .listkeyassignmentsresponse import (
+ ListKeyAssignmentsResponse,
+ ListKeyAssignmentsResponseTypedDict,
+ )
+ from .listmemberassignmentsresponse import (
+ ListMemberAssignmentsResponse,
+ ListMemberAssignmentsResponseTypedDict,
+ )
from .mcpservertool import (
AllowedTools,
AllowedToolsTypedDict,
+ AllowedToolsUnion,
+ AllowedToolsUnionTypedDict,
Always,
AlwaysTypedDict,
ConnectorID,
@@ -657,7 +658,10 @@ if TYPE_CHECKING:
RequireApprovalAlways,
RequireApprovalNever,
RequireApprovalTypedDict,
+ RequireApprovalUnion,
+ RequireApprovalUnionTypedDict,
)
+ from .memberassignment import MemberAssignment, MemberAssignmentTypedDict
from .model import Model, ModelTypedDict
from .modelarchitecture import (
ModelArchitecture,
@@ -665,6 +669,7 @@ if TYPE_CHECKING:
ModelArchitectureTypedDict,
)
from .modelgroup import ModelGroup
+ from .modellinks import ModelLinks, ModelLinksTypedDict
from .modelscountresponse import (
Data,
DataTypedDict,
@@ -672,10 +677,42 @@ if TYPE_CHECKING:
ModelsCountResponseTypedDict,
)
from .modelslistresponse import ModelsListResponse, ModelsListResponseTypedDict
+ from .moderationplugin import (
+ ModerationPlugin,
+ ModerationPluginID,
+ ModerationPluginTypedDict,
+ )
from .notfoundresponseerrordata import (
NotFoundResponseErrorData,
NotFoundResponseErrorDataTypedDict,
)
+ from .openairesponsefunctiontoolcall import (
+ OpenAIResponseFunctionToolCall,
+ OpenAIResponseFunctionToolCallType,
+ OpenAIResponseFunctionToolCallTypedDict,
+ )
+ from .openairesponsefunctiontoolcalloutput import (
+ OpenAIResponseFunctionToolCallOutput,
+ OpenAIResponseFunctionToolCallOutputOutput1,
+ OpenAIResponseFunctionToolCallOutputOutput1TypedDict,
+ OpenAIResponseFunctionToolCallOutputOutput2,
+ OpenAIResponseFunctionToolCallOutputOutput2TypedDict,
+ OpenAIResponseFunctionToolCallOutputStatus,
+ OpenAIResponseFunctionToolCallOutputType,
+ OpenAIResponseFunctionToolCallOutputTypedDict,
+ )
+ from .openairesponseinputmessageitem import (
+ OpenAIResponseInputMessageItem,
+ OpenAIResponseInputMessageItemContent,
+ OpenAIResponseInputMessageItemContentTypedDict,
+ OpenAIResponseInputMessageItemRoleDeveloper,
+ OpenAIResponseInputMessageItemRoleSystem,
+ OpenAIResponseInputMessageItemRoleUnion,
+ OpenAIResponseInputMessageItemRoleUnionTypedDict,
+ OpenAIResponseInputMessageItemRoleUser,
+ OpenAIResponseInputMessageItemType,
+ OpenAIResponseInputMessageItemTypedDict,
+ )
from .openairesponsesannotation import (
OpenAIResponsesAnnotation,
OpenAIResponsesAnnotationTypedDict,
@@ -703,6 +740,16 @@ if TYPE_CHECKING:
TypeTypedDict,
)
from .openairesponsestruncation import OpenAIResponsesTruncation
+ from .openresponsescreatedevent import (
+ OpenResponsesCreatedEvent,
+ OpenResponsesCreatedEventType,
+ OpenResponsesCreatedEventTypedDict,
+ )
+ from .openresponsesinprogressevent import (
+ OpenResponsesInProgressEvent,
+ OpenResponsesInProgressEventType,
+ OpenResponsesInProgressEventTypedDict,
+ )
from .openresponsesresult import (
OpenResponsesResult,
OpenResponsesResultObject,
@@ -713,9 +760,54 @@ if TYPE_CHECKING:
OpenResponsesResultType,
OpenResponsesResultTypedDict,
)
+ from .openrouterwebsearchservertool import (
+ OpenRouterWebSearchServerTool,
+ OpenRouterWebSearchServerToolType,
+ OpenRouterWebSearchServerToolTypedDict,
+ )
+ from .outputapplypatchservertoolitem import (
+ OutputApplyPatchServerToolItem,
+ OutputApplyPatchServerToolItemType,
+ OutputApplyPatchServerToolItemTypedDict,
+ )
+ from .outputbashservertoolitem import (
+ OutputBashServerToolItem,
+ OutputBashServerToolItemType,
+ OutputBashServerToolItemTypedDict,
+ )
+ from .outputbrowseruseservertoolitem import (
+ OutputBrowserUseServerToolItem,
+ OutputBrowserUseServerToolItemType,
+ OutputBrowserUseServerToolItemTypedDict,
+ )
+ from .outputcodeinterpretercallitem import (
+ OutputCodeInterpreterCallItem,
+ OutputCodeInterpreterCallItemOutputUnion,
+ OutputCodeInterpreterCallItemOutputUnionTypedDict,
+ OutputCodeInterpreterCallItemTypedDict,
+ OutputImage,
+ OutputImageTypedDict,
+ OutputLogs,
+ OutputLogsTypedDict,
+ TypeCodeInterpreterCall,
+ TypeImage,
+ TypeLogs,
+ )
+ from .outputcodeinterpreterservertoolitem import (
+ OutputCodeInterpreterServerToolItem,
+ OutputCodeInterpreterServerToolItemType,
+ OutputCodeInterpreterServerToolItemTypedDict,
+ )
+ from .outputcomputercallitem import (
+ OutputComputerCallItem,
+ OutputComputerCallItemStatus,
+ OutputComputerCallItemType,
+ OutputComputerCallItemTypedDict,
+ PendingSafetyCheck,
+ PendingSafetyCheckTypedDict,
+ )
from .outputdatetimeitem import (
OutputDatetimeItem,
- OutputDatetimeItemStatus,
OutputDatetimeItemType,
OutputDatetimeItemTypedDict,
)
@@ -724,6 +816,11 @@ if TYPE_CHECKING:
OutputFileSearchCallItemType,
OutputFileSearchCallItemTypedDict,
)
+ from .outputfilesearchservertoolitem import (
+ OutputFileSearchServerToolItem,
+ OutputFileSearchServerToolItemType,
+ OutputFileSearchServerToolItemTypedDict,
+ )
from .outputfunctioncallitem import (
OutputFunctionCallItem,
OutputFunctionCallItemStatusCompleted,
@@ -739,12 +836,28 @@ if TYPE_CHECKING:
OutputImageGenerationCallItemType,
OutputImageGenerationCallItemTypedDict,
)
+ from .outputimagegenerationservertoolitem import (
+ OutputImageGenerationServerToolItem,
+ OutputImageGenerationServerToolItemType,
+ OutputImageGenerationServerToolItemTypedDict,
+ )
from .outputitemimagegenerationcall import (
OutputItemImageGenerationCall,
OutputItemImageGenerationCallType,
OutputItemImageGenerationCallTypedDict,
)
from .outputitems import OutputItems, OutputItemsTypedDict
+ from .outputmcpservertoolitem import (
+ OutputMcpServerToolItem,
+ OutputMcpServerToolItemType,
+ OutputMcpServerToolItemTypedDict,
+ )
+ from .outputmemoryservertoolitem import (
+ ActionEnum,
+ OutputMemoryServerToolItem,
+ OutputMemoryServerToolItemType,
+ OutputMemoryServerToolItemTypedDict,
+ )
from .outputmessage import (
OutputMessage,
OutputMessageContent,
@@ -783,7 +896,6 @@ if TYPE_CHECKING:
from .outputmodalityenum import OutputModalityEnum
from .outputreasoningitem import (
OutputReasoningItem,
- OutputReasoningItemFormat,
OutputReasoningItemStatusCompleted,
OutputReasoningItemStatusInProgress,
OutputReasoningItemStatusIncomplete,
@@ -792,10 +904,21 @@ if TYPE_CHECKING:
OutputReasoningItemType,
OutputReasoningItemTypedDict,
)
- from .outputservertoolitem import (
- OutputServerToolItem,
- OutputServerToolItemStatus,
- OutputServerToolItemTypedDict,
+ from .outputtexteditorservertoolitem import (
+ Command,
+ OutputTextEditorServerToolItem,
+ OutputTextEditorServerToolItemType,
+ OutputTextEditorServerToolItemTypedDict,
+ )
+ from .outputtoolsearchservertoolitem import (
+ OutputToolSearchServerToolItem,
+ OutputToolSearchServerToolItemType,
+ OutputToolSearchServerToolItemTypedDict,
+ )
+ from .outputwebfetchservertoolitem import (
+ OutputWebFetchServerToolItem,
+ OutputWebFetchServerToolItemType,
+ OutputWebFetchServerToolItemTypedDict,
)
from .outputwebsearchcallitem import (
Action,
@@ -808,14 +931,16 @@ if TYPE_CHECKING:
ActionTypedDict,
OutputWebSearchCallItem,
OutputWebSearchCallItemTypedDict,
- Source,
- SourceTypedDict,
TypeFindInPage,
TypeOpenPage,
TypeSearch,
- TypeURL,
TypeWebSearchCall,
)
+ from .outputwebsearchservertoolitem import (
+ OutputWebSearchServerToolItem,
+ OutputWebSearchServerToolItemType,
+ OutputWebSearchServerToolItemTypedDict,
+ )
from .parameter import Parameter
from .payloadtoolargeresponseerrordata import (
PayloadTooLargeResponseErrorData,
@@ -849,17 +974,11 @@ if TYPE_CHECKING:
)
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
- Preview20250311WebSearchServerToolEngine,
- Preview20250311WebSearchServerToolFilters,
- Preview20250311WebSearchServerToolFiltersTypedDict,
Preview20250311WebSearchServerToolType,
Preview20250311WebSearchServerToolTypedDict,
)
from .preview_websearchservertool import (
PreviewWebSearchServerTool,
- PreviewWebSearchServerToolEngine,
- PreviewWebSearchServerToolFilters,
- PreviewWebSearchServerToolFiltersTypedDict,
PreviewWebSearchServerToolType,
PreviewWebSearchServerToolTypedDict,
)
@@ -874,27 +993,24 @@ if TYPE_CHECKING:
ProviderOverloadedResponseErrorDataTypedDict,
)
from .providerpreferences import (
+ DataCollection,
+ Ignore,
+ IgnoreTypedDict,
+ MaxPrice,
+ MaxPriceTypedDict,
+ Only,
+ OnlyTypedDict,
+ Order,
+ OrderTypedDict,
ProviderPreferences,
- ProviderPreferencesBy,
- ProviderPreferencesIgnore,
- ProviderPreferencesIgnoreTypedDict,
- ProviderPreferencesMaxPrice,
- ProviderPreferencesMaxPriceTypedDict,
- ProviderPreferencesOnly,
- ProviderPreferencesOnlyTypedDict,
- ProviderPreferencesOrder,
- ProviderPreferencesOrderTypedDict,
- ProviderPreferencesPartition,
- ProviderPreferencesProviderSort,
- ProviderPreferencesProviderSortConfig,
- ProviderPreferencesProviderSortConfigEnum,
- ProviderPreferencesProviderSortConfigTypedDict,
- ProviderPreferencesProviderSortConfigUnion,
- ProviderPreferencesProviderSortConfigUnionTypedDict,
- ProviderPreferencesSortEnum,
- ProviderPreferencesSortUnion,
- ProviderPreferencesSortUnionTypedDict,
ProviderPreferencesTypedDict,
+ Sort,
+ SortTypedDict,
+ )
+ from .providerresponse import (
+ ProviderResponse,
+ ProviderResponseProviderName,
+ ProviderResponseTypedDict,
)
from .providersort import ProviderSort
from .providersortconfig import (
@@ -920,19 +1036,16 @@ if TYPE_CHECKING:
)
from .reasoningdetailencrypted import (
ReasoningDetailEncrypted,
- ReasoningDetailEncryptedFormat,
ReasoningDetailEncryptedType,
ReasoningDetailEncryptedTypedDict,
)
from .reasoningdetailsummary import (
ReasoningDetailSummary,
- ReasoningDetailSummaryFormat,
ReasoningDetailSummaryType,
ReasoningDetailSummaryTypedDict,
)
from .reasoningdetailtext import (
ReasoningDetailText,
- ReasoningDetailTextFormat,
ReasoningDetailTextType,
ReasoningDetailTextTypedDict,
)
@@ -945,10 +1058,10 @@ if TYPE_CHECKING:
ReasoningDoneEventType,
ReasoningDoneEventTypedDict,
)
- from .reasoningeffortenum import ReasoningEffortEnum
+ from .reasoningeffort import ReasoningEffort
+ from .reasoningformat import ReasoningFormat
from .reasoningitem import (
ReasoningItem,
- ReasoningItemFormat,
ReasoningItemStatusCompleted,
ReasoningItemStatusInProgress,
ReasoningItemStatusIncomplete,
@@ -982,7 +1095,7 @@ if TYPE_CHECKING:
ReasoningSummaryTextDoneEventType,
ReasoningSummaryTextDoneEventTypedDict,
)
- from .reasoningsummaryverbosityenum import ReasoningSummaryVerbosityEnum
+ from .reasoningsummaryverbosity import ReasoningSummaryVerbosity
from .reasoningtextcontent import (
ReasoningTextContent,
ReasoningTextContentType,
@@ -1002,11 +1115,16 @@ if TYPE_CHECKING:
RequestTimeoutResponseErrorData,
RequestTimeoutResponseErrorDataTypedDict,
)
+ from .responsehealingplugin import (
+ ResponseHealingPlugin,
+ ResponseHealingPluginID,
+ ResponseHealingPluginTypedDict,
+ )
from .responseincludesenum import ResponseIncludesEnum
from .responseoutputtext import (
+ Logprob,
+ LogprobTypedDict,
ResponseOutputText,
- ResponseOutputTextLogprob,
- ResponseOutputTextLogprobTypedDict,
ResponseOutputTextTopLogprob,
ResponseOutputTextTopLogprobTypedDict,
ResponseOutputTextType,
@@ -1019,51 +1137,20 @@ if TYPE_CHECKING:
)
from .responsesrequest import (
ResponsesRequest,
- ResponsesRequestIDAutoRouter,
- ResponsesRequestIDContextCompression,
- ResponsesRequestIDFileParser,
- ResponsesRequestIDModeration,
- ResponsesRequestIDResponseHealing,
- ResponsesRequestIDWeb,
- ResponsesRequestIgnore,
- ResponsesRequestIgnoreTypedDict,
ResponsesRequestImageConfig,
ResponsesRequestImageConfigTypedDict,
- ResponsesRequestMaxPrice,
- ResponsesRequestMaxPriceTypedDict,
- ResponsesRequestOnly,
- ResponsesRequestOnlyTypedDict,
- ResponsesRequestOrder,
- ResponsesRequestOrderTypedDict,
- ResponsesRequestPluginAutoRouter,
- ResponsesRequestPluginAutoRouterTypedDict,
- ResponsesRequestPluginContextCompression,
- ResponsesRequestPluginContextCompressionTypedDict,
- ResponsesRequestPluginFileParser,
- ResponsesRequestPluginFileParserTypedDict,
- ResponsesRequestPluginModeration,
- ResponsesRequestPluginModerationTypedDict,
- ResponsesRequestPluginResponseHealing,
- ResponsesRequestPluginResponseHealingTypedDict,
- ResponsesRequestPluginUnion,
- ResponsesRequestPluginUnionTypedDict,
- ResponsesRequestPluginWeb,
- ResponsesRequestPluginWebTypedDict,
- ResponsesRequestProvider,
- ResponsesRequestProviderTypedDict,
+ ResponsesRequestPlugin,
+ ResponsesRequestPluginTypedDict,
ResponsesRequestServiceTier,
- ResponsesRequestSort,
- ResponsesRequestSortTypedDict,
ResponsesRequestToolFunction,
ResponsesRequestToolFunctionTypedDict,
ResponsesRequestToolUnion,
ResponsesRequestToolUnionTypedDict,
- ResponsesRequestTrace,
- ResponsesRequestTraceTypedDict,
ResponsesRequestType,
ResponsesRequestTypedDict,
)
from .searchcontextsizeenum import SearchContextSizeEnum
+ from .searchqualitylevel import SearchQualityLevel
from .security import Security, SecurityTypedDict
from .serviceunavailableresponseerrordata import (
ServiceUnavailableResponseErrorData,
@@ -1080,62 +1167,66 @@ if TYPE_CHECKING:
Variables,
VariablesTypedDict,
)
- from .streamevents import (
- StreamEvents,
+ from .streamevents import StreamEvents, StreamEventsTypedDict
+ from .streameventsresponsecompleted import (
StreamEventsResponseCompleted,
+ StreamEventsResponseCompletedType,
StreamEventsResponseCompletedTypedDict,
- StreamEventsResponseCreated,
- StreamEventsResponseCreatedTypedDict,
+ )
+ from .streameventsresponsefailed import (
StreamEventsResponseFailed,
+ StreamEventsResponseFailedType,
StreamEventsResponseFailedTypedDict,
- StreamEventsResponseInProgress,
- StreamEventsResponseInProgressTypedDict,
+ )
+ from .streameventsresponseincomplete import (
StreamEventsResponseIncomplete,
+ StreamEventsResponseIncompleteType,
StreamEventsResponseIncompleteTypedDict,
+ )
+ from .streameventsresponseoutputitemadded import (
StreamEventsResponseOutputItemAdded,
+ StreamEventsResponseOutputItemAddedType,
StreamEventsResponseOutputItemAddedTypedDict,
+ )
+ from .streameventsresponseoutputitemdone import (
StreamEventsResponseOutputItemDone,
+ StreamEventsResponseOutputItemDoneType,
StreamEventsResponseOutputItemDoneTypedDict,
- StreamEventsTypedDict,
- TypeResponseCompleted,
- TypeResponseCreated,
- TypeResponseFailed,
- TypeResponseInProgress,
- TypeResponseIncomplete,
- TypeResponseOutputItemAdded,
- TypeResponseOutputItemDone,
+ )
+ from .streamlogprob import StreamLogprob, StreamLogprobTypedDict
+ from .streamlogprobtoplogprob import (
+ StreamLogprobTopLogprob,
+ StreamLogprobTopLogprobTypedDict,
)
from .textconfig import TextConfig, TextConfigTypedDict, TextConfigVerbosity
from .textdeltaevent import (
TextDeltaEvent,
- TextDeltaEventLogprob,
- TextDeltaEventLogprobTypedDict,
- TextDeltaEventTopLogprob,
- TextDeltaEventTopLogprobTypedDict,
TextDeltaEventType,
TextDeltaEventTypedDict,
)
- from .textdoneevent import (
- TextDoneEvent,
- TextDoneEventLogprob,
- TextDoneEventLogprobTypedDict,
- TextDoneEventTopLogprob,
- TextDoneEventTopLogprobTypedDict,
- TextDoneEventType,
- TextDoneEventTypedDict,
- )
+ from .textdoneevent import TextDoneEvent, TextDoneEventType, TextDoneEventTypedDict
from .textextendedconfig import (
TextExtendedConfig,
TextExtendedConfigTypedDict,
TextExtendedConfigVerbosity,
)
- from .toolcallstatusenum import ToolCallStatusEnum
+ from .toolcallstatus import ToolCallStatus
+ from .toolchoiceallowed import (
+ Mode,
+ ModeAuto,
+ ModeRequired,
+ ModeTypedDict,
+ ToolChoiceAllowed,
+ ToolChoiceAllowedType,
+ ToolChoiceAllowedTypedDict,
+ )
from .toomanyrequestsresponseerrordata import (
TooManyRequestsResponseErrorData,
TooManyRequestsResponseErrorDataTypedDict,
)
from .topproviderinfo import TopProviderInfo, TopProviderInfoTypedDict
- from .truncationenum import TruncationEnum
+ from .traceconfig import TraceConfig, TraceConfigTypedDict
+ from .truncation import Truncation
from .unauthorizedresponseerrordata import (
UnauthorizedResponseErrorData,
UnauthorizedResponseErrorDataTypedDict,
@@ -1144,6 +1235,14 @@ if TYPE_CHECKING:
UnprocessableEntityResponseErrorData,
UnprocessableEntityResponseErrorDataTypedDict,
)
+ from .updateguardrailrequest import (
+ UpdateGuardrailRequest,
+ UpdateGuardrailRequestTypedDict,
+ )
+ from .updateguardrailresponse import (
+ UpdateGuardrailResponse,
+ UpdateGuardrailResponseTypedDict,
+ )
from .urlcitation import URLCitation, URLCitationType, URLCitationTypedDict
from .usage import (
CostDetails,
@@ -1155,6 +1254,37 @@ if TYPE_CHECKING:
Usage,
UsageTypedDict,
)
+ from .videogenerationrequest import (
+ AspectRatio,
+ Options,
+ OptionsTypedDict,
+ Provider,
+ ProviderTypedDict,
+ Resolution,
+ VideoGenerationRequest,
+ VideoGenerationRequestTypedDict,
+ )
+ from .videogenerationresponse import (
+ VideoGenerationResponse,
+ VideoGenerationResponseStatus,
+ VideoGenerationResponseTypedDict,
+ )
+ from .videogenerationusage import (
+ VideoGenerationUsage,
+ VideoGenerationUsageTypedDict,
+ )
+ from .videomodel import (
+ SupportedAspectRatio,
+ SupportedFrameImage,
+ SupportedResolution,
+ SupportedSize,
+ VideoModel,
+ VideoModelTypedDict,
+ )
+ from .videomodelslistresponse import (
+ VideoModelsListResponse,
+ VideoModelsListResponseTypedDict,
+ )
from .websearchcallcompletedevent import (
WebSearchCallCompletedEvent,
WebSearchCallCompletedEventType,
@@ -1170,31 +1300,50 @@ if TYPE_CHECKING:
WebSearchCallSearchingEventType,
WebSearchCallSearchingEventTypedDict,
)
+ from .websearchconfig import WebSearchConfig, WebSearchConfigTypedDict
+ from .websearchdomainfilter import (
+ WebSearchDomainFilter,
+ WebSearchDomainFilterTypedDict,
+ )
from .websearchengine import WebSearchEngine
+ from .websearchengineenum import WebSearchEngineEnum
+ from .websearchplugin import (
+ WebSearchPlugin,
+ WebSearchPluginID,
+ WebSearchPluginTypedDict,
+ )
from .websearchservertool import (
WebSearchServerTool,
- WebSearchServerToolEngine,
- WebSearchServerToolFilters,
- WebSearchServerToolFiltersTypedDict,
WebSearchServerToolType,
WebSearchServerToolTypedDict,
)
from .websearchservertool_openrouter import (
+ Parameters,
+ ParametersTypedDict,
WebSearchServerToolOpenRouter,
- WebSearchServerToolOpenRouterParameters,
- WebSearchServerToolOpenRouterParametersTypedDict,
WebSearchServerToolOpenRouterType,
WebSearchServerToolOpenRouterTypedDict,
)
+ from .websearchsource import (
+ WebSearchSource,
+ WebSearchSourceType,
+ WebSearchSourceTypedDict,
+ )
from .websearchstatus import WebSearchStatus
from .websearchuserlocation import (
WebSearchUserLocation,
WebSearchUserLocationType,
WebSearchUserLocationTypedDict,
)
+ from .websearchuserlocationservertool import (
+ WebSearchUserLocationServerTool,
+ WebSearchUserLocationServerToolType,
+ WebSearchUserLocationServerToolTypedDict,
+ )
__all__ = [
"Action",
+ "ActionEnum",
"ActionFindInPage",
"ActionFindInPageTypedDict",
"ActionOpenPage",
@@ -1204,18 +1353,30 @@ __all__ = [
"ActionTypedDict",
"ActivityItem",
"ActivityItemTypedDict",
+ "ActivityResponse",
+ "ActivityResponseTypedDict",
"AllowedTools",
"AllowedToolsTypedDict",
+ "AllowedToolsUnion",
+ "AllowedToolsUnionTypedDict",
"Always",
"AlwaysTypedDict",
"AnnotationAddedEvent",
"AnnotationAddedEventType",
"AnnotationAddedEventTypedDict",
+ "AnthropicCacheControlDirective",
+ "AnthropicCacheControlDirectiveType",
+ "AnthropicCacheControlDirectiveTypedDict",
+ "AnthropicCacheControlTTL",
"ApplyPatchServerTool",
"ApplyPatchServerToolType",
"ApplyPatchServerToolTypedDict",
"Architecture",
"ArchitectureTypedDict",
+ "AspectRatio",
+ "AutoRouterPlugin",
+ "AutoRouterPluginID",
+ "AutoRouterPluginTypedDict",
"Background",
"BadGatewayResponseErrorData",
"BadGatewayResponseErrorDataTypedDict",
@@ -1225,48 +1386,42 @@ __all__ = [
"BaseInputsContent1TypedDict",
"BaseInputsContent2",
"BaseInputsContent2TypedDict",
- "BaseInputsContent3",
- "BaseInputsContent3TypedDict",
- "BaseInputsFunctionCall",
- "BaseInputsFunctionCallOutput",
- "BaseInputsFunctionCallOutputTypedDict",
- "BaseInputsFunctionCallTypedDict",
- "BaseInputsMessage1",
- "BaseInputsMessage1TypedDict",
- "BaseInputsMessage2",
- "BaseInputsMessage2TypedDict",
- "BaseInputsOutput1",
- "BaseInputsOutput1TypedDict",
- "BaseInputsOutput2",
- "BaseInputsOutput2TypedDict",
+ "BaseInputsMessage",
+ "BaseInputsMessageTypedDict",
"BaseInputsPhaseCommentary",
"BaseInputsPhaseFinalAnswer",
"BaseInputsPhaseUnion",
"BaseInputsPhaseUnionTypedDict",
"BaseInputsRoleAssistant",
- "BaseInputsRoleDeveloper1",
- "BaseInputsRoleDeveloper2",
- "BaseInputsRoleSystem1",
- "BaseInputsRoleSystem2",
- "BaseInputsRoleUnion1",
- "BaseInputsRoleUnion1TypedDict",
- "BaseInputsRoleUnion2",
- "BaseInputsRoleUnion2TypedDict",
- "BaseInputsRoleUser1",
- "BaseInputsRoleUser2",
- "BaseInputsTypeFunctionCall",
- "BaseInputsTypeFunctionCallOutput",
- "BaseInputsTypeMessage1",
- "BaseInputsTypeMessage2",
+ "BaseInputsRoleDeveloper",
+ "BaseInputsRoleSystem",
+ "BaseInputsRoleUnion",
+ "BaseInputsRoleUnionTypedDict",
+ "BaseInputsRoleUser",
+ "BaseInputsType",
"BaseInputsUnion",
"BaseInputsUnion1",
"BaseInputsUnion1TypedDict",
"BaseInputsUnionTypedDict",
"BaseReasoningConfig",
"BaseReasoningConfigTypedDict",
+ "BulkAssignKeysRequest",
+ "BulkAssignKeysRequestTypedDict",
+ "BulkAssignKeysResponse",
+ "BulkAssignKeysResponseTypedDict",
+ "BulkAssignMembersRequest",
+ "BulkAssignMembersRequestTypedDict",
+ "BulkAssignMembersResponse",
+ "BulkAssignMembersResponseTypedDict",
+ "BulkUnassignKeysRequest",
+ "BulkUnassignKeysRequestTypedDict",
+ "BulkUnassignKeysResponse",
+ "BulkUnassignKeysResponseTypedDict",
+ "BulkUnassignMembersRequest",
+ "BulkUnassignMembersRequestTypedDict",
+ "BulkUnassignMembersResponse",
+ "BulkUnassignMembersResponseTypedDict",
"By",
- "CacheControl",
- "CacheControlTypedDict",
"ChatAssistantImages",
"ChatAssistantImagesImageURL",
"ChatAssistantImagesImageURLTypedDict",
@@ -1286,7 +1441,6 @@ __all__ = [
"ChatContentAudioType",
"ChatContentAudioTypedDict",
"ChatContentCacheControl",
- "ChatContentCacheControlTTL",
"ChatContentCacheControlType",
"ChatContentCacheControlTypedDict",
"ChatContentFile",
@@ -1299,8 +1453,6 @@ __all__ = [
"ChatContentImageType",
"ChatContentImageTypedDict",
"ChatContentItems",
- "ChatContentItems1",
- "ChatContentItems1TypedDict",
"ChatContentItemsTypedDict",
"ChatContentText",
"ChatContentTextType",
@@ -1348,54 +1500,11 @@ __all__ = [
"ChatNamedToolChoiceTypedDict",
"ChatReasoningSummaryVerbosityEnum",
"ChatRequest",
- "ChatRequestBy",
- "ChatRequestIDAutoRouter",
- "ChatRequestIDContextCompression",
- "ChatRequestIDFileParser",
- "ChatRequestIDModeration",
- "ChatRequestIDResponseHealing",
- "ChatRequestIDWeb",
- "ChatRequestIgnore",
- "ChatRequestIgnoreTypedDict",
"ChatRequestImageConfig",
"ChatRequestImageConfigTypedDict",
- "ChatRequestMaxPrice",
- "ChatRequestMaxPriceTypedDict",
- "ChatRequestOnly",
- "ChatRequestOnlyTypedDict",
- "ChatRequestOrder",
- "ChatRequestOrderTypedDict",
- "ChatRequestPartition",
- "ChatRequestPluginAutoRouter",
- "ChatRequestPluginAutoRouterTypedDict",
- "ChatRequestPluginContextCompression",
- "ChatRequestPluginContextCompressionTypedDict",
- "ChatRequestPluginFileParser",
- "ChatRequestPluginFileParserTypedDict",
- "ChatRequestPluginModeration",
- "ChatRequestPluginModerationTypedDict",
- "ChatRequestPluginResponseHealing",
- "ChatRequestPluginResponseHealingTypedDict",
- "ChatRequestPluginUnion",
- "ChatRequestPluginUnionTypedDict",
- "ChatRequestPluginWeb",
- "ChatRequestPluginWebTypedDict",
- "ChatRequestProvider",
- "ChatRequestProviderSort",
- "ChatRequestProviderSortConfig",
- "ChatRequestProviderSortConfigEnum",
- "ChatRequestProviderSortConfigTypedDict",
- "ChatRequestProviderSortConfigUnion",
- "ChatRequestProviderSortConfigUnionTypedDict",
- "ChatRequestProviderTypedDict",
+ "ChatRequestPlugin",
+ "ChatRequestPluginTypedDict",
"ChatRequestServiceTier",
- "ChatRequestSortEnum",
- "ChatRequestSortUnion",
- "ChatRequestSortUnionTypedDict",
- "ChatRequestTTL",
- "ChatRequestTrace",
- "ChatRequestTraceTypedDict",
- "ChatRequestType",
"ChatRequestTypedDict",
"ChatResult",
"ChatResultObject",
@@ -1448,37 +1557,16 @@ __all__ = [
"ChatUserMessageContentTypedDict",
"ChatUserMessageRole",
"ChatUserMessageTypedDict",
- "ChatWebSearchServerTool",
- "ChatWebSearchServerToolEngine",
- "ChatWebSearchServerToolParameters",
- "ChatWebSearchServerToolParametersType",
- "ChatWebSearchServerToolParametersTypedDict",
- "ChatWebSearchServerToolSearchContextSize",
- "ChatWebSearchServerToolTypeOpenrouterWebSearch",
- "ChatWebSearchServerToolTypedDict",
- "ChatWebSearchServerToolUserLocation",
- "ChatWebSearchServerToolUserLocationTypedDict",
"ChatWebSearchShorthand",
- "ChatWebSearchShorthandEngine",
- "ChatWebSearchShorthandParameters",
- "ChatWebSearchShorthandParametersEngine",
- "ChatWebSearchShorthandParametersSearchContextSize",
- "ChatWebSearchShorthandParametersType",
- "ChatWebSearchShorthandParametersTypedDict",
- "ChatWebSearchShorthandParametersUserLocation",
- "ChatWebSearchShorthandParametersUserLocationTypedDict",
- "ChatWebSearchShorthandSearchContextSize",
"ChatWebSearchShorthandType",
- "ChatWebSearchShorthandTypeApproximate",
"ChatWebSearchShorthandTypedDict",
- "ChatWebSearchShorthandUserLocation",
- "ChatWebSearchShorthandUserLocationTypedDict",
"Code",
"CodeInterpreterServerTool",
"CodeInterpreterServerToolTypedDict",
"CodexLocalShellTool",
"CodexLocalShellToolType",
"CodexLocalShellToolTypedDict",
+ "Command",
"CompletionTokensDetails",
"CompletionTokensDetailsTypedDict",
"CompoundFilter",
@@ -1505,21 +1593,35 @@ __all__ = [
"ContentPartDoneEventPartTypedDict",
"ContentPartDoneEventType",
"ContentPartDoneEventTypedDict",
+ "ContentPartImage",
+ "ContentPartImageImageURL",
+ "ContentPartImageImageURLTypedDict",
+ "ContentPartImageType",
+ "ContentPartImageTypedDict",
"ContextCompressionEngine",
+ "ContextCompressionPlugin",
+ "ContextCompressionPluginID",
+ "ContextCompressionPluginTypedDict",
"CostDetails",
"CostDetailsTypedDict",
+ "CreateGuardrailRequest",
+ "CreateGuardrailRequestTypedDict",
+ "CreateGuardrailResponse",
+ "CreateGuardrailResponseTypedDict",
"CustomTool",
"CustomToolTypedDict",
"Data",
"DataCollection",
"DataTypedDict",
"DatetimeServerTool",
- "DatetimeServerToolParameters",
- "DatetimeServerToolParametersTypedDict",
+ "DatetimeServerToolConfig",
+ "DatetimeServerToolConfigTypedDict",
"DatetimeServerToolType",
"DatetimeServerToolTypedDict",
"DefaultParameters",
"DefaultParametersTypedDict",
+ "DeleteGuardrailResponse",
+ "DeleteGuardrailResponseTypedDict",
"EasyInputMessage",
"EasyInputMessageContentInputImage",
"EasyInputMessageContentInputImageTypedDict",
@@ -1555,20 +1657,24 @@ __all__ = [
"FileCitation",
"FileCitationType",
"FileCitationTypedDict",
+ "FileParserPlugin",
+ "FileParserPluginID",
+ "FileParserPluginTypedDict",
"FilePath",
"FilePathType",
"FilePathTypedDict",
"FileSearchServerTool",
- "FileSearchServerToolFilters",
- "FileSearchServerToolFiltersTypedDict",
"FileSearchServerToolTypedDict",
"FileTypedDict",
"Filters",
"FiltersType",
"FiltersTypedDict",
+ "FiltersUnion",
+ "FiltersUnionTypedDict",
"ForbiddenResponseErrorData",
"ForbiddenResponseErrorDataTypedDict",
"Format",
+ "FormatEnum",
"FormatGrammar",
"FormatGrammarTypedDict",
"FormatJSONObjectConfig",
@@ -1587,6 +1693,12 @@ __all__ = [
"FormatTypedDict",
"Formats",
"FormatsTypedDict",
+ "FrameImage",
+ "FrameImageImageURL",
+ "FrameImageImageURLTypedDict",
+ "FrameImageType",
+ "FrameImageTypedDict",
+ "FrameType",
"FunctionCallArgsDeltaEvent",
"FunctionCallArgsDeltaEventType",
"FunctionCallArgsDeltaEventTypedDict",
@@ -1598,14 +1710,21 @@ __all__ = [
"FunctionCallItemTypedDict",
"FunctionCallOutputItem",
"FunctionCallOutputItemDetail",
+ "FunctionCallOutputItemOutputType",
"FunctionCallOutputItemOutputUnion1",
"FunctionCallOutputItemOutputUnion1TypedDict",
"FunctionCallOutputItemOutputUnion2",
"FunctionCallOutputItemOutputUnion2TypedDict",
+ "FunctionCallOutputItemStatus",
"FunctionCallOutputItemTypeFunctionCallOutput",
"FunctionCallOutputItemTypedDict",
- "GoneResponseErrorData",
- "GoneResponseErrorDataTypedDict",
+ "GetGuardrailResponse",
+ "GetGuardrailResponseTypedDict",
+ "Guardrail",
+ "GuardrailInterval",
+ "GuardrailTypedDict",
+ "Ignore",
+ "IgnoreTypedDict",
"ImageGenCallCompletedEvent",
"ImageGenCallCompletedEventType",
"ImageGenCallCompletedEventTypedDict",
@@ -1625,7 +1744,6 @@ __all__ = [
"IncompleteDetails",
"IncompleteDetailsTypedDict",
"InputAudio",
- "InputAudioFormat",
"InputAudioInputAudio",
"InputAudioInputAudioTypedDict",
"InputAudioType",
@@ -1667,7 +1785,6 @@ __all__ = [
"InputsContent1TypedDict",
"InputsContent2",
"InputsContent2TypedDict",
- "InputsFormat",
"InputsMessage",
"InputsMessageTypedDict",
"InputsPhaseCommentary",
@@ -1696,38 +1813,81 @@ __all__ = [
"InstructType",
"InternalServerResponseErrorData",
"InternalServerResponseErrorDataTypedDict",
+ "KeyAssignment",
+ "KeyAssignmentTypedDict",
"LegacyChatContentVideo",
"LegacyChatContentVideoType",
"LegacyChatContentVideoTypedDict",
"LegacyWebSearchServerTool",
- "LegacyWebSearchServerToolEngine",
- "LegacyWebSearchServerToolFilters",
- "LegacyWebSearchServerToolFiltersTypedDict",
"LegacyWebSearchServerToolType",
"LegacyWebSearchServerToolTypedDict",
"ListEndpointsResponse",
"ListEndpointsResponseTypedDict",
+ "ListGuardrailsResponse",
+ "ListGuardrailsResponseTypedDict",
+ "ListKeyAssignmentsResponse",
+ "ListKeyAssignmentsResponseTypedDict",
+ "ListMemberAssignmentsResponse",
+ "ListMemberAssignmentsResponseTypedDict",
+ "Logprob",
+ "LogprobTypedDict",
+ "MaxPrice",
+ "MaxPriceTypedDict",
"McpServerTool",
"McpServerToolType",
"McpServerToolTypedDict",
+ "MemberAssignment",
+ "MemberAssignmentTypedDict",
"MemoryLimit",
"Modality",
+ "Mode",
+ "ModeAuto",
+ "ModeRequired",
+ "ModeTypedDict",
"Model",
"ModelArchitecture",
"ModelArchitectureInstructType",
"ModelArchitectureTypedDict",
"ModelEnum",
"ModelGroup",
+ "ModelLinks",
+ "ModelLinksTypedDict",
"ModelTypedDict",
"ModelsCountResponse",
"ModelsCountResponseTypedDict",
"ModelsListResponse",
"ModelsListResponseTypedDict",
"Moderation",
+ "ModerationPlugin",
+ "ModerationPluginID",
+ "ModerationPluginTypedDict",
"Never",
"NeverTypedDict",
"NotFoundResponseErrorData",
"NotFoundResponseErrorDataTypedDict",
+ "Only",
+ "OnlyTypedDict",
+ "OpenAIResponseFunctionToolCall",
+ "OpenAIResponseFunctionToolCallOutput",
+ "OpenAIResponseFunctionToolCallOutputOutput1",
+ "OpenAIResponseFunctionToolCallOutputOutput1TypedDict",
+ "OpenAIResponseFunctionToolCallOutputOutput2",
+ "OpenAIResponseFunctionToolCallOutputOutput2TypedDict",
+ "OpenAIResponseFunctionToolCallOutputStatus",
+ "OpenAIResponseFunctionToolCallOutputType",
+ "OpenAIResponseFunctionToolCallOutputTypedDict",
+ "OpenAIResponseFunctionToolCallType",
+ "OpenAIResponseFunctionToolCallTypedDict",
+ "OpenAIResponseInputMessageItem",
+ "OpenAIResponseInputMessageItemContent",
+ "OpenAIResponseInputMessageItemContentTypedDict",
+ "OpenAIResponseInputMessageItemRoleDeveloper",
+ "OpenAIResponseInputMessageItemRoleSystem",
+ "OpenAIResponseInputMessageItemRoleUnion",
+ "OpenAIResponseInputMessageItemRoleUnionTypedDict",
+ "OpenAIResponseInputMessageItemRoleUser",
+ "OpenAIResponseInputMessageItemType",
+ "OpenAIResponseInputMessageItemTypedDict",
"OpenAIResponsesAnnotation",
"OpenAIResponsesAnnotationTypedDict",
"OpenAIResponsesRefusalContent",
@@ -1747,6 +1907,12 @@ __all__ = [
"OpenAIResponsesToolChoiceUnion",
"OpenAIResponsesToolChoiceUnionTypedDict",
"OpenAIResponsesTruncation",
+ "OpenResponsesCreatedEvent",
+ "OpenResponsesCreatedEventType",
+ "OpenResponsesCreatedEventTypedDict",
+ "OpenResponsesInProgressEvent",
+ "OpenResponsesInProgressEventType",
+ "OpenResponsesInProgressEventTypedDict",
"OpenResponsesResult",
"OpenResponsesResultObject",
"OpenResponsesResultToolFunction",
@@ -1755,13 +1921,42 @@ __all__ = [
"OpenResponsesResultToolUnionTypedDict",
"OpenResponsesResultType",
"OpenResponsesResultTypedDict",
+ "OpenRouterWebSearchServerTool",
+ "OpenRouterWebSearchServerToolType",
+ "OpenRouterWebSearchServerToolTypedDict",
+ "Options",
+ "OptionsTypedDict",
+ "Order",
+ "OrderTypedDict",
+ "OutputApplyPatchServerToolItem",
+ "OutputApplyPatchServerToolItemType",
+ "OutputApplyPatchServerToolItemTypedDict",
+ "OutputBashServerToolItem",
+ "OutputBashServerToolItemType",
+ "OutputBashServerToolItemTypedDict",
+ "OutputBrowserUseServerToolItem",
+ "OutputBrowserUseServerToolItemType",
+ "OutputBrowserUseServerToolItemTypedDict",
+ "OutputCodeInterpreterCallItem",
+ "OutputCodeInterpreterCallItemOutputUnion",
+ "OutputCodeInterpreterCallItemOutputUnionTypedDict",
+ "OutputCodeInterpreterCallItemTypedDict",
+ "OutputCodeInterpreterServerToolItem",
+ "OutputCodeInterpreterServerToolItemType",
+ "OutputCodeInterpreterServerToolItemTypedDict",
+ "OutputComputerCallItem",
+ "OutputComputerCallItemStatus",
+ "OutputComputerCallItemType",
+ "OutputComputerCallItemTypedDict",
"OutputDatetimeItem",
- "OutputDatetimeItemStatus",
"OutputDatetimeItemType",
"OutputDatetimeItemTypedDict",
"OutputFileSearchCallItem",
"OutputFileSearchCallItemType",
"OutputFileSearchCallItemTypedDict",
+ "OutputFileSearchServerToolItem",
+ "OutputFileSearchServerToolItemType",
+ "OutputFileSearchServerToolItemTypedDict",
"OutputFormat",
"OutputFunctionCallItem",
"OutputFunctionCallItemStatusCompleted",
@@ -1771,9 +1966,14 @@ __all__ = [
"OutputFunctionCallItemStatusUnionTypedDict",
"OutputFunctionCallItemType",
"OutputFunctionCallItemTypedDict",
+ "OutputImage",
"OutputImageGenerationCallItem",
"OutputImageGenerationCallItemType",
"OutputImageGenerationCallItemTypedDict",
+ "OutputImageGenerationServerToolItem",
+ "OutputImageGenerationServerToolItemType",
+ "OutputImageGenerationServerToolItemTypedDict",
+ "OutputImageTypedDict",
"OutputInputImage",
"OutputInputImageTypedDict",
"OutputItemImageGenerationCall",
@@ -1781,6 +1981,14 @@ __all__ = [
"OutputItemImageGenerationCallTypedDict",
"OutputItems",
"OutputItemsTypedDict",
+ "OutputLogs",
+ "OutputLogsTypedDict",
+ "OutputMcpServerToolItem",
+ "OutputMcpServerToolItemType",
+ "OutputMcpServerToolItemTypedDict",
+ "OutputMemoryServerToolItem",
+ "OutputMemoryServerToolItemType",
+ "OutputMemoryServerToolItemTypedDict",
"OutputMessage",
"OutputMessageContent",
"OutputMessageContentTypedDict",
@@ -1814,7 +2022,6 @@ __all__ = [
"OutputModality",
"OutputModalityEnum",
"OutputReasoningItem",
- "OutputReasoningItemFormat",
"OutputReasoningItemStatusCompleted",
"OutputReasoningItemStatusInProgress",
"OutputReasoningItemStatusIncomplete",
@@ -1822,14 +2029,22 @@ __all__ = [
"OutputReasoningItemStatusUnionTypedDict",
"OutputReasoningItemType",
"OutputReasoningItemTypedDict",
- "OutputServerToolItem",
- "OutputServerToolItemStatus",
- "OutputServerToolItemTypedDict",
+ "OutputTextEditorServerToolItem",
+ "OutputTextEditorServerToolItemType",
+ "OutputTextEditorServerToolItemTypedDict",
"OutputTokensDetails",
"OutputTokensDetailsTypedDict",
- "OutputType",
+ "OutputToolSearchServerToolItem",
+ "OutputToolSearchServerToolItemType",
+ "OutputToolSearchServerToolItemTypedDict",
+ "OutputWebFetchServerToolItem",
+ "OutputWebFetchServerToolItemType",
+ "OutputWebFetchServerToolItemTypedDict",
"OutputWebSearchCallItem",
"OutputWebSearchCallItemTypedDict",
+ "OutputWebSearchServerToolItem",
+ "OutputWebSearchServerToolItemType",
+ "OutputWebSearchServerToolItemTypedDict",
"PDFParserEngine",
"PDFParserEngineEnum",
"PDFParserEnginePDFText",
@@ -1837,11 +2052,15 @@ __all__ = [
"PDFParserOptions",
"PDFParserOptionsTypedDict",
"Parameter",
+ "Parameters",
+ "ParametersTypedDict",
"Partition",
"PayloadTooLargeResponseErrorData",
"PayloadTooLargeResponseErrorDataTypedDict",
"PaymentRequiredResponseErrorData",
"PaymentRequiredResponseErrorDataTypedDict",
+ "PendingSafetyCheck",
+ "PendingSafetyCheckTypedDict",
"PerRequestLimits",
"PerRequestLimitsTypedDict",
"PercentileLatencyCutoffs",
@@ -1855,15 +2074,9 @@ __all__ = [
"PreferredMinThroughput",
"PreferredMinThroughputTypedDict",
"Preview20250311WebSearchServerTool",
- "Preview20250311WebSearchServerToolEngine",
- "Preview20250311WebSearchServerToolFilters",
- "Preview20250311WebSearchServerToolFiltersTypedDict",
"Preview20250311WebSearchServerToolType",
"Preview20250311WebSearchServerToolTypedDict",
"PreviewWebSearchServerTool",
- "PreviewWebSearchServerToolEngine",
- "PreviewWebSearchServerToolFilters",
- "PreviewWebSearchServerToolFiltersTypedDict",
"PreviewWebSearchServerToolType",
"PreviewWebSearchServerToolTypedDict",
"PreviewWebSearchUserLocation",
@@ -1873,33 +2086,19 @@ __all__ = [
"PricingTypedDict",
"PromptTokensDetails",
"PromptTokensDetailsTypedDict",
+ "Provider",
"ProviderName",
"ProviderOverloadedResponseErrorData",
"ProviderOverloadedResponseErrorDataTypedDict",
"ProviderPreferences",
- "ProviderPreferencesBy",
- "ProviderPreferencesIgnore",
- "ProviderPreferencesIgnoreTypedDict",
- "ProviderPreferencesMaxPrice",
- "ProviderPreferencesMaxPriceTypedDict",
- "ProviderPreferencesOnly",
- "ProviderPreferencesOnlyTypedDict",
- "ProviderPreferencesOrder",
- "ProviderPreferencesOrderTypedDict",
- "ProviderPreferencesPartition",
- "ProviderPreferencesProviderSort",
- "ProviderPreferencesProviderSortConfig",
- "ProviderPreferencesProviderSortConfigEnum",
- "ProviderPreferencesProviderSortConfigTypedDict",
- "ProviderPreferencesProviderSortConfigUnion",
- "ProviderPreferencesProviderSortConfigUnionTypedDict",
- "ProviderPreferencesSortEnum",
- "ProviderPreferencesSortUnion",
- "ProviderPreferencesSortUnionTypedDict",
"ProviderPreferencesTypedDict",
+ "ProviderResponse",
+ "ProviderResponseProviderName",
+ "ProviderResponseTypedDict",
"ProviderSort",
"ProviderSortConfig",
"ProviderSortConfigTypedDict",
+ "ProviderTypedDict",
"PublicEndpoint",
"PublicEndpointQuantization",
"PublicEndpointTypedDict",
@@ -1918,15 +2117,12 @@ __all__ = [
"ReasoningDeltaEventType",
"ReasoningDeltaEventTypedDict",
"ReasoningDetailEncrypted",
- "ReasoningDetailEncryptedFormat",
"ReasoningDetailEncryptedType",
"ReasoningDetailEncryptedTypedDict",
"ReasoningDetailSummary",
- "ReasoningDetailSummaryFormat",
"ReasoningDetailSummaryType",
"ReasoningDetailSummaryTypedDict",
"ReasoningDetailText",
- "ReasoningDetailTextFormat",
"ReasoningDetailTextType",
"ReasoningDetailTextTypedDict",
"ReasoningDetailUnion",
@@ -1934,9 +2130,9 @@ __all__ = [
"ReasoningDoneEvent",
"ReasoningDoneEventType",
"ReasoningDoneEventTypedDict",
- "ReasoningEffortEnum",
+ "ReasoningEffort",
+ "ReasoningFormat",
"ReasoningItem",
- "ReasoningItemFormat",
"ReasoningItemStatusCompleted",
"ReasoningItemStatusInProgress",
"ReasoningItemStatusIncomplete",
@@ -1959,7 +2155,7 @@ __all__ = [
"ReasoningSummaryTextDoneEventTypedDict",
"ReasoningSummaryTextType",
"ReasoningSummaryTextTypedDict",
- "ReasoningSummaryVerbosityEnum",
+ "ReasoningSummaryVerbosity",
"ReasoningTextContent",
"ReasoningTextContentType",
"ReasoningTextContentTypedDict",
@@ -1976,12 +2172,16 @@ __all__ = [
"RequireApprovalAlways",
"RequireApprovalNever",
"RequireApprovalTypedDict",
+ "RequireApprovalUnion",
+ "RequireApprovalUnionTypedDict",
+ "Resolution",
"ResponseFormat",
"ResponseFormatTypedDict",
+ "ResponseHealingPlugin",
+ "ResponseHealingPluginID",
+ "ResponseHealingPluginTypedDict",
"ResponseIncludesEnum",
"ResponseOutputText",
- "ResponseOutputTextLogprob",
- "ResponseOutputTextLogprobTypedDict",
"ResponseOutputTextTopLogprob",
"ResponseOutputTextTopLogprobTypedDict",
"ResponseOutputTextType",
@@ -1989,50 +2189,19 @@ __all__ = [
"ResponsesErrorField",
"ResponsesErrorFieldTypedDict",
"ResponsesRequest",
- "ResponsesRequestIDAutoRouter",
- "ResponsesRequestIDContextCompression",
- "ResponsesRequestIDFileParser",
- "ResponsesRequestIDModeration",
- "ResponsesRequestIDResponseHealing",
- "ResponsesRequestIDWeb",
- "ResponsesRequestIgnore",
- "ResponsesRequestIgnoreTypedDict",
"ResponsesRequestImageConfig",
"ResponsesRequestImageConfigTypedDict",
- "ResponsesRequestMaxPrice",
- "ResponsesRequestMaxPriceTypedDict",
- "ResponsesRequestOnly",
- "ResponsesRequestOnlyTypedDict",
- "ResponsesRequestOrder",
- "ResponsesRequestOrderTypedDict",
- "ResponsesRequestPluginAutoRouter",
- "ResponsesRequestPluginAutoRouterTypedDict",
- "ResponsesRequestPluginContextCompression",
- "ResponsesRequestPluginContextCompressionTypedDict",
- "ResponsesRequestPluginFileParser",
- "ResponsesRequestPluginFileParserTypedDict",
- "ResponsesRequestPluginModeration",
- "ResponsesRequestPluginModerationTypedDict",
- "ResponsesRequestPluginResponseHealing",
- "ResponsesRequestPluginResponseHealingTypedDict",
- "ResponsesRequestPluginUnion",
- "ResponsesRequestPluginUnionTypedDict",
- "ResponsesRequestPluginWeb",
- "ResponsesRequestPluginWebTypedDict",
- "ResponsesRequestProvider",
- "ResponsesRequestProviderTypedDict",
+ "ResponsesRequestPlugin",
+ "ResponsesRequestPluginTypedDict",
"ResponsesRequestServiceTier",
- "ResponsesRequestSort",
- "ResponsesRequestSortTypedDict",
"ResponsesRequestToolFunction",
"ResponsesRequestToolFunctionTypedDict",
"ResponsesRequestToolUnion",
"ResponsesRequestToolUnionTypedDict",
- "ResponsesRequestTrace",
- "ResponsesRequestTraceTypedDict",
"ResponsesRequestType",
"ResponsesRequestTypedDict",
"SearchContextSizeEnum",
+ "SearchQualityLevel",
"Security",
"SecurityTypedDict",
"ServiceUnavailableResponseErrorData",
@@ -2041,44 +2210,45 @@ __all__ = [
"ShellServerToolType",
"ShellServerToolTypedDict",
"Size",
- "Source",
- "SourceTypedDict",
+ "Sort",
+ "SortTypedDict",
"Stop",
"StopTypedDict",
"StoredPromptTemplate",
"StoredPromptTemplateTypedDict",
"StreamEvents",
"StreamEventsResponseCompleted",
+ "StreamEventsResponseCompletedType",
"StreamEventsResponseCompletedTypedDict",
- "StreamEventsResponseCreated",
- "StreamEventsResponseCreatedTypedDict",
"StreamEventsResponseFailed",
+ "StreamEventsResponseFailedType",
"StreamEventsResponseFailedTypedDict",
- "StreamEventsResponseInProgress",
- "StreamEventsResponseInProgressTypedDict",
"StreamEventsResponseIncomplete",
+ "StreamEventsResponseIncompleteType",
"StreamEventsResponseIncompleteTypedDict",
"StreamEventsResponseOutputItemAdded",
+ "StreamEventsResponseOutputItemAddedType",
"StreamEventsResponseOutputItemAddedTypedDict",
"StreamEventsResponseOutputItemDone",
+ "StreamEventsResponseOutputItemDoneType",
"StreamEventsResponseOutputItemDoneTypedDict",
"StreamEventsTypedDict",
+ "StreamLogprob",
+ "StreamLogprobTopLogprob",
+ "StreamLogprobTopLogprobTypedDict",
+ "StreamLogprobTypedDict",
+ "SupportedAspectRatio",
+ "SupportedFrameImage",
+ "SupportedResolution",
+ "SupportedSize",
"Syntax",
"TextConfig",
"TextConfigTypedDict",
"TextConfigVerbosity",
"TextDeltaEvent",
- "TextDeltaEventLogprob",
- "TextDeltaEventLogprobTypedDict",
- "TextDeltaEventTopLogprob",
- "TextDeltaEventTopLogprobTypedDict",
"TextDeltaEventType",
"TextDeltaEventTypedDict",
"TextDoneEvent",
- "TextDoneEventLogprob",
- "TextDoneEventLogprobTypedDict",
- "TextDoneEventTopLogprob",
- "TextDoneEventTopLogprobTypedDict",
"TextDoneEventType",
"TextDoneEventTypedDict",
"TextExtendedConfig",
@@ -2087,26 +2257,26 @@ __all__ = [
"Tokenizer",
"TooManyRequestsResponseErrorData",
"TooManyRequestsResponseErrorDataTypedDict",
- "ToolCallStatusEnum",
+ "ToolCallStatus",
+ "ToolChoiceAllowed",
+ "ToolChoiceAllowedType",
+ "ToolChoiceAllowedTypedDict",
"TopProviderInfo",
"TopProviderInfoTypedDict",
- "TruncationEnum",
+ "TraceConfig",
+ "TraceConfigTypedDict",
+ "Truncation",
"Type",
"TypeCodeInterpreter",
+ "TypeCodeInterpreterCall",
"TypeCustom",
"TypeFileSearch",
"TypeFindInPage",
+ "TypeImage",
+ "TypeLogs",
"TypeOpenPage",
- "TypeResponseCompleted",
- "TypeResponseCreated",
- "TypeResponseFailed",
- "TypeResponseInProgress",
- "TypeResponseIncomplete",
- "TypeResponseOutputItemAdded",
- "TypeResponseOutputItemDone",
"TypeSearch",
"TypeTypedDict",
- "TypeURL",
"TypeWebSearchCall",
"URLCitation",
"URLCitationType",
@@ -2115,6 +2285,10 @@ __all__ = [
"UnauthorizedResponseErrorDataTypedDict",
"UnprocessableEntityResponseErrorData",
"UnprocessableEntityResponseErrorDataTypedDict",
+ "UpdateGuardrailRequest",
+ "UpdateGuardrailRequestTypedDict",
+ "UpdateGuardrailResponse",
+ "UpdateGuardrailResponseTypedDict",
"Usage",
"UsageTypedDict",
"Value1",
@@ -2123,6 +2297,17 @@ __all__ = [
"Value2TypedDict",
"Variables",
"VariablesTypedDict",
+ "VideoGenerationRequest",
+ "VideoGenerationRequestTypedDict",
+ "VideoGenerationResponse",
+ "VideoGenerationResponseStatus",
+ "VideoGenerationResponseTypedDict",
+ "VideoGenerationUsage",
+ "VideoGenerationUsageTypedDict",
+ "VideoModel",
+ "VideoModelTypedDict",
+ "VideoModelsListResponse",
+ "VideoModelsListResponseTypedDict",
"WebSearchCallCompletedEvent",
"WebSearchCallCompletedEventType",
"WebSearchCallCompletedEventTypedDict",
@@ -2132,20 +2317,29 @@ __all__ = [
"WebSearchCallSearchingEvent",
"WebSearchCallSearchingEventType",
"WebSearchCallSearchingEventTypedDict",
+ "WebSearchConfig",
+ "WebSearchConfigTypedDict",
+ "WebSearchDomainFilter",
+ "WebSearchDomainFilterTypedDict",
"WebSearchEngine",
+ "WebSearchEngineEnum",
+ "WebSearchPlugin",
+ "WebSearchPluginID",
+ "WebSearchPluginTypedDict",
"WebSearchServerTool",
- "WebSearchServerToolEngine",
- "WebSearchServerToolFilters",
- "WebSearchServerToolFiltersTypedDict",
"WebSearchServerToolOpenRouter",
- "WebSearchServerToolOpenRouterParameters",
- "WebSearchServerToolOpenRouterParametersTypedDict",
"WebSearchServerToolOpenRouterType",
"WebSearchServerToolOpenRouterTypedDict",
"WebSearchServerToolType",
"WebSearchServerToolTypedDict",
+ "WebSearchSource",
+ "WebSearchSourceType",
+ "WebSearchSourceTypedDict",
"WebSearchStatus",
"WebSearchUserLocation",
+ "WebSearchUserLocationServerTool",
+ "WebSearchUserLocationServerToolType",
+ "WebSearchUserLocationServerToolTypedDict",
"WebSearchUserLocationType",
"WebSearchUserLocationTypedDict",
]
@@ -2153,12 +2347,21 @@ __all__ = [
_dynamic_imports: dict[str, str] = {
"ActivityItem": ".activityitem",
"ActivityItemTypedDict": ".activityitem",
+ "ActivityResponse": ".activityresponse",
+ "ActivityResponseTypedDict": ".activityresponse",
"AnnotationAddedEvent": ".annotationaddedevent",
"AnnotationAddedEventType": ".annotationaddedevent",
"AnnotationAddedEventTypedDict": ".annotationaddedevent",
+ "AnthropicCacheControlDirective": ".anthropiccachecontroldirective",
+ "AnthropicCacheControlDirectiveType": ".anthropiccachecontroldirective",
+ "AnthropicCacheControlDirectiveTypedDict": ".anthropiccachecontroldirective",
+ "AnthropicCacheControlTTL": ".anthropiccachecontrolttl",
"ApplyPatchServerTool": ".applypatchservertool",
"ApplyPatchServerToolType": ".applypatchservertool",
"ApplyPatchServerToolTypedDict": ".applypatchservertool",
+ "AutoRouterPlugin": ".autorouterplugin",
+ "AutoRouterPluginID": ".autorouterplugin",
+ "AutoRouterPluginTypedDict": ".autorouterplugin",
"BadGatewayResponseErrorData": ".badgatewayresponseerrordata",
"BadGatewayResponseErrorDataTypedDict": ".badgatewayresponseerrordata",
"BadRequestResponseErrorData": ".badrequestresponseerrordata",
@@ -2167,45 +2370,41 @@ _dynamic_imports: dict[str, str] = {
"BaseInputsContent1TypedDict": ".baseinputs_union",
"BaseInputsContent2": ".baseinputs_union",
"BaseInputsContent2TypedDict": ".baseinputs_union",
- "BaseInputsContent3": ".baseinputs_union",
- "BaseInputsContent3TypedDict": ".baseinputs_union",
- "BaseInputsFunctionCall": ".baseinputs_union",
- "BaseInputsFunctionCallOutput": ".baseinputs_union",
- "BaseInputsFunctionCallOutputTypedDict": ".baseinputs_union",
- "BaseInputsFunctionCallTypedDict": ".baseinputs_union",
- "BaseInputsMessage1": ".baseinputs_union",
- "BaseInputsMessage1TypedDict": ".baseinputs_union",
- "BaseInputsMessage2": ".baseinputs_union",
- "BaseInputsMessage2TypedDict": ".baseinputs_union",
- "BaseInputsOutput1": ".baseinputs_union",
- "BaseInputsOutput1TypedDict": ".baseinputs_union",
- "BaseInputsOutput2": ".baseinputs_union",
- "BaseInputsOutput2TypedDict": ".baseinputs_union",
+ "BaseInputsMessage": ".baseinputs_union",
+ "BaseInputsMessageTypedDict": ".baseinputs_union",
"BaseInputsPhaseCommentary": ".baseinputs_union",
"BaseInputsPhaseFinalAnswer": ".baseinputs_union",
"BaseInputsPhaseUnion": ".baseinputs_union",
"BaseInputsPhaseUnionTypedDict": ".baseinputs_union",
"BaseInputsRoleAssistant": ".baseinputs_union",
- "BaseInputsRoleDeveloper1": ".baseinputs_union",
- "BaseInputsRoleDeveloper2": ".baseinputs_union",
- "BaseInputsRoleSystem1": ".baseinputs_union",
- "BaseInputsRoleSystem2": ".baseinputs_union",
- "BaseInputsRoleUnion1": ".baseinputs_union",
- "BaseInputsRoleUnion1TypedDict": ".baseinputs_union",
- "BaseInputsRoleUnion2": ".baseinputs_union",
- "BaseInputsRoleUnion2TypedDict": ".baseinputs_union",
- "BaseInputsRoleUser1": ".baseinputs_union",
- "BaseInputsRoleUser2": ".baseinputs_union",
- "BaseInputsTypeFunctionCall": ".baseinputs_union",
- "BaseInputsTypeFunctionCallOutput": ".baseinputs_union",
- "BaseInputsTypeMessage1": ".baseinputs_union",
- "BaseInputsTypeMessage2": ".baseinputs_union",
+ "BaseInputsRoleDeveloper": ".baseinputs_union",
+ "BaseInputsRoleSystem": ".baseinputs_union",
+ "BaseInputsRoleUnion": ".baseinputs_union",
+ "BaseInputsRoleUnionTypedDict": ".baseinputs_union",
+ "BaseInputsRoleUser": ".baseinputs_union",
+ "BaseInputsType": ".baseinputs_union",
"BaseInputsUnion": ".baseinputs_union",
"BaseInputsUnion1": ".baseinputs_union",
"BaseInputsUnion1TypedDict": ".baseinputs_union",
"BaseInputsUnionTypedDict": ".baseinputs_union",
"BaseReasoningConfig": ".basereasoningconfig",
"BaseReasoningConfigTypedDict": ".basereasoningconfig",
+ "BulkAssignKeysRequest": ".bulkassignkeysrequest",
+ "BulkAssignKeysRequestTypedDict": ".bulkassignkeysrequest",
+ "BulkAssignKeysResponse": ".bulkassignkeysresponse",
+ "BulkAssignKeysResponseTypedDict": ".bulkassignkeysresponse",
+ "BulkAssignMembersRequest": ".bulkassignmembersrequest",
+ "BulkAssignMembersRequestTypedDict": ".bulkassignmembersrequest",
+ "BulkAssignMembersResponse": ".bulkassignmembersresponse",
+ "BulkAssignMembersResponseTypedDict": ".bulkassignmembersresponse",
+ "BulkUnassignKeysRequest": ".bulkunassignkeysrequest",
+ "BulkUnassignKeysRequestTypedDict": ".bulkunassignkeysrequest",
+ "BulkUnassignKeysResponse": ".bulkunassignkeysresponse",
+ "BulkUnassignKeysResponseTypedDict": ".bulkunassignkeysresponse",
+ "BulkUnassignMembersRequest": ".bulkunassignmembersrequest",
+ "BulkUnassignMembersRequestTypedDict": ".bulkunassignmembersrequest",
+ "BulkUnassignMembersResponse": ".bulkunassignmembersresponse",
+ "BulkUnassignMembersResponseTypedDict": ".bulkunassignmembersresponse",
"ChatAssistantImages": ".chatassistantimages",
"ChatAssistantImagesImageURL": ".chatassistantimages",
"ChatAssistantImagesImageURLTypedDict": ".chatassistantimages",
@@ -2225,7 +2424,6 @@ _dynamic_imports: dict[str, str] = {
"ChatContentAudioType": ".chatcontentaudio",
"ChatContentAudioTypedDict": ".chatcontentaudio",
"ChatContentCacheControl": ".chatcontentcachecontrol",
- "ChatContentCacheControlTTL": ".chatcontentcachecontrol",
"ChatContentCacheControlType": ".chatcontentcachecontrol",
"ChatContentCacheControlTypedDict": ".chatcontentcachecontrol",
"ChatContentFile": ".chatcontentfile",
@@ -2240,8 +2438,6 @@ _dynamic_imports: dict[str, str] = {
"ChatContentImageType": ".chatcontentimage",
"ChatContentImageTypedDict": ".chatcontentimage",
"ChatContentItems": ".chatcontentitems",
- "ChatContentItems1": ".chatcontentitems",
- "ChatContentItems1TypedDict": ".chatcontentitems",
"ChatContentItemsTypedDict": ".chatcontentitems",
"ChatContentText": ".chatcontenttext",
"ChatContentTextType": ".chatcontenttext",
@@ -2288,57 +2484,12 @@ _dynamic_imports: dict[str, str] = {
"ChatNamedToolChoiceType": ".chatnamedtoolchoice",
"ChatNamedToolChoiceTypedDict": ".chatnamedtoolchoice",
"ChatReasoningSummaryVerbosityEnum": ".chatreasoningsummaryverbosityenum",
- "CacheControl": ".chatrequest",
- "CacheControlTypedDict": ".chatrequest",
"ChatRequest": ".chatrequest",
- "ChatRequestBy": ".chatrequest",
- "ChatRequestIDAutoRouter": ".chatrequest",
- "ChatRequestIDContextCompression": ".chatrequest",
- "ChatRequestIDFileParser": ".chatrequest",
- "ChatRequestIDModeration": ".chatrequest",
- "ChatRequestIDResponseHealing": ".chatrequest",
- "ChatRequestIDWeb": ".chatrequest",
- "ChatRequestIgnore": ".chatrequest",
- "ChatRequestIgnoreTypedDict": ".chatrequest",
"ChatRequestImageConfig": ".chatrequest",
"ChatRequestImageConfigTypedDict": ".chatrequest",
- "ChatRequestMaxPrice": ".chatrequest",
- "ChatRequestMaxPriceTypedDict": ".chatrequest",
- "ChatRequestOnly": ".chatrequest",
- "ChatRequestOnlyTypedDict": ".chatrequest",
- "ChatRequestOrder": ".chatrequest",
- "ChatRequestOrderTypedDict": ".chatrequest",
- "ChatRequestPartition": ".chatrequest",
- "ChatRequestPluginAutoRouter": ".chatrequest",
- "ChatRequestPluginAutoRouterTypedDict": ".chatrequest",
- "ChatRequestPluginContextCompression": ".chatrequest",
- "ChatRequestPluginContextCompressionTypedDict": ".chatrequest",
- "ChatRequestPluginFileParser": ".chatrequest",
- "ChatRequestPluginFileParserTypedDict": ".chatrequest",
- "ChatRequestPluginModeration": ".chatrequest",
- "ChatRequestPluginModerationTypedDict": ".chatrequest",
- "ChatRequestPluginResponseHealing": ".chatrequest",
- "ChatRequestPluginResponseHealingTypedDict": ".chatrequest",
- "ChatRequestPluginUnion": ".chatrequest",
- "ChatRequestPluginUnionTypedDict": ".chatrequest",
- "ChatRequestPluginWeb": ".chatrequest",
- "ChatRequestPluginWebTypedDict": ".chatrequest",
- "ChatRequestProvider": ".chatrequest",
- "ChatRequestProviderSort": ".chatrequest",
- "ChatRequestProviderSortConfig": ".chatrequest",
- "ChatRequestProviderSortConfigEnum": ".chatrequest",
- "ChatRequestProviderSortConfigTypedDict": ".chatrequest",
- "ChatRequestProviderSortConfigUnion": ".chatrequest",
- "ChatRequestProviderSortConfigUnionTypedDict": ".chatrequest",
- "ChatRequestProviderTypedDict": ".chatrequest",
+ "ChatRequestPlugin": ".chatrequest",
+ "ChatRequestPluginTypedDict": ".chatrequest",
"ChatRequestServiceTier": ".chatrequest",
- "ChatRequestSortEnum": ".chatrequest",
- "ChatRequestSortUnion": ".chatrequest",
- "ChatRequestSortUnionTypedDict": ".chatrequest",
- "ChatRequestTTL": ".chatrequest",
- "ChatRequestTrace": ".chatrequest",
- "ChatRequestTraceTypedDict": ".chatrequest",
- "ChatRequestType": ".chatrequest",
"ChatRequestTypedDict": ".chatrequest",
"Effort": ".chatrequest",
"Modality": ".chatrequest",
@@ -2405,31 +2556,9 @@ _dynamic_imports: dict[str, str] = {
"ChatUserMessageContentTypedDict": ".chatusermessage",
"ChatUserMessageRole": ".chatusermessage",
"ChatUserMessageTypedDict": ".chatusermessage",
- "ChatWebSearchServerTool": ".chatwebsearchservertool",
- "ChatWebSearchServerToolEngine": ".chatwebsearchservertool",
- "ChatWebSearchServerToolParameters": ".chatwebsearchservertool",
- "ChatWebSearchServerToolParametersType": ".chatwebsearchservertool",
- "ChatWebSearchServerToolParametersTypedDict": ".chatwebsearchservertool",
- "ChatWebSearchServerToolSearchContextSize": ".chatwebsearchservertool",
- "ChatWebSearchServerToolTypeOpenrouterWebSearch": ".chatwebsearchservertool",
- "ChatWebSearchServerToolTypedDict": ".chatwebsearchservertool",
- "ChatWebSearchServerToolUserLocation": ".chatwebsearchservertool",
- "ChatWebSearchServerToolUserLocationTypedDict": ".chatwebsearchservertool",
"ChatWebSearchShorthand": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandEngine": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParameters": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParametersEngine": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParametersSearchContextSize": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParametersType": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParametersTypedDict": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParametersUserLocation": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandParametersUserLocationTypedDict": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandSearchContextSize": ".chatwebsearchshorthand",
"ChatWebSearchShorthandType": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandTypeApproximate": ".chatwebsearchshorthand",
"ChatWebSearchShorthandTypedDict": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandUserLocation": ".chatwebsearchshorthand",
- "ChatWebSearchShorthandUserLocationTypedDict": ".chatwebsearchshorthand",
"CodeInterpreterServerTool": ".codeinterpreterservertool",
"CodeInterpreterServerToolTypedDict": ".codeinterpreterservertool",
"Container": ".codeinterpreterservertool",
@@ -2461,7 +2590,19 @@ _dynamic_imports: dict[str, str] = {
"ContentPartDoneEventPartTypedDict": ".contentpartdoneevent",
"ContentPartDoneEventType": ".contentpartdoneevent",
"ContentPartDoneEventTypedDict": ".contentpartdoneevent",
+ "ContentPartImage": ".contentpartimage",
+ "ContentPartImageImageURL": ".contentpartimage",
+ "ContentPartImageImageURLTypedDict": ".contentpartimage",
+ "ContentPartImageType": ".contentpartimage",
+ "ContentPartImageTypedDict": ".contentpartimage",
"ContextCompressionEngine": ".contextcompressionengine",
+ "ContextCompressionPlugin": ".contextcompressionplugin",
+ "ContextCompressionPluginID": ".contextcompressionplugin",
+ "ContextCompressionPluginTypedDict": ".contextcompressionplugin",
+ "CreateGuardrailRequest": ".createguardrailrequest",
+ "CreateGuardrailRequestTypedDict": ".createguardrailrequest",
+ "CreateGuardrailResponse": ".createguardrailresponse",
+ "CreateGuardrailResponseTypedDict": ".createguardrailresponse",
"CustomTool": ".customtool",
"CustomToolTypedDict": ".customtool",
"Format": ".customtool",
@@ -2474,14 +2615,15 @@ _dynamic_imports: dict[str, str] = {
"FormatTypedDict": ".customtool",
"Syntax": ".customtool",
"TypeCustom": ".customtool",
- "DataCollection": ".datacollection",
"DatetimeServerTool": ".datetimeservertool",
- "DatetimeServerToolParameters": ".datetimeservertool",
- "DatetimeServerToolParametersTypedDict": ".datetimeservertool",
"DatetimeServerToolType": ".datetimeservertool",
"DatetimeServerToolTypedDict": ".datetimeservertool",
+ "DatetimeServerToolConfig": ".datetimeservertoolconfig",
+ "DatetimeServerToolConfigTypedDict": ".datetimeservertoolconfig",
"DefaultParameters": ".defaultparameters",
"DefaultParametersTypedDict": ".defaultparameters",
+ "DeleteGuardrailResponse": ".deleteguardrailresponse",
+ "DeleteGuardrailResponseTypedDict": ".deleteguardrailresponse",
"EasyInputMessage": ".easyinputmessage",
"EasyInputMessageContentInputImage": ".easyinputmessage",
"EasyInputMessageContentInputImageTypedDict": ".easyinputmessage",
@@ -2512,16 +2654,19 @@ _dynamic_imports: dict[str, str] = {
"FileCitation": ".filecitation",
"FileCitationType": ".filecitation",
"FileCitationTypedDict": ".filecitation",
+ "FileParserPlugin": ".fileparserplugin",
+ "FileParserPluginID": ".fileparserplugin",
+ "FileParserPluginTypedDict": ".fileparserplugin",
"FilePath": ".filepath",
"FilePathType": ".filepath",
"FilePathTypedDict": ".filepath",
"FileSearchServerTool": ".filesearchservertool",
- "FileSearchServerToolFilters": ".filesearchservertool",
- "FileSearchServerToolFiltersTypedDict": ".filesearchservertool",
"FileSearchServerToolTypedDict": ".filesearchservertool",
"Filters": ".filesearchservertool",
"FiltersType": ".filesearchservertool",
"FiltersTypedDict": ".filesearchservertool",
+ "FiltersUnion": ".filesearchservertool",
+ "FiltersUnionTypedDict": ".filesearchservertool",
"Ranker": ".filesearchservertool",
"RankingOptions": ".filesearchservertool",
"RankingOptionsTypedDict": ".filesearchservertool",
@@ -2543,6 +2688,12 @@ _dynamic_imports: dict[str, str] = {
"FormatTextConfig": ".formattextconfig",
"FormatTextConfigType": ".formattextconfig",
"FormatTextConfigTypedDict": ".formattextconfig",
+ "FrameImage": ".frameimage",
+ "FrameImageImageURL": ".frameimage",
+ "FrameImageImageURLTypedDict": ".frameimage",
+ "FrameImageType": ".frameimage",
+ "FrameImageTypedDict": ".frameimage",
+ "FrameType": ".frameimage",
"FunctionCallArgsDeltaEvent": ".functioncallargsdeltaevent",
"FunctionCallArgsDeltaEventType": ".functioncallargsdeltaevent",
"FunctionCallArgsDeltaEventTypedDict": ".functioncallargsdeltaevent",
@@ -2554,17 +2705,21 @@ _dynamic_imports: dict[str, str] = {
"FunctionCallItemTypedDict": ".functioncallitem",
"FunctionCallOutputItem": ".functioncalloutputitem",
"FunctionCallOutputItemDetail": ".functioncalloutputitem",
+ "FunctionCallOutputItemOutputType": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion1": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion1TypedDict": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion2": ".functioncalloutputitem",
"FunctionCallOutputItemOutputUnion2TypedDict": ".functioncalloutputitem",
+ "FunctionCallOutputItemStatus": ".functioncalloutputitem",
"FunctionCallOutputItemTypeFunctionCallOutput": ".functioncalloutputitem",
"FunctionCallOutputItemTypedDict": ".functioncalloutputitem",
"OutputInputImage": ".functioncalloutputitem",
"OutputInputImageTypedDict": ".functioncalloutputitem",
- "OutputType": ".functioncalloutputitem",
- "GoneResponseErrorData": ".goneresponseerrordata",
- "GoneResponseErrorDataTypedDict": ".goneresponseerrordata",
+ "GetGuardrailResponse": ".getguardrailresponse",
+ "GetGuardrailResponseTypedDict": ".getguardrailresponse",
+ "Guardrail": ".guardrail",
+ "GuardrailTypedDict": ".guardrail",
+ "GuardrailInterval": ".guardrailinterval",
"ImageGenCallCompletedEvent": ".imagegencallcompletedevent",
"ImageGenCallCompletedEventType": ".imagegencallcompletedevent",
"ImageGenCallCompletedEventTypedDict": ".imagegencallcompletedevent",
@@ -2593,8 +2748,8 @@ _dynamic_imports: dict[str, str] = {
"IncompleteDetails": ".incompletedetails",
"IncompleteDetailsTypedDict": ".incompletedetails",
"Reason": ".incompletedetails",
+ "FormatEnum": ".inputaudio",
"InputAudio": ".inputaudio",
- "InputAudioFormat": ".inputaudio",
"InputAudioInputAudio": ".inputaudio",
"InputAudioInputAudioTypedDict": ".inputaudio",
"InputAudioType": ".inputaudio",
@@ -2625,7 +2780,6 @@ _dynamic_imports: dict[str, str] = {
"InputsContent1TypedDict": ".inputs_union",
"InputsContent2": ".inputs_union",
"InputsContent2TypedDict": ".inputs_union",
- "InputsFormat": ".inputs_union",
"InputsMessage": ".inputs_union",
"InputsMessageTypedDict": ".inputs_union",
"InputsPhaseCommentary": ".inputs_union",
@@ -2660,13 +2814,12 @@ _dynamic_imports: dict[str, str] = {
"InstructType": ".instructtype",
"InternalServerResponseErrorData": ".internalserverresponseerrordata",
"InternalServerResponseErrorDataTypedDict": ".internalserverresponseerrordata",
+ "KeyAssignment": ".keyassignment",
+ "KeyAssignmentTypedDict": ".keyassignment",
"LegacyChatContentVideo": ".legacy_chatcontentvideo",
"LegacyChatContentVideoType": ".legacy_chatcontentvideo",
"LegacyChatContentVideoTypedDict": ".legacy_chatcontentvideo",
"LegacyWebSearchServerTool": ".legacy_websearchservertool",
- "LegacyWebSearchServerToolEngine": ".legacy_websearchservertool",
- "LegacyWebSearchServerToolFilters": ".legacy_websearchservertool",
- "LegacyWebSearchServerToolFiltersTypedDict": ".legacy_websearchservertool",
"LegacyWebSearchServerToolType": ".legacy_websearchservertool",
"LegacyWebSearchServerToolTypedDict": ".legacy_websearchservertool",
"Architecture": ".listendpointsresponse",
@@ -2674,8 +2827,16 @@ _dynamic_imports: dict[str, str] = {
"ListEndpointsResponse": ".listendpointsresponse",
"ListEndpointsResponseTypedDict": ".listendpointsresponse",
"Tokenizer": ".listendpointsresponse",
+ "ListGuardrailsResponse": ".listguardrailsresponse",
+ "ListGuardrailsResponseTypedDict": ".listguardrailsresponse",
+ "ListKeyAssignmentsResponse": ".listkeyassignmentsresponse",
+ "ListKeyAssignmentsResponseTypedDict": ".listkeyassignmentsresponse",
+ "ListMemberAssignmentsResponse": ".listmemberassignmentsresponse",
+ "ListMemberAssignmentsResponseTypedDict": ".listmemberassignmentsresponse",
"AllowedTools": ".mcpservertool",
"AllowedToolsTypedDict": ".mcpservertool",
+ "AllowedToolsUnion": ".mcpservertool",
+ "AllowedToolsUnionTypedDict": ".mcpservertool",
"Always": ".mcpservertool",
"AlwaysTypedDict": ".mcpservertool",
"ConnectorID": ".mcpservertool",
@@ -2688,20 +2849,50 @@ _dynamic_imports: dict[str, str] = {
"RequireApprovalAlways": ".mcpservertool",
"RequireApprovalNever": ".mcpservertool",
"RequireApprovalTypedDict": ".mcpservertool",
+ "RequireApprovalUnion": ".mcpservertool",
+ "RequireApprovalUnionTypedDict": ".mcpservertool",
+ "MemberAssignment": ".memberassignment",
+ "MemberAssignmentTypedDict": ".memberassignment",
"Model": ".model",
"ModelTypedDict": ".model",
"ModelArchitecture": ".modelarchitecture",
"ModelArchitectureInstructType": ".modelarchitecture",
"ModelArchitectureTypedDict": ".modelarchitecture",
"ModelGroup": ".modelgroup",
+ "ModelLinks": ".modellinks",
+ "ModelLinksTypedDict": ".modellinks",
"Data": ".modelscountresponse",
"DataTypedDict": ".modelscountresponse",
"ModelsCountResponse": ".modelscountresponse",
"ModelsCountResponseTypedDict": ".modelscountresponse",
"ModelsListResponse": ".modelslistresponse",
"ModelsListResponseTypedDict": ".modelslistresponse",
+ "ModerationPlugin": ".moderationplugin",
+ "ModerationPluginID": ".moderationplugin",
+ "ModerationPluginTypedDict": ".moderationplugin",
"NotFoundResponseErrorData": ".notfoundresponseerrordata",
"NotFoundResponseErrorDataTypedDict": ".notfoundresponseerrordata",
+ "OpenAIResponseFunctionToolCall": ".openairesponsefunctiontoolcall",
+ "OpenAIResponseFunctionToolCallType": ".openairesponsefunctiontoolcall",
+ "OpenAIResponseFunctionToolCallTypedDict": ".openairesponsefunctiontoolcall",
+ "OpenAIResponseFunctionToolCallOutput": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputOutput1": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputOutput1TypedDict": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputOutput2": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputOutput2TypedDict": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputStatus": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputType": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseFunctionToolCallOutputTypedDict": ".openairesponsefunctiontoolcalloutput",
+ "OpenAIResponseInputMessageItem": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemContent": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemContentTypedDict": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemRoleDeveloper": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemRoleSystem": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemRoleUnion": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemRoleUnionTypedDict": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemRoleUser": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemType": ".openairesponseinputmessageitem",
+ "OpenAIResponseInputMessageItemTypedDict": ".openairesponseinputmessageitem",
"OpenAIResponsesAnnotation": ".openairesponsesannotation",
"OpenAIResponsesAnnotationTypedDict": ".openairesponsesannotation",
"OpenAIResponsesRefusalContent": ".openairesponsesrefusalcontent",
@@ -2723,6 +2914,12 @@ _dynamic_imports: dict[str, str] = {
"Type": ".openairesponsestoolchoice_union",
"TypeTypedDict": ".openairesponsestoolchoice_union",
"OpenAIResponsesTruncation": ".openairesponsestruncation",
+ "OpenResponsesCreatedEvent": ".openresponsescreatedevent",
+ "OpenResponsesCreatedEventType": ".openresponsescreatedevent",
+ "OpenResponsesCreatedEventTypedDict": ".openresponsescreatedevent",
+ "OpenResponsesInProgressEvent": ".openresponsesinprogressevent",
+ "OpenResponsesInProgressEventType": ".openresponsesinprogressevent",
+ "OpenResponsesInProgressEventTypedDict": ".openresponsesinprogressevent",
"OpenResponsesResult": ".openresponsesresult",
"OpenResponsesResultObject": ".openresponsesresult",
"OpenResponsesResultToolFunction": ".openresponsesresult",
@@ -2731,13 +2928,47 @@ _dynamic_imports: dict[str, str] = {
"OpenResponsesResultToolUnionTypedDict": ".openresponsesresult",
"OpenResponsesResultType": ".openresponsesresult",
"OpenResponsesResultTypedDict": ".openresponsesresult",
+ "OpenRouterWebSearchServerTool": ".openrouterwebsearchservertool",
+ "OpenRouterWebSearchServerToolType": ".openrouterwebsearchservertool",
+ "OpenRouterWebSearchServerToolTypedDict": ".openrouterwebsearchservertool",
+ "OutputApplyPatchServerToolItem": ".outputapplypatchservertoolitem",
+ "OutputApplyPatchServerToolItemType": ".outputapplypatchservertoolitem",
+ "OutputApplyPatchServerToolItemTypedDict": ".outputapplypatchservertoolitem",
+ "OutputBashServerToolItem": ".outputbashservertoolitem",
+ "OutputBashServerToolItemType": ".outputbashservertoolitem",
+ "OutputBashServerToolItemTypedDict": ".outputbashservertoolitem",
+ "OutputBrowserUseServerToolItem": ".outputbrowseruseservertoolitem",
+ "OutputBrowserUseServerToolItemType": ".outputbrowseruseservertoolitem",
+ "OutputBrowserUseServerToolItemTypedDict": ".outputbrowseruseservertoolitem",
+ "OutputCodeInterpreterCallItem": ".outputcodeinterpretercallitem",
+ "OutputCodeInterpreterCallItemOutputUnion": ".outputcodeinterpretercallitem",
+ "OutputCodeInterpreterCallItemOutputUnionTypedDict": ".outputcodeinterpretercallitem",
+ "OutputCodeInterpreterCallItemTypedDict": ".outputcodeinterpretercallitem",
+ "OutputImage": ".outputcodeinterpretercallitem",
+ "OutputImageTypedDict": ".outputcodeinterpretercallitem",
+ "OutputLogs": ".outputcodeinterpretercallitem",
+ "OutputLogsTypedDict": ".outputcodeinterpretercallitem",
+ "TypeCodeInterpreterCall": ".outputcodeinterpretercallitem",
+ "TypeImage": ".outputcodeinterpretercallitem",
+ "TypeLogs": ".outputcodeinterpretercallitem",
+ "OutputCodeInterpreterServerToolItem": ".outputcodeinterpreterservertoolitem",
+ "OutputCodeInterpreterServerToolItemType": ".outputcodeinterpreterservertoolitem",
+ "OutputCodeInterpreterServerToolItemTypedDict": ".outputcodeinterpreterservertoolitem",
+ "OutputComputerCallItem": ".outputcomputercallitem",
+ "OutputComputerCallItemStatus": ".outputcomputercallitem",
+ "OutputComputerCallItemType": ".outputcomputercallitem",
+ "OutputComputerCallItemTypedDict": ".outputcomputercallitem",
+ "PendingSafetyCheck": ".outputcomputercallitem",
+ "PendingSafetyCheckTypedDict": ".outputcomputercallitem",
"OutputDatetimeItem": ".outputdatetimeitem",
- "OutputDatetimeItemStatus": ".outputdatetimeitem",
"OutputDatetimeItemType": ".outputdatetimeitem",
"OutputDatetimeItemTypedDict": ".outputdatetimeitem",
"OutputFileSearchCallItem": ".outputfilesearchcallitem",
"OutputFileSearchCallItemType": ".outputfilesearchcallitem",
"OutputFileSearchCallItemTypedDict": ".outputfilesearchcallitem",
+ "OutputFileSearchServerToolItem": ".outputfilesearchservertoolitem",
+ "OutputFileSearchServerToolItemType": ".outputfilesearchservertoolitem",
+ "OutputFileSearchServerToolItemTypedDict": ".outputfilesearchservertoolitem",
"OutputFunctionCallItem": ".outputfunctioncallitem",
"OutputFunctionCallItemStatusCompleted": ".outputfunctioncallitem",
"OutputFunctionCallItemStatusInProgress": ".outputfunctioncallitem",
@@ -2749,11 +2980,21 @@ _dynamic_imports: dict[str, str] = {
"OutputImageGenerationCallItem": ".outputimagegenerationcallitem",
"OutputImageGenerationCallItemType": ".outputimagegenerationcallitem",
"OutputImageGenerationCallItemTypedDict": ".outputimagegenerationcallitem",
+ "OutputImageGenerationServerToolItem": ".outputimagegenerationservertoolitem",
+ "OutputImageGenerationServerToolItemType": ".outputimagegenerationservertoolitem",
+ "OutputImageGenerationServerToolItemTypedDict": ".outputimagegenerationservertoolitem",
"OutputItemImageGenerationCall": ".outputitemimagegenerationcall",
"OutputItemImageGenerationCallType": ".outputitemimagegenerationcall",
"OutputItemImageGenerationCallTypedDict": ".outputitemimagegenerationcall",
"OutputItems": ".outputitems",
"OutputItemsTypedDict": ".outputitems",
+ "OutputMcpServerToolItem": ".outputmcpservertoolitem",
+ "OutputMcpServerToolItemType": ".outputmcpservertoolitem",
+ "OutputMcpServerToolItemTypedDict": ".outputmcpservertoolitem",
+ "ActionEnum": ".outputmemoryservertoolitem",
+ "OutputMemoryServerToolItem": ".outputmemoryservertoolitem",
+ "OutputMemoryServerToolItemType": ".outputmemoryservertoolitem",
+ "OutputMemoryServerToolItemTypedDict": ".outputmemoryservertoolitem",
"OutputMessage": ".outputmessage",
"OutputMessageContent": ".outputmessage",
"OutputMessageContentTypedDict": ".outputmessage",
@@ -2787,7 +3028,6 @@ _dynamic_imports: dict[str, str] = {
"OutputModality": ".outputmodality",
"OutputModalityEnum": ".outputmodalityenum",
"OutputReasoningItem": ".outputreasoningitem",
- "OutputReasoningItemFormat": ".outputreasoningitem",
"OutputReasoningItemStatusCompleted": ".outputreasoningitem",
"OutputReasoningItemStatusInProgress": ".outputreasoningitem",
"OutputReasoningItemStatusIncomplete": ".outputreasoningitem",
@@ -2795,9 +3035,16 @@ _dynamic_imports: dict[str, str] = {
"OutputReasoningItemStatusUnionTypedDict": ".outputreasoningitem",
"OutputReasoningItemType": ".outputreasoningitem",
"OutputReasoningItemTypedDict": ".outputreasoningitem",
- "OutputServerToolItem": ".outputservertoolitem",
- "OutputServerToolItemStatus": ".outputservertoolitem",
- "OutputServerToolItemTypedDict": ".outputservertoolitem",
+ "Command": ".outputtexteditorservertoolitem",
+ "OutputTextEditorServerToolItem": ".outputtexteditorservertoolitem",
+ "OutputTextEditorServerToolItemType": ".outputtexteditorservertoolitem",
+ "OutputTextEditorServerToolItemTypedDict": ".outputtexteditorservertoolitem",
+ "OutputToolSearchServerToolItem": ".outputtoolsearchservertoolitem",
+ "OutputToolSearchServerToolItemType": ".outputtoolsearchservertoolitem",
+ "OutputToolSearchServerToolItemTypedDict": ".outputtoolsearchservertoolitem",
+ "OutputWebFetchServerToolItem": ".outputwebfetchservertoolitem",
+ "OutputWebFetchServerToolItemType": ".outputwebfetchservertoolitem",
+ "OutputWebFetchServerToolItemTypedDict": ".outputwebfetchservertoolitem",
"Action": ".outputwebsearchcallitem",
"ActionFindInPage": ".outputwebsearchcallitem",
"ActionFindInPageTypedDict": ".outputwebsearchcallitem",
@@ -2808,13 +3055,13 @@ _dynamic_imports: dict[str, str] = {
"ActionTypedDict": ".outputwebsearchcallitem",
"OutputWebSearchCallItem": ".outputwebsearchcallitem",
"OutputWebSearchCallItemTypedDict": ".outputwebsearchcallitem",
- "Source": ".outputwebsearchcallitem",
- "SourceTypedDict": ".outputwebsearchcallitem",
"TypeFindInPage": ".outputwebsearchcallitem",
"TypeOpenPage": ".outputwebsearchcallitem",
"TypeSearch": ".outputwebsearchcallitem",
- "TypeURL": ".outputwebsearchcallitem",
"TypeWebSearchCall": ".outputwebsearchcallitem",
+ "OutputWebSearchServerToolItem": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemType": ".outputwebsearchservertoolitem",
+ "OutputWebSearchServerToolItemTypedDict": ".outputwebsearchservertoolitem",
"Parameter": ".parameter",
"PayloadTooLargeResponseErrorData": ".payloadtoolargeresponseerrordata",
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
@@ -2839,15 +3086,9 @@ _dynamic_imports: dict[str, str] = {
"PreferredMinThroughput": ".preferredminthroughput",
"PreferredMinThroughputTypedDict": ".preferredminthroughput",
"Preview20250311WebSearchServerTool": ".preview_20250311_websearchservertool",
- "Preview20250311WebSearchServerToolEngine": ".preview_20250311_websearchservertool",
- "Preview20250311WebSearchServerToolFilters": ".preview_20250311_websearchservertool",
- "Preview20250311WebSearchServerToolFiltersTypedDict": ".preview_20250311_websearchservertool",
"Preview20250311WebSearchServerToolType": ".preview_20250311_websearchservertool",
"Preview20250311WebSearchServerToolTypedDict": ".preview_20250311_websearchservertool",
"PreviewWebSearchServerTool": ".preview_websearchservertool",
- "PreviewWebSearchServerToolEngine": ".preview_websearchservertool",
- "PreviewWebSearchServerToolFilters": ".preview_websearchservertool",
- "PreviewWebSearchServerToolFiltersTypedDict": ".preview_websearchservertool",
"PreviewWebSearchServerToolType": ".preview_websearchservertool",
"PreviewWebSearchServerToolTypedDict": ".preview_websearchservertool",
"PreviewWebSearchUserLocation": ".preview_websearchuserlocation",
@@ -2856,27 +3097,22 @@ _dynamic_imports: dict[str, str] = {
"ProviderName": ".providername",
"ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata",
"ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata",
+ "DataCollection": ".providerpreferences",
+ "Ignore": ".providerpreferences",
+ "IgnoreTypedDict": ".providerpreferences",
+ "MaxPrice": ".providerpreferences",
+ "MaxPriceTypedDict": ".providerpreferences",
+ "Only": ".providerpreferences",
+ "OnlyTypedDict": ".providerpreferences",
+ "Order": ".providerpreferences",
+ "OrderTypedDict": ".providerpreferences",
"ProviderPreferences": ".providerpreferences",
- "ProviderPreferencesBy": ".providerpreferences",
- "ProviderPreferencesIgnore": ".providerpreferences",
- "ProviderPreferencesIgnoreTypedDict": ".providerpreferences",
- "ProviderPreferencesMaxPrice": ".providerpreferences",
- "ProviderPreferencesMaxPriceTypedDict": ".providerpreferences",
- "ProviderPreferencesOnly": ".providerpreferences",
- "ProviderPreferencesOnlyTypedDict": ".providerpreferences",
- "ProviderPreferencesOrder": ".providerpreferences",
- "ProviderPreferencesOrderTypedDict": ".providerpreferences",
- "ProviderPreferencesPartition": ".providerpreferences",
- "ProviderPreferencesProviderSort": ".providerpreferences",
- "ProviderPreferencesProviderSortConfig": ".providerpreferences",
- "ProviderPreferencesProviderSortConfigEnum": ".providerpreferences",
- "ProviderPreferencesProviderSortConfigTypedDict": ".providerpreferences",
- "ProviderPreferencesProviderSortConfigUnion": ".providerpreferences",
- "ProviderPreferencesProviderSortConfigUnionTypedDict": ".providerpreferences",
- "ProviderPreferencesSortEnum": ".providerpreferences",
- "ProviderPreferencesSortUnion": ".providerpreferences",
- "ProviderPreferencesSortUnionTypedDict": ".providerpreferences",
"ProviderPreferencesTypedDict": ".providerpreferences",
+ "Sort": ".providerpreferences",
+ "SortTypedDict": ".providerpreferences",
+ "ProviderResponse": ".providerresponse",
+ "ProviderResponseProviderName": ".providerresponse",
+ "ProviderResponseTypedDict": ".providerresponse",
"ProviderSort": ".providersort",
"By": ".providersortconfig",
"Partition": ".providersortconfig",
@@ -2896,15 +3132,12 @@ _dynamic_imports: dict[str, str] = {
"ReasoningDeltaEventType": ".reasoningdeltaevent",
"ReasoningDeltaEventTypedDict": ".reasoningdeltaevent",
"ReasoningDetailEncrypted": ".reasoningdetailencrypted",
- "ReasoningDetailEncryptedFormat": ".reasoningdetailencrypted",
"ReasoningDetailEncryptedType": ".reasoningdetailencrypted",
"ReasoningDetailEncryptedTypedDict": ".reasoningdetailencrypted",
"ReasoningDetailSummary": ".reasoningdetailsummary",
- "ReasoningDetailSummaryFormat": ".reasoningdetailsummary",
"ReasoningDetailSummaryType": ".reasoningdetailsummary",
"ReasoningDetailSummaryTypedDict": ".reasoningdetailsummary",
"ReasoningDetailText": ".reasoningdetailtext",
- "ReasoningDetailTextFormat": ".reasoningdetailtext",
"ReasoningDetailTextType": ".reasoningdetailtext",
"ReasoningDetailTextTypedDict": ".reasoningdetailtext",
"ReasoningDetailUnion": ".reasoningdetailunion",
@@ -2912,9 +3145,9 @@ _dynamic_imports: dict[str, str] = {
"ReasoningDoneEvent": ".reasoningdoneevent",
"ReasoningDoneEventType": ".reasoningdoneevent",
"ReasoningDoneEventTypedDict": ".reasoningdoneevent",
- "ReasoningEffortEnum": ".reasoningeffortenum",
+ "ReasoningEffort": ".reasoningeffort",
+ "ReasoningFormat": ".reasoningformat",
"ReasoningItem": ".reasoningitem",
- "ReasoningItemFormat": ".reasoningitem",
"ReasoningItemStatusCompleted": ".reasoningitem",
"ReasoningItemStatusInProgress": ".reasoningitem",
"ReasoningItemStatusIncomplete": ".reasoningitem",
@@ -2937,7 +3170,7 @@ _dynamic_imports: dict[str, str] = {
"ReasoningSummaryTextDoneEvent": ".reasoningsummarytextdoneevent",
"ReasoningSummaryTextDoneEventType": ".reasoningsummarytextdoneevent",
"ReasoningSummaryTextDoneEventTypedDict": ".reasoningsummarytextdoneevent",
- "ReasoningSummaryVerbosityEnum": ".reasoningsummaryverbosityenum",
+ "ReasoningSummaryVerbosity": ".reasoningsummaryverbosity",
"ReasoningTextContent": ".reasoningtextcontent",
"ReasoningTextContentType": ".reasoningtextcontent",
"ReasoningTextContentTypedDict": ".reasoningtextcontent",
@@ -2949,10 +3182,13 @@ _dynamic_imports: dict[str, str] = {
"RefusalDoneEventTypedDict": ".refusaldoneevent",
"RequestTimeoutResponseErrorData": ".requesttimeoutresponseerrordata",
"RequestTimeoutResponseErrorDataTypedDict": ".requesttimeoutresponseerrordata",
+ "ResponseHealingPlugin": ".responsehealingplugin",
+ "ResponseHealingPluginID": ".responsehealingplugin",
+ "ResponseHealingPluginTypedDict": ".responsehealingplugin",
"ResponseIncludesEnum": ".responseincludesenum",
+ "Logprob": ".responseoutputtext",
+ "LogprobTypedDict": ".responseoutputtext",
"ResponseOutputText": ".responseoutputtext",
- "ResponseOutputTextLogprob": ".responseoutputtext",
- "ResponseOutputTextLogprobTypedDict": ".responseoutputtext",
"ResponseOutputTextTopLogprob": ".responseoutputtext",
"ResponseOutputTextTopLogprobTypedDict": ".responseoutputtext",
"ResponseOutputTextType": ".responseoutputtext",
@@ -2961,50 +3197,19 @@ _dynamic_imports: dict[str, str] = {
"ResponsesErrorField": ".responseserrorfield",
"ResponsesErrorFieldTypedDict": ".responseserrorfield",
"ResponsesRequest": ".responsesrequest",
- "ResponsesRequestIDAutoRouter": ".responsesrequest",
- "ResponsesRequestIDContextCompression": ".responsesrequest",
- "ResponsesRequestIDFileParser": ".responsesrequest",
- "ResponsesRequestIDModeration": ".responsesrequest",
- "ResponsesRequestIDResponseHealing": ".responsesrequest",
- "ResponsesRequestIDWeb": ".responsesrequest",
- "ResponsesRequestIgnore": ".responsesrequest",
- "ResponsesRequestIgnoreTypedDict": ".responsesrequest",
"ResponsesRequestImageConfig": ".responsesrequest",
"ResponsesRequestImageConfigTypedDict": ".responsesrequest",
- "ResponsesRequestMaxPrice": ".responsesrequest",
- "ResponsesRequestMaxPriceTypedDict": ".responsesrequest",
- "ResponsesRequestOnly": ".responsesrequest",
- "ResponsesRequestOnlyTypedDict": ".responsesrequest",
- "ResponsesRequestOrder": ".responsesrequest",
- "ResponsesRequestOrderTypedDict": ".responsesrequest",
- "ResponsesRequestPluginAutoRouter": ".responsesrequest",
- "ResponsesRequestPluginAutoRouterTypedDict": ".responsesrequest",
- "ResponsesRequestPluginContextCompression": ".responsesrequest",
- "ResponsesRequestPluginContextCompressionTypedDict": ".responsesrequest",
- "ResponsesRequestPluginFileParser": ".responsesrequest",
- "ResponsesRequestPluginFileParserTypedDict": ".responsesrequest",
- "ResponsesRequestPluginModeration": ".responsesrequest",
- "ResponsesRequestPluginModerationTypedDict": ".responsesrequest",
- "ResponsesRequestPluginResponseHealing": ".responsesrequest",
- "ResponsesRequestPluginResponseHealingTypedDict": ".responsesrequest",
- "ResponsesRequestPluginUnion": ".responsesrequest",
- "ResponsesRequestPluginUnionTypedDict": ".responsesrequest",
- "ResponsesRequestPluginWeb": ".responsesrequest",
- "ResponsesRequestPluginWebTypedDict": ".responsesrequest",
- "ResponsesRequestProvider": ".responsesrequest",
- "ResponsesRequestProviderTypedDict": ".responsesrequest",
+ "ResponsesRequestPlugin": ".responsesrequest",
+ "ResponsesRequestPluginTypedDict": ".responsesrequest",
"ResponsesRequestServiceTier": ".responsesrequest",
- "ResponsesRequestSort": ".responsesrequest",
- "ResponsesRequestSortTypedDict": ".responsesrequest",
"ResponsesRequestToolFunction": ".responsesrequest",
"ResponsesRequestToolFunctionTypedDict": ".responsesrequest",
"ResponsesRequestToolUnion": ".responsesrequest",
"ResponsesRequestToolUnionTypedDict": ".responsesrequest",
- "ResponsesRequestTrace": ".responsesrequest",
- "ResponsesRequestTraceTypedDict": ".responsesrequest",
"ResponsesRequestType": ".responsesrequest",
"ResponsesRequestTypedDict": ".responsesrequest",
"SearchContextSizeEnum": ".searchcontextsizeenum",
+ "SearchQualityLevel": ".searchqualitylevel",
"Security": ".security",
"SecurityTypedDict": ".security",
"ServiceUnavailableResponseErrorData": ".serviceunavailableresponseerrordata",
@@ -3017,58 +3222,61 @@ _dynamic_imports: dict[str, str] = {
"Variables": ".storedprompttemplate",
"VariablesTypedDict": ".storedprompttemplate",
"StreamEvents": ".streamevents",
- "StreamEventsResponseCompleted": ".streamevents",
- "StreamEventsResponseCompletedTypedDict": ".streamevents",
- "StreamEventsResponseCreated": ".streamevents",
- "StreamEventsResponseCreatedTypedDict": ".streamevents",
- "StreamEventsResponseFailed": ".streamevents",
- "StreamEventsResponseFailedTypedDict": ".streamevents",
- "StreamEventsResponseInProgress": ".streamevents",
- "StreamEventsResponseInProgressTypedDict": ".streamevents",
- "StreamEventsResponseIncomplete": ".streamevents",
- "StreamEventsResponseIncompleteTypedDict": ".streamevents",
- "StreamEventsResponseOutputItemAdded": ".streamevents",
- "StreamEventsResponseOutputItemAddedTypedDict": ".streamevents",
- "StreamEventsResponseOutputItemDone": ".streamevents",
- "StreamEventsResponseOutputItemDoneTypedDict": ".streamevents",
"StreamEventsTypedDict": ".streamevents",
- "TypeResponseCompleted": ".streamevents",
- "TypeResponseCreated": ".streamevents",
- "TypeResponseFailed": ".streamevents",
- "TypeResponseInProgress": ".streamevents",
- "TypeResponseIncomplete": ".streamevents",
- "TypeResponseOutputItemAdded": ".streamevents",
- "TypeResponseOutputItemDone": ".streamevents",
+ "StreamEventsResponseCompleted": ".streameventsresponsecompleted",
+ "StreamEventsResponseCompletedType": ".streameventsresponsecompleted",
+ "StreamEventsResponseCompletedTypedDict": ".streameventsresponsecompleted",
+ "StreamEventsResponseFailed": ".streameventsresponsefailed",
+ "StreamEventsResponseFailedType": ".streameventsresponsefailed",
+ "StreamEventsResponseFailedTypedDict": ".streameventsresponsefailed",
+ "StreamEventsResponseIncomplete": ".streameventsresponseincomplete",
+ "StreamEventsResponseIncompleteType": ".streameventsresponseincomplete",
+ "StreamEventsResponseIncompleteTypedDict": ".streameventsresponseincomplete",
+ "StreamEventsResponseOutputItemAdded": ".streameventsresponseoutputitemadded",
+ "StreamEventsResponseOutputItemAddedType": ".streameventsresponseoutputitemadded",
+ "StreamEventsResponseOutputItemAddedTypedDict": ".streameventsresponseoutputitemadded",
+ "StreamEventsResponseOutputItemDone": ".streameventsresponseoutputitemdone",
+ "StreamEventsResponseOutputItemDoneType": ".streameventsresponseoutputitemdone",
+ "StreamEventsResponseOutputItemDoneTypedDict": ".streameventsresponseoutputitemdone",
+ "StreamLogprob": ".streamlogprob",
+ "StreamLogprobTypedDict": ".streamlogprob",
+ "StreamLogprobTopLogprob": ".streamlogprobtoplogprob",
+ "StreamLogprobTopLogprobTypedDict": ".streamlogprobtoplogprob",
"TextConfig": ".textconfig",
"TextConfigTypedDict": ".textconfig",
"TextConfigVerbosity": ".textconfig",
"TextDeltaEvent": ".textdeltaevent",
- "TextDeltaEventLogprob": ".textdeltaevent",
- "TextDeltaEventLogprobTypedDict": ".textdeltaevent",
- "TextDeltaEventTopLogprob": ".textdeltaevent",
- "TextDeltaEventTopLogprobTypedDict": ".textdeltaevent",
"TextDeltaEventType": ".textdeltaevent",
"TextDeltaEventTypedDict": ".textdeltaevent",
"TextDoneEvent": ".textdoneevent",
- "TextDoneEventLogprob": ".textdoneevent",
- "TextDoneEventLogprobTypedDict": ".textdoneevent",
- "TextDoneEventTopLogprob": ".textdoneevent",
- "TextDoneEventTopLogprobTypedDict": ".textdoneevent",
"TextDoneEventType": ".textdoneevent",
"TextDoneEventTypedDict": ".textdoneevent",
"TextExtendedConfig": ".textextendedconfig",
"TextExtendedConfigTypedDict": ".textextendedconfig",
"TextExtendedConfigVerbosity": ".textextendedconfig",
- "ToolCallStatusEnum": ".toolcallstatusenum",
+ "ToolCallStatus": ".toolcallstatus",
+ "Mode": ".toolchoiceallowed",
+ "ModeAuto": ".toolchoiceallowed",
+ "ModeRequired": ".toolchoiceallowed",
+ "ModeTypedDict": ".toolchoiceallowed",
+ "ToolChoiceAllowed": ".toolchoiceallowed",
+ "ToolChoiceAllowedType": ".toolchoiceallowed",
+ "ToolChoiceAllowedTypedDict": ".toolchoiceallowed",
"TooManyRequestsResponseErrorData": ".toomanyrequestsresponseerrordata",
"TooManyRequestsResponseErrorDataTypedDict": ".toomanyrequestsresponseerrordata",
"TopProviderInfo": ".topproviderinfo",
"TopProviderInfoTypedDict": ".topproviderinfo",
- "TruncationEnum": ".truncationenum",
+ "TraceConfig": ".traceconfig",
+ "TraceConfigTypedDict": ".traceconfig",
+ "Truncation": ".truncation",
"UnauthorizedResponseErrorData": ".unauthorizedresponseerrordata",
"UnauthorizedResponseErrorDataTypedDict": ".unauthorizedresponseerrordata",
"UnprocessableEntityResponseErrorData": ".unprocessableentityresponseerrordata",
"UnprocessableEntityResponseErrorDataTypedDict": ".unprocessableentityresponseerrordata",
+ "UpdateGuardrailRequest": ".updateguardrailrequest",
+ "UpdateGuardrailRequestTypedDict": ".updateguardrailrequest",
+ "UpdateGuardrailResponse": ".updateguardrailresponse",
+ "UpdateGuardrailResponseTypedDict": ".updateguardrailresponse",
"URLCitation": ".urlcitation",
"URLCitationType": ".urlcitation",
"URLCitationTypedDict": ".urlcitation",
@@ -3080,6 +3288,27 @@ _dynamic_imports: dict[str, str] = {
"OutputTokensDetailsTypedDict": ".usage",
"Usage": ".usage",
"UsageTypedDict": ".usage",
+ "AspectRatio": ".videogenerationrequest",
+ "Options": ".videogenerationrequest",
+ "OptionsTypedDict": ".videogenerationrequest",
+ "Provider": ".videogenerationrequest",
+ "ProviderTypedDict": ".videogenerationrequest",
+ "Resolution": ".videogenerationrequest",
+ "VideoGenerationRequest": ".videogenerationrequest",
+ "VideoGenerationRequestTypedDict": ".videogenerationrequest",
+ "VideoGenerationResponse": ".videogenerationresponse",
+ "VideoGenerationResponseStatus": ".videogenerationresponse",
+ "VideoGenerationResponseTypedDict": ".videogenerationresponse",
+ "VideoGenerationUsage": ".videogenerationusage",
+ "VideoGenerationUsageTypedDict": ".videogenerationusage",
+ "SupportedAspectRatio": ".videomodel",
+ "SupportedFrameImage": ".videomodel",
+ "SupportedResolution": ".videomodel",
+ "SupportedSize": ".videomodel",
+ "VideoModel": ".videomodel",
+ "VideoModelTypedDict": ".videomodel",
+ "VideoModelsListResponse": ".videomodelslistresponse",
+ "VideoModelsListResponseTypedDict": ".videomodelslistresponse",
"WebSearchCallCompletedEvent": ".websearchcallcompletedevent",
"WebSearchCallCompletedEventType": ".websearchcallcompletedevent",
"WebSearchCallCompletedEventTypedDict": ".websearchcallcompletedevent",
@@ -3089,22 +3318,33 @@ _dynamic_imports: dict[str, str] = {
"WebSearchCallSearchingEvent": ".websearchcallsearchingevent",
"WebSearchCallSearchingEventType": ".websearchcallsearchingevent",
"WebSearchCallSearchingEventTypedDict": ".websearchcallsearchingevent",
+ "WebSearchConfig": ".websearchconfig",
+ "WebSearchConfigTypedDict": ".websearchconfig",
+ "WebSearchDomainFilter": ".websearchdomainfilter",
+ "WebSearchDomainFilterTypedDict": ".websearchdomainfilter",
"WebSearchEngine": ".websearchengine",
+ "WebSearchEngineEnum": ".websearchengineenum",
+ "WebSearchPlugin": ".websearchplugin",
+ "WebSearchPluginID": ".websearchplugin",
+ "WebSearchPluginTypedDict": ".websearchplugin",
"WebSearchServerTool": ".websearchservertool",
- "WebSearchServerToolEngine": ".websearchservertool",
- "WebSearchServerToolFilters": ".websearchservertool",
- "WebSearchServerToolFiltersTypedDict": ".websearchservertool",
"WebSearchServerToolType": ".websearchservertool",
"WebSearchServerToolTypedDict": ".websearchservertool",
+ "Parameters": ".websearchservertool_openrouter",
+ "ParametersTypedDict": ".websearchservertool_openrouter",
"WebSearchServerToolOpenRouter": ".websearchservertool_openrouter",
- "WebSearchServerToolOpenRouterParameters": ".websearchservertool_openrouter",
- "WebSearchServerToolOpenRouterParametersTypedDict": ".websearchservertool_openrouter",
"WebSearchServerToolOpenRouterType": ".websearchservertool_openrouter",
"WebSearchServerToolOpenRouterTypedDict": ".websearchservertool_openrouter",
+ "WebSearchSource": ".websearchsource",
+ "WebSearchSourceType": ".websearchsource",
+ "WebSearchSourceTypedDict": ".websearchsource",
"WebSearchStatus": ".websearchstatus",
"WebSearchUserLocation": ".websearchuserlocation",
"WebSearchUserLocationType": ".websearchuserlocation",
"WebSearchUserLocationTypedDict": ".websearchuserlocation",
+ "WebSearchUserLocationServerTool": ".websearchuserlocationservertool",
+ "WebSearchUserLocationServerToolType": ".websearchuserlocationservertool",
+ "WebSearchUserLocationServerToolTypedDict": ".websearchuserlocationservertool",
}
diff --git a/src/openrouter/components/activityitem.py b/src/openrouter/components/activityitem.py
index 12c081f..2f00349 100644
--- a/src/openrouter/components/activityitem.py
+++ b/src/openrouter/components/activityitem.py
@@ -7,60 +7,60 @@ from typing_extensions import Annotated, TypedDict
class ActivityItemTypedDict(TypedDict):
+ byok_usage_inference: float
+ r"""BYOK inference cost in USD (external credits spent)"""
+ completion_tokens: int
+ r"""Total completion tokens generated"""
date_: str
r"""Date of the activity (YYYY-MM-DD format)"""
+ endpoint_id: str
+ r"""Unique identifier for the endpoint"""
model: str
r"""Model slug (e.g., \"openai/gpt-4.1\")"""
model_permaslug: str
r"""Model permaslug (e.g., \"openai/gpt-4.1-2025-04-14\")"""
- endpoint_id: str
- r"""Unique identifier for the endpoint"""
+ prompt_tokens: int
+ r"""Total prompt tokens used"""
provider_name: str
r"""Name of the provider serving this endpoint"""
+ reasoning_tokens: int
+ r"""Total reasoning tokens used"""
+ requests: int
+ r"""Number of requests made"""
usage: float
r"""Total cost in USD (OpenRouter credits spent)"""
- byok_usage_inference: float
- r"""BYOK inference cost in USD (external credits spent)"""
- requests: float
- r"""Number of requests made"""
- prompt_tokens: float
- r"""Total prompt tokens used"""
- completion_tokens: float
- r"""Total completion tokens generated"""
- reasoning_tokens: float
- r"""Total reasoning tokens used"""
class ActivityItem(BaseModel):
+ byok_usage_inference: float
+ r"""BYOK inference cost in USD (external credits spent)"""
+
+ completion_tokens: int
+ r"""Total completion tokens generated"""
+
date_: Annotated[str, pydantic.Field(alias="date")]
r"""Date of the activity (YYYY-MM-DD format)"""
+ endpoint_id: str
+ r"""Unique identifier for the endpoint"""
+
model: str
r"""Model slug (e.g., \"openai/gpt-4.1\")"""
model_permaslug: str
r"""Model permaslug (e.g., \"openai/gpt-4.1-2025-04-14\")"""
- endpoint_id: str
- r"""Unique identifier for the endpoint"""
+ prompt_tokens: int
+ r"""Total prompt tokens used"""
provider_name: str
r"""Name of the provider serving this endpoint"""
- usage: float
- r"""Total cost in USD (OpenRouter credits spent)"""
+ reasoning_tokens: int
+ r"""Total reasoning tokens used"""
- byok_usage_inference: float
- r"""BYOK inference cost in USD (external credits spent)"""
-
- requests: float
+ requests: int
r"""Number of requests made"""
- prompt_tokens: float
- r"""Total prompt tokens used"""
-
- completion_tokens: float
- r"""Total completion tokens generated"""
-
- reasoning_tokens: float
- r"""Total reasoning tokens used"""
+ usage: float
+ r"""Total cost in USD (OpenRouter credits spent)"""
diff --git a/src/openrouter/components/activityresponse.py b/src/openrouter/components/activityresponse.py
new file mode 100644
index 0000000..1138e6f
--- /dev/null
+++ b/src/openrouter/components/activityresponse.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .activityitem import ActivityItem, ActivityItemTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ActivityResponseTypedDict(TypedDict):
+ data: List[ActivityItemTypedDict]
+ r"""List of activity items"""
+
+
+class ActivityResponse(BaseModel):
+ data: List[ActivityItem]
+ r"""List of activity items"""
diff --git a/src/openrouter/components/annotationaddedevent.py b/src/openrouter/components/annotationaddedevent.py
index 361c244..597a5e0 100644
--- a/src/openrouter/components/annotationaddedevent.py
+++ b/src/openrouter/components/annotationaddedevent.py
@@ -16,28 +16,28 @@ AnnotationAddedEventType = Literal["response.output_text.annotation.added",]
class AnnotationAddedEventTypedDict(TypedDict):
r"""Event emitted when a text annotation is added to output"""
- type: AnnotationAddedEventType
- output_index: float
- item_id: str
- content_index: float
- sequence_number: float
- annotation_index: float
annotation: OpenAIResponsesAnnotationTypedDict
+ annotation_index: int
+ content_index: int
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: AnnotationAddedEventType
class AnnotationAddedEvent(BaseModel):
r"""Event emitted when a text annotation is added to output"""
- type: AnnotationAddedEventType
+ annotation: OpenAIResponsesAnnotation
- output_index: float
+ annotation_index: int
+
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
- annotation_index: float
-
- annotation: OpenAIResponsesAnnotation
+ type: AnnotationAddedEventType
diff --git a/src/openrouter/components/anthropiccachecontroldirective.py b/src/openrouter/components/anthropiccachecontroldirective.py
new file mode 100644
index 0000000..67645f0
--- /dev/null
+++ b/src/openrouter/components/anthropiccachecontroldirective.py
@@ -0,0 +1,29 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .anthropiccachecontrolttl import AnthropicCacheControlTTL
+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
+
+
+AnthropicCacheControlDirectiveType = Literal["ephemeral",]
+
+
+class AnthropicCacheControlDirectiveTypedDict(TypedDict):
+ r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ type: AnthropicCacheControlDirectiveType
+ ttl: NotRequired[AnthropicCacheControlTTL]
+
+
+class AnthropicCacheControlDirective(BaseModel):
+ r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
+
+ type: AnthropicCacheControlDirectiveType
+
+ ttl: Annotated[
+ Optional[AnthropicCacheControlTTL], PlainValidator(validate_open_enum(False))
+ ] = None
diff --git a/src/openrouter/components/anthropiccachecontrolttl.py b/src/openrouter/components/anthropiccachecontrolttl.py
new file mode 100644
index 0000000..05a105c
--- /dev/null
+++ b/src/openrouter/components/anthropiccachecontrolttl.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+AnthropicCacheControlTTL = Union[
+ Literal[
+ "5m",
+ "1h",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/autorouterplugin.py b/src/openrouter/components/autorouterplugin.py
new file mode 100644
index 0000000..2cec0f7
--- /dev/null
+++ b/src/openrouter/components/autorouterplugin.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 List, Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+AutoRouterPluginID = Literal["auto-router",]
+
+
+class AutoRouterPluginTypedDict(TypedDict):
+ id: AutoRouterPluginID
+ allowed_models: NotRequired[List[str]]
+ r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
+
+
+class AutoRouterPlugin(BaseModel):
+ id: AutoRouterPluginID
+
+ allowed_models: Optional[List[str]] = None
+ r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
diff --git a/src/openrouter/components/baseinputs_union.py b/src/openrouter/components/baseinputs_union.py
index aac7cf9..7e50121 100644
--- a/src/openrouter/components/baseinputs_union.py
+++ b/src/openrouter/components/baseinputs_union.py
@@ -5,12 +5,23 @@ from .inputaudio import InputAudio, InputAudioTypedDict
from .inputfile import InputFile, InputFileTypedDict
from .inputimage import InputImage, InputImageTypedDict
from .inputtext import InputText, InputTextTypedDict
+from .openairesponsefunctiontoolcall import (
+ OpenAIResponseFunctionToolCall,
+ OpenAIResponseFunctionToolCallTypedDict,
+)
+from .openairesponsefunctiontoolcalloutput import (
+ OpenAIResponseFunctionToolCallOutput,
+ OpenAIResponseFunctionToolCallOutputTypedDict,
+)
+from .openairesponseinputmessageitem import (
+ OpenAIResponseInputMessageItem,
+ OpenAIResponseInputMessageItemTypedDict,
+)
from .outputitemimagegenerationcall import (
OutputItemImageGenerationCall,
OutputItemImageGenerationCallTypedDict,
)
from .outputmessage import OutputMessage, OutputMessageTypedDict
-from .toolcallstatusenum import ToolCallStatusEnum
from openrouter.types import (
BaseModel,
Nullable,
@@ -18,249 +29,12 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
-from openrouter.utils import get_discriminator, validate_open_enum
+from openrouter.utils import get_discriminator
from pydantic import Discriminator, Tag, model_serializer
-from pydantic.functional_validators import PlainValidator
from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-BaseInputsTypeFunctionCall = Literal["function_call",]
-
-
-class BaseInputsFunctionCallTypedDict(TypedDict):
- type: BaseInputsTypeFunctionCall
- call_id: str
- name: str
- arguments: str
- id: NotRequired[str]
- status: NotRequired[Nullable[ToolCallStatusEnum]]
-
-
-class BaseInputsFunctionCall(BaseModel):
- type: BaseInputsTypeFunctionCall
-
- call_id: str
-
- name: str
-
- arguments: str
-
- id: Optional[str] = None
-
- status: Annotated[
- OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False))
- ] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["id", "status"]
- nullable_fields = ["status"]
- null_default_fields = []
-
- serialized = handler(self)
-
- m = {}
-
- for n, f in type(self).model_fields.items():
- k = f.alias or n
- val = serialized.get(k)
- serialized.pop(k, None)
-
- optional_nullable = k in optional_fields and k in nullable_fields
- is_set = (
- self.__pydantic_fields_set__.intersection({n})
- or k in null_default_fields
- ) # pylint: disable=no-member
-
- if val is not None and val != UNSET_SENTINEL:
- m[k] = val
- elif val != UNSET_SENTINEL and (
- not k in optional_fields or (optional_nullable and is_set)
- ):
- m[k] = val
-
- return m
-
-
-BaseInputsTypeFunctionCallOutput = Literal["function_call_output",]
-
-
-BaseInputsOutput1TypedDict = TypeAliasType(
- "BaseInputsOutput1TypedDict",
- Union[InputTextTypedDict, InputImageTypedDict, InputFileTypedDict],
-)
-
-
-BaseInputsOutput1 = Annotated[
- Union[
- Annotated[InputText, Tag("input_text")],
- Annotated[InputImage, Tag("input_image")],
- Annotated[InputFile, Tag("input_file")],
- ],
- Discriminator(lambda m: get_discriminator(m, "type", "type")),
-]
-
-
-BaseInputsOutput2TypedDict = TypeAliasType(
- "BaseInputsOutput2TypedDict", Union[str, List[BaseInputsOutput1TypedDict]]
-)
-
-
-BaseInputsOutput2 = TypeAliasType(
- "BaseInputsOutput2", Union[str, List[BaseInputsOutput1]]
-)
-
-
-class BaseInputsFunctionCallOutputTypedDict(TypedDict):
- type: BaseInputsTypeFunctionCallOutput
- call_id: str
- output: BaseInputsOutput2TypedDict
- id: NotRequired[Nullable[str]]
- status: NotRequired[Nullable[ToolCallStatusEnum]]
-
-
-class BaseInputsFunctionCallOutput(BaseModel):
- type: BaseInputsTypeFunctionCallOutput
-
- call_id: str
-
- output: BaseInputsOutput2
-
- id: OptionalNullable[str] = UNSET
-
- status: Annotated[
- OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False))
- ] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["id", "status"]
- nullable_fields = ["id", "status"]
- null_default_fields = []
-
- serialized = handler(self)
-
- m = {}
-
- for n, f in type(self).model_fields.items():
- k = f.alias or n
- val = serialized.get(k)
- serialized.pop(k, None)
-
- optional_nullable = k in optional_fields and k in nullable_fields
- is_set = (
- self.__pydantic_fields_set__.intersection({n})
- or k in null_default_fields
- ) # pylint: disable=no-member
-
- if val is not None and val != UNSET_SENTINEL:
- m[k] = val
- elif val != UNSET_SENTINEL and (
- not k in optional_fields or (optional_nullable and is_set)
- ):
- m[k] = val
-
- return m
-
-
-BaseInputsTypeMessage2 = Literal["message",]
-
-
-BaseInputsRoleDeveloper2 = Literal["developer",]
-
-
-BaseInputsRoleSystem2 = Literal["system",]
-
-
-BaseInputsRoleUser2 = Literal["user",]
-
-
-BaseInputsRoleUnion2TypedDict = TypeAliasType(
- "BaseInputsRoleUnion2TypedDict",
- Union[BaseInputsRoleUser2, BaseInputsRoleSystem2, BaseInputsRoleDeveloper2],
-)
-
-
-BaseInputsRoleUnion2 = TypeAliasType(
- "BaseInputsRoleUnion2",
- Union[BaseInputsRoleUser2, BaseInputsRoleSystem2, BaseInputsRoleDeveloper2],
-)
-
-
-BaseInputsContent3TypedDict = TypeAliasType(
- "BaseInputsContent3TypedDict",
- Union[
- InputTextTypedDict, InputAudioTypedDict, InputImageTypedDict, InputFileTypedDict
- ],
-)
-
-
-BaseInputsContent3 = Annotated[
- Union[
- Annotated[InputText, Tag("input_text")],
- Annotated[InputImage, Tag("input_image")],
- Annotated[InputFile, Tag("input_file")],
- Annotated[InputAudio, Tag("input_audio")],
- ],
- Discriminator(lambda m: get_discriminator(m, "type", "type")),
-]
-
-
-class BaseInputsMessage2TypedDict(TypedDict):
- id: str
- role: BaseInputsRoleUnion2TypedDict
- content: List[BaseInputsContent3TypedDict]
- type: NotRequired[BaseInputsTypeMessage2]
-
-
-class BaseInputsMessage2(BaseModel):
- id: str
-
- role: BaseInputsRoleUnion2
-
- content: List[BaseInputsContent3]
-
- type: Optional[BaseInputsTypeMessage2] = None
-
-
-BaseInputsTypeMessage1 = Literal["message",]
-
-
-BaseInputsRoleDeveloper1 = Literal["developer",]
-
-
-BaseInputsRoleAssistant = Literal["assistant",]
-
-
-BaseInputsRoleSystem1 = Literal["system",]
-
-
-BaseInputsRoleUser1 = Literal["user",]
-
-
-BaseInputsRoleUnion1TypedDict = TypeAliasType(
- "BaseInputsRoleUnion1TypedDict",
- Union[
- BaseInputsRoleUser1,
- BaseInputsRoleSystem1,
- BaseInputsRoleAssistant,
- BaseInputsRoleDeveloper1,
- ],
-)
-
-
-BaseInputsRoleUnion1 = TypeAliasType(
- "BaseInputsRoleUnion1",
- Union[
- BaseInputsRoleUser1,
- BaseInputsRoleSystem1,
- BaseInputsRoleAssistant,
- BaseInputsRoleDeveloper1,
- ],
-)
-
-
BaseInputsContent1TypedDict = TypeAliasType(
"BaseInputsContent1TypedDict",
Union[
@@ -271,10 +45,10 @@ BaseInputsContent1TypedDict = TypeAliasType(
BaseInputsContent1 = Annotated[
Union[
- Annotated[InputText, Tag("input_text")],
- Annotated[InputImage, Tag("input_image")],
- Annotated[InputFile, Tag("input_file")],
Annotated[InputAudio, Tag("input_audio")],
+ Annotated[InputFile, Tag("input_file")],
+ Annotated[InputImage, Tag("input_image")],
+ Annotated[InputText, Tag("input_text")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
@@ -308,25 +82,62 @@ BaseInputsPhaseUnion = TypeAliasType(
)
-class BaseInputsMessage1TypedDict(TypedDict):
- role: BaseInputsRoleUnion1TypedDict
+BaseInputsRoleDeveloper = Literal["developer",]
+
+
+BaseInputsRoleAssistant = Literal["assistant",]
+
+
+BaseInputsRoleSystem = Literal["system",]
+
+
+BaseInputsRoleUser = Literal["user",]
+
+
+BaseInputsRoleUnionTypedDict = TypeAliasType(
+ "BaseInputsRoleUnionTypedDict",
+ Union[
+ BaseInputsRoleUser,
+ BaseInputsRoleSystem,
+ BaseInputsRoleAssistant,
+ BaseInputsRoleDeveloper,
+ ],
+)
+
+
+BaseInputsRoleUnion = TypeAliasType(
+ "BaseInputsRoleUnion",
+ Union[
+ BaseInputsRoleUser,
+ BaseInputsRoleSystem,
+ BaseInputsRoleAssistant,
+ BaseInputsRoleDeveloper,
+ ],
+)
+
+
+BaseInputsType = Literal["message",]
+
+
+class BaseInputsMessageTypedDict(TypedDict):
content: BaseInputsContent2TypedDict
- type: NotRequired[BaseInputsTypeMessage1]
+ role: BaseInputsRoleUnionTypedDict
phase: NotRequired[Nullable[BaseInputsPhaseUnionTypedDict]]
+ type: NotRequired[BaseInputsType]
-class BaseInputsMessage1(BaseModel):
- role: BaseInputsRoleUnion1
-
+class BaseInputsMessage(BaseModel):
content: BaseInputsContent2
- type: Optional[BaseInputsTypeMessage1] = None
+ role: BaseInputsRoleUnion
phase: OptionalNullable[BaseInputsPhaseUnion] = UNSET
+ type: Optional[BaseInputsType] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["type", "phase"]
+ optional_fields = ["phase", "type"]
nullable_fields = ["phase"]
null_default_fields = []
@@ -358,11 +169,11 @@ class BaseInputsMessage1(BaseModel):
BaseInputsUnion1TypedDict = TypeAliasType(
"BaseInputsUnion1TypedDict",
Union[
- BaseInputsMessage1TypedDict,
- BaseInputsMessage2TypedDict,
+ BaseInputsMessageTypedDict,
+ OpenAIResponseInputMessageItemTypedDict,
OutputItemImageGenerationCallTypedDict,
- BaseInputsFunctionCallOutputTypedDict,
- BaseInputsFunctionCallTypedDict,
+ OpenAIResponseFunctionToolCallOutputTypedDict,
+ OpenAIResponseFunctionToolCallTypedDict,
OutputMessageTypedDict,
],
)
@@ -371,11 +182,11 @@ BaseInputsUnion1TypedDict = TypeAliasType(
BaseInputsUnion1 = TypeAliasType(
"BaseInputsUnion1",
Union[
- BaseInputsMessage1,
- BaseInputsMessage2,
+ BaseInputsMessage,
+ OpenAIResponseInputMessageItem,
OutputItemImageGenerationCall,
- BaseInputsFunctionCallOutput,
- BaseInputsFunctionCall,
+ OpenAIResponseFunctionToolCallOutput,
+ OpenAIResponseFunctionToolCall,
OutputMessage,
],
)
diff --git a/src/openrouter/components/basereasoningconfig.py b/src/openrouter/components/basereasoningconfig.py
index 7c9263e..22bd982 100644
--- a/src/openrouter/components/basereasoningconfig.py
+++ b/src/openrouter/components/basereasoningconfig.py
@@ -1,8 +1,8 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .reasoningeffortenum import ReasoningEffortEnum
-from .reasoningsummaryverbosityenum import ReasoningSummaryVerbosityEnum
+from .reasoningeffort import ReasoningEffort
+from .reasoningsummaryverbosity import ReasoningSummaryVerbosity
from openrouter.types import (
BaseModel,
Nullable,
@@ -17,17 +17,17 @@ from typing_extensions import Annotated, NotRequired, TypedDict
class BaseReasoningConfigTypedDict(TypedDict):
- effort: NotRequired[Nullable[ReasoningEffortEnum]]
- summary: NotRequired[Nullable[ReasoningSummaryVerbosityEnum]]
+ effort: NotRequired[Nullable[ReasoningEffort]]
+ summary: NotRequired[Nullable[ReasoningSummaryVerbosity]]
class BaseReasoningConfig(BaseModel):
effort: Annotated[
- OptionalNullable[ReasoningEffortEnum], PlainValidator(validate_open_enum(False))
+ OptionalNullable[ReasoningEffort], PlainValidator(validate_open_enum(False))
] = UNSET
summary: Annotated[
- OptionalNullable[ReasoningSummaryVerbosityEnum],
+ OptionalNullable[ReasoningSummaryVerbosity],
PlainValidator(validate_open_enum(False)),
] = UNSET
diff --git a/src/openrouter/components/bulkassignkeysrequest.py b/src/openrouter/components/bulkassignkeysrequest.py
new file mode 100644
index 0000000..a9bfb5e
--- /dev/null
+++ b/src/openrouter/components/bulkassignkeysrequest.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 BulkAssignKeysRequestTypedDict(TypedDict):
+ key_hashes: List[str]
+ r"""Array of API key hashes to assign to the guardrail"""
+
+
+class BulkAssignKeysRequest(BaseModel):
+ key_hashes: List[str]
+ r"""Array of API key hashes to assign to the guardrail"""
diff --git a/src/openrouter/components/bulkassignkeysresponse.py b/src/openrouter/components/bulkassignkeysresponse.py
new file mode 100644
index 0000000..e994e0e
--- /dev/null
+++ b/src/openrouter/components/bulkassignkeysresponse.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 BulkAssignKeysResponseTypedDict(TypedDict):
+ assigned_count: int
+ r"""Number of keys successfully assigned"""
+
+
+class BulkAssignKeysResponse(BaseModel):
+ assigned_count: int
+ r"""Number of keys successfully assigned"""
diff --git a/src/openrouter/components/bulkassignmembersrequest.py b/src/openrouter/components/bulkassignmembersrequest.py
new file mode 100644
index 0000000..5aef49c
--- /dev/null
+++ b/src/openrouter/components/bulkassignmembersrequest.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 BulkAssignMembersRequestTypedDict(TypedDict):
+ member_user_ids: List[str]
+ r"""Array of member user IDs to assign to the guardrail"""
+
+
+class BulkAssignMembersRequest(BaseModel):
+ member_user_ids: List[str]
+ r"""Array of member user IDs to assign to the guardrail"""
diff --git a/src/openrouter/components/bulkassignmembersresponse.py b/src/openrouter/components/bulkassignmembersresponse.py
new file mode 100644
index 0000000..2435b0d
--- /dev/null
+++ b/src/openrouter/components/bulkassignmembersresponse.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 BulkAssignMembersResponseTypedDict(TypedDict):
+ assigned_count: int
+ r"""Number of members successfully assigned"""
+
+
+class BulkAssignMembersResponse(BaseModel):
+ assigned_count: int
+ r"""Number of members successfully assigned"""
diff --git a/src/openrouter/components/bulkunassignkeysrequest.py b/src/openrouter/components/bulkunassignkeysrequest.py
new file mode 100644
index 0000000..27b1d37
--- /dev/null
+++ b/src/openrouter/components/bulkunassignkeysrequest.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 BulkUnassignKeysRequestTypedDict(TypedDict):
+ key_hashes: List[str]
+ r"""Array of API key hashes to unassign from the guardrail"""
+
+
+class BulkUnassignKeysRequest(BaseModel):
+ key_hashes: List[str]
+ r"""Array of API key hashes to unassign from the guardrail"""
diff --git a/src/openrouter/components/bulkunassignkeysresponse.py b/src/openrouter/components/bulkunassignkeysresponse.py
new file mode 100644
index 0000000..60ae254
--- /dev/null
+++ b/src/openrouter/components/bulkunassignkeysresponse.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 BulkUnassignKeysResponseTypedDict(TypedDict):
+ unassigned_count: int
+ r"""Number of keys successfully unassigned"""
+
+
+class BulkUnassignKeysResponse(BaseModel):
+ unassigned_count: int
+ r"""Number of keys successfully unassigned"""
diff --git a/src/openrouter/components/bulkunassignmembersrequest.py b/src/openrouter/components/bulkunassignmembersrequest.py
new file mode 100644
index 0000000..40e1b3d
--- /dev/null
+++ b/src/openrouter/components/bulkunassignmembersrequest.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 BulkUnassignMembersRequestTypedDict(TypedDict):
+ member_user_ids: List[str]
+ r"""Array of member user IDs to unassign from the guardrail"""
+
+
+class BulkUnassignMembersRequest(BaseModel):
+ member_user_ids: List[str]
+ r"""Array of member user IDs to unassign from the guardrail"""
diff --git a/src/openrouter/components/bulkunassignmembersresponse.py b/src/openrouter/components/bulkunassignmembersresponse.py
new file mode 100644
index 0000000..219148f
--- /dev/null
+++ b/src/openrouter/components/bulkunassignmembersresponse.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 BulkUnassignMembersResponseTypedDict(TypedDict):
+ unassigned_count: int
+ r"""Number of members successfully unassigned"""
+
+
+class BulkUnassignMembersResponse(BaseModel):
+ unassigned_count: int
+ r"""Number of members successfully unassigned"""
diff --git a/src/openrouter/components/chatassistantmessage.py b/src/openrouter/components/chatassistantmessage.py
index 78199e8..60b919a 100644
--- a/src/openrouter/components/chatassistantmessage.py
+++ b/src/openrouter/components/chatassistantmessage.py
@@ -18,9 +18,6 @@ from typing import Any, List, Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict
-ChatAssistantMessageRole = Literal["assistant",]
-
-
ChatAssistantMessageContentTypedDict = TypeAliasType(
"ChatAssistantMessageContentTypedDict",
Union[str, List[ChatContentItemsTypedDict], Any],
@@ -34,26 +31,29 @@ ChatAssistantMessageContent = TypeAliasType(
r"""Assistant message content"""
+ChatAssistantMessageRole = Literal["assistant",]
+
+
class ChatAssistantMessageTypedDict(TypedDict):
r"""Assistant message for requests and responses"""
role: ChatAssistantMessageRole
+ audio: NotRequired[ChatAudioOutputTypedDict]
+ r"""Audio output data or reference"""
content: NotRequired[Nullable[ChatAssistantMessageContentTypedDict]]
r"""Assistant message content"""
+ images: NotRequired[List[ChatAssistantImagesTypedDict]]
+ r"""Generated images from image generation models"""
name: NotRequired[str]
r"""Optional name for the assistant"""
- tool_calls: NotRequired[List[ChatToolCallTypedDict]]
- r"""Tool calls made by the assistant"""
- refusal: NotRequired[Nullable[str]]
- r"""Refusal message if content was refused"""
reasoning: NotRequired[Nullable[str]]
r"""Reasoning output"""
reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]]
r"""Reasoning details for extended thinking models"""
- images: NotRequired[List[ChatAssistantImagesTypedDict]]
- r"""Generated images from image generation models"""
- audio: NotRequired[ChatAudioOutputTypedDict]
- r"""Audio output data or reference"""
+ refusal: NotRequired[Nullable[str]]
+ r"""Refusal message if content was refused"""
+ tool_calls: NotRequired[List[ChatToolCallTypedDict]]
+ r"""Tool calls made by the assistant"""
class ChatAssistantMessage(BaseModel):
@@ -61,43 +61,43 @@ class ChatAssistantMessage(BaseModel):
role: ChatAssistantMessageRole
+ audio: Optional[ChatAudioOutput] = None
+ r"""Audio output data or reference"""
+
content: OptionalNullable[ChatAssistantMessageContent] = UNSET
r"""Assistant message content"""
+ images: Optional[List[ChatAssistantImages]] = None
+ r"""Generated images from image generation models"""
+
name: Optional[str] = None
r"""Optional name for the assistant"""
- tool_calls: Optional[List[ChatToolCall]] = None
- r"""Tool calls made by the assistant"""
-
- refusal: OptionalNullable[str] = UNSET
- r"""Refusal message if content was refused"""
-
reasoning: OptionalNullable[str] = UNSET
r"""Reasoning output"""
reasoning_details: Optional[List[ReasoningDetailUnion]] = None
r"""Reasoning details for extended thinking models"""
- images: Optional[List[ChatAssistantImages]] = None
- r"""Generated images from image generation models"""
+ refusal: OptionalNullable[str] = UNSET
+ r"""Refusal message if content was refused"""
- audio: Optional[ChatAudioOutput] = None
- r"""Audio output data or reference"""
+ tool_calls: Optional[List[ChatToolCall]] = None
+ r"""Tool calls made by the assistant"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "audio",
"content",
+ "images",
"name",
- "tool_calls",
- "refusal",
"reasoning",
"reasoning_details",
- "images",
- "audio",
+ "refusal",
+ "tool_calls",
]
- nullable_fields = ["content", "refusal", "reasoning"]
+ nullable_fields = ["content", "reasoning", "refusal"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/chataudiooutput.py b/src/openrouter/components/chataudiooutput.py
index 19bb084..0ce4edf 100644
--- a/src/openrouter/components/chataudiooutput.py
+++ b/src/openrouter/components/chataudiooutput.py
@@ -9,12 +9,12 @@ from typing_extensions import NotRequired, TypedDict
class ChatAudioOutputTypedDict(TypedDict):
r"""Audio output data or reference"""
- id: NotRequired[str]
- r"""Audio output identifier"""
- expires_at: NotRequired[float]
- r"""Audio expiration timestamp"""
data: NotRequired[str]
r"""Base64 encoded audio data"""
+ expires_at: NotRequired[int]
+ r"""Audio expiration timestamp"""
+ id: NotRequired[str]
+ r"""Audio output identifier"""
transcript: NotRequired[str]
r"""Audio transcript"""
@@ -22,14 +22,14 @@ class ChatAudioOutputTypedDict(TypedDict):
class ChatAudioOutput(BaseModel):
r"""Audio output data or reference"""
- id: Optional[str] = None
- r"""Audio output identifier"""
-
- expires_at: Optional[float] = None
- r"""Audio expiration timestamp"""
-
data: Optional[str] = None
r"""Base64 encoded audio data"""
+ expires_at: Optional[int] = None
+ r"""Audio expiration timestamp"""
+
+ id: Optional[str] = None
+ r"""Audio output identifier"""
+
transcript: Optional[str] = None
r"""Audio transcript"""
diff --git a/src/openrouter/components/chatchoice.py b/src/openrouter/components/chatchoice.py
index 6cb0225..8651759 100644
--- a/src/openrouter/components/chatchoice.py
+++ b/src/openrouter/components/chatchoice.py
@@ -2,6 +2,7 @@
from __future__ import annotations
from .chatassistantmessage import ChatAssistantMessage, ChatAssistantMessageTypedDict
+from .chatfinishreasonenum import ChatFinishReasonEnum
from .chattokenlogprobs import ChatTokenLogprobs, ChatTokenLogprobsTypedDict
from openrouter.types import (
BaseModel,
@@ -10,16 +11,17 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
+from openrouter.utils import validate_open_enum
from pydantic import model_serializer
-from typing import Any
-from typing_extensions import NotRequired, TypedDict
+from pydantic.functional_validators import PlainValidator
+from typing_extensions import Annotated, NotRequired, TypedDict
class ChatChoiceTypedDict(TypedDict):
r"""Chat completion choice"""
- finish_reason: Nullable[Any]
- index: float
+ finish_reason: Nullable[ChatFinishReasonEnum]
+ index: int
r"""Choice index"""
message: ChatAssistantMessageTypedDict
r"""Assistant message for requests and responses"""
@@ -30,9 +32,11 @@ class ChatChoiceTypedDict(TypedDict):
class ChatChoice(BaseModel):
r"""Chat completion choice"""
- finish_reason: Nullable[Any]
+ finish_reason: Annotated[
+ Nullable[ChatFinishReasonEnum], PlainValidator(validate_open_enum(False))
+ ]
- index: float
+ index: int
r"""Choice index"""
message: ChatAssistantMessage
diff --git a/src/openrouter/components/chatcontentaudio.py b/src/openrouter/components/chatcontentaudio.py
index dc4293e..ad506c0 100644
--- a/src/openrouter/components/chatcontentaudio.py
+++ b/src/openrouter/components/chatcontentaudio.py
@@ -7,9 +7,6 @@ from typing import Literal
from typing_extensions import Annotated, TypedDict
-ChatContentAudioType = Literal["input_audio",]
-
-
class ChatContentAudioInputAudioTypedDict(TypedDict):
data: str
r"""Base64 encoded audio data"""
@@ -25,16 +22,19 @@ class ChatContentAudioInputAudio(BaseModel):
r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider."""
+ChatContentAudioType = Literal["input_audio",]
+
+
class ChatContentAudioTypedDict(TypedDict):
r"""Audio input content part. Supported audio formats vary by provider."""
- type: ChatContentAudioType
input_audio: ChatContentAudioInputAudioTypedDict
+ type: ChatContentAudioType
class ChatContentAudio(BaseModel):
r"""Audio input content part. Supported audio formats vary by provider."""
- type: ChatContentAudioType
-
input_audio: ChatContentAudioInputAudio
+
+ type: ChatContentAudioType
diff --git a/src/openrouter/components/chatcontentcachecontrol.py b/src/openrouter/components/chatcontentcachecontrol.py
index 11a86bf..7263adc 100644
--- a/src/openrouter/components/chatcontentcachecontrol.py
+++ b/src/openrouter/components/chatcontentcachecontrol.py
@@ -1,30 +1,22 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, UnrecognizedStr
+from .anthropiccachecontrolttl import AnthropicCacheControlTTL
+from openrouter.types import BaseModel
from openrouter.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
-from typing import Literal, Optional, Union
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
ChatContentCacheControlType = Literal["ephemeral",]
-ChatContentCacheControlTTL = Union[
- Literal[
- "5m",
- "1h",
- ],
- UnrecognizedStr,
-]
-
-
class ChatContentCacheControlTypedDict(TypedDict):
r"""Cache control for the content part"""
type: ChatContentCacheControlType
- ttl: NotRequired[ChatContentCacheControlTTL]
+ ttl: NotRequired[AnthropicCacheControlTTL]
class ChatContentCacheControl(BaseModel):
@@ -33,5 +25,5 @@ class ChatContentCacheControl(BaseModel):
type: ChatContentCacheControlType
ttl: Annotated[
- Optional[ChatContentCacheControlTTL], PlainValidator(validate_open_enum(False))
+ Optional[AnthropicCacheControlTTL], PlainValidator(validate_open_enum(False))
] = None
diff --git a/src/openrouter/components/chatcontentfile.py b/src/openrouter/components/chatcontentfile.py
index 5101311..e737cbd 100644
--- a/src/openrouter/components/chatcontentfile.py
+++ b/src/openrouter/components/chatcontentfile.py
@@ -6,9 +6,6 @@ from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict
-ChatContentFileType = Literal["file",]
-
-
class FileTypedDict(TypedDict):
file_data: NotRequired[str]
r"""File content as base64 data URL or URL"""
@@ -29,16 +26,19 @@ class File(BaseModel):
r"""Original filename"""
+ChatContentFileType = Literal["file",]
+
+
class ChatContentFileTypedDict(TypedDict):
r"""File content part for document processing"""
- type: ChatContentFileType
file: FileTypedDict
+ type: ChatContentFileType
class ChatContentFile(BaseModel):
r"""File content part for document processing"""
- type: ChatContentFileType
-
file: File
+
+ type: ChatContentFileType
diff --git a/src/openrouter/components/chatcontentimage.py b/src/openrouter/components/chatcontentimage.py
index d7850d5..6219f84 100644
--- a/src/openrouter/components/chatcontentimage.py
+++ b/src/openrouter/components/chatcontentimage.py
@@ -8,9 +8,6 @@ from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
-ChatContentImageType = Literal["image_url",]
-
-
ChatContentImageDetail = Union[
Literal[
"auto",
@@ -39,16 +36,19 @@ class ChatContentImageImageURL(BaseModel):
r"""Image detail level for vision models"""
+ChatContentImageType = Literal["image_url",]
+
+
class ChatContentImageTypedDict(TypedDict):
r"""Image content part for vision models"""
- type: ChatContentImageType
image_url: ChatContentImageImageURLTypedDict
+ type: ChatContentImageType
class ChatContentImage(BaseModel):
r"""Image content part for vision models"""
- type: ChatContentImageType
-
image_url: ChatContentImageImageURL
+
+ type: ChatContentImageType
diff --git a/src/openrouter/components/chatcontentitems.py b/src/openrouter/components/chatcontentitems.py
index 6a65c9c..cb153a0 100644
--- a/src/openrouter/components/chatcontentitems.py
+++ b/src/openrouter/components/chatcontentitems.py
@@ -16,42 +16,29 @@ from typing import Union
from typing_extensions import Annotated, TypeAliasType
-ChatContentItems1TypedDict = TypeAliasType(
- "ChatContentItems1TypedDict",
- Union[LegacyChatContentVideoTypedDict, ChatContentVideoTypedDict],
-)
-
-
-ChatContentItems1 = Annotated[
- Union[
- Annotated[LegacyChatContentVideo, Tag("input_video")],
- Annotated[ChatContentVideo, Tag("video_url")],
- ],
- Discriminator(lambda m: get_discriminator(m, "type", "type")),
-]
-
-
ChatContentItemsTypedDict = TypeAliasType(
"ChatContentItemsTypedDict",
Union[
ChatContentImageTypedDict,
ChatContentAudioTypedDict,
+ LegacyChatContentVideoTypedDict,
+ ChatContentVideoTypedDict,
ChatContentFileTypedDict,
ChatContentTextTypedDict,
- ChatContentItems1TypedDict,
],
)
r"""Content part for chat completion messages"""
-ChatContentItems = TypeAliasType(
- "ChatContentItems",
+ChatContentItems = Annotated[
Union[
- ChatContentImage,
- ChatContentAudio,
- ChatContentFile,
- ChatContentText,
- ChatContentItems1,
+ Annotated[ChatContentFile, Tag("file")],
+ Annotated[ChatContentImage, Tag("image_url")],
+ Annotated[ChatContentAudio, Tag("input_audio")],
+ Annotated[LegacyChatContentVideo, Tag("input_video")],
+ Annotated[ChatContentText, Tag("text")],
+ Annotated[ChatContentVideo, Tag("video_url")],
],
-)
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
r"""Content part for chat completion messages"""
diff --git a/src/openrouter/components/chatcontenttext.py b/src/openrouter/components/chatcontenttext.py
index 1fed3f5..4367bde 100644
--- a/src/openrouter/components/chatcontenttext.py
+++ b/src/openrouter/components/chatcontenttext.py
@@ -16,8 +16,8 @@ ChatContentTextType = Literal["text",]
class ChatContentTextTypedDict(TypedDict):
r"""Text content part"""
- type: ChatContentTextType
text: str
+ type: ChatContentTextType
cache_control: NotRequired[ChatContentCacheControlTypedDict]
r"""Cache control for the content part"""
@@ -25,9 +25,9 @@ class ChatContentTextTypedDict(TypedDict):
class ChatContentText(BaseModel):
r"""Text content part"""
- type: ChatContentTextType
-
text: str
+ type: ChatContentTextType
+
cache_control: Optional[ChatContentCacheControl] = None
r"""Cache control for the content part"""
diff --git a/src/openrouter/components/chatdevelopermessage.py b/src/openrouter/components/chatdevelopermessage.py
index aaaf742..175218a 100644
--- a/src/openrouter/components/chatdevelopermessage.py
+++ b/src/openrouter/components/chatdevelopermessage.py
@@ -7,9 +7,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict
-ChatDeveloperMessageRole = Literal["developer",]
-
-
ChatDeveloperMessageContentTypedDict = TypeAliasType(
"ChatDeveloperMessageContentTypedDict", Union[str, List[ChatContentTextTypedDict]]
)
@@ -22,12 +19,15 @@ ChatDeveloperMessageContent = TypeAliasType(
r"""Developer message content"""
+ChatDeveloperMessageRole = Literal["developer",]
+
+
class ChatDeveloperMessageTypedDict(TypedDict):
r"""Developer message"""
- role: ChatDeveloperMessageRole
content: ChatDeveloperMessageContentTypedDict
r"""Developer message content"""
+ role: ChatDeveloperMessageRole
name: NotRequired[str]
r"""Optional name for the developer message"""
@@ -35,10 +35,10 @@ class ChatDeveloperMessageTypedDict(TypedDict):
class ChatDeveloperMessage(BaseModel):
r"""Developer message"""
- role: ChatDeveloperMessageRole
-
content: ChatDeveloperMessageContent
r"""Developer message content"""
+ role: ChatDeveloperMessageRole
+
name: Optional[str] = None
r"""Optional name for the developer message"""
diff --git a/src/openrouter/components/chatformatgrammarconfig.py b/src/openrouter/components/chatformatgrammarconfig.py
index 9ea1098..9ec411f 100644
--- a/src/openrouter/components/chatformatgrammarconfig.py
+++ b/src/openrouter/components/chatformatgrammarconfig.py
@@ -12,15 +12,15 @@ ChatFormatGrammarConfigType = Literal["grammar",]
class ChatFormatGrammarConfigTypedDict(TypedDict):
r"""Custom grammar response format"""
- type: ChatFormatGrammarConfigType
grammar: str
r"""Custom grammar for text generation"""
+ type: ChatFormatGrammarConfigType
class ChatFormatGrammarConfig(BaseModel):
r"""Custom grammar response format"""
- type: ChatFormatGrammarConfigType
-
grammar: str
r"""Custom grammar for text generation"""
+
+ type: ChatFormatGrammarConfigType
diff --git a/src/openrouter/components/chatformatjsonschemaconfig.py b/src/openrouter/components/chatformatjsonschemaconfig.py
index be2887d..9cd1330 100644
--- a/src/openrouter/components/chatformatjsonschemaconfig.py
+++ b/src/openrouter/components/chatformatjsonschemaconfig.py
@@ -13,15 +13,15 @@ ChatFormatJSONSchemaConfigType = Literal["json_schema",]
class ChatFormatJSONSchemaConfigTypedDict(TypedDict):
r"""JSON Schema response format for structured outputs"""
- type: ChatFormatJSONSchemaConfigType
json_schema: ChatJSONSchemaConfigTypedDict
r"""JSON Schema configuration object"""
+ type: ChatFormatJSONSchemaConfigType
class ChatFormatJSONSchemaConfig(BaseModel):
r"""JSON Schema response format for structured outputs"""
- type: ChatFormatJSONSchemaConfigType
-
json_schema: ChatJSONSchemaConfig
r"""JSON Schema configuration object"""
+
+ type: ChatFormatJSONSchemaConfigType
diff --git a/src/openrouter/components/chatfunctiontool.py b/src/openrouter/components/chatfunctiontool.py
index 22fd9cd..ab80d60 100644
--- a/src/openrouter/components/chatfunctiontool.py
+++ b/src/openrouter/components/chatfunctiontool.py
@@ -5,15 +5,15 @@ from .chatcontentcachecontrol import (
ChatContentCacheControl,
ChatContentCacheControlTypedDict,
)
-from .chatwebsearchservertool import (
- ChatWebSearchServerTool,
- ChatWebSearchServerToolTypedDict,
-)
from .chatwebsearchshorthand import (
ChatWebSearchShorthand,
ChatWebSearchShorthandTypedDict,
)
from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict
+from .openrouterwebsearchservertool import (
+ OpenRouterWebSearchServerTool,
+ OpenRouterWebSearchServerToolTypedDict,
+)
from openrouter.types import (
BaseModel,
Nullable,
@@ -27,9 +27,6 @@ from typing import Any, Dict, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-ChatFunctionToolType = Literal["function",]
-
-
class ChatFunctionToolFunctionFunctionTypedDict(TypedDict):
r"""Function definition for tool calling"""
@@ -89,20 +86,23 @@ class ChatFunctionToolFunctionFunction(BaseModel):
return m
+ChatFunctionToolType = Literal["function",]
+
+
class ChatFunctionToolFunctionTypedDict(TypedDict):
- type: ChatFunctionToolType
function: ChatFunctionToolFunctionFunctionTypedDict
r"""Function definition for tool calling"""
+ type: ChatFunctionToolType
cache_control: NotRequired[ChatContentCacheControlTypedDict]
r"""Cache control for the content part"""
class ChatFunctionToolFunction(BaseModel):
- type: ChatFunctionToolType
-
function: ChatFunctionToolFunctionFunction
r"""Function definition for tool calling"""
+ type: ChatFunctionToolType
+
cache_control: Optional[ChatContentCacheControl] = None
r"""Cache control for the content part"""
@@ -111,7 +111,7 @@ ChatFunctionToolTypedDict = TypeAliasType(
"ChatFunctionToolTypedDict",
Union[
DatetimeServerToolTypedDict,
- ChatWebSearchServerToolTypedDict,
+ OpenRouterWebSearchServerToolTypedDict,
ChatFunctionToolFunctionTypedDict,
ChatWebSearchShorthandTypedDict,
],
@@ -123,7 +123,7 @@ ChatFunctionTool = Annotated[
Union[
Annotated[ChatFunctionToolFunction, Tag("function")],
Annotated[DatetimeServerTool, Tag("openrouter:datetime")],
- Annotated[ChatWebSearchServerTool, Tag("openrouter:web_search")],
+ Annotated[OpenRouterWebSearchServerTool, Tag("openrouter:web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview")],
Annotated[ChatWebSearchShorthand, Tag("web_search_preview_2025_03_11")],
diff --git a/src/openrouter/components/chatmessages.py b/src/openrouter/components/chatmessages.py
index 7d3054f..1c9a570 100644
--- a/src/openrouter/components/chatmessages.py
+++ b/src/openrouter/components/chatmessages.py
@@ -27,11 +27,11 @@ r"""Chat completion message with role-based discrimination"""
ChatMessages = Annotated[
Union[
- Annotated[ChatSystemMessage, Tag("system")],
- Annotated[ChatUserMessage, Tag("user")],
- Annotated[ChatDeveloperMessage, Tag("developer")],
Annotated[ChatAssistantMessage, Tag("assistant")],
+ Annotated[ChatDeveloperMessage, Tag("developer")],
+ Annotated[ChatSystemMessage, Tag("system")],
Annotated[ChatToolMessage, Tag("tool")],
+ Annotated[ChatUserMessage, Tag("user")],
],
Discriminator(lambda m: get_discriminator(m, "role", "role")),
]
diff --git a/src/openrouter/components/chatnamedtoolchoice.py b/src/openrouter/components/chatnamedtoolchoice.py
index b725d19..3007637 100644
--- a/src/openrouter/components/chatnamedtoolchoice.py
+++ b/src/openrouter/components/chatnamedtoolchoice.py
@@ -6,9 +6,6 @@ from typing import Literal
from typing_extensions import TypedDict
-ChatNamedToolChoiceType = Literal["function",]
-
-
class ChatNamedToolChoiceFunctionTypedDict(TypedDict):
name: str
r"""Function name to call"""
@@ -19,16 +16,19 @@ class ChatNamedToolChoiceFunction(BaseModel):
r"""Function name to call"""
+ChatNamedToolChoiceType = Literal["function",]
+
+
class ChatNamedToolChoiceTypedDict(TypedDict):
r"""Named tool choice for specific function"""
- type: ChatNamedToolChoiceType
function: ChatNamedToolChoiceFunctionTypedDict
+ type: ChatNamedToolChoiceType
class ChatNamedToolChoice(BaseModel):
r"""Named tool choice for specific function"""
- type: ChatNamedToolChoiceType
-
function: ChatNamedToolChoiceFunction
+
+ type: ChatNamedToolChoiceType
diff --git a/src/openrouter/components/chatrequest.py b/src/openrouter/components/chatrequest.py
index 0af80f7..6a2482a 100644
--- a/src/openrouter/components/chatrequest.py
+++ b/src/openrouter/components/chatrequest.py
@@ -1,6 +1,11 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .anthropiccachecontroldirective import (
+ AnthropicCacheControlDirective,
+ AnthropicCacheControlDirectiveTypedDict,
+)
+from .autorouterplugin import AutoRouterPlugin, AutoRouterPluginTypedDict
from .chatdebugoptions import ChatDebugOptions, ChatDebugOptionsTypedDict
from .chatformatgrammarconfig import (
ChatFormatGrammarConfig,
@@ -17,23 +22,23 @@ from .chatformatpythonconfig import (
from .chatformattextconfig import ChatFormatTextConfig, ChatFormatTextConfigTypedDict
from .chatfunctiontool import ChatFunctionTool, ChatFunctionToolTypedDict
from .chatmessages import ChatMessages, ChatMessagesTypedDict
+from .chatreasoningsummaryverbosityenum import ChatReasoningSummaryVerbosityEnum
from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict
from .chattoolchoice import ChatToolChoice, ChatToolChoiceTypedDict
-from .contextcompressionengine import ContextCompressionEngine
-from .datacollection import DataCollection
+from .contextcompressionplugin import (
+ ContextCompressionPlugin,
+ ContextCompressionPluginTypedDict,
+)
+from .fileparserplugin import FileParserPlugin, FileParserPluginTypedDict
from .formatjsonobjectconfig import (
FormatJSONObjectConfig,
FormatJSONObjectConfigTypedDict,
)
-from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
-from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
-from .preferredminthroughput import (
- PreferredMinThroughput,
- PreferredMinThroughputTypedDict,
-)
-from .providername import ProviderName
-from .quantization import Quantization
-from .websearchengine import WebSearchEngine
+from .moderationplugin import ModerationPlugin, ModerationPluginTypedDict
+from .providerpreferences import ProviderPreferences, ProviderPreferencesTypedDict
+from .responsehealingplugin import ResponseHealingPlugin, ResponseHealingPluginTypedDict
+from .traceconfig import TraceConfig, TraceConfigTypedDict
+from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict
from openrouter.types import (
BaseModel,
Nullable,
@@ -43,550 +48,58 @@ from openrouter.types import (
UnrecognizedStr,
)
from openrouter.utils import get_discriminator, validate_open_enum
-import pydantic
-from pydantic import ConfigDict, Discriminator, Tag, model_serializer
+from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Any, Dict, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-ChatRequestOrderTypedDict = TypeAliasType(
- "ChatRequestOrderTypedDict", Union[ProviderName, str]
+ChatRequestImageConfigTypedDict = TypeAliasType(
+ "ChatRequestImageConfigTypedDict", Union[str, float, List[Nullable[Any]]]
)
-ChatRequestOrder = TypeAliasType(
- "ChatRequestOrder",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
+ChatRequestImageConfig = TypeAliasType(
+ "ChatRequestImageConfig", Union[str, float, List[Nullable[Any]]]
)
-ChatRequestOnlyTypedDict = TypeAliasType(
- "ChatRequestOnlyTypedDict", Union[ProviderName, str]
-)
-
-
-ChatRequestOnly = TypeAliasType(
- "ChatRequestOnly",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ChatRequestIgnoreTypedDict = TypeAliasType(
- "ChatRequestIgnoreTypedDict", Union[ProviderName, str]
-)
-
-
-ChatRequestIgnore = TypeAliasType(
- "ChatRequestIgnore",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ChatRequestSortEnum = Union[
+Modality = Union[
Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
+ "text",
+ "image",
+ "audio",
],
UnrecognizedStr,
]
-ChatRequestProviderSortConfigEnum = Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
-]
-
-
-ChatRequestBy = Union[
- Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
- ],
- UnrecognizedStr,
-]
-r"""The provider sorting strategy (price, throughput, latency)"""
-
-
-ChatRequestPartition = Union[
- Literal[
- "model",
- "none",
- ],
- UnrecognizedStr,
-]
-r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model."""
-
-
-class ChatRequestProviderSortConfigTypedDict(TypedDict):
- by: NotRequired[Nullable[ChatRequestBy]]
- r"""The provider sorting strategy (price, throughput, latency)"""
- partition: NotRequired[Nullable[ChatRequestPartition]]
- r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model."""
-
-
-class ChatRequestProviderSortConfig(BaseModel):
- by: Annotated[
- OptionalNullable[ChatRequestBy], PlainValidator(validate_open_enum(False))
- ] = UNSET
- r"""The provider sorting strategy (price, throughput, latency)"""
-
- partition: Annotated[
- OptionalNullable[ChatRequestPartition],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model."""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["by", "partition"]
- nullable_fields = ["by", "partition"]
- 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
-
-
-ChatRequestProviderSortConfigUnionTypedDict = TypeAliasType(
- "ChatRequestProviderSortConfigUnionTypedDict",
- Union[ChatRequestProviderSortConfigTypedDict, ChatRequestProviderSortConfigEnum],
-)
-
-
-ChatRequestProviderSortConfigUnion = TypeAliasType(
- "ChatRequestProviderSortConfigUnion",
- Union[ChatRequestProviderSortConfig, ChatRequestProviderSortConfigEnum],
-)
-
-
-ChatRequestProviderSort = Union[
- Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
- ],
- UnrecognizedStr,
-]
-r"""The provider sorting strategy (price, throughput, latency)"""
-
-
-ChatRequestSortUnionTypedDict = TypeAliasType(
- "ChatRequestSortUnionTypedDict",
+ChatRequestPluginTypedDict = TypeAliasType(
+ "ChatRequestPluginTypedDict",
Union[
- ChatRequestProviderSort,
- ChatRequestProviderSortConfigUnionTypedDict,
- ChatRequestSortEnum,
- ],
-)
-r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
-
-ChatRequestSortUnion = TypeAliasType(
- "ChatRequestSortUnion",
- Union[
- Annotated[ChatRequestProviderSort, PlainValidator(validate_open_enum(False))],
- ChatRequestProviderSortConfigUnion,
- Annotated[ChatRequestSortEnum, PlainValidator(validate_open_enum(False))],
- ],
-)
-r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
-
-class ChatRequestMaxPriceTypedDict(TypedDict):
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
-
- prompt: NotRequired[str]
- r"""Price per million prompt tokens"""
- completion: NotRequired[str]
- image: NotRequired[str]
- audio: NotRequired[str]
- request: NotRequired[str]
-
-
-class ChatRequestMaxPrice(BaseModel):
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
-
- prompt: Optional[str] = None
- r"""Price per million prompt tokens"""
-
- completion: Optional[str] = None
-
- image: Optional[str] = None
-
- audio: Optional[str] = None
-
- request: Optional[str] = None
-
-
-class ChatRequestProviderTypedDict(TypedDict):
- r"""When multiple model providers are available, optionally indicate your routing preference."""
-
- allow_fallbacks: NotRequired[Nullable[bool]]
- r"""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.
-
- """
- require_parameters: NotRequired[Nullable[bool]]
- r"""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."""
- data_collection: NotRequired[Nullable[DataCollection]]
- r"""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.
- """
- zdr: NotRequired[Nullable[bool]]
- r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
- enforce_distillable_text: NotRequired[Nullable[bool]]
- r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
- order: NotRequired[Nullable[List[ChatRequestOrderTypedDict]]]
- r"""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."""
- only: NotRequired[Nullable[List[ChatRequestOnlyTypedDict]]]
- r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
- ignore: NotRequired[Nullable[List[ChatRequestIgnoreTypedDict]]]
- r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
- quantizations: NotRequired[Nullable[List[Quantization]]]
- r"""A list of quantization levels to filter the provider by."""
- sort: NotRequired[Nullable[ChatRequestSortUnionTypedDict]]
- max_price: NotRequired[ChatRequestMaxPriceTypedDict]
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
- preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]]
- r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
- preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]]
- r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
-
-class ChatRequestProvider(BaseModel):
- r"""When multiple model providers are available, optionally indicate your routing preference."""
-
- allow_fallbacks: OptionalNullable[bool] = UNSET
- r"""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.
-
- """
-
- require_parameters: OptionalNullable[bool] = UNSET
- r"""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."""
-
- data_collection: Annotated[
- OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False))
- ] = UNSET
- r"""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.
- """
-
- zdr: OptionalNullable[bool] = UNSET
- r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
-
- enforce_distillable_text: OptionalNullable[bool] = UNSET
- r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
-
- order: OptionalNullable[List[ChatRequestOrder]] = UNSET
- r"""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."""
-
- only: OptionalNullable[List[ChatRequestOnly]] = UNSET
- r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
-
- ignore: OptionalNullable[List[ChatRequestIgnore]] = UNSET
- r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
-
- quantizations: OptionalNullable[
- List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]]
- ] = UNSET
- r"""A list of quantization levels to filter the provider by."""
-
- sort: OptionalNullable[ChatRequestSortUnion] = UNSET
-
- max_price: Optional[ChatRequestMaxPrice] = None
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
-
- preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET
- r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
- preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET
- r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "allow_fallbacks",
- "require_parameters",
- "data_collection",
- "zdr",
- "enforce_distillable_text",
- "order",
- "only",
- "ignore",
- "quantizations",
- "sort",
- "max_price",
- "preferred_min_throughput",
- "preferred_max_latency",
- ]
- nullable_fields = [
- "allow_fallbacks",
- "require_parameters",
- "data_collection",
- "zdr",
- "enforce_distillable_text",
- "order",
- "only",
- "ignore",
- "quantizations",
- "sort",
- "preferred_min_throughput",
- "preferred_max_latency",
- ]
- 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
-
-
-ChatRequestIDContextCompression = Literal["context-compression",]
-
-
-class ChatRequestPluginContextCompressionTypedDict(TypedDict):
- id: ChatRequestIDContextCompression
- enabled: NotRequired[bool]
- r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
- engine: NotRequired[ContextCompressionEngine]
- r"""The compression engine to use. Defaults to \"middle-out\"."""
-
-
-class ChatRequestPluginContextCompression(BaseModel):
- id: ChatRequestIDContextCompression
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
-
- engine: Optional[ContextCompressionEngine] = None
- r"""The compression engine to use. Defaults to \"middle-out\"."""
-
-
-ChatRequestIDResponseHealing = Literal["response-healing",]
-
-
-class ChatRequestPluginResponseHealingTypedDict(TypedDict):
- id: ChatRequestIDResponseHealing
- enabled: NotRequired[bool]
- r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
-
-
-class ChatRequestPluginResponseHealing(BaseModel):
- id: ChatRequestIDResponseHealing
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
-
-
-ChatRequestIDFileParser = Literal["file-parser",]
-
-
-class ChatRequestPluginFileParserTypedDict(TypedDict):
- id: ChatRequestIDFileParser
- enabled: NotRequired[bool]
- r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
- pdf: NotRequired[PDFParserOptionsTypedDict]
- r"""Options for PDF parsing."""
-
-
-class ChatRequestPluginFileParser(BaseModel):
- id: ChatRequestIDFileParser
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
-
- pdf: Optional[PDFParserOptions] = None
- r"""Options for PDF parsing."""
-
-
-ChatRequestIDWeb = Literal["web",]
-
-
-class ChatRequestPluginWebTypedDict(TypedDict):
- id: ChatRequestIDWeb
- enabled: NotRequired[bool]
- r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
- max_results: NotRequired[float]
- search_prompt: NotRequired[str]
- engine: NotRequired[WebSearchEngine]
- r"""The search engine to use for web search."""
- 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\")."""
- exclude_domains: NotRequired[List[str]]
- r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
-
-
-class ChatRequestPluginWeb(BaseModel):
- id: ChatRequestIDWeb
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
-
- max_results: Optional[float] = None
-
- search_prompt: Optional[str] = None
-
- engine: Annotated[
- Optional[WebSearchEngine], PlainValidator(validate_open_enum(False))
- ] = None
- r"""The search engine to use for web search."""
-
- include_domains: Optional[List[str]] = None
- 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\")."""
-
- exclude_domains: Optional[List[str]] = None
- r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
-
-
-ChatRequestIDModeration = Literal["moderation",]
-
-
-class ChatRequestPluginModerationTypedDict(TypedDict):
- id: ChatRequestIDModeration
-
-
-class ChatRequestPluginModeration(BaseModel):
- id: ChatRequestIDModeration
-
-
-ChatRequestIDAutoRouter = Literal["auto-router",]
-
-
-class ChatRequestPluginAutoRouterTypedDict(TypedDict):
- id: ChatRequestIDAutoRouter
- enabled: NotRequired[bool]
- r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
- allowed_models: NotRequired[List[str]]
- r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
-
-
-class ChatRequestPluginAutoRouter(BaseModel):
- id: ChatRequestIDAutoRouter
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
-
- allowed_models: Optional[List[str]] = None
- r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
-
-
-ChatRequestPluginUnionTypedDict = TypeAliasType(
- "ChatRequestPluginUnionTypedDict",
- Union[
- ChatRequestPluginModerationTypedDict,
- ChatRequestPluginResponseHealingTypedDict,
- ChatRequestPluginAutoRouterTypedDict,
- ChatRequestPluginFileParserTypedDict,
- ChatRequestPluginContextCompressionTypedDict,
- ChatRequestPluginWebTypedDict,
+ ModerationPluginTypedDict,
+ ResponseHealingPluginTypedDict,
+ AutoRouterPluginTypedDict,
+ FileParserPluginTypedDict,
+ ContextCompressionPluginTypedDict,
+ WebSearchPluginTypedDict,
],
)
-ChatRequestPluginUnion = Annotated[
+ChatRequestPlugin = Annotated[
Union[
- Annotated[ChatRequestPluginAutoRouter, Tag("auto-router")],
- Annotated[ChatRequestPluginModeration, Tag("moderation")],
- Annotated[ChatRequestPluginWeb, Tag("web")],
- Annotated[ChatRequestPluginFileParser, Tag("file-parser")],
- Annotated[ChatRequestPluginResponseHealing, Tag("response-healing")],
- Annotated[ChatRequestPluginContextCompression, Tag("context-compression")],
+ Annotated[AutoRouterPlugin, Tag("auto-router")],
+ Annotated[ContextCompressionPlugin, Tag("context-compression")],
+ Annotated[FileParserPlugin, Tag("file-parser")],
+ Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ResponseHealingPlugin, Tag("response-healing")],
+ Annotated[WebSearchPlugin, Tag("web")],
],
Discriminator(lambda m: get_discriminator(m, "id", "id")),
]
-class ChatRequestTraceTypedDict(TypedDict):
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
-
- trace_id: NotRequired[str]
- trace_name: NotRequired[str]
- span_name: NotRequired[str]
- generation_name: NotRequired[str]
- parent_span_id: NotRequired[str]
-
-
-class ChatRequestTrace(BaseModel):
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
-
- model_config = ConfigDict(
- populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
- )
- __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
-
- trace_id: Optional[str] = None
-
- trace_name: Optional[str] = None
-
- span_name: Optional[str] = None
-
- generation_name: Optional[str] = None
-
- parent_span_id: 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]
-
-
Effort = Union[
Literal[
"xhigh",
@@ -606,7 +119,7 @@ class ReasoningTypedDict(TypedDict):
effort: NotRequired[Nullable[Effort]]
r"""Constrains effort on reasoning for reasoning models"""
- summary: NotRequired[Nullable[Any]]
+ summary: NotRequired[Nullable[ChatReasoningSummaryVerbosityEnum]]
class Reasoning(BaseModel):
@@ -617,7 +130,10 @@ class Reasoning(BaseModel):
] = UNSET
r"""Constrains effort on reasoning for reasoning models"""
- summary: OptionalNullable[Any] = UNSET
+ summary: Annotated[
+ OptionalNullable[ChatReasoningSummaryVerbosityEnum],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
@@ -665,74 +181,17 @@ r"""Response format configuration"""
ResponseFormat = Annotated[
Union[
- Annotated[ChatFormatTextConfig, Tag("text")],
+ Annotated[ChatFormatGrammarConfig, Tag("grammar")],
Annotated[FormatJSONObjectConfig, Tag("json_object")],
Annotated[ChatFormatJSONSchemaConfig, Tag("json_schema")],
- Annotated[ChatFormatGrammarConfig, Tag("grammar")],
Annotated[ChatFormatPythonConfig, Tag("python")],
+ Annotated[ChatFormatTextConfig, Tag("text")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
r"""Response format configuration"""
-StopTypedDict = TypeAliasType("StopTypedDict", Union[str, List[str], Any])
-r"""Stop sequences (up to 4)"""
-
-
-Stop = TypeAliasType("Stop", Union[str, List[str], Any])
-r"""Stop sequences (up to 4)"""
-
-
-ChatRequestImageConfigTypedDict = TypeAliasType(
- "ChatRequestImageConfigTypedDict", Union[str, float, List[Nullable[Any]]]
-)
-
-
-ChatRequestImageConfig = TypeAliasType(
- "ChatRequestImageConfig", Union[str, float, List[Nullable[Any]]]
-)
-
-
-Modality = Union[
- Literal[
- "text",
- "image",
- "audio",
- ],
- UnrecognizedStr,
-]
-
-
-ChatRequestType = Literal["ephemeral",]
-
-
-ChatRequestTTL = Union[
- Literal[
- "5m",
- "1h",
- ],
- UnrecognizedStr,
-]
-
-
-class CacheControlTypedDict(TypedDict):
- r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
-
- type: ChatRequestType
- ttl: NotRequired[ChatRequestTTL]
-
-
-class CacheControl(BaseModel):
- r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
-
- type: ChatRequestType
-
- ttl: Annotated[
- Optional[ChatRequestTTL], PlainValidator(validate_open_enum(False))
- ] = None
-
-
ChatRequestServiceTier = Union[
Literal[
"auto",
@@ -746,72 +205,80 @@ ChatRequestServiceTier = Union[
r"""The service tier to use for processing this request."""
+StopTypedDict = TypeAliasType("StopTypedDict", Union[str, List[str], Any])
+r"""Stop sequences (up to 4)"""
+
+
+Stop = TypeAliasType("Stop", Union[str, List[str], Any])
+r"""Stop sequences (up to 4)"""
+
+
class ChatRequestTypedDict(TypedDict):
r"""Chat completion request parameters"""
messages: List[ChatMessagesTypedDict]
r"""List of messages for the conversation"""
- provider: NotRequired[Nullable[ChatRequestProviderTypedDict]]
- r"""When multiple model providers are available, optionally indicate your routing preference."""
- plugins: NotRequired[List[ChatRequestPluginUnionTypedDict]]
- r"""Plugins you want to enable for this request, including their settings."""
- user: NotRequired[str]
- r"""Unique user identifier"""
- session_id: NotRequired[str]
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
- trace: NotRequired[ChatRequestTraceTypedDict]
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
- model: NotRequired[str]
- r"""Model to use for completion"""
- models: NotRequired[List[str]]
- r"""Models to use for completion"""
- frequency_penalty: NotRequired[Nullable[float]]
+ cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
+ debug: NotRequired[ChatDebugOptionsTypedDict]
+ r"""Debug options for inspecting request transformations (streaming only)"""
+ frequency_penalty: NotRequired[float]
r"""Frequency penalty (-2.0 to 2.0)"""
+ image_config: NotRequired[Dict[str, ChatRequestImageConfigTypedDict]]
+ r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."""
logit_bias: NotRequired[Nullable[Dict[str, float]]]
r"""Token logit bias adjustments"""
logprobs: NotRequired[Nullable[bool]]
r"""Return log probabilities"""
- top_logprobs: NotRequired[Nullable[float]]
- r"""Number of top log probabilities to return (0-20)"""
- max_completion_tokens: NotRequired[Nullable[float]]
+ max_completion_tokens: NotRequired[int]
r"""Maximum tokens in completion"""
- max_tokens: NotRequired[Nullable[float]]
+ max_tokens: NotRequired[int]
r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16."""
metadata: NotRequired[Dict[str, str]]
r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)"""
- presence_penalty: NotRequired[Nullable[float]]
+ modalities: NotRequired[List[Modality]]
+ r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\"."""
+ model: NotRequired[str]
+ r"""Model to use for completion"""
+ models: NotRequired[List[str]]
+ r"""Models to use for completion"""
+ parallel_tool_calls: NotRequired[Nullable[bool]]
+ r"""Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response."""
+ plugins: NotRequired[List[ChatRequestPluginTypedDict]]
+ r"""Plugins you want to enable for this request, including their settings."""
+ presence_penalty: NotRequired[float]
r"""Presence penalty (-2.0 to 2.0)"""
+ provider: NotRequired[Nullable[ProviderPreferencesTypedDict]]
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
reasoning: NotRequired[ReasoningTypedDict]
r"""Configuration options for reasoning models"""
response_format: NotRequired[ResponseFormatTypedDict]
r"""Response format configuration"""
- seed: NotRequired[Nullable[int]]
+ seed: NotRequired[int]
r"""Random seed for deterministic outputs"""
+ service_tier: NotRequired[Nullable[ChatRequestServiceTier]]
+ r"""The service tier to use for processing this request."""
+ session_id: NotRequired[str]
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
stop: NotRequired[Nullable[StopTypedDict]]
r"""Stop sequences (up to 4)"""
stream: NotRequired[bool]
r"""Enable streaming response"""
stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]]
r"""Streaming configuration options"""
- temperature: NotRequired[Nullable[float]]
+ temperature: NotRequired[float]
r"""Sampling temperature (0-2)"""
- parallel_tool_calls: NotRequired[Nullable[bool]]
tool_choice: NotRequired[ChatToolChoiceTypedDict]
r"""Tool choice configuration"""
tools: NotRequired[List[ChatFunctionToolTypedDict]]
r"""Available tools for function calling"""
- top_p: NotRequired[Nullable[float]]
+ top_logprobs: NotRequired[int]
+ r"""Number of top log probabilities to return (0-20)"""
+ top_p: NotRequired[float]
r"""Nucleus sampling parameter (0-1)"""
- debug: NotRequired[ChatDebugOptionsTypedDict]
- r"""Debug options for inspecting request transformations (streaming only)"""
- image_config: NotRequired[Dict[str, ChatRequestImageConfigTypedDict]]
- r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."""
- modalities: NotRequired[List[Modality]]
- r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\"."""
- cache_control: NotRequired[CacheControlTypedDict]
- r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
- service_tier: NotRequired[Nullable[ChatRequestServiceTier]]
- r"""The service tier to use for processing this request."""
+ trace: NotRequired[TraceConfigTypedDict]
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+ user: NotRequired[str]
+ r"""Unique user identifier"""
class ChatRequest(BaseModel):
@@ -820,60 +287,73 @@ class ChatRequest(BaseModel):
messages: List[ChatMessages]
r"""List of messages for the conversation"""
- provider: OptionalNullable[ChatRequestProvider] = UNSET
- r"""When multiple model providers are available, optionally indicate your routing preference."""
+ cache_control: Optional[AnthropicCacheControlDirective] = None
- plugins: Optional[List[ChatRequestPluginUnion]] = None
- r"""Plugins you want to enable for this request, including their settings."""
+ debug: Optional[ChatDebugOptions] = None
+ r"""Debug options for inspecting request transformations (streaming only)"""
- user: Optional[str] = None
- r"""Unique user identifier"""
-
- session_id: Optional[str] = None
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
-
- trace: Optional[ChatRequestTrace] = None
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
-
- model: Optional[str] = None
- r"""Model to use for completion"""
-
- models: Optional[List[str]] = None
- r"""Models to use for completion"""
-
- frequency_penalty: OptionalNullable[float] = UNSET
+ frequency_penalty: Optional[float] = None
r"""Frequency penalty (-2.0 to 2.0)"""
+ image_config: Optional[Dict[str, ChatRequestImageConfig]] = None
+ r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."""
+
logit_bias: OptionalNullable[Dict[str, float]] = UNSET
r"""Token logit bias adjustments"""
logprobs: OptionalNullable[bool] = UNSET
r"""Return log probabilities"""
- top_logprobs: OptionalNullable[float] = UNSET
- r"""Number of top log probabilities to return (0-20)"""
-
- max_completion_tokens: OptionalNullable[float] = UNSET
+ max_completion_tokens: Optional[int] = None
r"""Maximum tokens in completion"""
- max_tokens: OptionalNullable[float] = UNSET
+ max_tokens: Optional[int] = None
r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16."""
metadata: Optional[Dict[str, str]] = None
r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)"""
- presence_penalty: OptionalNullable[float] = UNSET
+ modalities: Optional[
+ List[Annotated[Modality, PlainValidator(validate_open_enum(False))]]
+ ] = None
+ r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\"."""
+
+ model: Optional[str] = None
+ r"""Model to use for completion"""
+
+ models: Optional[List[str]] = None
+ r"""Models to use for completion"""
+
+ parallel_tool_calls: OptionalNullable[bool] = UNSET
+ r"""Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response."""
+
+ plugins: Optional[List[ChatRequestPlugin]] = None
+ r"""Plugins you want to enable for this request, including their settings."""
+
+ presence_penalty: Optional[float] = None
r"""Presence penalty (-2.0 to 2.0)"""
+ provider: OptionalNullable[ProviderPreferences] = UNSET
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
+
reasoning: Optional[Reasoning] = None
r"""Configuration options for reasoning models"""
response_format: Optional[ResponseFormat] = None
r"""Response format configuration"""
- seed: OptionalNullable[int] = UNSET
+ seed: Optional[int] = None
r"""Random seed for deterministic outputs"""
+ service_tier: Annotated[
+ OptionalNullable[ChatRequestServiceTier],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
+ r"""The service tier to use for processing this request."""
+
+ session_id: Optional[str] = None
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+
stop: OptionalNullable[Stop] = UNSET
r"""Stop sequences (up to 4)"""
@@ -883,91 +363,70 @@ class ChatRequest(BaseModel):
stream_options: OptionalNullable[ChatStreamOptions] = UNSET
r"""Streaming configuration options"""
- temperature: OptionalNullable[float] = 1
+ temperature: Optional[float] = None
r"""Sampling temperature (0-2)"""
- parallel_tool_calls: OptionalNullable[bool] = UNSET
-
tool_choice: Optional[ChatToolChoice] = None
r"""Tool choice configuration"""
tools: Optional[List[ChatFunctionTool]] = None
r"""Available tools for function calling"""
- top_p: OptionalNullable[float] = 1
+ top_logprobs: Optional[int] = None
+ r"""Number of top log probabilities to return (0-20)"""
+
+ top_p: Optional[float] = None
r"""Nucleus sampling parameter (0-1)"""
- debug: Optional[ChatDebugOptions] = None
- r"""Debug options for inspecting request transformations (streaming only)"""
+ trace: Optional[TraceConfig] = None
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
- image_config: Optional[Dict[str, ChatRequestImageConfig]] = None
- r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details."""
-
- modalities: Optional[
- List[Annotated[Modality, PlainValidator(validate_open_enum(False))]]
- ] = None
- r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\"."""
-
- cache_control: Optional[CacheControl] = None
- r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models."""
-
- service_tier: Annotated[
- OptionalNullable[ChatRequestServiceTier],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""The service tier to use for processing this request."""
+ user: Optional[str] = None
+ r"""Unique user identifier"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "provider",
- "plugins",
- "user",
- "session_id",
- "trace",
- "model",
- "models",
+ "cache_control",
+ "debug",
"frequency_penalty",
+ "image_config",
"logit_bias",
"logprobs",
- "top_logprobs",
"max_completion_tokens",
"max_tokens",
"metadata",
+ "modalities",
+ "model",
+ "models",
+ "parallel_tool_calls",
+ "plugins",
"presence_penalty",
+ "provider",
"reasoning",
"response_format",
"seed",
+ "service_tier",
+ "session_id",
"stop",
"stream",
"stream_options",
"temperature",
- "parallel_tool_calls",
"tool_choice",
"tools",
+ "top_logprobs",
"top_p",
- "debug",
- "image_config",
- "modalities",
- "cache_control",
- "service_tier",
+ "trace",
+ "user",
]
nullable_fields = [
- "provider",
- "frequency_penalty",
"logit_bias",
"logprobs",
- "top_logprobs",
- "max_completion_tokens",
- "max_tokens",
- "presence_penalty",
- "seed",
+ "parallel_tool_calls",
+ "provider",
+ "service_tier",
"stop",
"stream_options",
- "temperature",
- "parallel_tool_calls",
- "top_p",
- "service_tier",
]
null_default_fields = []
diff --git a/src/openrouter/components/chatresult.py b/src/openrouter/components/chatresult.py
index 472df5b..35a7ea2 100644
--- a/src/openrouter/components/chatresult.py
+++ b/src/openrouter/components/chatresult.py
@@ -21,12 +21,12 @@ ChatResultObject = Literal["chat.completion",]
class ChatResultTypedDict(TypedDict):
r"""Chat completion response"""
- id: str
- r"""Unique completion identifier"""
choices: List[ChatChoiceTypedDict]
r"""List of completion choices"""
- created: float
+ created: int
r"""Unix timestamp of creation"""
+ id: str
+ r"""Unique completion identifier"""
model: str
r"""Model used for completion"""
object: ChatResultObject
@@ -41,15 +41,15 @@ class ChatResultTypedDict(TypedDict):
class ChatResult(BaseModel):
r"""Chat completion response"""
- id: str
- r"""Unique completion identifier"""
-
choices: List[ChatChoice]
r"""List of completion choices"""
- created: float
+ created: int
r"""Unix timestamp of creation"""
+ id: str
+ r"""Unique completion identifier"""
+
model: str
r"""Model used for completion"""
@@ -67,7 +67,7 @@ class ChatResult(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["service_tier", "usage"]
- nullable_fields = ["system_fingerprint", "service_tier"]
+ nullable_fields = ["service_tier", "system_fingerprint"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/chatstreamchoice.py b/src/openrouter/components/chatstreamchoice.py
index 03e0839..9166d93 100644
--- a/src/openrouter/components/chatstreamchoice.py
+++ b/src/openrouter/components/chatstreamchoice.py
@@ -1,6 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .chatfinishreasonenum import ChatFinishReasonEnum
from .chatstreamdelta import ChatStreamDelta, ChatStreamDeltaTypedDict
from .chattokenlogprobs import ChatTokenLogprobs, ChatTokenLogprobsTypedDict
from openrouter.types import (
@@ -10,9 +11,10 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
+from openrouter.utils import validate_open_enum
from pydantic import model_serializer
-from typing import Any
-from typing_extensions import NotRequired, TypedDict
+from pydantic.functional_validators import PlainValidator
+from typing_extensions import Annotated, NotRequired, TypedDict
class ChatStreamChoiceTypedDict(TypedDict):
@@ -20,8 +22,8 @@ class ChatStreamChoiceTypedDict(TypedDict):
delta: ChatStreamDeltaTypedDict
r"""Delta changes in streaming response"""
- finish_reason: Nullable[Any]
- index: float
+ finish_reason: Nullable[ChatFinishReasonEnum]
+ index: int
r"""Choice index"""
logprobs: NotRequired[Nullable[ChatTokenLogprobsTypedDict]]
r"""Log probabilities for the completion"""
@@ -33,9 +35,11 @@ class ChatStreamChoice(BaseModel):
delta: ChatStreamDelta
r"""Delta changes in streaming response"""
- finish_reason: Nullable[Any]
+ finish_reason: Annotated[
+ Nullable[ChatFinishReasonEnum], PlainValidator(validate_open_enum(False))
+ ]
- index: float
+ index: int
r"""Choice index"""
logprobs: OptionalNullable[ChatTokenLogprobs] = UNSET
diff --git a/src/openrouter/components/chatstreamchunk.py b/src/openrouter/components/chatstreamchunk.py
index 59e17c2..24aa825 100644
--- a/src/openrouter/components/chatstreamchunk.py
+++ b/src/openrouter/components/chatstreamchunk.py
@@ -15,46 +15,46 @@ from typing import List, Literal, Optional
from typing_extensions import NotRequired, TypedDict
-ChatStreamChunkObject = Literal["chat.completion.chunk",]
-
-
class ErrorTypedDict(TypedDict):
r"""Error information"""
+ code: int
+ r"""Error code"""
message: str
r"""Error message"""
- code: float
- r"""Error code"""
class Error(BaseModel):
r"""Error information"""
+ code: int
+ r"""Error code"""
+
message: str
r"""Error message"""
- code: float
- r"""Error code"""
+
+ChatStreamChunkObject = Literal["chat.completion.chunk",]
class ChatStreamChunkTypedDict(TypedDict):
r"""Streaming chat completion chunk"""
- id: str
- r"""Unique chunk identifier"""
choices: List[ChatStreamChoiceTypedDict]
r"""List of streaming chunk choices"""
- created: float
+ created: int
r"""Unix timestamp of creation"""
+ id: str
+ r"""Unique chunk identifier"""
model: str
r"""Model used for completion"""
object: ChatStreamChunkObject
- system_fingerprint: NotRequired[str]
- r"""System fingerprint"""
- service_tier: NotRequired[Nullable[str]]
- r"""The service tier used by the upstream provider for this request"""
error: NotRequired[ErrorTypedDict]
r"""Error information"""
+ service_tier: NotRequired[Nullable[str]]
+ r"""The service tier used by the upstream provider for this request"""
+ system_fingerprint: NotRequired[str]
+ r"""System fingerprint"""
usage: NotRequired[ChatUsageTypedDict]
r"""Token usage statistics"""
@@ -62,35 +62,35 @@ class ChatStreamChunkTypedDict(TypedDict):
class ChatStreamChunk(BaseModel):
r"""Streaming chat completion chunk"""
- id: str
- r"""Unique chunk identifier"""
-
choices: List[ChatStreamChoice]
r"""List of streaming chunk choices"""
- created: float
+ created: int
r"""Unix timestamp of creation"""
+ id: str
+ r"""Unique chunk identifier"""
+
model: str
r"""Model used for completion"""
object: ChatStreamChunkObject
- system_fingerprint: Optional[str] = None
- r"""System fingerprint"""
+ error: Optional[Error] = None
+ r"""Error information"""
service_tier: OptionalNullable[str] = UNSET
r"""The service tier used by the upstream provider for this request"""
- error: Optional[Error] = None
- r"""Error information"""
+ system_fingerprint: Optional[str] = None
+ r"""System fingerprint"""
usage: Optional[ChatUsage] = None
r"""Token usage statistics"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["system_fingerprint", "service_tier", "error", "usage"]
+ optional_fields = ["error", "service_tier", "system_fingerprint", "usage"]
nullable_fields = ["service_tier"]
null_default_fields = []
diff --git a/src/openrouter/components/chatstreamdelta.py b/src/openrouter/components/chatstreamdelta.py
index 540982e..8d0c74c 100644
--- a/src/openrouter/components/chatstreamdelta.py
+++ b/src/openrouter/components/chatstreamdelta.py
@@ -23,26 +23,25 @@ r"""The role of the message author"""
class ChatStreamDeltaTypedDict(TypedDict):
r"""Delta changes in streaming response"""
- role: NotRequired[ChatStreamDeltaRole]
- r"""The role of the message author"""
+ audio: NotRequired[ChatAudioOutputTypedDict]
content: NotRequired[Nullable[str]]
r"""Message content delta"""
reasoning: NotRequired[Nullable[str]]
r"""Reasoning content delta"""
- refusal: NotRequired[Nullable[str]]
- r"""Refusal message delta"""
- tool_calls: NotRequired[List[ChatStreamToolCallTypedDict]]
- r"""Tool calls delta"""
reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]]
r"""Reasoning details for extended thinking models"""
- audio: NotRequired[ChatAudioOutputTypedDict]
+ refusal: NotRequired[Nullable[str]]
+ r"""Refusal message delta"""
+ role: NotRequired[ChatStreamDeltaRole]
+ r"""The role of the message author"""
+ tool_calls: NotRequired[List[ChatStreamToolCallTypedDict]]
+ r"""Tool calls delta"""
class ChatStreamDelta(BaseModel):
r"""Delta changes in streaming response"""
- role: Optional[ChatStreamDeltaRole] = None
- r"""The role of the message author"""
+ audio: Optional[ChatAudioOutput] = None
content: OptionalNullable[str] = UNSET
r"""Message content delta"""
@@ -50,27 +49,28 @@ class ChatStreamDelta(BaseModel):
reasoning: OptionalNullable[str] = UNSET
r"""Reasoning content delta"""
+ reasoning_details: Optional[List[ReasoningDetailUnion]] = None
+ r"""Reasoning details for extended thinking models"""
+
refusal: OptionalNullable[str] = UNSET
r"""Refusal message delta"""
+ role: Optional[ChatStreamDeltaRole] = None
+ r"""The role of the message author"""
+
tool_calls: Optional[List[ChatStreamToolCall]] = None
r"""Tool calls delta"""
- reasoning_details: Optional[List[ReasoningDetailUnion]] = None
- r"""Reasoning details for extended thinking models"""
-
- audio: Optional[ChatAudioOutput] = None
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "role",
+ "audio",
"content",
"reasoning",
- "refusal",
- "tool_calls",
"reasoning_details",
- "audio",
+ "refusal",
+ "role",
+ "tool_calls",
]
nullable_fields = ["content", "reasoning", "refusal"]
null_default_fields = []
diff --git a/src/openrouter/components/chatstreamtoolcall.py b/src/openrouter/components/chatstreamtoolcall.py
index 0f25b0c..4612139 100644
--- a/src/openrouter/components/chatstreamtoolcall.py
+++ b/src/openrouter/components/chatstreamtoolcall.py
@@ -6,53 +6,53 @@ from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict
-ChatStreamToolCallType = Literal["function",]
-r"""Tool call type"""
-
-
class ChatStreamToolCallFunctionTypedDict(TypedDict):
r"""Function call details"""
- name: NotRequired[str]
- r"""Function name"""
arguments: NotRequired[str]
r"""Function arguments as JSON string"""
+ name: NotRequired[str]
+ r"""Function name"""
class ChatStreamToolCallFunction(BaseModel):
r"""Function call details"""
+ arguments: Optional[str] = None
+ r"""Function arguments as JSON string"""
+
name: Optional[str] = None
r"""Function name"""
- arguments: Optional[str] = None
- r"""Function arguments as JSON string"""
+
+ChatStreamToolCallType = Literal["function",]
+r"""Tool call type"""
class ChatStreamToolCallTypedDict(TypedDict):
r"""Tool call delta for streaming responses"""
- index: float
+ index: int
r"""Tool call index in the array"""
+ function: NotRequired[ChatStreamToolCallFunctionTypedDict]
+ r"""Function call details"""
id: NotRequired[str]
r"""Tool call identifier"""
type: NotRequired[ChatStreamToolCallType]
r"""Tool call type"""
- function: NotRequired[ChatStreamToolCallFunctionTypedDict]
- r"""Function call details"""
class ChatStreamToolCall(BaseModel):
r"""Tool call delta for streaming responses"""
- index: float
+ index: int
r"""Tool call index in the array"""
+ function: Optional[ChatStreamToolCallFunction] = None
+ r"""Function call details"""
+
id: Optional[str] = None
r"""Tool call identifier"""
type: Optional[ChatStreamToolCallType] = None
r"""Tool call type"""
-
- function: Optional[ChatStreamToolCallFunction] = None
- r"""Function call details"""
diff --git a/src/openrouter/components/chatsystemmessage.py b/src/openrouter/components/chatsystemmessage.py
index e123812..a9e7bb1 100644
--- a/src/openrouter/components/chatsystemmessage.py
+++ b/src/openrouter/components/chatsystemmessage.py
@@ -7,9 +7,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict
-ChatSystemMessageRole = Literal["system",]
-
-
ChatSystemMessageContentTypedDict = TypeAliasType(
"ChatSystemMessageContentTypedDict", Union[str, List[ChatContentTextTypedDict]]
)
@@ -22,12 +19,15 @@ ChatSystemMessageContent = TypeAliasType(
r"""System message content"""
+ChatSystemMessageRole = Literal["system",]
+
+
class ChatSystemMessageTypedDict(TypedDict):
r"""System message for setting behavior"""
- role: ChatSystemMessageRole
content: ChatSystemMessageContentTypedDict
r"""System message content"""
+ role: ChatSystemMessageRole
name: NotRequired[str]
r"""Optional name for the system message"""
@@ -35,10 +35,10 @@ class ChatSystemMessageTypedDict(TypedDict):
class ChatSystemMessage(BaseModel):
r"""System message for setting behavior"""
- role: ChatSystemMessageRole
-
content: ChatSystemMessageContent
r"""System message content"""
+ role: ChatSystemMessageRole
+
name: Optional[str] = None
r"""Optional name for the system message"""
diff --git a/src/openrouter/components/chattokenlogprob.py b/src/openrouter/components/chattokenlogprob.py
index a52d234..2a82b99 100644
--- a/src/openrouter/components/chattokenlogprob.py
+++ b/src/openrouter/components/chattokenlogprob.py
@@ -9,17 +9,17 @@ from typing_extensions import Annotated, TypedDict
class ChatTokenLogprobTopLogprobTypedDict(TypedDict):
- token: str
+ bytes_: Nullable[List[int]]
logprob: float
- bytes_: Nullable[List[float]]
+ token: str
class ChatTokenLogprobTopLogprob(BaseModel):
- token: str
+ bytes_: Annotated[Nullable[List[int]], pydantic.Field(alias="bytes")]
logprob: float
- bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")]
+ token: str
@model_serializer(mode="wrap")
def serialize_model(self, handler):
@@ -55,12 +55,12 @@ class ChatTokenLogprobTopLogprob(BaseModel):
class ChatTokenLogprobTypedDict(TypedDict):
r"""Token log probability information"""
- token: str
- r"""The token"""
+ bytes_: Nullable[List[int]]
+ r"""UTF-8 bytes of the token"""
logprob: float
r"""Log probability of the token"""
- bytes_: Nullable[List[float]]
- r"""UTF-8 bytes of the token"""
+ token: str
+ r"""The token"""
top_logprobs: List[ChatTokenLogprobTopLogprobTypedDict]
r"""Top alternative tokens with probabilities"""
@@ -68,14 +68,14 @@ class ChatTokenLogprobTypedDict(TypedDict):
class ChatTokenLogprob(BaseModel):
r"""Token log probability information"""
- token: str
- r"""The token"""
+ bytes_: Annotated[Nullable[List[int]], pydantic.Field(alias="bytes")]
+ r"""UTF-8 bytes of the token"""
logprob: float
r"""Log probability of the token"""
- bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")]
- r"""UTF-8 bytes of the token"""
+ token: str
+ r"""The token"""
top_logprobs: List[ChatTokenLogprobTopLogprob]
r"""Top alternative tokens with probabilities"""
diff --git a/src/openrouter/components/chattoolcall.py b/src/openrouter/components/chattoolcall.py
index 4788e38..17d6de6 100644
--- a/src/openrouter/components/chattoolcall.py
+++ b/src/openrouter/components/chattoolcall.py
@@ -6,39 +6,39 @@ from typing import Literal
from typing_extensions import TypedDict
-ChatToolCallType = Literal["function",]
-
-
class ChatToolCallFunctionTypedDict(TypedDict):
- name: str
- r"""Function name to call"""
arguments: str
r"""Function arguments as JSON string"""
+ name: str
+ r"""Function name to call"""
class ChatToolCallFunction(BaseModel):
+ arguments: str
+ r"""Function arguments as JSON string"""
+
name: str
r"""Function name to call"""
- arguments: str
- r"""Function arguments as JSON string"""
+
+ChatToolCallType = Literal["function",]
class ChatToolCallTypedDict(TypedDict):
r"""Tool call made by the assistant"""
+ function: ChatToolCallFunctionTypedDict
id: str
r"""Tool call identifier"""
type: ChatToolCallType
- function: ChatToolCallFunctionTypedDict
class ChatToolCall(BaseModel):
r"""Tool call made by the assistant"""
+ function: ChatToolCallFunction
+
id: str
r"""Tool call identifier"""
type: ChatToolCallType
-
- function: ChatToolCallFunction
diff --git a/src/openrouter/components/chattoolmessage.py b/src/openrouter/components/chattoolmessage.py
index 1738954..2ccba83 100644
--- a/src/openrouter/components/chattoolmessage.py
+++ b/src/openrouter/components/chattoolmessage.py
@@ -7,9 +7,6 @@ from typing import List, Literal, Union
from typing_extensions import TypeAliasType, TypedDict
-ChatToolMessageRole = Literal["tool",]
-
-
ChatToolMessageContentTypedDict = TypeAliasType(
"ChatToolMessageContentTypedDict", Union[str, List[ChatContentItemsTypedDict]]
)
@@ -22,12 +19,15 @@ ChatToolMessageContent = TypeAliasType(
r"""Tool response content"""
+ChatToolMessageRole = Literal["tool",]
+
+
class ChatToolMessageTypedDict(TypedDict):
r"""Tool response message"""
- role: ChatToolMessageRole
content: ChatToolMessageContentTypedDict
r"""Tool response content"""
+ role: ChatToolMessageRole
tool_call_id: str
r"""ID of the assistant message tool call this message responds to"""
@@ -35,10 +35,10 @@ class ChatToolMessageTypedDict(TypedDict):
class ChatToolMessage(BaseModel):
r"""Tool response message"""
- role: ChatToolMessageRole
-
content: ChatToolMessageContent
r"""Tool response content"""
+ role: ChatToolMessageRole
+
tool_call_id: str
r"""ID of the assistant message tool call this message responds to"""
diff --git a/src/openrouter/components/chatusage.py b/src/openrouter/components/chatusage.py
index 51f0bd6..7df37ad 100644
--- a/src/openrouter/components/chatusage.py
+++ b/src/openrouter/components/chatusage.py
@@ -16,109 +16,69 @@ from typing_extensions import NotRequired, TypedDict
class CompletionTokensDetailsTypedDict(TypedDict):
r"""Detailed completion token usage"""
- reasoning_tokens: NotRequired[Nullable[float]]
- r"""Tokens used for reasoning"""
- audio_tokens: NotRequired[Nullable[float]]
- r"""Tokens used for audio output"""
- accepted_prediction_tokens: NotRequired[Nullable[float]]
+ accepted_prediction_tokens: NotRequired[int]
r"""Accepted prediction tokens"""
- rejected_prediction_tokens: NotRequired[Nullable[float]]
+ audio_tokens: NotRequired[int]
+ r"""Tokens used for audio output"""
+ reasoning_tokens: NotRequired[int]
+ r"""Tokens used for reasoning"""
+ rejected_prediction_tokens: NotRequired[int]
r"""Rejected prediction tokens"""
class CompletionTokensDetails(BaseModel):
r"""Detailed completion token usage"""
- reasoning_tokens: OptionalNullable[float] = UNSET
- r"""Tokens used for reasoning"""
-
- audio_tokens: OptionalNullable[float] = UNSET
- r"""Tokens used for audio output"""
-
- accepted_prediction_tokens: OptionalNullable[float] = UNSET
+ accepted_prediction_tokens: Optional[int] = None
r"""Accepted prediction tokens"""
- rejected_prediction_tokens: OptionalNullable[float] = UNSET
+ audio_tokens: Optional[int] = None
+ r"""Tokens used for audio output"""
+
+ reasoning_tokens: Optional[int] = None
+ r"""Tokens used for reasoning"""
+
+ rejected_prediction_tokens: Optional[int] = None
r"""Rejected prediction tokens"""
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "reasoning_tokens",
- "audio_tokens",
- "accepted_prediction_tokens",
- "rejected_prediction_tokens",
- ]
- nullable_fields = [
- "reasoning_tokens",
- "audio_tokens",
- "accepted_prediction_tokens",
- "rejected_prediction_tokens",
- ]
- 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 PromptTokensDetailsTypedDict(TypedDict):
r"""Detailed prompt token usage"""
- cached_tokens: NotRequired[float]
- r"""Cached prompt tokens"""
- cache_write_tokens: NotRequired[float]
- r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing."""
- audio_tokens: NotRequired[float]
+ audio_tokens: NotRequired[int]
r"""Audio input tokens"""
- video_tokens: NotRequired[float]
+ cache_write_tokens: NotRequired[int]
+ r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing."""
+ cached_tokens: NotRequired[int]
+ r"""Cached prompt tokens"""
+ video_tokens: NotRequired[int]
r"""Video input tokens"""
class PromptTokensDetails(BaseModel):
r"""Detailed prompt token usage"""
- cached_tokens: Optional[float] = None
- r"""Cached prompt tokens"""
-
- cache_write_tokens: Optional[float] = None
- r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing."""
-
- audio_tokens: Optional[float] = None
+ audio_tokens: Optional[int] = None
r"""Audio input tokens"""
- video_tokens: Optional[float] = None
+ cache_write_tokens: Optional[int] = None
+ r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing."""
+
+ cached_tokens: Optional[int] = None
+ r"""Cached prompt tokens"""
+
+ video_tokens: Optional[int] = None
r"""Video input tokens"""
class ChatUsageTypedDict(TypedDict):
r"""Token usage statistics"""
- completion_tokens: float
+ completion_tokens: int
r"""Number of tokens in the completion"""
- prompt_tokens: float
+ prompt_tokens: int
r"""Number of tokens in the prompt"""
- total_tokens: float
+ total_tokens: int
r"""Total number of tokens"""
completion_tokens_details: NotRequired[Nullable[CompletionTokensDetailsTypedDict]]
r"""Detailed completion token usage"""
@@ -129,13 +89,13 @@ class ChatUsageTypedDict(TypedDict):
class ChatUsage(BaseModel):
r"""Token usage statistics"""
- completion_tokens: float
+ completion_tokens: int
r"""Number of tokens in the completion"""
- prompt_tokens: float
+ prompt_tokens: int
r"""Number of tokens in the prompt"""
- total_tokens: float
+ total_tokens: int
r"""Total number of tokens"""
completion_tokens_details: OptionalNullable[CompletionTokensDetails] = UNSET
diff --git a/src/openrouter/components/chatusermessage.py b/src/openrouter/components/chatusermessage.py
index c8ecec5..9092aa3 100644
--- a/src/openrouter/components/chatusermessage.py
+++ b/src/openrouter/components/chatusermessage.py
@@ -7,9 +7,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict
-ChatUserMessageRole = Literal["user",]
-
-
ChatUserMessageContentTypedDict = TypeAliasType(
"ChatUserMessageContentTypedDict", Union[str, List[ChatContentItemsTypedDict]]
)
@@ -22,12 +19,15 @@ ChatUserMessageContent = TypeAliasType(
r"""User message content"""
+ChatUserMessageRole = Literal["user",]
+
+
class ChatUserMessageTypedDict(TypedDict):
r"""User message"""
- role: ChatUserMessageRole
content: ChatUserMessageContentTypedDict
r"""User message content"""
+ role: ChatUserMessageRole
name: NotRequired[str]
r"""Optional name for the user"""
@@ -35,10 +35,10 @@ class ChatUserMessageTypedDict(TypedDict):
class ChatUserMessage(BaseModel):
r"""User message"""
- role: ChatUserMessageRole
-
content: ChatUserMessageContent
r"""User message content"""
+ role: ChatUserMessageRole
+
name: Optional[str] = None
r"""Optional name for the user"""
diff --git a/src/openrouter/components/chatwebsearchservertool.py b/src/openrouter/components/chatwebsearchservertool.py
deleted file mode 100644
index 48ad6da..0000000
--- a/src/openrouter/components/chatwebsearchservertool.py
+++ /dev/null
@@ -1,123 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
-
-from __future__ import annotations
-from openrouter.types import BaseModel, UnrecognizedStr
-from openrouter.utils import validate_open_enum
-from pydantic.functional_validators import PlainValidator
-from typing import List, Literal, Optional, Union
-from typing_extensions import Annotated, NotRequired, TypedDict
-
-
-ChatWebSearchServerToolTypeOpenrouterWebSearch = Literal["openrouter:web_search",]
-
-
-ChatWebSearchServerToolEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
-ChatWebSearchServerToolSearchContextSize = Union[
- Literal[
- "low",
- "medium",
- "high",
- ],
- 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."""
-
-
-ChatWebSearchServerToolParametersType = Literal["approximate",]
-
-
-class ChatWebSearchServerToolUserLocationTypedDict(TypedDict):
- r"""Approximate user location for location-biased results."""
-
- type: NotRequired[ChatWebSearchServerToolParametersType]
- city: NotRequired[str]
- region: NotRequired[str]
- country: NotRequired[str]
- timezone: NotRequired[str]
-
-
-class ChatWebSearchServerToolUserLocation(BaseModel):
- r"""Approximate user location for location-biased results."""
-
- type: Optional[ChatWebSearchServerToolParametersType] = None
-
- city: Optional[str] = None
-
- region: Optional[str] = None
-
- country: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-class ChatWebSearchServerToolParametersTypedDict(TypedDict):
- engine: NotRequired[ChatWebSearchServerToolEngine]
- 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."""
- max_results: NotRequired[float]
- 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[float]
- 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[ChatWebSearchServerToolSearchContextSize]
- 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."""
- user_location: NotRequired[ChatWebSearchServerToolUserLocationTypedDict]
- r"""Approximate user location for location-biased results."""
- allowed_domains: NotRequired[List[str]]
- r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
- excluded_domains: NotRequired[List[str]]
- r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
-
-class ChatWebSearchServerToolParameters(BaseModel):
- engine: Annotated[
- Optional[ChatWebSearchServerToolEngine],
- 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."""
-
- max_results: Optional[float] = 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[float] = 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[ChatWebSearchServerToolSearchContextSize],
- 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."""
-
- user_location: Optional[ChatWebSearchServerToolUserLocation] = None
- r"""Approximate user location for location-biased results."""
-
- allowed_domains: Optional[List[str]] = None
- r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
- excluded_domains: Optional[List[str]] = None
- r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
-
-class ChatWebSearchServerToolTypedDict(TypedDict):
- r"""OpenRouter built-in server tool: searches the web for current information"""
-
- type: ChatWebSearchServerToolTypeOpenrouterWebSearch
- parameters: NotRequired[ChatWebSearchServerToolParametersTypedDict]
-
-
-class ChatWebSearchServerTool(BaseModel):
- r"""OpenRouter built-in server tool: searches the web for current information"""
-
- type: ChatWebSearchServerToolTypeOpenrouterWebSearch
-
- parameters: Optional[ChatWebSearchServerToolParameters] = None
diff --git a/src/openrouter/components/chatwebsearchshorthand.py b/src/openrouter/components/chatwebsearchshorthand.py
index 92d86d4..707f0cf 100644
--- a/src/openrouter/components/chatwebsearchshorthand.py
+++ b/src/openrouter/components/chatwebsearchshorthand.py
@@ -1,6 +1,13 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .searchqualitylevel import SearchQualityLevel
+from .websearchconfig import WebSearchConfig, WebSearchConfigTypedDict
+from .websearchengineenum import WebSearchEngineEnum
+from .websearchuserlocationservertool import (
+ WebSearchUserLocationServerTool,
+ WebSearchUserLocationServerToolTypedDict,
+)
from openrouter.types import BaseModel, UnrecognizedStr
from openrouter.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
@@ -19,173 +26,25 @@ ChatWebSearchShorthandType = Union[
]
-ChatWebSearchShorthandEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
-ChatWebSearchShorthandSearchContextSize = Union[
- Literal[
- "low",
- "medium",
- "high",
- ],
- 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."""
-
-
-ChatWebSearchShorthandTypeApproximate = Literal["approximate",]
-
-
-class ChatWebSearchShorthandUserLocationTypedDict(TypedDict):
- r"""Approximate user location for location-biased results."""
-
- type: NotRequired[ChatWebSearchShorthandTypeApproximate]
- city: NotRequired[str]
- region: NotRequired[str]
- country: NotRequired[str]
- timezone: NotRequired[str]
-
-
-class ChatWebSearchShorthandUserLocation(BaseModel):
- r"""Approximate user location for location-biased results."""
-
- type: Optional[ChatWebSearchShorthandTypeApproximate] = None
-
- city: Optional[str] = None
-
- region: Optional[str] = None
-
- country: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-ChatWebSearchShorthandParametersEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
-ChatWebSearchShorthandParametersSearchContextSize = Union[
- Literal[
- "low",
- "medium",
- "high",
- ],
- 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."""
-
-
-ChatWebSearchShorthandParametersType = Literal["approximate",]
-
-
-class ChatWebSearchShorthandParametersUserLocationTypedDict(TypedDict):
- r"""Approximate user location for location-biased results."""
-
- type: NotRequired[ChatWebSearchShorthandParametersType]
- city: NotRequired[str]
- region: NotRequired[str]
- country: NotRequired[str]
- timezone: NotRequired[str]
-
-
-class ChatWebSearchShorthandParametersUserLocation(BaseModel):
- r"""Approximate user location for location-biased results."""
-
- type: Optional[ChatWebSearchShorthandParametersType] = None
-
- city: Optional[str] = None
-
- region: Optional[str] = None
-
- country: Optional[str] = None
-
- timezone: Optional[str] = None
-
-
-class ChatWebSearchShorthandParametersTypedDict(TypedDict):
- engine: NotRequired[ChatWebSearchShorthandParametersEngine]
- 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."""
- max_results: NotRequired[float]
- 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[float]
- 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[ChatWebSearchShorthandParametersSearchContextSize]
- 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."""
- user_location: NotRequired[ChatWebSearchShorthandParametersUserLocationTypedDict]
- r"""Approximate user location for location-biased results."""
- allowed_domains: NotRequired[List[str]]
- r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
- excluded_domains: NotRequired[List[str]]
- r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
-
-class ChatWebSearchShorthandParameters(BaseModel):
- engine: Annotated[
- Optional[ChatWebSearchShorthandParametersEngine],
- 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."""
-
- max_results: Optional[float] = 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[float] = 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[ChatWebSearchShorthandParametersSearchContextSize],
- 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."""
-
- user_location: Optional[ChatWebSearchShorthandParametersUserLocation] = None
- r"""Approximate user location for location-biased results."""
-
- allowed_domains: Optional[List[str]] = None
- r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
- excluded_domains: Optional[List[str]] = None
- r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
-
class ChatWebSearchShorthandTypedDict(TypedDict):
r"""Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search."""
type: ChatWebSearchShorthandType
- engine: NotRequired[ChatWebSearchShorthandEngine]
- 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."""
- max_results: NotRequired[float]
- 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[float]
- 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[ChatWebSearchShorthandSearchContextSize]
- 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."""
- user_location: NotRequired[ChatWebSearchShorthandUserLocationTypedDict]
- r"""Approximate user location for location-biased results."""
allowed_domains: NotRequired[List[str]]
- r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
+ r"""Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity."""
+ 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. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
- parameters: NotRequired[ChatWebSearchShorthandParametersTypedDict]
+ r"""Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity."""
+ 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."""
+ user_location: NotRequired[WebSearchUserLocationServerToolTypedDict]
+ r"""Approximate user location for location-biased results."""
class ChatWebSearchShorthand(BaseModel):
@@ -195,31 +54,29 @@ class ChatWebSearchShorthand(BaseModel):
ChatWebSearchShorthandType, PlainValidator(validate_open_enum(False))
]
+ 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."""
+
engine: Annotated[
- Optional[ChatWebSearchShorthandEngine],
- PlainValidator(validate_open_enum(False)),
+ 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."""
- max_results: Optional[float] = None
+ 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."""
+
+ 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[float] = None
+ 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."""
+ parameters: Optional[WebSearchConfig] = None
+
search_context_size: Annotated[
- Optional[ChatWebSearchShorthandSearchContextSize],
- PlainValidator(validate_open_enum(False)),
+ 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."""
- user_location: Optional[ChatWebSearchShorthandUserLocation] = None
+ user_location: Optional[WebSearchUserLocationServerTool] = None
r"""Approximate user location for location-biased results."""
-
- allowed_domains: Optional[List[str]] = None
- r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
- excluded_domains: Optional[List[str]] = None
- r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search."""
-
- parameters: Optional[ChatWebSearchShorthandParameters] = None
diff --git a/src/openrouter/components/codeinterpreterservertool.py b/src/openrouter/components/codeinterpreterservertool.py
index 3342144..67d4cf9 100644
--- a/src/openrouter/components/codeinterpreterservertool.py
+++ b/src/openrouter/components/codeinterpreterservertool.py
@@ -16,12 +16,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-TypeCodeInterpreter = Literal["code_interpreter",]
-
-
-ContainerType = Literal["auto",]
-
-
MemoryLimit = Union[
Literal[
"1g",
@@ -33,6 +27,9 @@ MemoryLimit = Union[
]
+ContainerType = Literal["auto",]
+
+
class ContainerAutoTypedDict(TypedDict):
type: ContainerType
file_ids: NotRequired[List[str]]
@@ -87,16 +84,19 @@ ContainerTypedDict = TypeAliasType(
Container = TypeAliasType("Container", Union[ContainerAuto, str])
+TypeCodeInterpreter = Literal["code_interpreter",]
+
+
class CodeInterpreterServerToolTypedDict(TypedDict):
r"""Code interpreter tool configuration"""
- type: TypeCodeInterpreter
container: ContainerTypedDict
+ type: TypeCodeInterpreter
class CodeInterpreterServerTool(BaseModel):
r"""Code interpreter tool configuration"""
- type: TypeCodeInterpreter
-
container: Container
+
+ type: TypeCodeInterpreter
diff --git a/src/openrouter/components/compoundfilter.py b/src/openrouter/components/compoundfilter.py
index f4bcd55..b32ff67 100644
--- a/src/openrouter/components/compoundfilter.py
+++ b/src/openrouter/components/compoundfilter.py
@@ -20,13 +20,13 @@ CompoundFilterType = Union[
class CompoundFilterTypedDict(TypedDict):
r"""A compound filter that combines multiple comparison or compound filters"""
- type: CompoundFilterType
filters: List[Dict[str, Nullable[Any]]]
+ type: CompoundFilterType
class CompoundFilter(BaseModel):
r"""A compound filter that combines multiple comparison or compound filters"""
- type: Annotated[CompoundFilterType, PlainValidator(validate_open_enum(False))]
-
filters: List[Dict[str, Nullable[Any]]]
+
+ type: Annotated[CompoundFilterType, PlainValidator(validate_open_enum(False))]
diff --git a/src/openrouter/components/computeruseservertool.py b/src/openrouter/components/computeruseservertool.py
index c1596a6..8f6128f 100644
--- a/src/openrouter/components/computeruseservertool.py
+++ b/src/openrouter/components/computeruseservertool.py
@@ -8,9 +8,6 @@ from typing import Literal, Union
from typing_extensions import Annotated, TypedDict
-ComputerUseServerToolType = Literal["computer_use_preview",]
-
-
Environment = Union[
Literal[
"windows",
@@ -23,22 +20,25 @@ Environment = Union[
]
+ComputerUseServerToolType = Literal["computer_use_preview",]
+
+
class ComputerUseServerToolTypedDict(TypedDict):
r"""Computer use preview tool configuration"""
- type: ComputerUseServerToolType
- display_height: float
- display_width: float
+ display_height: int
+ display_width: int
environment: Environment
+ type: ComputerUseServerToolType
class ComputerUseServerTool(BaseModel):
r"""Computer use preview tool configuration"""
- type: ComputerUseServerToolType
+ display_height: int
- display_height: float
-
- display_width: float
+ display_width: int
environment: Annotated[Environment, PlainValidator(validate_open_enum(False))]
+
+ type: ComputerUseServerToolType
diff --git a/src/openrouter/components/contentpartaddedevent.py b/src/openrouter/components/contentpartaddedevent.py
index 8a0d0c7..019b906 100644
--- a/src/openrouter/components/contentpartaddedevent.py
+++ b/src/openrouter/components/contentpartaddedevent.py
@@ -14,9 +14,6 @@ from typing import Literal, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict
-ContentPartAddedEventType = Literal["response.content_part.added",]
-
-
ContentPartAddedEventPartTypedDict = TypeAliasType(
"ContentPartAddedEventPartTypedDict",
Union[
@@ -37,28 +34,31 @@ ContentPartAddedEventPart = Annotated[
]
+ContentPartAddedEventType = Literal["response.content_part.added",]
+
+
class ContentPartAddedEventTypedDict(TypedDict):
r"""Event emitted when a new content part is added to an output item"""
- type: ContentPartAddedEventType
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
part: ContentPartAddedEventPartTypedDict
- sequence_number: float
+ sequence_number: int
+ type: ContentPartAddedEventType
class ContentPartAddedEvent(BaseModel):
r"""Event emitted when a new content part is added to an output item"""
- type: ContentPartAddedEventType
-
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
part: ContentPartAddedEventPart
- sequence_number: float
+ sequence_number: int
+
+ type: ContentPartAddedEventType
diff --git a/src/openrouter/components/contentpartdoneevent.py b/src/openrouter/components/contentpartdoneevent.py
index f9046af..8a7f738 100644
--- a/src/openrouter/components/contentpartdoneevent.py
+++ b/src/openrouter/components/contentpartdoneevent.py
@@ -14,9 +14,6 @@ from typing import Literal, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict
-ContentPartDoneEventType = Literal["response.content_part.done",]
-
-
ContentPartDoneEventPartTypedDict = TypeAliasType(
"ContentPartDoneEventPartTypedDict",
Union[
@@ -37,28 +34,31 @@ ContentPartDoneEventPart = Annotated[
]
+ContentPartDoneEventType = Literal["response.content_part.done",]
+
+
class ContentPartDoneEventTypedDict(TypedDict):
r"""Event emitted when a content part is complete"""
- type: ContentPartDoneEventType
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
part: ContentPartDoneEventPartTypedDict
- sequence_number: float
+ sequence_number: int
+ type: ContentPartDoneEventType
class ContentPartDoneEvent(BaseModel):
r"""Event emitted when a content part is complete"""
- type: ContentPartDoneEventType
-
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
part: ContentPartDoneEventPart
- sequence_number: float
+ sequence_number: int
+
+ type: ContentPartDoneEventType
diff --git a/src/openrouter/components/contentpartimage.py b/src/openrouter/components/contentpartimage.py
new file mode 100644
index 0000000..baee3cb
--- /dev/null
+++ b/src/openrouter/components/contentpartimage.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+class ContentPartImageImageURLTypedDict(TypedDict):
+ url: str
+
+
+class ContentPartImageImageURL(BaseModel):
+ url: str
+
+
+ContentPartImageType = Literal["image_url",]
+
+
+class ContentPartImageTypedDict(TypedDict):
+ image_url: ContentPartImageImageURLTypedDict
+ type: ContentPartImageType
+
+
+class ContentPartImage(BaseModel):
+ image_url: ContentPartImageImageURL
+
+ type: ContentPartImageType
diff --git a/src/openrouter/components/contextcompressionplugin.py b/src/openrouter/components/contextcompressionplugin.py
new file mode 100644
index 0000000..22758a0
--- /dev/null
+++ b/src/openrouter/components/contextcompressionplugin.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contextcompressionengine import ContextCompressionEngine
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+ContextCompressionPluginID = Literal["context-compression",]
+
+
+class ContextCompressionPluginTypedDict(TypedDict):
+ id: ContextCompressionPluginID
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
+ engine: NotRequired[ContextCompressionEngine]
+ r"""The compression engine to use. Defaults to \"middle-out\"."""
+
+
+class ContextCompressionPlugin(BaseModel):
+ id: ContextCompressionPluginID
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
+
+ engine: Optional[ContextCompressionEngine] = None
+ r"""The compression engine to use. Defaults to \"middle-out\"."""
diff --git a/src/openrouter/components/createguardrailrequest.py b/src/openrouter/components/createguardrailrequest.py
new file mode 100644
index 0000000..d0acbe1
--- /dev/null
+++ b/src/openrouter/components/createguardrailrequest.py
@@ -0,0 +1,115 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrailinterval import GuardrailInterval
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CreateGuardrailRequestTypedDict(TypedDict):
+ name: str
+ r"""Name for the new guardrail"""
+ allowed_models: NotRequired[Nullable[List[str]]]
+ r"""Array of model identifiers (slug or canonical_slug accepted)"""
+ allowed_providers: NotRequired[Nullable[List[str]]]
+ r"""List of allowed provider IDs"""
+ description: NotRequired[Nullable[str]]
+ r"""Description of the guardrail"""
+ enforce_zdr: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention"""
+ 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]]]
+ r"""List of provider IDs to exclude from routing"""
+ limit_usd: NotRequired[float]
+ r"""Spending limit in USD"""
+ reset_interval: NotRequired[Nullable[GuardrailInterval]]
+ r"""Interval at which the limit resets (daily, weekly, monthly)"""
+
+
+class CreateGuardrailRequest(BaseModel):
+ name: str
+ r"""Name for the new guardrail"""
+
+ allowed_models: OptionalNullable[List[str]] = UNSET
+ r"""Array of model identifiers (slug or canonical_slug accepted)"""
+
+ allowed_providers: OptionalNullable[List[str]] = UNSET
+ r"""List of allowed provider IDs"""
+
+ description: OptionalNullable[str] = UNSET
+ r"""Description of the guardrail"""
+
+ enforce_zdr: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention"""
+
+ ignored_models: OptionalNullable[List[str]] = UNSET
+ r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
+
+ ignored_providers: OptionalNullable[List[str]] = UNSET
+ r"""List of provider IDs to exclude from routing"""
+
+ limit_usd: Optional[float] = None
+ r"""Spending limit in USD"""
+
+ reset_interval: Annotated[
+ OptionalNullable[GuardrailInterval], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+ r"""Interval at which the limit resets (daily, weekly, monthly)"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_models",
+ "allowed_providers",
+ "description",
+ "enforce_zdr",
+ "ignored_models",
+ "ignored_providers",
+ "limit_usd",
+ "reset_interval",
+ ]
+ nullable_fields = [
+ "allowed_models",
+ "allowed_providers",
+ "description",
+ "enforce_zdr",
+ "ignored_models",
+ "ignored_providers",
+ "reset_interval",
+ ]
+ 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/createguardrailresponse.py b/src/openrouter/components/createguardrailresponse.py
new file mode 100644
index 0000000..d6c4a4d
--- /dev/null
+++ b/src/openrouter/components/createguardrailresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrail import Guardrail, GuardrailTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class CreateGuardrailResponseTypedDict(TypedDict):
+ data: GuardrailTypedDict
+
+
+class CreateGuardrailResponse(BaseModel):
+ data: Guardrail
diff --git a/src/openrouter/components/customtool.py b/src/openrouter/components/customtool.py
index bc706a4..128bede 100644
--- a/src/openrouter/components/customtool.py
+++ b/src/openrouter/components/customtool.py
@@ -10,12 +10,6 @@ from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-TypeCustom = Literal["custom",]
-
-
-FormatTypeGrammar = Literal["grammar",]
-
-
Syntax = Union[
Literal[
"lark",
@@ -25,19 +19,22 @@ Syntax = Union[
]
+FormatTypeGrammar = Literal["grammar",]
+
+
class FormatGrammarTypedDict(TypedDict):
- type: FormatTypeGrammar
definition: str
syntax: Syntax
+ type: FormatTypeGrammar
class FormatGrammar(BaseModel):
- type: FormatTypeGrammar
-
definition: str
syntax: Annotated[Syntax, PlainValidator(validate_open_enum(False))]
+ type: FormatTypeGrammar
+
FormatTypeText = Literal["text",]
@@ -61,11 +58,14 @@ Format = Annotated[
]
+TypeCustom = Literal["custom",]
+
+
class CustomToolTypedDict(TypedDict):
r"""Custom tool configuration"""
- type: TypeCustom
name: str
+ type: TypeCustom
description: NotRequired[str]
format_: NotRequired[FormatTypedDict]
@@ -73,10 +73,10 @@ class CustomToolTypedDict(TypedDict):
class CustomTool(BaseModel):
r"""Custom tool configuration"""
- type: TypeCustom
-
name: str
+ type: TypeCustom
+
description: Optional[str] = None
format_: Annotated[Optional[Format], pydantic.Field(alias="format")] = None
diff --git a/src/openrouter/components/datacollection.py b/src/openrouter/components/datacollection.py
deleted file mode 100644
index 0ab58be..0000000
--- a/src/openrouter/components/datacollection.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
-
-from __future__ import annotations
-from openrouter.types import UnrecognizedStr
-from typing import Literal, Union
-
-
-DataCollection = Union[
- Literal[
- "deny",
- "allow",
- ],
- UnrecognizedStr,
-]
-r"""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.
-"""
diff --git a/src/openrouter/components/datetimeservertool.py b/src/openrouter/components/datetimeservertool.py
index ced5c34..d98c3fd 100644
--- a/src/openrouter/components/datetimeservertool.py
+++ b/src/openrouter/components/datetimeservertool.py
@@ -1,6 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .datetimeservertoolconfig import (
+ DatetimeServerToolConfig,
+ DatetimeServerToolConfigTypedDict,
+)
from openrouter.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict
@@ -9,21 +13,12 @@ from typing_extensions import NotRequired, TypedDict
DatetimeServerToolType = Literal["openrouter:datetime",]
-class DatetimeServerToolParametersTypedDict(TypedDict):
- timezone: NotRequired[str]
- r"""IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC."""
-
-
-class DatetimeServerToolParameters(BaseModel):
- timezone: Optional[str] = None
- r"""IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC."""
-
-
class DatetimeServerToolTypedDict(TypedDict):
r"""OpenRouter built-in server tool: returns the current date and time"""
type: DatetimeServerToolType
- parameters: NotRequired[DatetimeServerToolParametersTypedDict]
+ parameters: NotRequired[DatetimeServerToolConfigTypedDict]
+ r"""Configuration for the openrouter:datetime server tool"""
class DatetimeServerTool(BaseModel):
@@ -31,4 +26,5 @@ class DatetimeServerTool(BaseModel):
type: DatetimeServerToolType
- parameters: Optional[DatetimeServerToolParameters] = None
+ parameters: Optional[DatetimeServerToolConfig] = None
+ r"""Configuration for the openrouter:datetime server tool"""
diff --git a/src/openrouter/components/datetimeservertoolconfig.py b/src/openrouter/components/datetimeservertoolconfig.py
new file mode 100644
index 0000000..3eaaa33
--- /dev/null
+++ b/src/openrouter/components/datetimeservertoolconfig.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+class DatetimeServerToolConfigTypedDict(TypedDict):
+ r"""Configuration for the openrouter:datetime server tool"""
+
+ timezone: NotRequired[str]
+ r"""IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC."""
+
+
+class DatetimeServerToolConfig(BaseModel):
+ r"""Configuration for the openrouter:datetime server tool"""
+
+ timezone: Optional[str] = None
+ r"""IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC."""
diff --git a/src/openrouter/components/defaultparameters.py b/src/openrouter/components/defaultparameters.py
index 8af36cc..a59fa40 100644
--- a/src/openrouter/components/defaultparameters.py
+++ b/src/openrouter/components/defaultparameters.py
@@ -9,53 +9,47 @@ from openrouter.types import (
UNSET_SENTINEL,
)
from pydantic import model_serializer
+from typing import Optional
from typing_extensions import NotRequired, TypedDict
class DefaultParametersTypedDict(TypedDict):
r"""Default parameters for this model"""
- temperature: NotRequired[Nullable[float]]
- top_p: NotRequired[Nullable[float]]
+ frequency_penalty: NotRequired[float]
+ presence_penalty: NotRequired[float]
+ repetition_penalty: NotRequired[float]
+ temperature: NotRequired[float]
top_k: NotRequired[Nullable[int]]
- frequency_penalty: NotRequired[Nullable[float]]
- presence_penalty: NotRequired[Nullable[float]]
- repetition_penalty: NotRequired[Nullable[float]]
+ top_p: NotRequired[float]
class DefaultParameters(BaseModel):
r"""Default parameters for this model"""
- temperature: OptionalNullable[float] = UNSET
+ frequency_penalty: Optional[float] = None
- top_p: OptionalNullable[float] = UNSET
+ presence_penalty: Optional[float] = None
+
+ repetition_penalty: Optional[float] = None
+
+ temperature: Optional[float] = None
top_k: OptionalNullable[int] = UNSET
- frequency_penalty: OptionalNullable[float] = UNSET
-
- presence_penalty: OptionalNullable[float] = UNSET
-
- repetition_penalty: OptionalNullable[float] = UNSET
+ top_p: Optional[float] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "temperature",
- "top_p",
- "top_k",
"frequency_penalty",
"presence_penalty",
"repetition_penalty",
- ]
- nullable_fields = [
"temperature",
- "top_p",
"top_k",
- "frequency_penalty",
- "presence_penalty",
- "repetition_penalty",
+ "top_p",
]
+ nullable_fields = ["top_k"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/deleteguardrailresponse.py b/src/openrouter/components/deleteguardrailresponse.py
new file mode 100644
index 0000000..f31843c
--- /dev/null
+++ b/src/openrouter/components/deleteguardrailresponse.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 DeleteGuardrailResponseTypedDict(TypedDict):
+ deleted: Literal[True]
+ r"""Confirmation that the guardrail was deleted"""
+
+
+class DeleteGuardrailResponse(BaseModel):
+ DELETED: Annotated[
+ Annotated[Literal[True], AfterValidator(validate_const(True))],
+ pydantic.Field(alias="deleted"),
+ ] = True
+ r"""Confirmation that the guardrail was deleted"""
diff --git a/src/openrouter/components/easyinputmessage.py b/src/openrouter/components/easyinputmessage.py
index b7a6d28..7566167 100644
--- a/src/openrouter/components/easyinputmessage.py
+++ b/src/openrouter/components/easyinputmessage.py
@@ -20,46 +20,6 @@ from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-EasyInputMessageTypeMessage = Literal["message",]
-
-
-EasyInputMessageRoleDeveloper = Literal["developer",]
-
-
-EasyInputMessageRoleAssistant = Literal["assistant",]
-
-
-EasyInputMessageRoleSystem = Literal["system",]
-
-
-EasyInputMessageRoleUser = Literal["user",]
-
-
-EasyInputMessageRoleUnionTypedDict = TypeAliasType(
- "EasyInputMessageRoleUnionTypedDict",
- Union[
- EasyInputMessageRoleUser,
- EasyInputMessageRoleSystem,
- EasyInputMessageRoleAssistant,
- EasyInputMessageRoleDeveloper,
- ],
-)
-
-
-EasyInputMessageRoleUnion = TypeAliasType(
- "EasyInputMessageRoleUnion",
- Union[
- EasyInputMessageRoleUser,
- EasyInputMessageRoleSystem,
- EasyInputMessageRoleAssistant,
- EasyInputMessageRoleDeveloper,
- ],
-)
-
-
-EasyInputMessageContentType = Literal["input_image",]
-
-
EasyInputMessageDetail = Union[
Literal[
"auto",
@@ -70,21 +30,24 @@ EasyInputMessageDetail = Union[
]
+EasyInputMessageContentType = Literal["input_image",]
+
+
class EasyInputMessageContentInputImageTypedDict(TypedDict):
r"""Image input content item"""
- type: EasyInputMessageContentType
detail: EasyInputMessageDetail
+ type: EasyInputMessageContentType
image_url: NotRequired[Nullable[str]]
class EasyInputMessageContentInputImage(BaseModel):
r"""Image input content item"""
- type: EasyInputMessageContentType
-
detail: Annotated[EasyInputMessageDetail, PlainValidator(validate_open_enum(False))]
+ type: EasyInputMessageContentType
+
image_url: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
@@ -174,27 +137,64 @@ EasyInputMessagePhaseUnion = TypeAliasType(
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+EasyInputMessageRoleDeveloper = Literal["developer",]
+
+
+EasyInputMessageRoleAssistant = Literal["assistant",]
+
+
+EasyInputMessageRoleSystem = Literal["system",]
+
+
+EasyInputMessageRoleUser = Literal["user",]
+
+
+EasyInputMessageRoleUnionTypedDict = TypeAliasType(
+ "EasyInputMessageRoleUnionTypedDict",
+ Union[
+ EasyInputMessageRoleUser,
+ EasyInputMessageRoleSystem,
+ EasyInputMessageRoleAssistant,
+ EasyInputMessageRoleDeveloper,
+ ],
+)
+
+
+EasyInputMessageRoleUnion = TypeAliasType(
+ "EasyInputMessageRoleUnion",
+ Union[
+ EasyInputMessageRoleUser,
+ EasyInputMessageRoleSystem,
+ EasyInputMessageRoleAssistant,
+ EasyInputMessageRoleDeveloper,
+ ],
+)
+
+
+EasyInputMessageTypeMessage = Literal["message",]
+
+
class EasyInputMessageTypedDict(TypedDict):
role: EasyInputMessageRoleUnionTypedDict
- type: NotRequired[EasyInputMessageTypeMessage]
content: NotRequired[Nullable[EasyInputMessageContentUnion2TypedDict]]
phase: NotRequired[Nullable[EasyInputMessagePhaseUnionTypedDict]]
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ type: NotRequired[EasyInputMessageTypeMessage]
class EasyInputMessage(BaseModel):
role: EasyInputMessageRoleUnion
- type: Optional[EasyInputMessageTypeMessage] = None
-
content: OptionalNullable[EasyInputMessageContentUnion2] = UNSET
phase: OptionalNullable[EasyInputMessagePhaseUnion] = UNSET
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ type: Optional[EasyInputMessageTypeMessage] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["type", "content", "phase"]
+ optional_fields = ["content", "phase", "type"]
nullable_fields = ["content", "phase"]
null_default_fields = []
diff --git a/src/openrouter/components/errorevent.py b/src/openrouter/components/errorevent.py
index 38fb520..83b6cd3 100644
--- a/src/openrouter/components/errorevent.py
+++ b/src/openrouter/components/errorevent.py
@@ -13,25 +13,25 @@ ErrorEventType = Literal["error",]
class ErrorEventTypedDict(TypedDict):
r"""Event emitted when an error occurs during streaming"""
- type: ErrorEventType
code: Nullable[str]
message: str
param: Nullable[str]
- sequence_number: float
+ sequence_number: int
+ type: ErrorEventType
class ErrorEvent(BaseModel):
r"""Event emitted when an error occurs during streaming"""
- type: ErrorEventType
-
code: Nullable[str]
message: str
param: Nullable[str]
- sequence_number: float
+ sequence_number: int
+
+ type: ErrorEventType
@model_serializer(mode="wrap")
def serialize_model(self, handler):
diff --git a/src/openrouter/components/filecitation.py b/src/openrouter/components/filecitation.py
index 265b6eb..7217c30 100644
--- a/src/openrouter/components/filecitation.py
+++ b/src/openrouter/components/filecitation.py
@@ -10,17 +10,17 @@ FileCitationType = Literal["file_citation",]
class FileCitationTypedDict(TypedDict):
- type: FileCitationType
file_id: str
filename: str
- index: float
+ index: int
+ type: FileCitationType
class FileCitation(BaseModel):
- type: FileCitationType
-
file_id: str
filename: str
- index: float
+ index: int
+
+ type: FileCitationType
diff --git a/src/openrouter/components/fileparserplugin.py b/src/openrouter/components/fileparserplugin.py
new file mode 100644
index 0000000..4c88871
--- /dev/null
+++ b/src/openrouter/components/fileparserplugin.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+FileParserPluginID = Literal["file-parser",]
+
+
+class FileParserPluginTypedDict(TypedDict):
+ id: FileParserPluginID
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
+ pdf: NotRequired[PDFParserOptionsTypedDict]
+ r"""Options for PDF parsing."""
+
+
+class FileParserPlugin(BaseModel):
+ id: FileParserPluginID
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
+
+ pdf: Optional[PDFParserOptions] = None
+ r"""Options for PDF parsing."""
diff --git a/src/openrouter/components/filepath.py b/src/openrouter/components/filepath.py
index 3afbce3..fc29881 100644
--- a/src/openrouter/components/filepath.py
+++ b/src/openrouter/components/filepath.py
@@ -10,14 +10,14 @@ FilePathType = Literal["file_path",]
class FilePathTypedDict(TypedDict):
- type: FilePathType
file_id: str
- index: float
+ index: int
+ type: FilePathType
class FilePath(BaseModel):
- type: FilePathType
-
file_id: str
- index: float
+ index: int
+
+ type: FilePathType
diff --git a/src/openrouter/components/filesearchservertool.py b/src/openrouter/components/filesearchservertool.py
index 347f023..54e3cfb 100644
--- a/src/openrouter/components/filesearchservertool.py
+++ b/src/openrouter/components/filesearchservertool.py
@@ -17,9 +17,6 @@ from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-TypeFileSearch = Literal["file_search",]
-
-
FiltersType = Union[
Literal[
"eq",
@@ -47,13 +44,13 @@ Value2TypedDict = TypeAliasType(
Value2 = TypeAliasType("Value2", Union[str, float, bool, List[Value1]])
-class FileSearchServerToolFiltersTypedDict(TypedDict):
+class FiltersTypedDict(TypedDict):
key: str
type: FiltersType
value: Value2TypedDict
-class FileSearchServerToolFilters(BaseModel):
+class Filters(BaseModel):
key: str
type: Annotated[FiltersType, PlainValidator(validate_open_enum(False))]
@@ -61,15 +58,12 @@ class FileSearchServerToolFilters(BaseModel):
value: Value2
-FiltersTypedDict = TypeAliasType(
- "FiltersTypedDict",
- Union[CompoundFilterTypedDict, FileSearchServerToolFiltersTypedDict, Any],
+FiltersUnionTypedDict = TypeAliasType(
+ "FiltersUnionTypedDict", Union[CompoundFilterTypedDict, FiltersTypedDict, Any]
)
-Filters = TypeAliasType(
- "Filters", Union[CompoundFilter, FileSearchServerToolFilters, Any]
-)
+FiltersUnion = TypeAliasType("FiltersUnion", Union[CompoundFilter, Filters, Any])
Ranker = Union[
@@ -94,12 +88,15 @@ class RankingOptions(BaseModel):
score_threshold: Optional[float] = None
+TypeFileSearch = Literal["file_search",]
+
+
class FileSearchServerToolTypedDict(TypedDict):
r"""File search tool configuration"""
type: TypeFileSearch
vector_store_ids: List[str]
- filters: NotRequired[Nullable[FiltersTypedDict]]
+ filters: NotRequired[Nullable[FiltersUnionTypedDict]]
max_num_results: NotRequired[int]
ranking_options: NotRequired[RankingOptionsTypedDict]
@@ -111,7 +108,7 @@ class FileSearchServerTool(BaseModel):
vector_store_ids: List[str]
- filters: OptionalNullable[Filters] = UNSET
+ filters: OptionalNullable[FiltersUnion] = UNSET
max_num_results: Optional[int] = None
diff --git a/src/openrouter/components/formatjsonschemaconfig.py b/src/openrouter/components/formatjsonschemaconfig.py
index 109f115..4a08f89 100644
--- a/src/openrouter/components/formatjsonschemaconfig.py
+++ b/src/openrouter/components/formatjsonschemaconfig.py
@@ -20,9 +20,9 @@ FormatJSONSchemaConfigType = Literal["json_schema",]
class FormatJSONSchemaConfigTypedDict(TypedDict):
r"""JSON schema constrained response format"""
- type: FormatJSONSchemaConfigType
name: str
schema_: Dict[str, Nullable[Any]]
+ type: FormatJSONSchemaConfigType
description: NotRequired[str]
strict: NotRequired[Nullable[bool]]
@@ -30,12 +30,12 @@ class FormatJSONSchemaConfigTypedDict(TypedDict):
class FormatJSONSchemaConfig(BaseModel):
r"""JSON schema constrained response format"""
- type: FormatJSONSchemaConfigType
-
name: str
schema_: Annotated[Dict[str, Nullable[Any]], pydantic.Field(alias="schema")]
+ type: FormatJSONSchemaConfigType
+
description: Optional[str] = None
strict: OptionalNullable[bool] = UNSET
diff --git a/src/openrouter/components/frameimage.py b/src/openrouter/components/frameimage.py
new file mode 100644
index 0000000..9e5aa13
--- /dev/null
+++ b/src/openrouter/components/frameimage.py
@@ -0,0 +1,45 @@
+"""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
+
+
+class FrameImageImageURLTypedDict(TypedDict):
+ url: str
+
+
+class FrameImageImageURL(BaseModel):
+ url: str
+
+
+FrameImageType = Literal["image_url",]
+
+
+FrameType = Union[
+ Literal[
+ "first_frame",
+ "last_frame",
+ ],
+ UnrecognizedStr,
+]
+r"""Whether this image represents the first or last frame of the video"""
+
+
+class FrameImageTypedDict(TypedDict):
+ image_url: FrameImageImageURLTypedDict
+ type: FrameImageType
+ frame_type: FrameType
+ r"""Whether this image represents the first or last frame of the video"""
+
+
+class FrameImage(BaseModel):
+ image_url: FrameImageImageURL
+
+ type: FrameImageType
+
+ frame_type: Annotated[FrameType, PlainValidator(validate_open_enum(False))]
+ r"""Whether this image represents the first or last frame of the video"""
diff --git a/src/openrouter/components/functioncallargsdeltaevent.py b/src/openrouter/components/functioncallargsdeltaevent.py
index b035dc3..a7386aa 100644
--- a/src/openrouter/components/functioncallargsdeltaevent.py
+++ b/src/openrouter/components/functioncallargsdeltaevent.py
@@ -12,22 +12,22 @@ FunctionCallArgsDeltaEventType = Literal["response.function_call_arguments.delta
class FunctionCallArgsDeltaEventTypedDict(TypedDict):
r"""Event emitted when function call arguments are being streamed"""
- type: FunctionCallArgsDeltaEventType
- item_id: str
- output_index: float
delta: str
- sequence_number: float
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: FunctionCallArgsDeltaEventType
class FunctionCallArgsDeltaEvent(BaseModel):
r"""Event emitted when function call arguments are being streamed"""
- type: FunctionCallArgsDeltaEventType
+ delta: str
item_id: str
- output_index: float
+ output_index: int
- delta: str
+ sequence_number: int
- sequence_number: float
+ type: FunctionCallArgsDeltaEventType
diff --git a/src/openrouter/components/functioncallargsdoneevent.py b/src/openrouter/components/functioncallargsdoneevent.py
index 335579b..613c2bb 100644
--- a/src/openrouter/components/functioncallargsdoneevent.py
+++ b/src/openrouter/components/functioncallargsdoneevent.py
@@ -12,25 +12,25 @@ FunctionCallArgsDoneEventType = Literal["response.function_call_arguments.done",
class FunctionCallArgsDoneEventTypedDict(TypedDict):
r"""Event emitted when function call arguments streaming is complete"""
- type: FunctionCallArgsDoneEventType
- item_id: str
- output_index: float
- name: str
arguments: str
- sequence_number: float
+ item_id: str
+ name: str
+ output_index: int
+ sequence_number: int
+ type: FunctionCallArgsDoneEventType
class FunctionCallArgsDoneEvent(BaseModel):
r"""Event emitted when function call arguments streaming is complete"""
- type: FunctionCallArgsDoneEventType
+ arguments: str
item_id: str
- output_index: float
-
name: str
- arguments: str
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: FunctionCallArgsDoneEventType
diff --git a/src/openrouter/components/functioncallitem.py b/src/openrouter/components/functioncallitem.py
index 666d0b0..5f04a05 100644
--- a/src/openrouter/components/functioncallitem.py
+++ b/src/openrouter/components/functioncallitem.py
@@ -1,18 +1,11 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .toolcallstatusenum import ToolCallStatusEnum
-from openrouter.types import (
- BaseModel,
- Nullable,
- OptionalNullable,
- UNSET,
- UNSET_SENTINEL,
-)
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import BaseModel
from openrouter.utils import validate_open_enum
-from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
-from typing import Literal
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -22,57 +15,27 @@ FunctionCallItemType = Literal["function_call",]
class FunctionCallItemTypedDict(TypedDict):
r"""A function call initiated by the model"""
- type: FunctionCallItemType
- call_id: str
- name: str
arguments: str
+ call_id: str
id: str
- status: NotRequired[Nullable[ToolCallStatusEnum]]
+ name: str
+ type: FunctionCallItemType
+ status: NotRequired[ToolCallStatus]
class FunctionCallItem(BaseModel):
r"""A function call initiated by the model"""
- type: FunctionCallItemType
+ arguments: str
call_id: str
- name: str
-
- arguments: str
-
id: str
+ name: str
+
+ type: FunctionCallItemType
+
status: Annotated[
- OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False))
- ] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["status"]
- nullable_fields = ["status"]
- null_default_fields = []
-
- serialized = handler(self)
-
- m = {}
-
- for n, f in type(self).model_fields.items():
- k = f.alias or n
- val = serialized.get(k)
- serialized.pop(k, None)
-
- optional_nullable = k in optional_fields and k in nullable_fields
- is_set = (
- self.__pydantic_fields_set__.intersection({n})
- or k in null_default_fields
- ) # pylint: disable=no-member
-
- if val is not None and val != UNSET_SENTINEL:
- m[k] = val
- elif val != UNSET_SENTINEL and (
- not k in optional_fields or (optional_nullable and is_set)
- ):
- m[k] = val
-
- return m
+ Optional[ToolCallStatus], PlainValidator(validate_open_enum(False))
+ ] = None
diff --git a/src/openrouter/components/functioncalloutputitem.py b/src/openrouter/components/functioncalloutputitem.py
index 5173384..239f67d 100644
--- a/src/openrouter/components/functioncalloutputitem.py
+++ b/src/openrouter/components/functioncalloutputitem.py
@@ -3,7 +3,6 @@
from __future__ import annotations
from .inputfile import InputFile, InputFileTypedDict
from .inputtext import InputText, InputTextTypedDict
-from .toolcallstatusenum import ToolCallStatusEnum
from openrouter.types import (
BaseModel,
Nullable,
@@ -19,12 +18,6 @@ from typing import List, Literal, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-FunctionCallOutputItemTypeFunctionCallOutput = Literal["function_call_output",]
-
-
-OutputType = Literal["input_image",]
-
-
FunctionCallOutputItemDetail = Union[
Literal[
"auto",
@@ -35,23 +28,26 @@ FunctionCallOutputItemDetail = Union[
]
+FunctionCallOutputItemOutputType = Literal["input_image",]
+
+
class OutputInputImageTypedDict(TypedDict):
r"""Image input content item"""
- type: OutputType
detail: FunctionCallOutputItemDetail
+ type: FunctionCallOutputItemOutputType
image_url: NotRequired[Nullable[str]]
class OutputInputImage(BaseModel):
r"""Image input content item"""
- type: OutputType
-
detail: Annotated[
FunctionCallOutputItemDetail, PlainValidator(validate_open_enum(False))
]
+ type: FunctionCallOutputItemOutputType
+
image_url: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
@@ -113,29 +109,43 @@ FunctionCallOutputItemOutputUnion2 = TypeAliasType(
)
+FunctionCallOutputItemStatus = Union[
+ Literal[
+ "in_progress",
+ "completed",
+ "incomplete",
+ ],
+ UnrecognizedStr,
+]
+
+
+FunctionCallOutputItemTypeFunctionCallOutput = Literal["function_call_output",]
+
+
class FunctionCallOutputItemTypedDict(TypedDict):
r"""The output from a function call execution"""
- type: FunctionCallOutputItemTypeFunctionCallOutput
call_id: str
output: FunctionCallOutputItemOutputUnion2TypedDict
+ type: FunctionCallOutputItemTypeFunctionCallOutput
id: NotRequired[Nullable[str]]
- status: NotRequired[Nullable[ToolCallStatusEnum]]
+ status: NotRequired[Nullable[FunctionCallOutputItemStatus]]
class FunctionCallOutputItem(BaseModel):
r"""The output from a function call execution"""
- type: FunctionCallOutputItemTypeFunctionCallOutput
-
call_id: str
output: FunctionCallOutputItemOutputUnion2
+ type: FunctionCallOutputItemTypeFunctionCallOutput
+
id: OptionalNullable[str] = UNSET
status: Annotated[
- OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False))
+ OptionalNullable[FunctionCallOutputItemStatus],
+ PlainValidator(validate_open_enum(False)),
] = UNSET
@model_serializer(mode="wrap")
diff --git a/src/openrouter/components/getguardrailresponse.py b/src/openrouter/components/getguardrailresponse.py
new file mode 100644
index 0000000..6cdeb99
--- /dev/null
+++ b/src/openrouter/components/getguardrailresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrail import Guardrail, GuardrailTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class GetGuardrailResponseTypedDict(TypedDict):
+ data: GuardrailTypedDict
+
+
+class GetGuardrailResponse(BaseModel):
+ data: Guardrail
diff --git a/src/openrouter/components/guardrail.py b/src/openrouter/components/guardrail.py
new file mode 100644
index 0000000..d1c779c
--- /dev/null
+++ b/src/openrouter/components/guardrail.py
@@ -0,0 +1,132 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrailinterval import GuardrailInterval
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class GuardrailTypedDict(TypedDict):
+ created_at: str
+ r"""ISO 8601 timestamp of when the guardrail was created"""
+ id: str
+ r"""Unique identifier for the guardrail"""
+ name: str
+ r"""Name of the guardrail"""
+ 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"""
+ description: NotRequired[Nullable[str]]
+ r"""Description of the guardrail"""
+ enforce_zdr: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention"""
+ ignored_models: NotRequired[Nullable[List[str]]]
+ r"""Array of model canonical_slugs to exclude from routing"""
+ ignored_providers: NotRequired[Nullable[List[str]]]
+ r"""List of provider IDs to exclude from routing"""
+ limit_usd: NotRequired[float]
+ r"""Spending limit in USD"""
+ reset_interval: NotRequired[Nullable[GuardrailInterval]]
+ r"""Interval at which the limit resets (daily, weekly, monthly)"""
+ updated_at: NotRequired[Nullable[str]]
+ r"""ISO 8601 timestamp of when the guardrail was last updated"""
+
+
+class Guardrail(BaseModel):
+ created_at: str
+ r"""ISO 8601 timestamp of when the guardrail was created"""
+
+ id: str
+ r"""Unique identifier for the guardrail"""
+
+ name: str
+ r"""Name of the guardrail"""
+
+ 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"""
+
+ description: OptionalNullable[str] = UNSET
+ r"""Description of the guardrail"""
+
+ enforce_zdr: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention"""
+
+ ignored_models: OptionalNullable[List[str]] = UNSET
+ r"""Array of model canonical_slugs to exclude from routing"""
+
+ ignored_providers: OptionalNullable[List[str]] = UNSET
+ r"""List of provider IDs to exclude from routing"""
+
+ limit_usd: Optional[float] = None
+ r"""Spending limit in USD"""
+
+ reset_interval: Annotated[
+ OptionalNullable[GuardrailInterval], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+ r"""Interval at which the limit resets (daily, weekly, monthly)"""
+
+ updated_at: OptionalNullable[str] = UNSET
+ r"""ISO 8601 timestamp of when the guardrail was last updated"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_models",
+ "allowed_providers",
+ "description",
+ "enforce_zdr",
+ "ignored_models",
+ "ignored_providers",
+ "limit_usd",
+ "reset_interval",
+ "updated_at",
+ ]
+ nullable_fields = [
+ "allowed_models",
+ "allowed_providers",
+ "description",
+ "enforce_zdr",
+ "ignored_models",
+ "ignored_providers",
+ "reset_interval",
+ "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/guardrailinterval.py b/src/openrouter/components/guardrailinterval.py
new file mode 100644
index 0000000..9cdf08a
--- /dev/null
+++ b/src/openrouter/components/guardrailinterval.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
+
+
+GuardrailInterval = Union[
+ Literal[
+ "daily",
+ "weekly",
+ "monthly",
+ ],
+ UnrecognizedStr,
+]
+r"""Interval at which the limit resets (daily, weekly, monthly)"""
diff --git a/src/openrouter/components/imagegencallcompletedevent.py b/src/openrouter/components/imagegencallcompletedevent.py
index 72f0875..06d804a 100644
--- a/src/openrouter/components/imagegencallcompletedevent.py
+++ b/src/openrouter/components/imagegencallcompletedevent.py
@@ -12,19 +12,19 @@ ImageGenCallCompletedEventType = Literal["response.image_generation_call.complet
class ImageGenCallCompletedEventTypedDict(TypedDict):
r"""Image generation call completed"""
- type: ImageGenCallCompletedEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
+ sequence_number: int
+ type: ImageGenCallCompletedEventType
class ImageGenCallCompletedEvent(BaseModel):
r"""Image generation call completed"""
- type: ImageGenCallCompletedEventType
-
item_id: str
- output_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: ImageGenCallCompletedEventType
diff --git a/src/openrouter/components/imagegencallgeneratingevent.py b/src/openrouter/components/imagegencallgeneratingevent.py
index 91842cb..3c9a93e 100644
--- a/src/openrouter/components/imagegencallgeneratingevent.py
+++ b/src/openrouter/components/imagegencallgeneratingevent.py
@@ -12,19 +12,19 @@ ImageGenCallGeneratingEventType = Literal["response.image_generation_call.genera
class ImageGenCallGeneratingEventTypedDict(TypedDict):
r"""Image generation call is generating"""
- type: ImageGenCallGeneratingEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
+ sequence_number: int
+ type: ImageGenCallGeneratingEventType
class ImageGenCallGeneratingEvent(BaseModel):
r"""Image generation call is generating"""
- type: ImageGenCallGeneratingEventType
-
item_id: str
- output_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: ImageGenCallGeneratingEventType
diff --git a/src/openrouter/components/imagegencallinprogressevent.py b/src/openrouter/components/imagegencallinprogressevent.py
index 4b9b612..d26ec37 100644
--- a/src/openrouter/components/imagegencallinprogressevent.py
+++ b/src/openrouter/components/imagegencallinprogressevent.py
@@ -12,19 +12,19 @@ ImageGenCallInProgressEventType = Literal["response.image_generation_call.in_pro
class ImageGenCallInProgressEventTypedDict(TypedDict):
r"""Image generation call in progress"""
- type: ImageGenCallInProgressEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
+ sequence_number: int
+ type: ImageGenCallInProgressEventType
class ImageGenCallInProgressEvent(BaseModel):
r"""Image generation call in progress"""
- type: ImageGenCallInProgressEventType
-
item_id: str
- output_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: ImageGenCallInProgressEventType
diff --git a/src/openrouter/components/imagegencallpartialimageevent.py b/src/openrouter/components/imagegencallpartialimageevent.py
index 8be2e33..5f17d77 100644
--- a/src/openrouter/components/imagegencallpartialimageevent.py
+++ b/src/openrouter/components/imagegencallpartialimageevent.py
@@ -14,25 +14,25 @@ ImageGenCallPartialImageEventType = Literal[
class ImageGenCallPartialImageEventTypedDict(TypedDict):
r"""Image generation call with partial image"""
- type: ImageGenCallPartialImageEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
partial_image_b64: str
- partial_image_index: float
+ partial_image_index: int
+ sequence_number: int
+ type: ImageGenCallPartialImageEventType
class ImageGenCallPartialImageEvent(BaseModel):
r"""Image generation call with partial image"""
- type: ImageGenCallPartialImageEventType
-
item_id: str
- output_index: float
-
- sequence_number: float
+ output_index: int
partial_image_b64: str
- partial_image_index: float
+ partial_image_index: int
+
+ sequence_number: int
+
+ type: ImageGenCallPartialImageEventType
diff --git a/src/openrouter/components/imagegenerationservertool.py b/src/openrouter/components/imagegenerationservertool.py
index 98d9225..1bb3764 100644
--- a/src/openrouter/components/imagegenerationservertool.py
+++ b/src/openrouter/components/imagegenerationservertool.py
@@ -16,9 +16,6 @@ from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
-ImageGenerationServerToolType = Literal["image_generation",]
-
-
Background = Union[
Literal[
"transparent",
@@ -39,15 +36,15 @@ InputFidelity = Union[
class InputImageMaskTypedDict(TypedDict):
- image_url: NotRequired[str]
file_id: NotRequired[str]
+ image_url: NotRequired[str]
class InputImageMask(BaseModel):
- image_url: Optional[str] = None
-
file_id: Optional[str] = None
+ image_url: Optional[str] = None
+
ModelEnum = Union[
Literal[
@@ -99,6 +96,9 @@ Size = Union[
]
+ImageGenerationServerToolType = Literal["image_generation",]
+
+
class ImageGenerationServerToolTypedDict(TypedDict):
r"""Image generation tool configuration"""
@@ -108,9 +108,9 @@ class ImageGenerationServerToolTypedDict(TypedDict):
input_image_mask: NotRequired[InputImageMaskTypedDict]
model: NotRequired[ModelEnum]
moderation: NotRequired[Moderation]
- output_compression: NotRequired[float]
+ output_compression: NotRequired[int]
output_format: NotRequired[OutputFormat]
- partial_images: NotRequired[float]
+ partial_images: NotRequired[int]
quality: NotRequired[Quality]
size: NotRequired[Size]
@@ -138,13 +138,13 @@ class ImageGenerationServerTool(BaseModel):
Optional[Moderation], PlainValidator(validate_open_enum(False))
] = None
- output_compression: Optional[float] = None
+ output_compression: Optional[int] = None
output_format: Annotated[
Optional[OutputFormat], PlainValidator(validate_open_enum(False))
] = None
- partial_images: Optional[float] = None
+ partial_images: Optional[int] = None
quality: Annotated[Optional[Quality], PlainValidator(validate_open_enum(False))] = (
None
diff --git a/src/openrouter/components/inputaudio.py b/src/openrouter/components/inputaudio.py
index 0c0db5e..00e2180 100644
--- a/src/openrouter/components/inputaudio.py
+++ b/src/openrouter/components/inputaudio.py
@@ -9,10 +9,7 @@ from typing import Literal, Union
from typing_extensions import Annotated, TypedDict
-InputAudioType = Literal["input_audio",]
-
-
-InputAudioFormat = Union[
+FormatEnum = Union[
Literal[
"mp3",
"wav",
@@ -23,28 +20,31 @@ InputAudioFormat = Union[
class InputAudioInputAudioTypedDict(TypedDict):
data: str
- format_: InputAudioFormat
+ format_: FormatEnum
class InputAudioInputAudio(BaseModel):
data: str
format_: Annotated[
- Annotated[InputAudioFormat, PlainValidator(validate_open_enum(False))],
+ Annotated[FormatEnum, PlainValidator(validate_open_enum(False))],
pydantic.Field(alias="format"),
]
+InputAudioType = Literal["input_audio",]
+
+
class InputAudioTypedDict(TypedDict):
r"""Audio input content item"""
- type: InputAudioType
input_audio: InputAudioInputAudioTypedDict
+ type: InputAudioType
class InputAudio(BaseModel):
r"""Audio input content item"""
- type: InputAudioType
-
input_audio: InputAudioInputAudio
+
+ type: InputAudioType
diff --git a/src/openrouter/components/inputfile.py b/src/openrouter/components/inputfile.py
index ec4f269..7a6dacd 100644
--- a/src/openrouter/components/inputfile.py
+++ b/src/openrouter/components/inputfile.py
@@ -20,10 +20,10 @@ class InputFileTypedDict(TypedDict):
r"""File input content item"""
type: InputFileType
- file_id: NotRequired[Nullable[str]]
file_data: NotRequired[str]
- filename: NotRequired[str]
+ file_id: NotRequired[Nullable[str]]
file_url: NotRequired[str]
+ filename: NotRequired[str]
class InputFile(BaseModel):
@@ -31,17 +31,17 @@ class InputFile(BaseModel):
type: InputFileType
- file_id: OptionalNullable[str] = UNSET
-
file_data: Optional[str] = None
- filename: Optional[str] = None
+ file_id: OptionalNullable[str] = UNSET
file_url: Optional[str] = None
+ filename: Optional[str] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["file_id", "file_data", "filename", "file_url"]
+ optional_fields = ["file_data", "file_id", "file_url", "filename"]
nullable_fields = ["file_id"]
null_default_fields = []
diff --git a/src/openrouter/components/inputimage.py b/src/openrouter/components/inputimage.py
index 9888ab5..279f76b 100644
--- a/src/openrouter/components/inputimage.py
+++ b/src/openrouter/components/inputimage.py
@@ -16,9 +16,6 @@ from typing import Literal, Union
from typing_extensions import Annotated, NotRequired, TypedDict
-InputImageType = Literal["input_image",]
-
-
InputImageDetail = Union[
Literal[
"auto",
@@ -29,21 +26,24 @@ InputImageDetail = Union[
]
+InputImageType = Literal["input_image",]
+
+
class InputImageTypedDict(TypedDict):
r"""Image input content item"""
- type: InputImageType
detail: InputImageDetail
+ type: InputImageType
image_url: NotRequired[Nullable[str]]
class InputImage(BaseModel):
r"""Image input content item"""
- type: InputImageType
-
detail: Annotated[InputImageDetail, PlainValidator(validate_open_enum(False))]
+ type: InputImageType
+
image_url: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
diff --git a/src/openrouter/components/inputmessageitem.py b/src/openrouter/components/inputmessageitem.py
index 808a7fa..9ee8aab 100644
--- a/src/openrouter/components/inputmessageitem.py
+++ b/src/openrouter/components/inputmessageitem.py
@@ -20,41 +20,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-InputMessageItemTypeMessage = Literal["message",]
-
-
-InputMessageItemRoleDeveloper = Literal["developer",]
-
-
-InputMessageItemRoleSystem = Literal["system",]
-
-
-InputMessageItemRoleUser = Literal["user",]
-
-
-InputMessageItemRoleUnionTypedDict = TypeAliasType(
- "InputMessageItemRoleUnionTypedDict",
- Union[
- InputMessageItemRoleUser,
- InputMessageItemRoleSystem,
- InputMessageItemRoleDeveloper,
- ],
-)
-
-
-InputMessageItemRoleUnion = TypeAliasType(
- "InputMessageItemRoleUnion",
- Union[
- InputMessageItemRoleUser,
- InputMessageItemRoleSystem,
- InputMessageItemRoleDeveloper,
- ],
-)
-
-
-InputMessageItemContentType = Literal["input_image",]
-
-
InputMessageItemDetail = Union[
Literal[
"auto",
@@ -65,21 +30,24 @@ InputMessageItemDetail = Union[
]
+InputMessageItemContentType = Literal["input_image",]
+
+
class InputMessageItemContentInputImageTypedDict(TypedDict):
r"""Image input content item"""
- type: InputMessageItemContentType
detail: InputMessageItemDetail
+ type: InputMessageItemContentType
image_url: NotRequired[Nullable[str]]
class InputMessageItemContentInputImage(BaseModel):
r"""Image input content item"""
- type: InputMessageItemContentType
-
detail: Annotated[InputMessageItemDetail, PlainValidator(validate_open_enum(False))]
+ type: InputMessageItemContentType
+
image_url: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
@@ -137,25 +105,57 @@ InputMessageItemContentUnion = Annotated[
]
+InputMessageItemRoleDeveloper = Literal["developer",]
+
+
+InputMessageItemRoleSystem = Literal["system",]
+
+
+InputMessageItemRoleUser = Literal["user",]
+
+
+InputMessageItemRoleUnionTypedDict = TypeAliasType(
+ "InputMessageItemRoleUnionTypedDict",
+ Union[
+ InputMessageItemRoleUser,
+ InputMessageItemRoleSystem,
+ InputMessageItemRoleDeveloper,
+ ],
+)
+
+
+InputMessageItemRoleUnion = TypeAliasType(
+ "InputMessageItemRoleUnion",
+ Union[
+ InputMessageItemRoleUser,
+ InputMessageItemRoleSystem,
+ InputMessageItemRoleDeveloper,
+ ],
+)
+
+
+InputMessageItemTypeMessage = Literal["message",]
+
+
class InputMessageItemTypedDict(TypedDict):
role: InputMessageItemRoleUnionTypedDict
+ content: NotRequired[Nullable[List[InputMessageItemContentUnionTypedDict]]]
id: NotRequired[str]
type: NotRequired[InputMessageItemTypeMessage]
- content: NotRequired[Nullable[List[InputMessageItemContentUnionTypedDict]]]
class InputMessageItem(BaseModel):
role: InputMessageItemRoleUnion
+ content: OptionalNullable[List[InputMessageItemContentUnion]] = UNSET
+
id: Optional[str] = None
type: Optional[InputMessageItemTypeMessage] = None
- content: OptionalNullable[List[InputMessageItemContentUnion]] = UNSET
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["id", "type", "content"]
+ optional_fields = ["content", "id", "type"]
nullable_fields = ["content"]
null_default_fields = []
diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py
index d846015..723f035 100644
--- a/src/openrouter/components/inputs_union.py
+++ b/src/openrouter/components/inputs_union.py
@@ -25,11 +25,15 @@ from .outputimagegenerationcallitem import (
OutputImageGenerationCallItem,
OutputImageGenerationCallItemTypedDict,
)
-from .outputservertoolitem import OutputServerToolItem, OutputServerToolItemTypedDict
from .outputwebsearchcallitem import (
OutputWebSearchCallItem,
OutputWebSearchCallItemTypedDict,
)
+from .outputwebsearchservertoolitem import (
+ OutputWebSearchServerToolItem,
+ OutputWebSearchServerToolItemTypedDict,
+)
+from .reasoningformat import ReasoningFormat
from .reasoningitem import ReasoningItem, ReasoningItemTypedDict
from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict
from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict
@@ -40,7 +44,6 @@ from openrouter.types import (
OptionalNullable,
UNSET,
UNSET_SENTINEL,
- UnrecognizedStr,
)
from openrouter.utils import get_discriminator, validate_open_enum
import pydantic
@@ -50,9 +53,6 @@ from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-InputsTypeReasoning = Literal["reasoning",]
-
-
InputsStatusInProgress2 = Literal["in_progress",]
@@ -74,60 +74,47 @@ InputsStatusUnion2 = TypeAliasType(
)
-InputsFormat = Union[
- Literal[
- "unknown",
- "openai-responses-v1",
- "azure-openai-responses-v1",
- "xai-responses-v1",
- "anthropic-claude-v1",
- "google-gemini-v1",
- ],
- UnrecognizedStr,
-]
-r"""The format of the reasoning content"""
+InputsTypeReasoning = Literal["reasoning",]
class InputsReasoningTypedDict(TypedDict):
r"""An output item containing reasoning"""
- type: InputsTypeReasoning
id: str
summary: Nullable[List[ReasoningSummaryTextTypedDict]]
+ type: InputsTypeReasoning
content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]]
encrypted_content: NotRequired[Nullable[str]]
status: NotRequired[InputsStatusUnion2TypedDict]
+ format_: NotRequired[Nullable[ReasoningFormat]]
signature: NotRequired[Nullable[str]]
r"""A signature for the reasoning content, used for verification"""
- format_: NotRequired[Nullable[InputsFormat]]
- r"""The format of the reasoning content"""
class InputsReasoning(BaseModel):
r"""An output item containing reasoning"""
- type: InputsTypeReasoning
-
id: str
summary: Nullable[List[ReasoningSummaryText]]
+ type: InputsTypeReasoning
+
content: OptionalNullable[List[ReasoningTextContent]] = UNSET
encrypted_content: OptionalNullable[str] = UNSET
status: Optional[InputsStatusUnion2] = None
- signature: OptionalNullable[str] = UNSET
- r"""A signature for the reasoning content, used for verification"""
-
format_: Annotated[
Annotated[
- OptionalNullable[InputsFormat], PlainValidator(validate_open_enum(False))
+ OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
- r"""The format of the reasoning content"""
+
+ signature: OptionalNullable[str] = UNSET
+ r"""A signature for the reasoning content, used for verification"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
@@ -135,15 +122,15 @@ class InputsReasoning(BaseModel):
"content",
"encrypted_content",
"status",
- "signature",
"format",
+ "signature",
]
nullable_fields = [
"content",
- "summary",
"encrypted_content",
- "signature",
+ "summary",
"format",
+ "signature",
]
null_default_fields = []
@@ -172,33 +159,6 @@ class InputsReasoning(BaseModel):
return m
-InputsRole = Literal["assistant",]
-
-
-InputsTypeMessage = Literal["message",]
-
-
-InputsStatusInProgress1 = Literal["in_progress",]
-
-
-InputsStatusIncomplete1 = Literal["incomplete",]
-
-
-InputsStatusCompleted1 = Literal["completed",]
-
-
-InputsStatusUnion1TypedDict = TypeAliasType(
- "InputsStatusUnion1TypedDict",
- Union[InputsStatusCompleted1, InputsStatusIncomplete1, InputsStatusInProgress1],
-)
-
-
-InputsStatusUnion1 = TypeAliasType(
- "InputsStatusUnion1",
- Union[InputsStatusCompleted1, InputsStatusIncomplete1, InputsStatusInProgress1],
-)
-
-
InputsContent1TypedDict = TypeAliasType(
"InputsContent1TypedDict",
Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict],
@@ -241,37 +201,64 @@ InputsPhaseUnion = TypeAliasType(
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+InputsRole = Literal["assistant",]
+
+
+InputsStatusInProgress1 = Literal["in_progress",]
+
+
+InputsStatusIncomplete1 = Literal["incomplete",]
+
+
+InputsStatusCompleted1 = Literal["completed",]
+
+
+InputsStatusUnion1TypedDict = TypeAliasType(
+ "InputsStatusUnion1TypedDict",
+ Union[InputsStatusCompleted1, InputsStatusIncomplete1, InputsStatusInProgress1],
+)
+
+
+InputsStatusUnion1 = TypeAliasType(
+ "InputsStatusUnion1",
+ Union[InputsStatusCompleted1, InputsStatusIncomplete1, InputsStatusInProgress1],
+)
+
+
+InputsTypeMessage = Literal["message",]
+
+
class InputsMessageTypedDict(TypedDict):
r"""An output message item"""
+ content: Nullable[InputsContent2TypedDict]
id: str
role: InputsRole
type: InputsTypeMessage
- content: Nullable[InputsContent2TypedDict]
- status: NotRequired[InputsStatusUnion1TypedDict]
phase: NotRequired[Nullable[InputsPhaseUnionTypedDict]]
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ status: NotRequired[InputsStatusUnion1TypedDict]
class InputsMessage(BaseModel):
r"""An output message item"""
+ content: Nullable[InputsContent2]
+
id: str
role: InputsRole
type: InputsTypeMessage
- content: Nullable[InputsContent2]
-
- status: Optional[InputsStatusUnion1] = None
-
phase: OptionalNullable[InputsPhaseUnion] = UNSET
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ status: Optional[InputsStatusUnion1] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["status", "phase"]
+ optional_fields = ["phase", "status"]
nullable_fields = ["content", "phase"]
null_default_fields = []
@@ -303,10 +290,10 @@ class InputsMessage(BaseModel):
InputsUnion1TypedDict = TypeAliasType(
"InputsUnion1TypedDict",
Union[
+ OutputWebSearchServerToolItemTypedDict,
OutputWebSearchCallItemTypedDict,
EasyInputMessageTypedDict,
InputMessageItemTypedDict,
- OutputServerToolItemTypedDict,
OutputImageGenerationCallItemTypedDict,
OutputFileSearchCallItemTypedDict,
FunctionCallOutputItemTypedDict,
@@ -323,10 +310,10 @@ InputsUnion1TypedDict = TypeAliasType(
InputsUnion1 = TypeAliasType(
"InputsUnion1",
Union[
+ OutputWebSearchServerToolItem,
OutputWebSearchCallItem,
EasyInputMessage,
InputMessageItem,
- OutputServerToolItem,
OutputImageGenerationCallItem,
OutputFileSearchCallItem,
FunctionCallOutputItem,
diff --git a/src/openrouter/components/inputtext.py b/src/openrouter/components/inputtext.py
index cfc912b..088b756 100644
--- a/src/openrouter/components/inputtext.py
+++ b/src/openrouter/components/inputtext.py
@@ -12,13 +12,13 @@ InputTextType = Literal["input_text",]
class InputTextTypedDict(TypedDict):
r"""Text input content item"""
- type: InputTextType
text: str
+ type: InputTextType
class InputText(BaseModel):
r"""Text input content item"""
- type: InputTextType
-
text: str
+
+ type: InputTextType
diff --git a/src/openrouter/components/keyassignment.py b/src/openrouter/components/keyassignment.py
new file mode 100644
index 0000000..1598e46
--- /dev/null
+++ b/src/openrouter/components/keyassignment.py
@@ -0,0 +1,76 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing_extensions import TypedDict
+
+
+class KeyAssignmentTypedDict(TypedDict):
+ assigned_by: Nullable[str]
+ r"""User ID of who made the assignment"""
+ created_at: str
+ r"""ISO 8601 timestamp of when the assignment was created"""
+ guardrail_id: str
+ r"""ID of the guardrail"""
+ id: str
+ r"""Unique identifier for the assignment"""
+ key_hash: str
+ r"""Hash of the assigned API key"""
+ key_label: str
+ r"""Label of the API key"""
+ key_name: str
+ r"""Name of the API key"""
+
+
+class KeyAssignment(BaseModel):
+ assigned_by: Nullable[str]
+ r"""User ID of who made the assignment"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the assignment was created"""
+
+ guardrail_id: str
+ r"""ID of the guardrail"""
+
+ id: str
+ r"""Unique identifier for the assignment"""
+
+ key_hash: str
+ r"""Hash of the assigned API key"""
+
+ key_label: str
+ r"""Label of the API key"""
+
+ key_name: str
+ r"""Name of the API key"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["assigned_by"]
+ 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/legacy_websearchservertool.py b/src/openrouter/components/legacy_websearchservertool.py
index a04ab37..3b584a9 100644
--- a/src/openrouter/components/legacy_websearchservertool.py
+++ b/src/openrouter/components/legacy_websearchservertool.py
@@ -2,6 +2,8 @@
from __future__ import annotations
from .searchcontextsizeenum import SearchContextSizeEnum
+from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
+from .websearchengineenum import WebSearchEngineEnum
from .websearchuserlocation import WebSearchUserLocation, WebSearchUserLocationTypedDict
from openrouter.types import (
BaseModel,
@@ -9,85 +11,30 @@ from openrouter.types import (
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, Optional, Union
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
LegacyWebSearchServerToolType = Literal["web_search",]
-class LegacyWebSearchServerToolFiltersTypedDict(TypedDict):
- allowed_domains: NotRequired[Nullable[List[str]]]
- excluded_domains: NotRequired[Nullable[List[str]]]
-
-
-class LegacyWebSearchServerToolFilters(BaseModel):
- allowed_domains: OptionalNullable[List[str]] = UNSET
-
- excluded_domains: OptionalNullable[List[str]] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["allowed_domains", "excluded_domains"]
- nullable_fields = ["allowed_domains", "excluded_domains"]
- 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
-
-
-LegacyWebSearchServerToolEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
class LegacyWebSearchServerToolTypedDict(TypedDict):
r"""Web search tool configuration"""
type: LegacyWebSearchServerToolType
- filters: NotRequired[Nullable[LegacyWebSearchServerToolFiltersTypedDict]]
+ 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."""
+ filters: NotRequired[Nullable[WebSearchDomainFilterTypedDict]]
+ 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."""
search_context_size: NotRequired[SearchContextSizeEnum]
r"""Size of the search context for web search tools"""
user_location: NotRequired[Nullable[WebSearchUserLocationTypedDict]]
r"""User location information for web search"""
- engine: NotRequired[LegacyWebSearchServerToolEngine]
- 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."""
- max_results: NotRequired[float]
- 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."""
class LegacyWebSearchServerTool(BaseModel):
@@ -95,7 +42,15 @@ class LegacyWebSearchServerTool(BaseModel):
type: LegacyWebSearchServerToolType
- filters: OptionalNullable[LegacyWebSearchServerToolFilters] = UNSET
+ 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."""
+
+ filters: OptionalNullable[WebSearchDomainFilter] = UNSET
+
+ 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."""
search_context_size: Annotated[
Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False))
@@ -105,23 +60,14 @@ class LegacyWebSearchServerTool(BaseModel):
user_location: OptionalNullable[WebSearchUserLocation] = UNSET
r"""User location information for web search"""
- engine: Annotated[
- Optional[LegacyWebSearchServerToolEngine],
- 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."""
-
- max_results: Optional[float] = 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."""
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "engine",
"filters",
+ "max_results",
"search_context_size",
"user_location",
- "engine",
- "max_results",
]
nullable_fields = ["filters", "user_location"]
null_default_fields = []
diff --git a/src/openrouter/components/listendpointsresponse.py b/src/openrouter/components/listendpointsresponse.py
index f4f947a..de4f121 100644
--- a/src/openrouter/components/listendpointsresponse.py
+++ b/src/openrouter/components/listendpointsresponse.py
@@ -21,6 +21,7 @@ Tokenizer = Union[
"GPT",
"Claude",
"Gemini",
+ "Gemma",
"Grok",
"Cohere",
"Nova",
@@ -43,21 +44,24 @@ r"""Tokenizer type used by the model"""
class ArchitectureTypedDict(TypedDict):
r"""Model architecture information"""
- tokenizer: Nullable[Tokenizer]
+ input_modalities: List[InputModality]
+ r"""Supported input modalities"""
instruct_type: Nullable[InstructType]
r"""Instruction format type"""
modality: Nullable[str]
r"""Primary modality of the model"""
- input_modalities: List[InputModality]
- r"""Supported input modalities"""
output_modalities: List[OutputModality]
r"""Supported output modalities"""
+ tokenizer: Nullable[Tokenizer]
class Architecture(BaseModel):
r"""Model architecture information"""
- tokenizer: Annotated[Nullable[Tokenizer], PlainValidator(validate_open_enum(False))]
+ input_modalities: List[
+ Annotated[InputModality, PlainValidator(validate_open_enum(False))]
+ ]
+ r"""Supported input modalities"""
instruct_type: Annotated[
Nullable[InstructType], PlainValidator(validate_open_enum(False))
@@ -67,20 +71,17 @@ class Architecture(BaseModel):
modality: Nullable[str]
r"""Primary modality of the model"""
- input_modalities: List[
- Annotated[InputModality, PlainValidator(validate_open_enum(False))]
- ]
- r"""Supported input modalities"""
-
output_modalities: List[
Annotated[OutputModality, PlainValidator(validate_open_enum(False))]
]
r"""Supported output modalities"""
+ tokenizer: Annotated[Nullable[Tokenizer], PlainValidator(validate_open_enum(False))]
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = []
- nullable_fields = ["tokenizer", "instruct_type", "modality"]
+ nullable_fields = ["instruct_type", "modality", "tokenizer"]
null_default_fields = []
serialized = handler(self)
@@ -111,35 +112,35 @@ class Architecture(BaseModel):
class ListEndpointsResponseTypedDict(TypedDict):
r"""List of available endpoints for a model"""
+ architecture: ArchitectureTypedDict
+ created: int
+ r"""Unix timestamp of when the model was created"""
+ description: str
+ r"""Description of the model"""
+ endpoints: List[PublicEndpointTypedDict]
+ r"""List of available endpoints for this model"""
id: str
r"""Unique identifier for the model"""
name: str
r"""Display name of the model"""
- created: float
- r"""Unix timestamp of when the model was created"""
- description: str
- r"""Description of the model"""
- architecture: ArchitectureTypedDict
- endpoints: List[PublicEndpointTypedDict]
- r"""List of available endpoints for this model"""
class ListEndpointsResponse(BaseModel):
r"""List of available endpoints for a model"""
- id: str
- r"""Unique identifier for the model"""
+ architecture: Architecture
- name: str
- r"""Display name of the model"""
-
- created: float
+ created: int
r"""Unix timestamp of when the model was created"""
description: str
r"""Description of the model"""
- architecture: Architecture
-
endpoints: List[PublicEndpoint]
r"""List of available endpoints for this model"""
+
+ id: str
+ r"""Unique identifier for the model"""
+
+ name: str
+ r"""Display name of the model"""
diff --git a/src/openrouter/components/listguardrailsresponse.py b/src/openrouter/components/listguardrailsresponse.py
new file mode 100644
index 0000000..c7af7a7
--- /dev/null
+++ b/src/openrouter/components/listguardrailsresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrail import Guardrail, GuardrailTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListGuardrailsResponseTypedDict(TypedDict):
+ data: List[GuardrailTypedDict]
+ r"""List of guardrails"""
+ total_count: int
+ r"""Total number of guardrails"""
+
+
+class ListGuardrailsResponse(BaseModel):
+ data: List[Guardrail]
+ r"""List of guardrails"""
+
+ total_count: int
+ r"""Total number of guardrails"""
diff --git a/src/openrouter/components/listkeyassignmentsresponse.py b/src/openrouter/components/listkeyassignmentsresponse.py
new file mode 100644
index 0000000..2526414
--- /dev/null
+++ b/src/openrouter/components/listkeyassignmentsresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .keyassignment import KeyAssignment, KeyAssignmentTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListKeyAssignmentsResponseTypedDict(TypedDict):
+ data: List[KeyAssignmentTypedDict]
+ r"""List of key assignments"""
+ total_count: int
+ r"""Total number of key assignments for this guardrail"""
+
+
+class ListKeyAssignmentsResponse(BaseModel):
+ data: List[KeyAssignment]
+ r"""List of key assignments"""
+
+ total_count: int
+ r"""Total number of key assignments for this guardrail"""
diff --git a/src/openrouter/components/listmemberassignmentsresponse.py b/src/openrouter/components/listmemberassignmentsresponse.py
new file mode 100644
index 0000000..1497ba3
--- /dev/null
+++ b/src/openrouter/components/listmemberassignmentsresponse.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .memberassignment import MemberAssignment, MemberAssignmentTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class ListMemberAssignmentsResponseTypedDict(TypedDict):
+ data: List[MemberAssignmentTypedDict]
+ r"""List of member assignments"""
+ total_count: int
+ r"""Total number of member assignments"""
+
+
+class ListMemberAssignmentsResponse(BaseModel):
+ data: List[MemberAssignment]
+ r"""List of member assignments"""
+
+ total_count: int
+ r"""Total number of member assignments"""
diff --git a/src/openrouter/components/mcpservertool.py b/src/openrouter/components/mcpservertool.py
index c613dd3..2a2dce0 100644
--- a/src/openrouter/components/mcpservertool.py
+++ b/src/openrouter/components/mcpservertool.py
@@ -13,21 +13,28 @@ from openrouter.utils import validate_open_enum
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Any, Dict, List, Literal, Optional, Union
-from typing_extensions import Annotated, NotRequired, TypedDict
-
-
-McpServerToolType = Literal["mcp",]
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class AllowedToolsTypedDict(TypedDict):
- tool_names: NotRequired[List[str]]
read_only: NotRequired[bool]
+ tool_names: NotRequired[List[str]]
class AllowedTools(BaseModel):
+ read_only: Optional[bool] = None
+
tool_names: Optional[List[str]] = None
- read_only: Optional[bool] = None
+
+AllowedToolsUnionTypedDict = TypeAliasType(
+ "AllowedToolsUnionTypedDict", Union[AllowedToolsTypedDict, List[str], Any]
+)
+
+
+AllowedToolsUnion = TypeAliasType(
+ "AllowedToolsUnion", Union[AllowedTools, List[str], Any]
+)
ConnectorID = Union[
@@ -51,14 +58,6 @@ RequireApprovalNever = Literal["never",]
RequireApprovalAlways = Literal["always",]
-class NeverTypedDict(TypedDict):
- tool_names: NotRequired[List[str]]
-
-
-class Never(BaseModel):
- tool_names: Optional[List[str]] = None
-
-
class AlwaysTypedDict(TypedDict):
tool_names: NotRequired[List[str]]
@@ -67,27 +66,50 @@ class Always(BaseModel):
tool_names: Optional[List[str]] = None
+class NeverTypedDict(TypedDict):
+ tool_names: NotRequired[List[str]]
+
+
+class Never(BaseModel):
+ tool_names: Optional[List[str]] = None
+
+
class RequireApprovalTypedDict(TypedDict):
- never: NotRequired[NeverTypedDict]
always: NotRequired[AlwaysTypedDict]
+ never: NotRequired[NeverTypedDict]
class RequireApproval(BaseModel):
+ always: Optional[Always] = None
+
never: Optional[Never] = None
- always: Optional[Always] = None
+
+RequireApprovalUnionTypedDict = TypeAliasType(
+ "RequireApprovalUnionTypedDict",
+ Union[RequireApprovalTypedDict, RequireApprovalAlways, RequireApprovalNever, Any],
+)
+
+
+RequireApprovalUnion = TypeAliasType(
+ "RequireApprovalUnion",
+ Union[RequireApproval, RequireApprovalAlways, RequireApprovalNever, Any],
+)
+
+
+McpServerToolType = Literal["mcp",]
class McpServerToolTypedDict(TypedDict):
r"""MCP (Model Context Protocol) tool configuration"""
- type: McpServerToolType
server_label: str
- allowed_tools: NotRequired[Nullable[Any]]
+ type: McpServerToolType
+ allowed_tools: NotRequired[Nullable[AllowedToolsUnionTypedDict]]
authorization: NotRequired[str]
connector_id: NotRequired[ConnectorID]
headers: NotRequired[Nullable[Dict[str, str]]]
- require_approval: NotRequired[Nullable[Any]]
+ require_approval: NotRequired[Nullable[RequireApprovalUnionTypedDict]]
server_description: NotRequired[str]
server_url: NotRequired[str]
@@ -95,11 +117,11 @@ class McpServerToolTypedDict(TypedDict):
class McpServerTool(BaseModel):
r"""MCP (Model Context Protocol) tool configuration"""
- type: McpServerToolType
-
server_label: str
- allowed_tools: OptionalNullable[Any] = UNSET
+ type: McpServerToolType
+
+ allowed_tools: OptionalNullable[AllowedToolsUnion] = UNSET
authorization: Optional[str] = None
@@ -109,7 +131,7 @@ class McpServerTool(BaseModel):
headers: OptionalNullable[Dict[str, str]] = UNSET
- require_approval: OptionalNullable[Any] = UNSET
+ require_approval: OptionalNullable[RequireApprovalUnion] = UNSET
server_description: Optional[str] = None
diff --git a/src/openrouter/components/memberassignment.py b/src/openrouter/components/memberassignment.py
new file mode 100644
index 0000000..bf25760
--- /dev/null
+++ b/src/openrouter/components/memberassignment.py
@@ -0,0 +1,71 @@
+"""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_extensions import TypedDict
+
+
+class MemberAssignmentTypedDict(TypedDict):
+ assigned_by: Nullable[str]
+ r"""User ID of who made the assignment"""
+ created_at: str
+ r"""ISO 8601 timestamp of when the assignment was created"""
+ guardrail_id: str
+ r"""ID of the guardrail"""
+ id: str
+ r"""Unique identifier for the assignment"""
+ organization_id: str
+ r"""Organization ID"""
+ user_id: str
+ r"""Clerk user ID of the assigned member"""
+
+
+class MemberAssignment(BaseModel):
+ assigned_by: Nullable[str]
+ r"""User ID of who made the assignment"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the assignment was created"""
+
+ guardrail_id: str
+ r"""ID of the guardrail"""
+
+ id: str
+ r"""Unique identifier for the assignment"""
+
+ organization_id: str
+ r"""Organization ID"""
+
+ user_id: str
+ r"""Clerk user ID of the assigned member"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["assigned_by"]
+ 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/model.py b/src/openrouter/components/model.py
index 256a8d2..b4be94f 100644
--- a/src/openrouter/components/model.py
+++ b/src/openrouter/components/model.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from .defaultparameters import DefaultParameters, DefaultParametersTypedDict
from .modelarchitecture import ModelArchitecture, ModelArchitectureTypedDict
+from .modellinks import ModelLinks, ModelLinksTypedDict
from .parameter import Parameter
from .perrequestlimits import PerRequestLimits, PerRequestLimitsTypedDict
from .publicpricing import PublicPricing, PublicPricingTypedDict
@@ -24,103 +25,107 @@ from typing_extensions import Annotated, NotRequired, TypedDict
class ModelTypedDict(TypedDict):
r"""Information about an AI model available on OpenRouter"""
- id: str
- r"""Unique identifier for the model"""
- canonical_slug: str
- r"""Canonical slug for the model"""
- name: str
- r"""Display name of the model"""
- created: float
- r"""Unix timestamp of when the model was created"""
- pricing: PublicPricingTypedDict
- r"""Pricing information for the model"""
- context_length: Nullable[float]
- r"""Maximum context length in tokens"""
architecture: ModelArchitectureTypedDict
r"""Model architecture information"""
- top_provider: TopProviderInfoTypedDict
- r"""Information about the top provider for this model"""
- per_request_limits: Nullable[PerRequestLimitsTypedDict]
- r"""Per-request token limits"""
- supported_parameters: List[Parameter]
- r"""List of supported parameters for this model"""
+ canonical_slug: str
+ r"""Canonical slug for the model"""
+ context_length: int
+ r"""Maximum context length in tokens"""
+ created: int
+ r"""Unix timestamp of when the model was created"""
default_parameters: Nullable[DefaultParametersTypedDict]
r"""Default parameters for this model"""
- hugging_face_id: NotRequired[Nullable[str]]
- r"""Hugging Face model identifier, if applicable"""
+ id: str
+ r"""Unique identifier for the model"""
+ links: ModelLinksTypedDict
+ r"""Related API endpoints and resources for this model."""
+ name: str
+ r"""Display name of the model"""
+ per_request_limits: Nullable[PerRequestLimitsTypedDict]
+ r"""Per-request token limits"""
+ pricing: PublicPricingTypedDict
+ r"""Pricing information for the model"""
+ supported_parameters: List[Parameter]
+ r"""List of supported parameters for this model"""
+ top_provider: TopProviderInfoTypedDict
+ r"""Information about the top provider for this model"""
description: NotRequired[str]
r"""Description of the model"""
- knowledge_cutoff: NotRequired[Nullable[str]]
- r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
expiration_date: NotRequired[Nullable[str]]
r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."""
+ hugging_face_id: NotRequired[Nullable[str]]
+ r"""Hugging Face model identifier, if applicable"""
+ knowledge_cutoff: NotRequired[Nullable[str]]
+ r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
class Model(BaseModel):
r"""Information about an AI model available on OpenRouter"""
- id: str
- r"""Unique identifier for the model"""
+ architecture: ModelArchitecture
+ r"""Model architecture information"""
canonical_slug: str
r"""Canonical slug for the model"""
+ context_length: int
+ r"""Maximum context length in tokens"""
+
+ created: int
+ r"""Unix timestamp of when the model was created"""
+
+ default_parameters: Nullable[DefaultParameters]
+ r"""Default parameters for this model"""
+
+ id: str
+ r"""Unique identifier for the model"""
+
+ links: ModelLinks
+ r"""Related API endpoints and resources for this model."""
+
name: str
r"""Display name of the model"""
- created: float
- r"""Unix timestamp of when the model was created"""
+ per_request_limits: Nullable[PerRequestLimits]
+ r"""Per-request token limits"""
pricing: PublicPricing
r"""Pricing information for the model"""
- context_length: Nullable[float]
- r"""Maximum context length in tokens"""
-
- architecture: ModelArchitecture
- r"""Model architecture information"""
-
- top_provider: TopProviderInfo
- r"""Information about the top provider for this model"""
-
- per_request_limits: Nullable[PerRequestLimits]
- r"""Per-request token limits"""
-
supported_parameters: List[
Annotated[Parameter, PlainValidator(validate_open_enum(False))]
]
r"""List of supported parameters for this model"""
- default_parameters: Nullable[DefaultParameters]
- r"""Default parameters for this model"""
-
- hugging_face_id: OptionalNullable[str] = UNSET
- r"""Hugging Face model identifier, if applicable"""
+ top_provider: TopProviderInfo
+ r"""Information about the top provider for this model"""
description: Optional[str] = None
r"""Description of the model"""
- knowledge_cutoff: OptionalNullable[str] = UNSET
- r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
-
expiration_date: OptionalNullable[str] = UNSET
r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."""
+ hugging_face_id: OptionalNullable[str] = UNSET
+ r"""Hugging Face model identifier, if applicable"""
+
+ knowledge_cutoff: OptionalNullable[str] = UNSET
+ r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown."""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "hugging_face_id",
"description",
- "knowledge_cutoff",
"expiration_date",
+ "hugging_face_id",
+ "knowledge_cutoff",
]
nullable_fields = [
- "hugging_face_id",
- "context_length",
- "per_request_limits",
"default_parameters",
- "knowledge_cutoff",
"expiration_date",
+ "hugging_face_id",
+ "knowledge_cutoff",
+ "per_request_limits",
]
null_default_fields = []
diff --git a/src/openrouter/components/modelarchitecture.py b/src/openrouter/components/modelarchitecture.py
index 656f0c0..2da26c7 100644
--- a/src/openrouter/components/modelarchitecture.py
+++ b/src/openrouter/components/modelarchitecture.py
@@ -52,48 +52,48 @@ r"""Instruction format type"""
class ModelArchitectureTypedDict(TypedDict):
r"""Model architecture information"""
- modality: Nullable[str]
- r"""Primary modality of the model"""
input_modalities: List[InputModality]
r"""Supported input modalities"""
+ modality: Nullable[str]
+ r"""Primary modality of the model"""
output_modalities: List[OutputModality]
r"""Supported output modalities"""
- tokenizer: NotRequired[ModelGroup]
- r"""Tokenizer type used by the model"""
instruct_type: NotRequired[Nullable[ModelArchitectureInstructType]]
r"""Instruction format type"""
+ tokenizer: NotRequired[ModelGroup]
+ r"""Tokenizer type used by the model"""
class ModelArchitecture(BaseModel):
r"""Model architecture information"""
- modality: Nullable[str]
- r"""Primary modality of the model"""
-
input_modalities: List[
Annotated[InputModality, PlainValidator(validate_open_enum(False))]
]
r"""Supported input modalities"""
+ modality: Nullable[str]
+ r"""Primary modality of the model"""
+
output_modalities: List[
Annotated[OutputModality, PlainValidator(validate_open_enum(False))]
]
r"""Supported output modalities"""
- tokenizer: Annotated[
- Optional[ModelGroup], PlainValidator(validate_open_enum(False))
- ] = None
- r"""Tokenizer type used by the model"""
-
instruct_type: Annotated[
OptionalNullable[ModelArchitectureInstructType],
PlainValidator(validate_open_enum(False)),
] = UNSET
r"""Instruction format type"""
+ tokenizer: Annotated[
+ Optional[ModelGroup], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Tokenizer type used by the model"""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["tokenizer", "instruct_type"]
+ optional_fields = ["instruct_type", "tokenizer"]
nullable_fields = ["instruct_type", "modality"]
null_default_fields = []
diff --git a/src/openrouter/components/modelgroup.py b/src/openrouter/components/modelgroup.py
index ae6ee9e..2491da1 100644
--- a/src/openrouter/components/modelgroup.py
+++ b/src/openrouter/components/modelgroup.py
@@ -13,6 +13,7 @@ ModelGroup = Union[
"GPT",
"Claude",
"Gemini",
+ "Gemma",
"Grok",
"Cohere",
"Nova",
diff --git a/src/openrouter/components/modellinks.py b/src/openrouter/components/modellinks.py
new file mode 100644
index 0000000..c197cb2
--- /dev/null
+++ b/src/openrouter/components/modellinks.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 ModelLinksTypedDict(TypedDict):
+ r"""Related API endpoints and resources for this model."""
+
+ details: str
+ r"""URL for the model details/endpoints API"""
+
+
+class ModelLinks(BaseModel):
+ r"""Related API endpoints and resources for this model."""
+
+ details: str
+ r"""URL for the model details/endpoints API"""
diff --git a/src/openrouter/components/modelscountresponse.py b/src/openrouter/components/modelscountresponse.py
index e80d513..86bb27c 100644
--- a/src/openrouter/components/modelscountresponse.py
+++ b/src/openrouter/components/modelscountresponse.py
@@ -8,14 +8,14 @@ from typing_extensions import TypedDict
class DataTypedDict(TypedDict):
r"""Model count data"""
- count: float
+ count: int
r"""Total number of available models"""
class Data(BaseModel):
r"""Model count data"""
- count: float
+ count: int
r"""Total number of available models"""
diff --git a/src/openrouter/components/moderationplugin.py b/src/openrouter/components/moderationplugin.py
new file mode 100644
index 0000000..c2db9e7
--- /dev/null
+++ b/src/openrouter/components/moderationplugin.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+ModerationPluginID = Literal["moderation",]
+
+
+class ModerationPluginTypedDict(TypedDict):
+ id: ModerationPluginID
+
+
+class ModerationPlugin(BaseModel):
+ id: ModerationPluginID
diff --git a/src/openrouter/components/openairesponsefunctiontoolcall.py b/src/openrouter/components/openairesponsefunctiontoolcall.py
new file mode 100644
index 0000000..f3a4cf7
--- /dev/null
+++ b/src/openrouter/components/openairesponsefunctiontoolcall.py
@@ -0,0 +1,37 @@
+"""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
+
+
+OpenAIResponseFunctionToolCallType = Literal["function_call",]
+
+
+class OpenAIResponseFunctionToolCallTypedDict(TypedDict):
+ arguments: str
+ call_id: str
+ name: str
+ type: OpenAIResponseFunctionToolCallType
+ id: NotRequired[str]
+ status: NotRequired[ToolCallStatus]
+
+
+class OpenAIResponseFunctionToolCall(BaseModel):
+ arguments: str
+
+ call_id: str
+
+ name: str
+
+ type: OpenAIResponseFunctionToolCallType
+
+ id: Optional[str] = None
+
+ status: Annotated[
+ Optional[ToolCallStatus], PlainValidator(validate_open_enum(False))
+ ] = None
diff --git a/src/openrouter/components/openairesponsefunctiontoolcalloutput.py b/src/openrouter/components/openairesponsefunctiontoolcalloutput.py
new file mode 100644
index 0000000..491f3fa
--- /dev/null
+++ b/src/openrouter/components/openairesponsefunctiontoolcalloutput.py
@@ -0,0 +1,113 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .inputfile import InputFile, InputFileTypedDict
+from .inputimage import InputImage, InputImageTypedDict
+from .inputtext import InputText, InputTextTypedDict
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import get_discriminator, validate_open_enum
+from pydantic import Discriminator, Tag, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+OpenAIResponseFunctionToolCallOutputOutput1TypedDict = TypeAliasType(
+ "OpenAIResponseFunctionToolCallOutputOutput1TypedDict",
+ Union[InputTextTypedDict, InputImageTypedDict, InputFileTypedDict],
+)
+
+
+OpenAIResponseFunctionToolCallOutputOutput1 = Annotated[
+ Union[
+ Annotated[InputFile, Tag("input_file")],
+ Annotated[InputImage, Tag("input_image")],
+ Annotated[InputText, Tag("input_text")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+OpenAIResponseFunctionToolCallOutputOutput2TypedDict = TypeAliasType(
+ "OpenAIResponseFunctionToolCallOutputOutput2TypedDict",
+ Union[str, List[OpenAIResponseFunctionToolCallOutputOutput1TypedDict]],
+)
+
+
+OpenAIResponseFunctionToolCallOutputOutput2 = TypeAliasType(
+ "OpenAIResponseFunctionToolCallOutputOutput2",
+ Union[str, List[OpenAIResponseFunctionToolCallOutputOutput1]],
+)
+
+
+OpenAIResponseFunctionToolCallOutputStatus = Union[
+ Literal[
+ "in_progress",
+ "completed",
+ "incomplete",
+ ],
+ UnrecognizedStr,
+]
+
+
+OpenAIResponseFunctionToolCallOutputType = Literal["function_call_output",]
+
+
+class OpenAIResponseFunctionToolCallOutputTypedDict(TypedDict):
+ call_id: str
+ output: OpenAIResponseFunctionToolCallOutputOutput2TypedDict
+ type: OpenAIResponseFunctionToolCallOutputType
+ id: NotRequired[Nullable[str]]
+ status: NotRequired[Nullable[OpenAIResponseFunctionToolCallOutputStatus]]
+
+
+class OpenAIResponseFunctionToolCallOutput(BaseModel):
+ call_id: str
+
+ output: OpenAIResponseFunctionToolCallOutputOutput2
+
+ type: OpenAIResponseFunctionToolCallOutputType
+
+ id: OptionalNullable[str] = UNSET
+
+ status: Annotated[
+ OptionalNullable[OpenAIResponseFunctionToolCallOutputStatus],
+ PlainValidator(validate_open_enum(False)),
+ ] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["id", "status"]
+ nullable_fields = ["id", "status"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/openairesponseinputmessageitem.py b/src/openrouter/components/openairesponseinputmessageitem.py
new file mode 100644
index 0000000..5aedf6b
--- /dev/null
+++ b/src/openrouter/components/openairesponseinputmessageitem.py
@@ -0,0 +1,80 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .inputaudio import InputAudio, InputAudioTypedDict
+from .inputfile import InputFile, InputFileTypedDict
+from .inputimage import InputImage, InputImageTypedDict
+from .inputtext import InputText, InputTextTypedDict
+from openrouter.types import BaseModel
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+OpenAIResponseInputMessageItemContentTypedDict = TypeAliasType(
+ "OpenAIResponseInputMessageItemContentTypedDict",
+ Union[
+ InputTextTypedDict, InputAudioTypedDict, InputImageTypedDict, InputFileTypedDict
+ ],
+)
+
+
+OpenAIResponseInputMessageItemContent = Annotated[
+ Union[
+ Annotated[InputAudio, Tag("input_audio")],
+ Annotated[InputFile, Tag("input_file")],
+ Annotated[InputImage, Tag("input_image")],
+ Annotated[InputText, Tag("input_text")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+OpenAIResponseInputMessageItemRoleDeveloper = Literal["developer",]
+
+
+OpenAIResponseInputMessageItemRoleSystem = Literal["system",]
+
+
+OpenAIResponseInputMessageItemRoleUser = Literal["user",]
+
+
+OpenAIResponseInputMessageItemRoleUnionTypedDict = TypeAliasType(
+ "OpenAIResponseInputMessageItemRoleUnionTypedDict",
+ Union[
+ OpenAIResponseInputMessageItemRoleUser,
+ OpenAIResponseInputMessageItemRoleSystem,
+ OpenAIResponseInputMessageItemRoleDeveloper,
+ ],
+)
+
+
+OpenAIResponseInputMessageItemRoleUnion = TypeAliasType(
+ "OpenAIResponseInputMessageItemRoleUnion",
+ Union[
+ OpenAIResponseInputMessageItemRoleUser,
+ OpenAIResponseInputMessageItemRoleSystem,
+ OpenAIResponseInputMessageItemRoleDeveloper,
+ ],
+)
+
+
+OpenAIResponseInputMessageItemType = Literal["message",]
+
+
+class OpenAIResponseInputMessageItemTypedDict(TypedDict):
+ content: List[OpenAIResponseInputMessageItemContentTypedDict]
+ id: str
+ role: OpenAIResponseInputMessageItemRoleUnionTypedDict
+ type: NotRequired[OpenAIResponseInputMessageItemType]
+
+
+class OpenAIResponseInputMessageItem(BaseModel):
+ content: List[OpenAIResponseInputMessageItemContent]
+
+ id: str
+
+ role: OpenAIResponseInputMessageItemRoleUnion
+
+ type: Optional[OpenAIResponseInputMessageItemType] = None
diff --git a/src/openrouter/components/openairesponsesrefusalcontent.py b/src/openrouter/components/openairesponsesrefusalcontent.py
index 9500782..3273a6d 100644
--- a/src/openrouter/components/openairesponsesrefusalcontent.py
+++ b/src/openrouter/components/openairesponsesrefusalcontent.py
@@ -10,11 +10,11 @@ OpenAIResponsesRefusalContentType = Literal["refusal",]
class OpenAIResponsesRefusalContentTypedDict(TypedDict):
- type: OpenAIResponsesRefusalContentType
refusal: str
+ type: OpenAIResponsesRefusalContentType
class OpenAIResponsesRefusalContent(BaseModel):
- type: OpenAIResponsesRefusalContentType
-
refusal: str
+
+ type: OpenAIResponsesRefusalContentType
diff --git a/src/openrouter/components/openairesponsestoolchoice_union.py b/src/openrouter/components/openairesponsestoolchoice_union.py
index 5db29bb..cca8c5f 100644
--- a/src/openrouter/components/openairesponsestoolchoice_union.py
+++ b/src/openrouter/components/openairesponsestoolchoice_union.py
@@ -1,6 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .toolchoiceallowed import ToolChoiceAllowed, ToolChoiceAllowedTypedDict
from openrouter.types import BaseModel
from typing import Literal, Union
from typing_extensions import TypeAliasType, TypedDict
@@ -44,15 +45,15 @@ OpenAIResponsesToolChoiceTypeFunction = Literal["function",]
class OpenAIResponsesToolChoiceFunctionTypedDict(TypedDict):
- type: OpenAIResponsesToolChoiceTypeFunction
name: str
+ type: OpenAIResponsesToolChoiceTypeFunction
class OpenAIResponsesToolChoiceFunction(BaseModel):
- type: OpenAIResponsesToolChoiceTypeFunction
-
name: str
+ type: OpenAIResponsesToolChoiceTypeFunction
+
OpenAIResponsesToolChoiceRequired = Literal["required",]
@@ -68,6 +69,7 @@ OpenAIResponsesToolChoiceUnionTypedDict = TypeAliasType(
Union[
OpenAIResponsesToolChoiceTypedDict,
OpenAIResponsesToolChoiceFunctionTypedDict,
+ ToolChoiceAllowedTypedDict,
OpenAIResponsesToolChoiceAuto,
OpenAIResponsesToolChoiceNone,
OpenAIResponsesToolChoiceRequired,
@@ -80,6 +82,7 @@ OpenAIResponsesToolChoiceUnion = TypeAliasType(
Union[
OpenAIResponsesToolChoice,
OpenAIResponsesToolChoiceFunction,
+ ToolChoiceAllowed,
OpenAIResponsesToolChoiceAuto,
OpenAIResponsesToolChoiceNone,
OpenAIResponsesToolChoiceRequired,
diff --git a/src/openrouter/components/openresponsescreatedevent.py b/src/openrouter/components/openresponsescreatedevent.py
new file mode 100644
index 0000000..2a125a5
--- /dev/null
+++ b/src/openrouter/components/openresponsescreatedevent.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+OpenResponsesCreatedEventType = Literal["response.created",]
+
+
+class OpenResponsesCreatedEventTypedDict(TypedDict):
+ r"""Event emitted when a response is created"""
+
+ response: OpenResponsesResultTypedDict
+ r"""Complete non-streaming response from the Responses API"""
+ sequence_number: int
+ type: OpenResponsesCreatedEventType
+
+
+class OpenResponsesCreatedEvent(BaseModel):
+ r"""Event emitted when a response is created"""
+
+ response: OpenResponsesResult
+ r"""Complete non-streaming response from the Responses API"""
+
+ sequence_number: int
+
+ type: OpenResponsesCreatedEventType
diff --git a/src/openrouter/components/openresponsesinprogressevent.py b/src/openrouter/components/openresponsesinprogressevent.py
new file mode 100644
index 0000000..08d990d
--- /dev/null
+++ b/src/openrouter/components/openresponsesinprogressevent.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+OpenResponsesInProgressEventType = Literal["response.in_progress",]
+
+
+class OpenResponsesInProgressEventTypedDict(TypedDict):
+ r"""Event emitted when a response is in progress"""
+
+ response: OpenResponsesResultTypedDict
+ r"""Complete non-streaming response from the Responses API"""
+ sequence_number: int
+ type: OpenResponsesInProgressEventType
+
+
+class OpenResponsesInProgressEvent(BaseModel):
+ r"""Event emitted when a response is in progress"""
+
+ response: OpenResponsesResult
+ r"""Complete non-streaming response from the Responses API"""
+
+ sequence_number: int
+
+ type: OpenResponsesInProgressEventType
diff --git a/src/openrouter/components/openresponsesresult.py b/src/openrouter/components/openresponsesresult.py
index 7d7ae0a..1a56517 100644
--- a/src/openrouter/components/openresponsesresult.py
+++ b/src/openrouter/components/openresponsesresult.py
@@ -40,7 +40,7 @@ from .responseserrorfield import ResponsesErrorField, ResponsesErrorFieldTypedDi
from .shellservertool import ShellServerTool, ShellServerToolTypedDict
from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict
from .textconfig import TextConfig, TextConfigTypedDict
-from .truncationenum import TruncationEnum
+from .truncation import Truncation
from .usage import Usage, UsageTypedDict
from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict
from openrouter.types import (
@@ -66,9 +66,9 @@ OpenResponsesResultType = Literal["function",]
class OpenResponsesResultToolFunctionTypedDict(TypedDict):
r"""Function tool definition"""
- type: OpenResponsesResultType
name: str
parameters: Nullable[Dict[str, Nullable[Any]]]
+ type: OpenResponsesResultType
description: NotRequired[Nullable[str]]
strict: NotRequired[Nullable[bool]]
@@ -76,12 +76,12 @@ class OpenResponsesResultToolFunctionTypedDict(TypedDict):
class OpenResponsesResultToolFunction(BaseModel):
r"""Function tool definition"""
- type: OpenResponsesResultType
-
name: str
parameters: Nullable[Dict[str, Nullable[Any]]]
+ type: OpenResponsesResultType
+
description: OptionalNullable[str] = UNSET
strict: OptionalNullable[bool] = UNSET
@@ -89,7 +89,7 @@ class OpenResponsesResultToolFunction(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["description", "strict"]
- nullable_fields = ["description", "strict", "parameters"]
+ nullable_fields = ["description", "parameters", "strict"]
null_default_fields = []
serialized = handler(self)
@@ -164,167 +164,160 @@ OpenResponsesResultToolUnion = Annotated[
class OpenResponsesResultTypedDict(TypedDict):
r"""Complete non-streaming response from the Responses API"""
- id: str
- object: OpenResponsesResultObject
- created_at: float
- model: str
- status: OpenAIResponsesResponseStatus
- completed_at: Nullable[float]
- output: List[OutputItemsTypedDict]
+ completed_at: int
+ created_at: int
error: Nullable[ResponsesErrorFieldTypedDict]
r"""Error information returned from the API"""
+ frequency_penalty: float
+ id: str
incomplete_details: Nullable[IncompleteDetailsTypedDict]
- temperature: Nullable[float]
- top_p: Nullable[float]
- presence_penalty: Nullable[float]
- frequency_penalty: Nullable[float]
instructions: Nullable[BaseInputsUnionTypedDict]
metadata: Nullable[Dict[str, str]]
r"""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."""
- tools: List[OpenResponsesResultToolUnionTypedDict]
- tool_choice: OpenAIResponsesToolChoiceUnionTypedDict
+ model: str
+ object: OpenResponsesResultObject
+ output: List[OutputItemsTypedDict]
parallel_tool_calls: bool
- user: NotRequired[Nullable[str]]
- output_text: NotRequired[str]
- prompt_cache_key: NotRequired[Nullable[str]]
- safety_identifier: NotRequired[Nullable[str]]
- usage: NotRequired[Nullable[UsageTypedDict]]
- r"""Token usage information for the response"""
- max_tool_calls: NotRequired[Nullable[float]]
- top_logprobs: NotRequired[float]
- max_output_tokens: NotRequired[Nullable[float]]
- prompt: NotRequired[Nullable[StoredPromptTemplateTypedDict]]
+ presence_penalty: float
+ status: OpenAIResponsesResponseStatus
+ temperature: float
+ tool_choice: OpenAIResponsesToolChoiceUnionTypedDict
+ tools: List[OpenResponsesResultToolUnionTypedDict]
+ top_p: float
background: NotRequired[Nullable[bool]]
+ max_output_tokens: NotRequired[int]
+ max_tool_calls: NotRequired[int]
+ output_text: NotRequired[str]
previous_response_id: NotRequired[Nullable[str]]
+ prompt: NotRequired[Nullable[StoredPromptTemplateTypedDict]]
+ prompt_cache_key: NotRequired[Nullable[str]]
reasoning: NotRequired[Nullable[BaseReasoningConfigTypedDict]]
+ safety_identifier: NotRequired[Nullable[str]]
service_tier: NotRequired[Nullable[str]]
store: NotRequired[bool]
- truncation: NotRequired[Nullable[TruncationEnum]]
text: NotRequired[TextConfigTypedDict]
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]]
class OpenResponsesResult(BaseModel):
r"""Complete non-streaming response from the Responses API"""
- id: str
+ completed_at: int
- object: OpenResponsesResultObject
-
- created_at: float
-
- model: str
-
- status: Annotated[
- OpenAIResponsesResponseStatus, PlainValidator(validate_open_enum(False))
- ]
-
- completed_at: Nullable[float]
-
- output: List[OutputItems]
+ created_at: int
error: Nullable[ResponsesErrorField]
r"""Error information returned from the API"""
+ frequency_penalty: float
+
+ id: str
+
incomplete_details: Nullable[IncompleteDetails]
- temperature: Nullable[float]
-
- top_p: Nullable[float]
-
- presence_penalty: Nullable[float]
-
- frequency_penalty: Nullable[float]
-
instructions: Nullable[BaseInputsUnion]
metadata: Nullable[Dict[str, str]]
r"""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."""
- tools: List[OpenResponsesResultToolUnion]
+ model: str
- tool_choice: OpenAIResponsesToolChoiceUnion
+ object: OpenResponsesResultObject
+
+ output: List[OutputItems]
parallel_tool_calls: bool
- user: OptionalNullable[str] = UNSET
+ presence_penalty: float
- output_text: Optional[str] = None
+ status: Annotated[
+ OpenAIResponsesResponseStatus, PlainValidator(validate_open_enum(False))
+ ]
- prompt_cache_key: OptionalNullable[str] = UNSET
+ temperature: float
- safety_identifier: OptionalNullable[str] = UNSET
+ tool_choice: OpenAIResponsesToolChoiceUnion
- usage: OptionalNullable[Usage] = UNSET
- r"""Token usage information for the response"""
+ tools: List[OpenResponsesResultToolUnion]
- max_tool_calls: OptionalNullable[float] = UNSET
-
- top_logprobs: Optional[float] = None
-
- max_output_tokens: OptionalNullable[float] = UNSET
-
- prompt: OptionalNullable[StoredPromptTemplate] = UNSET
+ top_p: float
background: OptionalNullable[bool] = UNSET
+ max_output_tokens: Optional[int] = None
+
+ max_tool_calls: Optional[int] = None
+
+ output_text: Optional[str] = None
+
previous_response_id: OptionalNullable[str] = UNSET
+ prompt: OptionalNullable[StoredPromptTemplate] = UNSET
+
+ prompt_cache_key: OptionalNullable[str] = UNSET
+
reasoning: OptionalNullable[BaseReasoningConfig] = UNSET
+ safety_identifier: OptionalNullable[str] = UNSET
+
service_tier: OptionalNullable[str] = UNSET
store: Optional[bool] = None
- truncation: Annotated[
- OptionalNullable[TruncationEnum], PlainValidator(validate_open_enum(False))
- ] = UNSET
-
text: Optional[TextConfig] = None
r"""Text output configuration including format and verbosity"""
+ top_logprobs: Optional[int] = None
+
+ truncation: Annotated[
+ OptionalNullable[Truncation], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+
+ usage: OptionalNullable[Usage] = UNSET
+ r"""Token usage information for the response"""
+
+ user: OptionalNullable[str] = UNSET
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "user",
- "output_text",
- "prompt_cache_key",
- "safety_identifier",
- "usage",
- "max_tool_calls",
- "top_logprobs",
- "max_output_tokens",
- "prompt",
"background",
+ "max_output_tokens",
+ "max_tool_calls",
+ "output_text",
"previous_response_id",
+ "prompt",
+ "prompt_cache_key",
"reasoning",
+ "safety_identifier",
"service_tier",
"store",
- "truncation",
"text",
+ "top_logprobs",
+ "truncation",
+ "usage",
+ "user",
]
nullable_fields = [
- "completed_at",
- "user",
- "prompt_cache_key",
- "safety_identifier",
+ "background",
"error",
"incomplete_details",
- "usage",
- "max_tool_calls",
- "max_output_tokens",
- "temperature",
- "top_p",
- "presence_penalty",
- "frequency_penalty",
"instructions",
"metadata",
- "prompt",
- "background",
"previous_response_id",
+ "prompt",
+ "prompt_cache_key",
"reasoning",
+ "safety_identifier",
"service_tier",
"truncation",
+ "usage",
+ "user",
]
null_default_fields = []
diff --git a/src/openrouter/components/openrouterwebsearchservertool.py b/src/openrouter/components/openrouterwebsearchservertool.py
new file mode 100644
index 0000000..0f83d44
--- /dev/null
+++ b/src/openrouter/components/openrouterwebsearchservertool.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .websearchconfig import WebSearchConfig, WebSearchConfigTypedDict
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+OpenRouterWebSearchServerToolType = Literal["openrouter:web_search",]
+
+
+class OpenRouterWebSearchServerToolTypedDict(TypedDict):
+ r"""OpenRouter built-in server tool: searches the web for current information"""
+
+ type: OpenRouterWebSearchServerToolType
+ parameters: NotRequired[WebSearchConfigTypedDict]
+
+
+class OpenRouterWebSearchServerTool(BaseModel):
+ r"""OpenRouter built-in server tool: searches the web for current information"""
+
+ type: OpenRouterWebSearchServerToolType
+
+ parameters: Optional[WebSearchConfig] = None
diff --git a/src/openrouter/components/outputapplypatchservertoolitem.py b/src/openrouter/components/outputapplypatchservertoolitem.py
new file mode 100644
index 0000000..5b2be1e
--- /dev/null
+++ b/src/openrouter/components/outputapplypatchservertoolitem.py
@@ -0,0 +1,37 @@
+"""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
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputApplyPatchServerToolItemType = Literal["openrouter:apply_patch",]
+
+
+class OutputApplyPatchServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:apply_patch server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputApplyPatchServerToolItemType
+ file_path: NotRequired[str]
+ id: NotRequired[str]
+ patch: NotRequired[str]
+
+
+class OutputApplyPatchServerToolItem(BaseModel):
+ r"""An openrouter:apply_patch server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputApplyPatchServerToolItemType
+
+ file_path: Annotated[Optional[str], pydantic.Field(alias="filePath")] = None
+
+ id: Optional[str] = None
+
+ patch: Optional[str] = None
diff --git a/src/openrouter/components/outputbashservertoolitem.py b/src/openrouter/components/outputbashservertoolitem.py
new file mode 100644
index 0000000..2b9fe18
--- /dev/null
+++ b/src/openrouter/components/outputbashservertoolitem.py
@@ -0,0 +1,43 @@
+"""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
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputBashServerToolItemType = Literal["openrouter:bash",]
+
+
+class OutputBashServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:bash server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputBashServerToolItemType
+ command: NotRequired[str]
+ exit_code: NotRequired[int]
+ id: NotRequired[str]
+ stderr: NotRequired[str]
+ stdout: NotRequired[str]
+
+
+class OutputBashServerToolItem(BaseModel):
+ r"""An openrouter:bash server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputBashServerToolItemType
+
+ command: Optional[str] = None
+
+ exit_code: Annotated[Optional[int], pydantic.Field(alias="exitCode")] = None
+
+ id: Optional[str] = None
+
+ stderr: Optional[str] = None
+
+ stdout: Optional[str] = None
diff --git a/src/openrouter/components/outputbrowseruseservertoolitem.py b/src/openrouter/components/outputbrowseruseservertoolitem.py
new file mode 100644
index 0000000..4e7aac5
--- /dev/null
+++ b/src/openrouter/components/outputbrowseruseservertoolitem.py
@@ -0,0 +1,39 @@
+"""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
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputBrowserUseServerToolItemType = Literal["openrouter:browser_use",]
+
+
+class OutputBrowserUseServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:browser_use server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputBrowserUseServerToolItemType
+ action: NotRequired[str]
+ id: NotRequired[str]
+ screenshot_b64: NotRequired[str]
+
+
+class OutputBrowserUseServerToolItem(BaseModel):
+ r"""An openrouter:browser_use server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputBrowserUseServerToolItemType
+
+ action: Optional[str] = None
+
+ id: Optional[str] = None
+
+ screenshot_b64: Annotated[Optional[str], pydantic.Field(alias="screenshotB64")] = (
+ None
+ )
diff --git a/src/openrouter/components/outputcodeinterpretercallitem.py b/src/openrouter/components/outputcodeinterpretercallitem.py
new file mode 100644
index 0000000..a2363f9
--- /dev/null
+++ b/src/openrouter/components/outputcodeinterpretercallitem.py
@@ -0,0 +1,110 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.utils import get_discriminator, validate_open_enum
+from pydantic import Discriminator, Tag, model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Union
+from typing_extensions import Annotated, TypeAliasType, TypedDict
+
+
+TypeLogs = Literal["logs",]
+
+
+class OutputLogsTypedDict(TypedDict):
+ logs: str
+ type: TypeLogs
+
+
+class OutputLogs(BaseModel):
+ logs: str
+
+ type: TypeLogs
+
+
+TypeImage = Literal["image",]
+
+
+class OutputImageTypedDict(TypedDict):
+ type: TypeImage
+ url: str
+
+
+class OutputImage(BaseModel):
+ type: TypeImage
+
+ url: str
+
+
+OutputCodeInterpreterCallItemOutputUnionTypedDict = TypeAliasType(
+ "OutputCodeInterpreterCallItemOutputUnionTypedDict",
+ Union[OutputImageTypedDict, OutputLogsTypedDict],
+)
+
+
+OutputCodeInterpreterCallItemOutputUnion = Annotated[
+ Union[Annotated[OutputImage, Tag("image")], Annotated[OutputLogs, Tag("logs")]],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+
+
+TypeCodeInterpreterCall = Literal["code_interpreter_call",]
+
+
+class OutputCodeInterpreterCallItemTypedDict(TypedDict):
+ r"""A code interpreter execution call with outputs"""
+
+ code: Nullable[str]
+ container_id: str
+ id: str
+ outputs: Nullable[List[OutputCodeInterpreterCallItemOutputUnionTypedDict]]
+ status: ToolCallStatus
+ type: TypeCodeInterpreterCall
+
+
+class OutputCodeInterpreterCallItem(BaseModel):
+ r"""A code interpreter execution call with outputs"""
+
+ code: Nullable[str]
+
+ container_id: str
+
+ id: str
+
+ outputs: Nullable[List[OutputCodeInterpreterCallItemOutputUnion]]
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: TypeCodeInterpreterCall
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["code", "outputs"]
+ 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/outputcodeinterpreterservertoolitem.py b/src/openrouter/components/outputcodeinterpreterservertoolitem.py
new file mode 100644
index 0000000..50a002f
--- /dev/null
+++ b/src/openrouter/components/outputcodeinterpreterservertoolitem.py
@@ -0,0 +1,46 @@
+"""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
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputCodeInterpreterServerToolItemType = Literal["openrouter:code_interpreter",]
+
+
+class OutputCodeInterpreterServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:code_interpreter server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputCodeInterpreterServerToolItemType
+ code: NotRequired[str]
+ exit_code: NotRequired[int]
+ id: NotRequired[str]
+ language: NotRequired[str]
+ stderr: NotRequired[str]
+ stdout: NotRequired[str]
+
+
+class OutputCodeInterpreterServerToolItem(BaseModel):
+ r"""An openrouter:code_interpreter server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputCodeInterpreterServerToolItemType
+
+ code: Optional[str] = None
+
+ exit_code: Annotated[Optional[int], pydantic.Field(alias="exitCode")] = None
+
+ id: Optional[str] = None
+
+ language: Optional[str] = None
+
+ stderr: Optional[str] = None
+
+ stdout: Optional[str] = None
diff --git a/src/openrouter/components/outputcomputercallitem.py b/src/openrouter/components/outputcomputercallitem.py
new file mode 100644
index 0000000..6d1009d
--- /dev/null
+++ b/src/openrouter/components/outputcomputercallitem.py
@@ -0,0 +1,98 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class PendingSafetyCheckTypedDict(TypedDict):
+ code: str
+ id: str
+ message: str
+
+
+class PendingSafetyCheck(BaseModel):
+ code: str
+
+ id: str
+
+ message: str
+
+
+OutputComputerCallItemStatus = Union[
+ Literal[
+ "completed",
+ "incomplete",
+ "in_progress",
+ ],
+ UnrecognizedStr,
+]
+
+
+OutputComputerCallItemType = Literal["computer_call",]
+
+
+class OutputComputerCallItemTypedDict(TypedDict):
+ call_id: str
+ pending_safety_checks: List[PendingSafetyCheckTypedDict]
+ status: OutputComputerCallItemStatus
+ type: OutputComputerCallItemType
+ action: NotRequired[Nullable[Any]]
+ id: NotRequired[str]
+
+
+class OutputComputerCallItem(BaseModel):
+ call_id: str
+
+ pending_safety_checks: List[PendingSafetyCheck]
+
+ status: Annotated[
+ OutputComputerCallItemStatus, PlainValidator(validate_open_enum(False))
+ ]
+
+ type: OutputComputerCallItemType
+
+ action: OptionalNullable[Any] = UNSET
+
+ id: Optional[str] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["action", "id"]
+ nullable_fields = ["action"]
+ 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/outputdatetimeitem.py b/src/openrouter/components/outputdatetimeitem.py
index d11192e..e84df92 100644
--- a/src/openrouter/components/outputdatetimeitem.py
+++ b/src/openrouter/components/outputdatetimeitem.py
@@ -1,51 +1,40 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, UnrecognizedStr
+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, Union
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
OutputDatetimeItemType = Literal["openrouter:datetime",]
-OutputDatetimeItemStatus = Union[
- Literal[
- "completed",
- "in_progress",
- "incomplete",
- ],
- UnrecognizedStr,
-]
-
-
class OutputDatetimeItemTypedDict(TypedDict):
r"""An openrouter:datetime server tool output item"""
- type: OutputDatetimeItemType
- status: OutputDatetimeItemStatus
datetime: str
r"""ISO 8601 datetime string"""
+ status: ToolCallStatus
timezone: str
r"""IANA timezone name"""
+ type: OutputDatetimeItemType
id: NotRequired[str]
class OutputDatetimeItem(BaseModel):
r"""An openrouter:datetime server tool output item"""
- type: OutputDatetimeItemType
-
- status: Annotated[
- OutputDatetimeItemStatus, PlainValidator(validate_open_enum(False))
- ]
-
datetime: str
r"""ISO 8601 datetime string"""
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
timezone: str
r"""IANA timezone name"""
+ type: OutputDatetimeItemType
+
id: Optional[str] = None
diff --git a/src/openrouter/components/outputfilesearchcallitem.py b/src/openrouter/components/outputfilesearchcallitem.py
index ce347e9..0c3c4ba 100644
--- a/src/openrouter/components/outputfilesearchcallitem.py
+++ b/src/openrouter/components/outputfilesearchcallitem.py
@@ -13,17 +13,17 @@ OutputFileSearchCallItemType = Literal["file_search_call",]
class OutputFileSearchCallItemTypedDict(TypedDict):
- type: OutputFileSearchCallItemType
id: str
queries: List[str]
status: WebSearchStatus
+ type: OutputFileSearchCallItemType
class OutputFileSearchCallItem(BaseModel):
- type: OutputFileSearchCallItemType
-
id: str
queries: List[str]
status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputFileSearchCallItemType
diff --git a/src/openrouter/components/outputfilesearchservertoolitem.py b/src/openrouter/components/outputfilesearchservertoolitem.py
new file mode 100644
index 0000000..1916f7d
--- /dev/null
+++ b/src/openrouter/components/outputfilesearchservertoolitem.py
@@ -0,0 +1,33 @@
+"""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 List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputFileSearchServerToolItemType = Literal["openrouter:file_search",]
+
+
+class OutputFileSearchServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:file_search server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputFileSearchServerToolItemType
+ id: NotRequired[str]
+ queries: NotRequired[List[str]]
+
+
+class OutputFileSearchServerToolItem(BaseModel):
+ r"""An openrouter:file_search server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputFileSearchServerToolItemType
+
+ id: Optional[str] = None
+
+ queries: Optional[List[str]] = None
diff --git a/src/openrouter/components/outputfunctioncallitem.py b/src/openrouter/components/outputfunctioncallitem.py
index f82f43b..9df0afe 100644
--- a/src/openrouter/components/outputfunctioncallitem.py
+++ b/src/openrouter/components/outputfunctioncallitem.py
@@ -6,9 +6,6 @@ from typing import Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict
-OutputFunctionCallItemType = Literal["function_call",]
-
-
OutputFunctionCallItemStatusInProgress = Literal["in_progress",]
@@ -38,24 +35,27 @@ OutputFunctionCallItemStatusUnion = TypeAliasType(
)
+OutputFunctionCallItemType = Literal["function_call",]
+
+
class OutputFunctionCallItemTypedDict(TypedDict):
- type: OutputFunctionCallItemType
- name: str
arguments: str
call_id: str
+ name: str
+ type: OutputFunctionCallItemType
id: NotRequired[str]
status: NotRequired[OutputFunctionCallItemStatusUnionTypedDict]
class OutputFunctionCallItem(BaseModel):
- type: OutputFunctionCallItemType
-
- name: str
-
arguments: str
call_id: str
+ name: str
+
+ type: OutputFunctionCallItemType
+
id: Optional[str] = None
status: Optional[OutputFunctionCallItemStatusUnion] = None
diff --git a/src/openrouter/components/outputimagegenerationcallitem.py b/src/openrouter/components/outputimagegenerationcallitem.py
index 2347dba..abaaa53 100644
--- a/src/openrouter/components/outputimagegenerationcallitem.py
+++ b/src/openrouter/components/outputimagegenerationcallitem.py
@@ -14,19 +14,19 @@ OutputImageGenerationCallItemType = Literal["image_generation_call",]
class OutputImageGenerationCallItemTypedDict(TypedDict):
- type: OutputImageGenerationCallItemType
id: str
status: ImageGenerationStatus
+ type: OutputImageGenerationCallItemType
result: NotRequired[Nullable[str]]
class OutputImageGenerationCallItem(BaseModel):
- type: OutputImageGenerationCallItemType
-
id: str
status: Annotated[ImageGenerationStatus, PlainValidator(validate_open_enum(False))]
+ type: OutputImageGenerationCallItemType
+
result: OptionalNullable[str] = None
@model_serializer(mode="wrap")
diff --git a/src/openrouter/components/outputimagegenerationservertoolitem.py b/src/openrouter/components/outputimagegenerationservertoolitem.py
new file mode 100644
index 0000000..e91756b
--- /dev/null
+++ b/src/openrouter/components/outputimagegenerationservertoolitem.py
@@ -0,0 +1,42 @@
+"""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
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputImageGenerationServerToolItemType = Literal["openrouter:image_generation",]
+
+
+class OutputImageGenerationServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:image_generation server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputImageGenerationServerToolItemType
+ id: NotRequired[str]
+ image_b64: NotRequired[str]
+ image_url: NotRequired[str]
+ revised_prompt: NotRequired[str]
+
+
+class OutputImageGenerationServerToolItem(BaseModel):
+ r"""An openrouter:image_generation server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputImageGenerationServerToolItemType
+
+ id: Optional[str] = None
+
+ image_b64: Annotated[Optional[str], pydantic.Field(alias="imageB64")] = None
+
+ image_url: Annotated[Optional[str], pydantic.Field(alias="imageUrl")] = None
+
+ revised_prompt: Annotated[Optional[str], pydantic.Field(alias="revisedPrompt")] = (
+ None
+ )
diff --git a/src/openrouter/components/outputitemimagegenerationcall.py b/src/openrouter/components/outputitemimagegenerationcall.py
index 857deab..897c472 100644
--- a/src/openrouter/components/outputitemimagegenerationcall.py
+++ b/src/openrouter/components/outputitemimagegenerationcall.py
@@ -14,19 +14,19 @@ OutputItemImageGenerationCallType = Literal["image_generation_call",]
class OutputItemImageGenerationCallTypedDict(TypedDict):
- type: OutputItemImageGenerationCallType
id: str
status: ImageGenerationStatus
+ type: OutputItemImageGenerationCallType
result: NotRequired[Nullable[str]]
class OutputItemImageGenerationCall(BaseModel):
- type: OutputItemImageGenerationCallType
-
id: str
status: Annotated[ImageGenerationStatus, PlainValidator(validate_open_enum(False))]
+ type: OutputItemImageGenerationCallType
+
result: OptionalNullable[str] = None
@model_serializer(mode="wrap")
diff --git a/src/openrouter/components/outputitems.py b/src/openrouter/components/outputitems.py
index 1936438..4457f80 100644
--- a/src/openrouter/components/outputitems.py
+++ b/src/openrouter/components/outputitems.py
@@ -1,10 +1,39 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+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,
@@ -13,42 +42,103 @@ from .outputimagegenerationcallitem import (
OutputImageGenerationCallItem,
OutputImageGenerationCallItemTypedDict,
)
+from .outputimagegenerationservertoolitem import (
+ OutputImageGenerationServerToolItem,
+ OutputImageGenerationServerToolItemTypedDict,
+)
+from .outputmcpservertoolitem import (
+ OutputMcpServerToolItem,
+ OutputMcpServerToolItemTypedDict,
+)
+from .outputmemoryservertoolitem import (
+ OutputMemoryServerToolItem,
+ OutputMemoryServerToolItemTypedDict,
+)
from .outputmessageitem import OutputMessageItem, OutputMessageItemTypedDict
from .outputreasoningitem import OutputReasoningItem, OutputReasoningItemTypedDict
-from .outputservertoolitem import OutputServerToolItem, OutputServerToolItemTypedDict
+from .outputtexteditorservertoolitem import (
+ OutputTextEditorServerToolItem,
+ OutputTextEditorServerToolItemTypedDict,
+)
+from .outputtoolsearchservertoolitem import (
+ OutputToolSearchServerToolItem,
+ OutputToolSearchServerToolItemTypedDict,
+)
+from .outputwebfetchservertoolitem import (
+ OutputWebFetchServerToolItem,
+ OutputWebFetchServerToolItemTypedDict,
+)
from .outputwebsearchcallitem import (
OutputWebSearchCallItem,
OutputWebSearchCallItemTypedDict,
)
+from .outputwebsearchservertoolitem import (
+ OutputWebSearchServerToolItem,
+ OutputWebSearchServerToolItemTypedDict,
+)
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
from typing import Union
-from typing_extensions import TypeAliasType
+from typing_extensions import Annotated, TypeAliasType
OutputItemsTypedDict = TypeAliasType(
"OutputItemsTypedDict",
Union[
+ OutputWebSearchServerToolItemTypedDict,
+ OutputToolSearchServerToolItemTypedDict,
+ OutputFileSearchServerToolItemTypedDict,
OutputWebSearchCallItemTypedDict,
OutputFileSearchCallItemTypedDict,
OutputImageGenerationCallItemTypedDict,
- OutputServerToolItemTypedDict,
- OutputMessageItemTypedDict,
+ OutputTextEditorServerToolItemTypedDict,
+ OutputApplyPatchServerToolItemTypedDict,
+ OutputDatetimeItemTypedDict,
+ OutputMcpServerToolItemTypedDict,
+ OutputBrowserUseServerToolItemTypedDict,
OutputFunctionCallItemTypedDict,
+ OutputImageGenerationServerToolItemTypedDict,
+ OutputMessageItemTypedDict,
+ OutputComputerCallItemTypedDict,
+ OutputWebFetchServerToolItemTypedDict,
+ OutputMemoryServerToolItemTypedDict,
+ OutputCodeInterpreterCallItemTypedDict,
+ OutputBashServerToolItemTypedDict,
+ OutputCodeInterpreterServerToolItemTypedDict,
OutputReasoningItemTypedDict,
],
)
r"""An output item from the response"""
-OutputItems = TypeAliasType(
- "OutputItems",
+OutputItems = Annotated[
Union[
- OutputWebSearchCallItem,
- OutputFileSearchCallItem,
- OutputImageGenerationCallItem,
- OutputServerToolItem,
- OutputMessageItem,
- OutputFunctionCallItem,
- OutputReasoningItem,
+ Annotated[OutputCodeInterpreterCallItem, Tag("code_interpreter_call")],
+ Annotated[OutputComputerCallItem, Tag("computer_call")],
+ Annotated[OutputFileSearchCallItem, Tag("file_search_call")],
+ Annotated[OutputFunctionCallItem, Tag("function_call")],
+ Annotated[OutputImageGenerationCallItem, Tag("image_generation_call")],
+ Annotated[OutputMessageItem, Tag("message")],
+ Annotated[OutputApplyPatchServerToolItem, Tag("openrouter:apply_patch")],
+ Annotated[OutputBashServerToolItem, Tag("openrouter:bash")],
+ Annotated[OutputBrowserUseServerToolItem, Tag("openrouter:browser_use")],
+ Annotated[
+ OutputCodeInterpreterServerToolItem, Tag("openrouter:code_interpreter")
+ ],
+ Annotated[OutputDatetimeItem, Tag("openrouter:datetime")],
+ Annotated[OutputFileSearchServerToolItem, Tag("openrouter:file_search")],
+ Annotated[
+ OutputImageGenerationServerToolItem, Tag("openrouter:image_generation")
+ ],
+ Annotated[OutputMcpServerToolItem, Tag("openrouter:mcp")],
+ Annotated[OutputMemoryServerToolItem, Tag("openrouter:memory")],
+ Annotated[OutputTextEditorServerToolItem, Tag("openrouter:text_editor")],
+ Annotated[OutputToolSearchServerToolItem, Tag("openrouter:tool_search")],
+ Annotated[OutputWebFetchServerToolItem, Tag("openrouter:web_fetch")],
+ Annotated[OutputWebSearchServerToolItem, Tag("openrouter:web_search")],
+ Annotated[OutputReasoningItem, Tag("reasoning")],
+ Annotated[OutputWebSearchCallItem, Tag("web_search_call")],
],
-)
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
r"""An output item from the response"""
diff --git a/src/openrouter/components/outputmcpservertoolitem.py b/src/openrouter/components/outputmcpservertoolitem.py
new file mode 100644
index 0000000..2595661
--- /dev/null
+++ b/src/openrouter/components/outputmcpservertoolitem.py
@@ -0,0 +1,37 @@
+"""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
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+OutputMcpServerToolItemType = Literal["openrouter:mcp",]
+
+
+class OutputMcpServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:mcp server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputMcpServerToolItemType
+ id: NotRequired[str]
+ server_label: NotRequired[str]
+ tool_name: NotRequired[str]
+
+
+class OutputMcpServerToolItem(BaseModel):
+ r"""An openrouter:mcp server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputMcpServerToolItemType
+
+ id: Optional[str] = None
+
+ server_label: Annotated[Optional[str], pydantic.Field(alias="serverLabel")] = None
+
+ tool_name: Annotated[Optional[str], pydantic.Field(alias="toolName")] = None
diff --git a/src/openrouter/components/outputmemoryservertoolitem.py b/src/openrouter/components/outputmemoryservertoolitem.py
new file mode 100644
index 0000000..204cc7d
--- /dev/null
+++ b/src/openrouter/components/outputmemoryservertoolitem.py
@@ -0,0 +1,89 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+ActionEnum = Union[
+ Literal[
+ "read",
+ "write",
+ "delete",
+ ],
+ UnrecognizedStr,
+]
+
+
+OutputMemoryServerToolItemType = Literal["openrouter:memory",]
+
+
+class OutputMemoryServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:memory server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputMemoryServerToolItemType
+ action: NotRequired[ActionEnum]
+ id: NotRequired[str]
+ key: NotRequired[str]
+ value: NotRequired[Nullable[Any]]
+
+
+class OutputMemoryServerToolItem(BaseModel):
+ r"""An openrouter:memory server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputMemoryServerToolItemType
+
+ action: Annotated[
+ Optional[ActionEnum], PlainValidator(validate_open_enum(False))
+ ] = None
+
+ id: Optional[str] = None
+
+ key: Optional[str] = None
+
+ value: OptionalNullable[Any] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["action", "id", "key", "value"]
+ nullable_fields = ["value"]
+ 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/outputmessage.py b/src/openrouter/components/outputmessage.py
index 497bcc0..def0cb7 100644
--- a/src/openrouter/components/outputmessage.py
+++ b/src/openrouter/components/outputmessage.py
@@ -19,41 +19,6 @@ from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-OutputMessageRole = Literal["assistant",]
-
-
-OutputMessageType = Literal["message",]
-
-
-OutputMessageStatusInProgress = Literal["in_progress",]
-
-
-OutputMessageStatusIncomplete = Literal["incomplete",]
-
-
-OutputMessageStatusCompleted = Literal["completed",]
-
-
-OutputMessageStatusUnionTypedDict = TypeAliasType(
- "OutputMessageStatusUnionTypedDict",
- Union[
- OutputMessageStatusCompleted,
- OutputMessageStatusIncomplete,
- OutputMessageStatusInProgress,
- ],
-)
-
-
-OutputMessageStatusUnion = TypeAliasType(
- "OutputMessageStatusUnion",
- Union[
- OutputMessageStatusCompleted,
- OutputMessageStatusIncomplete,
- OutputMessageStatusInProgress,
- ],
-)
-
-
OutputMessageContentTypedDict = TypeAliasType(
"OutputMessageContentTypedDict",
Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict],
@@ -89,33 +54,68 @@ OutputMessagePhaseUnion = TypeAliasType(
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+OutputMessageRole = Literal["assistant",]
+
+
+OutputMessageStatusInProgress = Literal["in_progress",]
+
+
+OutputMessageStatusIncomplete = Literal["incomplete",]
+
+
+OutputMessageStatusCompleted = Literal["completed",]
+
+
+OutputMessageStatusUnionTypedDict = TypeAliasType(
+ "OutputMessageStatusUnionTypedDict",
+ Union[
+ OutputMessageStatusCompleted,
+ OutputMessageStatusIncomplete,
+ OutputMessageStatusInProgress,
+ ],
+)
+
+
+OutputMessageStatusUnion = TypeAliasType(
+ "OutputMessageStatusUnion",
+ Union[
+ OutputMessageStatusCompleted,
+ OutputMessageStatusIncomplete,
+ OutputMessageStatusInProgress,
+ ],
+)
+
+
+OutputMessageType = Literal["message",]
+
+
class OutputMessageTypedDict(TypedDict):
+ content: List[OutputMessageContentTypedDict]
id: str
role: OutputMessageRole
type: OutputMessageType
- content: List[OutputMessageContentTypedDict]
- status: NotRequired[OutputMessageStatusUnionTypedDict]
phase: NotRequired[Nullable[OutputMessagePhaseUnionTypedDict]]
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ status: NotRequired[OutputMessageStatusUnionTypedDict]
class OutputMessage(BaseModel):
+ content: List[OutputMessageContent]
+
id: str
role: OutputMessageRole
type: OutputMessageType
- content: List[OutputMessageContent]
-
- status: Optional[OutputMessageStatusUnion] = None
-
phase: OptionalNullable[OutputMessagePhaseUnion] = UNSET
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ status: Optional[OutputMessageStatusUnion] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["status", "phase"]
+ optional_fields = ["phase", "status"]
nullable_fields = ["phase"]
null_default_fields = []
diff --git a/src/openrouter/components/outputmessageitem.py b/src/openrouter/components/outputmessageitem.py
index fbe391b..ec59a9d 100644
--- a/src/openrouter/components/outputmessageitem.py
+++ b/src/openrouter/components/outputmessageitem.py
@@ -19,41 +19,6 @@ from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-OutputMessageItemRole = Literal["assistant",]
-
-
-OutputMessageItemType = Literal["message",]
-
-
-OutputMessageItemStatusInProgress = Literal["in_progress",]
-
-
-OutputMessageItemStatusIncomplete = Literal["incomplete",]
-
-
-OutputMessageItemStatusCompleted = Literal["completed",]
-
-
-OutputMessageItemStatusUnionTypedDict = TypeAliasType(
- "OutputMessageItemStatusUnionTypedDict",
- Union[
- OutputMessageItemStatusCompleted,
- OutputMessageItemStatusIncomplete,
- OutputMessageItemStatusInProgress,
- ],
-)
-
-
-OutputMessageItemStatusUnion = TypeAliasType(
- "OutputMessageItemStatusUnion",
- Union[
- OutputMessageItemStatusCompleted,
- OutputMessageItemStatusIncomplete,
- OutputMessageItemStatusInProgress,
- ],
-)
-
-
OutputMessageItemContentTypedDict = TypeAliasType(
"OutputMessageItemContentTypedDict",
Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict],
@@ -89,37 +54,72 @@ OutputMessageItemPhaseUnion = TypeAliasType(
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+OutputMessageItemRole = Literal["assistant",]
+
+
+OutputMessageItemStatusInProgress = Literal["in_progress",]
+
+
+OutputMessageItemStatusIncomplete = Literal["incomplete",]
+
+
+OutputMessageItemStatusCompleted = Literal["completed",]
+
+
+OutputMessageItemStatusUnionTypedDict = TypeAliasType(
+ "OutputMessageItemStatusUnionTypedDict",
+ Union[
+ OutputMessageItemStatusCompleted,
+ OutputMessageItemStatusIncomplete,
+ OutputMessageItemStatusInProgress,
+ ],
+)
+
+
+OutputMessageItemStatusUnion = TypeAliasType(
+ "OutputMessageItemStatusUnion",
+ Union[
+ OutputMessageItemStatusCompleted,
+ OutputMessageItemStatusIncomplete,
+ OutputMessageItemStatusInProgress,
+ ],
+)
+
+
+OutputMessageItemType = Literal["message",]
+
+
class OutputMessageItemTypedDict(TypedDict):
r"""An output message item"""
+ content: List[OutputMessageItemContentTypedDict]
id: str
role: OutputMessageItemRole
type: OutputMessageItemType
- content: List[OutputMessageItemContentTypedDict]
- status: NotRequired[OutputMessageItemStatusUnionTypedDict]
phase: NotRequired[Nullable[OutputMessageItemPhaseUnionTypedDict]]
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ status: NotRequired[OutputMessageItemStatusUnionTypedDict]
class OutputMessageItem(BaseModel):
r"""An output message item"""
+ content: List[OutputMessageItemContent]
+
id: str
role: OutputMessageItemRole
type: OutputMessageItemType
- content: List[OutputMessageItemContent]
-
- status: Optional[OutputMessageItemStatusUnion] = None
-
phase: OptionalNullable[OutputMessageItemPhaseUnion] = UNSET
r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."""
+ status: Optional[OutputMessageItemStatusUnion] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["status", "phase"]
+ optional_fields = ["phase", "status"]
nullable_fields = ["phase"]
null_default_fields = []
diff --git a/src/openrouter/components/outputmodality.py b/src/openrouter/components/outputmodality.py
index b3120b0..c926bb6 100644
--- a/src/openrouter/components/outputmodality.py
+++ b/src/openrouter/components/outputmodality.py
@@ -12,6 +12,7 @@ OutputModality = Union[
"embeddings",
"audio",
"video",
+ "rerank",
],
UnrecognizedStr,
]
diff --git a/src/openrouter/components/outputreasoningitem.py b/src/openrouter/components/outputreasoningitem.py
index 5ab5d77..50eff94 100644
--- a/src/openrouter/components/outputreasoningitem.py
+++ b/src/openrouter/components/outputreasoningitem.py
@@ -1,6 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .reasoningformat import ReasoningFormat
from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict
from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict
from openrouter.types import (
@@ -9,7 +10,6 @@ from openrouter.types import (
OptionalNullable,
UNSET,
UNSET_SENTINEL,
- UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
import pydantic
@@ -19,9 +19,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-OutputReasoningItemType = Literal["reasoning",]
-
-
OutputReasoningItemStatusInProgress = Literal["in_progress",]
@@ -51,61 +48,47 @@ OutputReasoningItemStatusUnion = TypeAliasType(
)
-OutputReasoningItemFormat = Union[
- Literal[
- "unknown",
- "openai-responses-v1",
- "azure-openai-responses-v1",
- "xai-responses-v1",
- "anthropic-claude-v1",
- "google-gemini-v1",
- ],
- UnrecognizedStr,
-]
-r"""The format of the reasoning content"""
+OutputReasoningItemType = Literal["reasoning",]
class OutputReasoningItemTypedDict(TypedDict):
r"""An output item containing reasoning"""
- type: OutputReasoningItemType
id: str
summary: List[ReasoningSummaryTextTypedDict]
+ type: OutputReasoningItemType
content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]]
encrypted_content: NotRequired[Nullable[str]]
status: NotRequired[OutputReasoningItemStatusUnionTypedDict]
+ format_: NotRequired[Nullable[ReasoningFormat]]
signature: NotRequired[Nullable[str]]
r"""A signature for the reasoning content, used for verification"""
- format_: NotRequired[Nullable[OutputReasoningItemFormat]]
- r"""The format of the reasoning content"""
class OutputReasoningItem(BaseModel):
r"""An output item containing reasoning"""
- type: OutputReasoningItemType
-
id: str
summary: List[ReasoningSummaryText]
+ type: OutputReasoningItemType
+
content: OptionalNullable[List[ReasoningTextContent]] = UNSET
encrypted_content: OptionalNullable[str] = UNSET
status: Optional[OutputReasoningItemStatusUnion] = None
- signature: OptionalNullable[str] = UNSET
- r"""A signature for the reasoning content, used for verification"""
-
format_: Annotated[
Annotated[
- OptionalNullable[OutputReasoningItemFormat],
- PlainValidator(validate_open_enum(False)),
+ OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
- r"""The format of the reasoning content"""
+
+ signature: OptionalNullable[str] = UNSET
+ r"""A signature for the reasoning content, used for verification"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
@@ -113,10 +96,10 @@ class OutputReasoningItem(BaseModel):
"content",
"encrypted_content",
"status",
- "signature",
"format",
+ "signature",
]
- nullable_fields = ["content", "encrypted_content", "signature", "format"]
+ nullable_fields = ["content", "encrypted_content", "format", "signature"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/outputservertoolitem.py b/src/openrouter/components/outputservertoolitem.py
deleted file mode 100644
index abfbff5..0000000
--- a/src/openrouter/components/outputservertoolitem.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
-
-from __future__ import annotations
-from openrouter.types import BaseModel, Nullable, UnrecognizedStr
-from openrouter.utils import validate_open_enum
-import pydantic
-from pydantic import ConfigDict
-from pydantic.functional_validators import PlainValidator
-from typing import Any, Dict, Literal, Optional, Union
-from typing_extensions import Annotated, NotRequired, TypedDict
-
-
-OutputServerToolItemStatus = Union[
- Literal[
- "completed",
- "in_progress",
- "incomplete",
- ],
- UnrecognizedStr,
-]
-
-
-class OutputServerToolItemTypedDict(TypedDict):
- r"""A generic OpenRouter server tool output item"""
-
- type: str
- r"""Server tool type (e.g. openrouter:datetime, openrouter:web_search)"""
- status: OutputServerToolItemStatus
- id: NotRequired[str]
-
-
-class OutputServerToolItem(BaseModel):
- r"""A generic OpenRouter server tool output item"""
-
- model_config = ConfigDict(
- populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
- )
- __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
-
- type: str
- r"""Server tool type (e.g. openrouter:datetime, openrouter:web_search)"""
-
- status: Annotated[
- OutputServerToolItemStatus, PlainValidator(validate_open_enum(False))
- ]
-
- id: 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/outputtexteditorservertoolitem.py b/src/openrouter/components/outputtexteditorservertoolitem.py
new file mode 100644
index 0000000..6b7dc1c
--- /dev/null
+++ b/src/openrouter/components/outputtexteditorservertoolitem.py
@@ -0,0 +1,50 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .toolcallstatus import ToolCallStatus
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+Command = Union[
+ Literal[
+ "view",
+ "create",
+ "str_replace",
+ "insert",
+ ],
+ UnrecognizedStr,
+]
+
+
+OutputTextEditorServerToolItemType = Literal["openrouter:text_editor",]
+
+
+class OutputTextEditorServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:text_editor server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputTextEditorServerToolItemType
+ command: NotRequired[Command]
+ file_path: NotRequired[str]
+ id: NotRequired[str]
+
+
+class OutputTextEditorServerToolItem(BaseModel):
+ r"""An openrouter:text_editor server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputTextEditorServerToolItemType
+
+ command: Annotated[Optional[Command], PlainValidator(validate_open_enum(False))] = (
+ None
+ )
+
+ file_path: Annotated[Optional[str], pydantic.Field(alias="filePath")] = None
+
+ id: Optional[str] = None
diff --git a/src/openrouter/components/outputtoolsearchservertoolitem.py b/src/openrouter/components/outputtoolsearchservertoolitem.py
new file mode 100644
index 0000000..45dfd93
--- /dev/null
+++ b/src/openrouter/components/outputtoolsearchservertoolitem.py
@@ -0,0 +1,33 @@
+"""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
+
+
+OutputToolSearchServerToolItemType = Literal["openrouter:tool_search",]
+
+
+class OutputToolSearchServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:tool_search server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputToolSearchServerToolItemType
+ id: NotRequired[str]
+ query: NotRequired[str]
+
+
+class OutputToolSearchServerToolItem(BaseModel):
+ r"""An openrouter:tool_search server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputToolSearchServerToolItemType
+
+ id: Optional[str] = None
+
+ query: Optional[str] = None
diff --git a/src/openrouter/components/outputwebfetchservertoolitem.py b/src/openrouter/components/outputwebfetchservertoolitem.py
new file mode 100644
index 0000000..f443472
--- /dev/null
+++ b/src/openrouter/components/outputwebfetchservertoolitem.py
@@ -0,0 +1,39 @@
+"""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
+
+
+OutputWebFetchServerToolItemType = Literal["openrouter:web_fetch",]
+
+
+class OutputWebFetchServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:web_fetch server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputWebFetchServerToolItemType
+ content: NotRequired[str]
+ id: NotRequired[str]
+ title: NotRequired[str]
+ url: NotRequired[str]
+
+
+class OutputWebFetchServerToolItem(BaseModel):
+ r"""An openrouter:web_fetch server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputWebFetchServerToolItemType
+
+ content: Optional[str] = None
+
+ id: Optional[str] = None
+
+ title: Optional[str] = None
+
+ url: Optional[str] = None
diff --git a/src/openrouter/components/outputwebsearchcallitem.py b/src/openrouter/components/outputwebsearchcallitem.py
index 84d048c..706303d 100644
--- a/src/openrouter/components/outputwebsearchcallitem.py
+++ b/src/openrouter/components/outputwebsearchcallitem.py
@@ -1,6 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .websearchsource import WebSearchSource, WebSearchSourceTypedDict
from .websearchstatus import WebSearchStatus
from openrouter.types import (
BaseModel,
@@ -16,23 +17,20 @@ from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-TypeWebSearchCall = Literal["web_search_call",]
-
-
TypeFindInPage = Literal["find_in_page",]
class ActionFindInPageTypedDict(TypedDict):
- type: TypeFindInPage
pattern: str
+ type: TypeFindInPage
url: str
class ActionFindInPage(BaseModel):
- type: TypeFindInPage
-
pattern: str
+ type: TypeFindInPage
+
url: str
@@ -83,35 +81,21 @@ class ActionOpenPage(BaseModel):
TypeSearch = Literal["search",]
-TypeURL = Literal["url",]
-
-
-class SourceTypedDict(TypedDict):
- type: TypeURL
- url: str
-
-
-class Source(BaseModel):
- type: TypeURL
-
- url: str
-
-
class ActionSearchTypedDict(TypedDict):
- type: TypeSearch
query: str
+ type: TypeSearch
queries: NotRequired[List[str]]
- sources: NotRequired[List[SourceTypedDict]]
+ sources: NotRequired[List[WebSearchSourceTypedDict]]
class ActionSearch(BaseModel):
- type: TypeSearch
-
query: str
+ type: TypeSearch
+
queries: Optional[List[str]] = None
- sources: Optional[List[Source]] = None
+ sources: Optional[List[WebSearchSource]] = None
ActionTypedDict = TypeAliasType(
@@ -130,18 +114,21 @@ Action = Annotated[
]
+TypeWebSearchCall = Literal["web_search_call",]
+
+
class OutputWebSearchCallItemTypedDict(TypedDict):
- type: TypeWebSearchCall
- id: str
action: ActionTypedDict
+ id: str
status: WebSearchStatus
+ type: TypeWebSearchCall
class OutputWebSearchCallItem(BaseModel):
- type: TypeWebSearchCall
+ action: Action
id: str
- action: Action
-
status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))]
+
+ type: TypeWebSearchCall
diff --git a/src/openrouter/components/outputwebsearchservertoolitem.py b/src/openrouter/components/outputwebsearchservertoolitem.py
new file mode 100644
index 0000000..304cab5
--- /dev/null
+++ b/src/openrouter/components/outputwebsearchservertoolitem.py
@@ -0,0 +1,30 @@
+"""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
+
+
+OutputWebSearchServerToolItemType = Literal["openrouter:web_search",]
+
+
+class OutputWebSearchServerToolItemTypedDict(TypedDict):
+ r"""An openrouter:web_search server tool output item"""
+
+ status: ToolCallStatus
+ type: OutputWebSearchServerToolItemType
+ id: NotRequired[str]
+
+
+class OutputWebSearchServerToolItem(BaseModel):
+ r"""An openrouter:web_search server tool output item"""
+
+ status: Annotated[ToolCallStatus, PlainValidator(validate_open_enum(False))]
+
+ type: OutputWebSearchServerToolItemType
+
+ id: Optional[str] = None
diff --git a/src/openrouter/components/parameter.py b/src/openrouter/components/parameter.py
index b84cbf0..9aaebc4 100644
--- a/src/openrouter/components/parameter.py
+++ b/src/openrouter/components/parameter.py
@@ -16,6 +16,7 @@ Parameter = Union[
"presence_penalty",
"repetition_penalty",
"max_tokens",
+ "max_completion_tokens",
"logit_bias",
"logprobs",
"top_logprobs",
diff --git a/src/openrouter/components/percentilelatencycutoffs.py b/src/openrouter/components/percentilelatencycutoffs.py
index fa8175f..47b987a 100644
--- a/src/openrouter/components/percentilelatencycutoffs.py
+++ b/src/openrouter/components/percentilelatencycutoffs.py
@@ -1,71 +1,35 @@
"""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 openrouter.types import BaseModel
+from typing import Optional
from typing_extensions import NotRequired, TypedDict
class PercentileLatencyCutoffsTypedDict(TypedDict):
r"""Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred."""
- p50: NotRequired[Nullable[float]]
+ p50: NotRequired[float]
r"""Maximum p50 latency (seconds)"""
- p75: NotRequired[Nullable[float]]
+ p75: NotRequired[float]
r"""Maximum p75 latency (seconds)"""
- p90: NotRequired[Nullable[float]]
+ p90: NotRequired[float]
r"""Maximum p90 latency (seconds)"""
- p99: NotRequired[Nullable[float]]
+ p99: NotRequired[float]
r"""Maximum p99 latency (seconds)"""
class PercentileLatencyCutoffs(BaseModel):
r"""Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred."""
- p50: OptionalNullable[float] = UNSET
+ p50: Optional[float] = None
r"""Maximum p50 latency (seconds)"""
- p75: OptionalNullable[float] = UNSET
+ p75: Optional[float] = None
r"""Maximum p75 latency (seconds)"""
- p90: OptionalNullable[float] = UNSET
+ p90: Optional[float] = None
r"""Maximum p90 latency (seconds)"""
- p99: OptionalNullable[float] = UNSET
+ p99: Optional[float] = None
r"""Maximum p99 latency (seconds)"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["p50", "p75", "p90", "p99"]
- nullable_fields = ["p50", "p75", "p90", "p99"]
- 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/percentilethroughputcutoffs.py b/src/openrouter/components/percentilethroughputcutoffs.py
index 17b28ce..d6e0323 100644
--- a/src/openrouter/components/percentilethroughputcutoffs.py
+++ b/src/openrouter/components/percentilethroughputcutoffs.py
@@ -1,71 +1,35 @@
"""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 openrouter.types import BaseModel
+from typing import Optional
from typing_extensions import NotRequired, TypedDict
class PercentileThroughputCutoffsTypedDict(TypedDict):
r"""Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred."""
- p50: NotRequired[Nullable[float]]
+ p50: NotRequired[float]
r"""Minimum p50 throughput (tokens/sec)"""
- p75: NotRequired[Nullable[float]]
+ p75: NotRequired[float]
r"""Minimum p75 throughput (tokens/sec)"""
- p90: NotRequired[Nullable[float]]
+ p90: NotRequired[float]
r"""Minimum p90 throughput (tokens/sec)"""
- p99: NotRequired[Nullable[float]]
+ p99: NotRequired[float]
r"""Minimum p99 throughput (tokens/sec)"""
class PercentileThroughputCutoffs(BaseModel):
r"""Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred."""
- p50: OptionalNullable[float] = UNSET
+ p50: Optional[float] = None
r"""Minimum p50 throughput (tokens/sec)"""
- p75: OptionalNullable[float] = UNSET
+ p75: Optional[float] = None
r"""Minimum p75 throughput (tokens/sec)"""
- p90: OptionalNullable[float] = UNSET
+ p90: Optional[float] = None
r"""Minimum p90 throughput (tokens/sec)"""
- p99: OptionalNullable[float] = UNSET
+ p99: Optional[float] = None
r"""Minimum p99 throughput (tokens/sec)"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["p50", "p75", "p90", "p99"]
- nullable_fields = ["p50", "p75", "p90", "p99"]
- 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/perrequestlimits.py b/src/openrouter/components/perrequestlimits.py
index d83c7d1..d572e3b 100644
--- a/src/openrouter/components/perrequestlimits.py
+++ b/src/openrouter/components/perrequestlimits.py
@@ -8,17 +8,17 @@ from typing_extensions import TypedDict
class PerRequestLimitsTypedDict(TypedDict):
r"""Per-request token limits"""
- prompt_tokens: float
- r"""Maximum prompt tokens per request"""
completion_tokens: float
r"""Maximum completion tokens per request"""
+ prompt_tokens: float
+ r"""Maximum prompt tokens per request"""
class PerRequestLimits(BaseModel):
r"""Per-request token limits"""
- prompt_tokens: float
- r"""Maximum prompt tokens per request"""
-
completion_tokens: float
r"""Maximum completion tokens per request"""
+
+ prompt_tokens: float
+ r"""Maximum prompt tokens per request"""
diff --git a/src/openrouter/components/preview_20250311_websearchservertool.py b/src/openrouter/components/preview_20250311_websearchservertool.py
index 883019b..2f0cd46 100644
--- a/src/openrouter/components/preview_20250311_websearchservertool.py
+++ b/src/openrouter/components/preview_20250311_websearchservertool.py
@@ -6,90 +6,37 @@ from .preview_websearchuserlocation import (
PreviewWebSearchUserLocationTypedDict,
)
from .searchcontextsizeenum import SearchContextSizeEnum
+from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
+from .websearchengineenum import WebSearchEngineEnum
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, Optional, Union
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
Preview20250311WebSearchServerToolType = Literal["web_search_preview_2025_03_11",]
-Preview20250311WebSearchServerToolEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
-class Preview20250311WebSearchServerToolFiltersTypedDict(TypedDict):
- allowed_domains: NotRequired[Nullable[List[str]]]
- excluded_domains: NotRequired[Nullable[List[str]]]
-
-
-class Preview20250311WebSearchServerToolFilters(BaseModel):
- allowed_domains: OptionalNullable[List[str]] = UNSET
-
- excluded_domains: OptionalNullable[List[str]] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["allowed_domains", "excluded_domains"]
- nullable_fields = ["allowed_domains", "excluded_domains"]
- 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 Preview20250311WebSearchServerToolTypedDict(TypedDict):
r"""Web search preview tool configuration (2025-03-11 version)"""
type: Preview20250311WebSearchServerToolType
+ 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."""
+ filters: NotRequired[Nullable[WebSearchDomainFilterTypedDict]]
+ 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."""
search_context_size: NotRequired[SearchContextSizeEnum]
r"""Size of the search context for web search tools"""
user_location: NotRequired[Nullable[PreviewWebSearchUserLocationTypedDict]]
- engine: NotRequired[Preview20250311WebSearchServerToolEngine]
- 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."""
- max_results: NotRequired[float]
- 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."""
- filters: NotRequired[Nullable[Preview20250311WebSearchServerToolFiltersTypedDict]]
class Preview20250311WebSearchServerTool(BaseModel):
@@ -97,6 +44,16 @@ class Preview20250311WebSearchServerTool(BaseModel):
type: Preview20250311WebSearchServerToolType
+ 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."""
+
+ filters: OptionalNullable[WebSearchDomainFilter] = UNSET
+
+ 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."""
+
search_context_size: Annotated[
Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False))
] = None
@@ -104,27 +61,16 @@ class Preview20250311WebSearchServerTool(BaseModel):
user_location: OptionalNullable[PreviewWebSearchUserLocation] = UNSET
- engine: Annotated[
- Optional[Preview20250311WebSearchServerToolEngine],
- 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."""
-
- max_results: Optional[float] = 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."""
-
- filters: OptionalNullable[Preview20250311WebSearchServerToolFilters] = UNSET
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "engine",
+ "filters",
+ "max_results",
"search_context_size",
"user_location",
- "engine",
- "max_results",
- "filters",
]
- nullable_fields = ["user_location", "filters"]
+ nullable_fields = ["filters", "user_location"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/preview_websearchservertool.py b/src/openrouter/components/preview_websearchservertool.py
index 0903c5a..434b214 100644
--- a/src/openrouter/components/preview_websearchservertool.py
+++ b/src/openrouter/components/preview_websearchservertool.py
@@ -6,90 +6,37 @@ from .preview_websearchuserlocation import (
PreviewWebSearchUserLocationTypedDict,
)
from .searchcontextsizeenum import SearchContextSizeEnum
+from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
+from .websearchengineenum import WebSearchEngineEnum
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, Optional, Union
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
PreviewWebSearchServerToolType = Literal["web_search_preview",]
-PreviewWebSearchServerToolEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
-class PreviewWebSearchServerToolFiltersTypedDict(TypedDict):
- allowed_domains: NotRequired[Nullable[List[str]]]
- excluded_domains: NotRequired[Nullable[List[str]]]
-
-
-class PreviewWebSearchServerToolFilters(BaseModel):
- allowed_domains: OptionalNullable[List[str]] = UNSET
-
- excluded_domains: OptionalNullable[List[str]] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["allowed_domains", "excluded_domains"]
- nullable_fields = ["allowed_domains", "excluded_domains"]
- 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 PreviewWebSearchServerToolTypedDict(TypedDict):
r"""Web search preview tool configuration"""
type: PreviewWebSearchServerToolType
+ 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."""
+ filters: NotRequired[Nullable[WebSearchDomainFilterTypedDict]]
+ 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."""
search_context_size: NotRequired[SearchContextSizeEnum]
r"""Size of the search context for web search tools"""
user_location: NotRequired[Nullable[PreviewWebSearchUserLocationTypedDict]]
- engine: NotRequired[PreviewWebSearchServerToolEngine]
- 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."""
- max_results: NotRequired[float]
- 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."""
- filters: NotRequired[Nullable[PreviewWebSearchServerToolFiltersTypedDict]]
class PreviewWebSearchServerTool(BaseModel):
@@ -97,6 +44,16 @@ class PreviewWebSearchServerTool(BaseModel):
type: PreviewWebSearchServerToolType
+ 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."""
+
+ filters: OptionalNullable[WebSearchDomainFilter] = UNSET
+
+ 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."""
+
search_context_size: Annotated[
Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False))
] = None
@@ -104,27 +61,16 @@ class PreviewWebSearchServerTool(BaseModel):
user_location: OptionalNullable[PreviewWebSearchUserLocation] = UNSET
- engine: Annotated[
- Optional[PreviewWebSearchServerToolEngine],
- 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."""
-
- max_results: Optional[float] = 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."""
-
- filters: OptionalNullable[PreviewWebSearchServerToolFilters] = UNSET
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "engine",
+ "filters",
+ "max_results",
"search_context_size",
"user_location",
- "engine",
- "max_results",
- "filters",
]
- nullable_fields = ["user_location", "filters"]
+ nullable_fields = ["filters", "user_location"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/providername.py b/src/openrouter/components/providername.py
index 413ecfc..7764a12 100644
--- a/src/openrouter/components/providername.py
+++ b/src/openrouter/components/providername.py
@@ -31,6 +31,7 @@ ProviderName = Union[
"Crusoe",
"DeepInfra",
"DeepSeek",
+ "DekaLLM",
"Featherless",
"Fireworks",
"Friendli",
@@ -65,6 +66,7 @@ ProviderName = Union[
"Parasail",
"Perplexity",
"Phala",
+ "Recraft",
"Reka",
"Relace",
"SambaNova",
diff --git a/src/openrouter/components/providerpreferences.py b/src/openrouter/components/providerpreferences.py
index 819a6da..5145815 100644
--- a/src/openrouter/components/providerpreferences.py
+++ b/src/openrouter/components/providerpreferences.py
@@ -1,13 +1,14 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .datacollection import DataCollection
from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
from .preferredminthroughput import (
PreferredMinThroughput,
PreferredMinThroughputTypedDict,
)
from .providername import ProviderName
+from .providersort import ProviderSort
+from .providersortconfig import ProviderSortConfig, ProviderSortConfigTypedDict
from .quantization import Quantization
from openrouter.types import (
BaseModel,
@@ -20,218 +21,96 @@ from openrouter.types import (
from openrouter.utils import validate_open_enum
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
-from typing import List, Literal, Optional, Union
+from typing import Any, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-ProviderPreferencesOrderTypedDict = TypeAliasType(
- "ProviderPreferencesOrderTypedDict", Union[ProviderName, str]
-)
+DataCollection = Union[
+ Literal[
+ "deny",
+ "allow",
+ ],
+ UnrecognizedStr,
+]
+r"""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.
+"""
-ProviderPreferencesOrder = TypeAliasType(
- "ProviderPreferencesOrder",
+IgnoreTypedDict = TypeAliasType("IgnoreTypedDict", Union[ProviderName, str])
+
+
+Ignore = TypeAliasType(
+ "Ignore",
Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
)
-ProviderPreferencesOnlyTypedDict = TypeAliasType(
- "ProviderPreferencesOnlyTypedDict", Union[ProviderName, str]
-)
-
-
-ProviderPreferencesOnly = TypeAliasType(
- "ProviderPreferencesOnly",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ProviderPreferencesIgnoreTypedDict = TypeAliasType(
- "ProviderPreferencesIgnoreTypedDict", Union[ProviderName, str]
-)
-
-
-ProviderPreferencesIgnore = TypeAliasType(
- "ProviderPreferencesIgnore",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ProviderPreferencesSortEnum = Union[
- Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
- ],
- UnrecognizedStr,
-]
-
-
-ProviderPreferencesProviderSortConfigEnum = Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
-]
-
-
-ProviderPreferencesBy = Union[
- Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
- ],
- UnrecognizedStr,
-]
-r"""The provider sorting strategy (price, throughput, latency)"""
-
-
-ProviderPreferencesPartition = Union[
- Literal[
- "model",
- "none",
- ],
- UnrecognizedStr,
-]
-r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model."""
-
-
-class ProviderPreferencesProviderSortConfigTypedDict(TypedDict):
- by: NotRequired[Nullable[ProviderPreferencesBy]]
- r"""The provider sorting strategy (price, throughput, latency)"""
- partition: NotRequired[Nullable[ProviderPreferencesPartition]]
- r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model."""
-
-
-class ProviderPreferencesProviderSortConfig(BaseModel):
- by: Annotated[
- OptionalNullable[ProviderPreferencesBy],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""The provider sorting strategy (price, throughput, latency)"""
-
- partition: Annotated[
- OptionalNullable[ProviderPreferencesPartition],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model."""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["by", "partition"]
- nullable_fields = ["by", "partition"]
- 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
-
-
-ProviderPreferencesProviderSortConfigUnionTypedDict = TypeAliasType(
- "ProviderPreferencesProviderSortConfigUnionTypedDict",
- Union[
- ProviderPreferencesProviderSortConfigTypedDict,
- ProviderPreferencesProviderSortConfigEnum,
- ],
-)
-
-
-ProviderPreferencesProviderSortConfigUnion = TypeAliasType(
- "ProviderPreferencesProviderSortConfigUnion",
- Union[
- ProviderPreferencesProviderSortConfig, ProviderPreferencesProviderSortConfigEnum
- ],
-)
-
-
-ProviderPreferencesProviderSort = Union[
- Literal[
- "price",
- "throughput",
- "latency",
- "exacto",
- ],
- UnrecognizedStr,
-]
-r"""The provider sorting strategy (price, throughput, latency)"""
-
-
-ProviderPreferencesSortUnionTypedDict = TypeAliasType(
- "ProviderPreferencesSortUnionTypedDict",
- Union[
- ProviderPreferencesProviderSort,
- ProviderPreferencesProviderSortConfigUnionTypedDict,
- ProviderPreferencesSortEnum,
- ],
-)
-r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
-
-ProviderPreferencesSortUnion = TypeAliasType(
- "ProviderPreferencesSortUnion",
- Union[
- Annotated[
- ProviderPreferencesProviderSort, PlainValidator(validate_open_enum(False))
- ],
- ProviderPreferencesProviderSortConfigUnion,
- Annotated[
- ProviderPreferencesSortEnum, PlainValidator(validate_open_enum(False))
- ],
- ],
-)
-r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
-
-class ProviderPreferencesMaxPriceTypedDict(TypedDict):
+class MaxPriceTypedDict(TypedDict):
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
- prompt: NotRequired[str]
- r"""Price per million prompt tokens"""
+ audio: NotRequired[str]
completion: NotRequired[str]
image: NotRequired[str]
- audio: NotRequired[str]
+ prompt: NotRequired[str]
+ r"""Price per million prompt tokens"""
request: NotRequired[str]
-class ProviderPreferencesMaxPrice(BaseModel):
+class MaxPrice(BaseModel):
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
- prompt: Optional[str] = None
- r"""Price per million prompt tokens"""
+ audio: Optional[str] = None
completion: Optional[str] = None
image: Optional[str] = None
- audio: Optional[str] = None
+ prompt: Optional[str] = None
+ r"""Price per million prompt tokens"""
request: Optional[str] = None
+OnlyTypedDict = TypeAliasType("OnlyTypedDict", Union[ProviderName, str])
+
+
+Only = TypeAliasType(
+ "Only",
+ Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
+)
+
+
+OrderTypedDict = TypeAliasType("OrderTypedDict", Union[ProviderName, str])
+
+
+Order = TypeAliasType(
+ "Order",
+ Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
+)
+
+
+SortTypedDict = TypeAliasType(
+ "SortTypedDict", Union[ProviderSortConfigTypedDict, ProviderSort, Any]
+)
+r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
+
+
+Sort = TypeAliasType(
+ "Sort",
+ Union[
+ ProviderSortConfig,
+ Annotated[ProviderSort, PlainValidator(validate_open_enum(False))],
+ Any,
+ ],
+)
+r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
+
+
class ProviderPreferencesTypedDict(TypedDict):
- r"""Provider routing preferences for the request."""
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
allow_fallbacks: NotRequired[Nullable[bool]]
r"""Whether to allow backup providers to serve requests
@@ -239,37 +118,38 @@ class ProviderPreferencesTypedDict(TypedDict):
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
"""
- require_parameters: NotRequired[Nullable[bool]]
- r"""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."""
data_collection: NotRequired[Nullable[DataCollection]]
r"""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.
"""
- zdr: NotRequired[Nullable[bool]]
- r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
enforce_distillable_text: NotRequired[Nullable[bool]]
r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
- order: NotRequired[Nullable[List[ProviderPreferencesOrderTypedDict]]]
- r"""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."""
- only: NotRequired[Nullable[List[ProviderPreferencesOnlyTypedDict]]]
- r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
- ignore: NotRequired[Nullable[List[ProviderPreferencesIgnoreTypedDict]]]
+ ignore: NotRequired[Nullable[List[IgnoreTypedDict]]]
r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
- quantizations: NotRequired[Nullable[List[Quantization]]]
- r"""A list of quantization levels to filter the provider by."""
- sort: NotRequired[Nullable[ProviderPreferencesSortUnionTypedDict]]
- max_price: NotRequired[ProviderPreferencesMaxPriceTypedDict]
+ max_price: NotRequired[MaxPriceTypedDict]
r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
- preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]]
- r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
+ only: NotRequired[Nullable[List[OnlyTypedDict]]]
+ r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
+ order: NotRequired[Nullable[List[OrderTypedDict]]]
+ r"""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."""
preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]]
r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
+ preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]]
+ r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
+ quantizations: NotRequired[Nullable[List[Quantization]]]
+ r"""A list of quantization levels to filter the provider by."""
+ require_parameters: NotRequired[Nullable[bool]]
+ r"""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."""
+ sort: NotRequired[Nullable[SortTypedDict]]
+ r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
+ zdr: NotRequired[Nullable[bool]]
+ r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
class ProviderPreferences(BaseModel):
- r"""Provider routing preferences for the request."""
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
allow_fallbacks: OptionalNullable[bool] = UNSET
r"""Whether to allow backup providers to serve requests
@@ -278,9 +158,6 @@ class ProviderPreferences(BaseModel):
"""
- require_parameters: OptionalNullable[bool] = UNSET
- r"""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."""
-
data_collection: Annotated[
OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False))
] = UNSET
@@ -290,67 +167,71 @@ class ProviderPreferences(BaseModel):
- deny: use only providers which do not collect user data.
"""
- zdr: OptionalNullable[bool] = UNSET
- r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
-
enforce_distillable_text: OptionalNullable[bool] = UNSET
r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
- order: OptionalNullable[List[ProviderPreferencesOrder]] = UNSET
- r"""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."""
+ ignore: OptionalNullable[List[Ignore]] = UNSET
+ r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
- only: OptionalNullable[List[ProviderPreferencesOnly]] = UNSET
+ max_price: Optional[MaxPrice] = None
+ r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
+
+ only: OptionalNullable[List[Only]] = UNSET
r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
- ignore: OptionalNullable[List[ProviderPreferencesIgnore]] = UNSET
- r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
+ order: OptionalNullable[List[Order]] = UNSET
+ r"""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."""
+
+ preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET
+ r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
+
+ preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET
+ r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
quantizations: OptionalNullable[
List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]]
] = UNSET
r"""A list of quantization levels to filter the provider by."""
- sort: OptionalNullable[ProviderPreferencesSortUnion] = UNSET
+ require_parameters: OptionalNullable[bool] = UNSET
+ r"""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."""
- max_price: Optional[ProviderPreferencesMaxPrice] = None
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
+ sort: OptionalNullable[Sort] = UNSET
+ r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
- preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET
- r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
- preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET
- r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
+ zdr: OptionalNullable[bool] = UNSET
+ r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
"allow_fallbacks",
- "require_parameters",
"data_collection",
- "zdr",
"enforce_distillable_text",
- "order",
- "only",
"ignore",
- "quantizations",
- "sort",
"max_price",
- "preferred_min_throughput",
+ "only",
+ "order",
"preferred_max_latency",
+ "preferred_min_throughput",
+ "quantizations",
+ "require_parameters",
+ "sort",
+ "zdr",
]
nullable_fields = [
"allow_fallbacks",
- "require_parameters",
"data_collection",
- "zdr",
"enforce_distillable_text",
- "order",
- "only",
"ignore",
- "quantizations",
- "sort",
- "preferred_min_throughput",
+ "only",
+ "order",
"preferred_max_latency",
+ "preferred_min_throughput",
+ "quantizations",
+ "require_parameters",
+ "sort",
+ "zdr",
]
null_default_fields = []
diff --git a/src/openrouter/components/providerresponse.py b/src/openrouter/components/providerresponse.py
new file mode 100644
index 0000000..4856eee
--- /dev/null
+++ b/src/openrouter/components/providerresponse.py
@@ -0,0 +1,207 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+ProviderResponseProviderName = Union[
+ Literal[
+ "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",
+ ],
+ UnrecognizedStr,
+]
+r"""Name of the provider"""
+
+
+class ProviderResponseTypedDict(TypedDict):
+ r"""Details of a provider response for a generation attempt"""
+
+ status: Nullable[float]
+ r"""HTTP status code from the provider"""
+ endpoint_id: NotRequired[str]
+ r"""Internal endpoint identifier"""
+ id: NotRequired[str]
+ r"""Upstream provider response identifier"""
+ is_byok: NotRequired[bool]
+ r"""Whether the request used a bring-your-own-key"""
+ latency: NotRequired[float]
+ r"""Response latency in milliseconds"""
+ model_permaslug: NotRequired[str]
+ r"""Canonical model slug"""
+ provider_name: NotRequired[ProviderResponseProviderName]
+ r"""Name of the provider"""
+
+
+class ProviderResponse(BaseModel):
+ r"""Details of a provider response for a generation attempt"""
+
+ status: Nullable[float]
+ r"""HTTP status code from the provider"""
+
+ endpoint_id: Optional[str] = None
+ r"""Internal endpoint identifier"""
+
+ id: Optional[str] = None
+ r"""Upstream provider response identifier"""
+
+ is_byok: Optional[bool] = None
+ r"""Whether the request used a bring-your-own-key"""
+
+ latency: Optional[float] = None
+ r"""Response latency in milliseconds"""
+
+ model_permaslug: Optional[str] = None
+ r"""Canonical model slug"""
+
+ provider_name: Annotated[
+ Optional[ProviderResponseProviderName],
+ PlainValidator(validate_open_enum(False)),
+ ] = None
+ r"""Name of the provider"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "endpoint_id",
+ "id",
+ "is_byok",
+ "latency",
+ "model_permaslug",
+ "provider_name",
+ ]
+ nullable_fields = ["status"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/publicendpoint.py b/src/openrouter/components/publicendpoint.py
index 522f96b..04885b1 100644
--- a/src/openrouter/components/publicendpoint.py
+++ b/src/openrouter/components/publicendpoint.py
@@ -14,50 +14,50 @@ from typing_extensions import Annotated, NotRequired, TypedDict
class PricingTypedDict(TypedDict):
- prompt: str
completion: str
- request: NotRequired[str]
- image: NotRequired[str]
- image_token: NotRequired[str]
- image_output: NotRequired[str]
+ prompt: str
audio: NotRequired[str]
audio_output: NotRequired[str]
+ discount: NotRequired[float]
+ image: NotRequired[str]
+ image_output: NotRequired[str]
+ image_token: NotRequired[str]
input_audio_cache: NotRequired[str]
- web_search: NotRequired[str]
- internal_reasoning: NotRequired[str]
input_cache_read: NotRequired[str]
input_cache_write: NotRequired[str]
- discount: NotRequired[float]
+ internal_reasoning: NotRequired[str]
+ request: NotRequired[str]
+ web_search: NotRequired[str]
class Pricing(BaseModel):
- prompt: str
-
completion: str
- request: Optional[str] = None
-
- image: Optional[str] = None
-
- image_token: Optional[str] = None
-
- image_output: Optional[str] = None
+ prompt: str
audio: Optional[str] = None
audio_output: Optional[str] = None
+ discount: Optional[float] = None
+
+ image: Optional[str] = None
+
+ image_output: Optional[str] = None
+
+ image_token: Optional[str] = None
+
input_audio_cache: Optional[str] = None
- web_search: Optional[str] = None
-
- internal_reasoning: Optional[str] = None
-
input_cache_read: Optional[str] = None
input_cache_write: Optional[str] = None
- discount: Optional[float] = None
+ internal_reasoning: Optional[str] = None
+
+ request: Optional[str] = None
+
+ web_search: Optional[str] = None
PublicEndpointQuantization = Union[
@@ -79,65 +79,75 @@ PublicEndpointQuantization = Union[
class PublicEndpointTypedDict(TypedDict):
r"""Information about a specific model endpoint"""
- name: str
+ context_length: int
+ latency_last_30m: Nullable[PercentileStatsTypedDict]
+ r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests."""
+ max_completion_tokens: int
+ max_prompt_tokens: int
model_id: str
r"""The unique identifier for the model (permaslug)"""
model_name: str
- context_length: float
+ name: str
pricing: PricingTypedDict
provider_name: ProviderName
- tag: str
quantization: Nullable[PublicEndpointQuantization]
- max_completion_tokens: Nullable[float]
- max_prompt_tokens: Nullable[float]
supported_parameters: List[Parameter]
- uptime_last_30m: Nullable[float]
supports_implicit_caching: bool
- latency_last_30m: Nullable[PercentileStatsTypedDict]
- r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests."""
+ tag: str
throughput_last_30m: Nullable[PercentileStatsTypedDict]
+ uptime_last_1d: float
+ r"""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."""
+ uptime_last_30m: float
+ uptime_last_5m: float
+ r"""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."""
status: NotRequired[EndpointStatus]
class PublicEndpoint(BaseModel):
r"""Information about a specific model endpoint"""
- name: str
+ context_length: int
+
+ latency_last_30m: Nullable[PercentileStats]
+ r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests."""
+
+ max_completion_tokens: int
+
+ max_prompt_tokens: int
model_id: str
r"""The unique identifier for the model (permaslug)"""
model_name: str
- context_length: float
+ name: str
pricing: Pricing
provider_name: Annotated[ProviderName, PlainValidator(validate_open_enum(False))]
- tag: str
-
quantization: Annotated[
Nullable[PublicEndpointQuantization], PlainValidator(validate_open_enum(False))
]
- max_completion_tokens: Nullable[float]
-
- max_prompt_tokens: Nullable[float]
-
supported_parameters: List[
Annotated[Parameter, PlainValidator(validate_open_enum(False))]
]
- uptime_last_30m: Nullable[float]
-
supports_implicit_caching: bool
- latency_last_30m: Nullable[PercentileStats]
- r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests."""
+ tag: str
throughput_last_30m: Nullable[PercentileStats]
+ uptime_last_1d: float
+ r"""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."""
+
+ uptime_last_30m: float
+
+ uptime_last_5m: float
+ r"""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."""
+
status: Annotated[
Optional[EndpointStatus], PlainValidator(validate_open_enum(True))
] = None
@@ -145,14 +155,7 @@ class PublicEndpoint(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["status"]
- nullable_fields = [
- "quantization",
- "max_completion_tokens",
- "max_prompt_tokens",
- "uptime_last_30m",
- "latency_last_30m",
- "throughput_last_30m",
- ]
+ nullable_fields = ["latency_last_30m", "quantization", "throughput_last_30m"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/publicpricing.py b/src/openrouter/components/publicpricing.py
index 0aef8d6..42a2928 100644
--- a/src/openrouter/components/publicpricing.py
+++ b/src/openrouter/components/publicpricing.py
@@ -9,49 +9,49 @@ from typing_extensions import NotRequired, TypedDict
class PublicPricingTypedDict(TypedDict):
r"""Pricing information for the model"""
- prompt: str
completion: str
- request: NotRequired[str]
- image: NotRequired[str]
- image_token: NotRequired[str]
- image_output: NotRequired[str]
+ prompt: str
audio: NotRequired[str]
audio_output: NotRequired[str]
+ discount: NotRequired[float]
+ image: NotRequired[str]
+ image_output: NotRequired[str]
+ image_token: NotRequired[str]
input_audio_cache: NotRequired[str]
- web_search: NotRequired[str]
- internal_reasoning: NotRequired[str]
input_cache_read: NotRequired[str]
input_cache_write: NotRequired[str]
- discount: NotRequired[float]
+ internal_reasoning: NotRequired[str]
+ request: NotRequired[str]
+ web_search: NotRequired[str]
class PublicPricing(BaseModel):
r"""Pricing information for the model"""
- prompt: str
-
completion: str
- request: Optional[str] = None
-
- image: Optional[str] = None
-
- image_token: Optional[str] = None
-
- image_output: Optional[str] = None
+ prompt: str
audio: Optional[str] = None
audio_output: Optional[str] = None
+ discount: Optional[float] = None
+
+ image: Optional[str] = None
+
+ image_output: Optional[str] = None
+
+ image_token: Optional[str] = None
+
input_audio_cache: Optional[str] = None
- web_search: Optional[str] = None
-
- internal_reasoning: Optional[str] = None
-
input_cache_read: Optional[str] = None
input_cache_write: Optional[str] = None
- discount: Optional[float] = None
+ internal_reasoning: Optional[str] = None
+
+ request: Optional[str] = None
+
+ web_search: Optional[str] = None
diff --git a/src/openrouter/components/reasoningconfig.py b/src/openrouter/components/reasoningconfig.py
index 513a56d..7157cd7 100644
--- a/src/openrouter/components/reasoningconfig.py
+++ b/src/openrouter/components/reasoningconfig.py
@@ -1,8 +1,8 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .reasoningeffortenum import ReasoningEffortEnum
-from .reasoningsummaryverbosityenum import ReasoningSummaryVerbosityEnum
+from .reasoningeffort import ReasoningEffort
+from .reasoningsummaryverbosity import ReasoningSummaryVerbosity
from openrouter.types import (
BaseModel,
Nullable,
@@ -13,38 +13,39 @@ from openrouter.types import (
from openrouter.utils import validate_open_enum
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ReasoningConfigTypedDict(TypedDict):
r"""Configuration for reasoning mode in the response"""
- effort: NotRequired[Nullable[ReasoningEffortEnum]]
- summary: NotRequired[Nullable[ReasoningSummaryVerbosityEnum]]
- max_tokens: NotRequired[Nullable[float]]
+ effort: NotRequired[Nullable[ReasoningEffort]]
+ summary: NotRequired[Nullable[ReasoningSummaryVerbosity]]
enabled: NotRequired[Nullable[bool]]
+ max_tokens: NotRequired[int]
class ReasoningConfig(BaseModel):
r"""Configuration for reasoning mode in the response"""
effort: Annotated[
- OptionalNullable[ReasoningEffortEnum], PlainValidator(validate_open_enum(False))
+ OptionalNullable[ReasoningEffort], PlainValidator(validate_open_enum(False))
] = UNSET
summary: Annotated[
- OptionalNullable[ReasoningSummaryVerbosityEnum],
+ OptionalNullable[ReasoningSummaryVerbosity],
PlainValidator(validate_open_enum(False)),
] = UNSET
- max_tokens: OptionalNullable[float] = UNSET
-
enabled: OptionalNullable[bool] = UNSET
+ max_tokens: Optional[int] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["effort", "summary", "max_tokens", "enabled"]
- nullable_fields = ["effort", "summary", "max_tokens", "enabled"]
+ optional_fields = ["effort", "summary", "enabled", "max_tokens"]
+ nullable_fields = ["effort", "summary", "enabled"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/reasoningdeltaevent.py b/src/openrouter/components/reasoningdeltaevent.py
index ef4af5f..fce551f 100644
--- a/src/openrouter/components/reasoningdeltaevent.py
+++ b/src/openrouter/components/reasoningdeltaevent.py
@@ -12,25 +12,25 @@ ReasoningDeltaEventType = Literal["response.reasoning_text.delta",]
class ReasoningDeltaEventTypedDict(TypedDict):
r"""Event emitted when reasoning text delta is streamed"""
- type: ReasoningDeltaEventType
- output_index: float
- item_id: str
- content_index: float
+ content_index: int
delta: str
- sequence_number: float
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: ReasoningDeltaEventType
class ReasoningDeltaEvent(BaseModel):
r"""Event emitted when reasoning text delta is streamed"""
- type: ReasoningDeltaEventType
-
- output_index: float
-
- item_id: str
-
- content_index: float
+ content_index: int
delta: str
- sequence_number: float
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: ReasoningDeltaEventType
diff --git a/src/openrouter/components/reasoningdetailencrypted.py b/src/openrouter/components/reasoningdetailencrypted.py
index e8d1942..0cfaff9 100644
--- a/src/openrouter/components/reasoningdetailencrypted.py
+++ b/src/openrouter/components/reasoningdetailencrypted.py
@@ -1,71 +1,57 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .reasoningformat import ReasoningFormat
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 import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
ReasoningDetailEncryptedType = Literal["reasoning.encrypted",]
-ReasoningDetailEncryptedFormat = Union[
- Literal[
- "unknown",
- "openai-responses-v1",
- "azure-openai-responses-v1",
- "xai-responses-v1",
- "anthropic-claude-v1",
- "google-gemini-v1",
- ],
- UnrecognizedStr,
-]
-
-
class ReasoningDetailEncryptedTypedDict(TypedDict):
r"""Reasoning detail encrypted schema"""
- type: ReasoningDetailEncryptedType
data: str
+ type: ReasoningDetailEncryptedType
+ format_: NotRequired[Nullable[ReasoningFormat]]
id: NotRequired[Nullable[str]]
- format_: NotRequired[Nullable[ReasoningDetailEncryptedFormat]]
- index: NotRequired[float]
+ index: NotRequired[int]
class ReasoningDetailEncrypted(BaseModel):
r"""Reasoning detail encrypted schema"""
- type: ReasoningDetailEncryptedType
-
data: str
- id: OptionalNullable[str] = UNSET
+ type: ReasoningDetailEncryptedType
format_: Annotated[
Annotated[
- OptionalNullable[ReasoningDetailEncryptedFormat],
- PlainValidator(validate_open_enum(False)),
+ OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
- index: Optional[float] = None
+ id: OptionalNullable[str] = UNSET
+
+ index: Optional[int] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["id", "format", "index"]
- nullable_fields = ["id", "format"]
+ optional_fields = ["format", "id", "index"]
+ nullable_fields = ["format", "id"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/reasoningdetailsummary.py b/src/openrouter/components/reasoningdetailsummary.py
index 19be6e5..ceab1ea 100644
--- a/src/openrouter/components/reasoningdetailsummary.py
+++ b/src/openrouter/components/reasoningdetailsummary.py
@@ -1,71 +1,57 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .reasoningformat import ReasoningFormat
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 import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
ReasoningDetailSummaryType = Literal["reasoning.summary",]
-ReasoningDetailSummaryFormat = Union[
- Literal[
- "unknown",
- "openai-responses-v1",
- "azure-openai-responses-v1",
- "xai-responses-v1",
- "anthropic-claude-v1",
- "google-gemini-v1",
- ],
- UnrecognizedStr,
-]
-
-
class ReasoningDetailSummaryTypedDict(TypedDict):
r"""Reasoning detail summary schema"""
- type: ReasoningDetailSummaryType
summary: str
+ type: ReasoningDetailSummaryType
+ format_: NotRequired[Nullable[ReasoningFormat]]
id: NotRequired[Nullable[str]]
- format_: NotRequired[Nullable[ReasoningDetailSummaryFormat]]
- index: NotRequired[float]
+ index: NotRequired[int]
class ReasoningDetailSummary(BaseModel):
r"""Reasoning detail summary schema"""
- type: ReasoningDetailSummaryType
-
summary: str
- id: OptionalNullable[str] = UNSET
+ type: ReasoningDetailSummaryType
format_: Annotated[
Annotated[
- OptionalNullable[ReasoningDetailSummaryFormat],
- PlainValidator(validate_open_enum(False)),
+ OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
- index: Optional[float] = None
+ id: OptionalNullable[str] = UNSET
+
+ index: Optional[int] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["id", "format", "index"]
- nullable_fields = ["id", "format"]
+ optional_fields = ["format", "id", "index"]
+ nullable_fields = ["format", "id"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/reasoningdetailtext.py b/src/openrouter/components/reasoningdetailtext.py
index 422067d..a21b8ed 100644
--- a/src/openrouter/components/reasoningdetailtext.py
+++ b/src/openrouter/components/reasoningdetailtext.py
@@ -1,47 +1,34 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .reasoningformat import ReasoningFormat
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 import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
ReasoningDetailTextType = Literal["reasoning.text",]
-ReasoningDetailTextFormat = Union[
- Literal[
- "unknown",
- "openai-responses-v1",
- "azure-openai-responses-v1",
- "xai-responses-v1",
- "anthropic-claude-v1",
- "google-gemini-v1",
- ],
- UnrecognizedStr,
-]
-
-
class ReasoningDetailTextTypedDict(TypedDict):
r"""Reasoning detail text schema"""
type: ReasoningDetailTextType
- text: NotRequired[Nullable[str]]
- signature: NotRequired[Nullable[str]]
+ format_: NotRequired[Nullable[ReasoningFormat]]
id: NotRequired[Nullable[str]]
- format_: NotRequired[Nullable[ReasoningDetailTextFormat]]
- index: NotRequired[float]
+ index: NotRequired[int]
+ signature: NotRequired[Nullable[str]]
+ text: NotRequired[Nullable[str]]
class ReasoningDetailText(BaseModel):
@@ -49,26 +36,25 @@ class ReasoningDetailText(BaseModel):
type: ReasoningDetailTextType
- text: OptionalNullable[str] = UNSET
-
- signature: OptionalNullable[str] = UNSET
-
- id: OptionalNullable[str] = UNSET
-
format_: Annotated[
Annotated[
- OptionalNullable[ReasoningDetailTextFormat],
- PlainValidator(validate_open_enum(False)),
+ OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
- index: Optional[float] = None
+ id: OptionalNullable[str] = UNSET
+
+ index: Optional[int] = None
+
+ signature: OptionalNullable[str] = UNSET
+
+ text: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["text", "signature", "id", "format", "index"]
- nullable_fields = ["text", "signature", "id", "format"]
+ optional_fields = ["format", "id", "index", "signature", "text"]
+ nullable_fields = ["format", "id", "signature", "text"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/reasoningdetailunion.py b/src/openrouter/components/reasoningdetailunion.py
index 6364730..42ce663 100644
--- a/src/openrouter/components/reasoningdetailunion.py
+++ b/src/openrouter/components/reasoningdetailunion.py
@@ -29,8 +29,8 @@ r"""Reasoning detail union schema"""
ReasoningDetailUnion = Annotated[
Union[
- Annotated[ReasoningDetailSummary, Tag("reasoning.summary")],
Annotated[ReasoningDetailEncrypted, Tag("reasoning.encrypted")],
+ Annotated[ReasoningDetailSummary, Tag("reasoning.summary")],
Annotated[ReasoningDetailText, Tag("reasoning.text")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
diff --git a/src/openrouter/components/reasoningdoneevent.py b/src/openrouter/components/reasoningdoneevent.py
index 3dcca9f..29c0fc9 100644
--- a/src/openrouter/components/reasoningdoneevent.py
+++ b/src/openrouter/components/reasoningdoneevent.py
@@ -12,25 +12,25 @@ ReasoningDoneEventType = Literal["response.reasoning_text.done",]
class ReasoningDoneEventTypedDict(TypedDict):
r"""Event emitted when reasoning text streaming is complete"""
- type: ReasoningDoneEventType
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
+ sequence_number: int
text: str
- sequence_number: float
+ type: ReasoningDoneEventType
class ReasoningDoneEvent(BaseModel):
r"""Event emitted when reasoning text streaming is complete"""
- type: ReasoningDoneEventType
-
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
+
+ sequence_number: int
text: str
- sequence_number: float
+ type: ReasoningDoneEventType
diff --git a/src/openrouter/components/reasoningeffortenum.py b/src/openrouter/components/reasoningeffort.py
similarity index 91%
rename from src/openrouter/components/reasoningeffortenum.py
rename to src/openrouter/components/reasoningeffort.py
index 58d10b5..3cf5b2e 100644
--- a/src/openrouter/components/reasoningeffortenum.py
+++ b/src/openrouter/components/reasoningeffort.py
@@ -5,7 +5,7 @@ from openrouter.types import UnrecognizedStr
from typing import Literal, Union
-ReasoningEffortEnum = Union[
+ReasoningEffort = Union[
Literal[
"xhigh",
"high",
diff --git a/src/openrouter/components/reasoningformat.py b/src/openrouter/components/reasoningformat.py
new file mode 100644
index 0000000..3145901
--- /dev/null
+++ b/src/openrouter/components/reasoningformat.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
+
+
+ReasoningFormat = Union[
+ Literal[
+ "unknown",
+ "openai-responses-v1",
+ "azure-openai-responses-v1",
+ "xai-responses-v1",
+ "anthropic-claude-v1",
+ "google-gemini-v1",
+ ],
+ UnrecognizedStr,
+]
diff --git a/src/openrouter/components/reasoningitem.py b/src/openrouter/components/reasoningitem.py
index 9fdf1e6..43d3ff5 100644
--- a/src/openrouter/components/reasoningitem.py
+++ b/src/openrouter/components/reasoningitem.py
@@ -1,6 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .reasoningformat import ReasoningFormat
from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict
from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict
from openrouter.types import (
@@ -9,7 +10,6 @@ from openrouter.types import (
OptionalNullable,
UNSET,
UNSET_SENTINEL,
- UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
import pydantic
@@ -19,9 +19,6 @@ from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
-ReasoningItemType = Literal["reasoning",]
-
-
ReasoningItemStatusInProgress = Literal["in_progress",]
@@ -51,67 +48,56 @@ ReasoningItemStatusUnion = TypeAliasType(
)
-ReasoningItemFormat = Union[
- Literal[
- "unknown",
- "openai-responses-v1",
- "azure-openai-responses-v1",
- "xai-responses-v1",
- "anthropic-claude-v1",
- "google-gemini-v1",
- ],
- UnrecognizedStr,
-]
+ReasoningItemType = Literal["reasoning",]
class ReasoningItemTypedDict(TypedDict):
r"""Reasoning output item with signature and format extensions"""
- type: ReasoningItemType
id: str
summary: List[ReasoningSummaryTextTypedDict]
+ type: ReasoningItemType
content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]]
encrypted_content: NotRequired[Nullable[str]]
status: NotRequired[ReasoningItemStatusUnionTypedDict]
+ format_: NotRequired[Nullable[ReasoningFormat]]
signature: NotRequired[Nullable[str]]
- format_: NotRequired[Nullable[ReasoningItemFormat]]
class ReasoningItem(BaseModel):
r"""Reasoning output item with signature and format extensions"""
- type: ReasoningItemType
-
id: str
summary: List[ReasoningSummaryText]
+ type: ReasoningItemType
+
content: OptionalNullable[List[ReasoningTextContent]] = UNSET
encrypted_content: OptionalNullable[str] = UNSET
status: Optional[ReasoningItemStatusUnion] = None
- signature: OptionalNullable[str] = UNSET
-
format_: Annotated[
Annotated[
- OptionalNullable[ReasoningItemFormat],
- PlainValidator(validate_open_enum(False)),
+ OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
+ signature: OptionalNullable[str] = UNSET
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
"content",
"encrypted_content",
"status",
- "signature",
"format",
+ "signature",
]
- nullable_fields = ["content", "encrypted_content", "signature", "format"]
+ nullable_fields = ["content", "encrypted_content", "format", "signature"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/reasoningsummarypartaddedevent.py b/src/openrouter/components/reasoningsummarypartaddedevent.py
index 1c451f8..e498256 100644
--- a/src/openrouter/components/reasoningsummarypartaddedevent.py
+++ b/src/openrouter/components/reasoningsummarypartaddedevent.py
@@ -13,25 +13,25 @@ ReasoningSummaryPartAddedEventType = Literal["response.reasoning_summary_part.ad
class ReasoningSummaryPartAddedEventTypedDict(TypedDict):
r"""Event emitted when a reasoning summary part is added"""
- type: ReasoningSummaryPartAddedEventType
- output_index: float
item_id: str
- summary_index: float
+ output_index: int
part: ReasoningSummaryTextTypedDict
- sequence_number: float
+ sequence_number: int
+ summary_index: int
+ type: ReasoningSummaryPartAddedEventType
class ReasoningSummaryPartAddedEvent(BaseModel):
r"""Event emitted when a reasoning summary part is added"""
- type: ReasoningSummaryPartAddedEventType
-
- output_index: float
-
item_id: str
- summary_index: float
+ output_index: int
part: ReasoningSummaryText
- sequence_number: float
+ sequence_number: int
+
+ summary_index: int
+
+ type: ReasoningSummaryPartAddedEventType
diff --git a/src/openrouter/components/reasoningsummarypartdoneevent.py b/src/openrouter/components/reasoningsummarypartdoneevent.py
index f229104..b1d4fa8 100644
--- a/src/openrouter/components/reasoningsummarypartdoneevent.py
+++ b/src/openrouter/components/reasoningsummarypartdoneevent.py
@@ -13,25 +13,25 @@ ReasoningSummaryPartDoneEventType = Literal["response.reasoning_summary_part.don
class ReasoningSummaryPartDoneEventTypedDict(TypedDict):
r"""Event emitted when a reasoning summary part is complete"""
- type: ReasoningSummaryPartDoneEventType
- output_index: float
item_id: str
- summary_index: float
+ output_index: int
part: ReasoningSummaryTextTypedDict
- sequence_number: float
+ sequence_number: int
+ summary_index: int
+ type: ReasoningSummaryPartDoneEventType
class ReasoningSummaryPartDoneEvent(BaseModel):
r"""Event emitted when a reasoning summary part is complete"""
- type: ReasoningSummaryPartDoneEventType
-
- output_index: float
-
item_id: str
- summary_index: float
+ output_index: int
part: ReasoningSummaryText
- sequence_number: float
+ sequence_number: int
+
+ summary_index: int
+
+ type: ReasoningSummaryPartDoneEventType
diff --git a/src/openrouter/components/reasoningsummarytext.py b/src/openrouter/components/reasoningsummarytext.py
index 55e368f..c6d9117 100644
--- a/src/openrouter/components/reasoningsummarytext.py
+++ b/src/openrouter/components/reasoningsummarytext.py
@@ -10,11 +10,11 @@ ReasoningSummaryTextType = Literal["summary_text",]
class ReasoningSummaryTextTypedDict(TypedDict):
- type: ReasoningSummaryTextType
text: str
+ type: ReasoningSummaryTextType
class ReasoningSummaryText(BaseModel):
- type: ReasoningSummaryTextType
-
text: str
+
+ type: ReasoningSummaryTextType
diff --git a/src/openrouter/components/reasoningsummarytextdeltaevent.py b/src/openrouter/components/reasoningsummarytextdeltaevent.py
index f5070ae..05be183 100644
--- a/src/openrouter/components/reasoningsummarytextdeltaevent.py
+++ b/src/openrouter/components/reasoningsummarytextdeltaevent.py
@@ -12,25 +12,25 @@ ReasoningSummaryTextDeltaEventType = Literal["response.reasoning_summary_text.de
class ReasoningSummaryTextDeltaEventTypedDict(TypedDict):
r"""Event emitted when reasoning summary text delta is streamed"""
- type: ReasoningSummaryTextDeltaEventType
- item_id: str
- output_index: float
- summary_index: float
delta: str
- sequence_number: float
+ item_id: str
+ output_index: int
+ sequence_number: int
+ summary_index: int
+ type: ReasoningSummaryTextDeltaEventType
class ReasoningSummaryTextDeltaEvent(BaseModel):
r"""Event emitted when reasoning summary text delta is streamed"""
- type: ReasoningSummaryTextDeltaEventType
+ delta: str
item_id: str
- output_index: float
+ output_index: int
- summary_index: float
+ sequence_number: int
- delta: str
+ summary_index: int
- sequence_number: float
+ type: ReasoningSummaryTextDeltaEventType
diff --git a/src/openrouter/components/reasoningsummarytextdoneevent.py b/src/openrouter/components/reasoningsummarytextdoneevent.py
index 2f0d77b..a9d1f8c 100644
--- a/src/openrouter/components/reasoningsummarytextdoneevent.py
+++ b/src/openrouter/components/reasoningsummarytextdoneevent.py
@@ -12,25 +12,25 @@ ReasoningSummaryTextDoneEventType = Literal["response.reasoning_summary_text.don
class ReasoningSummaryTextDoneEventTypedDict(TypedDict):
r"""Event emitted when reasoning summary text streaming is complete"""
- type: ReasoningSummaryTextDoneEventType
item_id: str
- output_index: float
- summary_index: float
+ output_index: int
+ sequence_number: int
+ summary_index: int
text: str
- sequence_number: float
+ type: ReasoningSummaryTextDoneEventType
class ReasoningSummaryTextDoneEvent(BaseModel):
r"""Event emitted when reasoning summary text streaming is complete"""
- type: ReasoningSummaryTextDoneEventType
-
item_id: str
- output_index: float
+ output_index: int
- summary_index: float
+ sequence_number: int
+
+ summary_index: int
text: str
- sequence_number: float
+ type: ReasoningSummaryTextDoneEventType
diff --git a/src/openrouter/components/reasoningsummaryverbosityenum.py b/src/openrouter/components/reasoningsummaryverbosity.py
similarity index 88%
rename from src/openrouter/components/reasoningsummaryverbosityenum.py
rename to src/openrouter/components/reasoningsummaryverbosity.py
index 6cfcfb3..6ed1f76 100644
--- a/src/openrouter/components/reasoningsummaryverbosityenum.py
+++ b/src/openrouter/components/reasoningsummaryverbosity.py
@@ -5,7 +5,7 @@ from openrouter.types import UnrecognizedStr
from typing import Literal, Union
-ReasoningSummaryVerbosityEnum = Union[
+ReasoningSummaryVerbosity = Union[
Literal[
"auto",
"concise",
diff --git a/src/openrouter/components/reasoningtextcontent.py b/src/openrouter/components/reasoningtextcontent.py
index ecac43e..95a557a 100644
--- a/src/openrouter/components/reasoningtextcontent.py
+++ b/src/openrouter/components/reasoningtextcontent.py
@@ -10,11 +10,11 @@ ReasoningTextContentType = Literal["reasoning_text",]
class ReasoningTextContentTypedDict(TypedDict):
- type: ReasoningTextContentType
text: str
+ type: ReasoningTextContentType
class ReasoningTextContent(BaseModel):
- type: ReasoningTextContentType
-
text: str
+
+ type: ReasoningTextContentType
diff --git a/src/openrouter/components/refusaldeltaevent.py b/src/openrouter/components/refusaldeltaevent.py
index fa8e880..72f6185 100644
--- a/src/openrouter/components/refusaldeltaevent.py
+++ b/src/openrouter/components/refusaldeltaevent.py
@@ -12,25 +12,25 @@ RefusalDeltaEventType = Literal["response.refusal.delta",]
class RefusalDeltaEventTypedDict(TypedDict):
r"""Event emitted when a refusal delta is streamed"""
- type: RefusalDeltaEventType
- output_index: float
- item_id: str
- content_index: float
+ content_index: int
delta: str
- sequence_number: float
+ item_id: str
+ output_index: int
+ sequence_number: int
+ type: RefusalDeltaEventType
class RefusalDeltaEvent(BaseModel):
r"""Event emitted when a refusal delta is streamed"""
- type: RefusalDeltaEventType
-
- output_index: float
-
- item_id: str
-
- content_index: float
+ content_index: int
delta: str
- sequence_number: float
+ item_id: str
+
+ output_index: int
+
+ sequence_number: int
+
+ type: RefusalDeltaEventType
diff --git a/src/openrouter/components/refusaldoneevent.py b/src/openrouter/components/refusaldoneevent.py
index 7865231..e09987e 100644
--- a/src/openrouter/components/refusaldoneevent.py
+++ b/src/openrouter/components/refusaldoneevent.py
@@ -12,25 +12,25 @@ RefusalDoneEventType = Literal["response.refusal.done",]
class RefusalDoneEventTypedDict(TypedDict):
r"""Event emitted when refusal streaming is complete"""
- type: RefusalDoneEventType
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
refusal: str
- sequence_number: float
+ sequence_number: int
+ type: RefusalDoneEventType
class RefusalDoneEvent(BaseModel):
r"""Event emitted when refusal streaming is complete"""
- type: RefusalDoneEventType
-
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ output_index: int
refusal: str
- sequence_number: float
+ sequence_number: int
+
+ type: RefusalDoneEventType
diff --git a/src/openrouter/components/responsehealingplugin.py b/src/openrouter/components/responsehealingplugin.py
new file mode 100644
index 0000000..c13279f
--- /dev/null
+++ b/src/openrouter/components/responsehealingplugin.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 typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+ResponseHealingPluginID = Literal["response-healing",]
+
+
+class ResponseHealingPluginTypedDict(TypedDict):
+ id: ResponseHealingPluginID
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
+
+
+class ResponseHealingPlugin(BaseModel):
+ id: ResponseHealingPluginID
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
diff --git a/src/openrouter/components/responseoutputtext.py b/src/openrouter/components/responseoutputtext.py
index b92a2b1..b1c89ab 100644
--- a/src/openrouter/components/responseoutputtext.py
+++ b/src/openrouter/components/responseoutputtext.py
@@ -11,52 +11,52 @@ from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
-ResponseOutputTextType = Literal["output_text",]
-
-
class ResponseOutputTextTopLogprobTypedDict(TypedDict):
- token: str
- bytes_: List[float]
+ bytes_: List[int]
logprob: float
+ token: str
class ResponseOutputTextTopLogprob(BaseModel):
- token: str
-
- bytes_: Annotated[List[float], pydantic.Field(alias="bytes")]
+ bytes_: Annotated[List[int], pydantic.Field(alias="bytes")]
logprob: float
-
-class ResponseOutputTextLogprobTypedDict(TypedDict):
token: str
- bytes_: List[float]
+
+
+class LogprobTypedDict(TypedDict):
+ bytes_: List[int]
logprob: float
+ token: str
top_logprobs: List[ResponseOutputTextTopLogprobTypedDict]
-class ResponseOutputTextLogprob(BaseModel):
- token: str
-
- bytes_: Annotated[List[float], pydantic.Field(alias="bytes")]
+class Logprob(BaseModel):
+ bytes_: Annotated[List[int], pydantic.Field(alias="bytes")]
logprob: float
+ token: str
+
top_logprobs: List[ResponseOutputTextTopLogprob]
+ResponseOutputTextType = Literal["output_text",]
+
+
class ResponseOutputTextTypedDict(TypedDict):
- type: ResponseOutputTextType
text: str
+ type: ResponseOutputTextType
annotations: NotRequired[List[OpenAIResponsesAnnotationTypedDict]]
- logprobs: NotRequired[List[ResponseOutputTextLogprobTypedDict]]
+ logprobs: NotRequired[List[LogprobTypedDict]]
class ResponseOutputText(BaseModel):
- type: ResponseOutputTextType
-
text: str
+ type: ResponseOutputTextType
+
annotations: Optional[List[OpenAIResponsesAnnotation]] = None
- logprobs: Optional[List[ResponseOutputTextLogprob]] = None
+ logprobs: Optional[List[Logprob]] = None
diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py
index 122a041..bf396f9 100644
--- a/src/openrouter/components/responsesrequest.py
+++ b/src/openrouter/components/responsesrequest.py
@@ -2,16 +2,20 @@
from __future__ import annotations
from .applypatchservertool import ApplyPatchServerTool, ApplyPatchServerToolTypedDict
+from .autorouterplugin import AutoRouterPlugin, AutoRouterPluginTypedDict
from .codeinterpreterservertool import (
CodeInterpreterServerTool,
CodeInterpreterServerToolTypedDict,
)
from .codexlocalshelltool import CodexLocalShellTool, CodexLocalShellToolTypedDict
from .computeruseservertool import ComputerUseServerTool, ComputerUseServerToolTypedDict
-from .contextcompressionengine import ContextCompressionEngine
+from .contextcompressionplugin import (
+ ContextCompressionPlugin,
+ ContextCompressionPluginTypedDict,
+)
from .customtool import CustomTool, CustomToolTypedDict
-from .datacollection import DataCollection
from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict
+from .fileparserplugin import FileParserPlugin, FileParserPluginTypedDict
from .filesearchservertool import FileSearchServerTool, FileSearchServerToolTypedDict
from .imagegenerationservertool import (
ImageGenerationServerTool,
@@ -23,18 +27,13 @@ from .legacy_websearchservertool import (
LegacyWebSearchServerToolTypedDict,
)
from .mcpservertool import McpServerTool, McpServerToolTypedDict
+from .moderationplugin import ModerationPlugin, ModerationPluginTypedDict
from .openairesponsestoolchoice_union import (
OpenAIResponsesToolChoiceUnion,
OpenAIResponsesToolChoiceUnionTypedDict,
)
from .openairesponsestruncation import OpenAIResponsesTruncation
from .outputmodalityenum import OutputModalityEnum
-from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict
-from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict
-from .preferredminthroughput import (
- PreferredMinThroughput,
- PreferredMinThroughputTypedDict,
-)
from .preview_20250311_websearchservertool import (
Preview20250311WebSearchServerTool,
Preview20250311WebSearchServerToolTypedDict,
@@ -43,16 +42,15 @@ from .preview_websearchservertool import (
PreviewWebSearchServerTool,
PreviewWebSearchServerToolTypedDict,
)
-from .providername import ProviderName
-from .providersort import ProviderSort
-from .providersortconfig import ProviderSortConfig, ProviderSortConfigTypedDict
-from .quantization import Quantization
+from .providerpreferences import ProviderPreferences, ProviderPreferencesTypedDict
from .reasoningconfig import ReasoningConfig, ReasoningConfigTypedDict
+from .responsehealingplugin import ResponseHealingPlugin, ResponseHealingPluginTypedDict
from .responseincludesenum import ResponseIncludesEnum
from .shellservertool import ShellServerTool, ShellServerToolTypedDict
from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict
from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict
-from .websearchengine import WebSearchEngine
+from .traceconfig import TraceConfig, TraceConfigTypedDict
+from .websearchplugin import WebSearchPlugin, WebSearchPluginTypedDict
from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict
from .websearchservertool_openrouter import (
WebSearchServerToolOpenRouter,
@@ -68,21 +66,69 @@ from openrouter.types import (
)
from openrouter.utils import get_discriminator, validate_const, validate_open_enum
import pydantic
-from pydantic import ConfigDict, Discriminator, Tag, model_serializer
+from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import AfterValidator, PlainValidator
from typing import Any, Dict, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+ResponsesRequestImageConfigTypedDict = TypeAliasType(
+ "ResponsesRequestImageConfigTypedDict", Union[str, float]
+)
+
+
+ResponsesRequestImageConfig = TypeAliasType(
+ "ResponsesRequestImageConfig", Union[str, float]
+)
+
+
+ResponsesRequestPluginTypedDict = TypeAliasType(
+ "ResponsesRequestPluginTypedDict",
+ Union[
+ ModerationPluginTypedDict,
+ ResponseHealingPluginTypedDict,
+ AutoRouterPluginTypedDict,
+ FileParserPluginTypedDict,
+ ContextCompressionPluginTypedDict,
+ WebSearchPluginTypedDict,
+ ],
+)
+
+
+ResponsesRequestPlugin = Annotated[
+ Union[
+ Annotated[AutoRouterPlugin, Tag("auto-router")],
+ Annotated[ContextCompressionPlugin, Tag("context-compression")],
+ Annotated[FileParserPlugin, Tag("file-parser")],
+ Annotated[ModerationPlugin, Tag("moderation")],
+ Annotated[ResponseHealingPlugin, Tag("response-healing")],
+ Annotated[WebSearchPlugin, Tag("web")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "id", "id")),
+]
+
+
+ResponsesRequestServiceTier = Union[
+ Literal[
+ "auto",
+ "default",
+ "flex",
+ "priority",
+ "scale",
+ ],
+ UnrecognizedStr,
+]
+
+
ResponsesRequestType = Literal["function",]
class ResponsesRequestToolFunctionTypedDict(TypedDict):
r"""Function tool definition"""
- type: ResponsesRequestType
name: str
parameters: Nullable[Dict[str, Nullable[Any]]]
+ type: ResponsesRequestType
description: NotRequired[Nullable[str]]
strict: NotRequired[Nullable[bool]]
@@ -90,12 +136,12 @@ class ResponsesRequestToolFunctionTypedDict(TypedDict):
class ResponsesRequestToolFunction(BaseModel):
r"""Function tool definition"""
- type: ResponsesRequestType
-
name: str
parameters: Nullable[Dict[str, Nullable[Any]]]
+ type: ResponsesRequestType
+
description: OptionalNullable[str] = UNSET
strict: OptionalNullable[bool] = UNSET
@@ -103,7 +149,7 @@ class ResponsesRequestToolFunction(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["description", "strict"]
- nullable_fields = ["description", "strict", "parameters"]
+ nullable_fields = ["description", "parameters", "strict"]
null_default_fields = []
serialized = handler(self)
@@ -179,656 +225,207 @@ ResponsesRequestToolUnion = Annotated[
]
-ResponsesRequestImageConfigTypedDict = TypeAliasType(
- "ResponsesRequestImageConfigTypedDict", Union[str, float]
-)
-
-
-ResponsesRequestImageConfig = TypeAliasType(
- "ResponsesRequestImageConfig", Union[str, float]
-)
-
-
-ResponsesRequestServiceTier = Union[
- Literal[
- "auto",
- "default",
- "flex",
- "priority",
- "scale",
- ],
- UnrecognizedStr,
-]
-
-
-ResponsesRequestOrderTypedDict = TypeAliasType(
- "ResponsesRequestOrderTypedDict", Union[ProviderName, str]
-)
-
-
-ResponsesRequestOrder = TypeAliasType(
- "ResponsesRequestOrder",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ResponsesRequestOnlyTypedDict = TypeAliasType(
- "ResponsesRequestOnlyTypedDict", Union[ProviderName, str]
-)
-
-
-ResponsesRequestOnly = TypeAliasType(
- "ResponsesRequestOnly",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ResponsesRequestIgnoreTypedDict = TypeAliasType(
- "ResponsesRequestIgnoreTypedDict", Union[ProviderName, str]
-)
-
-
-ResponsesRequestIgnore = TypeAliasType(
- "ResponsesRequestIgnore",
- Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str],
-)
-
-
-ResponsesRequestSortTypedDict = TypeAliasType(
- "ResponsesRequestSortTypedDict",
- Union[ProviderSortConfigTypedDict, ProviderSort, Any],
-)
-r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
-
-ResponsesRequestSort = TypeAliasType(
- "ResponsesRequestSort",
- Union[
- ProviderSortConfig,
- Annotated[ProviderSort, PlainValidator(validate_open_enum(False))],
- Any,
- ],
-)
-r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
-
-class ResponsesRequestMaxPriceTypedDict(TypedDict):
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
-
- prompt: NotRequired[str]
- r"""Price per million prompt tokens"""
- completion: NotRequired[str]
- image: NotRequired[str]
- audio: NotRequired[str]
- request: NotRequired[str]
-
-
-class ResponsesRequestMaxPrice(BaseModel):
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
-
- prompt: Optional[str] = None
- r"""Price per million prompt tokens"""
-
- completion: Optional[str] = None
-
- image: Optional[str] = None
-
- audio: Optional[str] = None
-
- request: Optional[str] = None
-
-
-class ResponsesRequestProviderTypedDict(TypedDict):
- r"""When multiple model providers are available, optionally indicate your routing preference."""
-
- allow_fallbacks: NotRequired[Nullable[bool]]
- r"""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.
-
- """
- require_parameters: NotRequired[Nullable[bool]]
- r"""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."""
- data_collection: NotRequired[Nullable[DataCollection]]
- r"""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.
- """
- zdr: NotRequired[Nullable[bool]]
- r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
- enforce_distillable_text: NotRequired[Nullable[bool]]
- r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
- order: NotRequired[Nullable[List[ResponsesRequestOrderTypedDict]]]
- r"""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."""
- only: NotRequired[Nullable[List[ResponsesRequestOnlyTypedDict]]]
- r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
- ignore: NotRequired[Nullable[List[ResponsesRequestIgnoreTypedDict]]]
- r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
- quantizations: NotRequired[Nullable[List[Quantization]]]
- r"""A list of quantization levels to filter the provider by."""
- sort: NotRequired[Nullable[ResponsesRequestSortTypedDict]]
- r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
- max_price: NotRequired[ResponsesRequestMaxPriceTypedDict]
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
- preferred_min_throughput: NotRequired[Nullable[PreferredMinThroughputTypedDict]]
- r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
- preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]]
- r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
-
-class ResponsesRequestProvider(BaseModel):
- r"""When multiple model providers are available, optionally indicate your routing preference."""
-
- allow_fallbacks: OptionalNullable[bool] = UNSET
- r"""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.
-
- """
-
- require_parameters: OptionalNullable[bool] = UNSET
- r"""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."""
-
- data_collection: Annotated[
- OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False))
- ] = UNSET
- r"""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.
- """
-
- zdr: OptionalNullable[bool] = UNSET
- r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used."""
-
- enforce_distillable_text: OptionalNullable[bool] = UNSET
- r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used."""
-
- order: OptionalNullable[List[ResponsesRequestOrder]] = UNSET
- r"""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."""
-
- only: OptionalNullable[List[ResponsesRequestOnly]] = UNSET
- r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request."""
-
- ignore: OptionalNullable[List[ResponsesRequestIgnore]] = UNSET
- r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request."""
-
- quantizations: OptionalNullable[
- List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]]
- ] = UNSET
- r"""A list of quantization levels to filter the provider by."""
-
- sort: OptionalNullable[ResponsesRequestSort] = UNSET
- r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed."""
-
- max_price: Optional[ResponsesRequestMaxPrice] = None
- r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion."""
-
- preferred_min_throughput: OptionalNullable[PreferredMinThroughput] = UNSET
- r"""Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
- preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET
- r"""Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold."""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "allow_fallbacks",
- "require_parameters",
- "data_collection",
- "zdr",
- "enforce_distillable_text",
- "order",
- "only",
- "ignore",
- "quantizations",
- "sort",
- "max_price",
- "preferred_min_throughput",
- "preferred_max_latency",
- ]
- nullable_fields = [
- "allow_fallbacks",
- "require_parameters",
- "data_collection",
- "zdr",
- "enforce_distillable_text",
- "order",
- "only",
- "ignore",
- "quantizations",
- "sort",
- "preferred_min_throughput",
- "preferred_max_latency",
- ]
- 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
-
-
-ResponsesRequestIDContextCompression = Literal["context-compression",]
-
-
-class ResponsesRequestPluginContextCompressionTypedDict(TypedDict):
- id: ResponsesRequestIDContextCompression
- enabled: NotRequired[bool]
- r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
- engine: NotRequired[ContextCompressionEngine]
- r"""The compression engine to use. Defaults to \"middle-out\"."""
-
-
-class ResponsesRequestPluginContextCompression(BaseModel):
- id: ResponsesRequestIDContextCompression
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the context-compression plugin for this request. Defaults to true."""
-
- engine: Optional[ContextCompressionEngine] = None
- r"""The compression engine to use. Defaults to \"middle-out\"."""
-
-
-ResponsesRequestIDResponseHealing = Literal["response-healing",]
-
-
-class ResponsesRequestPluginResponseHealingTypedDict(TypedDict):
- id: ResponsesRequestIDResponseHealing
- enabled: NotRequired[bool]
- r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
-
-
-class ResponsesRequestPluginResponseHealing(BaseModel):
- id: ResponsesRequestIDResponseHealing
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the response-healing plugin for this request. Defaults to true."""
-
-
-ResponsesRequestIDFileParser = Literal["file-parser",]
-
-
-class ResponsesRequestPluginFileParserTypedDict(TypedDict):
- id: ResponsesRequestIDFileParser
- enabled: NotRequired[bool]
- r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
- pdf: NotRequired[PDFParserOptionsTypedDict]
- r"""Options for PDF parsing."""
-
-
-class ResponsesRequestPluginFileParser(BaseModel):
- id: ResponsesRequestIDFileParser
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the file-parser plugin for this request. Defaults to true."""
-
- pdf: Optional[PDFParserOptions] = None
- r"""Options for PDF parsing."""
-
-
-ResponsesRequestIDWeb = Literal["web",]
-
-
-class ResponsesRequestPluginWebTypedDict(TypedDict):
- id: ResponsesRequestIDWeb
- enabled: NotRequired[bool]
- r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
- max_results: NotRequired[float]
- search_prompt: NotRequired[str]
- engine: NotRequired[WebSearchEngine]
- r"""The search engine to use for web search."""
- 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\")."""
- exclude_domains: NotRequired[List[str]]
- r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
-
-
-class ResponsesRequestPluginWeb(BaseModel):
- id: ResponsesRequestIDWeb
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
-
- max_results: Optional[float] = None
-
- search_prompt: Optional[str] = None
-
- engine: Annotated[
- Optional[WebSearchEngine], PlainValidator(validate_open_enum(False))
- ] = None
- r"""The search engine to use for web search."""
-
- include_domains: Optional[List[str]] = None
- 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\")."""
-
- exclude_domains: Optional[List[str]] = None
- r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
-
-
-ResponsesRequestIDModeration = Literal["moderation",]
-
-
-class ResponsesRequestPluginModerationTypedDict(TypedDict):
- id: ResponsesRequestIDModeration
-
-
-class ResponsesRequestPluginModeration(BaseModel):
- id: ResponsesRequestIDModeration
-
-
-ResponsesRequestIDAutoRouter = Literal["auto-router",]
-
-
-class ResponsesRequestPluginAutoRouterTypedDict(TypedDict):
- id: ResponsesRequestIDAutoRouter
- enabled: NotRequired[bool]
- r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
- allowed_models: NotRequired[List[str]]
- r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
-
-
-class ResponsesRequestPluginAutoRouter(BaseModel):
- id: ResponsesRequestIDAutoRouter
-
- enabled: Optional[bool] = None
- r"""Set to false to disable the auto-router plugin for this request. Defaults to true."""
-
- allowed_models: Optional[List[str]] = None
- r"""List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., \"anthropic/*\" matches all Anthropic models). When not specified, uses the default supported models list."""
-
-
-ResponsesRequestPluginUnionTypedDict = TypeAliasType(
- "ResponsesRequestPluginUnionTypedDict",
- Union[
- ResponsesRequestPluginModerationTypedDict,
- ResponsesRequestPluginResponseHealingTypedDict,
- ResponsesRequestPluginAutoRouterTypedDict,
- ResponsesRequestPluginFileParserTypedDict,
- ResponsesRequestPluginContextCompressionTypedDict,
- ResponsesRequestPluginWebTypedDict,
- ],
-)
-
-
-ResponsesRequestPluginUnion = Annotated[
- Union[
- Annotated[ResponsesRequestPluginAutoRouter, Tag("auto-router")],
- Annotated[ResponsesRequestPluginModeration, Tag("moderation")],
- Annotated[ResponsesRequestPluginWeb, Tag("web")],
- Annotated[ResponsesRequestPluginFileParser, Tag("file-parser")],
- Annotated[ResponsesRequestPluginResponseHealing, Tag("response-healing")],
- Annotated[ResponsesRequestPluginContextCompression, Tag("context-compression")],
- ],
- Discriminator(lambda m: get_discriminator(m, "id", "id")),
-]
-
-
-class ResponsesRequestTraceTypedDict(TypedDict):
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
-
- trace_id: NotRequired[str]
- trace_name: NotRequired[str]
- span_name: NotRequired[str]
- generation_name: NotRequired[str]
- parent_span_id: NotRequired[str]
-
-
-class ResponsesRequestTrace(BaseModel):
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
-
- model_config = ConfigDict(
- populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
- )
- __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
-
- trace_id: Optional[str] = None
-
- trace_name: Optional[str] = None
-
- span_name: Optional[str] = None
-
- generation_name: Optional[str] = None
-
- parent_span_id: 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]
-
-
class ResponsesRequestTypedDict(TypedDict):
r"""Request schema for Responses endpoint"""
+ background: NotRequired[Nullable[bool]]
+ frequency_penalty: NotRequired[float]
+ image_config: NotRequired[Dict[str, ResponsesRequestImageConfigTypedDict]]
+ r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
+ include: NotRequired[Nullable[List[ResponseIncludesEnum]]]
input: NotRequired[InputsUnionTypedDict]
r"""Input for a response request - can be a string or array of items"""
instructions: NotRequired[Nullable[str]]
+ max_output_tokens: NotRequired[int]
+ max_tool_calls: NotRequired[int]
metadata: NotRequired[Nullable[Dict[str, str]]]
r"""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."""
- tools: NotRequired[List[ResponsesRequestToolUnionTypedDict]]
- tool_choice: NotRequired[OpenAIResponsesToolChoiceUnionTypedDict]
- parallel_tool_calls: NotRequired[Nullable[bool]]
- model: NotRequired[str]
- models: NotRequired[List[str]]
- text: NotRequired[TextExtendedConfigTypedDict]
- r"""Text output configuration including format and verbosity"""
- reasoning: NotRequired[Nullable[ReasoningConfigTypedDict]]
- r"""Configuration for reasoning mode in the response"""
- max_output_tokens: NotRequired[Nullable[float]]
- temperature: NotRequired[Nullable[float]]
- top_p: NotRequired[Nullable[float]]
- top_logprobs: NotRequired[Nullable[int]]
- max_tool_calls: NotRequired[Nullable[int]]
- presence_penalty: NotRequired[Nullable[float]]
- frequency_penalty: NotRequired[Nullable[float]]
- top_k: NotRequired[float]
- image_config: NotRequired[Dict[str, ResponsesRequestImageConfigTypedDict]]
- r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
modalities: NotRequired[List[OutputModalityEnum]]
r"""Output modalities for the response. Supported values are \"text\" and \"image\"."""
- prompt_cache_key: NotRequired[Nullable[str]]
+ model: NotRequired[str]
+ models: NotRequired[List[str]]
+ parallel_tool_calls: NotRequired[Nullable[bool]]
+ plugins: NotRequired[List[ResponsesRequestPluginTypedDict]]
+ r"""Plugins you want to enable for this request, including their settings."""
+ presence_penalty: NotRequired[float]
previous_response_id: NotRequired[Nullable[str]]
prompt: NotRequired[Nullable[StoredPromptTemplateTypedDict]]
- include: NotRequired[Nullable[List[ResponseIncludesEnum]]]
- background: NotRequired[Nullable[bool]]
- safety_identifier: NotRequired[Nullable[str]]
- store: Literal[False]
- service_tier: NotRequired[Nullable[ResponsesRequestServiceTier]]
- truncation: NotRequired[Nullable[OpenAIResponsesTruncation]]
- stream: NotRequired[bool]
- provider: NotRequired[Nullable[ResponsesRequestProviderTypedDict]]
+ prompt_cache_key: NotRequired[Nullable[str]]
+ provider: NotRequired[Nullable[ProviderPreferencesTypedDict]]
r"""When multiple model providers are available, optionally indicate your routing preference."""
- plugins: NotRequired[List[ResponsesRequestPluginUnionTypedDict]]
- r"""Plugins you want to enable for this request, including their settings."""
- user: NotRequired[str]
- r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."""
+ reasoning: NotRequired[Nullable[ReasoningConfigTypedDict]]
+ r"""Configuration for reasoning mode in the response"""
+ safety_identifier: NotRequired[Nullable[str]]
+ service_tier: NotRequired[Nullable[ResponsesRequestServiceTier]]
session_id: NotRequired[str]
r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
- trace: NotRequired[ResponsesRequestTraceTypedDict]
+ store: Literal[False]
+ stream: NotRequired[bool]
+ temperature: NotRequired[float]
+ text: NotRequired[TextExtendedConfigTypedDict]
+ r"""Text output configuration including format and verbosity"""
+ tool_choice: NotRequired[OpenAIResponsesToolChoiceUnionTypedDict]
+ tools: NotRequired[List[ResponsesRequestToolUnionTypedDict]]
+ top_k: NotRequired[int]
+ top_logprobs: NotRequired[int]
+ top_p: NotRequired[float]
+ trace: NotRequired[TraceConfigTypedDict]
r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+ truncation: NotRequired[Nullable[OpenAIResponsesTruncation]]
+ user: NotRequired[str]
+ r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."""
class ResponsesRequest(BaseModel):
r"""Request schema for Responses endpoint"""
+ background: OptionalNullable[bool] = UNSET
+
+ frequency_penalty: Optional[float] = None
+
+ image_config: Optional[Dict[str, ResponsesRequestImageConfig]] = None
+ r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
+
+ include: OptionalNullable[
+ List[Annotated[ResponseIncludesEnum, PlainValidator(validate_open_enum(False))]]
+ ] = UNSET
+
input: Optional[InputsUnion] = None
r"""Input for a response request - can be a string or array of items"""
instructions: OptionalNullable[str] = UNSET
+ max_output_tokens: Optional[int] = None
+
+ max_tool_calls: Optional[int] = None
+
metadata: OptionalNullable[Dict[str, str]] = UNSET
r"""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."""
- tools: Optional[List[ResponsesRequestToolUnion]] = None
-
- tool_choice: Optional[OpenAIResponsesToolChoiceUnion] = None
-
- parallel_tool_calls: OptionalNullable[bool] = UNSET
-
- model: Optional[str] = None
-
- models: Optional[List[str]] = None
-
- text: Optional[TextExtendedConfig] = None
- r"""Text output configuration including format and verbosity"""
-
- reasoning: OptionalNullable[ReasoningConfig] = UNSET
- r"""Configuration for reasoning mode in the response"""
-
- max_output_tokens: OptionalNullable[float] = UNSET
-
- temperature: OptionalNullable[float] = UNSET
-
- top_p: OptionalNullable[float] = UNSET
-
- top_logprobs: OptionalNullable[int] = UNSET
-
- max_tool_calls: OptionalNullable[int] = UNSET
-
- presence_penalty: OptionalNullable[float] = UNSET
-
- frequency_penalty: OptionalNullable[float] = UNSET
-
- top_k: Optional[float] = None
-
- image_config: Optional[Dict[str, ResponsesRequestImageConfig]] = None
- r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
-
modalities: Optional[
List[Annotated[OutputModalityEnum, PlainValidator(validate_open_enum(False))]]
] = None
r"""Output modalities for the response. Supported values are \"text\" and \"image\"."""
- prompt_cache_key: OptionalNullable[str] = UNSET
+ model: Optional[str] = None
+
+ models: Optional[List[str]] = None
+
+ parallel_tool_calls: OptionalNullable[bool] = UNSET
+
+ plugins: Optional[List[ResponsesRequestPlugin]] = None
+ r"""Plugins you want to enable for this request, including their settings."""
+
+ presence_penalty: Optional[float] = None
previous_response_id: OptionalNullable[str] = UNSET
prompt: OptionalNullable[StoredPromptTemplate] = UNSET
- include: OptionalNullable[
- List[Annotated[ResponseIncludesEnum, PlainValidator(validate_open_enum(False))]]
- ] = UNSET
+ prompt_cache_key: OptionalNullable[str] = UNSET
- background: OptionalNullable[bool] = UNSET
+ provider: OptionalNullable[ProviderPreferences] = UNSET
+ r"""When multiple model providers are available, optionally indicate your routing preference."""
+
+ reasoning: OptionalNullable[ReasoningConfig] = UNSET
+ r"""Configuration for reasoning mode in the response"""
safety_identifier: OptionalNullable[str] = UNSET
- STORE: Annotated[
- Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))],
- pydantic.Field(alias="store"),
- ] = False
-
service_tier: Annotated[
OptionalNullable[ResponsesRequestServiceTier],
PlainValidator(validate_open_enum(False)),
] = "auto"
+ session_id: Optional[str] = None
+ r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
+
+ STORE: Annotated[
+ Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))],
+ pydantic.Field(alias="store"),
+ ] = False
+
+ stream: Optional[bool] = False
+
+ temperature: Optional[float] = None
+
+ text: Optional[TextExtendedConfig] = None
+ r"""Text output configuration including format and verbosity"""
+
+ tool_choice: Optional[OpenAIResponsesToolChoiceUnion] = None
+
+ tools: Optional[List[ResponsesRequestToolUnion]] = None
+
+ top_k: Optional[int] = None
+
+ top_logprobs: Optional[int] = None
+
+ top_p: Optional[float] = None
+
+ trace: Optional[TraceConfig] = None
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+
truncation: Annotated[
OptionalNullable[OpenAIResponsesTruncation],
PlainValidator(validate_open_enum(False)),
] = UNSET
- stream: Optional[bool] = False
-
- provider: OptionalNullable[ResponsesRequestProvider] = UNSET
- r"""When multiple model providers are available, optionally indicate your routing preference."""
-
- plugins: Optional[List[ResponsesRequestPluginUnion]] = None
- r"""Plugins you want to enable for this request, including their settings."""
-
user: Optional[str] = None
r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters."""
- session_id: Optional[str] = None
- r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters."""
-
- trace: Optional[ResponsesRequestTrace] = None
- r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "background",
+ "frequency_penalty",
+ "image_config",
+ "include",
"input",
"instructions",
+ "max_output_tokens",
+ "max_tool_calls",
"metadata",
- "tools",
- "tool_choice",
- "parallel_tool_calls",
+ "modalities",
"model",
"models",
- "text",
- "reasoning",
- "max_output_tokens",
- "temperature",
- "top_p",
- "top_logprobs",
- "max_tool_calls",
+ "parallel_tool_calls",
+ "plugins",
"presence_penalty",
- "frequency_penalty",
- "top_k",
- "image_config",
- "modalities",
- "prompt_cache_key",
"previous_response_id",
"prompt",
- "include",
- "background",
- "safety_identifier",
- "store",
- "service_tier",
- "truncation",
- "stream",
+ "prompt_cache_key",
"provider",
- "plugins",
- "user",
+ "reasoning",
+ "safety_identifier",
+ "service_tier",
"session_id",
+ "store",
+ "stream",
+ "temperature",
+ "text",
+ "tool_choice",
+ "tools",
+ "top_k",
+ "top_logprobs",
+ "top_p",
"trace",
+ "truncation",
+ "user",
]
nullable_fields = [
+ "background",
+ "include",
"instructions",
"metadata",
"parallel_tool_calls",
- "reasoning",
- "max_output_tokens",
- "temperature",
- "top_p",
- "top_logprobs",
- "max_tool_calls",
- "presence_penalty",
- "frequency_penalty",
- "prompt_cache_key",
"previous_response_id",
"prompt",
- "include",
- "background",
+ "prompt_cache_key",
+ "provider",
+ "reasoning",
"safety_identifier",
"service_tier",
"truncation",
- "provider",
]
null_default_fields = []
diff --git a/src/openrouter/components/searchqualitylevel.py b/src/openrouter/components/searchqualitylevel.py
new file mode 100644
index 0000000..36eba03
--- /dev/null
+++ b/src/openrouter/components/searchqualitylevel.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
+
+
+SearchQualityLevel = Union[
+ Literal[
+ "low",
+ "medium",
+ "high",
+ ],
+ 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."""
diff --git a/src/openrouter/components/streamevents.py b/src/openrouter/components/streamevents.py
index 58d2694..c663877 100644
--- a/src/openrouter/components/streamevents.py
+++ b/src/openrouter/components/streamevents.py
@@ -29,8 +29,14 @@ from .imagegencallpartialimageevent import (
ImageGenCallPartialImageEvent,
ImageGenCallPartialImageEventTypedDict,
)
-from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
-from .outputitems import OutputItems, OutputItemsTypedDict
+from .openresponsescreatedevent import (
+ OpenResponsesCreatedEvent,
+ OpenResponsesCreatedEventTypedDict,
+)
+from .openresponsesinprogressevent import (
+ OpenResponsesInProgressEvent,
+ OpenResponsesInProgressEventTypedDict,
+)
from .reasoningdeltaevent import ReasoningDeltaEvent, ReasoningDeltaEventTypedDict
from .reasoningdoneevent import ReasoningDoneEvent, ReasoningDoneEventTypedDict
from .reasoningsummarypartaddedevent import (
@@ -51,6 +57,26 @@ from .reasoningsummarytextdoneevent import (
)
from .refusaldeltaevent import RefusalDeltaEvent, RefusalDeltaEventTypedDict
from .refusaldoneevent import RefusalDoneEvent, RefusalDoneEventTypedDict
+from .streameventsresponsecompleted import (
+ StreamEventsResponseCompleted,
+ StreamEventsResponseCompletedTypedDict,
+)
+from .streameventsresponsefailed import (
+ StreamEventsResponseFailed,
+ StreamEventsResponseFailedTypedDict,
+)
+from .streameventsresponseincomplete import (
+ StreamEventsResponseIncomplete,
+ StreamEventsResponseIncompleteTypedDict,
+)
+from .streameventsresponseoutputitemadded import (
+ StreamEventsResponseOutputItemAdded,
+ StreamEventsResponseOutputItemAddedTypedDict,
+)
+from .streameventsresponseoutputitemdone import (
+ StreamEventsResponseOutputItemDone,
+ StreamEventsResponseOutputItemDoneTypedDict,
+)
from .textdeltaevent import TextDeltaEvent, TextDeltaEventTypedDict
from .textdoneevent import TextDoneEvent, TextDoneEventTypedDict
from .websearchcallcompletedevent import (
@@ -65,185 +91,17 @@ from .websearchcallsearchingevent import (
WebSearchCallSearchingEvent,
WebSearchCallSearchingEventTypedDict,
)
-from openrouter.types import BaseModel
from openrouter.utils import get_discriminator
from pydantic import Discriminator, Tag
-from typing import Literal, Union
-from typing_extensions import Annotated, TypeAliasType, TypedDict
-
-
-TypeResponseOutputItemDone = Literal["response.output_item.done",]
-
-
-class StreamEventsResponseOutputItemDoneTypedDict(TypedDict):
- r"""Event emitted when an output item is complete"""
-
- type: TypeResponseOutputItemDone
- output_index: float
- item: OutputItemsTypedDict
- r"""An output item from the response"""
- sequence_number: float
-
-
-class StreamEventsResponseOutputItemDone(BaseModel):
- r"""Event emitted when an output item is complete"""
-
- type: TypeResponseOutputItemDone
-
- output_index: float
-
- item: OutputItems
- r"""An output item from the response"""
-
- sequence_number: float
-
-
-TypeResponseOutputItemAdded = Literal["response.output_item.added",]
-
-
-class StreamEventsResponseOutputItemAddedTypedDict(TypedDict):
- r"""Event emitted when a new output item is added to the response"""
-
- type: TypeResponseOutputItemAdded
- output_index: float
- item: OutputItemsTypedDict
- r"""An output item from the response"""
- sequence_number: float
-
-
-class StreamEventsResponseOutputItemAdded(BaseModel):
- r"""Event emitted when a new output item is added to the response"""
-
- type: TypeResponseOutputItemAdded
-
- output_index: float
-
- item: OutputItems
- r"""An output item from the response"""
-
- sequence_number: float
-
-
-TypeResponseFailed = Literal["response.failed",]
-
-
-class StreamEventsResponseFailedTypedDict(TypedDict):
- r"""Event emitted when a response has failed"""
-
- type: TypeResponseFailed
- response: OpenResponsesResultTypedDict
- r"""Complete non-streaming response from the Responses API"""
- sequence_number: float
-
-
-class StreamEventsResponseFailed(BaseModel):
- r"""Event emitted when a response has failed"""
-
- type: TypeResponseFailed
-
- response: OpenResponsesResult
- r"""Complete non-streaming response from the Responses API"""
-
- sequence_number: float
-
-
-TypeResponseIncomplete = Literal["response.incomplete",]
-
-
-class StreamEventsResponseIncompleteTypedDict(TypedDict):
- r"""Event emitted when a response is incomplete"""
-
- type: TypeResponseIncomplete
- response: OpenResponsesResultTypedDict
- r"""Complete non-streaming response from the Responses API"""
- sequence_number: float
-
-
-class StreamEventsResponseIncomplete(BaseModel):
- r"""Event emitted when a response is incomplete"""
-
- type: TypeResponseIncomplete
-
- response: OpenResponsesResult
- r"""Complete non-streaming response from the Responses API"""
-
- sequence_number: float
-
-
-TypeResponseCompleted = Literal["response.completed",]
-
-
-class StreamEventsResponseCompletedTypedDict(TypedDict):
- r"""Event emitted when a response has completed successfully"""
-
- type: TypeResponseCompleted
- response: OpenResponsesResultTypedDict
- r"""Complete non-streaming response from the Responses API"""
- sequence_number: float
-
-
-class StreamEventsResponseCompleted(BaseModel):
- r"""Event emitted when a response has completed successfully"""
-
- type: TypeResponseCompleted
-
- response: OpenResponsesResult
- r"""Complete non-streaming response from the Responses API"""
-
- sequence_number: float
-
-
-TypeResponseInProgress = Literal["response.in_progress",]
-
-
-class StreamEventsResponseInProgressTypedDict(TypedDict):
- r"""Event emitted when a response is in progress"""
-
- type: TypeResponseInProgress
- response: OpenResponsesResultTypedDict
- r"""Complete non-streaming response from the Responses API"""
- sequence_number: float
-
-
-class StreamEventsResponseInProgress(BaseModel):
- r"""Event emitted when a response is in progress"""
-
- type: TypeResponseInProgress
-
- response: OpenResponsesResult
- r"""Complete non-streaming response from the Responses API"""
-
- sequence_number: float
-
-
-TypeResponseCreated = Literal["response.created",]
-
-
-class StreamEventsResponseCreatedTypedDict(TypedDict):
- r"""Event emitted when a response is created"""
-
- type: TypeResponseCreated
- response: OpenResponsesResultTypedDict
- r"""Complete non-streaming response from the Responses API"""
- sequence_number: float
-
-
-class StreamEventsResponseCreated(BaseModel):
- r"""Event emitted when a response is created"""
-
- type: TypeResponseCreated
-
- response: OpenResponsesResult
- r"""Complete non-streaming response from the Responses API"""
-
- sequence_number: float
+from typing import Union
+from typing_extensions import Annotated, TypeAliasType
StreamEventsTypedDict = TypeAliasType(
"StreamEventsTypedDict",
Union[
- StreamEventsResponseCreatedTypedDict,
- StreamEventsResponseInProgressTypedDict,
+ OpenResponsesCreatedEventTypedDict,
+ OpenResponsesInProgressEventTypedDict,
StreamEventsResponseCompletedTypedDict,
StreamEventsResponseIncompleteTypedDict,
StreamEventsResponseFailedTypedDict,
@@ -279,31 +137,42 @@ r"""Union of all possible event types emitted during response streaming"""
StreamEvents = Annotated[
Union[
- Annotated[StreamEventsResponseCreated, Tag("response.created")],
- Annotated[StreamEventsResponseInProgress, Tag("response.in_progress")],
- Annotated[StreamEventsResponseCompleted, Tag("response.completed")],
- Annotated[StreamEventsResponseIncomplete, Tag("response.incomplete")],
- Annotated[StreamEventsResponseFailed, Tag("response.failed")],
Annotated[ErrorEvent, Tag("error")],
- Annotated[
- StreamEventsResponseOutputItemAdded, Tag("response.output_item.added")
- ],
- Annotated[StreamEventsResponseOutputItemDone, Tag("response.output_item.done")],
+ Annotated[StreamEventsResponseCompleted, Tag("response.completed")],
Annotated[ContentPartAddedEvent, Tag("response.content_part.added")],
Annotated[ContentPartDoneEvent, Tag("response.content_part.done")],
- Annotated[TextDeltaEvent, Tag("response.output_text.delta")],
- Annotated[TextDoneEvent, Tag("response.output_text.done")],
- Annotated[RefusalDeltaEvent, Tag("response.refusal.delta")],
- Annotated[RefusalDoneEvent, Tag("response.refusal.done")],
- Annotated[AnnotationAddedEvent, Tag("response.output_text.annotation.added")],
+ Annotated[OpenResponsesCreatedEvent, Tag("response.created")],
+ Annotated[StreamEventsResponseFailed, Tag("response.failed")],
Annotated[
FunctionCallArgsDeltaEvent, Tag("response.function_call_arguments.delta")
],
Annotated[
FunctionCallArgsDoneEvent, Tag("response.function_call_arguments.done")
],
- Annotated[ReasoningDeltaEvent, Tag("response.reasoning_text.delta")],
- Annotated[ReasoningDoneEvent, Tag("response.reasoning_text.done")],
+ Annotated[
+ ImageGenCallCompletedEvent, Tag("response.image_generation_call.completed")
+ ],
+ Annotated[
+ ImageGenCallGeneratingEvent,
+ Tag("response.image_generation_call.generating"),
+ ],
+ Annotated[
+ ImageGenCallInProgressEvent,
+ Tag("response.image_generation_call.in_progress"),
+ ],
+ Annotated[
+ ImageGenCallPartialImageEvent,
+ Tag("response.image_generation_call.partial_image"),
+ ],
+ Annotated[OpenResponsesInProgressEvent, Tag("response.in_progress")],
+ Annotated[StreamEventsResponseIncomplete, Tag("response.incomplete")],
+ Annotated[
+ StreamEventsResponseOutputItemAdded, Tag("response.output_item.added")
+ ],
+ Annotated[StreamEventsResponseOutputItemDone, Tag("response.output_item.done")],
+ Annotated[AnnotationAddedEvent, Tag("response.output_text.annotation.added")],
+ Annotated[TextDeltaEvent, Tag("response.output_text.delta")],
+ Annotated[TextDoneEvent, Tag("response.output_text.done")],
Annotated[
ReasoningSummaryPartAddedEvent, Tag("response.reasoning_summary_part.added")
],
@@ -316,20 +185,12 @@ StreamEvents = Annotated[
Annotated[
ReasoningSummaryTextDoneEvent, Tag("response.reasoning_summary_text.done")
],
+ Annotated[ReasoningDeltaEvent, Tag("response.reasoning_text.delta")],
+ Annotated[ReasoningDoneEvent, Tag("response.reasoning_text.done")],
+ Annotated[RefusalDeltaEvent, Tag("response.refusal.delta")],
+ Annotated[RefusalDoneEvent, Tag("response.refusal.done")],
Annotated[
- ImageGenCallInProgressEvent,
- Tag("response.image_generation_call.in_progress"),
- ],
- Annotated[
- ImageGenCallGeneratingEvent,
- Tag("response.image_generation_call.generating"),
- ],
- Annotated[
- ImageGenCallPartialImageEvent,
- Tag("response.image_generation_call.partial_image"),
- ],
- Annotated[
- ImageGenCallCompletedEvent, Tag("response.image_generation_call.completed")
+ WebSearchCallCompletedEvent, Tag("response.web_search_call.completed")
],
Annotated[
WebSearchCallInProgressEvent, Tag("response.web_search_call.in_progress")
@@ -337,9 +198,6 @@ StreamEvents = Annotated[
Annotated[
WebSearchCallSearchingEvent, Tag("response.web_search_call.searching")
],
- Annotated[
- WebSearchCallCompletedEvent, Tag("response.web_search_call.completed")
- ],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
diff --git a/src/openrouter/components/streameventsresponsecompleted.py b/src/openrouter/components/streameventsresponsecompleted.py
new file mode 100644
index 0000000..f1f969b
--- /dev/null
+++ b/src/openrouter/components/streameventsresponsecompleted.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StreamEventsResponseCompletedType = Literal["response.completed",]
+
+
+class StreamEventsResponseCompletedTypedDict(TypedDict):
+ r"""Event emitted when a response has completed successfully"""
+
+ response: OpenResponsesResultTypedDict
+ r"""Complete non-streaming response from the Responses API"""
+ sequence_number: int
+ type: StreamEventsResponseCompletedType
+
+
+class StreamEventsResponseCompleted(BaseModel):
+ r"""Event emitted when a response has completed successfully"""
+
+ response: OpenResponsesResult
+ r"""Complete non-streaming response from the Responses API"""
+
+ sequence_number: int
+
+ type: StreamEventsResponseCompletedType
diff --git a/src/openrouter/components/streameventsresponsefailed.py b/src/openrouter/components/streameventsresponsefailed.py
new file mode 100644
index 0000000..1a0dbc5
--- /dev/null
+++ b/src/openrouter/components/streameventsresponsefailed.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StreamEventsResponseFailedType = Literal["response.failed",]
+
+
+class StreamEventsResponseFailedTypedDict(TypedDict):
+ r"""Event emitted when a response has failed"""
+
+ response: OpenResponsesResultTypedDict
+ r"""Complete non-streaming response from the Responses API"""
+ sequence_number: int
+ type: StreamEventsResponseFailedType
+
+
+class StreamEventsResponseFailed(BaseModel):
+ r"""Event emitted when a response has failed"""
+
+ response: OpenResponsesResult
+ r"""Complete non-streaming response from the Responses API"""
+
+ sequence_number: int
+
+ type: StreamEventsResponseFailedType
diff --git a/src/openrouter/components/streameventsresponseincomplete.py b/src/openrouter/components/streameventsresponseincomplete.py
new file mode 100644
index 0000000..a5f28e1
--- /dev/null
+++ b/src/openrouter/components/streameventsresponseincomplete.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StreamEventsResponseIncompleteType = Literal["response.incomplete",]
+
+
+class StreamEventsResponseIncompleteTypedDict(TypedDict):
+ r"""Event emitted when a response is incomplete"""
+
+ response: OpenResponsesResultTypedDict
+ r"""Complete non-streaming response from the Responses API"""
+ sequence_number: int
+ type: StreamEventsResponseIncompleteType
+
+
+class StreamEventsResponseIncomplete(BaseModel):
+ r"""Event emitted when a response is incomplete"""
+
+ response: OpenResponsesResult
+ r"""Complete non-streaming response from the Responses API"""
+
+ sequence_number: int
+
+ type: StreamEventsResponseIncompleteType
diff --git a/src/openrouter/components/streameventsresponseoutputitemadded.py b/src/openrouter/components/streameventsresponseoutputitemadded.py
new file mode 100644
index 0000000..ec50be5
--- /dev/null
+++ b/src/openrouter/components/streameventsresponseoutputitemadded.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .outputitems import OutputItems, OutputItemsTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StreamEventsResponseOutputItemAddedType = Literal["response.output_item.added",]
+
+
+class StreamEventsResponseOutputItemAddedTypedDict(TypedDict):
+ r"""Event emitted when a new output item is added to the response"""
+
+ item: OutputItemsTypedDict
+ r"""An output item from the response"""
+ output_index: int
+ sequence_number: int
+ type: StreamEventsResponseOutputItemAddedType
+
+
+class StreamEventsResponseOutputItemAdded(BaseModel):
+ r"""Event emitted when a new output item is added to the response"""
+
+ item: OutputItems
+ r"""An output item from the response"""
+
+ output_index: int
+
+ sequence_number: int
+
+ type: StreamEventsResponseOutputItemAddedType
diff --git a/src/openrouter/components/streameventsresponseoutputitemdone.py b/src/openrouter/components/streameventsresponseoutputitemdone.py
new file mode 100644
index 0000000..f94015b
--- /dev/null
+++ b/src/openrouter/components/streameventsresponseoutputitemdone.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .outputitems import OutputItems, OutputItemsTypedDict
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+StreamEventsResponseOutputItemDoneType = Literal["response.output_item.done",]
+
+
+class StreamEventsResponseOutputItemDoneTypedDict(TypedDict):
+ r"""Event emitted when an output item is complete"""
+
+ item: OutputItemsTypedDict
+ r"""An output item from the response"""
+ output_index: int
+ sequence_number: int
+ type: StreamEventsResponseOutputItemDoneType
+
+
+class StreamEventsResponseOutputItemDone(BaseModel):
+ r"""Event emitted when an output item is complete"""
+
+ item: OutputItems
+ r"""An output item from the response"""
+
+ output_index: int
+
+ sequence_number: int
+
+ type: StreamEventsResponseOutputItemDoneType
diff --git a/src/openrouter/components/streamlogprob.py b/src/openrouter/components/streamlogprob.py
new file mode 100644
index 0000000..44e3760
--- /dev/null
+++ b/src/openrouter/components/streamlogprob.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .streamlogprobtoplogprob import (
+ StreamLogprobTopLogprob,
+ StreamLogprobTopLogprobTypedDict,
+)
+from openrouter.types import BaseModel
+import pydantic
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class StreamLogprobTypedDict(TypedDict):
+ r"""Log probability information for a token"""
+
+ logprob: float
+ token: str
+ bytes_: NotRequired[List[int]]
+ top_logprobs: NotRequired[List[StreamLogprobTopLogprobTypedDict]]
+
+
+class StreamLogprob(BaseModel):
+ r"""Log probability information for a token"""
+
+ logprob: float
+
+ token: str
+
+ bytes_: Annotated[Optional[List[int]], pydantic.Field(alias="bytes")] = None
+
+ top_logprobs: Optional[List[StreamLogprobTopLogprob]] = None
diff --git a/src/openrouter/components/streamlogprobtoplogprob.py b/src/openrouter/components/streamlogprobtoplogprob.py
new file mode 100644
index 0000000..49f4ae2
--- /dev/null
+++ b/src/openrouter/components/streamlogprobtoplogprob.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 import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class StreamLogprobTopLogprobTypedDict(TypedDict):
+ r"""Alternative token with its log probability"""
+
+ bytes_: NotRequired[List[int]]
+ logprob: NotRequired[float]
+ token: NotRequired[str]
+
+
+class StreamLogprobTopLogprob(BaseModel):
+ r"""Alternative token with its log probability"""
+
+ bytes_: Annotated[Optional[List[int]], pydantic.Field(alias="bytes")] = None
+
+ logprob: Optional[float] = None
+
+ token: Optional[str] = None
diff --git a/src/openrouter/components/textdeltaevent.py b/src/openrouter/components/textdeltaevent.py
index c42bdbc..f314ebc 100644
--- a/src/openrouter/components/textdeltaevent.py
+++ b/src/openrouter/components/textdeltaevent.py
@@ -1,79 +1,40 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .streamlogprob import StreamLogprob, StreamLogprobTypedDict
from openrouter.types import BaseModel
-import pydantic
-from typing import List, Literal, Optional
-from typing_extensions import Annotated, NotRequired, TypedDict
+from typing import List, Literal
+from typing_extensions import TypedDict
TextDeltaEventType = Literal["response.output_text.delta",]
-class TextDeltaEventTopLogprobTypedDict(TypedDict):
- r"""Alternative token with its log probability"""
-
- token: NotRequired[str]
- logprob: NotRequired[float]
- bytes_: NotRequired[List[float]]
-
-
-class TextDeltaEventTopLogprob(BaseModel):
- r"""Alternative token with its log probability"""
-
- token: Optional[str] = None
-
- logprob: Optional[float] = None
-
- bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None
-
-
-class TextDeltaEventLogprobTypedDict(TypedDict):
- r"""Log probability information for a token"""
-
- logprob: float
- token: str
- top_logprobs: NotRequired[List[TextDeltaEventTopLogprobTypedDict]]
- bytes_: NotRequired[List[float]]
-
-
-class TextDeltaEventLogprob(BaseModel):
- r"""Log probability information for a token"""
-
- logprob: float
-
- token: str
-
- top_logprobs: Optional[List[TextDeltaEventTopLogprob]] = None
-
- bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None
-
-
class TextDeltaEventTypedDict(TypedDict):
r"""Event emitted when a text delta is streamed"""
- type: TextDeltaEventType
- logprobs: List[TextDeltaEventLogprobTypedDict]
- output_index: float
- item_id: str
- content_index: float
+ content_index: int
delta: str
- sequence_number: float
+ item_id: str
+ logprobs: List[StreamLogprobTypedDict]
+ output_index: int
+ sequence_number: int
+ type: TextDeltaEventType
class TextDeltaEvent(BaseModel):
r"""Event emitted when a text delta is streamed"""
- type: TextDeltaEventType
-
- logprobs: List[TextDeltaEventLogprob]
-
- output_index: float
-
- item_id: str
-
- content_index: float
+ content_index: int
delta: str
- sequence_number: float
+ item_id: str
+
+ logprobs: List[StreamLogprob]
+
+ output_index: int
+
+ sequence_number: int
+
+ type: TextDeltaEventType
diff --git a/src/openrouter/components/textdoneevent.py b/src/openrouter/components/textdoneevent.py
index a21655a..9bc3b1f 100644
--- a/src/openrouter/components/textdoneevent.py
+++ b/src/openrouter/components/textdoneevent.py
@@ -1,79 +1,40 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .streamlogprob import StreamLogprob, StreamLogprobTypedDict
from openrouter.types import BaseModel
-import pydantic
-from typing import List, Literal, Optional
-from typing_extensions import Annotated, NotRequired, TypedDict
+from typing import List, Literal
+from typing_extensions import TypedDict
TextDoneEventType = Literal["response.output_text.done",]
-class TextDoneEventTopLogprobTypedDict(TypedDict):
- r"""Alternative token with its log probability"""
-
- token: NotRequired[str]
- logprob: NotRequired[float]
- bytes_: NotRequired[List[float]]
-
-
-class TextDoneEventTopLogprob(BaseModel):
- r"""Alternative token with its log probability"""
-
- token: Optional[str] = None
-
- logprob: Optional[float] = None
-
- bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None
-
-
-class TextDoneEventLogprobTypedDict(TypedDict):
- r"""Log probability information for a token"""
-
- logprob: float
- token: str
- top_logprobs: NotRequired[List[TextDoneEventTopLogprobTypedDict]]
- bytes_: NotRequired[List[float]]
-
-
-class TextDoneEventLogprob(BaseModel):
- r"""Log probability information for a token"""
-
- logprob: float
-
- token: str
-
- top_logprobs: Optional[List[TextDoneEventTopLogprob]] = None
-
- bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None
-
-
class TextDoneEventTypedDict(TypedDict):
r"""Event emitted when text streaming is complete"""
- type: TextDoneEventType
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ logprobs: List[StreamLogprobTypedDict]
+ output_index: int
+ sequence_number: int
text: str
- sequence_number: float
- logprobs: List[TextDoneEventLogprobTypedDict]
+ type: TextDoneEventType
class TextDoneEvent(BaseModel):
r"""Event emitted when text streaming is complete"""
- type: TextDoneEventType
-
- output_index: float
+ content_index: int
item_id: str
- content_index: float
+ logprobs: List[StreamLogprob]
+
+ output_index: int
+
+ sequence_number: int
text: str
- sequence_number: float
-
- logprobs: List[TextDoneEventLogprob]
+ type: TextDoneEventType
diff --git a/src/openrouter/components/toolcallstatusenum.py b/src/openrouter/components/toolcallstatus.py
similarity index 91%
rename from src/openrouter/components/toolcallstatusenum.py
rename to src/openrouter/components/toolcallstatus.py
index feeccd7..bbd8827 100644
--- a/src/openrouter/components/toolcallstatusenum.py
+++ b/src/openrouter/components/toolcallstatus.py
@@ -5,7 +5,7 @@ from openrouter.types import UnrecognizedStr
from typing import Literal, Union
-ToolCallStatusEnum = Union[
+ToolCallStatus = Union[
Literal[
"in_progress",
"completed",
diff --git a/src/openrouter/components/toolchoiceallowed.py b/src/openrouter/components/toolchoiceallowed.py
new file mode 100644
index 0000000..999b399
--- /dev/null
+++ b/src/openrouter/components/toolchoiceallowed.py
@@ -0,0 +1,39 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable
+from typing import Any, Dict, List, Literal, Union
+from typing_extensions import TypeAliasType, TypedDict
+
+
+ModeRequired = Literal["required",]
+
+
+ModeAuto = Literal["auto",]
+
+
+ModeTypedDict = TypeAliasType("ModeTypedDict", Union[ModeAuto, ModeRequired])
+
+
+Mode = TypeAliasType("Mode", Union[ModeAuto, ModeRequired])
+
+
+ToolChoiceAllowedType = Literal["allowed_tools",]
+
+
+class ToolChoiceAllowedTypedDict(TypedDict):
+ r"""Constrains the model to a pre-defined set of allowed tools"""
+
+ mode: ModeTypedDict
+ tools: List[Dict[str, Nullable[Any]]]
+ type: ToolChoiceAllowedType
+
+
+class ToolChoiceAllowed(BaseModel):
+ r"""Constrains the model to a pre-defined set of allowed tools"""
+
+ mode: Mode
+
+ tools: List[Dict[str, Nullable[Any]]]
+
+ type: ToolChoiceAllowedType
diff --git a/src/openrouter/components/topproviderinfo.py b/src/openrouter/components/topproviderinfo.py
index 7912635..d5f5d35 100644
--- a/src/openrouter/components/topproviderinfo.py
+++ b/src/openrouter/components/topproviderinfo.py
@@ -1,14 +1,8 @@
"""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 openrouter.types import BaseModel
+from typing import Optional
from typing_extensions import NotRequired, TypedDict
@@ -17,9 +11,9 @@ class TopProviderInfoTypedDict(TypedDict):
is_moderated: bool
r"""Whether the top provider moderates content"""
- context_length: NotRequired[Nullable[float]]
+ context_length: NotRequired[int]
r"""Context length from the top provider"""
- max_completion_tokens: NotRequired[Nullable[float]]
+ max_completion_tokens: NotRequired[int]
r"""Maximum completion tokens from the top provider"""
@@ -29,38 +23,8 @@ class TopProviderInfo(BaseModel):
is_moderated: bool
r"""Whether the top provider moderates content"""
- context_length: OptionalNullable[float] = UNSET
+ context_length: Optional[int] = None
r"""Context length from the top provider"""
- max_completion_tokens: OptionalNullable[float] = UNSET
+ max_completion_tokens: Optional[int] = None
r"""Maximum completion tokens from the top provider"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["context_length", "max_completion_tokens"]
- nullable_fields = ["context_length", "max_completion_tokens"]
- 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/traceconfig.py b/src/openrouter/components/traceconfig.py
new file mode 100644
index 0000000..644b9be
--- /dev/null
+++ b/src/openrouter/components/traceconfig.py
@@ -0,0 +1,45 @@
+"""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 TraceConfigTypedDict(TypedDict):
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+
+ generation_name: NotRequired[str]
+ parent_span_id: NotRequired[str]
+ span_name: NotRequired[str]
+ trace_id: NotRequired[str]
+ trace_name: NotRequired[str]
+
+
+class TraceConfig(BaseModel):
+ r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
+
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
+ )
+ __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
+
+ generation_name: Optional[str] = None
+
+ parent_span_id: Optional[str] = None
+
+ span_name: Optional[str] = None
+
+ trace_id: Optional[str] = None
+
+ trace_name: 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/truncationenum.py b/src/openrouter/components/truncation.py
similarity index 91%
rename from src/openrouter/components/truncationenum.py
rename to src/openrouter/components/truncation.py
index d848ca9..1f8bea3 100644
--- a/src/openrouter/components/truncationenum.py
+++ b/src/openrouter/components/truncation.py
@@ -5,7 +5,7 @@ from openrouter.types import UnrecognizedStr
from typing import Literal, Union
-TruncationEnum = Union[
+Truncation = Union[
Literal[
"auto",
"disabled",
diff --git a/src/openrouter/components/updateguardrailrequest.py b/src/openrouter/components/updateguardrailrequest.py
new file mode 100644
index 0000000..ac199a9
--- /dev/null
+++ b/src/openrouter/components/updateguardrailrequest.py
@@ -0,0 +1,116 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrailinterval import GuardrailInterval
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import List, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class UpdateGuardrailRequestTypedDict(TypedDict):
+ allowed_models: NotRequired[Nullable[List[str]]]
+ r"""Array of model identifiers (slug or canonical_slug accepted)"""
+ allowed_providers: NotRequired[Nullable[List[str]]]
+ r"""New list of allowed provider IDs"""
+ description: NotRequired[Nullable[str]]
+ r"""New description for the guardrail"""
+ enforce_zdr: NotRequired[Nullable[bool]]
+ r"""Whether to enforce zero data retention"""
+ 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]]]
+ r"""List of provider IDs to exclude from routing"""
+ limit_usd: NotRequired[float]
+ r"""New spending limit in USD"""
+ name: NotRequired[str]
+ r"""New name for the guardrail"""
+ reset_interval: NotRequired[Nullable[GuardrailInterval]]
+ r"""Interval at which the limit resets (daily, weekly, monthly)"""
+
+
+class UpdateGuardrailRequest(BaseModel):
+ allowed_models: OptionalNullable[List[str]] = UNSET
+ r"""Array of model identifiers (slug or canonical_slug accepted)"""
+
+ allowed_providers: OptionalNullable[List[str]] = UNSET
+ r"""New list of allowed provider IDs"""
+
+ description: OptionalNullable[str] = UNSET
+ r"""New description for the guardrail"""
+
+ enforce_zdr: OptionalNullable[bool] = UNSET
+ r"""Whether to enforce zero data retention"""
+
+ ignored_models: OptionalNullable[List[str]] = UNSET
+ r"""Array of model identifiers to exclude from routing (slug or canonical_slug accepted)"""
+
+ ignored_providers: OptionalNullable[List[str]] = UNSET
+ r"""List of provider IDs to exclude from routing"""
+
+ limit_usd: Optional[float] = None
+ r"""New spending limit in USD"""
+
+ name: Optional[str] = None
+ r"""New name for the guardrail"""
+
+ reset_interval: Annotated[
+ OptionalNullable[GuardrailInterval], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+ r"""Interval at which the limit resets (daily, weekly, monthly)"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "allowed_models",
+ "allowed_providers",
+ "description",
+ "enforce_zdr",
+ "ignored_models",
+ "ignored_providers",
+ "limit_usd",
+ "name",
+ "reset_interval",
+ ]
+ nullable_fields = [
+ "allowed_models",
+ "allowed_providers",
+ "description",
+ "enforce_zdr",
+ "ignored_models",
+ "ignored_providers",
+ "reset_interval",
+ ]
+ 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/updateguardrailresponse.py b/src/openrouter/components/updateguardrailresponse.py
new file mode 100644
index 0000000..df83396
--- /dev/null
+++ b/src/openrouter/components/updateguardrailresponse.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .guardrail import Guardrail, GuardrailTypedDict
+from openrouter.types import BaseModel
+from typing_extensions import TypedDict
+
+
+class UpdateGuardrailResponseTypedDict(TypedDict):
+ data: GuardrailTypedDict
+
+
+class UpdateGuardrailResponse(BaseModel):
+ data: Guardrail
diff --git a/src/openrouter/components/urlcitation.py b/src/openrouter/components/urlcitation.py
index f5ad030..5fbad2e 100644
--- a/src/openrouter/components/urlcitation.py
+++ b/src/openrouter/components/urlcitation.py
@@ -10,20 +10,20 @@ URLCitationType = Literal["url_citation",]
class URLCitationTypedDict(TypedDict):
+ end_index: int
+ start_index: int
+ title: str
type: URLCitationType
url: str
- title: str
- start_index: float
- end_index: float
class URLCitation(BaseModel):
- type: URLCitationType
+ end_index: int
- url: str
+ start_index: int
title: str
- start_index: float
+ type: URLCitationType
- end_index: float
+ url: str
diff --git a/src/openrouter/components/usage.py b/src/openrouter/components/usage.py
index 37e41bf..bce4041 100644
--- a/src/openrouter/components/usage.py
+++ b/src/openrouter/components/usage.py
@@ -1,38 +1,31 @@
"""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 openrouter.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict
class InputTokensDetailsTypedDict(TypedDict):
- cached_tokens: float
+ cached_tokens: int
class InputTokensDetails(BaseModel):
- cached_tokens: float
+ cached_tokens: int
class OutputTokensDetailsTypedDict(TypedDict):
- reasoning_tokens: float
+ reasoning_tokens: int
class OutputTokensDetails(BaseModel):
- reasoning_tokens: float
+ reasoning_tokens: int
class CostDetailsTypedDict(TypedDict):
upstream_inference_input_cost: float
upstream_inference_output_cost: float
- upstream_inference_cost: NotRequired[Nullable[float]]
+ upstream_inference_cost: NotRequired[float]
class CostDetails(BaseModel):
@@ -40,101 +33,41 @@ class CostDetails(BaseModel):
upstream_inference_output_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
+ upstream_inference_cost: Optional[float] = None
class UsageTypedDict(TypedDict):
r"""Token usage information for the response"""
- input_tokens: float
+ input_tokens: int
input_tokens_details: InputTokensDetailsTypedDict
- output_tokens: float
+ output_tokens: int
output_tokens_details: OutputTokensDetailsTypedDict
- total_tokens: float
- cost: NotRequired[Nullable[float]]
+ total_tokens: int
+ cost: NotRequired[float]
r"""Cost of the completion"""
+ cost_details: NotRequired[CostDetailsTypedDict]
is_byok: NotRequired[bool]
r"""Whether a request was made using a Bring Your Own Key configuration"""
- cost_details: NotRequired[CostDetailsTypedDict]
class Usage(BaseModel):
r"""Token usage information for the response"""
- input_tokens: float
+ input_tokens: int
input_tokens_details: InputTokensDetails
- output_tokens: float
+ output_tokens: int
output_tokens_details: OutputTokensDetails
- total_tokens: float
+ total_tokens: int
- cost: OptionalNullable[float] = UNSET
+ cost: Optional[float] = None
r"""Cost of the completion"""
- is_byok: Optional[bool] = None
- r"""Whether a request was made using a Bring Your Own Key configuration"""
-
cost_details: Optional[CostDetails] = None
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["cost", "is_byok", "cost_details"]
- nullable_fields = ["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
+ 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
new file mode 100644
index 0000000..db54f12
--- /dev/null
+++ b/src/openrouter/components/videogenerationrequest.py
@@ -0,0 +1,483 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .contentpartimage import ContentPartImage, ContentPartImageTypedDict
+from .frameimage import FrameImage, FrameImageTypedDict
+from openrouter.types import BaseModel, Nullable, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+import pydantic
+from pydantic.functional_validators import PlainValidator
+from typing import Any, Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+AspectRatio = Union[
+ Literal[
+ "16:9",
+ "9:16",
+ "1:1",
+ "4:3",
+ "3:4",
+ "21:9",
+ "9:21",
+ ],
+ UnrecognizedStr,
+]
+r"""Aspect ratio of the generated video"""
+
+
+class OptionsTypedDict(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]]]
+ 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]]]
+ 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]]]
+ perplexity: NotRequired[Dict[str, Nullable[Any]]]
+ phala: 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 Options(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
+
+ 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
+
+ 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
+
+ perplexity: Optional[Dict[str, Nullable[Any]]] = None
+
+ phala: 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
+
+
+class ProviderTypedDict(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):
+ 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[
+ Literal[
+ "480p",
+ "720p",
+ "1080p",
+ "1K",
+ "2K",
+ "4K",
+ ],
+ UnrecognizedStr,
+]
+r"""Resolution of the generated video"""
+
+
+class VideoGenerationRequestTypedDict(TypedDict):
+ model: str
+ prompt: str
+ aspect_ratio: NotRequired[AspectRatio]
+ r"""Aspect ratio of the generated video"""
+ duration: NotRequired[int]
+ r"""Duration of the generated video in seconds"""
+ frame_images: NotRequired[List[FrameImageTypedDict]]
+ r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
+ generate_audio: NotRequired[bool]
+ r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
+ input_references: NotRequired[List[ContentPartImageTypedDict]]
+ r"""Reference images to guide video generation"""
+ provider: NotRequired[ProviderTypedDict]
+ r"""Provider-specific passthrough configuration"""
+ resolution: NotRequired[Resolution]
+ r"""Resolution of the generated video"""
+ seed: NotRequired[int]
+ r"""If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."""
+ size: NotRequired[str]
+ r"""Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio."""
+
+
+class VideoGenerationRequest(BaseModel):
+ model: str
+
+ prompt: str
+
+ aspect_ratio: Annotated[
+ Optional[AspectRatio], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Aspect ratio of the generated video"""
+
+ duration: Optional[int] = None
+ r"""Duration of the generated video in seconds"""
+
+ frame_images: Optional[List[FrameImage]] = None
+ r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
+
+ generate_audio: Optional[bool] = None
+ r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
+
+ input_references: Optional[List[ContentPartImage]] = None
+ r"""Reference images to guide video generation"""
+
+ provider: Optional[Provider] = None
+ r"""Provider-specific passthrough configuration"""
+
+ resolution: Annotated[
+ Optional[Resolution], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""Resolution of the generated video"""
+
+ seed: Optional[int] = None
+ r"""If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."""
+
+ size: Optional[str] = None
+ r"""Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio."""
diff --git a/src/openrouter/components/videogenerationresponse.py b/src/openrouter/components/videogenerationresponse.py
new file mode 100644
index 0000000..ab182a8
--- /dev/null
+++ b/src/openrouter/components/videogenerationresponse.py
@@ -0,0 +1,54 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .videogenerationusage import VideoGenerationUsage, VideoGenerationUsageTypedDict
+from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+VideoGenerationResponseStatus = Union[
+ Literal[
+ "pending",
+ "in_progress",
+ "completed",
+ "failed",
+ "cancelled",
+ "expired",
+ ],
+ UnrecognizedStr,
+]
+
+
+class VideoGenerationResponseTypedDict(TypedDict):
+ id: str
+ polling_url: str
+ status: VideoGenerationResponseStatus
+ error: NotRequired[str]
+ generation_id: NotRequired[str]
+ r"""The generation ID associated with this video generation job. Available once the job has been processed."""
+ unsigned_urls: NotRequired[List[str]]
+ usage: NotRequired[VideoGenerationUsageTypedDict]
+ r"""Usage and cost information for the video generation. Available once the job has completed."""
+
+
+class VideoGenerationResponse(BaseModel):
+ id: str
+
+ polling_url: str
+
+ status: Annotated[
+ VideoGenerationResponseStatus, PlainValidator(validate_open_enum(False))
+ ]
+
+ error: Optional[str] = None
+
+ generation_id: Optional[str] = None
+ r"""The generation ID associated with this video generation job. Available once the job has been processed."""
+
+ unsigned_urls: Optional[List[str]] = None
+
+ usage: Optional[VideoGenerationUsage] = None
+ r"""Usage and cost information for the video generation. Available once the job has completed."""
diff --git a/src/openrouter/components/videogenerationusage.py b/src/openrouter/components/videogenerationusage.py
new file mode 100644
index 0000000..806f1d0
--- /dev/null
+++ b/src/openrouter/components/videogenerationusage.py
@@ -0,0 +1,25 @@
+"""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 VideoGenerationUsageTypedDict(TypedDict):
+ r"""Usage and cost information for the video generation. Available once the job has completed."""
+
+ cost: NotRequired[float]
+ r"""The cost of the video generation in USD."""
+ is_byok: NotRequired[bool]
+ r"""Whether the request was made using a Bring Your Own Key configuration."""
+
+
+class VideoGenerationUsage(BaseModel):
+ r"""Usage and cost information for the video generation. Available once the job has completed."""
+
+ cost: Optional[float] = None
+ r"""The cost of the video generation in USD."""
+
+ is_byok: Optional[bool] = None
+ r"""Whether the request was made using a Bring Your Own Key configuration."""
diff --git a/src/openrouter/components/videomodel.py b/src/openrouter/components/videomodel.py
new file mode 100644
index 0000000..f313821
--- /dev/null
+++ b/src/openrouter/components/videomodel.py
@@ -0,0 +1,215 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
+from openrouter.utils import validate_open_enum
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Dict, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+SupportedAspectRatio = Union[
+ Literal[
+ "16:9",
+ "9:16",
+ "1:1",
+ "4:3",
+ "3:4",
+ "21:9",
+ "9:21",
+ ],
+ UnrecognizedStr,
+]
+
+
+SupportedFrameImage = Union[
+ Literal[
+ "first_frame",
+ "last_frame",
+ ],
+ UnrecognizedStr,
+]
+
+
+SupportedResolution = Union[
+ Literal[
+ "480p",
+ "720p",
+ "1080p",
+ "1K",
+ "2K",
+ "4K",
+ ],
+ UnrecognizedStr,
+]
+
+
+SupportedSize = Union[
+ Literal[
+ "480x480",
+ "480x640",
+ "480x854",
+ "480x1120",
+ "640x480",
+ "720x720",
+ "720x960",
+ "720x1280",
+ "720x1680",
+ "854x480",
+ "960x720",
+ "1080x1080",
+ "1080x1440",
+ "1080x1920",
+ "1080x2520",
+ "1120x480",
+ "1280x720",
+ "1440x1080",
+ "1680x720",
+ "1920x1080",
+ "2160x2160",
+ "2160x2880",
+ "2160x3840",
+ "2160x5040",
+ "2520x1080",
+ "2880x2160",
+ "3840x2160",
+ "5040x2160",
+ ],
+ UnrecognizedStr,
+]
+
+
+class VideoModelTypedDict(TypedDict):
+ allowed_passthrough_parameters: List[str]
+ r"""List of parameters that are allowed to be passed through to the provider"""
+ canonical_slug: str
+ r"""Canonical slug for the model"""
+ created: int
+ r"""Unix timestamp of when the model was created"""
+ generate_audio: Nullable[bool]
+ r"""Whether the model supports generating audio alongside video"""
+ id: str
+ r"""Unique identifier for the model"""
+ name: str
+ r"""Display name of the model"""
+ seed: Nullable[bool]
+ r"""Whether the model supports deterministic generation via seed parameter"""
+ supported_aspect_ratios: Nullable[List[SupportedAspectRatio]]
+ r"""Supported output aspect ratios"""
+ supported_durations: Nullable[List[int]]
+ r"""Supported video durations in seconds"""
+ supported_frame_images: Nullable[List[SupportedFrameImage]]
+ r"""Supported frame image types (e.g. first_frame, last_frame)"""
+ supported_resolutions: Nullable[List[SupportedResolution]]
+ r"""Supported output resolutions"""
+ supported_sizes: Nullable[List[SupportedSize]]
+ r"""Supported output sizes (width x height)"""
+ description: NotRequired[str]
+ r"""Description of the model"""
+ hugging_face_id: NotRequired[Nullable[str]]
+ r"""Hugging Face model identifier, if applicable"""
+ pricing_skus: NotRequired[Nullable[Dict[str, str]]]
+ r"""Pricing SKUs with provider prefix stripped, values as strings"""
+
+
+class VideoModel(BaseModel):
+ allowed_passthrough_parameters: List[str]
+ r"""List of parameters that are allowed to be passed through to the provider"""
+
+ canonical_slug: str
+ r"""Canonical slug for the model"""
+
+ created: int
+ r"""Unix timestamp of when the model was created"""
+
+ generate_audio: Nullable[bool]
+ r"""Whether the model supports generating audio alongside video"""
+
+ id: str
+ r"""Unique identifier for the model"""
+
+ name: str
+ r"""Display name of the model"""
+
+ seed: Nullable[bool]
+ r"""Whether the model supports deterministic generation via seed parameter"""
+
+ supported_aspect_ratios: Nullable[
+ List[Annotated[SupportedAspectRatio, PlainValidator(validate_open_enum(False))]]
+ ]
+ r"""Supported output aspect ratios"""
+
+ supported_durations: Nullable[List[int]]
+ r"""Supported video durations in seconds"""
+
+ supported_frame_images: Nullable[
+ List[Annotated[SupportedFrameImage, PlainValidator(validate_open_enum(False))]]
+ ]
+ r"""Supported frame image types (e.g. first_frame, last_frame)"""
+
+ supported_resolutions: Nullable[
+ List[Annotated[SupportedResolution, PlainValidator(validate_open_enum(False))]]
+ ]
+ r"""Supported output resolutions"""
+
+ supported_sizes: Nullable[
+ List[Annotated[SupportedSize, PlainValidator(validate_open_enum(False))]]
+ ]
+ r"""Supported output sizes (width x height)"""
+
+ description: Optional[str] = None
+ r"""Description of the model"""
+
+ hugging_face_id: OptionalNullable[str] = UNSET
+ r"""Hugging Face model identifier, if applicable"""
+
+ pricing_skus: OptionalNullable[Dict[str, str]] = UNSET
+ r"""Pricing SKUs with provider prefix stripped, values as strings"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["description", "hugging_face_id", "pricing_skus"]
+ nullable_fields = [
+ "generate_audio",
+ "hugging_face_id",
+ "pricing_skus",
+ "seed",
+ "supported_aspect_ratios",
+ "supported_durations",
+ "supported_frame_images",
+ "supported_resolutions",
+ "supported_sizes",
+ ]
+ 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/videomodelslistresponse.py b/src/openrouter/components/videomodelslistresponse.py
new file mode 100644
index 0000000..796e741
--- /dev/null
+++ b/src/openrouter/components/videomodelslistresponse.py
@@ -0,0 +1,15 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .videomodel import VideoModel, VideoModelTypedDict
+from openrouter.types import BaseModel
+from typing import List
+from typing_extensions import TypedDict
+
+
+class VideoModelsListResponseTypedDict(TypedDict):
+ data: List[VideoModelTypedDict]
+
+
+class VideoModelsListResponse(BaseModel):
+ data: List[VideoModel]
diff --git a/src/openrouter/components/websearchcallcompletedevent.py b/src/openrouter/components/websearchcallcompletedevent.py
index 3e4c846..360d843 100644
--- a/src/openrouter/components/websearchcallcompletedevent.py
+++ b/src/openrouter/components/websearchcallcompletedevent.py
@@ -12,19 +12,19 @@ WebSearchCallCompletedEventType = Literal["response.web_search_call.completed",]
class WebSearchCallCompletedEventTypedDict(TypedDict):
r"""Web search call completed"""
- type: WebSearchCallCompletedEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
+ sequence_number: int
+ type: WebSearchCallCompletedEventType
class WebSearchCallCompletedEvent(BaseModel):
r"""Web search call completed"""
- type: WebSearchCallCompletedEventType
-
item_id: str
- output_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: WebSearchCallCompletedEventType
diff --git a/src/openrouter/components/websearchcallinprogressevent.py b/src/openrouter/components/websearchcallinprogressevent.py
index 1bd1ad0..8fceb5b 100644
--- a/src/openrouter/components/websearchcallinprogressevent.py
+++ b/src/openrouter/components/websearchcallinprogressevent.py
@@ -12,19 +12,19 @@ WebSearchCallInProgressEventType = Literal["response.web_search_call.in_progress
class WebSearchCallInProgressEventTypedDict(TypedDict):
r"""Web search call in progress"""
- type: WebSearchCallInProgressEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
+ sequence_number: int
+ type: WebSearchCallInProgressEventType
class WebSearchCallInProgressEvent(BaseModel):
r"""Web search call in progress"""
- type: WebSearchCallInProgressEventType
-
item_id: str
- output_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: WebSearchCallInProgressEventType
diff --git a/src/openrouter/components/websearchcallsearchingevent.py b/src/openrouter/components/websearchcallsearchingevent.py
index 3d93cbc..adceee7 100644
--- a/src/openrouter/components/websearchcallsearchingevent.py
+++ b/src/openrouter/components/websearchcallsearchingevent.py
@@ -12,19 +12,19 @@ WebSearchCallSearchingEventType = Literal["response.web_search_call.searching",]
class WebSearchCallSearchingEventTypedDict(TypedDict):
r"""Web search call is searching"""
- type: WebSearchCallSearchingEventType
item_id: str
- output_index: float
- sequence_number: float
+ output_index: int
+ sequence_number: int
+ type: WebSearchCallSearchingEventType
class WebSearchCallSearchingEvent(BaseModel):
r"""Web search call is searching"""
- type: WebSearchCallSearchingEventType
-
item_id: str
- output_index: float
+ output_index: int
- sequence_number: float
+ sequence_number: int
+
+ type: WebSearchCallSearchingEventType
diff --git a/src/openrouter/components/websearchconfig.py b/src/openrouter/components/websearchconfig.py
new file mode 100644
index 0000000..dfe9115
--- /dev/null
+++ b/src/openrouter/components/websearchconfig.py
@@ -0,0 +1,58 @@
+"""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 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."""
+ 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."""
+ 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."""
+ 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."""
+
+ 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, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity."""
+
+ 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). Only applies when using the Exa engine; ignored with native provider search."""
+
+ user_location: Optional[WebSearchUserLocationServerTool] = None
+ r"""Approximate user location for location-biased results."""
diff --git a/src/openrouter/components/goneresponseerrordata.py b/src/openrouter/components/websearchdomainfilter.py
similarity index 71%
rename from src/openrouter/components/goneresponseerrordata.py
rename to src/openrouter/components/websearchdomainfilter.py
index 78177b8..64d3c5f 100644
--- a/src/openrouter/components/goneresponseerrordata.py
+++ b/src/openrouter/components/websearchdomainfilter.py
@@ -9,31 +9,24 @@ from openrouter.types import (
UNSET_SENTINEL,
)
from pydantic import model_serializer
-from typing import Any, Dict
+from typing import List
from typing_extensions import NotRequired, TypedDict
-class GoneResponseErrorDataTypedDict(TypedDict):
- r"""Error data for GoneResponse"""
-
- code: int
- message: str
- metadata: NotRequired[Nullable[Dict[str, Nullable[Any]]]]
+class WebSearchDomainFilterTypedDict(TypedDict):
+ allowed_domains: NotRequired[Nullable[List[str]]]
+ excluded_domains: NotRequired[Nullable[List[str]]]
-class GoneResponseErrorData(BaseModel):
- r"""Error data for GoneResponse"""
+class WebSearchDomainFilter(BaseModel):
+ allowed_domains: OptionalNullable[List[str]] = UNSET
- code: int
-
- message: str
-
- metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET
+ excluded_domains: OptionalNullable[List[str]] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["metadata"]
- nullable_fields = ["metadata"]
+ optional_fields = ["allowed_domains", "excluded_domains"]
+ nullable_fields = ["allowed_domains", "excluded_domains"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/components/websearchengineenum.py b/src/openrouter/components/websearchengineenum.py
new file mode 100644
index 0000000..e98eed2
--- /dev/null
+++ b/src/openrouter/components/websearchengineenum.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
+
+
+WebSearchEngineEnum = Union[
+ Literal[
+ "auto",
+ "native",
+ "exa",
+ "firecrawl",
+ "parallel",
+ ],
+ UnrecognizedStr,
+]
+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."""
diff --git a/src/openrouter/components/websearchplugin.py b/src/openrouter/components/websearchplugin.py
new file mode 100644
index 0000000..93c8f70
--- /dev/null
+++ b/src/openrouter/components/websearchplugin.py
@@ -0,0 +1,48 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .websearchengine import WebSearchEngine
+from openrouter.types import BaseModel
+from openrouter.utils import validate_open_enum
+from pydantic.functional_validators import PlainValidator
+from typing import List, Literal, Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+WebSearchPluginID = Literal["web",]
+
+
+class WebSearchPluginTypedDict(TypedDict):
+ id: WebSearchPluginID
+ enabled: NotRequired[bool]
+ r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
+ engine: NotRequired[WebSearchEngine]
+ r"""The search engine to use for web search."""
+ exclude_domains: NotRequired[List[str]]
+ r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
+ 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]
+ search_prompt: NotRequired[str]
+
+
+class WebSearchPlugin(BaseModel):
+ id: WebSearchPluginID
+
+ enabled: Optional[bool] = None
+ r"""Set to false to disable the web-search plugin for this request. Defaults to true."""
+
+ engine: Annotated[
+ Optional[WebSearchEngine], PlainValidator(validate_open_enum(False))
+ ] = None
+ r"""The search engine to use for web search."""
+
+ exclude_domains: Optional[List[str]] = None
+ r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\")."""
+
+ include_domains: Optional[List[str]] = None
+ 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: Optional[int] = None
+
+ search_prompt: Optional[str] = None
diff --git a/src/openrouter/components/websearchservertool.py b/src/openrouter/components/websearchservertool.py
index c59e38c..363a4ea 100644
--- a/src/openrouter/components/websearchservertool.py
+++ b/src/openrouter/components/websearchservertool.py
@@ -2,6 +2,8 @@
from __future__ import annotations
from .searchcontextsizeenum import SearchContextSizeEnum
+from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
+from .websearchengineenum import WebSearchEngineEnum
from .websearchuserlocation import WebSearchUserLocation, WebSearchUserLocationTypedDict
from openrouter.types import (
BaseModel,
@@ -9,85 +11,30 @@ from openrouter.types import (
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, Optional, Union
+from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
WebSearchServerToolType = Literal["web_search_2025_08_26",]
-class WebSearchServerToolFiltersTypedDict(TypedDict):
- allowed_domains: NotRequired[Nullable[List[str]]]
- excluded_domains: NotRequired[Nullable[List[str]]]
-
-
-class WebSearchServerToolFilters(BaseModel):
- allowed_domains: OptionalNullable[List[str]] = UNSET
-
- excluded_domains: OptionalNullable[List[str]] = UNSET
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = ["allowed_domains", "excluded_domains"]
- nullable_fields = ["allowed_domains", "excluded_domains"]
- 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
-
-
-WebSearchServerToolEngine = Union[
- Literal[
- "auto",
- "native",
- "exa",
- "firecrawl",
- "parallel",
- ],
- UnrecognizedStr,
-]
-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."""
-
-
class WebSearchServerToolTypedDict(TypedDict):
r"""Web search tool configuration (2025-08-26 version)"""
type: WebSearchServerToolType
- filters: NotRequired[Nullable[WebSearchServerToolFiltersTypedDict]]
+ 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."""
+ filters: NotRequired[Nullable[WebSearchDomainFilterTypedDict]]
+ 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."""
search_context_size: NotRequired[SearchContextSizeEnum]
r"""Size of the search context for web search tools"""
user_location: NotRequired[Nullable[WebSearchUserLocationTypedDict]]
r"""User location information for web search"""
- engine: NotRequired[WebSearchServerToolEngine]
- 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."""
- max_results: NotRequired[float]
- 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."""
class WebSearchServerTool(BaseModel):
@@ -95,7 +42,15 @@ class WebSearchServerTool(BaseModel):
type: WebSearchServerToolType
- filters: OptionalNullable[WebSearchServerToolFilters] = UNSET
+ 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."""
+
+ filters: OptionalNullable[WebSearchDomainFilter] = UNSET
+
+ 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."""
search_context_size: Annotated[
Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False))
@@ -105,22 +60,14 @@ class WebSearchServerTool(BaseModel):
user_location: OptionalNullable[WebSearchUserLocation] = UNSET
r"""User location information for web search"""
- engine: Annotated[
- Optional[WebSearchServerToolEngine], 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."""
-
- max_results: Optional[float] = 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."""
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "engine",
"filters",
+ "max_results",
"search_context_size",
"user_location",
- "engine",
- "max_results",
]
nullable_fields = ["filters", "user_location"]
null_default_fields = []
diff --git a/src/openrouter/components/websearchservertool_openrouter.py b/src/openrouter/components/websearchservertool_openrouter.py
index b624ce7..29b8262 100644
--- a/src/openrouter/components/websearchservertool_openrouter.py
+++ b/src/openrouter/components/websearchservertool_openrouter.py
@@ -6,29 +6,29 @@ 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",]
-class WebSearchServerToolOpenRouterParametersTypedDict(TypedDict):
- max_results: NotRequired[float]
- r"""Maximum number of search results to return per search call. Defaults to 5."""
- max_total_results: NotRequired[float]
- 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 WebSearchServerToolOpenRouterParameters(BaseModel):
- max_results: Optional[float] = None
- r"""Maximum number of search results to return per search call. Defaults to 5."""
-
- max_total_results: Optional[float] = 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."""
-
-
class WebSearchServerToolOpenRouterTypedDict(TypedDict):
r"""OpenRouter built-in server tool: searches the web for current information"""
type: WebSearchServerToolOpenRouterType
- parameters: NotRequired[WebSearchServerToolOpenRouterParametersTypedDict]
+ parameters: NotRequired[ParametersTypedDict]
class WebSearchServerToolOpenRouter(BaseModel):
@@ -36,4 +36,4 @@ class WebSearchServerToolOpenRouter(BaseModel):
type: WebSearchServerToolOpenRouterType
- parameters: Optional[WebSearchServerToolOpenRouterParameters] = None
+ parameters: Optional[Parameters] = None
diff --git a/src/openrouter/components/websearchsource.py b/src/openrouter/components/websearchsource.py
new file mode 100644
index 0000000..13e5a78
--- /dev/null
+++ b/src/openrouter/components/websearchsource.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal
+from typing_extensions import TypedDict
+
+
+WebSearchSourceType = Literal["url",]
+
+
+class WebSearchSourceTypedDict(TypedDict):
+ type: WebSearchSourceType
+ url: str
+
+
+class WebSearchSource(BaseModel):
+ type: WebSearchSourceType
+
+ url: str
diff --git a/src/openrouter/components/websearchuserlocation.py b/src/openrouter/components/websearchuserlocation.py
index 4ffc90b..bdb5b03 100644
--- a/src/openrouter/components/websearchuserlocation.py
+++ b/src/openrouter/components/websearchuserlocation.py
@@ -19,18 +19,16 @@ WebSearchUserLocationType = Literal["approximate",]
class WebSearchUserLocationTypedDict(TypedDict):
r"""User location information for web search"""
- type: NotRequired[WebSearchUserLocationType]
city: NotRequired[Nullable[str]]
country: NotRequired[Nullable[str]]
region: NotRequired[Nullable[str]]
timezone: NotRequired[Nullable[str]]
+ type: NotRequired[WebSearchUserLocationType]
class WebSearchUserLocation(BaseModel):
r"""User location information for web search"""
- type: Optional[WebSearchUserLocationType] = None
-
city: OptionalNullable[str] = UNSET
country: OptionalNullable[str] = UNSET
@@ -39,9 +37,11 @@ class WebSearchUserLocation(BaseModel):
timezone: OptionalNullable[str] = UNSET
+ type: Optional[WebSearchUserLocationType] = None
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["type", "city", "country", "region", "timezone"]
+ optional_fields = ["city", "country", "region", "timezone", "type"]
nullable_fields = ["city", "country", "region", "timezone"]
null_default_fields = []
diff --git a/src/openrouter/components/websearchuserlocationservertool.py b/src/openrouter/components/websearchuserlocationservertool.py
new file mode 100644
index 0000000..a716b87
--- /dev/null
+++ b/src/openrouter/components/websearchuserlocationservertool.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
+
+
+WebSearchUserLocationServerToolType = Literal["approximate",]
+
+
+class WebSearchUserLocationServerToolTypedDict(TypedDict):
+ r"""Approximate user location for location-biased results."""
+
+ city: NotRequired[str]
+ country: NotRequired[str]
+ region: NotRequired[str]
+ timezone: NotRequired[str]
+ type: NotRequired[WebSearchUserLocationServerToolType]
+
+
+class WebSearchUserLocationServerTool(BaseModel):
+ r"""Approximate user location for location-biased results."""
+
+ city: Optional[str] = None
+
+ country: Optional[str] = None
+
+ region: Optional[str] = None
+
+ timezone: Optional[str] = None
+
+ type: Optional[WebSearchUserLocationServerToolType] = None
diff --git a/src/openrouter/credits.py b/src/openrouter/credits.py
index c06e2ae..0a376fb 100644
--- a/src/openrouter/credits.py
+++ b/src/openrouter/credits.py
@@ -7,7 +7,6 @@ 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
-from typing_extensions import deprecated
class Credits(BaseSDK):
@@ -81,10 +80,14 @@ class Credits(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -200,10 +203,14 @@ class Credits(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -250,221 +257,3 @@ class Credits(BaseSDK):
)
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- @deprecated(
- "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
- )
- def create_coinbase_charge(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ):
- r"""Deprecated Coinbase Commerce charge endpoint
-
- Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead.
-
- :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.CreateCoinbaseChargeRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- )
-
- req = self._build_request(
- method="POST",
- path="/credits/coinbase",
- base_url=base_url,
- url_variables=url_variables,
- request=request,
- request_body_required=False,
- request_has_path_params=False,
- request_has_query_params=False,
- user_agent_header="user-agent",
- accept_header_value="application/json",
- http_headers=http_headers,
- _globals=operations.CreateCoinbaseChargeGlobals(
- 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,
- ),
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="createCoinbaseCharge",
- oauth2_scopes=None,
- security_source=None,
- ),
- request=req,
- error_status_codes=["410", "4XX", "5XX"],
- retry_config=retry_config,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "410", "application/json"):
- response_data = unmarshal_json_response(
- errors.GoneResponseErrorData, http_res
- )
- raise errors.GoneResponseError(response_data, http_res)
- if utils.match_response(http_res, "2XX", "*"):
- return
- 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)
-
- @deprecated(
- "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
- )
- async def create_coinbase_charge_async(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ):
- r"""Deprecated Coinbase Commerce charge endpoint
-
- Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead.
-
- :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.CreateCoinbaseChargeRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- )
-
- req = self._build_request_async(
- method="POST",
- path="/credits/coinbase",
- base_url=base_url,
- url_variables=url_variables,
- request=request,
- request_body_required=False,
- request_has_path_params=False,
- request_has_query_params=False,
- user_agent_header="user-agent",
- accept_header_value="application/json",
- http_headers=http_headers,
- _globals=operations.CreateCoinbaseChargeGlobals(
- 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,
- ),
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="createCoinbaseCharge",
- oauth2_scopes=None,
- security_source=None,
- ),
- request=req,
- error_status_codes=["410", "4XX", "5XX"],
- retry_config=retry_config,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "410", "application/json"):
- response_data = unmarshal_json_response(
- errors.GoneResponseErrorData, http_res
- )
- raise errors.GoneResponseError(response_data, http_res)
- if utils.match_response(http_res, "2XX", "*"):
- return
- 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/embeddings.py b/src/openrouter/embeddings.py
index 0709e41..d842652 100644
--- a/src/openrouter/embeddings.py
+++ b/src/openrouter/embeddings.py
@@ -26,15 +26,15 @@ class Embeddings(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- encoding_format: Optional[operations.EncodingFormat] = None,
dimensions: Optional[int] = None,
- user: Optional[str] = None,
- provider: Optional[
+ encoding_format: Optional[operations.EncodingFormat] = None,
+ input_type: Optional[str] = None,
+ provider: OptionalNullable[
Union[
components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
- ] = None,
- input_type: Optional[str] = None,
+ ] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -45,8 +45,8 @@ class Embeddings(BaseSDK):
Submits an embedding request to the embeddings router
- :param input:
- :param model:
+ :param input: Text, token, or multimodal input(s) to embed
+ :param model: The model to use for embeddings
: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.
@@ -54,11 +54,11 @@ class Embeddings(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param encoding_format:
- :param dimensions:
- :param user:
- :param provider: Provider routing preferences for the request.
- :param input_type:
+ :param dimensions: The number of dimensions for the output embeddings
+ :param encoding_format: The format of the output embeddings
+ :param input_type: The type of input (e.g. search_query, search_document)
+ :param provider:
+ :param user: A unique identifier for the end-user
: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
@@ -80,15 +80,15 @@ class Embeddings(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
request_body=operations.CreateEmbeddingsRequestBody(
- input=utils.get_pydantic_model(input, operations.InputUnion),
- model=model,
- encoding_format=encoding_format,
dimensions=dimensions,
- user=user,
- provider=utils.get_pydantic_model(
- provider, Optional[components.ProviderPreferences]
- ),
+ encoding_format=encoding_format,
+ input=utils.get_pydantic_model(input, operations.InputUnion),
input_type=input_type,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ user=user,
),
)
@@ -126,10 +126,14 @@ class Embeddings(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -237,15 +241,15 @@ class Embeddings(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- encoding_format: Optional[operations.EncodingFormat] = None,
dimensions: Optional[int] = None,
- user: Optional[str] = None,
- provider: Optional[
+ encoding_format: Optional[operations.EncodingFormat] = None,
+ input_type: Optional[str] = None,
+ provider: OptionalNullable[
Union[
components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
- ] = None,
- input_type: Optional[str] = None,
+ ] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -256,8 +260,8 @@ class Embeddings(BaseSDK):
Submits an embedding request to the embeddings router
- :param input:
- :param model:
+ :param input: Text, token, or multimodal input(s) to embed
+ :param model: The model to use for embeddings
: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.
@@ -265,11 +269,11 @@ class Embeddings(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param encoding_format:
- :param dimensions:
- :param user:
- :param provider: Provider routing preferences for the request.
- :param input_type:
+ :param dimensions: The number of dimensions for the output embeddings
+ :param encoding_format: The format of the output embeddings
+ :param input_type: The type of input (e.g. search_query, search_document)
+ :param provider:
+ :param user: A unique identifier for the end-user
: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
@@ -291,15 +295,15 @@ class Embeddings(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
request_body=operations.CreateEmbeddingsRequestBody(
- input=utils.get_pydantic_model(input, operations.InputUnion),
- model=model,
- encoding_format=encoding_format,
dimensions=dimensions,
- user=user,
- provider=utils.get_pydantic_model(
- provider, Optional[components.ProviderPreferences]
- ),
+ encoding_format=encoding_format,
+ input=utils.get_pydantic_model(input, operations.InputUnion),
input_type=input_type,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ user=user,
),
)
@@ -337,10 +341,14 @@ class Embeddings(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -508,10 +516,14 @@ class Embeddings(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -622,10 +634,14 @@ class Embeddings(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/endpoints.py b/src/openrouter/endpoints.py
index 09823d3..871bd5b 100644
--- a/src/openrouter/endpoints.py
+++ b/src/openrouter/endpoints.py
@@ -12,242 +12,6 @@ from typing import Any, Mapping, Optional
class Endpoints(BaseSDK):
r"""Endpoint information"""
- def list(
- self,
- *,
- author: str,
- slug: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListEndpointsResponse:
- r"""List all endpoints for a model
-
- :param author:
- :param 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.ListEndpointsRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- author=author,
- slug=slug,
- )
-
- req = self._build_request(
- method="GET",
- path="/models/{author}/{slug}/endpoints",
- 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.ListEndpointsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listEndpoints",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["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(operations.ListEndpointsResponse, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def list_async(
- self,
- *,
- author: str,
- slug: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListEndpointsResponse:
- r"""List all endpoints for a model
-
- :param author:
- :param 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.ListEndpointsRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- author=author,
- slug=slug,
- )
-
- req = self._build_request_async(
- method="GET",
- path="/models/{author}/{slug}/endpoints",
- 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.ListEndpointsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listEndpoints",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["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(operations.ListEndpointsResponse, 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 list_zdr_endpoints(
self,
*,
@@ -314,10 +78,14 @@ class Endpoints(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -423,10 +191,14 @@ class Endpoints(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -465,3 +237,247 @@ class Endpoints(BaseSDK):
)
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def list(
+ self,
+ *,
+ author: str,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.ListEndpointsResponse:
+ r"""List all endpoints for a model
+
+ :param author: The author/organization of the model
+ :param slug: The model 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.ListEndpointsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ author=author,
+ slug=slug,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/models/{author}/{slug}/endpoints",
+ 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.ListEndpointsGlobals(
+ 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="listEndpoints",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["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(operations.ListEndpointsResponse, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_async(
+ self,
+ *,
+ author: str,
+ slug: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.ListEndpointsResponse:
+ r"""List all endpoints for a model
+
+ :param author: The author/organization of the model
+ :param slug: The model 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.ListEndpointsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ author=author,
+ slug=slug,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/models/{author}/{slug}/endpoints",
+ 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.ListEndpointsGlobals(
+ 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="listEndpoints",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["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(operations.ListEndpointsResponse, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/errors/__init__.py b/src/openrouter/errors/__init__.py
index 1695b73..dc5ef68 100644
--- a/src/openrouter/errors/__init__.py
+++ b/src/openrouter/errors/__init__.py
@@ -24,7 +24,6 @@ if TYPE_CHECKING:
ForbiddenResponseError,
ForbiddenResponseErrorData,
)
- from .goneresponse_error import GoneResponseError, GoneResponseErrorData
from .internalserverresponse_error import (
InternalServerResponseError,
InternalServerResponseErrorData,
@@ -77,8 +76,6 @@ __all__ = [
"EdgeNetworkTimeoutResponseErrorData",
"ForbiddenResponseError",
"ForbiddenResponseErrorData",
- "GoneResponseError",
- "GoneResponseErrorData",
"InternalServerResponseError",
"InternalServerResponseErrorData",
"NoResponseError",
@@ -116,8 +113,6 @@ _dynamic_imports: dict[str, str] = {
"EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponse_error",
"ForbiddenResponseError": ".forbiddenresponse_error",
"ForbiddenResponseErrorData": ".forbiddenresponse_error",
- "GoneResponseError": ".goneresponse_error",
- "GoneResponseErrorData": ".goneresponse_error",
"InternalServerResponseError": ".internalserverresponse_error",
"InternalServerResponseErrorData": ".internalserverresponse_error",
"NoResponseError": ".no_response_error",
diff --git a/src/openrouter/errors/goneresponse_error.py b/src/openrouter/errors/goneresponse_error.py
deleted file mode 100644
index 192dae5..0000000
--- a/src/openrouter/errors/goneresponse_error.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
-
-from __future__ import annotations
-from dataclasses import dataclass, field
-import httpx
-from openrouter.components import (
- goneresponseerrordata as components_goneresponseerrordata,
-)
-from openrouter.errors import OpenRouterError
-from openrouter.types import BaseModel, OptionalNullable, UNSET
-from typing import Optional
-
-
-class GoneResponseErrorData(BaseModel):
- error: components_goneresponseerrordata.GoneResponseErrorData
- r"""Error data for GoneResponse"""
- user_id: OptionalNullable[str] = UNSET
-
-
-@dataclass(unsafe_hash=True)
-class GoneResponseError(OpenRouterError):
- r"""Gone - Endpoint has been permanently removed or deprecated"""
-
- data: GoneResponseErrorData = field(hash=False)
-
- def __init__(
- self,
- data: GoneResponseErrorData,
- raw_response: httpx.Response,
- body: Optional[str] = None,
- ):
- fallback = body or raw_response.text
- message = str(data.error.message) or fallback
- super().__init__(message, raw_response, body)
- object.__setattr__(self, "data", data)
diff --git a/src/openrouter/generations.py b/src/openrouter/generations.py
index ccf3642..fddcce7 100644
--- a/src/openrouter/generations.py
+++ b/src/openrouter/generations.py
@@ -26,7 +26,7 @@ class Generations(BaseSDK):
) -> operations.GetGenerationResponse:
r"""Get request & usage metadata for a generation
- :param id:
+ :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.
@@ -81,10 +81,14 @@ class Generations(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -182,7 +186,7 @@ class Generations(BaseSDK):
) -> operations.GetGenerationResponse:
r"""Get request & usage metadata for a generation
- :param id:
+ :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.
@@ -237,10 +241,14 @@ class Generations(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/guardrails.py b/src/openrouter/guardrails.py
index 31dd3fb..50a17b2 100644
--- a/src/openrouter/guardrails.py
+++ b/src/openrouter/guardrails.py
@@ -1,12 +1,13 @@
"""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, List, Mapping, Optional
+from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union
class Guardrails(BaseSDK):
@@ -18,13 +19,13 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: 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,
- ) -> operations.ListGuardrailsResponse:
+ ) -> Optional[operations.ListGuardrailsResponse]:
r"""List guardrails
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -86,10 +87,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -106,9 +111,38 @@ class Guardrails(BaseSDK):
retry_config=retry_config,
)
+ def next_func() -> Optional[operations.ListGuardrailsResponse]:
+ 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 unmarshal_json_response(operations.ListGuardrailsResponse, http_res)
+ return operations.ListGuardrailsResponse(
+ result=unmarshal_json_response(
+ components.ListGuardrailsResponse, http_res
+ ),
+ next=next_func,
+ )
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
@@ -138,13 +172,13 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: 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,
- ) -> operations.ListGuardrailsResponse:
+ ) -> Optional[operations.ListGuardrailsResponse]:
r"""List guardrails
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -206,10 +240,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -226,9 +264,41 @@ class Guardrails(BaseSDK):
retry_config=retry_config,
)
+ def next_func() -> Awaitable[Optional[operations.ListGuardrailsResponse]]:
+ 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 unmarshal_json_response(operations.ListGuardrailsResponse, http_res)
+ return operations.ListGuardrailsResponse(
+ result=unmarshal_json_response(
+ components.ListGuardrailsResponse, http_res
+ ),
+ next=next_func,
+ )
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
@@ -259,20 +329,19 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- description: OptionalNullable[str] = UNSET,
- limit_usd: OptionalNullable[float] = UNSET,
- reset_interval: OptionalNullable[
- operations.CreateGuardrailResetIntervalRequest
- ] = UNSET,
- allowed_providers: OptionalNullable[List[str]] = UNSET,
- ignored_providers: OptionalNullable[List[str]] = UNSET,
allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_providers: OptionalNullable[List[str]] = UNSET,
+ description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ ignored_models: OptionalNullable[List[str]] = UNSET,
+ ignored_providers: OptionalNullable[List[str]] = UNSET,
+ limit_usd: Optional[float] = None,
+ reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.CreateGuardrailResponse:
+ ) -> components.CreateGuardrailResponse:
r"""Create a guardrail
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -285,13 +354,14 @@ class Guardrails(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
+ :param allowed_providers: List of allowed provider IDs
:param description: Description of the guardrail
+ :param enforce_zdr: Whether to enforce zero data retention
+ :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 allowed_providers: List of allowed provider IDs
- :param ignored_providers: List of provider IDs to exclude from routing
- :param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
- :param enforce_zdr: Whether to enforce zero data retention
: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
@@ -311,15 +381,16 @@ class Guardrails(BaseSDK):
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
- request_body=operations.CreateGuardrailRequestBody(
- name=name,
- description=description,
- limit_usd=limit_usd,
- reset_interval=reset_interval,
- allowed_providers=allowed_providers,
- ignored_providers=ignored_providers,
+ create_guardrail_request=components.CreateGuardrailRequest(
allowed_models=allowed_models,
+ allowed_providers=allowed_providers,
+ description=description,
enforce_zdr=enforce_zdr,
+ ignored_models=ignored_models,
+ ignored_providers=ignored_providers,
+ limit_usd=limit_usd,
+ name=name,
+ reset_interval=reset_interval,
),
)
@@ -342,11 +413,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.create_guardrail_request,
False,
False,
"json",
- operations.CreateGuardrailRequestBody,
+ components.CreateGuardrailRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -355,10 +426,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -377,7 +452,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "201", "application/json"):
- return unmarshal_json_response(operations.CreateGuardrailResponse, http_res)
+ return unmarshal_json_response(components.CreateGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -413,20 +488,19 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- description: OptionalNullable[str] = UNSET,
- limit_usd: OptionalNullable[float] = UNSET,
- reset_interval: OptionalNullable[
- operations.CreateGuardrailResetIntervalRequest
- ] = UNSET,
- allowed_providers: OptionalNullable[List[str]] = UNSET,
- ignored_providers: OptionalNullable[List[str]] = UNSET,
allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_providers: OptionalNullable[List[str]] = UNSET,
+ description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ ignored_models: OptionalNullable[List[str]] = UNSET,
+ ignored_providers: OptionalNullable[List[str]] = UNSET,
+ limit_usd: Optional[float] = None,
+ reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.CreateGuardrailResponse:
+ ) -> components.CreateGuardrailResponse:
r"""Create a guardrail
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -439,13 +513,14 @@ class Guardrails(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
+ :param allowed_providers: List of allowed provider IDs
:param description: Description of the guardrail
+ :param enforce_zdr: Whether to enforce zero data retention
+ :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 allowed_providers: List of allowed provider IDs
- :param ignored_providers: List of provider IDs to exclude from routing
- :param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
- :param enforce_zdr: Whether to enforce zero data retention
: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
@@ -465,15 +540,16 @@ class Guardrails(BaseSDK):
http_referer=http_referer,
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
- request_body=operations.CreateGuardrailRequestBody(
- name=name,
- description=description,
- limit_usd=limit_usd,
- reset_interval=reset_interval,
- allowed_providers=allowed_providers,
- ignored_providers=ignored_providers,
+ create_guardrail_request=components.CreateGuardrailRequest(
allowed_models=allowed_models,
+ allowed_providers=allowed_providers,
+ description=description,
enforce_zdr=enforce_zdr,
+ ignored_models=ignored_models,
+ ignored_providers=ignored_providers,
+ limit_usd=limit_usd,
+ name=name,
+ reset_interval=reset_interval,
),
)
@@ -496,11 +572,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.create_guardrail_request,
False,
False,
"json",
- operations.CreateGuardrailRequestBody,
+ components.CreateGuardrailRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -509,10 +585,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -531,7 +611,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "201", "application/json"):
- return unmarshal_json_response(operations.CreateGuardrailResponse, http_res)
+ return unmarshal_json_response(components.CreateGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -560,6 +640,258 @@ class Guardrails(BaseSDK):
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.DeleteGuardrailResponse:
+ r"""Delete a guardrail
+
+ Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The unique identifier of the guardrail to delete
+ :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.DeleteGuardrailRequest(
+ 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="/guardrails/{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.DeleteGuardrailGlobals(
+ 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="deleteGuardrail",
+ 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.DeleteGuardrailResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def delete_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.DeleteGuardrailResponse:
+ r"""Delete a guardrail
+
+ Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The unique identifier of the guardrail to delete
+ :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.DeleteGuardrailRequest(
+ 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="/guardrails/{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.DeleteGuardrailGlobals(
+ 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="deleteGuardrail",
+ 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.DeleteGuardrailResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
def get(
self,
*,
@@ -571,7 +903,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetGuardrailResponse:
+ ) -> components.GetGuardrailResponse:
r"""Get a guardrail
Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -631,10 +963,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -653,7 +989,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.GetGuardrailResponse, http_res)
+ return unmarshal_json_response(components.GetGuardrailResponse, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
@@ -693,7 +1029,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.GetGuardrailResponse:
+ ) -> components.GetGuardrailResponse:
r"""Get a guardrail
Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -753,10 +1089,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -775,7 +1115,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.GetGuardrailResponse, http_res)
+ return unmarshal_json_response(components.GetGuardrailResponse, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
@@ -811,21 +1151,20 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- name: Optional[str] = None,
- description: OptionalNullable[str] = UNSET,
- limit_usd: OptionalNullable[float] = UNSET,
- reset_interval: OptionalNullable[
- operations.UpdateGuardrailResetIntervalRequest
- ] = UNSET,
- allowed_providers: OptionalNullable[List[str]] = UNSET,
- ignored_providers: OptionalNullable[List[str]] = UNSET,
allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_providers: OptionalNullable[List[str]] = UNSET,
+ description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ ignored_models: OptionalNullable[List[str]] = UNSET,
+ ignored_providers: OptionalNullable[List[str]] = UNSET,
+ limit_usd: Optional[float] = None,
+ name: Optional[str] = None,
+ reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.UpdateGuardrailResponse:
+ ) -> components.UpdateGuardrailResponse:
r"""Update a guardrail
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -838,14 +1177,15 @@ class Guardrails(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param name: New name for the guardrail
- :param description: New description for the guardrail
- :param limit_usd: New spending limit in USD
- :param reset_interval: Interval at which the limit resets (daily, weekly, monthly)
- :param allowed_providers: New list of allowed provider IDs
- :param ignored_providers: List of provider IDs to exclude from routing
:param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
+ :param allowed_providers: New list of allowed provider IDs
+ :param description: New description for the guardrail
:param enforce_zdr: Whether to enforce zero data retention
+ :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
+ :param name: New name for the guardrail
+ :param reset_interval: Interval at which the limit resets (daily, weekly, monthly)
: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
@@ -866,15 +1206,16 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.UpdateGuardrailRequestBody(
- name=name,
- description=description,
- limit_usd=limit_usd,
- reset_interval=reset_interval,
- allowed_providers=allowed_providers,
- ignored_providers=ignored_providers,
+ update_guardrail_request=components.UpdateGuardrailRequest(
allowed_models=allowed_models,
+ allowed_providers=allowed_providers,
+ description=description,
enforce_zdr=enforce_zdr,
+ ignored_models=ignored_models,
+ ignored_providers=ignored_providers,
+ limit_usd=limit_usd,
+ name=name,
+ reset_interval=reset_interval,
),
)
@@ -897,11 +1238,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.update_guardrail_request,
False,
False,
"json",
- operations.UpdateGuardrailRequestBody,
+ components.UpdateGuardrailRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -910,10 +1251,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -932,7 +1277,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.UpdateGuardrailResponse, http_res)
+ return unmarshal_json_response(components.UpdateGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -973,21 +1318,20 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- name: Optional[str] = None,
- description: OptionalNullable[str] = UNSET,
- limit_usd: OptionalNullable[float] = UNSET,
- reset_interval: OptionalNullable[
- operations.UpdateGuardrailResetIntervalRequest
- ] = UNSET,
- allowed_providers: OptionalNullable[List[str]] = UNSET,
- ignored_providers: OptionalNullable[List[str]] = UNSET,
allowed_models: OptionalNullable[List[str]] = UNSET,
+ allowed_providers: OptionalNullable[List[str]] = UNSET,
+ description: OptionalNullable[str] = UNSET,
enforce_zdr: OptionalNullable[bool] = UNSET,
+ ignored_models: OptionalNullable[List[str]] = UNSET,
+ ignored_providers: OptionalNullable[List[str]] = UNSET,
+ limit_usd: Optional[float] = None,
+ name: Optional[str] = None,
+ reset_interval: OptionalNullable[components.GuardrailInterval] = UNSET,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.UpdateGuardrailResponse:
+ ) -> components.UpdateGuardrailResponse:
r"""Update a guardrail
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -1000,14 +1344,15 @@ class Guardrails(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param name: New name for the guardrail
- :param description: New description for the guardrail
- :param limit_usd: New spending limit in USD
- :param reset_interval: Interval at which the limit resets (daily, weekly, monthly)
- :param allowed_providers: New list of allowed provider IDs
- :param ignored_providers: List of provider IDs to exclude from routing
:param allowed_models: Array of model identifiers (slug or canonical_slug accepted)
+ :param allowed_providers: New list of allowed provider IDs
+ :param description: New description for the guardrail
:param enforce_zdr: Whether to enforce zero data retention
+ :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
+ :param name: New name for the guardrail
+ :param reset_interval: Interval at which the limit resets (daily, weekly, monthly)
: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
@@ -1028,15 +1373,16 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.UpdateGuardrailRequestBody(
- name=name,
- description=description,
- limit_usd=limit_usd,
- reset_interval=reset_interval,
- allowed_providers=allowed_providers,
- ignored_providers=ignored_providers,
+ update_guardrail_request=components.UpdateGuardrailRequest(
allowed_models=allowed_models,
+ allowed_providers=allowed_providers,
+ description=description,
enforce_zdr=enforce_zdr,
+ ignored_models=ignored_models,
+ ignored_providers=ignored_providers,
+ limit_usd=limit_usd,
+ name=name,
+ reset_interval=reset_interval,
),
)
@@ -1059,11 +1405,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.update_guardrail_request,
False,
False,
"json",
- operations.UpdateGuardrailRequestBody,
+ components.UpdateGuardrailRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -1072,10 +1418,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -1094,7 +1444,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(operations.UpdateGuardrailResponse, http_res)
+ return unmarshal_json_response(components.UpdateGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -1128,738 +1478,6 @@ class Guardrails(BaseSDK):
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,
- ) -> operations.DeleteGuardrailResponse:
- r"""Delete a guardrail
-
- Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param id: The unique identifier of the guardrail to delete
- :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.DeleteGuardrailRequest(
- 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="/guardrails/{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.DeleteGuardrailGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="deleteGuardrail",
- 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(operations.DeleteGuardrailResponse, http_res)
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def delete_async(
- self,
- *,
- id: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.DeleteGuardrailResponse:
- r"""Delete a guardrail
-
- Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param id: The unique identifier of the guardrail to delete
- :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.DeleteGuardrailRequest(
- 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="/guardrails/{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.DeleteGuardrailGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="deleteGuardrail",
- 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(operations.DeleteGuardrailResponse, 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 list_key_assignments(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListKeyAssignmentsResponse:
- r"""List all key assignments
-
- List all API key guardrail assignments 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.ListKeyAssignmentsRequest(
- 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="/guardrails/assignments/keys",
- 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.ListKeyAssignmentsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listKeyAssignments",
- 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,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.ListKeyAssignmentsResponse, http_res
- )
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def list_key_assignments_async(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListKeyAssignmentsResponse:
- r"""List all key assignments
-
- List all API key guardrail assignments 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.ListKeyAssignmentsRequest(
- 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="/guardrails/assignments/keys",
- 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.ListKeyAssignmentsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listKeyAssignments",
- 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,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.ListKeyAssignmentsResponse, http_res
- )
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- def list_member_assignments(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListMemberAssignmentsResponse:
- r"""List all member assignments
-
- List all organization member guardrail assignments 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.ListMemberAssignmentsRequest(
- 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="/guardrails/assignments/members",
- 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.ListMemberAssignmentsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listMemberAssignments",
- 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,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.ListMemberAssignmentsResponse, http_res
- )
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def list_member_assignments_async(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListMemberAssignmentsResponse:
- r"""List all member assignments
-
- List all organization member guardrail assignments 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.ListMemberAssignmentsRequest(
- 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="/guardrails/assignments/members",
- 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.ListMemberAssignmentsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listMemberAssignments",
- 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,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.ListMemberAssignmentsResponse, http_res
- )
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
def list_guardrail_key_assignments(
self,
*,
@@ -1867,13 +1485,13 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: 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,
- ) -> operations.ListGuardrailKeyAssignmentsResponse:
+ ) -> Optional[operations.ListGuardrailKeyAssignmentsResponse]:
r"""List key assignments for a guardrail
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -1937,10 +1555,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -1957,10 +1579,38 @@ class Guardrails(BaseSDK):
retry_config=retry_config,
)
+ def next_func() -> Optional[operations.ListGuardrailKeyAssignmentsResponse]:
+ 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_guardrail_key_assignments(
+ id=id,
+ 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 unmarshal_json_response(
- operations.ListGuardrailKeyAssignmentsResponse, http_res
+ return operations.ListGuardrailKeyAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListKeyAssignmentsResponse, http_res
+ ),
+ next=next_func,
)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
@@ -1997,13 +1647,13 @@ class Guardrails(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: 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,
- ) -> operations.ListGuardrailKeyAssignmentsResponse:
+ ) -> Optional[operations.ListGuardrailKeyAssignmentsResponse]:
r"""List key assignments for a guardrail
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -2067,10 +1717,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -2087,10 +1741,43 @@ class Guardrails(BaseSDK):
retry_config=retry_config,
)
+ def next_func() -> (
+ Awaitable[Optional[operations.ListGuardrailKeyAssignmentsResponse]]
+ ):
+ 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_guardrail_key_assignments_async(
+ id=id,
+ 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 unmarshal_json_response(
- operations.ListGuardrailKeyAssignmentsResponse, http_res
+ return operations.ListGuardrailKeyAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListKeyAssignmentsResponse, http_res
+ ),
+ next=next_func,
)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
@@ -2132,7 +1819,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.BulkAssignKeysToGuardrailResponse:
+ ) -> components.BulkAssignKeysResponse:
r"""Bulk assign keys to a guardrail
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -2166,7 +1853,7 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.BulkAssignKeysToGuardrailRequestBody(
+ bulk_assign_keys_request=components.BulkAssignKeysRequest(
key_hashes=key_hashes,
),
)
@@ -2190,11 +1877,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.bulk_assign_keys_request,
False,
False,
"json",
- operations.BulkAssignKeysToGuardrailRequestBody,
+ components.BulkAssignKeysRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -2203,10 +1890,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -2225,9 +1916,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.BulkAssignKeysToGuardrailResponse, http_res
- )
+ return unmarshal_json_response(components.BulkAssignKeysResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -2273,7 +1962,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.BulkAssignKeysToGuardrailResponse:
+ ) -> components.BulkAssignKeysResponse:
r"""Bulk assign keys to a guardrail
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -2307,7 +1996,7 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.BulkAssignKeysToGuardrailRequestBody(
+ bulk_assign_keys_request=components.BulkAssignKeysRequest(
key_hashes=key_hashes,
),
)
@@ -2331,11 +2020,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.bulk_assign_keys_request,
False,
False,
"json",
- operations.BulkAssignKeysToGuardrailRequestBody,
+ components.BulkAssignKeysRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -2344,10 +2033,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -2366,551 +2059,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.BulkAssignKeysToGuardrailResponse, http_res
- )
- if utils.match_response(http_res, "400", "application/json"):
- response_data = unmarshal_json_response(
- errors.BadRequestResponseErrorData, http_res
- )
- raise errors.BadRequestResponseError(response_data, http_res)
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- def list_guardrail_member_assignments(
- self,
- *,
- id: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListGuardrailMemberAssignmentsResponse:
- r"""List member assignments for a guardrail
-
- List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param id: The unique identifier of the guardrail
- :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.ListGuardrailMemberAssignmentsRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- id=id,
- offset=offset,
- limit=limit,
- )
-
- req = self._build_request(
- method="GET",
- path="/guardrails/{id}/assignments/members",
- 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.ListGuardrailMemberAssignmentsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listGuardrailMemberAssignments",
- 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(
- operations.ListGuardrailMemberAssignmentsResponse, http_res
- )
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def list_guardrail_member_assignments_async(
- self,
- *,
- id: str,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- offset: Optional[str] = None,
- limit: Optional[str] = None,
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
- server_url: Optional[str] = None,
- timeout_ms: Optional[int] = None,
- http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.ListGuardrailMemberAssignmentsResponse:
- r"""List member assignments for a guardrail
-
- List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param id: The unique identifier of the guardrail
- :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.ListGuardrailMemberAssignmentsRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- id=id,
- offset=offset,
- limit=limit,
- )
-
- req = self._build_request_async(
- method="GET",
- path="/guardrails/{id}/assignments/members",
- 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.ListGuardrailMemberAssignmentsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="listGuardrailMemberAssignments",
- 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(
- operations.ListGuardrailMemberAssignmentsResponse, 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 bulk_assign_members(
- self,
- *,
- id: str,
- member_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,
- ) -> operations.BulkAssignMembersToGuardrailResponse:
- r"""Bulk assign members to a guardrail
-
- Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param id: The unique identifier of the guardrail
- :param member_user_ids: Array of member user IDs to assign to the guardrail
- :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.BulkAssignMembersToGuardrailRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- id=id,
- request_body=operations.BulkAssignMembersToGuardrailRequestBody(
- member_user_ids=member_user_ids,
- ),
- )
-
- req = self._build_request(
- method="POST",
- path="/guardrails/{id}/assignments/members",
- 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.BulkAssignMembersToGuardrailGlobals(
- http_referer=self.sdk_configuration.globals.http_referer,
- x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
- x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
- ),
- security=self.sdk_configuration.security,
- get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
- False,
- False,
- "json",
- operations.BulkAssignMembersToGuardrailRequestBody,
- ),
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="bulkAssignMembersToGuardrail",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
- retry_config=retry_config,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.BulkAssignMembersToGuardrailResponse, http_res
- )
- if utils.match_response(http_res, "400", "application/json"):
- response_data = unmarshal_json_response(
- errors.BadRequestResponseErrorData, http_res
- )
- raise errors.BadRequestResponseError(response_data, http_res)
- if utils.match_response(http_res, "401", "application/json"):
- response_data = unmarshal_json_response(
- errors.UnauthorizedResponseErrorData, http_res
- )
- raise errors.UnauthorizedResponseError(response_data, http_res)
- if utils.match_response(http_res, "404", "application/json"):
- response_data = unmarshal_json_response(
- errors.NotFoundResponseErrorData, http_res
- )
- raise errors.NotFoundResponseError(response_data, http_res)
- if utils.match_response(http_res, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = utils.stream_to_text(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
- async def bulk_assign_members_async(
- self,
- *,
- id: str,
- member_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,
- ) -> operations.BulkAssignMembersToGuardrailResponse:
- r"""Bulk assign members to a guardrail
-
- Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
-
- :param id: The unique identifier of the guardrail
- :param member_user_ids: Array of member user IDs to assign to the guardrail
- :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.BulkAssignMembersToGuardrailRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- id=id,
- request_body=operations.BulkAssignMembersToGuardrailRequestBody(
- member_user_ids=member_user_ids,
- ),
- )
-
- req = self._build_request_async(
- method="POST",
- path="/guardrails/{id}/assignments/members",
- 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.BulkAssignMembersToGuardrailGlobals(
- http_referer=self.sdk_configuration.globals.http_referer,
- x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
- x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
- ),
- security=self.sdk_configuration.security,
- get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
- False,
- False,
- "json",
- operations.BulkAssignMembersToGuardrailRequestBody,
- ),
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="bulkAssignMembersToGuardrail",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
- retry_config=retry_config,
- )
-
- response_data: Any = None
- if utils.match_response(http_res, "200", "application/json"):
- return unmarshal_json_response(
- operations.BulkAssignMembersToGuardrailResponse, http_res
- )
+ return unmarshal_json_response(components.BulkAssignKeysResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
@@ -2956,7 +2105,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.BulkUnassignKeysFromGuardrailResponse:
+ ) -> components.BulkUnassignKeysResponse:
r"""Bulk unassign keys from a guardrail
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -2990,7 +2139,7 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.BulkUnassignKeysFromGuardrailRequestBody(
+ bulk_unassign_keys_request=components.BulkUnassignKeysRequest(
key_hashes=key_hashes,
),
)
@@ -3014,11 +2163,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.bulk_unassign_keys_request,
False,
False,
"json",
- operations.BulkUnassignKeysFromGuardrailRequestBody,
+ components.BulkUnassignKeysRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -3027,10 +2176,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -3050,7 +2203,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(
- operations.BulkUnassignKeysFromGuardrailResponse, http_res
+ components.BulkUnassignKeysResponse, http_res
)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
@@ -3097,7 +2250,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.BulkUnassignKeysFromGuardrailResponse:
+ ) -> components.BulkUnassignKeysResponse:
r"""Bulk unassign keys from a guardrail
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -3131,7 +2284,7 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.BulkUnassignKeysFromGuardrailRequestBody(
+ bulk_unassign_keys_request=components.BulkUnassignKeysRequest(
key_hashes=key_hashes,
),
)
@@ -3155,11 +2308,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.bulk_unassign_keys_request,
False,
False,
"json",
- operations.BulkUnassignKeysFromGuardrailRequestBody,
+ components.BulkUnassignKeysRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -3168,10 +2321,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -3191,7 +2348,626 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(
- operations.BulkUnassignKeysFromGuardrailResponse, http_res
+ components.BulkUnassignKeysResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def list_guardrail_member_assignments(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListGuardrailMemberAssignmentsResponse]:
+ r"""List member assignments for a guardrail
+
+ List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The unique identifier of the guardrail
+ :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.ListGuardrailMemberAssignmentsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/guardrails/{id}/assignments/members",
+ 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.ListGuardrailMemberAssignmentsGlobals(
+ 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="listGuardrailMemberAssignments",
+ 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,
+ )
+
+ def next_func() -> Optional[operations.ListGuardrailMemberAssignmentsResponse]:
+ 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_guardrail_member_assignments(
+ id=id,
+ 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.ListGuardrailMemberAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListMemberAssignmentsResponse, 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, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_guardrail_member_assignments_async(
+ self,
+ *,
+ id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> Optional[operations.ListGuardrailMemberAssignmentsResponse]:
+ r"""List member assignments for a guardrail
+
+ List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The unique identifier of the guardrail
+ :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.ListGuardrailMemberAssignmentsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ offset=offset,
+ limit=limit,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/guardrails/{id}/assignments/members",
+ 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.ListGuardrailMemberAssignmentsGlobals(
+ 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="listGuardrailMemberAssignments",
+ 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,
+ )
+
+ def next_func() -> (
+ Awaitable[Optional[operations.ListGuardrailMemberAssignmentsResponse]]
+ ):
+ 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_guardrail_member_assignments_async(
+ id=id,
+ 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.ListGuardrailMemberAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListMemberAssignmentsResponse, 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, "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_assign_members(
+ self,
+ *,
+ id: str,
+ member_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.BulkAssignMembersResponse:
+ r"""Bulk assign members to a guardrail
+
+ Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The unique identifier of the guardrail
+ :param member_user_ids: Array of member user IDs to assign to the guardrail
+ :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.BulkAssignMembersToGuardrailRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ bulk_assign_members_request=components.BulkAssignMembersRequest(
+ member_user_ids=member_user_ids,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/guardrails/{id}/assignments/members",
+ 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.BulkAssignMembersToGuardrailGlobals(
+ 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_assign_members_request,
+ False,
+ False,
+ "json",
+ components.BulkAssignMembersRequest,
+ ),
+ 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="bulkAssignMembersToGuardrail",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.BulkAssignMembersResponse, http_res
+ )
+ if utils.match_response(http_res, "400", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.BadRequestResponseErrorData, http_res
+ )
+ raise errors.BadRequestResponseError(response_data, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def bulk_assign_members_async(
+ self,
+ *,
+ id: str,
+ member_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.BulkAssignMembersResponse:
+ r"""Bulk assign members to a guardrail
+
+ Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
+
+ :param id: The unique identifier of the guardrail
+ :param member_user_ids: Array of member user IDs to assign to the guardrail
+ :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.BulkAssignMembersToGuardrailRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ id=id,
+ bulk_assign_members_request=components.BulkAssignMembersRequest(
+ member_user_ids=member_user_ids,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/guardrails/{id}/assignments/members",
+ 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.BulkAssignMembersToGuardrailGlobals(
+ 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_assign_members_request,
+ False,
+ False,
+ "json",
+ components.BulkAssignMembersRequest,
+ ),
+ 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="bulkAssignMembersToGuardrail",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return unmarshal_json_response(
+ components.BulkAssignMembersResponse, http_res
)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
@@ -3238,7 +3014,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.BulkUnassignMembersFromGuardrailResponse:
+ ) -> components.BulkUnassignMembersResponse:
r"""Bulk unassign members from a guardrail
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -3272,7 +3048,7 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.BulkUnassignMembersFromGuardrailRequestBody(
+ bulk_unassign_members_request=components.BulkUnassignMembersRequest(
member_user_ids=member_user_ids,
),
)
@@ -3296,11 +3072,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.bulk_unassign_members_request,
False,
False,
"json",
- operations.BulkUnassignMembersFromGuardrailRequestBody,
+ components.BulkUnassignMembersRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -3309,10 +3085,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -3332,7 +3112,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(
- operations.BulkUnassignMembersFromGuardrailResponse, http_res
+ components.BulkUnassignMembersResponse, http_res
)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
@@ -3379,7 +3159,7 @@ class Guardrails(BaseSDK):
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
http_headers: Optional[Mapping[str, str]] = None,
- ) -> operations.BulkUnassignMembersFromGuardrailResponse:
+ ) -> components.BulkUnassignMembersResponse:
r"""Bulk unassign members from a guardrail
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
@@ -3413,7 +3193,7 @@ class Guardrails(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
id=id,
- request_body=operations.BulkUnassignMembersFromGuardrailRequestBody(
+ bulk_unassign_members_request=components.BulkUnassignMembersRequest(
member_user_ids=member_user_ids,
),
)
@@ -3437,11 +3217,11 @@ class Guardrails(BaseSDK):
),
security=self.sdk_configuration.security,
get_serialized_body=lambda: utils.serialize_request_body(
- request.request_body,
+ request.bulk_unassign_members_request,
False,
False,
"json",
- operations.BulkUnassignMembersFromGuardrailRequestBody,
+ components.BulkUnassignMembersRequest,
),
allow_empty_value=None,
timeout_ms=timeout_ms,
@@ -3450,10 +3230,14 @@ class Guardrails(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -3473,7 +3257,7 @@ class Guardrails(BaseSDK):
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(
- operations.BulkUnassignMembersFromGuardrailResponse, http_res
+ components.BulkUnassignMembersResponse, http_res
)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
@@ -3507,3 +3291,623 @@ class Guardrails(BaseSDK):
)
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def list_key_assignments(
+ 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.ListKeyAssignmentsResponse]:
+ r"""List all key assignments
+
+ List all API key guardrail assignments 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.ListKeyAssignmentsRequest(
+ 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="/guardrails/assignments/keys",
+ 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.ListKeyAssignmentsGlobals(
+ 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="listKeyAssignments",
+ 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.ListKeyAssignmentsResponse]:
+ 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_key_assignments(
+ 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.ListKeyAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListKeyAssignmentsResponse, 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_key_assignments_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.ListKeyAssignmentsResponse]:
+ r"""List all key assignments
+
+ List all API key guardrail assignments 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.ListKeyAssignmentsRequest(
+ 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="/guardrails/assignments/keys",
+ 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.ListKeyAssignmentsGlobals(
+ 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="listKeyAssignments",
+ 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.ListKeyAssignmentsResponse]]:
+ 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_key_assignments_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.ListKeyAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListKeyAssignmentsResponse, 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 list_member_assignments(
+ 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.ListMemberAssignmentsResponse]:
+ r"""List all member assignments
+
+ List all organization member guardrail assignments 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.ListMemberAssignmentsRequest(
+ 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="/guardrails/assignments/members",
+ 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.ListMemberAssignmentsGlobals(
+ 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="listMemberAssignments",
+ 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.ListMemberAssignmentsResponse]:
+ 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_member_assignments(
+ 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.ListMemberAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListMemberAssignmentsResponse, 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_member_assignments_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.ListMemberAssignmentsResponse]:
+ r"""List all member assignments
+
+ List all organization member guardrail assignments 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.ListMemberAssignmentsRequest(
+ 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="/guardrails/assignments/members",
+ 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.ListMemberAssignmentsGlobals(
+ 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="listMemberAssignments",
+ 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.ListMemberAssignmentsResponse]]
+ ):
+ 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_member_assignments_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.ListMemberAssignmentsResponse(
+ result=unmarshal_json_response(
+ components.ListMemberAssignmentsResponse, 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)
diff --git a/src/openrouter/models_.py b/src/openrouter/models_.py
index 9da3b00..a0963ae 100644
--- a/src/openrouter/models_.py
+++ b/src/openrouter/models_.py
@@ -12,6 +12,256 @@ from typing import Any, Mapping, Optional, Union
class Models(BaseSDK):
r"""Model information endpoints"""
+ def list(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ category: Optional[operations.Category] = None,
+ supported_parameters: Optional[str] = None,
+ output_modalities: 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.ModelsListResponse:
+ r"""List all models and their properties
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param category: Filter models by use case category
+ :param supported_parameters: Filter models by supported parameter (comma-separated)
+ :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
+ :param 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.GetModelsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ category=category,
+ supported_parameters=supported_parameters,
+ output_modalities=output_modalities,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/models",
+ 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.GetModelsGlobals(
+ 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="getModels",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "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.ModelsListResponse, 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, "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,
+ category: Optional[operations.Category] = None,
+ supported_parameters: Optional[str] = None,
+ output_modalities: 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.ModelsListResponse:
+ r"""List all models and their properties
+
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ :param category: Filter models by use case category
+ :param supported_parameters: Filter models by supported parameter (comma-separated)
+ :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
+ :param 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.GetModelsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ category=category,
+ supported_parameters=supported_parameters,
+ output_modalities=output_modalities,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/models",
+ 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.GetModelsGlobals(
+ 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="getModels",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "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.ModelsListResponse, 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, "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 count(
self,
*,
@@ -81,10 +331,14 @@ class Models(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -196,10 +450,14 @@ class Models(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -242,248 +500,6 @@ class Models(BaseSDK):
raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
- def list(
- self,
- *,
- http_referer: Optional[str] = None,
- x_open_router_title: Optional[str] = None,
- x_open_router_categories: Optional[str] = None,
- category: Optional[operations.Category] = None,
- supported_parameters: Optional[str] = None,
- output_modalities: 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.ModelsListResponse:
- r"""List all models and their properties
-
- :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
- This is used to track API usage per application.
-
- :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
-
- :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
-
- :param category: Filter models by use case category
- :param supported_parameters:
- :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
- :param 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.GetModelsRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- category=category,
- supported_parameters=supported_parameters,
- output_modalities=output_modalities,
- )
-
- req = self._build_request(
- method="GET",
- path="/models",
- 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.GetModelsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = self.do_request(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="getModels",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["400", "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.ModelsListResponse, 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, "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,
- category: Optional[operations.Category] = None,
- supported_parameters: Optional[str] = None,
- output_modalities: 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.ModelsListResponse:
- r"""List all models and their properties
-
- :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
- This is used to track API usage per application.
-
- :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
-
- :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
-
- :param category: Filter models by use case category
- :param supported_parameters:
- :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".
- :param 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.GetModelsRequest(
- http_referer=http_referer,
- x_open_router_title=x_open_router_title,
- x_open_router_categories=x_open_router_categories,
- category=category,
- supported_parameters=supported_parameters,
- output_modalities=output_modalities,
- )
-
- req = self._build_request_async(
- method="GET",
- path="/models",
- 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.GetModelsGlobals(
- 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
-
- retry_config = None
- if isinstance(retries, utils.RetryConfig):
- retry_config = (retries, ["429", "500", "502", "503", "504"])
-
- http_res = await self.do_request_async(
- hook_ctx=HookContext(
- config=self.sdk_configuration,
- base_url=base_url or "",
- operation_id="getModels",
- oauth2_scopes=None,
- security_source=get_security_from_env(
- self.sdk_configuration.security, components.Security
- ),
- ),
- request=req,
- error_status_codes=["400", "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.ModelsListResponse, 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, "500", "application/json"):
- response_data = unmarshal_json_response(
- errors.InternalServerResponseErrorData, http_res
- )
- raise errors.InternalServerResponseError(response_data, http_res)
- if utils.match_response(http_res, "4XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
- if utils.match_response(http_res, "5XX", "*"):
- http_res_text = await utils.stream_to_text_async(http_res)
- raise errors.OpenRouterDefaultError(
- "API error occurred", http_res, http_res_text
- )
-
- raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
-
def list_for_user(
self,
*,
@@ -501,7 +517,7 @@ class Models(BaseSDK):
) -> components.ModelsListResponse:
r"""List models filtered by user provider preferences, privacy settings, and guardrails
- List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/logging#enterprise-eu-in-region-routing).
+ List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
:param security:
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -559,10 +575,14 @@ class Models(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -625,7 +645,7 @@ class Models(BaseSDK):
) -> components.ModelsListResponse:
r"""List models filtered by user provider preferences, privacy settings, and guardrails
- List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/logging#enterprise-eu-in-region-routing).
+ List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
:param security:
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -683,10 +703,14 @@ class Models(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/oauth.py b/src/openrouter/oauth.py
index b31df9f..ef6eb9a 100644
--- a/src/openrouter/oauth.py
+++ b/src/openrouter/oauth.py
@@ -20,10 +20,10 @@ class OAuth(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- code_verifier: Optional[str] = None,
code_challenge_method: OptionalNullable[
operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod
] = UNSET,
+ code_verifier: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -41,8 +41,8 @@ class OAuth(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param code_verifier: The code verifier if code_challenge was used in the authorization request
:param code_challenge_method: The method used to generate the code challenge
+ :param code_verifier: The code verifier if code_challenge was used in the authorization request
: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
@@ -64,8 +64,8 @@ class OAuth(BaseSDK):
x_open_router_categories=x_open_router_categories,
request_body=operations.ExchangeAuthCodeForAPIKeyRequestBody(
code=code,
- code_verifier=code_verifier,
code_challenge_method=code_challenge_method,
+ code_verifier=code_verifier,
),
)
@@ -101,10 +101,14 @@ class OAuth(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -161,10 +165,10 @@ class OAuth(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- code_verifier: Optional[str] = None,
code_challenge_method: OptionalNullable[
operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod
] = UNSET,
+ code_verifier: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -182,8 +186,8 @@ class OAuth(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
- :param code_verifier: The code verifier if code_challenge was used in the authorization request
:param code_challenge_method: The method used to generate the code challenge
+ :param code_verifier: The code verifier if code_challenge was used in the authorization request
: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
@@ -205,8 +209,8 @@ class OAuth(BaseSDK):
x_open_router_categories=x_open_router_categories,
request_body=operations.ExchangeAuthCodeForAPIKeyRequestBody(
code=code,
- code_verifier=code_verifier,
code_challenge_method=code_challenge_method,
+ code_verifier=code_verifier,
),
)
@@ -242,10 +246,14 @@ class OAuth(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
@@ -306,9 +314,9 @@ class OAuth(BaseSDK):
code_challenge_method: Optional[
operations.CreateAuthKeysCodeCodeChallengeMethod
] = None,
- limit: Optional[float] = None,
expires_at: OptionalNullable[datetime] = UNSET,
key_label: Optional[str] = None,
+ limit: Optional[float] = None,
usage_limit_type: Optional[operations.UsageLimitType] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
@@ -329,9 +337,9 @@ class OAuth(BaseSDK):
:param code_challenge: PKCE code challenge for enhanced security
:param code_challenge_method: The method used to generate the code challenge
- :param limit: Credit limit for the API key to be created
:param expires_at: Optional expiration time for the API key to be created
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
+ :param limit: Credit limit for the API key to be created
:param usage_limit_type: Optional credit limit reset interval. When set, the credit limit resets on this interval.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
@@ -356,9 +364,9 @@ class OAuth(BaseSDK):
callback_url=callback_url,
code_challenge=code_challenge,
code_challenge_method=code_challenge_method,
- limit=limit,
expires_at=expires_at,
key_label=key_label,
+ limit=limit,
usage_limit_type=usage_limit_type,
),
)
@@ -395,10 +403,14 @@ class OAuth(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -464,9 +476,9 @@ class OAuth(BaseSDK):
code_challenge_method: Optional[
operations.CreateAuthKeysCodeCodeChallengeMethod
] = None,
- limit: Optional[float] = None,
expires_at: OptionalNullable[datetime] = UNSET,
key_label: Optional[str] = None,
+ limit: Optional[float] = None,
usage_limit_type: Optional[operations.UsageLimitType] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
@@ -487,9 +499,9 @@ class OAuth(BaseSDK):
:param code_challenge: PKCE code challenge for enhanced security
:param code_challenge_method: The method used to generate the code challenge
- :param limit: Credit limit for the API key to be created
:param expires_at: Optional expiration time for the API key to be created
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
+ :param limit: Credit limit for the API key to be created
:param usage_limit_type: Optional credit limit reset interval. When set, the credit limit resets on this interval.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
@@ -514,9 +526,9 @@ class OAuth(BaseSDK):
callback_url=callback_url,
code_challenge=code_challenge,
code_challenge_method=code_challenge_method,
- limit=limit,
expires_at=expires_at,
key_label=key_label,
+ limit=limit,
usage_limit_type=usage_limit_type,
),
)
@@ -553,10 +565,14 @@ class OAuth(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/operations/__init__.py b/src/openrouter/operations/__init__.py
index 154f411..8c2b319 100644
--- a/src/openrouter/operations/__init__.py
+++ b/src/openrouter/operations/__init__.py
@@ -10,41 +10,25 @@ if TYPE_CHECKING:
BulkAssignKeysToGuardrailGlobals,
BulkAssignKeysToGuardrailGlobalsTypedDict,
BulkAssignKeysToGuardrailRequest,
- BulkAssignKeysToGuardrailRequestBody,
- BulkAssignKeysToGuardrailRequestBodyTypedDict,
BulkAssignKeysToGuardrailRequestTypedDict,
- BulkAssignKeysToGuardrailResponse,
- BulkAssignKeysToGuardrailResponseTypedDict,
)
from .bulkassignmemberstoguardrail import (
BulkAssignMembersToGuardrailGlobals,
BulkAssignMembersToGuardrailGlobalsTypedDict,
BulkAssignMembersToGuardrailRequest,
- BulkAssignMembersToGuardrailRequestBody,
- BulkAssignMembersToGuardrailRequestBodyTypedDict,
BulkAssignMembersToGuardrailRequestTypedDict,
- BulkAssignMembersToGuardrailResponse,
- BulkAssignMembersToGuardrailResponseTypedDict,
)
from .bulkunassignkeysfromguardrail import (
BulkUnassignKeysFromGuardrailGlobals,
BulkUnassignKeysFromGuardrailGlobalsTypedDict,
BulkUnassignKeysFromGuardrailRequest,
- BulkUnassignKeysFromGuardrailRequestBody,
- BulkUnassignKeysFromGuardrailRequestBodyTypedDict,
BulkUnassignKeysFromGuardrailRequestTypedDict,
- BulkUnassignKeysFromGuardrailResponse,
- BulkUnassignKeysFromGuardrailResponseTypedDict,
)
from .bulkunassignmembersfromguardrail import (
BulkUnassignMembersFromGuardrailGlobals,
BulkUnassignMembersFromGuardrailGlobalsTypedDict,
BulkUnassignMembersFromGuardrailRequest,
- BulkUnassignMembersFromGuardrailRequestBody,
- BulkUnassignMembersFromGuardrailRequestBodyTypedDict,
BulkUnassignMembersFromGuardrailRequestTypedDict,
- BulkUnassignMembersFromGuardrailResponse,
- BulkUnassignMembersFromGuardrailResponseTypedDict,
)
from .createauthkeyscode import (
CreateAuthKeysCodeCodeChallengeMethod,
@@ -60,12 +44,6 @@ if TYPE_CHECKING:
CreateAuthKeysCodeResponseTypedDict,
UsageLimitType,
)
- from .createcoinbasecharge import (
- CreateCoinbaseChargeGlobals,
- CreateCoinbaseChargeGlobalsTypedDict,
- CreateCoinbaseChargeRequest,
- CreateCoinbaseChargeRequestTypedDict,
- )
from .createembeddings import (
Content,
ContentImageURL,
@@ -85,6 +63,8 @@ if TYPE_CHECKING:
CreateEmbeddingsResponseBody,
CreateEmbeddingsResponseBodyTypedDict,
CreateEmbeddingsResponseTypedDict,
+ CreateEmbeddingsUsage,
+ CreateEmbeddingsUsageTypedDict,
Embedding,
EmbeddingTypedDict,
EncodingFormat,
@@ -98,22 +78,12 @@ if TYPE_CHECKING:
ObjectEmbedding,
TypeImageURL,
TypeText,
- Usage,
- UsageTypedDict,
)
from .createguardrail import (
- CreateGuardrailData,
- CreateGuardrailDataTypedDict,
CreateGuardrailGlobals,
CreateGuardrailGlobalsTypedDict,
CreateGuardrailRequest,
- CreateGuardrailRequestBody,
- CreateGuardrailRequestBodyTypedDict,
CreateGuardrailRequestTypedDict,
- CreateGuardrailResetIntervalRequest,
- CreateGuardrailResetIntervalResponse,
- CreateGuardrailResponse,
- CreateGuardrailResponseTypedDict,
)
from .createkeys import (
CreateKeysData,
@@ -128,6 +98,24 @@ if TYPE_CHECKING:
CreateKeysResponse,
CreateKeysResponseTypedDict,
)
+ from .creatererank import (
+ CreateRerankGlobals,
+ CreateRerankGlobalsTypedDict,
+ CreateRerankRequest,
+ CreateRerankRequestBody,
+ CreateRerankRequestBodyTypedDict,
+ CreateRerankRequestTypedDict,
+ CreateRerankResponse,
+ CreateRerankResponseBody,
+ CreateRerankResponseBodyTypedDict,
+ CreateRerankResponseTypedDict,
+ CreateRerankUsage,
+ CreateRerankUsageTypedDict,
+ Document,
+ DocumentTypedDict,
+ Result,
+ ResultTypedDict,
+ )
from .createresponses import (
CreateResponsesGlobals,
CreateResponsesGlobalsTypedDict,
@@ -138,13 +126,17 @@ if TYPE_CHECKING:
CreateResponsesResponseBodyTypedDict,
CreateResponsesResponseTypedDict,
)
+ from .createvideos import (
+ CreateVideosGlobals,
+ CreateVideosGlobalsTypedDict,
+ CreateVideosRequest,
+ CreateVideosRequestTypedDict,
+ )
from .deleteguardrail import (
DeleteGuardrailGlobals,
DeleteGuardrailGlobalsTypedDict,
DeleteGuardrailRequest,
DeleteGuardrailRequestTypedDict,
- DeleteGuardrailResponse,
- DeleteGuardrailResponseTypedDict,
)
from .deletekeys import (
DeleteKeysGlobals,
@@ -197,20 +189,12 @@ if TYPE_CHECKING:
GetGenerationRequestTypedDict,
GetGenerationResponse,
GetGenerationResponseTypedDict,
- ProviderName,
- ProviderResponse,
- ProviderResponseTypedDict,
)
from .getguardrail import (
- GetGuardrailData,
- GetGuardrailDataTypedDict,
GetGuardrailGlobals,
GetGuardrailGlobalsTypedDict,
GetGuardrailRequest,
GetGuardrailRequestTypedDict,
- GetGuardrailResetInterval,
- GetGuardrailResponse,
- GetGuardrailResponseTypedDict,
)
from .getkey import (
GetKeyData,
@@ -234,8 +218,12 @@ if TYPE_CHECKING:
GetUserActivityGlobalsTypedDict,
GetUserActivityRequest,
GetUserActivityRequestTypedDict,
- GetUserActivityResponse,
- GetUserActivityResponseTypedDict,
+ )
+ from .getvideos import (
+ GetVideosGlobals,
+ GetVideosGlobalsTypedDict,
+ GetVideosRequest,
+ GetVideosRequestTypedDict,
)
from .list import (
ListData,
@@ -270,8 +258,6 @@ if TYPE_CHECKING:
ListEndpointsZdrResponseTypedDict,
)
from .listguardrailkeyassignments import (
- ListGuardrailKeyAssignmentsData,
- ListGuardrailKeyAssignmentsDataTypedDict,
ListGuardrailKeyAssignmentsGlobals,
ListGuardrailKeyAssignmentsGlobalsTypedDict,
ListGuardrailKeyAssignmentsRequest,
@@ -280,8 +266,6 @@ if TYPE_CHECKING:
ListGuardrailKeyAssignmentsResponseTypedDict,
)
from .listguardrailmemberassignments import (
- ListGuardrailMemberAssignmentsData,
- ListGuardrailMemberAssignmentsDataTypedDict,
ListGuardrailMemberAssignmentsGlobals,
ListGuardrailMemberAssignmentsGlobalsTypedDict,
ListGuardrailMemberAssignmentsRequest,
@@ -290,19 +274,14 @@ if TYPE_CHECKING:
ListGuardrailMemberAssignmentsResponseTypedDict,
)
from .listguardrails import (
- ListGuardrailsData,
- ListGuardrailsDataTypedDict,
ListGuardrailsGlobals,
ListGuardrailsGlobalsTypedDict,
ListGuardrailsRequest,
ListGuardrailsRequestTypedDict,
- ListGuardrailsResetInterval,
ListGuardrailsResponse,
ListGuardrailsResponseTypedDict,
)
from .listkeyassignments import (
- ListKeyAssignmentsData,
- ListKeyAssignmentsDataTypedDict,
ListKeyAssignmentsGlobals,
ListKeyAssignmentsGlobalsTypedDict,
ListKeyAssignmentsRequest,
@@ -311,8 +290,6 @@ if TYPE_CHECKING:
ListKeyAssignmentsResponseTypedDict,
)
from .listmemberassignments import (
- ListMemberAssignmentsData,
- ListMemberAssignmentsDataTypedDict,
ListMemberAssignmentsGlobals,
ListMemberAssignmentsGlobalsTypedDict,
ListMemberAssignmentsRequest,
@@ -334,6 +311,19 @@ if TYPE_CHECKING:
ListModelsUserSecurity,
ListModelsUserSecurityTypedDict,
)
+ from .listorganizationmembers import (
+ ListOrganizationMembersData,
+ ListOrganizationMembersDataTypedDict,
+ ListOrganizationMembersGlobals,
+ ListOrganizationMembersGlobalsTypedDict,
+ ListOrganizationMembersRequest,
+ ListOrganizationMembersRequestTypedDict,
+ ListOrganizationMembersResponse,
+ ListOrganizationMembersResponseBody,
+ ListOrganizationMembersResponseBodyTypedDict,
+ ListOrganizationMembersResponseTypedDict,
+ Role,
+ )
from .listproviders import (
Datacenter,
Headquarters,
@@ -346,6 +336,18 @@ if TYPE_CHECKING:
ListProvidersResponse,
ListProvidersResponseTypedDict,
)
+ from .listvideoscontent import (
+ ListVideosContentGlobals,
+ ListVideosContentGlobalsTypedDict,
+ ListVideosContentRequest,
+ ListVideosContentRequestTypedDict,
+ )
+ from .listvideosmodels import (
+ ListVideosModelsGlobals,
+ ListVideosModelsGlobalsTypedDict,
+ ListVideosModelsRequest,
+ ListVideosModelsRequestTypedDict,
+ )
from .sendchatcompletionrequest import (
SendChatCompletionRequestGlobals,
SendChatCompletionRequestGlobalsTypedDict,
@@ -357,18 +359,10 @@ if TYPE_CHECKING:
SendChatCompletionRequestResponseTypedDict,
)
from .updateguardrail import (
- UpdateGuardrailData,
- UpdateGuardrailDataTypedDict,
UpdateGuardrailGlobals,
UpdateGuardrailGlobalsTypedDict,
UpdateGuardrailRequest,
- UpdateGuardrailRequestBody,
- UpdateGuardrailRequestBodyTypedDict,
UpdateGuardrailRequestTypedDict,
- UpdateGuardrailResetIntervalRequest,
- UpdateGuardrailResetIntervalResponse,
- UpdateGuardrailResponse,
- UpdateGuardrailResponseTypedDict,
)
from .updatekeys import (
UpdateKeysData,
@@ -389,35 +383,19 @@ __all__ = [
"BulkAssignKeysToGuardrailGlobals",
"BulkAssignKeysToGuardrailGlobalsTypedDict",
"BulkAssignKeysToGuardrailRequest",
- "BulkAssignKeysToGuardrailRequestBody",
- "BulkAssignKeysToGuardrailRequestBodyTypedDict",
"BulkAssignKeysToGuardrailRequestTypedDict",
- "BulkAssignKeysToGuardrailResponse",
- "BulkAssignKeysToGuardrailResponseTypedDict",
"BulkAssignMembersToGuardrailGlobals",
"BulkAssignMembersToGuardrailGlobalsTypedDict",
"BulkAssignMembersToGuardrailRequest",
- "BulkAssignMembersToGuardrailRequestBody",
- "BulkAssignMembersToGuardrailRequestBodyTypedDict",
"BulkAssignMembersToGuardrailRequestTypedDict",
- "BulkAssignMembersToGuardrailResponse",
- "BulkAssignMembersToGuardrailResponseTypedDict",
"BulkUnassignKeysFromGuardrailGlobals",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict",
"BulkUnassignKeysFromGuardrailRequest",
- "BulkUnassignKeysFromGuardrailRequestBody",
- "BulkUnassignKeysFromGuardrailRequestBodyTypedDict",
"BulkUnassignKeysFromGuardrailRequestTypedDict",
- "BulkUnassignKeysFromGuardrailResponse",
- "BulkUnassignKeysFromGuardrailResponseTypedDict",
"BulkUnassignMembersFromGuardrailGlobals",
"BulkUnassignMembersFromGuardrailGlobalsTypedDict",
"BulkUnassignMembersFromGuardrailRequest",
- "BulkUnassignMembersFromGuardrailRequestBody",
- "BulkUnassignMembersFromGuardrailRequestBodyTypedDict",
"BulkUnassignMembersFromGuardrailRequestTypedDict",
- "BulkUnassignMembersFromGuardrailResponse",
- "BulkUnassignMembersFromGuardrailResponseTypedDict",
"Category",
"Content",
"ContentImageURL",
@@ -436,10 +414,6 @@ __all__ = [
"CreateAuthKeysCodeRequestTypedDict",
"CreateAuthKeysCodeResponse",
"CreateAuthKeysCodeResponseTypedDict",
- "CreateCoinbaseChargeGlobals",
- "CreateCoinbaseChargeGlobalsTypedDict",
- "CreateCoinbaseChargeRequest",
- "CreateCoinbaseChargeRequestTypedDict",
"CreateEmbeddingsData",
"CreateEmbeddingsDataTypedDict",
"CreateEmbeddingsGlobals",
@@ -452,18 +426,12 @@ __all__ = [
"CreateEmbeddingsResponseBody",
"CreateEmbeddingsResponseBodyTypedDict",
"CreateEmbeddingsResponseTypedDict",
- "CreateGuardrailData",
- "CreateGuardrailDataTypedDict",
+ "CreateEmbeddingsUsage",
+ "CreateEmbeddingsUsageTypedDict",
"CreateGuardrailGlobals",
"CreateGuardrailGlobalsTypedDict",
"CreateGuardrailRequest",
- "CreateGuardrailRequestBody",
- "CreateGuardrailRequestBodyTypedDict",
"CreateGuardrailRequestTypedDict",
- "CreateGuardrailResetIntervalRequest",
- "CreateGuardrailResetIntervalResponse",
- "CreateGuardrailResponse",
- "CreateGuardrailResponseTypedDict",
"CreateKeysData",
"CreateKeysDataTypedDict",
"CreateKeysGlobals",
@@ -475,6 +443,18 @@ __all__ = [
"CreateKeysRequestTypedDict",
"CreateKeysResponse",
"CreateKeysResponseTypedDict",
+ "CreateRerankGlobals",
+ "CreateRerankGlobalsTypedDict",
+ "CreateRerankRequest",
+ "CreateRerankRequestBody",
+ "CreateRerankRequestBodyTypedDict",
+ "CreateRerankRequestTypedDict",
+ "CreateRerankResponse",
+ "CreateRerankResponseBody",
+ "CreateRerankResponseBodyTypedDict",
+ "CreateRerankResponseTypedDict",
+ "CreateRerankUsage",
+ "CreateRerankUsageTypedDict",
"CreateResponsesGlobals",
"CreateResponsesGlobalsTypedDict",
"CreateResponsesRequest",
@@ -483,19 +463,23 @@ __all__ = [
"CreateResponsesResponseBody",
"CreateResponsesResponseBodyTypedDict",
"CreateResponsesResponseTypedDict",
+ "CreateVideosGlobals",
+ "CreateVideosGlobalsTypedDict",
+ "CreateVideosRequest",
+ "CreateVideosRequestTypedDict",
"Datacenter",
"DeleteGuardrailGlobals",
"DeleteGuardrailGlobalsTypedDict",
"DeleteGuardrailRequest",
"DeleteGuardrailRequestTypedDict",
- "DeleteGuardrailResponse",
- "DeleteGuardrailResponseTypedDict",
"DeleteKeysGlobals",
"DeleteKeysGlobalsTypedDict",
"DeleteKeysRequest",
"DeleteKeysRequestTypedDict",
"DeleteKeysResponse",
"DeleteKeysResponseTypedDict",
+ "Document",
+ "DocumentTypedDict",
"Embedding",
"EmbeddingTypedDict",
"EncodingFormat",
@@ -532,15 +516,10 @@ __all__ = [
"GetGenerationRequestTypedDict",
"GetGenerationResponse",
"GetGenerationResponseTypedDict",
- "GetGuardrailData",
- "GetGuardrailDataTypedDict",
"GetGuardrailGlobals",
"GetGuardrailGlobalsTypedDict",
"GetGuardrailRequest",
"GetGuardrailRequestTypedDict",
- "GetGuardrailResetInterval",
- "GetGuardrailResponse",
- "GetGuardrailResponseTypedDict",
"GetKeyData",
"GetKeyDataTypedDict",
"GetKeyGlobals",
@@ -557,8 +536,10 @@ __all__ = [
"GetUserActivityGlobalsTypedDict",
"GetUserActivityRequest",
"GetUserActivityRequestTypedDict",
- "GetUserActivityResponse",
- "GetUserActivityResponseTypedDict",
+ "GetVideosGlobals",
+ "GetVideosGlobalsTypedDict",
+ "GetVideosRequest",
+ "GetVideosRequestTypedDict",
"Headquarters",
"ImageURL",
"ImageURLTypedDict",
@@ -586,41 +567,30 @@ __all__ = [
"ListEndpointsZdrResponseTypedDict",
"ListGlobals",
"ListGlobalsTypedDict",
- "ListGuardrailKeyAssignmentsData",
- "ListGuardrailKeyAssignmentsDataTypedDict",
"ListGuardrailKeyAssignmentsGlobals",
"ListGuardrailKeyAssignmentsGlobalsTypedDict",
"ListGuardrailKeyAssignmentsRequest",
"ListGuardrailKeyAssignmentsRequestTypedDict",
"ListGuardrailKeyAssignmentsResponse",
"ListGuardrailKeyAssignmentsResponseTypedDict",
- "ListGuardrailMemberAssignmentsData",
- "ListGuardrailMemberAssignmentsDataTypedDict",
"ListGuardrailMemberAssignmentsGlobals",
"ListGuardrailMemberAssignmentsGlobalsTypedDict",
"ListGuardrailMemberAssignmentsRequest",
"ListGuardrailMemberAssignmentsRequestTypedDict",
"ListGuardrailMemberAssignmentsResponse",
"ListGuardrailMemberAssignmentsResponseTypedDict",
- "ListGuardrailsData",
- "ListGuardrailsDataTypedDict",
"ListGuardrailsGlobals",
"ListGuardrailsGlobalsTypedDict",
"ListGuardrailsRequest",
"ListGuardrailsRequestTypedDict",
- "ListGuardrailsResetInterval",
"ListGuardrailsResponse",
"ListGuardrailsResponseTypedDict",
- "ListKeyAssignmentsData",
- "ListKeyAssignmentsDataTypedDict",
"ListKeyAssignmentsGlobals",
"ListKeyAssignmentsGlobalsTypedDict",
"ListKeyAssignmentsRequest",
"ListKeyAssignmentsRequestTypedDict",
"ListKeyAssignmentsResponse",
"ListKeyAssignmentsResponseTypedDict",
- "ListMemberAssignmentsData",
- "ListMemberAssignmentsDataTypedDict",
"ListMemberAssignmentsGlobals",
"ListMemberAssignmentsGlobalsTypedDict",
"ListMemberAssignmentsRequest",
@@ -637,6 +607,16 @@ __all__ = [
"ListModelsUserRequestTypedDict",
"ListModelsUserSecurity",
"ListModelsUserSecurityTypedDict",
+ "ListOrganizationMembersData",
+ "ListOrganizationMembersDataTypedDict",
+ "ListOrganizationMembersGlobals",
+ "ListOrganizationMembersGlobalsTypedDict",
+ "ListOrganizationMembersRequest",
+ "ListOrganizationMembersRequestTypedDict",
+ "ListOrganizationMembersResponse",
+ "ListOrganizationMembersResponseBody",
+ "ListOrganizationMembersResponseBodyTypedDict",
+ "ListOrganizationMembersResponseTypedDict",
"ListProvidersData",
"ListProvidersDataTypedDict",
"ListProvidersGlobals",
@@ -649,13 +629,21 @@ __all__ = [
"ListRequestTypedDict",
"ListResponse",
"ListResponseTypedDict",
+ "ListVideosContentGlobals",
+ "ListVideosContentGlobalsTypedDict",
+ "ListVideosContentRequest",
+ "ListVideosContentRequestTypedDict",
+ "ListVideosModelsGlobals",
+ "ListVideosModelsGlobalsTypedDict",
+ "ListVideosModelsRequest",
+ "ListVideosModelsRequestTypedDict",
"Object",
"ObjectEmbedding",
- "ProviderName",
- "ProviderResponse",
- "ProviderResponseTypedDict",
"RateLimit",
"RateLimitTypedDict",
+ "Result",
+ "ResultTypedDict",
+ "Role",
"SendChatCompletionRequestGlobals",
"SendChatCompletionRequestGlobalsTypedDict",
"SendChatCompletionRequestRequest",
@@ -666,18 +654,10 @@ __all__ = [
"SendChatCompletionRequestResponseTypedDict",
"TypeImageURL",
"TypeText",
- "UpdateGuardrailData",
- "UpdateGuardrailDataTypedDict",
"UpdateGuardrailGlobals",
"UpdateGuardrailGlobalsTypedDict",
"UpdateGuardrailRequest",
- "UpdateGuardrailRequestBody",
- "UpdateGuardrailRequestBodyTypedDict",
"UpdateGuardrailRequestTypedDict",
- "UpdateGuardrailResetIntervalRequest",
- "UpdateGuardrailResetIntervalResponse",
- "UpdateGuardrailResponse",
- "UpdateGuardrailResponseTypedDict",
"UpdateKeysData",
"UpdateKeysDataTypedDict",
"UpdateKeysGlobals",
@@ -689,44 +669,26 @@ __all__ = [
"UpdateKeysRequestTypedDict",
"UpdateKeysResponse",
"UpdateKeysResponseTypedDict",
- "Usage",
"UsageLimitType",
- "UsageTypedDict",
]
_dynamic_imports: dict[str, str] = {
"BulkAssignKeysToGuardrailGlobals": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailGlobalsTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequest": ".bulkassignkeystoguardrail",
- "BulkAssignKeysToGuardrailRequestBody": ".bulkassignkeystoguardrail",
- "BulkAssignKeysToGuardrailRequestBodyTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequestTypedDict": ".bulkassignkeystoguardrail",
- "BulkAssignKeysToGuardrailResponse": ".bulkassignkeystoguardrail",
- "BulkAssignKeysToGuardrailResponseTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignMembersToGuardrailGlobals": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailGlobalsTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequest": ".bulkassignmemberstoguardrail",
- "BulkAssignMembersToGuardrailRequestBody": ".bulkassignmemberstoguardrail",
- "BulkAssignMembersToGuardrailRequestBodyTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequestTypedDict": ".bulkassignmemberstoguardrail",
- "BulkAssignMembersToGuardrailResponse": ".bulkassignmemberstoguardrail",
- "BulkAssignMembersToGuardrailResponseTypedDict": ".bulkassignmemberstoguardrail",
"BulkUnassignKeysFromGuardrailGlobals": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequest": ".bulkunassignkeysfromguardrail",
- "BulkUnassignKeysFromGuardrailRequestBody": ".bulkunassignkeysfromguardrail",
- "BulkUnassignKeysFromGuardrailRequestBodyTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequestTypedDict": ".bulkunassignkeysfromguardrail",
- "BulkUnassignKeysFromGuardrailResponse": ".bulkunassignkeysfromguardrail",
- "BulkUnassignKeysFromGuardrailResponseTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignMembersFromGuardrailGlobals": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailGlobalsTypedDict": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequest": ".bulkunassignmembersfromguardrail",
- "BulkUnassignMembersFromGuardrailRequestBody": ".bulkunassignmembersfromguardrail",
- "BulkUnassignMembersFromGuardrailRequestBodyTypedDict": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequestTypedDict": ".bulkunassignmembersfromguardrail",
- "BulkUnassignMembersFromGuardrailResponse": ".bulkunassignmembersfromguardrail",
- "BulkUnassignMembersFromGuardrailResponseTypedDict": ".bulkunassignmembersfromguardrail",
"CreateAuthKeysCodeCodeChallengeMethod": ".createauthkeyscode",
"CreateAuthKeysCodeData": ".createauthkeyscode",
"CreateAuthKeysCodeDataTypedDict": ".createauthkeyscode",
@@ -739,10 +701,6 @@ _dynamic_imports: dict[str, str] = {
"CreateAuthKeysCodeResponse": ".createauthkeyscode",
"CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
"UsageLimitType": ".createauthkeyscode",
- "CreateCoinbaseChargeGlobals": ".createcoinbasecharge",
- "CreateCoinbaseChargeGlobalsTypedDict": ".createcoinbasecharge",
- "CreateCoinbaseChargeRequest": ".createcoinbasecharge",
- "CreateCoinbaseChargeRequestTypedDict": ".createcoinbasecharge",
"Content": ".createembeddings",
"ContentImageURL": ".createembeddings",
"ContentImageURLTypedDict": ".createembeddings",
@@ -761,6 +719,8 @@ _dynamic_imports: dict[str, str] = {
"CreateEmbeddingsResponseBody": ".createembeddings",
"CreateEmbeddingsResponseBodyTypedDict": ".createembeddings",
"CreateEmbeddingsResponseTypedDict": ".createembeddings",
+ "CreateEmbeddingsUsage": ".createembeddings",
+ "CreateEmbeddingsUsageTypedDict": ".createembeddings",
"Embedding": ".createembeddings",
"EmbeddingTypedDict": ".createembeddings",
"EncodingFormat": ".createembeddings",
@@ -774,20 +734,10 @@ _dynamic_imports: dict[str, str] = {
"ObjectEmbedding": ".createembeddings",
"TypeImageURL": ".createembeddings",
"TypeText": ".createembeddings",
- "Usage": ".createembeddings",
- "UsageTypedDict": ".createembeddings",
- "CreateGuardrailData": ".createguardrail",
- "CreateGuardrailDataTypedDict": ".createguardrail",
"CreateGuardrailGlobals": ".createguardrail",
"CreateGuardrailGlobalsTypedDict": ".createguardrail",
"CreateGuardrailRequest": ".createguardrail",
- "CreateGuardrailRequestBody": ".createguardrail",
- "CreateGuardrailRequestBodyTypedDict": ".createguardrail",
"CreateGuardrailRequestTypedDict": ".createguardrail",
- "CreateGuardrailResetIntervalRequest": ".createguardrail",
- "CreateGuardrailResetIntervalResponse": ".createguardrail",
- "CreateGuardrailResponse": ".createguardrail",
- "CreateGuardrailResponseTypedDict": ".createguardrail",
"CreateKeysData": ".createkeys",
"CreateKeysDataTypedDict": ".createkeys",
"CreateKeysGlobals": ".createkeys",
@@ -799,6 +749,22 @@ _dynamic_imports: dict[str, str] = {
"CreateKeysRequestTypedDict": ".createkeys",
"CreateKeysResponse": ".createkeys",
"CreateKeysResponseTypedDict": ".createkeys",
+ "CreateRerankGlobals": ".creatererank",
+ "CreateRerankGlobalsTypedDict": ".creatererank",
+ "CreateRerankRequest": ".creatererank",
+ "CreateRerankRequestBody": ".creatererank",
+ "CreateRerankRequestBodyTypedDict": ".creatererank",
+ "CreateRerankRequestTypedDict": ".creatererank",
+ "CreateRerankResponse": ".creatererank",
+ "CreateRerankResponseBody": ".creatererank",
+ "CreateRerankResponseBodyTypedDict": ".creatererank",
+ "CreateRerankResponseTypedDict": ".creatererank",
+ "CreateRerankUsage": ".creatererank",
+ "CreateRerankUsageTypedDict": ".creatererank",
+ "Document": ".creatererank",
+ "DocumentTypedDict": ".creatererank",
+ "Result": ".creatererank",
+ "ResultTypedDict": ".creatererank",
"CreateResponsesGlobals": ".createresponses",
"CreateResponsesGlobalsTypedDict": ".createresponses",
"CreateResponsesRequest": ".createresponses",
@@ -807,12 +773,14 @@ _dynamic_imports: dict[str, str] = {
"CreateResponsesResponseBody": ".createresponses",
"CreateResponsesResponseBodyTypedDict": ".createresponses",
"CreateResponsesResponseTypedDict": ".createresponses",
+ "CreateVideosGlobals": ".createvideos",
+ "CreateVideosGlobalsTypedDict": ".createvideos",
+ "CreateVideosRequest": ".createvideos",
+ "CreateVideosRequestTypedDict": ".createvideos",
"DeleteGuardrailGlobals": ".deleteguardrail",
"DeleteGuardrailGlobalsTypedDict": ".deleteguardrail",
"DeleteGuardrailRequest": ".deleteguardrail",
"DeleteGuardrailRequestTypedDict": ".deleteguardrail",
- "DeleteGuardrailResponse": ".deleteguardrail",
- "DeleteGuardrailResponseTypedDict": ".deleteguardrail",
"DeleteKeysGlobals": ".deletekeys",
"DeleteKeysGlobalsTypedDict": ".deletekeys",
"DeleteKeysRequest": ".deletekeys",
@@ -855,18 +823,10 @@ _dynamic_imports: dict[str, str] = {
"GetGenerationRequestTypedDict": ".getgeneration",
"GetGenerationResponse": ".getgeneration",
"GetGenerationResponseTypedDict": ".getgeneration",
- "ProviderName": ".getgeneration",
- "ProviderResponse": ".getgeneration",
- "ProviderResponseTypedDict": ".getgeneration",
- "GetGuardrailData": ".getguardrail",
- "GetGuardrailDataTypedDict": ".getguardrail",
"GetGuardrailGlobals": ".getguardrail",
"GetGuardrailGlobalsTypedDict": ".getguardrail",
"GetGuardrailRequest": ".getguardrail",
"GetGuardrailRequestTypedDict": ".getguardrail",
- "GetGuardrailResetInterval": ".getguardrail",
- "GetGuardrailResponse": ".getguardrail",
- "GetGuardrailResponseTypedDict": ".getguardrail",
"GetKeyData": ".getkey",
"GetKeyDataTypedDict": ".getkey",
"GetKeyGlobals": ".getkey",
@@ -884,8 +844,10 @@ _dynamic_imports: dict[str, str] = {
"GetUserActivityGlobalsTypedDict": ".getuseractivity",
"GetUserActivityRequest": ".getuseractivity",
"GetUserActivityRequestTypedDict": ".getuseractivity",
- "GetUserActivityResponse": ".getuseractivity",
- "GetUserActivityResponseTypedDict": ".getuseractivity",
+ "GetVideosGlobals": ".getvideos",
+ "GetVideosGlobalsTypedDict": ".getvideos",
+ "GetVideosRequest": ".getvideos",
+ "GetVideosRequestTypedDict": ".getvideos",
"ListData": ".list",
"ListDataTypedDict": ".list",
"ListGlobals": ".list",
@@ -910,41 +872,30 @@ _dynamic_imports: dict[str, str] = {
"ListEndpointsZdrRequestTypedDict": ".listendpointszdr",
"ListEndpointsZdrResponse": ".listendpointszdr",
"ListEndpointsZdrResponseTypedDict": ".listendpointszdr",
- "ListGuardrailKeyAssignmentsData": ".listguardrailkeyassignments",
- "ListGuardrailKeyAssignmentsDataTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsGlobals": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsGlobalsTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsRequest": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsRequestTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsResponse": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsResponseTypedDict": ".listguardrailkeyassignments",
- "ListGuardrailMemberAssignmentsData": ".listguardrailmemberassignments",
- "ListGuardrailMemberAssignmentsDataTypedDict": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsGlobals": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsGlobalsTypedDict": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsRequest": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsRequestTypedDict": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsResponse": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsResponseTypedDict": ".listguardrailmemberassignments",
- "ListGuardrailsData": ".listguardrails",
- "ListGuardrailsDataTypedDict": ".listguardrails",
"ListGuardrailsGlobals": ".listguardrails",
"ListGuardrailsGlobalsTypedDict": ".listguardrails",
"ListGuardrailsRequest": ".listguardrails",
"ListGuardrailsRequestTypedDict": ".listguardrails",
- "ListGuardrailsResetInterval": ".listguardrails",
"ListGuardrailsResponse": ".listguardrails",
"ListGuardrailsResponseTypedDict": ".listguardrails",
- "ListKeyAssignmentsData": ".listkeyassignments",
- "ListKeyAssignmentsDataTypedDict": ".listkeyassignments",
"ListKeyAssignmentsGlobals": ".listkeyassignments",
"ListKeyAssignmentsGlobalsTypedDict": ".listkeyassignments",
"ListKeyAssignmentsRequest": ".listkeyassignments",
"ListKeyAssignmentsRequestTypedDict": ".listkeyassignments",
"ListKeyAssignmentsResponse": ".listkeyassignments",
"ListKeyAssignmentsResponseTypedDict": ".listkeyassignments",
- "ListMemberAssignmentsData": ".listmemberassignments",
- "ListMemberAssignmentsDataTypedDict": ".listmemberassignments",
"ListMemberAssignmentsGlobals": ".listmemberassignments",
"ListMemberAssignmentsGlobalsTypedDict": ".listmemberassignments",
"ListMemberAssignmentsRequest": ".listmemberassignments",
@@ -961,6 +912,17 @@ _dynamic_imports: dict[str, str] = {
"ListModelsUserRequestTypedDict": ".listmodelsuser",
"ListModelsUserSecurity": ".listmodelsuser",
"ListModelsUserSecurityTypedDict": ".listmodelsuser",
+ "ListOrganizationMembersData": ".listorganizationmembers",
+ "ListOrganizationMembersDataTypedDict": ".listorganizationmembers",
+ "ListOrganizationMembersGlobals": ".listorganizationmembers",
+ "ListOrganizationMembersGlobalsTypedDict": ".listorganizationmembers",
+ "ListOrganizationMembersRequest": ".listorganizationmembers",
+ "ListOrganizationMembersRequestTypedDict": ".listorganizationmembers",
+ "ListOrganizationMembersResponse": ".listorganizationmembers",
+ "ListOrganizationMembersResponseBody": ".listorganizationmembers",
+ "ListOrganizationMembersResponseBodyTypedDict": ".listorganizationmembers",
+ "ListOrganizationMembersResponseTypedDict": ".listorganizationmembers",
+ "Role": ".listorganizationmembers",
"Datacenter": ".listproviders",
"Headquarters": ".listproviders",
"ListProvidersData": ".listproviders",
@@ -971,6 +933,14 @@ _dynamic_imports: dict[str, str] = {
"ListProvidersRequestTypedDict": ".listproviders",
"ListProvidersResponse": ".listproviders",
"ListProvidersResponseTypedDict": ".listproviders",
+ "ListVideosContentGlobals": ".listvideoscontent",
+ "ListVideosContentGlobalsTypedDict": ".listvideoscontent",
+ "ListVideosContentRequest": ".listvideoscontent",
+ "ListVideosContentRequestTypedDict": ".listvideoscontent",
+ "ListVideosModelsGlobals": ".listvideosmodels",
+ "ListVideosModelsGlobalsTypedDict": ".listvideosmodels",
+ "ListVideosModelsRequest": ".listvideosmodels",
+ "ListVideosModelsRequestTypedDict": ".listvideosmodels",
"SendChatCompletionRequestGlobals": ".sendchatcompletionrequest",
"SendChatCompletionRequestGlobalsTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequest": ".sendchatcompletionrequest",
@@ -979,18 +949,10 @@ _dynamic_imports: dict[str, str] = {
"SendChatCompletionRequestResponseBody": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponseBodyTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest",
- "UpdateGuardrailData": ".updateguardrail",
- "UpdateGuardrailDataTypedDict": ".updateguardrail",
"UpdateGuardrailGlobals": ".updateguardrail",
"UpdateGuardrailGlobalsTypedDict": ".updateguardrail",
"UpdateGuardrailRequest": ".updateguardrail",
- "UpdateGuardrailRequestBody": ".updateguardrail",
- "UpdateGuardrailRequestBodyTypedDict": ".updateguardrail",
"UpdateGuardrailRequestTypedDict": ".updateguardrail",
- "UpdateGuardrailResetIntervalRequest": ".updateguardrail",
- "UpdateGuardrailResetIntervalResponse": ".updateguardrail",
- "UpdateGuardrailResponse": ".updateguardrail",
- "UpdateGuardrailResponseTypedDict": ".updateguardrail",
"UpdateKeysData": ".updatekeys",
"UpdateKeysDataTypedDict": ".updatekeys",
"UpdateKeysGlobals": ".updatekeys",
diff --git a/src/openrouter/operations/bulkassignkeystoguardrail.py b/src/openrouter/operations/bulkassignkeystoguardrail.py
index f258d3d..e0401f5 100644
--- a/src/openrouter/operations/bulkassignkeystoguardrail.py
+++ b/src/openrouter/operations/bulkassignkeystoguardrail.py
@@ -1,6 +1,9 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from openrouter.components import (
+ bulkassignkeysrequest as components_bulkassignkeysrequest,
+)
from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
@@ -9,7 +12,7 @@ from openrouter.utils import (
RequestMetadata,
)
import pydantic
-from typing import List, Optional
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -59,20 +62,12 @@ class BulkAssignKeysToGuardrailGlobals(BaseModel):
"""
-class BulkAssignKeysToGuardrailRequestBodyTypedDict(TypedDict):
- key_hashes: List[str]
- r"""Array of API key hashes to assign to the guardrail"""
-
-
-class BulkAssignKeysToGuardrailRequestBody(BaseModel):
- key_hashes: List[str]
- r"""Array of API key hashes to assign to the guardrail"""
-
-
class BulkAssignKeysToGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
- request_body: BulkAssignKeysToGuardrailRequestBodyTypedDict
+ bulk_assign_keys_request: (
+ components_bulkassignkeysrequest.BulkAssignKeysRequestTypedDict
+ )
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.
@@ -94,8 +89,8 @@ class BulkAssignKeysToGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail"""
- request_body: Annotated[
- BulkAssignKeysToGuardrailRequestBody,
+ bulk_assign_keys_request: Annotated[
+ components_bulkassignkeysrequest.BulkAssignKeysRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
@@ -126,17 +121,3 @@ class BulkAssignKeysToGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-class BulkAssignKeysToGuardrailResponseTypedDict(TypedDict):
- r"""Assignment result"""
-
- assigned_count: float
- r"""Number of keys successfully assigned"""
-
-
-class BulkAssignKeysToGuardrailResponse(BaseModel):
- r"""Assignment result"""
-
- assigned_count: float
- r"""Number of keys successfully assigned"""
diff --git a/src/openrouter/operations/bulkassignmemberstoguardrail.py b/src/openrouter/operations/bulkassignmemberstoguardrail.py
index 1ebb22d..80a1cb7 100644
--- a/src/openrouter/operations/bulkassignmemberstoguardrail.py
+++ b/src/openrouter/operations/bulkassignmemberstoguardrail.py
@@ -1,6 +1,9 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from openrouter.components import (
+ bulkassignmembersrequest as components_bulkassignmembersrequest,
+)
from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
@@ -9,7 +12,7 @@ from openrouter.utils import (
RequestMetadata,
)
import pydantic
-from typing import List, Optional
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -59,20 +62,12 @@ class BulkAssignMembersToGuardrailGlobals(BaseModel):
"""
-class BulkAssignMembersToGuardrailRequestBodyTypedDict(TypedDict):
- member_user_ids: List[str]
- r"""Array of member user IDs to assign to the guardrail"""
-
-
-class BulkAssignMembersToGuardrailRequestBody(BaseModel):
- member_user_ids: List[str]
- r"""Array of member user IDs to assign to the guardrail"""
-
-
class BulkAssignMembersToGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
- request_body: BulkAssignMembersToGuardrailRequestBodyTypedDict
+ bulk_assign_members_request: (
+ components_bulkassignmembersrequest.BulkAssignMembersRequestTypedDict
+ )
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.
@@ -94,8 +89,8 @@ class BulkAssignMembersToGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail"""
- request_body: Annotated[
- BulkAssignMembersToGuardrailRequestBody,
+ bulk_assign_members_request: Annotated[
+ components_bulkassignmembersrequest.BulkAssignMembersRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
@@ -126,17 +121,3 @@ class BulkAssignMembersToGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-class BulkAssignMembersToGuardrailResponseTypedDict(TypedDict):
- r"""Assignment result"""
-
- assigned_count: float
- r"""Number of members successfully assigned"""
-
-
-class BulkAssignMembersToGuardrailResponse(BaseModel):
- r"""Assignment result"""
-
- assigned_count: float
- r"""Number of members successfully assigned"""
diff --git a/src/openrouter/operations/bulkunassignkeysfromguardrail.py b/src/openrouter/operations/bulkunassignkeysfromguardrail.py
index 45cd84b..4f48623 100644
--- a/src/openrouter/operations/bulkunassignkeysfromguardrail.py
+++ b/src/openrouter/operations/bulkunassignkeysfromguardrail.py
@@ -1,6 +1,9 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from openrouter.components import (
+ bulkunassignkeysrequest as components_bulkunassignkeysrequest,
+)
from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
@@ -9,7 +12,7 @@ from openrouter.utils import (
RequestMetadata,
)
import pydantic
-from typing import List, Optional
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -59,20 +62,12 @@ class BulkUnassignKeysFromGuardrailGlobals(BaseModel):
"""
-class BulkUnassignKeysFromGuardrailRequestBodyTypedDict(TypedDict):
- key_hashes: List[str]
- r"""Array of API key hashes to unassign from the guardrail"""
-
-
-class BulkUnassignKeysFromGuardrailRequestBody(BaseModel):
- key_hashes: List[str]
- r"""Array of API key hashes to unassign from the guardrail"""
-
-
class BulkUnassignKeysFromGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
- request_body: BulkUnassignKeysFromGuardrailRequestBodyTypedDict
+ bulk_unassign_keys_request: (
+ components_bulkunassignkeysrequest.BulkUnassignKeysRequestTypedDict
+ )
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.
@@ -94,8 +89,8 @@ class BulkUnassignKeysFromGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail"""
- request_body: Annotated[
- BulkUnassignKeysFromGuardrailRequestBody,
+ bulk_unassign_keys_request: Annotated[
+ components_bulkunassignkeysrequest.BulkUnassignKeysRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
@@ -126,17 +121,3 @@ class BulkUnassignKeysFromGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-class BulkUnassignKeysFromGuardrailResponseTypedDict(TypedDict):
- r"""Unassignment result"""
-
- unassigned_count: float
- r"""Number of keys successfully unassigned"""
-
-
-class BulkUnassignKeysFromGuardrailResponse(BaseModel):
- r"""Unassignment result"""
-
- unassigned_count: float
- r"""Number of keys successfully unassigned"""
diff --git a/src/openrouter/operations/bulkunassignmembersfromguardrail.py b/src/openrouter/operations/bulkunassignmembersfromguardrail.py
index ac6e0c1..3613dcf 100644
--- a/src/openrouter/operations/bulkunassignmembersfromguardrail.py
+++ b/src/openrouter/operations/bulkunassignmembersfromguardrail.py
@@ -1,6 +1,9 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from openrouter.components import (
+ bulkunassignmembersrequest as components_bulkunassignmembersrequest,
+)
from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
@@ -9,7 +12,7 @@ from openrouter.utils import (
RequestMetadata,
)
import pydantic
-from typing import List, Optional
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -59,20 +62,12 @@ class BulkUnassignMembersFromGuardrailGlobals(BaseModel):
"""
-class BulkUnassignMembersFromGuardrailRequestBodyTypedDict(TypedDict):
- member_user_ids: List[str]
- r"""Array of member user IDs to unassign from the guardrail"""
-
-
-class BulkUnassignMembersFromGuardrailRequestBody(BaseModel):
- member_user_ids: List[str]
- r"""Array of member user IDs to unassign from the guardrail"""
-
-
class BulkUnassignMembersFromGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
- request_body: BulkUnassignMembersFromGuardrailRequestBodyTypedDict
+ bulk_unassign_members_request: (
+ components_bulkunassignmembersrequest.BulkUnassignMembersRequestTypedDict
+ )
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.
@@ -94,8 +89,8 @@ class BulkUnassignMembersFromGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail"""
- request_body: Annotated[
- BulkUnassignMembersFromGuardrailRequestBody,
+ bulk_unassign_members_request: Annotated[
+ components_bulkunassignmembersrequest.BulkUnassignMembersRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
@@ -126,17 +121,3 @@ class BulkUnassignMembersFromGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-class BulkUnassignMembersFromGuardrailResponseTypedDict(TypedDict):
- r"""Unassignment result"""
-
- unassigned_count: float
- r"""Number of members successfully unassigned"""
-
-
-class BulkUnassignMembersFromGuardrailResponse(BaseModel):
- r"""Unassignment result"""
-
- unassigned_count: float
- r"""Number of members successfully unassigned"""
diff --git a/src/openrouter/operations/createauthkeyscode.py b/src/openrouter/operations/createauthkeyscode.py
index 610f446..d3ef6c4 100644
--- a/src/openrouter/operations/createauthkeyscode.py
+++ b/src/openrouter/operations/createauthkeyscode.py
@@ -97,12 +97,12 @@ class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
r"""PKCE code challenge for enhanced security"""
code_challenge_method: NotRequired[CreateAuthKeysCodeCodeChallengeMethod]
r"""The method used to generate the code challenge"""
- limit: NotRequired[float]
- r"""Credit limit for the API key to be created"""
expires_at: NotRequired[Nullable[datetime]]
r"""Optional expiration time for the API key to be created"""
key_label: NotRequired[str]
r"""Optional custom label for the API key. Defaults to the app name if not provided."""
+ limit: NotRequired[float]
+ r"""Credit limit for the API key to be created"""
usage_limit_type: NotRequired[UsageLimitType]
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
@@ -120,15 +120,15 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
] = None
r"""The method used to generate the code challenge"""
- limit: Optional[float] = None
- r"""Credit limit for the API key to be created"""
-
expires_at: OptionalNullable[datetime] = UNSET
r"""Optional expiration time for the API key to be created"""
key_label: Optional[str] = None
r"""Optional custom label for the API key. Defaults to the app name if not provided."""
+ limit: Optional[float] = None
+ r"""Credit limit for the API key to be created"""
+
usage_limit_type: Annotated[
Optional[UsageLimitType], PlainValidator(validate_open_enum(False))
] = None
@@ -139,9 +139,9 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
optional_fields = [
"code_challenge",
"code_challenge_method",
- "limit",
"expires_at",
"key_label",
+ "limit",
"usage_limit_type",
]
nullable_fields = ["expires_at"]
@@ -227,26 +227,26 @@ class CreateAuthKeysCodeRequest(BaseModel):
class CreateAuthKeysCodeDataTypedDict(TypedDict):
r"""Auth code data"""
- id: str
- r"""The authorization code ID to use in the exchange request"""
- app_id: float
+ app_id: int
r"""The application ID associated with this auth code"""
created_at: str
r"""ISO 8601 timestamp of when the auth code was created"""
+ id: str
+ r"""The authorization code ID to use in the exchange request"""
class CreateAuthKeysCodeData(BaseModel):
r"""Auth code data"""
- id: str
- r"""The authorization code ID to use in the exchange request"""
-
- app_id: float
+ app_id: int
r"""The application ID associated with this auth code"""
created_at: str
r"""ISO 8601 timestamp of when the auth code was created"""
+ id: str
+ r"""The authorization code ID to use in the exchange request"""
+
class CreateAuthKeysCodeResponseTypedDict(TypedDict):
r"""Successfully created authorization code"""
diff --git a/src/openrouter/operations/createembeddings.py b/src/openrouter/operations/createembeddings.py
index bf520a6..3872d32 100644
--- a/src/openrouter/operations/createembeddings.py
+++ b/src/openrouter/operations/createembeddings.py
@@ -2,7 +2,14 @@
from __future__ import annotations
from openrouter.components import providerpreferences as components_providerpreferences
-from openrouter.types import BaseModel, UnrecognizedStr
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+ UnrecognizedStr,
+)
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
@@ -11,7 +18,7 @@ from openrouter.utils import (
validate_open_enum,
)
import pydantic
-from pydantic import Discriminator, Tag
+from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
@@ -63,7 +70,14 @@ class CreateEmbeddingsGlobals(BaseModel):
"""
-TypeImageURL = Literal["image_url",]
+EncodingFormat = Union[
+ Literal[
+ "float",
+ "base64",
+ ],
+ UnrecognizedStr,
+]
+r"""The format of the output embeddings"""
class ImageURLTypedDict(TypedDict):
@@ -74,30 +88,33 @@ class ImageURL(BaseModel):
url: str
+TypeImageURL = Literal["image_url",]
+
+
class ContentImageURLTypedDict(TypedDict):
- type: TypeImageURL
image_url: ImageURLTypedDict
+ type: TypeImageURL
class ContentImageURL(BaseModel):
- type: TypeImageURL
-
image_url: ImageURL
+ type: TypeImageURL
+
TypeText = Literal["text",]
class ContentTextTypedDict(TypedDict):
- type: TypeText
text: str
+ type: TypeText
class ContentText(BaseModel):
- type: TypeText
-
text: str
+ type: TypeText
+
ContentTypedDict = TypeAliasType(
"ContentTypedDict", Union[ContentTextTypedDict, ContentImageURLTypedDict]
@@ -125,50 +142,97 @@ InputUnionTypedDict = TypeAliasType(
"InputUnionTypedDict",
Union[str, List[str], List[float], List[List[float]], List[InputTypedDict]],
)
+r"""Text, token, or multimodal input(s) to embed"""
InputUnion = TypeAliasType(
"InputUnion", Union[str, List[str], List[float], List[List[float]], List[Input]]
)
-
-
-EncodingFormat = Union[
- Literal[
- "float",
- "base64",
- ],
- UnrecognizedStr,
-]
+r"""Text, token, or multimodal input(s) to embed"""
class CreateEmbeddingsRequestBodyTypedDict(TypedDict):
+ r"""Embeddings request input"""
+
input: InputUnionTypedDict
+ r"""Text, token, or multimodal input(s) to embed"""
model: str
- encoding_format: NotRequired[EncodingFormat]
+ r"""The model to use for embeddings"""
dimensions: NotRequired[int]
- user: NotRequired[str]
- provider: NotRequired[components_providerpreferences.ProviderPreferencesTypedDict]
- r"""Provider routing preferences for the request."""
+ r"""The number of dimensions for the output embeddings"""
+ encoding_format: NotRequired[EncodingFormat]
+ r"""The format of the output embeddings"""
input_type: NotRequired[str]
+ r"""The type of input (e.g. search_query, search_document)"""
+ provider: NotRequired[
+ Nullable[components_providerpreferences.ProviderPreferencesTypedDict]
+ ]
+ user: NotRequired[str]
+ r"""A unique identifier for the end-user"""
class CreateEmbeddingsRequestBody(BaseModel):
+ r"""Embeddings request input"""
+
input: InputUnion
+ r"""Text, token, or multimodal input(s) to embed"""
model: str
+ r"""The model to use for embeddings"""
+
+ dimensions: Optional[int] = None
+ r"""The number of dimensions for the output embeddings"""
encoding_format: Annotated[
Optional[EncodingFormat], PlainValidator(validate_open_enum(False))
] = None
-
- dimensions: Optional[int] = None
-
- user: Optional[str] = None
-
- provider: Optional[components_providerpreferences.ProviderPreferences] = None
- r"""Provider routing preferences for the request."""
+ r"""The format of the output embeddings"""
input_type: Optional[str] = None
+ r"""The type of input (e.g. search_query, search_document)"""
+
+ provider: OptionalNullable[components_providerpreferences.ProviderPreferences] = (
+ UNSET
+ )
+
+ user: Optional[str] = None
+ r"""A unique identifier for the end-user"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "dimensions",
+ "encoding_format",
+ "input_type",
+ "provider",
+ "user",
+ ]
+ nullable_fields = ["provider"]
+ 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 CreateEmbeddingsRequestTypedDict(TypedDict):
@@ -223,68 +287,96 @@ class CreateEmbeddingsRequest(BaseModel):
"""
-Object = Literal["list",]
+EmbeddingTypedDict = TypeAliasType("EmbeddingTypedDict", Union[List[float], str])
+r"""Embedding vector as an array of floats or a base64 string"""
+
+
+Embedding = TypeAliasType("Embedding", Union[List[float], str])
+r"""Embedding vector as an array of floats or a base64 string"""
ObjectEmbedding = Literal["embedding",]
-EmbeddingTypedDict = TypeAliasType("EmbeddingTypedDict", Union[List[float], str])
-
-
-Embedding = TypeAliasType("Embedding", Union[List[float], str])
-
-
class CreateEmbeddingsDataTypedDict(TypedDict):
- object: ObjectEmbedding
+ r"""A single embedding object"""
+
embedding: EmbeddingTypedDict
- index: NotRequired[float]
+ r"""Embedding vector as an array of floats or a base64 string"""
+ object: ObjectEmbedding
+ index: NotRequired[int]
+ r"""Index of the embedding in the input list"""
class CreateEmbeddingsData(BaseModel):
- object: ObjectEmbedding
+ r"""A single embedding object"""
embedding: Embedding
+ r"""Embedding vector as an array of floats or a base64 string"""
- index: Optional[float] = None
+ object: ObjectEmbedding
+
+ index: Optional[int] = None
+ r"""Index of the embedding in the input list"""
-class UsageTypedDict(TypedDict):
- prompt_tokens: float
- total_tokens: float
+Object = Literal["list",]
+
+
+class CreateEmbeddingsUsageTypedDict(TypedDict):
+ r"""Token usage statistics"""
+
+ prompt_tokens: int
+ r"""Number of tokens in the input"""
+ total_tokens: int
+ r"""Total number of tokens used"""
cost: NotRequired[float]
+ r"""Cost of the request in credits"""
-class Usage(BaseModel):
- prompt_tokens: float
+class CreateEmbeddingsUsage(BaseModel):
+ r"""Token usage statistics"""
- total_tokens: float
+ prompt_tokens: int
+ r"""Number of tokens in the input"""
+
+ total_tokens: int
+ r"""Total number of tokens used"""
cost: Optional[float] = None
+ r"""Cost of the request in credits"""
class CreateEmbeddingsResponseBodyTypedDict(TypedDict):
- r"""Embedding response"""
+ r"""Embeddings response containing embedding vectors"""
- object: Object
data: List[CreateEmbeddingsDataTypedDict]
+ r"""List of embedding objects"""
model: str
+ r"""The model used for embeddings"""
+ object: Object
id: NotRequired[str]
- usage: NotRequired[UsageTypedDict]
+ r"""Unique identifier for the embeddings response"""
+ usage: NotRequired[CreateEmbeddingsUsageTypedDict]
+ r"""Token usage statistics"""
class CreateEmbeddingsResponseBody(BaseModel):
- r"""Embedding response"""
+ r"""Embeddings response containing embedding vectors"""
+
+ data: List[CreateEmbeddingsData]
+ r"""List of embedding objects"""
+
+ model: str
+ r"""The model used for embeddings"""
object: Object
- data: List[CreateEmbeddingsData]
-
- model: str
-
id: Optional[str] = None
+ r"""Unique identifier for the embeddings response"""
- usage: Optional[Usage] = None
+ usage: Optional[CreateEmbeddingsUsage] = None
+ r"""Token usage statistics"""
CreateEmbeddingsResponseTypedDict = TypeAliasType(
diff --git a/src/openrouter/operations/createguardrail.py b/src/openrouter/operations/createguardrail.py
index 8f24ce4..75b9661 100644
--- a/src/openrouter/operations/createguardrail.py
+++ b/src/openrouter/operations/createguardrail.py
@@ -1,24 +1,13 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import (
- BaseModel,
- Nullable,
- OptionalNullable,
- UNSET,
- UNSET_SENTINEL,
- UnrecognizedStr,
-)
-from openrouter.utils import (
- FieldMetadata,
- HeaderMetadata,
- RequestMetadata,
- validate_open_enum,
+from openrouter.components import (
+ createguardrailrequest as components_createguardrailrequest,
)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
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
@@ -68,113 +57,10 @@ class CreateGuardrailGlobals(BaseModel):
"""
-CreateGuardrailResetIntervalRequest = Union[
- Literal[
- "daily",
- "weekly",
- "monthly",
- ],
- UnrecognizedStr,
-]
-r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
-
-class CreateGuardrailRequestBodyTypedDict(TypedDict):
- name: str
- r"""Name for the new guardrail"""
- description: NotRequired[Nullable[str]]
- r"""Description of the guardrail"""
- limit_usd: NotRequired[Nullable[float]]
- r"""Spending limit in USD"""
- reset_interval: NotRequired[Nullable[CreateGuardrailResetIntervalRequest]]
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
- allowed_providers: NotRequired[Nullable[List[str]]]
- r"""List of allowed provider IDs"""
- ignored_providers: NotRequired[Nullable[List[str]]]
- r"""List of provider IDs to exclude from routing"""
- allowed_models: NotRequired[Nullable[List[str]]]
- r"""Array of model identifiers (slug or canonical_slug accepted)"""
- enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
-
-
-class CreateGuardrailRequestBody(BaseModel):
- name: str
- r"""Name for the new guardrail"""
-
- description: OptionalNullable[str] = UNSET
- r"""Description of the guardrail"""
-
- limit_usd: OptionalNullable[float] = UNSET
- r"""Spending limit in USD"""
-
- reset_interval: Annotated[
- OptionalNullable[CreateGuardrailResetIntervalRequest],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
- allowed_providers: OptionalNullable[List[str]] = UNSET
- r"""List of allowed provider IDs"""
-
- ignored_providers: OptionalNullable[List[str]] = UNSET
- r"""List of provider IDs to exclude from routing"""
-
- allowed_models: OptionalNullable[List[str]] = UNSET
- r"""Array of model identifiers (slug or canonical_slug accepted)"""
-
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- ]
- nullable_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- ]
- 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 CreateGuardrailRequestTypedDict(TypedDict):
- request_body: CreateGuardrailRequestBodyTypedDict
+ create_guardrail_request: (
+ components_createguardrailrequest.CreateGuardrailRequestTypedDict
+ )
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.
@@ -191,8 +77,8 @@ class CreateGuardrailRequestTypedDict(TypedDict):
class CreateGuardrailRequest(BaseModel):
- request_body: Annotated[
- CreateGuardrailRequestBody,
+ create_guardrail_request: Annotated[
+ components_createguardrailrequest.CreateGuardrailRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
@@ -223,143 +109,3 @@ class CreateGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-CreateGuardrailResetIntervalResponse = Union[
- Literal[
- "daily",
- "weekly",
- "monthly",
- ],
- UnrecognizedStr,
-]
-r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
-
-class CreateGuardrailDataTypedDict(TypedDict):
- r"""The created guardrail"""
-
- id: str
- r"""Unique identifier for the guardrail"""
- name: str
- r"""Name of the guardrail"""
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
- description: NotRequired[Nullable[str]]
- r"""Description of the guardrail"""
- limit_usd: NotRequired[Nullable[float]]
- r"""Spending limit in USD"""
- reset_interval: NotRequired[Nullable[CreateGuardrailResetIntervalResponse]]
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
- allowed_providers: NotRequired[Nullable[List[str]]]
- r"""List of allowed provider IDs"""
- ignored_providers: NotRequired[Nullable[List[str]]]
- r"""List of provider IDs to exclude from routing"""
- allowed_models: NotRequired[Nullable[List[str]]]
- r"""Array of model canonical_slugs (immutable identifiers)"""
- enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
- updated_at: NotRequired[Nullable[str]]
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
-
-class CreateGuardrailData(BaseModel):
- r"""The created guardrail"""
-
- id: str
- r"""Unique identifier for the guardrail"""
-
- name: str
- r"""Name of the guardrail"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
-
- description: OptionalNullable[str] = UNSET
- r"""Description of the guardrail"""
-
- limit_usd: OptionalNullable[float] = UNSET
- r"""Spending limit in USD"""
-
- reset_interval: Annotated[
- OptionalNullable[CreateGuardrailResetIntervalResponse],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
- allowed_providers: OptionalNullable[List[str]] = UNSET
- r"""List of allowed provider IDs"""
-
- ignored_providers: OptionalNullable[List[str]] = UNSET
- r"""List of provider IDs to exclude from routing"""
-
- allowed_models: OptionalNullable[List[str]] = UNSET
- r"""Array of model canonical_slugs (immutable identifiers)"""
-
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
-
- updated_at: OptionalNullable[str] = UNSET
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "updated_at",
- ]
- nullable_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "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
-
-
-class CreateGuardrailResponseTypedDict(TypedDict):
- r"""Guardrail created successfully"""
-
- data: CreateGuardrailDataTypedDict
- r"""The created guardrail"""
-
-
-class CreateGuardrailResponse(BaseModel):
- r"""Guardrail created successfully"""
-
- data: CreateGuardrailData
- r"""The created guardrail"""
diff --git a/src/openrouter/operations/createkeys.py b/src/openrouter/operations/createkeys.py
index 77d35e2..d77c96e 100644
--- a/src/openrouter/operations/createkeys.py
+++ b/src/openrouter/operations/createkeys.py
@@ -83,21 +83,32 @@ r"""Type of limit reset for the API key (daily, weekly, monthly, or null for no
class CreateKeysRequestBodyTypedDict(TypedDict):
name: str
r"""Name for the new API key"""
- limit: NotRequired[Nullable[float]]
+ creator_user_id: NotRequired[Nullable[str]]
+ r"""Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key."""
+ expires_at: NotRequired[Nullable[datetime]]
+ r"""Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected"""
+ include_byok_in_limit: NotRequired[bool]
+ r"""Whether to include BYOK usage in the limit"""
+ limit: NotRequired[float]
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."""
- include_byok_in_limit: NotRequired[bool]
- r"""Whether to include BYOK usage in the limit"""
- expires_at: NotRequired[Nullable[datetime]]
- r"""Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected"""
class CreateKeysRequestBody(BaseModel):
name: str
r"""Name for the new API key"""
- limit: OptionalNullable[float] = UNSET
+ creator_user_id: OptionalNullable[str] = UNSET
+ r"""Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key."""
+
+ expires_at: OptionalNullable[datetime] = UNSET
+ r"""Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected"""
+
+ include_byok_in_limit: Optional[bool] = None
+ r"""Whether to include BYOK usage in the limit"""
+
+ limit: Optional[float] = None
r"""Optional spending limit for the API key in USD"""
limit_reset: Annotated[
@@ -106,21 +117,16 @@ 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."""
- include_byok_in_limit: Optional[bool] = None
- r"""Whether to include BYOK usage in the limit"""
-
- expires_at: OptionalNullable[datetime] = UNSET
- r"""Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected"""
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
+ "creator_user_id",
+ "expires_at",
+ "include_byok_in_limit",
"limit",
"limit_reset",
- "include_byok_in_limit",
- "expires_at",
]
- nullable_fields = ["limit", "limit_reset", "expires_at"]
+ nullable_fields = ["creator_user_id", "expires_at", "limit_reset"]
null_default_fields = []
serialized = handler(self)
@@ -203,44 +209,44 @@ class CreateKeysRequest(BaseModel):
class CreateKeysDataTypedDict(TypedDict):
r"""The created API key information"""
- hash: str
- r"""Unique hash identifier for the API key"""
- name: str
- r"""Name of the API key"""
- label: str
- r"""Human-readable label for the API key"""
- disabled: bool
- r"""Whether the API key is disabled"""
- limit: Nullable[float]
- r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
- r"""Remaining spending limit in USD"""
- limit_reset: Nullable[str]
- r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
- usage: float
- r"""Total OpenRouter credit usage (in USD) for the API key"""
- usage_daily: float
- r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
- usage_monthly: float
- r"""OpenRouter credit usage (in USD) for the current UTC month"""
byok_usage: float
r"""Total external BYOK usage (in USD) for the API key"""
byok_usage_daily: float
r"""External BYOK usage (in USD) for the current UTC day"""
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
byok_usage_monthly: float
r"""External BYOK usage (in USD) for current UTC month"""
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
created_at: str
r"""ISO 8601 timestamp of when the API key was created"""
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
creator_user_id: Nullable[str]
r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ disabled: bool
+ r"""Whether the API key is disabled"""
+ hash: str
+ r"""Unique hash identifier for the API key"""
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+ label: str
+ r"""Human-readable label for the API key"""
+ limit: float
+ r"""Spending limit for the API key in USD"""
+ limit_remaining: float
+ r"""Remaining spending limit in USD"""
+ limit_reset: Nullable[str]
+ r"""Type of limit reset for the API key"""
+ name: str
+ r"""Name of the API key"""
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
+ usage: float
+ r"""Total OpenRouter credit usage (in USD) for the API key"""
+ usage_daily: float
+ r"""OpenRouter credit usage (in USD) for the current UTC day"""
+ usage_monthly: float
+ 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)"""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -248,29 +254,50 @@ class CreateKeysDataTypedDict(TypedDict):
class CreateKeysData(BaseModel):
r"""The created API key information"""
- hash: str
- r"""Unique hash identifier for the API key"""
+ byok_usage: float
+ r"""Total external BYOK usage (in USD) for the API key"""
- name: str
- r"""Name of the API key"""
+ byok_usage_daily: float
+ r"""External BYOK usage (in USD) for the current UTC day"""
- label: str
- r"""Human-readable label for the API key"""
+ byok_usage_monthly: float
+ r"""External BYOK usage (in USD) for current UTC month"""
+
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the API key was created"""
+
+ creator_user_id: Nullable[str]
+ r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
disabled: bool
r"""Whether the API key is disabled"""
- limit: Nullable[float]
+ hash: str
+ r"""Unique hash identifier for the API key"""
+
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+
+ label: str
+ r"""Human-readable label for the API key"""
+
+ limit: float
r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
+ limit_remaining: float
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
+ name: str
+ r"""Name of the API key"""
+
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
usage: float
r"""Total OpenRouter credit usage (in USD) for the API key"""
@@ -278,32 +305,11 @@ class CreateKeysData(BaseModel):
usage_daily: float
r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
-
usage_monthly: float
r"""OpenRouter credit usage (in USD) for the current UTC month"""
- byok_usage: float
- r"""Total external BYOK usage (in USD) for the API key"""
-
- byok_usage_daily: float
- r"""External BYOK usage (in USD) for the current UTC day"""
-
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
-
- byok_usage_monthly: float
- r"""External BYOK usage (in USD) for current UTC month"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the API key was created"""
-
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
-
- creator_user_id: Nullable[str]
- r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ usage_weekly: float
+ r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -311,14 +317,7 @@ class CreateKeysData(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["expires_at"]
- nullable_fields = [
- "limit",
- "limit_remaining",
- "limit_reset",
- "updated_at",
- "expires_at",
- "creator_user_id",
- ]
+ nullable_fields = ["creator_user_id", "expires_at", "limit_reset", "updated_at"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/operations/creatererank.py b/src/openrouter/operations/creatererank.py
new file mode 100644
index 0000000..68f500a
--- /dev/null
+++ b/src/openrouter/operations/creatererank.py
@@ -0,0 +1,286 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import providerpreferences as components_providerpreferences
+from openrouter.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
+import pydantic
+from pydantic import model_serializer
+from typing import List, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+
+
+class CreateRerankGlobalsTypedDict(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 CreateRerankGlobals(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 CreateRerankRequestBodyTypedDict(TypedDict):
+ r"""Rerank request input"""
+
+ documents: List[str]
+ r"""The list of documents to rerank"""
+ model: str
+ r"""The rerank model to use"""
+ query: str
+ r"""The search query to rerank documents against"""
+ provider: NotRequired[
+ Nullable[components_providerpreferences.ProviderPreferencesTypedDict]
+ ]
+ top_n: NotRequired[int]
+ r"""Number of most relevant documents to return"""
+
+
+class CreateRerankRequestBody(BaseModel):
+ r"""Rerank request input"""
+
+ documents: List[str]
+ r"""The list of documents to rerank"""
+
+ model: str
+ r"""The rerank model to use"""
+
+ query: str
+ r"""The search query to rerank documents against"""
+
+ provider: OptionalNullable[components_providerpreferences.ProviderPreferences] = (
+ UNSET
+ )
+
+ top_n: Optional[int] = None
+ r"""Number of most relevant documents to return"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["provider", "top_n"]
+ nullable_fields = ["provider"]
+ 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 CreateRerankRequestTypedDict(TypedDict):
+ request_body: CreateRerankRequestBodyTypedDict
+ 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 CreateRerankRequest(BaseModel):
+ request_body: Annotated[
+ CreateRerankRequestBody,
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ http_referer: Annotated[
+ Optional[str],
+ pydantic.Field(alias="HTTP-Referer"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ This is used to track API usage per application.
+
+ """
+
+ x_open_router_title: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Title"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+
+ """
+
+ x_open_router_categories: Annotated[
+ Optional[str],
+ pydantic.Field(alias="X-OpenRouter-Categories"),
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
+ ] = None
+ r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+
+ """
+
+
+class DocumentTypedDict(TypedDict):
+ r"""The document object containing the original text"""
+
+ text: str
+ r"""The document text"""
+
+
+class Document(BaseModel):
+ r"""The document object containing the original text"""
+
+ text: str
+ r"""The document text"""
+
+
+class ResultTypedDict(TypedDict):
+ r"""A single rerank result"""
+
+ document: DocumentTypedDict
+ r"""The document object containing the original text"""
+ index: int
+ r"""Index of the document in the original input list"""
+ relevance_score: float
+ r"""Relevance score of the document to the query"""
+
+
+class Result(BaseModel):
+ r"""A single rerank result"""
+
+ document: Document
+ r"""The document object containing the original text"""
+
+ index: int
+ r"""Index of the document in the original input list"""
+
+ relevance_score: float
+ r"""Relevance score of the document to the query"""
+
+
+class CreateRerankUsageTypedDict(TypedDict):
+ r"""Usage statistics"""
+
+ cost: NotRequired[float]
+ r"""Cost of the request in credits"""
+ search_units: NotRequired[int]
+ r"""Number of search units consumed (Cohere billing)"""
+ total_tokens: NotRequired[int]
+ r"""Total number of tokens used"""
+
+
+class CreateRerankUsage(BaseModel):
+ r"""Usage statistics"""
+
+ cost: Optional[float] = None
+ r"""Cost of the request in credits"""
+
+ search_units: Optional[int] = None
+ r"""Number of search units consumed (Cohere billing)"""
+
+ total_tokens: Optional[int] = None
+ r"""Total number of tokens used"""
+
+
+class CreateRerankResponseBodyTypedDict(TypedDict):
+ r"""Rerank response containing ranked results"""
+
+ model: str
+ r"""The model used for reranking"""
+ results: List[ResultTypedDict]
+ r"""List of rerank results sorted by relevance"""
+ id: NotRequired[str]
+ r"""Unique identifier for the rerank response (ORID format)"""
+ provider: NotRequired[str]
+ r"""The provider that served the rerank request"""
+ usage: NotRequired[CreateRerankUsageTypedDict]
+ r"""Usage statistics"""
+
+
+class CreateRerankResponseBody(BaseModel):
+ r"""Rerank response containing ranked results"""
+
+ model: str
+ r"""The model used for reranking"""
+
+ results: List[Result]
+ r"""List of rerank results sorted by relevance"""
+
+ id: Optional[str] = None
+ r"""Unique identifier for the rerank response (ORID format)"""
+
+ provider: Optional[str] = None
+ r"""The provider that served the rerank request"""
+
+ usage: Optional[CreateRerankUsage] = None
+ r"""Usage statistics"""
+
+
+CreateRerankResponseTypedDict = TypeAliasType(
+ "CreateRerankResponseTypedDict", Union[CreateRerankResponseBodyTypedDict, str]
+)
+
+
+CreateRerankResponse = TypeAliasType(
+ "CreateRerankResponse", Union[CreateRerankResponseBody, str]
+)
diff --git a/src/openrouter/operations/createvideos.py b/src/openrouter/operations/createvideos.py
new file mode 100644
index 0000000..3892fc7
--- /dev/null
+++ b/src/openrouter/operations/createvideos.py
@@ -0,0 +1,111 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.components import (
+ videogenerationrequest as components_videogenerationrequest,
+)
+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 CreateVideosGlobalsTypedDict(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 CreateVideosGlobals(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 CreateVideosRequestTypedDict(TypedDict):
+ video_generation_request: (
+ components_videogenerationrequest.VideoGenerationRequestTypedDict
+ )
+ 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 CreateVideosRequest(BaseModel):
+ video_generation_request: Annotated[
+ components_videogenerationrequest.VideoGenerationRequest,
+ 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/deleteguardrail.py b/src/openrouter/operations/deleteguardrail.py
index 2eade13..c69e9ce 100644
--- a/src/openrouter/operations/deleteguardrail.py
+++ b/src/openrouter/operations/deleteguardrail.py
@@ -2,15 +2,9 @@
from __future__ import annotations
from openrouter.types import BaseModel
-from openrouter.utils import (
- FieldMetadata,
- HeaderMetadata,
- PathParamMetadata,
- validate_const,
-)
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
import pydantic
-from pydantic.functional_validators import AfterValidator
-from typing import Literal, Optional
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -111,20 +105,3 @@ class DeleteGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-class DeleteGuardrailResponseTypedDict(TypedDict):
- r"""Guardrail deleted successfully"""
-
- deleted: Literal[True]
- r"""Confirmation that the guardrail was deleted"""
-
-
-class DeleteGuardrailResponse(BaseModel):
- r"""Guardrail deleted successfully"""
-
- DELETED: Annotated[
- Annotated[Literal[True], AfterValidator(validate_const(True))],
- pydantic.Field(alias="deleted"),
- ] = True
- r"""Confirmation that the guardrail was deleted"""
diff --git a/src/openrouter/operations/exchangeauthcodeforapikey.py b/src/openrouter/operations/exchangeauthcodeforapikey.py
index eb44748..4e4295d 100644
--- a/src/openrouter/operations/exchangeauthcodeforapikey.py
+++ b/src/openrouter/operations/exchangeauthcodeforapikey.py
@@ -81,30 +81,30 @@ r"""The method used to generate the code challenge"""
class ExchangeAuthCodeForAPIKeyRequestBodyTypedDict(TypedDict):
code: str
r"""The authorization code received from the OAuth redirect"""
- code_verifier: NotRequired[str]
- r"""The code verifier if code_challenge was used in the authorization request"""
code_challenge_method: NotRequired[
Nullable[ExchangeAuthCodeForAPIKeyCodeChallengeMethod]
]
r"""The method used to generate the code challenge"""
+ code_verifier: NotRequired[str]
+ r"""The code verifier if code_challenge was used in the authorization request"""
class ExchangeAuthCodeForAPIKeyRequestBody(BaseModel):
code: str
r"""The authorization code received from the OAuth redirect"""
- code_verifier: Optional[str] = None
- r"""The code verifier if code_challenge was used in the authorization request"""
-
code_challenge_method: Annotated[
OptionalNullable[ExchangeAuthCodeForAPIKeyCodeChallengeMethod],
PlainValidator(validate_open_enum(False)),
] = UNSET
r"""The method used to generate the code challenge"""
+ code_verifier: Optional[str] = None
+ r"""The code verifier if code_challenge was used in the authorization request"""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
- optional_fields = ["code_verifier", "code_challenge_method"]
+ optional_fields = ["code_challenge_method", "code_verifier"]
nullable_fields = ["code_challenge_method"]
null_default_fields = []
diff --git a/src/openrouter/operations/getcurrentkey.py b/src/openrouter/operations/getcurrentkey.py
index f293fd6..033e231 100644
--- a/src/openrouter/operations/getcurrentkey.py
+++ b/src/openrouter/operations/getcurrentkey.py
@@ -114,12 +114,12 @@ class GetCurrentKeyRequest(BaseModel):
class RateLimitTypedDict(TypedDict):
r"""Legacy rate limit information about a key. Will always return -1."""
- requests: float
- r"""Number of requests allowed per interval"""
interval: str
r"""Rate limit interval"""
note: str
r"""Note about the rate limit"""
+ requests: int
+ r"""Number of requests allowed per interval"""
@deprecated(
@@ -128,55 +128,55 @@ class RateLimitTypedDict(TypedDict):
class RateLimit(BaseModel):
r"""Legacy rate limit information about a key. Will always return -1."""
- requests: float
- r"""Number of requests allowed per interval"""
-
interval: str
r"""Rate limit interval"""
note: str
r"""Note about the rate limit"""
+ requests: int
+ r"""Number of requests allowed per interval"""
+
class GetCurrentKeyDataTypedDict(TypedDict):
r"""Current API key information"""
- label: str
- r"""Human-readable label for the API key"""
- limit: Nullable[float]
- r"""Spending limit for the API key in USD"""
- usage: float
- r"""Total OpenRouter credit usage (in USD) for the API key"""
- usage_daily: float
- r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
- usage_monthly: float
- r"""OpenRouter credit usage (in USD) for the current UTC month"""
byok_usage: float
r"""Total external BYOK usage (in USD) for the API key"""
byok_usage_daily: float
r"""External BYOK usage (in USD) for the current UTC day"""
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
byok_usage_monthly: float
r"""External BYOK usage (in USD) for current UTC month"""
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
+ creator_user_id: Nullable[str]
+ r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
is_free_tier: bool
r"""Whether this is a free tier API key"""
is_management_key: bool
r"""Whether this is a management key"""
is_provisioning_key: bool
r"""Whether this is a management key"""
- limit_remaining: Nullable[float]
+ label: str
+ r"""Human-readable label for the API key"""
+ limit: float
+ r"""Spending limit for the API key in USD"""
+ limit_remaining: float
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
- creator_user_id: Nullable[str]
- r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
rate_limit: RateLimitTypedDict
r"""Legacy rate limit information about a key. Will always return -1."""
+ usage: float
+ r"""Total OpenRouter credit usage (in USD) for the API key"""
+ usage_daily: float
+ r"""OpenRouter credit usage (in USD) for the current UTC day"""
+ usage_monthly: float
+ 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)"""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -184,35 +184,23 @@ class GetCurrentKeyDataTypedDict(TypedDict):
class GetCurrentKeyData(BaseModel):
r"""Current API key information"""
- label: str
- r"""Human-readable label for the API key"""
-
- limit: Nullable[float]
- r"""Spending limit for the API key in USD"""
-
- usage: float
- r"""Total OpenRouter credit usage (in USD) for the API key"""
-
- usage_daily: float
- r"""OpenRouter credit usage (in USD) for the current UTC day"""
-
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
-
- usage_monthly: float
- r"""OpenRouter credit usage (in USD) for the current UTC month"""
-
byok_usage: float
r"""Total external BYOK usage (in USD) for the API key"""
byok_usage_daily: float
r"""External BYOK usage (in USD) for the current UTC day"""
+ byok_usage_monthly: float
+ r"""External BYOK usage (in USD) for current UTC month"""
+
byok_usage_weekly: float
r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
- byok_usage_monthly: float
- r"""External BYOK usage (in USD) for current UTC month"""
+ creator_user_id: Nullable[str]
+ r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
is_free_tier: bool
r"""Whether this is a free tier API key"""
@@ -228,18 +216,18 @@ class GetCurrentKeyData(BaseModel):
]
r"""Whether this is a management key"""
- limit_remaining: Nullable[float]
+ label: str
+ r"""Human-readable label for the API key"""
+
+ limit: float
+ r"""Spending limit for the API key in USD"""
+
+ limit_remaining: float
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
-
- creator_user_id: Nullable[str]
- r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
-
rate_limit: Annotated[
RateLimit,
pydantic.Field(
@@ -248,19 +236,25 @@ class GetCurrentKeyData(BaseModel):
]
r"""Legacy rate limit information about a key. Will always return -1."""
+ usage: float
+ r"""Total OpenRouter credit usage (in USD) for the API key"""
+
+ usage_daily: float
+ r"""OpenRouter credit usage (in USD) for the current UTC day"""
+
+ usage_monthly: float
+ 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)"""
+
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["expires_at"]
- nullable_fields = [
- "limit",
- "limit_remaining",
- "limit_reset",
- "expires_at",
- "creator_user_id",
- ]
+ nullable_fields = ["creator_user_id", "expires_at", "limit_reset"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/operations/getgeneration.py b/src/openrouter/operations/getgeneration.py
index 8a71781..ab106e6 100644
--- a/src/openrouter/operations/getgeneration.py
+++ b/src/openrouter/operations/getgeneration.py
@@ -1,7 +1,15 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
+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,
@@ -63,6 +71,7 @@ class GetGenerationGlobals(BaseModel):
class GetGenerationRequestTypedDict(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.
@@ -82,6 +91,7 @@ class GetGenerationRequest(BaseModel):
id: Annotated[
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
]
+ r"""The generation ID"""
http_referer: Annotated[
Optional[str],
@@ -116,6 +126,7 @@ APIType = Union[
Literal[
"completions",
"embeddings",
+ "rerank",
"video",
],
UnrecognizedStr,
@@ -123,403 +134,224 @@ APIType = Union[
r"""Type of API used for the generation"""
-ProviderName = Union[
- Literal[
- "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",
- "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",
- "Reka",
- "Relace",
- "SambaNova",
- "Seed",
- "SiliconFlow",
- "Sourceful",
- "StepFun",
- "Stealth",
- "StreamLake",
- "Switchpoint",
- "Together",
- "Upstage",
- "Venice",
- "WandB",
- "Xiaomi",
- "xAI",
- "Z.AI",
- "FakeProvider",
- ],
- UnrecognizedStr,
-]
-
-
-class ProviderResponseTypedDict(TypedDict):
- status: Nullable[float]
- id: NotRequired[str]
- endpoint_id: NotRequired[str]
- model_permaslug: NotRequired[str]
- provider_name: NotRequired[ProviderName]
- latency: NotRequired[float]
- is_byok: NotRequired[bool]
-
-
-class ProviderResponse(BaseModel):
- status: Nullable[float]
-
- id: Optional[str] = None
-
- endpoint_id: Optional[str] = None
-
- model_permaslug: Optional[str] = None
-
- provider_name: Annotated[
- Optional[ProviderName], PlainValidator(validate_open_enum(False))
- ] = None
-
- latency: Optional[float] = None
-
- is_byok: Optional[bool] = None
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "id",
- "endpoint_id",
- "model_permaslug",
- "provider_name",
- "latency",
- "is_byok",
- ]
- nullable_fields = ["status"]
- null_default_fields = []
-
- serialized = handler(self)
-
- m = {}
-
- for n, f in type(self).model_fields.items():
- k = f.alias or n
- val = serialized.get(k)
- serialized.pop(k, None)
-
- optional_nullable = k in optional_fields and k in nullable_fields
- is_set = (
- self.__pydantic_fields_set__.intersection({n})
- or k in null_default_fields
- ) # pylint: disable=no-member
-
- if val is not None and val != UNSET_SENTINEL:
- m[k] = val
- elif val != UNSET_SENTINEL and (
- not k in optional_fields or (optional_nullable and is_set)
- ):
- m[k] = val
-
- return m
-
-
class GetGenerationDataTypedDict(TypedDict):
r"""Generation data"""
- id: str
- r"""Unique identifier for the generation"""
- upstream_id: Nullable[str]
- r"""Upstream provider's identifier for this generation"""
- total_cost: float
- r"""Total cost of the generation in USD"""
- cache_discount: Nullable[float]
- r"""Discount applied due to caching"""
- upstream_inference_cost: Nullable[float]
- r"""Cost charged by the upstream provider"""
- created_at: str
- r"""ISO 8601 timestamp of when the generation was created"""
- model: str
- r"""Model used for the generation"""
- app_id: Nullable[float]
+ api_type: Nullable[APIType]
+ r"""Type of API used for the generation"""
+ app_id: int
r"""ID of the app that made the request"""
- streamed: Nullable[bool]
- r"""Whether the response was streamed"""
+ cache_discount: float
+ r"""Discount applied due to caching"""
cancelled: Nullable[bool]
r"""Whether the generation was cancelled"""
- provider_name: Nullable[str]
- r"""Name of the provider that served the request"""
- latency: Nullable[float]
- r"""Total latency in milliseconds"""
- moderation_latency: Nullable[float]
- r"""Moderation latency in milliseconds"""
- generation_time: Nullable[float]
- r"""Time taken for generation in milliseconds"""
+ 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"""
- tokens_prompt: Nullable[float]
- r"""Number of tokens in the prompt"""
- tokens_completion: Nullable[float]
- r"""Number of tokens in the completion"""
- native_tokens_prompt: Nullable[float]
- r"""Native prompt tokens as reported by provider"""
- native_tokens_completion: Nullable[float]
- r"""Native completion tokens as reported by provider"""
- native_tokens_completion_images: Nullable[float]
- r"""Native completion image tokens as reported by provider"""
- native_tokens_reasoning: Nullable[float]
- r"""Native reasoning tokens as reported by provider"""
- native_tokens_cached: Nullable[float]
+ generation_time: 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: float
+ r"""Total latency in milliseconds"""
+ model: str
+ r"""Model used for the generation"""
+ moderation_latency: float
+ r"""Moderation latency in milliseconds"""
+ native_finish_reason: Nullable[str]
+ r"""Native finish reason as reported by provider"""
+ native_tokens_cached: int
r"""Native cached tokens as reported by provider"""
- num_media_prompt: Nullable[float]
- r"""Number of media items in the prompt"""
- num_input_audio_prompt: Nullable[float]
+ native_tokens_completion: int
+ r"""Native completion tokens as reported by provider"""
+ native_tokens_completion_images: int
+ r"""Native completion image tokens as reported by provider"""
+ native_tokens_prompt: int
+ r"""Native prompt tokens as reported by provider"""
+ native_tokens_reasoning: int
+ r"""Native reasoning tokens as reported by provider"""
+ num_input_audio_prompt: int
r"""Number of audio inputs in the prompt"""
- num_media_completion: Nullable[float]
+ num_media_completion: int
r"""Number of media items in the completion"""
- num_search_results: Nullable[float]
+ num_media_prompt: int
+ r"""Number of media items in the prompt"""
+ num_search_results: int
r"""Number of search results included"""
origin: str
r"""Origin URL of the request"""
- usage: float
- r"""Usage amount in USD"""
- is_byok: bool
- r"""Whether this used bring-your-own-key"""
- native_finish_reason: Nullable[str]
- r"""Native finish reason as reported by provider"""
- external_user: Nullable[str]
- r"""External user identifier"""
- api_type: Nullable[APIType]
- r"""Type of API used for the generation"""
+ 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)"""
- provider_responses: Nullable[List[ProviderResponseTypedDict]]
- r"""List of provider responses for this generation, including fallback attempts"""
+ streamed: Nullable[bool]
+ r"""Whether the response was streamed"""
+ tokens_completion: int
+ r"""Number of tokens in the completion"""
+ tokens_prompt: 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: 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"""
- http_referer: Nullable[str]
- r"""Referer 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"""
- id: str
- r"""Unique identifier for the generation"""
+ api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))]
+ r"""Type of API used for the generation"""
- upstream_id: Nullable[str]
- r"""Upstream provider's identifier for this generation"""
-
- total_cost: float
- r"""Total cost of the generation in USD"""
-
- cache_discount: Nullable[float]
- r"""Discount applied due to caching"""
-
- upstream_inference_cost: Nullable[float]
- r"""Cost charged by the upstream provider"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the generation was created"""
-
- model: str
- r"""Model used for the generation"""
-
- app_id: Nullable[float]
+ app_id: int
r"""ID of the app that made the request"""
- streamed: Nullable[bool]
- r"""Whether the response was streamed"""
+ cache_discount: float
+ r"""Discount applied due to caching"""
cancelled: Nullable[bool]
r"""Whether the generation was cancelled"""
- provider_name: Nullable[str]
- r"""Name of the provider that served the request"""
+ created_at: str
+ r"""ISO 8601 timestamp of when the generation was created"""
- latency: Nullable[float]
- r"""Total latency in milliseconds"""
-
- moderation_latency: Nullable[float]
- r"""Moderation latency in milliseconds"""
-
- generation_time: Nullable[float]
- r"""Time taken for generation in milliseconds"""
+ external_user: Nullable[str]
+ r"""External user identifier"""
finish_reason: Nullable[str]
r"""Reason the generation finished"""
- tokens_prompt: Nullable[float]
- r"""Number of tokens in the prompt"""
+ generation_time: float
+ r"""Time taken for generation in milliseconds"""
- tokens_completion: Nullable[float]
- r"""Number of tokens in the completion"""
+ http_referer: Nullable[str]
+ r"""Referer header from the request"""
- native_tokens_prompt: Nullable[float]
- r"""Native prompt tokens as reported by provider"""
+ id: str
+ r"""Unique identifier for the generation"""
- native_tokens_completion: Nullable[float]
- r"""Native completion tokens as reported by provider"""
+ is_byok: bool
+ r"""Whether this used bring-your-own-key"""
- native_tokens_completion_images: Nullable[float]
- r"""Native completion image tokens as reported by provider"""
+ latency: float
+ r"""Total latency in milliseconds"""
- native_tokens_reasoning: Nullable[float]
- r"""Native reasoning tokens as reported by provider"""
+ model: str
+ r"""Model used for the generation"""
- native_tokens_cached: Nullable[float]
+ moderation_latency: float
+ r"""Moderation latency in milliseconds"""
+
+ native_finish_reason: Nullable[str]
+ r"""Native finish reason as reported by provider"""
+
+ native_tokens_cached: int
r"""Native cached tokens as reported by provider"""
- num_media_prompt: Nullable[float]
- r"""Number of media items in the prompt"""
+ native_tokens_completion: int
+ r"""Native completion tokens as reported by provider"""
- num_input_audio_prompt: Nullable[float]
+ native_tokens_completion_images: int
+ r"""Native completion image tokens as reported by provider"""
+
+ native_tokens_prompt: int
+ r"""Native prompt tokens as reported by provider"""
+
+ native_tokens_reasoning: int
+ r"""Native reasoning tokens as reported by provider"""
+
+ num_input_audio_prompt: int
r"""Number of audio inputs in the prompt"""
- num_media_completion: Nullable[float]
+ num_media_completion: int
r"""Number of media items in the completion"""
- num_search_results: Nullable[float]
+ num_media_prompt: int
+ r"""Number of media items in the prompt"""
+
+ num_search_results: int
r"""Number of search results included"""
origin: str
r"""Origin URL of the request"""
- usage: float
- r"""Usage amount in USD"""
+ provider_name: Nullable[str]
+ r"""Name of the provider that served the request"""
- is_byok: bool
- r"""Whether this used bring-your-own-key"""
-
- native_finish_reason: Nullable[str]
- r"""Native finish reason as reported by provider"""
-
- external_user: Nullable[str]
- r"""External user identifier"""
-
- api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))]
- r"""Type of API used for the generation"""
+ 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)"""
- provider_responses: Nullable[List[ProviderResponse]]
- r"""List of provider responses for this generation, including fallback attempts"""
+ streamed: Nullable[bool]
+ r"""Whether the response was streamed"""
+
+ tokens_completion: int
+ r"""Number of tokens in the completion"""
+
+ tokens_prompt: 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: 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"""
- http_referer: Nullable[str]
- r"""Referer 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 = []
+ optional_fields = ["request_id", "session_id"]
nullable_fields = [
- "upstream_id",
- "cache_discount",
- "upstream_inference_cost",
- "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",
- "native_finish_reason",
- "external_user",
"api_type",
- "router",
- "provider_responses",
- "user_agent",
+ "cancelled",
+ "external_user",
+ "finish_reason",
"http_referer",
+ "native_finish_reason",
+ "provider_name",
+ "provider_responses",
+ "request_id",
+ "router",
+ "session_id",
+ "streamed",
+ "upstream_id",
+ "user_agent",
]
null_default_fields = []
diff --git a/src/openrouter/operations/getguardrail.py b/src/openrouter/operations/getguardrail.py
index f8f5d38..e3a2ca2 100644
--- a/src/openrouter/operations/getguardrail.py
+++ b/src/openrouter/operations/getguardrail.py
@@ -1,24 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import (
- BaseModel,
- Nullable,
- OptionalNullable,
- UNSET,
- UNSET_SENTINEL,
- UnrecognizedStr,
-)
-from openrouter.utils import (
- FieldMetadata,
- HeaderMetadata,
- PathParamMetadata,
- validate_open_enum,
-)
+from openrouter.types import BaseModel
+from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
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
@@ -119,143 +105,3 @@ class GetGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-GetGuardrailResetInterval = Union[
- Literal[
- "daily",
- "weekly",
- "monthly",
- ],
- UnrecognizedStr,
-]
-r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
-
-class GetGuardrailDataTypedDict(TypedDict):
- r"""The guardrail"""
-
- id: str
- r"""Unique identifier for the guardrail"""
- name: str
- r"""Name of the guardrail"""
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
- description: NotRequired[Nullable[str]]
- r"""Description of the guardrail"""
- limit_usd: NotRequired[Nullable[float]]
- r"""Spending limit in USD"""
- reset_interval: NotRequired[Nullable[GetGuardrailResetInterval]]
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
- allowed_providers: NotRequired[Nullable[List[str]]]
- r"""List of allowed provider IDs"""
- ignored_providers: NotRequired[Nullable[List[str]]]
- r"""List of provider IDs to exclude from routing"""
- allowed_models: NotRequired[Nullable[List[str]]]
- r"""Array of model canonical_slugs (immutable identifiers)"""
- enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
- updated_at: NotRequired[Nullable[str]]
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
-
-class GetGuardrailData(BaseModel):
- r"""The guardrail"""
-
- id: str
- r"""Unique identifier for the guardrail"""
-
- name: str
- r"""Name of the guardrail"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
-
- description: OptionalNullable[str] = UNSET
- r"""Description of the guardrail"""
-
- limit_usd: OptionalNullable[float] = UNSET
- r"""Spending limit in USD"""
-
- reset_interval: Annotated[
- OptionalNullable[GetGuardrailResetInterval],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
- allowed_providers: OptionalNullable[List[str]] = UNSET
- r"""List of allowed provider IDs"""
-
- ignored_providers: OptionalNullable[List[str]] = UNSET
- r"""List of provider IDs to exclude from routing"""
-
- allowed_models: OptionalNullable[List[str]] = UNSET
- r"""Array of model canonical_slugs (immutable identifiers)"""
-
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
-
- updated_at: OptionalNullable[str] = UNSET
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "updated_at",
- ]
- nullable_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "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
-
-
-class GetGuardrailResponseTypedDict(TypedDict):
- r"""Guardrail details"""
-
- data: GetGuardrailDataTypedDict
- r"""The guardrail"""
-
-
-class GetGuardrailResponse(BaseModel):
- r"""Guardrail details"""
-
- data: GetGuardrailData
- r"""The guardrail"""
diff --git a/src/openrouter/operations/getkey.py b/src/openrouter/operations/getkey.py
index 66d56e0..77c3f4b 100644
--- a/src/openrouter/operations/getkey.py
+++ b/src/openrouter/operations/getkey.py
@@ -118,44 +118,44 @@ class GetKeyRequest(BaseModel):
class GetKeyDataTypedDict(TypedDict):
r"""The API key information"""
- hash: str
- r"""Unique hash identifier for the API key"""
- name: str
- r"""Name of the API key"""
- label: str
- r"""Human-readable label for the API key"""
- disabled: bool
- r"""Whether the API key is disabled"""
- limit: Nullable[float]
- r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
- r"""Remaining spending limit in USD"""
- limit_reset: Nullable[str]
- r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
- usage: float
- r"""Total OpenRouter credit usage (in USD) for the API key"""
- usage_daily: float
- r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
- usage_monthly: float
- r"""OpenRouter credit usage (in USD) for the current UTC month"""
byok_usage: float
r"""Total external BYOK usage (in USD) for the API key"""
byok_usage_daily: float
r"""External BYOK usage (in USD) for the current UTC day"""
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
byok_usage_monthly: float
r"""External BYOK usage (in USD) for current UTC month"""
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
created_at: str
r"""ISO 8601 timestamp of when the API key was created"""
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
creator_user_id: Nullable[str]
r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ disabled: bool
+ r"""Whether the API key is disabled"""
+ hash: str
+ r"""Unique hash identifier for the API key"""
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+ label: str
+ r"""Human-readable label for the API key"""
+ limit: float
+ r"""Spending limit for the API key in USD"""
+ limit_remaining: float
+ r"""Remaining spending limit in USD"""
+ limit_reset: Nullable[str]
+ r"""Type of limit reset for the API key"""
+ name: str
+ r"""Name of the API key"""
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
+ usage: float
+ r"""Total OpenRouter credit usage (in USD) for the API key"""
+ usage_daily: float
+ r"""OpenRouter credit usage (in USD) for the current UTC day"""
+ usage_monthly: float
+ 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)"""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -163,29 +163,50 @@ class GetKeyDataTypedDict(TypedDict):
class GetKeyData(BaseModel):
r"""The API key information"""
- hash: str
- r"""Unique hash identifier for the API key"""
+ byok_usage: float
+ r"""Total external BYOK usage (in USD) for the API key"""
- name: str
- r"""Name of the API key"""
+ byok_usage_daily: float
+ r"""External BYOK usage (in USD) for the current UTC day"""
- label: str
- r"""Human-readable label for the API key"""
+ byok_usage_monthly: float
+ r"""External BYOK usage (in USD) for current UTC month"""
+
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the API key was created"""
+
+ creator_user_id: Nullable[str]
+ r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
disabled: bool
r"""Whether the API key is disabled"""
- limit: Nullable[float]
+ hash: str
+ r"""Unique hash identifier for the API key"""
+
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+
+ label: str
+ r"""Human-readable label for the API key"""
+
+ limit: float
r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
+ limit_remaining: float
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
+ name: str
+ r"""Name of the API key"""
+
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
usage: float
r"""Total OpenRouter credit usage (in USD) for the API key"""
@@ -193,32 +214,11 @@ class GetKeyData(BaseModel):
usage_daily: float
r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
-
usage_monthly: float
r"""OpenRouter credit usage (in USD) for the current UTC month"""
- byok_usage: float
- r"""Total external BYOK usage (in USD) for the API key"""
-
- byok_usage_daily: float
- r"""External BYOK usage (in USD) for the current UTC day"""
-
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
-
- byok_usage_monthly: float
- r"""External BYOK usage (in USD) for current UTC month"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the API key was created"""
-
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
-
- creator_user_id: Nullable[str]
- r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ usage_weekly: float
+ r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -226,14 +226,7 @@ class GetKeyData(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["expires_at"]
- nullable_fields = [
- "limit",
- "limit_remaining",
- "limit_reset",
- "updated_at",
- "expires_at",
- "creator_user_id",
- ]
+ nullable_fields = ["creator_user_id", "expires_at", "limit_reset", "updated_at"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/operations/getmodels.py b/src/openrouter/operations/getmodels.py
index 472068d..4f37b3b 100644
--- a/src/openrouter/operations/getmodels.py
+++ b/src/openrouter/operations/getmodels.py
@@ -97,6 +97,7 @@ class GetModelsRequestTypedDict(TypedDict):
category: NotRequired[Category]
r"""Filter models by use case category"""
supported_parameters: NotRequired[str]
+ r"""Filter models by supported parameter (comma-separated)"""
output_modalities: NotRequired[str]
r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."""
@@ -140,6 +141,7 @@ class GetModelsRequest(BaseModel):
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
+ r"""Filter models by supported parameter (comma-separated)"""
output_modalities: Annotated[
Optional[str],
diff --git a/src/openrouter/operations/getuseractivity.py b/src/openrouter/operations/getuseractivity.py
index 9dacdcd..3e29cdf 100644
--- a/src/openrouter/operations/getuseractivity.py
+++ b/src/openrouter/operations/getuseractivity.py
@@ -1,11 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.components import activityitem as components_activityitem
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
-from typing import List, Optional
+from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -71,6 +70,10 @@ class GetUserActivityRequestTypedDict(TypedDict):
"""
date_: NotRequired[str]
r"""Filter by a single UTC date in the last 30 days (YYYY-MM-DD format)."""
+ api_key_hash: NotRequired[str]
+ r"""Filter by API key hash (SHA-256 hex string, as returned by the keys API)."""
+ user_id: NotRequired[str]
+ r"""Filter by org member user ID. Only applicable for organization accounts."""
class GetUserActivityRequest(BaseModel):
@@ -109,16 +112,14 @@ class GetUserActivityRequest(BaseModel):
] = None
r"""Filter by a single UTC date in the last 30 days (YYYY-MM-DD format)."""
+ api_key_hash: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Filter by API key hash (SHA-256 hex string, as returned by the keys API)."""
-class GetUserActivityResponseTypedDict(TypedDict):
- r"""Returns user activity data grouped by endpoint"""
-
- data: List[components_activityitem.ActivityItemTypedDict]
- r"""List of activity items"""
-
-
-class GetUserActivityResponse(BaseModel):
- r"""Returns user activity data grouped by endpoint"""
-
- data: List[components_activityitem.ActivityItem]
- r"""List of activity items"""
+ user_id: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Filter by org member user ID. Only applicable for organization accounts."""
diff --git a/src/openrouter/operations/getvideos.py b/src/openrouter/operations/getvideos.py
new file mode 100644
index 0000000..3a120ed
--- /dev/null
+++ b/src/openrouter/operations/getvideos.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 GetVideosGlobalsTypedDict(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 GetVideosGlobals(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 GetVideosRequestTypedDict(TypedDict):
+ job_id: str
+ 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 GetVideosRequest(BaseModel):
+ job_id: Annotated[
+ str,
+ pydantic.Field(alias="jobId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+
+ 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 649e842..2119c12 100644
--- a/src/openrouter/operations/list.py
+++ b/src/openrouter/operations/list.py
@@ -76,9 +76,9 @@ class ListRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- include_disabled: NotRequired[str]
+ include_disabled: NotRequired[bool]
r"""Whether to include disabled API keys in the response"""
- offset: NotRequired[str]
+ offset: NotRequired[int]
r"""Number of API keys to skip for pagination"""
@@ -112,85 +112,106 @@ class ListRequest(BaseModel):
"""
include_disabled: Annotated[
- Optional[str],
+ Optional[bool],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Whether to include disabled API keys in the response"""
offset: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Number of API keys to skip for pagination"""
class ListDataTypedDict(TypedDict):
- hash: str
- r"""Unique hash identifier for the API key"""
- name: str
- r"""Name of the API key"""
- label: str
- r"""Human-readable label for the API key"""
- disabled: bool
- r"""Whether the API key is disabled"""
- limit: Nullable[float]
- r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
- r"""Remaining spending limit in USD"""
- limit_reset: Nullable[str]
- r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
- usage: float
- r"""Total OpenRouter credit usage (in USD) for the API key"""
- usage_daily: float
- r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
- usage_monthly: float
- r"""OpenRouter credit usage (in USD) for the current UTC month"""
byok_usage: float
r"""Total external BYOK usage (in USD) for the API key"""
byok_usage_daily: float
r"""External BYOK usage (in USD) for the current UTC day"""
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
byok_usage_monthly: float
r"""External BYOK usage (in USD) for current UTC month"""
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
created_at: str
r"""ISO 8601 timestamp of when the API key was created"""
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
creator_user_id: Nullable[str]
r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ disabled: bool
+ r"""Whether the API key is disabled"""
+ hash: str
+ r"""Unique hash identifier for the API key"""
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+ label: str
+ r"""Human-readable label for the API key"""
+ limit: float
+ r"""Spending limit for the API key in USD"""
+ limit_remaining: float
+ r"""Remaining spending limit in USD"""
+ limit_reset: Nullable[str]
+ r"""Type of limit reset for the API key"""
+ name: str
+ r"""Name of the API key"""
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
+ usage: float
+ r"""Total OpenRouter credit usage (in USD) for the API key"""
+ usage_daily: float
+ r"""OpenRouter credit usage (in USD) for the current UTC day"""
+ usage_monthly: float
+ 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)"""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
class ListData(BaseModel):
- hash: str
- r"""Unique hash identifier for the API key"""
+ byok_usage: float
+ r"""Total external BYOK usage (in USD) for the API key"""
- name: str
- r"""Name of the API key"""
+ byok_usage_daily: float
+ r"""External BYOK usage (in USD) for the current UTC day"""
- label: str
- r"""Human-readable label for the API key"""
+ byok_usage_monthly: float
+ r"""External BYOK usage (in USD) for current UTC month"""
+
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the API key was created"""
+
+ creator_user_id: Nullable[str]
+ r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
disabled: bool
r"""Whether the API key is disabled"""
- limit: Nullable[float]
+ hash: str
+ r"""Unique hash identifier for the API key"""
+
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+
+ label: str
+ r"""Human-readable label for the API key"""
+
+ limit: float
r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
+ limit_remaining: float
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
+ name: str
+ r"""Name of the API key"""
+
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
usage: float
r"""Total OpenRouter credit usage (in USD) for the API key"""
@@ -198,32 +219,11 @@ class ListData(BaseModel):
usage_daily: float
r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
-
usage_monthly: float
r"""OpenRouter credit usage (in USD) for the current UTC month"""
- byok_usage: float
- r"""Total external BYOK usage (in USD) for the API key"""
-
- byok_usage_daily: float
- r"""External BYOK usage (in USD) for the current UTC day"""
-
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
-
- byok_usage_monthly: float
- r"""External BYOK usage (in USD) for current UTC month"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the API key was created"""
-
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
-
- creator_user_id: Nullable[str]
- r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ usage_weekly: float
+ r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -231,14 +231,7 @@ class ListData(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["expires_at"]
- nullable_fields = [
- "limit",
- "limit_remaining",
- "limit_reset",
- "updated_at",
- "expires_at",
- "creator_user_id",
- ]
+ nullable_fields = ["creator_user_id", "expires_at", "limit_reset", "updated_at"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/operations/listendpoints.py b/src/openrouter/operations/listendpoints.py
index 4470cd2..e1cef6f 100644
--- a/src/openrouter/operations/listendpoints.py
+++ b/src/openrouter/operations/listendpoints.py
@@ -59,7 +59,9 @@ class ListEndpointsGlobals(BaseModel):
class ListEndpointsRequestTypedDict(TypedDict):
author: str
+ r"""The author/organization of the model"""
slug: str
+ r"""The model 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.
@@ -79,10 +81,12 @@ class ListEndpointsRequest(BaseModel):
author: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
+ r"""The author/organization of the model"""
slug: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
+ r"""The model slug"""
http_referer: Annotated[
Optional[str],
diff --git a/src/openrouter/operations/listguardrailkeyassignments.py b/src/openrouter/operations/listguardrailkeyassignments.py
index 28a84b6..1278683 100644
--- a/src/openrouter/operations/listguardrailkeyassignments.py
+++ b/src/openrouter/operations/listguardrailkeyassignments.py
@@ -1,7 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.components import (
+ listkeyassignmentsresponse as components_listkeyassignmentsresponse,
+)
+from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
@@ -9,8 +12,7 @@ from openrouter.utils import (
QueryParamMetadata,
)
import pydantic
-from pydantic import model_serializer
-from typing import List, Optional
+from typing import Awaitable, Callable, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -76,9 +78,9 @@ class ListGuardrailKeyAssignmentsRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- offset: NotRequired[str]
+ offset: NotRequired[int]
r"""Number of records to skip for pagination"""
- limit: NotRequired[str]
+ limit: NotRequired[int]
r"""Maximum number of records to return (max 100)"""
@@ -117,102 +119,26 @@ class ListGuardrailKeyAssignmentsRequest(BaseModel):
"""
offset: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Number of records to skip for pagination"""
limit: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Maximum number of records to return (max 100)"""
-class ListGuardrailKeyAssignmentsDataTypedDict(TypedDict):
- id: str
- r"""Unique identifier for the assignment"""
- key_hash: str
- r"""Hash of the assigned API key"""
- guardrail_id: str
- r"""ID of the guardrail"""
- key_name: str
- r"""Name of the API key"""
- key_label: str
- r"""Label of the API key"""
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
-
-class ListGuardrailKeyAssignmentsData(BaseModel):
- id: str
- r"""Unique identifier for the assignment"""
-
- key_hash: str
- r"""Hash of the assigned API key"""
-
- guardrail_id: str
- r"""ID of the guardrail"""
-
- key_name: str
- r"""Name of the API key"""
-
- key_label: str
- r"""Label of the API key"""
-
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = []
- nullable_fields = ["assigned_by"]
- 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 ListGuardrailKeyAssignmentsResponseTypedDict(TypedDict):
- r"""List of key assignments"""
-
- data: List[ListGuardrailKeyAssignmentsDataTypedDict]
- r"""List of key assignments"""
- total_count: float
- r"""Total number of key assignments for this guardrail"""
+ result: components_listkeyassignmentsresponse.ListKeyAssignmentsResponseTypedDict
class ListGuardrailKeyAssignmentsResponse(BaseModel):
- r"""List of key assignments"""
+ next: Union[
+ Callable[[], Optional[ListGuardrailKeyAssignmentsResponse]],
+ Callable[[], Awaitable[Optional[ListGuardrailKeyAssignmentsResponse]]],
+ ]
- data: List[ListGuardrailKeyAssignmentsData]
- r"""List of key assignments"""
-
- total_count: float
- r"""Total number of key assignments for this guardrail"""
+ result: components_listkeyassignmentsresponse.ListKeyAssignmentsResponse
diff --git a/src/openrouter/operations/listguardrailmemberassignments.py b/src/openrouter/operations/listguardrailmemberassignments.py
index 88cb8d0..c9c8c3e 100644
--- a/src/openrouter/operations/listguardrailmemberassignments.py
+++ b/src/openrouter/operations/listguardrailmemberassignments.py
@@ -1,7 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.components import (
+ listmemberassignmentsresponse as components_listmemberassignmentsresponse,
+)
+from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
@@ -9,8 +12,7 @@ from openrouter.utils import (
QueryParamMetadata,
)
import pydantic
-from pydantic import model_serializer
-from typing import List, Optional
+from typing import Awaitable, Callable, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -76,9 +78,9 @@ class ListGuardrailMemberAssignmentsRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- offset: NotRequired[str]
+ offset: NotRequired[int]
r"""Number of records to skip for pagination"""
- limit: NotRequired[str]
+ limit: NotRequired[int]
r"""Maximum number of records to return (max 100)"""
@@ -117,97 +119,28 @@ class ListGuardrailMemberAssignmentsRequest(BaseModel):
"""
offset: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Number of records to skip for pagination"""
limit: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Maximum number of records to return (max 100)"""
-class ListGuardrailMemberAssignmentsDataTypedDict(TypedDict):
- id: str
- r"""Unique identifier for the assignment"""
- user_id: str
- r"""Clerk user ID of the assigned member"""
- organization_id: str
- r"""Organization ID"""
- guardrail_id: str
- r"""ID of the guardrail"""
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
-
-class ListGuardrailMemberAssignmentsData(BaseModel):
- id: str
- r"""Unique identifier for the assignment"""
-
- user_id: str
- r"""Clerk user ID of the assigned member"""
-
- organization_id: str
- r"""Organization ID"""
-
- guardrail_id: str
- r"""ID of the guardrail"""
-
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = []
- nullable_fields = ["assigned_by"]
- 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 ListGuardrailMemberAssignmentsResponseTypedDict(TypedDict):
- r"""List of member assignments"""
-
- data: List[ListGuardrailMemberAssignmentsDataTypedDict]
- r"""List of member assignments"""
- total_count: float
- r"""Total number of member assignments"""
+ result: (
+ components_listmemberassignmentsresponse.ListMemberAssignmentsResponseTypedDict
+ )
class ListGuardrailMemberAssignmentsResponse(BaseModel):
- r"""List of member assignments"""
+ next: Union[
+ Callable[[], Optional[ListGuardrailMemberAssignmentsResponse]],
+ Callable[[], Awaitable[Optional[ListGuardrailMemberAssignmentsResponse]]],
+ ]
- data: List[ListGuardrailMemberAssignmentsData]
- r"""List of member assignments"""
-
- total_count: float
- r"""Total number of member assignments"""
+ result: components_listmemberassignmentsresponse.ListMemberAssignmentsResponse
diff --git a/src/openrouter/operations/listguardrails.py b/src/openrouter/operations/listguardrails.py
index d6c1886..8345e0e 100644
--- a/src/openrouter/operations/listguardrails.py
+++ b/src/openrouter/operations/listguardrails.py
@@ -1,24 +1,13 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import (
- BaseModel,
- Nullable,
- OptionalNullable,
- UNSET,
- UNSET_SENTINEL,
- UnrecognizedStr,
-)
-from openrouter.utils import (
- FieldMetadata,
- HeaderMetadata,
- QueryParamMetadata,
- validate_open_enum,
+from openrouter.components import (
+ listguardrailsresponse as components_listguardrailsresponse,
)
+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 Awaitable, Callable, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -82,9 +71,9 @@ class ListGuardrailsRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- offset: NotRequired[str]
+ offset: NotRequired[int]
r"""Number of records to skip for pagination"""
- limit: NotRequired[str]
+ limit: NotRequired[int]
r"""Maximum number of records to return (max 100)"""
@@ -118,154 +107,26 @@ class ListGuardrailsRequest(BaseModel):
"""
offset: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Number of records to skip for pagination"""
limit: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Maximum number of records to return (max 100)"""
-ListGuardrailsResetInterval = Union[
- Literal[
- "daily",
- "weekly",
- "monthly",
- ],
- UnrecognizedStr,
-]
-r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
-
-class ListGuardrailsDataTypedDict(TypedDict):
- id: str
- r"""Unique identifier for the guardrail"""
- name: str
- r"""Name of the guardrail"""
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
- description: NotRequired[Nullable[str]]
- r"""Description of the guardrail"""
- limit_usd: NotRequired[Nullable[float]]
- r"""Spending limit in USD"""
- reset_interval: NotRequired[Nullable[ListGuardrailsResetInterval]]
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
- allowed_providers: NotRequired[Nullable[List[str]]]
- r"""List of allowed provider IDs"""
- ignored_providers: NotRequired[Nullable[List[str]]]
- r"""List of provider IDs to exclude from routing"""
- allowed_models: NotRequired[Nullable[List[str]]]
- r"""Array of model canonical_slugs (immutable identifiers)"""
- enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
- updated_at: NotRequired[Nullable[str]]
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
-
-class ListGuardrailsData(BaseModel):
- id: str
- r"""Unique identifier for the guardrail"""
-
- name: str
- r"""Name of the guardrail"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
-
- description: OptionalNullable[str] = UNSET
- r"""Description of the guardrail"""
-
- limit_usd: OptionalNullable[float] = UNSET
- r"""Spending limit in USD"""
-
- reset_interval: Annotated[
- OptionalNullable[ListGuardrailsResetInterval],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
- allowed_providers: OptionalNullable[List[str]] = UNSET
- r"""List of allowed provider IDs"""
-
- ignored_providers: OptionalNullable[List[str]] = UNSET
- r"""List of provider IDs to exclude from routing"""
-
- allowed_models: OptionalNullable[List[str]] = UNSET
- r"""Array of model canonical_slugs (immutable identifiers)"""
-
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
-
- updated_at: OptionalNullable[str] = UNSET
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "updated_at",
- ]
- nullable_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "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
-
-
class ListGuardrailsResponseTypedDict(TypedDict):
- r"""List of guardrails"""
-
- data: List[ListGuardrailsDataTypedDict]
- r"""List of guardrails"""
- total_count: float
- r"""Total number of guardrails"""
+ result: components_listguardrailsresponse.ListGuardrailsResponseTypedDict
class ListGuardrailsResponse(BaseModel):
- r"""List of guardrails"""
+ next: Union[
+ Callable[[], Optional[ListGuardrailsResponse]],
+ Callable[[], Awaitable[Optional[ListGuardrailsResponse]]],
+ ]
- data: List[ListGuardrailsData]
- r"""List of guardrails"""
-
- total_count: float
- r"""Total number of guardrails"""
+ result: components_listguardrailsresponse.ListGuardrailsResponse
diff --git a/src/openrouter/operations/listkeyassignments.py b/src/openrouter/operations/listkeyassignments.py
index 36df9a6..ae0bfca 100644
--- a/src/openrouter/operations/listkeyassignments.py
+++ b/src/openrouter/operations/listkeyassignments.py
@@ -1,11 +1,13 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.components import (
+ listkeyassignmentsresponse as components_listkeyassignmentsresponse,
+)
+from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
-from pydantic import model_serializer
-from typing import List, Optional
+from typing import Awaitable, Callable, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -69,9 +71,9 @@ class ListKeyAssignmentsRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- offset: NotRequired[str]
+ offset: NotRequired[int]
r"""Number of records to skip for pagination"""
- limit: NotRequired[str]
+ limit: NotRequired[int]
r"""Maximum number of records to return (max 100)"""
@@ -105,102 +107,26 @@ class ListKeyAssignmentsRequest(BaseModel):
"""
offset: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Number of records to skip for pagination"""
limit: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Maximum number of records to return (max 100)"""
-class ListKeyAssignmentsDataTypedDict(TypedDict):
- id: str
- r"""Unique identifier for the assignment"""
- key_hash: str
- r"""Hash of the assigned API key"""
- guardrail_id: str
- r"""ID of the guardrail"""
- key_name: str
- r"""Name of the API key"""
- key_label: str
- r"""Label of the API key"""
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
-
-class ListKeyAssignmentsData(BaseModel):
- id: str
- r"""Unique identifier for the assignment"""
-
- key_hash: str
- r"""Hash of the assigned API key"""
-
- guardrail_id: str
- r"""ID of the guardrail"""
-
- key_name: str
- r"""Name of the API key"""
-
- key_label: str
- r"""Label of the API key"""
-
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = []
- nullable_fields = ["assigned_by"]
- 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 ListKeyAssignmentsResponseTypedDict(TypedDict):
- r"""List of key assignments"""
-
- data: List[ListKeyAssignmentsDataTypedDict]
- r"""List of key assignments"""
- total_count: float
- r"""Total number of key assignments for this guardrail"""
+ result: components_listkeyassignmentsresponse.ListKeyAssignmentsResponseTypedDict
class ListKeyAssignmentsResponse(BaseModel):
- r"""List of key assignments"""
+ next: Union[
+ Callable[[], Optional[ListKeyAssignmentsResponse]],
+ Callable[[], Awaitable[Optional[ListKeyAssignmentsResponse]]],
+ ]
- data: List[ListKeyAssignmentsData]
- r"""List of key assignments"""
-
- total_count: float
- r"""Total number of key assignments for this guardrail"""
+ result: components_listkeyassignmentsresponse.ListKeyAssignmentsResponse
diff --git a/src/openrouter/operations/listmemberassignments.py b/src/openrouter/operations/listmemberassignments.py
index a6684dd..55c93ba 100644
--- a/src/openrouter/operations/listmemberassignments.py
+++ b/src/openrouter/operations/listmemberassignments.py
@@ -1,11 +1,13 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
+from openrouter.components import (
+ listmemberassignmentsresponse as components_listmemberassignmentsresponse,
+)
+from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
-from pydantic import model_serializer
-from typing import List, Optional
+from typing import Awaitable, Callable, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
@@ -69,9 +71,9 @@ class ListMemberAssignmentsRequestTypedDict(TypedDict):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
- offset: NotRequired[str]
+ offset: NotRequired[int]
r"""Number of records to skip for pagination"""
- limit: NotRequired[str]
+ limit: NotRequired[int]
r"""Maximum number of records to return (max 100)"""
@@ -105,97 +107,28 @@ class ListMemberAssignmentsRequest(BaseModel):
"""
offset: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Number of records to skip for pagination"""
limit: Annotated[
- Optional[str],
+ Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Maximum number of records to return (max 100)"""
-class ListMemberAssignmentsDataTypedDict(TypedDict):
- id: str
- r"""Unique identifier for the assignment"""
- user_id: str
- r"""Clerk user ID of the assigned member"""
- organization_id: str
- r"""Organization ID"""
- guardrail_id: str
- r"""ID of the guardrail"""
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
-
-class ListMemberAssignmentsData(BaseModel):
- id: str
- r"""Unique identifier for the assignment"""
-
- user_id: str
- r"""Clerk user ID of the assigned member"""
-
- organization_id: str
- r"""Organization ID"""
-
- guardrail_id: str
- r"""ID of the guardrail"""
-
- assigned_by: Nullable[str]
- r"""User ID of who made the assignment"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the assignment was created"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = []
- nullable_fields = ["assigned_by"]
- 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 ListMemberAssignmentsResponseTypedDict(TypedDict):
- r"""List of member assignments"""
-
- data: List[ListMemberAssignmentsDataTypedDict]
- r"""List of member assignments"""
- total_count: float
- r"""Total number of member assignments"""
+ result: (
+ components_listmemberassignmentsresponse.ListMemberAssignmentsResponseTypedDict
+ )
class ListMemberAssignmentsResponse(BaseModel):
- r"""List of member assignments"""
+ next: Union[
+ Callable[[], Optional[ListMemberAssignmentsResponse]],
+ Callable[[], Awaitable[Optional[ListMemberAssignmentsResponse]]],
+ ]
- data: List[ListMemberAssignmentsData]
- r"""List of member assignments"""
-
- total_count: float
- r"""Total number of member assignments"""
+ result: components_listmemberassignmentsresponse.ListMemberAssignmentsResponse
diff --git a/src/openrouter/operations/listorganizationmembers.py b/src/openrouter/operations/listorganizationmembers.py
new file mode 100644
index 0000000..6d918f6
--- /dev/null
+++ b/src/openrouter/operations/listorganizationmembers.py
@@ -0,0 +1,225 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ QueryParamMetadata,
+ validate_open_enum,
+)
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_validators import PlainValidator
+from typing import Awaitable, Callable, List, Literal, Optional, Union
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListOrganizationMembersGlobalsTypedDict(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 ListOrganizationMembersGlobals(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 ListOrganizationMembersRequestTypedDict(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 ListOrganizationMembersRequest(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)"""
+
+
+Role = Union[
+ Literal[
+ "org:admin",
+ "org:member",
+ ],
+ UnrecognizedStr,
+]
+r"""Role of the member in the organization"""
+
+
+class ListOrganizationMembersDataTypedDict(TypedDict):
+ email: str
+ r"""Email address of the member"""
+ first_name: Nullable[str]
+ r"""First name of the member"""
+ id: str
+ r"""User ID of the organization member"""
+ last_name: Nullable[str]
+ r"""Last name of the member"""
+ role: Role
+ r"""Role of the member in the organization"""
+
+
+class ListOrganizationMembersData(BaseModel):
+ email: str
+ r"""Email address of the member"""
+
+ first_name: Nullable[str]
+ r"""First name of the member"""
+
+ id: str
+ r"""User ID of the organization member"""
+
+ last_name: Nullable[str]
+ r"""Last name of the member"""
+
+ role: Annotated[Role, PlainValidator(validate_open_enum(False))]
+ r"""Role of the member in the organization"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = []
+ nullable_fields = ["first_name", "last_name"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class ListOrganizationMembersResponseBodyTypedDict(TypedDict):
+ r"""List of organization members"""
+
+ data: List[ListOrganizationMembersDataTypedDict]
+ r"""List of organization members"""
+ total_count: int
+ r"""Total number of members in the organization"""
+
+
+class ListOrganizationMembersResponseBody(BaseModel):
+ r"""List of organization members"""
+
+ data: List[ListOrganizationMembersData]
+ r"""List of organization members"""
+
+ total_count: int
+ r"""Total number of members in the organization"""
+
+
+class ListOrganizationMembersResponseTypedDict(TypedDict):
+ result: ListOrganizationMembersResponseBodyTypedDict
+
+
+class ListOrganizationMembersResponse(BaseModel):
+ next: Union[
+ Callable[[], Optional[ListOrganizationMembersResponse]],
+ Callable[[], Awaitable[Optional[ListOrganizationMembersResponse]]],
+ ]
+
+ result: ListOrganizationMembersResponseBody
diff --git a/src/openrouter/operations/listproviders.py b/src/openrouter/operations/listproviders.py
index be65217..c4e5180 100644
--- a/src/openrouter/operations/listproviders.py
+++ b/src/openrouter/operations/listproviders.py
@@ -109,6 +109,262 @@ class ListProvidersRequest(BaseModel):
"""
+Datacenter = Union[
+ Literal[
+ "AD",
+ "AE",
+ "AF",
+ "AG",
+ "AI",
+ "AL",
+ "AM",
+ "AO",
+ "AQ",
+ "AR",
+ "AS",
+ "AT",
+ "AU",
+ "AW",
+ "AX",
+ "AZ",
+ "BA",
+ "BB",
+ "BD",
+ "BE",
+ "BF",
+ "BG",
+ "BH",
+ "BI",
+ "BJ",
+ "BL",
+ "BM",
+ "BN",
+ "BO",
+ "BQ",
+ "BR",
+ "BS",
+ "BT",
+ "BV",
+ "BW",
+ "BY",
+ "BZ",
+ "CA",
+ "CC",
+ "CD",
+ "CF",
+ "CG",
+ "CH",
+ "CI",
+ "CK",
+ "CL",
+ "CM",
+ "CN",
+ "CO",
+ "CR",
+ "CU",
+ "CV",
+ "CW",
+ "CX",
+ "CY",
+ "CZ",
+ "DE",
+ "DJ",
+ "DK",
+ "DM",
+ "DO",
+ "DZ",
+ "EC",
+ "EE",
+ "EG",
+ "EH",
+ "ER",
+ "ES",
+ "ET",
+ "FI",
+ "FJ",
+ "FK",
+ "FM",
+ "FO",
+ "FR",
+ "GA",
+ "GB",
+ "GD",
+ "GE",
+ "GF",
+ "GG",
+ "GH",
+ "GI",
+ "GL",
+ "GM",
+ "GN",
+ "GP",
+ "GQ",
+ "GR",
+ "GS",
+ "GT",
+ "GU",
+ "GW",
+ "GY",
+ "HK",
+ "HM",
+ "HN",
+ "HR",
+ "HT",
+ "HU",
+ "ID",
+ "IE",
+ "IL",
+ "IM",
+ "IN",
+ "IO",
+ "IQ",
+ "IR",
+ "IS",
+ "IT",
+ "JE",
+ "JM",
+ "JO",
+ "JP",
+ "KE",
+ "KG",
+ "KH",
+ "KI",
+ "KM",
+ "KN",
+ "KP",
+ "KR",
+ "KW",
+ "KY",
+ "KZ",
+ "LA",
+ "LB",
+ "LC",
+ "LI",
+ "LK",
+ "LR",
+ "LS",
+ "LT",
+ "LU",
+ "LV",
+ "LY",
+ "MA",
+ "MC",
+ "MD",
+ "ME",
+ "MF",
+ "MG",
+ "MH",
+ "MK",
+ "ML",
+ "MM",
+ "MN",
+ "MO",
+ "MP",
+ "MQ",
+ "MR",
+ "MS",
+ "MT",
+ "MU",
+ "MV",
+ "MW",
+ "MX",
+ "MY",
+ "MZ",
+ "NA",
+ "NC",
+ "NE",
+ "NF",
+ "NG",
+ "NI",
+ "NL",
+ "NO",
+ "NP",
+ "NR",
+ "NU",
+ "NZ",
+ "OM",
+ "PA",
+ "PE",
+ "PF",
+ "PG",
+ "PH",
+ "PK",
+ "PL",
+ "PM",
+ "PN",
+ "PR",
+ "PS",
+ "PT",
+ "PW",
+ "PY",
+ "QA",
+ "RE",
+ "RO",
+ "RS",
+ "RU",
+ "RW",
+ "SA",
+ "SB",
+ "SC",
+ "SD",
+ "SE",
+ "SG",
+ "SH",
+ "SI",
+ "SJ",
+ "SK",
+ "SL",
+ "SM",
+ "SN",
+ "SO",
+ "SR",
+ "SS",
+ "ST",
+ "SV",
+ "SX",
+ "SY",
+ "SZ",
+ "TC",
+ "TD",
+ "TF",
+ "TG",
+ "TH",
+ "TJ",
+ "TK",
+ "TL",
+ "TM",
+ "TN",
+ "TO",
+ "TR",
+ "TT",
+ "TV",
+ "TW",
+ "TZ",
+ "UA",
+ "UG",
+ "UM",
+ "US",
+ "UY",
+ "UZ",
+ "VA",
+ "VC",
+ "VE",
+ "VG",
+ "VI",
+ "VN",
+ "VU",
+ "WF",
+ "WS",
+ "YE",
+ "YT",
+ "ZA",
+ "ZM",
+ "ZW",
+ ],
+ UnrecognizedStr,
+]
+
+
Headquarters = Union[
Literal[
"AD",
@@ -366,319 +622,63 @@ Headquarters = Union[
r"""ISO 3166-1 Alpha-2 country code of the provider headquarters"""
-Datacenter = Union[
- Literal[
- "AD",
- "AE",
- "AF",
- "AG",
- "AI",
- "AL",
- "AM",
- "AO",
- "AQ",
- "AR",
- "AS",
- "AT",
- "AU",
- "AW",
- "AX",
- "AZ",
- "BA",
- "BB",
- "BD",
- "BE",
- "BF",
- "BG",
- "BH",
- "BI",
- "BJ",
- "BL",
- "BM",
- "BN",
- "BO",
- "BQ",
- "BR",
- "BS",
- "BT",
- "BV",
- "BW",
- "BY",
- "BZ",
- "CA",
- "CC",
- "CD",
- "CF",
- "CG",
- "CH",
- "CI",
- "CK",
- "CL",
- "CM",
- "CN",
- "CO",
- "CR",
- "CU",
- "CV",
- "CW",
- "CX",
- "CY",
- "CZ",
- "DE",
- "DJ",
- "DK",
- "DM",
- "DO",
- "DZ",
- "EC",
- "EE",
- "EG",
- "EH",
- "ER",
- "ES",
- "ET",
- "FI",
- "FJ",
- "FK",
- "FM",
- "FO",
- "FR",
- "GA",
- "GB",
- "GD",
- "GE",
- "GF",
- "GG",
- "GH",
- "GI",
- "GL",
- "GM",
- "GN",
- "GP",
- "GQ",
- "GR",
- "GS",
- "GT",
- "GU",
- "GW",
- "GY",
- "HK",
- "HM",
- "HN",
- "HR",
- "HT",
- "HU",
- "ID",
- "IE",
- "IL",
- "IM",
- "IN",
- "IO",
- "IQ",
- "IR",
- "IS",
- "IT",
- "JE",
- "JM",
- "JO",
- "JP",
- "KE",
- "KG",
- "KH",
- "KI",
- "KM",
- "KN",
- "KP",
- "KR",
- "KW",
- "KY",
- "KZ",
- "LA",
- "LB",
- "LC",
- "LI",
- "LK",
- "LR",
- "LS",
- "LT",
- "LU",
- "LV",
- "LY",
- "MA",
- "MC",
- "MD",
- "ME",
- "MF",
- "MG",
- "MH",
- "MK",
- "ML",
- "MM",
- "MN",
- "MO",
- "MP",
- "MQ",
- "MR",
- "MS",
- "MT",
- "MU",
- "MV",
- "MW",
- "MX",
- "MY",
- "MZ",
- "NA",
- "NC",
- "NE",
- "NF",
- "NG",
- "NI",
- "NL",
- "NO",
- "NP",
- "NR",
- "NU",
- "NZ",
- "OM",
- "PA",
- "PE",
- "PF",
- "PG",
- "PH",
- "PK",
- "PL",
- "PM",
- "PN",
- "PR",
- "PS",
- "PT",
- "PW",
- "PY",
- "QA",
- "RE",
- "RO",
- "RS",
- "RU",
- "RW",
- "SA",
- "SB",
- "SC",
- "SD",
- "SE",
- "SG",
- "SH",
- "SI",
- "SJ",
- "SK",
- "SL",
- "SM",
- "SN",
- "SO",
- "SR",
- "SS",
- "ST",
- "SV",
- "SX",
- "SY",
- "SZ",
- "TC",
- "TD",
- "TF",
- "TG",
- "TH",
- "TJ",
- "TK",
- "TL",
- "TM",
- "TN",
- "TO",
- "TR",
- "TT",
- "TV",
- "TW",
- "TZ",
- "UA",
- "UG",
- "UM",
- "US",
- "UY",
- "UZ",
- "VA",
- "VC",
- "VE",
- "VG",
- "VI",
- "VN",
- "VU",
- "WF",
- "WS",
- "YE",
- "YT",
- "ZA",
- "ZM",
- "ZW",
- ],
- UnrecognizedStr,
-]
-
-
class ListProvidersDataTypedDict(TypedDict):
name: str
r"""Display name of the provider"""
- slug: str
- r"""URL-friendly identifier for the provider"""
privacy_policy_url: Nullable[str]
r"""URL to the provider's privacy policy"""
- terms_of_service_url: NotRequired[Nullable[str]]
- r"""URL to the provider's terms of service"""
- status_page_url: NotRequired[Nullable[str]]
- r"""URL to the provider's status page"""
- headquarters: NotRequired[Nullable[Headquarters]]
- r"""ISO 3166-1 Alpha-2 country code of the provider headquarters"""
+ slug: str
+ r"""URL-friendly identifier for the provider"""
datacenters: NotRequired[Nullable[List[Datacenter]]]
r"""ISO 3166-1 Alpha-2 country codes of the provider datacenter locations"""
+ headquarters: NotRequired[Nullable[Headquarters]]
+ r"""ISO 3166-1 Alpha-2 country code of the provider headquarters"""
+ status_page_url: NotRequired[Nullable[str]]
+ r"""URL to the provider's status page"""
+ terms_of_service_url: NotRequired[Nullable[str]]
+ r"""URL to the provider's terms of service"""
class ListProvidersData(BaseModel):
name: str
r"""Display name of the provider"""
- slug: str
- r"""URL-friendly identifier for the provider"""
-
privacy_policy_url: Nullable[str]
r"""URL to the provider's privacy policy"""
- terms_of_service_url: OptionalNullable[str] = UNSET
- r"""URL to the provider's terms of service"""
-
- status_page_url: OptionalNullable[str] = UNSET
- r"""URL to the provider's status page"""
-
- headquarters: Annotated[
- OptionalNullable[Headquarters], PlainValidator(validate_open_enum(False))
- ] = UNSET
- r"""ISO 3166-1 Alpha-2 country code of the provider headquarters"""
+ slug: str
+ r"""URL-friendly identifier for the provider"""
datacenters: OptionalNullable[
List[Annotated[Datacenter, PlainValidator(validate_open_enum(False))]]
] = UNSET
r"""ISO 3166-1 Alpha-2 country codes of the provider datacenter locations"""
+ headquarters: Annotated[
+ OptionalNullable[Headquarters], PlainValidator(validate_open_enum(False))
+ ] = UNSET
+ r"""ISO 3166-1 Alpha-2 country code of the provider headquarters"""
+
+ status_page_url: OptionalNullable[str] = UNSET
+ r"""URL to the provider's status page"""
+
+ terms_of_service_url: OptionalNullable[str] = UNSET
+ r"""URL to the provider's terms of service"""
+
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "terms_of_service_url",
- "status_page_url",
- "headquarters",
"datacenters",
+ "headquarters",
+ "status_page_url",
+ "terms_of_service_url",
]
nullable_fields = [
- "privacy_policy_url",
- "terms_of_service_url",
- "status_page_url",
- "headquarters",
"datacenters",
+ "headquarters",
+ "privacy_policy_url",
+ "status_page_url",
+ "terms_of_service_url",
]
null_default_fields = []
diff --git a/src/openrouter/operations/listvideoscontent.py b/src/openrouter/operations/listvideoscontent.py
new file mode 100644
index 0000000..5ca3eef
--- /dev/null
+++ b/src/openrouter/operations/listvideoscontent.py
@@ -0,0 +1,154 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET_SENTINEL
+from openrouter.utils import (
+ FieldMetadata,
+ HeaderMetadata,
+ PathParamMetadata,
+ QueryParamMetadata,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class ListVideosContentGlobalsTypedDict(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 ListVideosContentGlobals(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 ListVideosContentRequestTypedDict(TypedDict):
+ job_id: str
+ 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.
+
+ """
+ index: NotRequired[Nullable[int]]
+
+
+class ListVideosContentRequest(BaseModel):
+ job_id: Annotated[
+ str,
+ pydantic.Field(alias="jobId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+
+ 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.
+
+ """
+
+ index: Annotated[
+ OptionalNullable[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 0
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "HTTP-Referer",
+ "X-OpenRouter-Title",
+ "X-OpenRouter-Categories",
+ "index",
+ ]
+ nullable_fields = ["index"]
+ 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/operations/createcoinbasecharge.py b/src/openrouter/operations/listvideosmodels.py
similarity index 94%
rename from src/openrouter/operations/createcoinbasecharge.py
rename to src/openrouter/operations/listvideosmodels.py
index 6e296e1..d1497b8 100644
--- a/src/openrouter/operations/createcoinbasecharge.py
+++ b/src/openrouter/operations/listvideosmodels.py
@@ -8,7 +8,7 @@ from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
-class CreateCoinbaseChargeGlobalsTypedDict(TypedDict):
+class ListVideosModelsGlobalsTypedDict(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.
@@ -24,7 +24,7 @@ class CreateCoinbaseChargeGlobalsTypedDict(TypedDict):
"""
-class CreateCoinbaseChargeGlobals(BaseModel):
+class ListVideosModelsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
@@ -54,7 +54,7 @@ class CreateCoinbaseChargeGlobals(BaseModel):
"""
-class CreateCoinbaseChargeRequestTypedDict(TypedDict):
+class ListVideosModelsRequestTypedDict(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.
@@ -70,7 +70,7 @@ class CreateCoinbaseChargeRequestTypedDict(TypedDict):
"""
-class CreateCoinbaseChargeRequest(BaseModel):
+class ListVideosModelsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
diff --git a/src/openrouter/operations/updateguardrail.py b/src/openrouter/operations/updateguardrail.py
index 77946e4..b3675a1 100644
--- a/src/openrouter/operations/updateguardrail.py
+++ b/src/openrouter/operations/updateguardrail.py
@@ -1,25 +1,18 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import (
- BaseModel,
- Nullable,
- OptionalNullable,
- UNSET,
- UNSET_SENTINEL,
- UnrecognizedStr,
+from openrouter.components import (
+ updateguardrailrequest as components_updateguardrailrequest,
)
+from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
- validate_open_enum,
)
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
@@ -69,116 +62,12 @@ class UpdateGuardrailGlobals(BaseModel):
"""
-UpdateGuardrailResetIntervalRequest = Union[
- Literal[
- "daily",
- "weekly",
- "monthly",
- ],
- UnrecognizedStr,
-]
-r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
-
-class UpdateGuardrailRequestBodyTypedDict(TypedDict):
- name: NotRequired[str]
- r"""New name for the guardrail"""
- description: NotRequired[Nullable[str]]
- r"""New description for the guardrail"""
- limit_usd: NotRequired[Nullable[float]]
- r"""New spending limit in USD"""
- reset_interval: NotRequired[Nullable[UpdateGuardrailResetIntervalRequest]]
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
- allowed_providers: NotRequired[Nullable[List[str]]]
- r"""New list of allowed provider IDs"""
- ignored_providers: NotRequired[Nullable[List[str]]]
- r"""List of provider IDs to exclude from routing"""
- allowed_models: NotRequired[Nullable[List[str]]]
- r"""Array of model identifiers (slug or canonical_slug accepted)"""
- enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
-
-
-class UpdateGuardrailRequestBody(BaseModel):
- name: Optional[str] = None
- r"""New name for the guardrail"""
-
- description: OptionalNullable[str] = UNSET
- r"""New description for the guardrail"""
-
- limit_usd: OptionalNullable[float] = UNSET
- r"""New spending limit in USD"""
-
- reset_interval: Annotated[
- OptionalNullable[UpdateGuardrailResetIntervalRequest],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
- allowed_providers: OptionalNullable[List[str]] = UNSET
- r"""New list of allowed provider IDs"""
-
- ignored_providers: OptionalNullable[List[str]] = UNSET
- r"""List of provider IDs to exclude from routing"""
-
- allowed_models: OptionalNullable[List[str]] = UNSET
- r"""Array of model identifiers (slug or canonical_slug accepted)"""
-
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "name",
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- ]
- nullable_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- ]
- 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 UpdateGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail to update"""
- request_body: UpdateGuardrailRequestBodyTypedDict
+ update_guardrail_request: (
+ components_updateguardrailrequest.UpdateGuardrailRequestTypedDict
+ )
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.
@@ -200,8 +89,8 @@ class UpdateGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail to update"""
- request_body: Annotated[
- UpdateGuardrailRequestBody,
+ update_guardrail_request: Annotated[
+ components_updateguardrailrequest.UpdateGuardrailRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
@@ -232,143 +121,3 @@ class UpdateGuardrailRequest(BaseModel):
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
"""
-
-
-UpdateGuardrailResetIntervalResponse = Union[
- Literal[
- "daily",
- "weekly",
- "monthly",
- ],
- UnrecognizedStr,
-]
-r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
-
-class UpdateGuardrailDataTypedDict(TypedDict):
- r"""The updated guardrail"""
-
- id: str
- r"""Unique identifier for the guardrail"""
- name: str
- r"""Name of the guardrail"""
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
- description: NotRequired[Nullable[str]]
- r"""Description of the guardrail"""
- limit_usd: NotRequired[Nullable[float]]
- r"""Spending limit in USD"""
- reset_interval: NotRequired[Nullable[UpdateGuardrailResetIntervalResponse]]
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
- allowed_providers: NotRequired[Nullable[List[str]]]
- r"""List of allowed provider IDs"""
- ignored_providers: NotRequired[Nullable[List[str]]]
- r"""List of provider IDs to exclude from routing"""
- allowed_models: NotRequired[Nullable[List[str]]]
- r"""Array of model canonical_slugs (immutable identifiers)"""
- enforce_zdr: NotRequired[Nullable[bool]]
- r"""Whether to enforce zero data retention"""
- updated_at: NotRequired[Nullable[str]]
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
-
-class UpdateGuardrailData(BaseModel):
- r"""The updated guardrail"""
-
- id: str
- r"""Unique identifier for the guardrail"""
-
- name: str
- r"""Name of the guardrail"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the guardrail was created"""
-
- description: OptionalNullable[str] = UNSET
- r"""Description of the guardrail"""
-
- limit_usd: OptionalNullable[float] = UNSET
- r"""Spending limit in USD"""
-
- reset_interval: Annotated[
- OptionalNullable[UpdateGuardrailResetIntervalResponse],
- PlainValidator(validate_open_enum(False)),
- ] = UNSET
- r"""Interval at which the limit resets (daily, weekly, monthly)"""
-
- allowed_providers: OptionalNullable[List[str]] = UNSET
- r"""List of allowed provider IDs"""
-
- ignored_providers: OptionalNullable[List[str]] = UNSET
- r"""List of provider IDs to exclude from routing"""
-
- allowed_models: OptionalNullable[List[str]] = UNSET
- r"""Array of model canonical_slugs (immutable identifiers)"""
-
- enforce_zdr: OptionalNullable[bool] = UNSET
- r"""Whether to enforce zero data retention"""
-
- updated_at: OptionalNullable[str] = UNSET
- r"""ISO 8601 timestamp of when the guardrail was last updated"""
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "updated_at",
- ]
- nullable_fields = [
- "description",
- "limit_usd",
- "reset_interval",
- "allowed_providers",
- "ignored_providers",
- "allowed_models",
- "enforce_zdr",
- "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
-
-
-class UpdateGuardrailResponseTypedDict(TypedDict):
- r"""Guardrail updated successfully"""
-
- data: UpdateGuardrailDataTypedDict
- r"""The updated guardrail"""
-
-
-class UpdateGuardrailResponse(BaseModel):
- r"""Guardrail updated successfully"""
-
- data: UpdateGuardrailData
- r"""The updated guardrail"""
diff --git a/src/openrouter/operations/updatekeys.py b/src/openrouter/operations/updatekeys.py
index c54d2e7..ba63239 100644
--- a/src/openrouter/operations/updatekeys.py
+++ b/src/openrouter/operations/updatekeys.py
@@ -82,26 +82,26 @@ r"""New limit reset type for the API key (daily, weekly, monthly, or null for no
class UpdateKeysRequestBodyTypedDict(TypedDict):
- name: NotRequired[str]
- r"""New name for the API key"""
disabled: NotRequired[bool]
r"""Whether to disable the API key"""
- limit: NotRequired[Nullable[float]]
+ include_byok_in_limit: NotRequired[bool]
+ r"""Whether to include BYOK usage in the limit"""
+ limit: NotRequired[float]
r"""New spending limit for the API key in USD"""
limit_reset: NotRequired[Nullable[UpdateKeysLimitReset]]
r"""New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday."""
- include_byok_in_limit: NotRequired[bool]
- r"""Whether to include BYOK usage in the limit"""
+ name: NotRequired[str]
+ r"""New name for the API key"""
class UpdateKeysRequestBody(BaseModel):
- name: Optional[str] = None
- r"""New name for the API key"""
-
disabled: Optional[bool] = None
r"""Whether to disable the API key"""
- limit: OptionalNullable[float] = UNSET
+ include_byok_in_limit: Optional[bool] = None
+ r"""Whether to include BYOK usage in the limit"""
+
+ limit: Optional[float] = None
r"""New spending limit for the API key in USD"""
limit_reset: Annotated[
@@ -110,19 +110,19 @@ class UpdateKeysRequestBody(BaseModel):
] = UNSET
r"""New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday."""
- include_byok_in_limit: Optional[bool] = None
- r"""Whether to include BYOK usage in the limit"""
+ name: Optional[str] = None
+ r"""New name for the API key"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
- "name",
"disabled",
+ "include_byok_in_limit",
"limit",
"limit_reset",
- "include_byok_in_limit",
+ "name",
]
- nullable_fields = ["limit", "limit_reset"]
+ nullable_fields = ["limit_reset"]
null_default_fields = []
serialized = handler(self)
@@ -212,44 +212,44 @@ class UpdateKeysRequest(BaseModel):
class UpdateKeysDataTypedDict(TypedDict):
r"""The updated API key information"""
- hash: str
- r"""Unique hash identifier for the API key"""
- name: str
- r"""Name of the API key"""
- label: str
- r"""Human-readable label for the API key"""
- disabled: bool
- r"""Whether the API key is disabled"""
- limit: Nullable[float]
- r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
- r"""Remaining spending limit in USD"""
- limit_reset: Nullable[str]
- r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
- usage: float
- r"""Total OpenRouter credit usage (in USD) for the API key"""
- usage_daily: float
- r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
- usage_monthly: float
- r"""OpenRouter credit usage (in USD) for the current UTC month"""
byok_usage: float
r"""Total external BYOK usage (in USD) for the API key"""
byok_usage_daily: float
r"""External BYOK usage (in USD) for the current UTC day"""
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
byok_usage_monthly: float
r"""External BYOK usage (in USD) for current UTC month"""
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
created_at: str
r"""ISO 8601 timestamp of when the API key was created"""
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
creator_user_id: Nullable[str]
r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ disabled: bool
+ r"""Whether the API key is disabled"""
+ hash: str
+ r"""Unique hash identifier for the API key"""
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+ label: str
+ r"""Human-readable label for the API key"""
+ limit: float
+ r"""Spending limit for the API key in USD"""
+ limit_remaining: float
+ r"""Remaining spending limit in USD"""
+ limit_reset: Nullable[str]
+ r"""Type of limit reset for the API key"""
+ name: str
+ r"""Name of the API key"""
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
+ usage: float
+ r"""Total OpenRouter credit usage (in USD) for the API key"""
+ usage_daily: float
+ r"""OpenRouter credit usage (in USD) for the current UTC day"""
+ usage_monthly: float
+ 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)"""
expires_at: NotRequired[Nullable[datetime]]
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -257,29 +257,50 @@ class UpdateKeysDataTypedDict(TypedDict):
class UpdateKeysData(BaseModel):
r"""The updated API key information"""
- hash: str
- r"""Unique hash identifier for the API key"""
+ byok_usage: float
+ r"""Total external BYOK usage (in USD) for the API key"""
- name: str
- r"""Name of the API key"""
+ byok_usage_daily: float
+ r"""External BYOK usage (in USD) for the current UTC day"""
- label: str
- r"""Human-readable label for the API key"""
+ byok_usage_monthly: float
+ r"""External BYOK usage (in USD) for current UTC month"""
+
+ byok_usage_weekly: float
+ r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
+
+ created_at: str
+ r"""ISO 8601 timestamp of when the API key was created"""
+
+ creator_user_id: Nullable[str]
+ r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
disabled: bool
r"""Whether the API key is disabled"""
- limit: Nullable[float]
+ hash: str
+ r"""Unique hash identifier for the API key"""
+
+ include_byok_in_limit: bool
+ r"""Whether to include external BYOK usage in the credit limit"""
+
+ label: str
+ r"""Human-readable label for the API key"""
+
+ limit: float
r"""Spending limit for the API key in USD"""
- limit_remaining: Nullable[float]
+ limit_remaining: float
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
r"""Type of limit reset for the API key"""
- include_byok_in_limit: bool
- r"""Whether to include external BYOK usage in the credit limit"""
+ name: str
+ r"""Name of the API key"""
+
+ updated_at: Nullable[str]
+ r"""ISO 8601 timestamp of when the API key was last updated"""
usage: float
r"""Total OpenRouter credit usage (in USD) for the API key"""
@@ -287,32 +308,11 @@ class UpdateKeysData(BaseModel):
usage_daily: float
r"""OpenRouter credit usage (in USD) for the current UTC day"""
- usage_weekly: float
- r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
-
usage_monthly: float
r"""OpenRouter credit usage (in USD) for the current UTC month"""
- byok_usage: float
- r"""Total external BYOK usage (in USD) for the API key"""
-
- byok_usage_daily: float
- r"""External BYOK usage (in USD) for the current UTC day"""
-
- byok_usage_weekly: float
- r"""External BYOK usage (in USD) for the current UTC week (Monday-Sunday)"""
-
- byok_usage_monthly: float
- r"""External BYOK usage (in USD) for current UTC month"""
-
- created_at: str
- r"""ISO 8601 timestamp of when the API key was created"""
-
- updated_at: Nullable[str]
- r"""ISO 8601 timestamp of when the API key was last updated"""
-
- creator_user_id: Nullable[str]
- r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID."""
+ usage_weekly: float
+ r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
expires_at: OptionalNullable[datetime] = UNSET
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
@@ -320,14 +320,7 @@ class UpdateKeysData(BaseModel):
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["expires_at"]
- nullable_fields = [
- "limit",
- "limit_remaining",
- "limit_reset",
- "updated_at",
- "expires_at",
- "creator_user_id",
- ]
+ nullable_fields = ["creator_user_id", "expires_at", "limit_reset", "updated_at"]
null_default_fields = []
serialized = handler(self)
diff --git a/src/openrouter/organization.py b/src/openrouter/organization.py
new file mode 100644
index 0000000..ad2e7f8
--- /dev/null
+++ b/src/openrouter/organization.py
@@ -0,0 +1,335 @@
+"""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 Organization(BaseSDK):
+ r"""Organization endpoints"""
+
+ def list_members(
+ 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.ListOrganizationMembersResponse]:
+ r"""List organization members
+
+ List all members of the organization associated with the authenticated management key. [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.ListOrganizationMembersRequest(
+ 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="/organization/members",
+ 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.ListOrganizationMembersGlobals(
+ 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="listOrganizationMembers",
+ 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,
+ )
+
+ def next_func() -> Optional[operations.ListOrganizationMembersResponse]:
+ 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_members(
+ 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.ListOrganizationMembersResponse(
+ result=unmarshal_json_response(
+ operations.ListOrganizationMembersResponseBody, 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, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = utils.stream_to_text(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ async def list_members_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.ListOrganizationMembersResponse]:
+ r"""List organization members
+
+ List all members of the organization associated with the authenticated management key. [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.ListOrganizationMembersRequest(
+ 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="/organization/members",
+ 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.ListOrganizationMembersGlobals(
+ 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="listOrganizationMembers",
+ 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,
+ )
+
+ def next_func() -> (
+ Awaitable[Optional[operations.ListOrganizationMembersResponse]]
+ ):
+ 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_members_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.ListOrganizationMembersResponse(
+ result=unmarshal_json_response(
+ operations.ListOrganizationMembersResponseBody, 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, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
diff --git a/src/openrouter/providers.py b/src/openrouter/providers.py
index 31e1e3a..1c94064 100644
--- a/src/openrouter/providers.py
+++ b/src/openrouter/providers.py
@@ -78,10 +78,14 @@ class Providers(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -185,10 +189,14 @@ class Providers(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/rerank.py b/src/openrouter/rerank.py
new file mode 100644
index 0000000..e8fdd1d
--- /dev/null
+++ b/src/openrouter/rerank.py
@@ -0,0 +1,437 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from enum import Enum
+from openrouter import components, errors, operations, utils
+from openrouter._hooks import HookContext
+from openrouter.types import OptionalNullable, UNSET
+from openrouter.utils import get_security_from_env
+from openrouter.utils.unmarshal_json_response import unmarshal_json_response
+from typing import Any, List, Mapping, Optional, Union
+
+
+class RerankAcceptEnum(str, Enum):
+ APPLICATION_JSON = "application/json"
+ TEXT_EVENT_STREAM = "text/event-stream"
+
+
+class Rerank(BaseSDK):
+ r"""Rerank endpoints"""
+
+ def rerank(
+ self,
+ *,
+ documents: List[str],
+ model: str,
+ query: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ top_n: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ accept_header_override: Optional[RerankAcceptEnum] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.CreateRerankResponse:
+ r"""Submit a rerank request
+
+ Submits a rerank request to the rerank router
+
+ :param documents: The list of documents to rerank
+ :param model: The rerank model to use
+ :param query: The search query to rerank documents against
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ 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:
+ :param top_n: Number of most relevant documents to return
+ :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 accept_header_override: Override the default accept header for this method
+ :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.CreateRerankRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ request_body=operations.CreateRerankRequestBody(
+ documents=documents,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ query=query,
+ top_n=top_n,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/rerank",
+ 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=accept_header_override.value
+ if accept_header_override is not None
+ else "application/json;q=1, text/event-stream;q=0",
+ http_headers=http_headers,
+ _globals=operations.CreateRerankGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ operations.CreateRerankRequestBody,
+ ),
+ 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="createRerank",
+ 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(
+ operations.CreateRerankResponseBody, http_res
+ )
+ if utils.match_response(http_res, "200", "text/event-stream"):
+ return http_res.text
+ 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 rerank_async(
+ self,
+ *,
+ documents: List[str],
+ model: str,
+ query: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ provider: OptionalNullable[
+ Union[
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
+ ]
+ ] = UNSET,
+ top_n: Optional[int] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ accept_header_override: Optional[RerankAcceptEnum] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> operations.CreateRerankResponse:
+ r"""Submit a rerank request
+
+ Submits a rerank request to the rerank router
+
+ :param documents: The list of documents to rerank
+ :param model: The rerank model to use
+ :param query: The search query to rerank documents against
+ :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ 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:
+ :param top_n: Number of most relevant documents to return
+ :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 accept_header_override: Override the default accept header for this method
+ :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.CreateRerankRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ request_body=operations.CreateRerankRequestBody(
+ documents=documents,
+ model=model,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ query=query,
+ top_n=top_n,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/rerank",
+ 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=accept_header_override.value
+ if accept_header_override is not None
+ else "application/json;q=1, text/event-stream;q=0",
+ http_headers=http_headers,
+ _globals=operations.CreateRerankGlobals(
+ http_referer=self.sdk_configuration.globals.http_referer,
+ x_open_router_title=self.sdk_configuration.globals.x_open_router_title,
+ x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories,
+ ),
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ operations.CreateRerankRequestBody,
+ ),
+ 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="createRerank",
+ 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(
+ operations.CreateRerankResponseBody, http_res
+ )
+ if utils.match_response(http_res, "200", "text/event-stream"):
+ return http_res.text
+ 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/responses.py b/src/openrouter/responses.py
index fbc9fac..887a3ab 100644
--- a/src/openrouter/responses.py
+++ b/src/openrouter/responses.py
@@ -25,48 +25,33 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- input: Optional[
- Union[components.InputsUnion, components.InputsUnionTypedDict]
- ] = None,
- instructions: OptionalNullable[str] = UNSET,
- metadata: OptionalNullable[Dict[str, str]] = UNSET,
- tools: Optional[
- Union[
- List[components.ResponsesRequestToolUnion],
- List[components.ResponsesRequestToolUnionTypedDict],
- ]
- ] = None,
- tool_choice: Optional[
- Union[
- components.OpenAIResponsesToolChoiceUnion,
- components.OpenAIResponsesToolChoiceUnionTypedDict,
- ]
- ] = None,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- text: Optional[
- Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
- ] = None,
- reasoning: OptionalNullable[
- Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
- ] = UNSET,
- max_output_tokens: OptionalNullable[float] = UNSET,
- temperature: OptionalNullable[float] = UNSET,
- top_p: OptionalNullable[float] = UNSET,
- top_logprobs: OptionalNullable[int] = UNSET,
- max_tool_calls: OptionalNullable[int] = UNSET,
- presence_penalty: OptionalNullable[float] = UNSET,
- frequency_penalty: OptionalNullable[float] = UNSET,
- top_k: Optional[float] = None,
+ background: OptionalNullable[bool] = UNSET,
+ frequency_penalty: Optional[float] = None,
image_config: Optional[
Union[
Dict[str, components.ResponsesRequestImageConfig],
Dict[str, components.ResponsesRequestImageConfigTypedDict],
]
] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: Optional[int] = None,
+ max_tool_calls: Optional[int] = None,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
modalities: Optional[List[components.OutputModalityEnum]] = None,
- prompt_cache_key: OptionalNullable[str] = UNSET,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
previous_response_id: OptionalNullable[str] = UNSET,
prompt: OptionalNullable[
Union[
@@ -74,32 +59,43 @@ class Responses(BaseSDK):
components.StoredPromptTemplateTypedDict,
]
] = UNSET,
- include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
- background: OptionalNullable[bool] = UNSET,
- safety_identifier: OptionalNullable[str] = UNSET,
- service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
- truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
- stream: Union[Literal[False], None] = None,
+ prompt_cache_key: OptionalNullable[str] = UNSET,
provider: OptionalNullable[
Union[
- components.ResponsesRequestProvider,
- components.ResponsesRequestProviderTypedDict,
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
] = UNSET,
- plugins: Optional[
- Union[
- List[components.ResponsesRequestPluginUnion],
- List[components.ResponsesRequestPluginUnionTypedDict],
- ]
- ] = None,
- user: Optional[str] = None,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
- trace: Optional[
+ stream: Union[Literal[False], None] = None,
+ temperature: Optional[float] = None,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
Union[
- components.ResponsesRequestTrace,
- components.ResponsesRequestTraceTypedDict,
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
]
] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -116,40 +112,40 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param background:
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ :param include:
:param input: Input for a response request - can be a string or array of items
:param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
:param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
- :param tools:
- :param tool_choice:
- :param parallel_tool_calls:
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
:param model:
:param models:
- :param text: Text output configuration including format and verbosity
- :param reasoning: Configuration for reasoning mode in the response
- :param max_output_tokens:
- :param temperature:
- :param top_p:
- :param top_logprobs:
- :param max_tool_calls:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty:
- :param frequency_penalty:
- :param top_k:
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
- :param prompt_cache_key:
:param previous_response_id:
:param prompt:
- :param include:
- :param background:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param truncation:
- :param stream:
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -164,48 +160,33 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- input: Optional[
- Union[components.InputsUnion, components.InputsUnionTypedDict]
- ] = None,
- instructions: OptionalNullable[str] = UNSET,
- metadata: OptionalNullable[Dict[str, str]] = UNSET,
- tools: Optional[
- Union[
- List[components.ResponsesRequestToolUnion],
- List[components.ResponsesRequestToolUnionTypedDict],
- ]
- ] = None,
- tool_choice: Optional[
- Union[
- components.OpenAIResponsesToolChoiceUnion,
- components.OpenAIResponsesToolChoiceUnionTypedDict,
- ]
- ] = None,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- text: Optional[
- Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
- ] = None,
- reasoning: OptionalNullable[
- Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
- ] = UNSET,
- max_output_tokens: OptionalNullable[float] = UNSET,
- temperature: OptionalNullable[float] = UNSET,
- top_p: OptionalNullable[float] = UNSET,
- top_logprobs: OptionalNullable[int] = UNSET,
- max_tool_calls: OptionalNullable[int] = UNSET,
- presence_penalty: OptionalNullable[float] = UNSET,
- frequency_penalty: OptionalNullable[float] = UNSET,
- top_k: Optional[float] = None,
+ background: OptionalNullable[bool] = UNSET,
+ frequency_penalty: Optional[float] = None,
image_config: Optional[
Union[
Dict[str, components.ResponsesRequestImageConfig],
Dict[str, components.ResponsesRequestImageConfigTypedDict],
]
] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: Optional[int] = None,
+ max_tool_calls: Optional[int] = None,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
modalities: Optional[List[components.OutputModalityEnum]] = None,
- prompt_cache_key: OptionalNullable[str] = UNSET,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
previous_response_id: OptionalNullable[str] = UNSET,
prompt: OptionalNullable[
Union[
@@ -213,32 +194,43 @@ class Responses(BaseSDK):
components.StoredPromptTemplateTypedDict,
]
] = UNSET,
- include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
- background: OptionalNullable[bool] = UNSET,
- safety_identifier: OptionalNullable[str] = UNSET,
- service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
- truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
- stream: Literal[True],
+ prompt_cache_key: OptionalNullable[str] = UNSET,
provider: OptionalNullable[
Union[
- components.ResponsesRequestProvider,
- components.ResponsesRequestProviderTypedDict,
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
] = UNSET,
- plugins: Optional[
- Union[
- List[components.ResponsesRequestPluginUnion],
- List[components.ResponsesRequestPluginUnionTypedDict],
- ]
- ] = None,
- user: Optional[str] = None,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
- trace: Optional[
+ stream: Literal[True],
+ temperature: Optional[float] = None,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
Union[
- components.ResponsesRequestTrace,
- components.ResponsesRequestTraceTypedDict,
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
]
] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -255,40 +247,40 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param background:
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ :param include:
:param input: Input for a response request - can be a string or array of items
:param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
:param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
- :param tools:
- :param tool_choice:
- :param parallel_tool_calls:
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
:param model:
:param models:
- :param text: Text output configuration including format and verbosity
- :param reasoning: Configuration for reasoning mode in the response
- :param max_output_tokens:
- :param temperature:
- :param top_p:
- :param top_logprobs:
- :param max_tool_calls:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty:
- :param frequency_penalty:
- :param top_k:
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
- :param prompt_cache_key:
:param previous_response_id:
:param prompt:
- :param include:
- :param background:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param truncation:
- :param stream:
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -302,48 +294,33 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- input: Optional[
- Union[components.InputsUnion, components.InputsUnionTypedDict]
- ] = None,
- instructions: OptionalNullable[str] = UNSET,
- metadata: OptionalNullable[Dict[str, str]] = UNSET,
- tools: Optional[
- Union[
- List[components.ResponsesRequestToolUnion],
- List[components.ResponsesRequestToolUnionTypedDict],
- ]
- ] = None,
- tool_choice: Optional[
- Union[
- components.OpenAIResponsesToolChoiceUnion,
- components.OpenAIResponsesToolChoiceUnionTypedDict,
- ]
- ] = None,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- text: Optional[
- Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
- ] = None,
- reasoning: OptionalNullable[
- Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
- ] = UNSET,
- max_output_tokens: OptionalNullable[float] = UNSET,
- temperature: OptionalNullable[float] = UNSET,
- top_p: OptionalNullable[float] = UNSET,
- top_logprobs: OptionalNullable[int] = UNSET,
- max_tool_calls: OptionalNullable[int] = UNSET,
- presence_penalty: OptionalNullable[float] = UNSET,
- frequency_penalty: OptionalNullable[float] = UNSET,
- top_k: Optional[float] = None,
+ background: OptionalNullable[bool] = UNSET,
+ frequency_penalty: Optional[float] = None,
image_config: Optional[
Union[
Dict[str, components.ResponsesRequestImageConfig],
Dict[str, components.ResponsesRequestImageConfigTypedDict],
]
] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: Optional[int] = None,
+ max_tool_calls: Optional[int] = None,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
modalities: Optional[List[components.OutputModalityEnum]] = None,
- prompt_cache_key: OptionalNullable[str] = UNSET,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
previous_response_id: OptionalNullable[str] = UNSET,
prompt: OptionalNullable[
Union[
@@ -351,32 +328,43 @@ class Responses(BaseSDK):
components.StoredPromptTemplateTypedDict,
]
] = UNSET,
- include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
- background: OptionalNullable[bool] = UNSET,
- safety_identifier: OptionalNullable[str] = UNSET,
- service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
- truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
- stream: Optional[bool] = False,
+ prompt_cache_key: OptionalNullable[str] = UNSET,
provider: OptionalNullable[
Union[
- components.ResponsesRequestProvider,
- components.ResponsesRequestProviderTypedDict,
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
] = UNSET,
- plugins: Optional[
- Union[
- List[components.ResponsesRequestPluginUnion],
- List[components.ResponsesRequestPluginUnionTypedDict],
- ]
- ] = None,
- user: Optional[str] = None,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
- trace: Optional[
+ stream: Optional[bool] = False,
+ temperature: Optional[float] = None,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
Union[
- components.ResponsesRequestTrace,
- components.ResponsesRequestTraceTypedDict,
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
]
] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -393,40 +381,40 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param background:
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ :param include:
:param input: Input for a response request - can be a string or array of items
:param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
:param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
- :param tools:
- :param tool_choice:
- :param parallel_tool_calls:
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
:param model:
:param models:
- :param text: Text output configuration including format and verbosity
- :param reasoning: Configuration for reasoning mode in the response
- :param max_output_tokens:
- :param temperature:
- :param top_p:
- :param top_logprobs:
- :param max_tool_calls:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty:
- :param frequency_penalty:
- :param top_k:
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
- :param prompt_cache_key:
:param previous_response_id:
:param prompt:
- :param include:
- :param background:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param truncation:
- :param stream:
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -448,56 +436,54 @@ class Responses(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
responses_request=components.ResponsesRequest(
+ background=background,
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ include=include,
input=utils.get_pydantic_model(input, Optional[components.InputsUnion]),
instructions=instructions,
+ max_output_tokens=max_output_tokens,
+ max_tool_calls=max_tool_calls,
metadata=metadata,
- tools=utils.get_pydantic_model(
- tools, Optional[List[components.ResponsesRequestToolUnion]]
- ),
- tool_choice=utils.get_pydantic_model(
- tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion]
- ),
- parallel_tool_calls=parallel_tool_calls,
+ modalities=modalities,
model=model,
models=models,
- text=utils.get_pydantic_model(
- text, Optional[components.TextExtendedConfig]
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ResponsesRequestPlugin]]
),
- reasoning=utils.get_pydantic_model(
- reasoning, OptionalNullable[components.ReasoningConfig]
- ),
- max_output_tokens=max_output_tokens,
- temperature=temperature,
- top_p=top_p,
- top_logprobs=top_logprobs,
- max_tool_calls=max_tool_calls,
presence_penalty=presence_penalty,
- frequency_penalty=frequency_penalty,
- top_k=top_k,
- image_config=image_config,
- modalities=modalities,
- prompt_cache_key=prompt_cache_key,
previous_response_id=previous_response_id,
prompt=utils.get_pydantic_model(
prompt, OptionalNullable[components.StoredPromptTemplate]
),
- include=include,
- background=background,
+ prompt_cache_key=prompt_cache_key,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ reasoning=utils.get_pydantic_model(
+ reasoning, OptionalNullable[components.ReasoningConfig]
+ ),
safety_identifier=safety_identifier,
service_tier=service_tier,
- truncation=truncation,
- stream=stream,
- provider=utils.get_pydantic_model(
- provider, OptionalNullable[components.ResponsesRequestProvider]
- ),
- plugins=utils.get_pydantic_model(
- plugins, Optional[List[components.ResponsesRequestPluginUnion]]
- ),
- user=user,
session_id=session_id,
- trace=utils.get_pydantic_model(
- trace, Optional[components.ResponsesRequestTrace]
+ stream=stream,
+ temperature=temperature,
+ text=utils.get_pydantic_model(
+ text, Optional[components.TextExtendedConfig]
),
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.ResponsesRequestToolUnion]]
+ ),
+ top_k=top_k,
+ top_logprobs=top_logprobs,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ truncation=truncation,
+ user=user,
),
)
@@ -533,10 +519,14 @@ class Responses(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = self.do_request(
hook_ctx=HookContext(
@@ -706,48 +696,33 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- input: Optional[
- Union[components.InputsUnion, components.InputsUnionTypedDict]
- ] = None,
- instructions: OptionalNullable[str] = UNSET,
- metadata: OptionalNullable[Dict[str, str]] = UNSET,
- tools: Optional[
- Union[
- List[components.ResponsesRequestToolUnion],
- List[components.ResponsesRequestToolUnionTypedDict],
- ]
- ] = None,
- tool_choice: Optional[
- Union[
- components.OpenAIResponsesToolChoiceUnion,
- components.OpenAIResponsesToolChoiceUnionTypedDict,
- ]
- ] = None,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- text: Optional[
- Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
- ] = None,
- reasoning: OptionalNullable[
- Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
- ] = UNSET,
- max_output_tokens: OptionalNullable[float] = UNSET,
- temperature: OptionalNullable[float] = UNSET,
- top_p: OptionalNullable[float] = UNSET,
- top_logprobs: OptionalNullable[int] = UNSET,
- max_tool_calls: OptionalNullable[int] = UNSET,
- presence_penalty: OptionalNullable[float] = UNSET,
- frequency_penalty: OptionalNullable[float] = UNSET,
- top_k: Optional[float] = None,
+ background: OptionalNullable[bool] = UNSET,
+ frequency_penalty: Optional[float] = None,
image_config: Optional[
Union[
Dict[str, components.ResponsesRequestImageConfig],
Dict[str, components.ResponsesRequestImageConfigTypedDict],
]
] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: Optional[int] = None,
+ max_tool_calls: Optional[int] = None,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
modalities: Optional[List[components.OutputModalityEnum]] = None,
- prompt_cache_key: OptionalNullable[str] = UNSET,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
previous_response_id: OptionalNullable[str] = UNSET,
prompt: OptionalNullable[
Union[
@@ -755,32 +730,43 @@ class Responses(BaseSDK):
components.StoredPromptTemplateTypedDict,
]
] = UNSET,
- include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
- background: OptionalNullable[bool] = UNSET,
- safety_identifier: OptionalNullable[str] = UNSET,
- service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
- truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
- stream: Union[Literal[False], None] = None,
+ prompt_cache_key: OptionalNullable[str] = UNSET,
provider: OptionalNullable[
Union[
- components.ResponsesRequestProvider,
- components.ResponsesRequestProviderTypedDict,
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
] = UNSET,
- plugins: Optional[
- Union[
- List[components.ResponsesRequestPluginUnion],
- List[components.ResponsesRequestPluginUnionTypedDict],
- ]
- ] = None,
- user: Optional[str] = None,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
- trace: Optional[
+ stream: Union[Literal[False], None] = None,
+ temperature: Optional[float] = None,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
Union[
- components.ResponsesRequestTrace,
- components.ResponsesRequestTraceTypedDict,
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
]
] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -797,40 +783,40 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param background:
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ :param include:
:param input: Input for a response request - can be a string or array of items
:param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
:param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
- :param tools:
- :param tool_choice:
- :param parallel_tool_calls:
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
:param model:
:param models:
- :param text: Text output configuration including format and verbosity
- :param reasoning: Configuration for reasoning mode in the response
- :param max_output_tokens:
- :param temperature:
- :param top_p:
- :param top_logprobs:
- :param max_tool_calls:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty:
- :param frequency_penalty:
- :param top_k:
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
- :param prompt_cache_key:
:param previous_response_id:
:param prompt:
- :param include:
- :param background:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param truncation:
- :param stream:
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -845,48 +831,33 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- input: Optional[
- Union[components.InputsUnion, components.InputsUnionTypedDict]
- ] = None,
- instructions: OptionalNullable[str] = UNSET,
- metadata: OptionalNullable[Dict[str, str]] = UNSET,
- tools: Optional[
- Union[
- List[components.ResponsesRequestToolUnion],
- List[components.ResponsesRequestToolUnionTypedDict],
- ]
- ] = None,
- tool_choice: Optional[
- Union[
- components.OpenAIResponsesToolChoiceUnion,
- components.OpenAIResponsesToolChoiceUnionTypedDict,
- ]
- ] = None,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- text: Optional[
- Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
- ] = None,
- reasoning: OptionalNullable[
- Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
- ] = UNSET,
- max_output_tokens: OptionalNullable[float] = UNSET,
- temperature: OptionalNullable[float] = UNSET,
- top_p: OptionalNullable[float] = UNSET,
- top_logprobs: OptionalNullable[int] = UNSET,
- max_tool_calls: OptionalNullable[int] = UNSET,
- presence_penalty: OptionalNullable[float] = UNSET,
- frequency_penalty: OptionalNullable[float] = UNSET,
- top_k: Optional[float] = None,
+ background: OptionalNullable[bool] = UNSET,
+ frequency_penalty: Optional[float] = None,
image_config: Optional[
Union[
Dict[str, components.ResponsesRequestImageConfig],
Dict[str, components.ResponsesRequestImageConfigTypedDict],
]
] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: Optional[int] = None,
+ max_tool_calls: Optional[int] = None,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
modalities: Optional[List[components.OutputModalityEnum]] = None,
- prompt_cache_key: OptionalNullable[str] = UNSET,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
previous_response_id: OptionalNullable[str] = UNSET,
prompt: OptionalNullable[
Union[
@@ -894,32 +865,43 @@ class Responses(BaseSDK):
components.StoredPromptTemplateTypedDict,
]
] = UNSET,
- include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
- background: OptionalNullable[bool] = UNSET,
- safety_identifier: OptionalNullable[str] = UNSET,
- service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
- truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
- stream: Literal[True],
+ prompt_cache_key: OptionalNullable[str] = UNSET,
provider: OptionalNullable[
Union[
- components.ResponsesRequestProvider,
- components.ResponsesRequestProviderTypedDict,
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
] = UNSET,
- plugins: Optional[
- Union[
- List[components.ResponsesRequestPluginUnion],
- List[components.ResponsesRequestPluginUnionTypedDict],
- ]
- ] = None,
- user: Optional[str] = None,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
- trace: Optional[
+ stream: Literal[True],
+ temperature: Optional[float] = None,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
Union[
- components.ResponsesRequestTrace,
- components.ResponsesRequestTraceTypedDict,
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
]
] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -936,40 +918,40 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param background:
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ :param include:
:param input: Input for a response request - can be a string or array of items
:param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
:param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
- :param tools:
- :param tool_choice:
- :param parallel_tool_calls:
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
:param model:
:param models:
- :param text: Text output configuration including format and verbosity
- :param reasoning: Configuration for reasoning mode in the response
- :param max_output_tokens:
- :param temperature:
- :param top_p:
- :param top_logprobs:
- :param max_tool_calls:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty:
- :param frequency_penalty:
- :param top_k:
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
- :param prompt_cache_key:
:param previous_response_id:
:param prompt:
- :param include:
- :param background:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param truncation:
- :param stream:
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -983,48 +965,33 @@ class Responses(BaseSDK):
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
- input: Optional[
- Union[components.InputsUnion, components.InputsUnionTypedDict]
- ] = None,
- instructions: OptionalNullable[str] = UNSET,
- metadata: OptionalNullable[Dict[str, str]] = UNSET,
- tools: Optional[
- Union[
- List[components.ResponsesRequestToolUnion],
- List[components.ResponsesRequestToolUnionTypedDict],
- ]
- ] = None,
- tool_choice: Optional[
- Union[
- components.OpenAIResponsesToolChoiceUnion,
- components.OpenAIResponsesToolChoiceUnionTypedDict,
- ]
- ] = None,
- parallel_tool_calls: OptionalNullable[bool] = UNSET,
- model: Optional[str] = None,
- models: Optional[List[str]] = None,
- text: Optional[
- Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
- ] = None,
- reasoning: OptionalNullable[
- Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
- ] = UNSET,
- max_output_tokens: OptionalNullable[float] = UNSET,
- temperature: OptionalNullable[float] = UNSET,
- top_p: OptionalNullable[float] = UNSET,
- top_logprobs: OptionalNullable[int] = UNSET,
- max_tool_calls: OptionalNullable[int] = UNSET,
- presence_penalty: OptionalNullable[float] = UNSET,
- frequency_penalty: OptionalNullable[float] = UNSET,
- top_k: Optional[float] = None,
+ background: OptionalNullable[bool] = UNSET,
+ frequency_penalty: Optional[float] = None,
image_config: Optional[
Union[
Dict[str, components.ResponsesRequestImageConfig],
Dict[str, components.ResponsesRequestImageConfigTypedDict],
]
] = None,
+ include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
+ input: Optional[
+ Union[components.InputsUnion, components.InputsUnionTypedDict]
+ ] = None,
+ instructions: OptionalNullable[str] = UNSET,
+ max_output_tokens: Optional[int] = None,
+ max_tool_calls: Optional[int] = None,
+ metadata: OptionalNullable[Dict[str, str]] = UNSET,
modalities: Optional[List[components.OutputModalityEnum]] = None,
- prompt_cache_key: OptionalNullable[str] = UNSET,
+ model: Optional[str] = None,
+ models: Optional[List[str]] = None,
+ parallel_tool_calls: OptionalNullable[bool] = UNSET,
+ plugins: Optional[
+ Union[
+ List[components.ResponsesRequestPlugin],
+ List[components.ResponsesRequestPluginTypedDict],
+ ]
+ ] = None,
+ presence_penalty: Optional[float] = None,
previous_response_id: OptionalNullable[str] = UNSET,
prompt: OptionalNullable[
Union[
@@ -1032,32 +999,43 @@ class Responses(BaseSDK):
components.StoredPromptTemplateTypedDict,
]
] = UNSET,
- include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET,
- background: OptionalNullable[bool] = UNSET,
- safety_identifier: OptionalNullable[str] = UNSET,
- service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
- truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
- stream: Optional[bool] = False,
+ prompt_cache_key: OptionalNullable[str] = UNSET,
provider: OptionalNullable[
Union[
- components.ResponsesRequestProvider,
- components.ResponsesRequestProviderTypedDict,
+ components.ProviderPreferences, components.ProviderPreferencesTypedDict
]
] = UNSET,
- plugins: Optional[
- Union[
- List[components.ResponsesRequestPluginUnion],
- List[components.ResponsesRequestPluginUnionTypedDict],
- ]
- ] = None,
- user: Optional[str] = None,
+ reasoning: OptionalNullable[
+ Union[components.ReasoningConfig, components.ReasoningConfigTypedDict]
+ ] = UNSET,
+ safety_identifier: OptionalNullable[str] = UNSET,
+ service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto",
session_id: Optional[str] = None,
- trace: Optional[
+ stream: Optional[bool] = False,
+ temperature: Optional[float] = None,
+ text: Optional[
+ Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict]
+ ] = None,
+ tool_choice: Optional[
Union[
- components.ResponsesRequestTrace,
- components.ResponsesRequestTraceTypedDict,
+ components.OpenAIResponsesToolChoiceUnion,
+ components.OpenAIResponsesToolChoiceUnionTypedDict,
]
] = None,
+ tools: Optional[
+ Union[
+ List[components.ResponsesRequestToolUnion],
+ List[components.ResponsesRequestToolUnionTypedDict],
+ ]
+ ] = None,
+ top_k: Optional[int] = None,
+ top_logprobs: Optional[int] = None,
+ top_p: Optional[float] = None,
+ trace: Optional[
+ Union[components.TraceConfig, components.TraceConfigTypedDict]
+ ] = None,
+ truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET,
+ user: Optional[str] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -1074,40 +1052,40 @@ class Responses(BaseSDK):
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param background:
+ :param frequency_penalty:
+ :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
+ :param include:
:param input: Input for a response request - can be a string or array of items
:param instructions:
+ :param max_output_tokens:
+ :param max_tool_calls:
:param metadata: Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
- :param tools:
- :param tool_choice:
- :param parallel_tool_calls:
+ :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
:param model:
:param models:
- :param text: Text output configuration including format and verbosity
- :param reasoning: Configuration for reasoning mode in the response
- :param max_output_tokens:
- :param temperature:
- :param top_p:
- :param top_logprobs:
- :param max_tool_calls:
+ :param parallel_tool_calls:
+ :param plugins: Plugins you want to enable for this request, including their settings.
:param presence_penalty:
- :param frequency_penalty:
- :param top_k:
- :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
- :param prompt_cache_key:
:param previous_response_id:
:param prompt:
- :param include:
- :param background:
+ :param prompt_cache_key:
+ :param provider: When multiple model providers are available, optionally indicate your routing preference.
+ :param reasoning: Configuration for reasoning mode in the response
:param safety_identifier:
:param service_tier:
- :param truncation:
- :param stream:
- :param provider: When multiple model providers are available, optionally indicate your routing preference.
- :param plugins: Plugins you want to enable for this request, including their settings.
- :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
+ :param stream:
+ :param temperature:
+ :param text: Text output configuration including format and verbosity
+ :param tool_choice:
+ :param tools:
+ :param top_k:
+ :param top_logprobs:
+ :param top_p:
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
+ :param truncation:
+ :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1129,56 +1107,54 @@ class Responses(BaseSDK):
x_open_router_title=x_open_router_title,
x_open_router_categories=x_open_router_categories,
responses_request=components.ResponsesRequest(
+ background=background,
+ frequency_penalty=frequency_penalty,
+ image_config=image_config,
+ include=include,
input=utils.get_pydantic_model(input, Optional[components.InputsUnion]),
instructions=instructions,
+ max_output_tokens=max_output_tokens,
+ max_tool_calls=max_tool_calls,
metadata=metadata,
- tools=utils.get_pydantic_model(
- tools, Optional[List[components.ResponsesRequestToolUnion]]
- ),
- tool_choice=utils.get_pydantic_model(
- tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion]
- ),
- parallel_tool_calls=parallel_tool_calls,
+ modalities=modalities,
model=model,
models=models,
- text=utils.get_pydantic_model(
- text, Optional[components.TextExtendedConfig]
+ parallel_tool_calls=parallel_tool_calls,
+ plugins=utils.get_pydantic_model(
+ plugins, Optional[List[components.ResponsesRequestPlugin]]
),
- reasoning=utils.get_pydantic_model(
- reasoning, OptionalNullable[components.ReasoningConfig]
- ),
- max_output_tokens=max_output_tokens,
- temperature=temperature,
- top_p=top_p,
- top_logprobs=top_logprobs,
- max_tool_calls=max_tool_calls,
presence_penalty=presence_penalty,
- frequency_penalty=frequency_penalty,
- top_k=top_k,
- image_config=image_config,
- modalities=modalities,
- prompt_cache_key=prompt_cache_key,
previous_response_id=previous_response_id,
prompt=utils.get_pydantic_model(
prompt, OptionalNullable[components.StoredPromptTemplate]
),
- include=include,
- background=background,
+ prompt_cache_key=prompt_cache_key,
+ provider=utils.get_pydantic_model(
+ provider, OptionalNullable[components.ProviderPreferences]
+ ),
+ reasoning=utils.get_pydantic_model(
+ reasoning, OptionalNullable[components.ReasoningConfig]
+ ),
safety_identifier=safety_identifier,
service_tier=service_tier,
- truncation=truncation,
- stream=stream,
- provider=utils.get_pydantic_model(
- provider, OptionalNullable[components.ResponsesRequestProvider]
- ),
- plugins=utils.get_pydantic_model(
- plugins, Optional[List[components.ResponsesRequestPluginUnion]]
- ),
- user=user,
session_id=session_id,
- trace=utils.get_pydantic_model(
- trace, Optional[components.ResponsesRequestTrace]
+ stream=stream,
+ temperature=temperature,
+ text=utils.get_pydantic_model(
+ text, Optional[components.TextExtendedConfig]
),
+ tool_choice=utils.get_pydantic_model(
+ tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion]
+ ),
+ tools=utils.get_pydantic_model(
+ tools, Optional[List[components.ResponsesRequestToolUnion]]
+ ),
+ top_k=top_k,
+ top_logprobs=top_logprobs,
+ top_p=top_p,
+ trace=utils.get_pydantic_model(trace, Optional[components.TraceConfig]),
+ truncation=truncation,
+ user=user,
),
)
@@ -1214,10 +1190,14 @@ class Responses(BaseSDK):
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, ["429", "500", "502", "503", "504"])
+ retry_config = (retries, ["5XX"])
http_res = await self.do_request_async(
hook_ctx=HookContext(
diff --git a/src/openrouter/sdk.py b/src/openrouter/sdk.py
index 5796a31..43d1636 100644
--- a/src/openrouter/sdk.py
+++ b/src/openrouter/sdk.py
@@ -27,7 +27,10 @@ if TYPE_CHECKING:
from openrouter.guardrails import Guardrails
from openrouter.models_ import Models
from openrouter.oauth import OAuth
+ from openrouter.organization import Organization
from openrouter.providers import Providers
+ from openrouter.rerank import Rerank
+ from openrouter.video_generation import VideoGeneration
class OpenRouter(BaseSDK):
@@ -35,41 +38,50 @@ class OpenRouter(BaseSDK):
https://openrouter.ai/docs - OpenRouter Documentation
"""
- beta: "Beta"
analytics: "Analytics"
r"""Analytics and usage endpoints"""
+ o_auth: "OAuth"
+ r"""OAuth authentication endpoints"""
chat: "Chat"
credits: "Credits"
r"""Credit management endpoints"""
embeddings: "Embeddings"
r"""Text embedding endpoints"""
- generations: "Generations"
- r"""Generation history endpoints"""
- models: "Models"
- r"""Model information endpoints"""
endpoints: "Endpoints"
r"""Endpoint information"""
- providers: "Providers"
- r"""Provider information endpoints"""
- api_keys: "APIKeys"
- r"""API key management endpoints"""
+ generations: "Generations"
+ r"""Generation history endpoints"""
guardrails: "Guardrails"
r"""Guardrails endpoints"""
- o_auth: "OAuth"
- r"""OAuth authentication endpoints"""
+ api_keys: "APIKeys"
+ r"""API key management endpoints"""
+ models: "Models"
+ r"""Model information endpoints"""
+ organization: "Organization"
+ r"""Organization endpoints"""
+ providers: "Providers"
+ r"""Provider information endpoints"""
+ rerank: "Rerank"
+ r"""Rerank endpoints"""
+ beta: "Beta"
+ video_generation: "VideoGeneration"
+ r"""Video Generation endpoints"""
_sub_sdk_map = {
- "beta": ("openrouter.beta", "Beta"),
"analytics": ("openrouter.analytics", "Analytics"),
+ "o_auth": ("openrouter.oauth", "OAuth"),
"chat": ("openrouter.chat", "Chat"),
"credits": ("openrouter.credits", "Credits"),
"embeddings": ("openrouter.embeddings", "Embeddings"),
- "generations": ("openrouter.generations", "Generations"),
- "models": ("openrouter.models_", "Models"),
"endpoints": ("openrouter.endpoints", "Endpoints"),
- "providers": ("openrouter.providers", "Providers"),
- "api_keys": ("openrouter.api_keys", "APIKeys"),
+ "generations": ("openrouter.generations", "Generations"),
"guardrails": ("openrouter.guardrails", "Guardrails"),
- "o_auth": ("openrouter.oauth", "OAuth"),
+ "api_keys": ("openrouter.api_keys", "APIKeys"),
+ "models": ("openrouter.models_", "Models"),
+ "organization": ("openrouter.organization", "Organization"),
+ "providers": ("openrouter.providers", "Providers"),
+ "rerank": ("openrouter.rerank", "Rerank"),
+ "beta": ("openrouter.beta", "Beta"),
+ "video_generation": ("openrouter.video_generation", "VideoGeneration"),
}
def __init__(
diff --git a/src/openrouter/video_generation.py b/src/openrouter/video_generation.py
new file mode 100644
index 0000000..238bbcc
--- /dev/null
+++ b/src/openrouter/video_generation.py
@@ -0,0 +1,1196 @@
+"""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, List, Mapping, Optional, Union
+
+
+class VideoGeneration(BaseSDK):
+ r"""Video Generation endpoints"""
+
+ def generate(
+ self,
+ *,
+ model: str,
+ prompt: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ aspect_ratio: Optional[components.AspectRatio] = None,
+ duration: Optional[int] = None,
+ frame_images: Optional[
+ Union[List[components.FrameImage], List[components.FrameImageTypedDict]]
+ ] = None,
+ generate_audio: Optional[bool] = None,
+ input_references: Optional[
+ Union[
+ List[components.ContentPartImage],
+ List[components.ContentPartImageTypedDict],
+ ]
+ ] = None,
+ provider: Optional[
+ Union[components.Provider, components.ProviderTypedDict]
+ ] = None,
+ resolution: Optional[components.Resolution] = None,
+ seed: Optional[int] = None,
+ size: 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.VideoGenerationResponse:
+ r"""Submit a video generation request
+
+ Submits a video generation request and returns a polling URL to check status
+
+ :param model:
+ :param prompt:
+ :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 aspect_ratio: Aspect ratio of the generated video
+ :param duration: Duration of the generated video in seconds
+ :param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
+ :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
+ :param input_references: Reference images to guide video generation
+ :param provider: Provider-specific passthrough configuration
+ :param resolution: Resolution of the generated video
+ :param seed: If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
+ :param size: Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio.
+ :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.CreateVideosRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ video_generation_request=components.VideoGenerationRequest(
+ aspect_ratio=aspect_ratio,
+ duration=duration,
+ frame_images=utils.get_pydantic_model(
+ frame_images, Optional[List[components.FrameImage]]
+ ),
+ generate_audio=generate_audio,
+ input_references=utils.get_pydantic_model(
+ input_references, Optional[List[components.ContentPartImage]]
+ ),
+ model=model,
+ prompt=prompt,
+ provider=utils.get_pydantic_model(
+ provider, Optional[components.Provider]
+ ),
+ resolution=resolution,
+ seed=seed,
+ size=size,
+ ),
+ )
+
+ req = self._build_request(
+ method="POST",
+ path="/videos",
+ 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.CreateVideosGlobals(
+ 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.video_generation_request,
+ False,
+ False,
+ "json",
+ components.VideoGenerationRequest,
+ ),
+ 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="createVideos",
+ 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", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "202", "application/json"):
+ return unmarshal_json_response(components.VideoGenerationResponse, 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, "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 generate_async(
+ self,
+ *,
+ model: str,
+ prompt: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ aspect_ratio: Optional[components.AspectRatio] = None,
+ duration: Optional[int] = None,
+ frame_images: Optional[
+ Union[List[components.FrameImage], List[components.FrameImageTypedDict]]
+ ] = None,
+ generate_audio: Optional[bool] = None,
+ input_references: Optional[
+ Union[
+ List[components.ContentPartImage],
+ List[components.ContentPartImageTypedDict],
+ ]
+ ] = None,
+ provider: Optional[
+ Union[components.Provider, components.ProviderTypedDict]
+ ] = None,
+ resolution: Optional[components.Resolution] = None,
+ seed: Optional[int] = None,
+ size: 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.VideoGenerationResponse:
+ r"""Submit a video generation request
+
+ Submits a video generation request and returns a polling URL to check status
+
+ :param model:
+ :param prompt:
+ :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 aspect_ratio: Aspect ratio of the generated video
+ :param duration: Duration of the generated video in seconds
+ :param frame_images: Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
+ :param generate_audio: Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set.
+ :param input_references: Reference images to guide video generation
+ :param provider: Provider-specific passthrough configuration
+ :param resolution: Resolution of the generated video
+ :param seed: If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
+ :param size: Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio.
+ :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.CreateVideosRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ video_generation_request=components.VideoGenerationRequest(
+ aspect_ratio=aspect_ratio,
+ duration=duration,
+ frame_images=utils.get_pydantic_model(
+ frame_images, Optional[List[components.FrameImage]]
+ ),
+ generate_audio=generate_audio,
+ input_references=utils.get_pydantic_model(
+ input_references, Optional[List[components.ContentPartImage]]
+ ),
+ model=model,
+ prompt=prompt,
+ provider=utils.get_pydantic_model(
+ provider, Optional[components.Provider]
+ ),
+ resolution=resolution,
+ seed=seed,
+ size=size,
+ ),
+ )
+
+ req = self._build_request_async(
+ method="POST",
+ path="/videos",
+ 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.CreateVideosGlobals(
+ 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.video_generation_request,
+ False,
+ False,
+ "json",
+ components.VideoGenerationRequest,
+ ),
+ 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="createVideos",
+ 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", "5XX"],
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "202", "application/json"):
+ return unmarshal_json_response(components.VideoGenerationResponse, 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, "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_generation(
+ self,
+ *,
+ job_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.VideoGenerationResponse:
+ r"""Poll video generation status
+
+ Returns job status and content URLs when completed
+
+ :param job_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.GetVideosRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ job_id=job_id,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/videos/{jobId}",
+ 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.GetVideosGlobals(
+ 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="getVideos",
+ 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.VideoGenerationResponse, 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_generation_async(
+ self,
+ *,
+ job_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.VideoGenerationResponse:
+ r"""Poll video generation status
+
+ Returns job status and content URLs when completed
+
+ :param job_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.GetVideosRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ job_id=job_id,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/videos/{jobId}",
+ 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.GetVideosGlobals(
+ 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="getVideos",
+ 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.VideoGenerationResponse, http_res)
+ if utils.match_response(http_res, "401", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.UnauthorizedResponseErrorData, http_res
+ )
+ raise errors.UnauthorizedResponseError(response_data, http_res)
+ if utils.match_response(http_res, "404", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.NotFoundResponseErrorData, http_res
+ )
+ raise errors.NotFoundResponseError(response_data, http_res)
+ if utils.match_response(http_res, "500", "application/json"):
+ response_data = unmarshal_json_response(
+ errors.InternalServerResponseErrorData, http_res
+ )
+ raise errors.InternalServerResponseError(response_data, http_res)
+ if utils.match_response(http_res, "4XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+ if utils.match_response(http_res, "5XX", "*"):
+ http_res_text = await utils.stream_to_text_async(http_res)
+ raise errors.OpenRouterDefaultError(
+ "API error occurred", http_res, http_res_text
+ )
+
+ raise errors.OpenRouterDefaultError("Unexpected response received", http_res)
+
+ def get_video_content(
+ self,
+ *,
+ job_id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ index: OptionalNullable[int] = 0,
+ 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"""Download generated video content
+
+ Streams the generated video content from the upstream provider
+
+ :param job_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 index:
+ :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.ListVideosContentRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ job_id=job_id,
+ index=index,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/videos/{jobId}/content",
+ 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/octet-stream",
+ http_headers=http_headers,
+ _globals=operations.ListVideosContentGlobals(
+ 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="listVideosContent",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "502", "5XX"],
+ stream=True,
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/octet-stream"):
+ 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, "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, "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, "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 get_video_content_async(
+ self,
+ *,
+ job_id: str,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ index: OptionalNullable[int] = 0,
+ 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"""Download generated video content
+
+ Streams the generated video content from the upstream provider
+
+ :param job_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 index:
+ :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.ListVideosContentRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ job_id=job_id,
+ index=index,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/videos/{jobId}/content",
+ 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/octet-stream",
+ http_headers=http_headers,
+ _globals=operations.ListVideosContentGlobals(
+ 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="listVideosContent",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "401", "404", "4XX", "500", "502", "5XX"],
+ stream=True,
+ retry_config=retry_config,
+ )
+
+ response_data: Any = None
+ if utils.match_response(http_res, "200", "application/octet-stream"):
+ 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, "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, "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, "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
+ )
+
+ def list_videos_models(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.VideoModelsListResponse:
+ r"""List all video generation models
+
+ Returns a list of all available video generation models and their properties
+
+ :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.ListVideosModelsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ )
+
+ req = self._build_request(
+ method="GET",
+ path="/videos/models",
+ 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.ListVideosModelsGlobals(
+ 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="listVideosModels",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "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.VideoModelsListResponse, 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, "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_videos_models_async(
+ self,
+ *,
+ http_referer: Optional[str] = None,
+ x_open_router_title: Optional[str] = None,
+ x_open_router_categories: Optional[str] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ http_headers: Optional[Mapping[str, str]] = None,
+ ) -> components.VideoModelsListResponse:
+ r"""List all video generation models
+
+ Returns a list of all available video generation models and their properties
+
+ :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.ListVideosModelsRequest(
+ http_referer=http_referer,
+ x_open_router_title=x_open_router_title,
+ x_open_router_categories=x_open_router_categories,
+ )
+
+ req = self._build_request_async(
+ method="GET",
+ path="/videos/models",
+ 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.ListVideosModelsGlobals(
+ 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="listVideosModels",
+ oauth2_scopes=None,
+ security_source=get_security_from_env(
+ self.sdk_configuration.security, components.Security
+ ),
+ ),
+ request=req,
+ error_status_codes=["400", "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.VideoModelsListResponse, 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, "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 773f329..78fabef 100644
--- a/uv.lock
+++ b/uv.lock
@@ -138,6 +138,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/d1/b3/8def84f539e7d2289a02f0524b944b15d7c75dab7628bedf1c4f0992029c/isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6", size = 92310, upload-time = "2023-12-13T20:37:23.244Z" },
]
+[[package]]
+name = "jsonpath-python"
+version = "1.1.5"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/2d/db/2f4ecc24da35c6142b39c353d5b7c16eef955cc94b35a48d3fa47996d7c3/jsonpath_python-1.1.5.tar.gz", hash = "sha256:ceea2efd9e56add09330a2c9631ea3d55297b9619348c1055e5bfb9cb0b8c538", size = 87352, upload-time = "2026-03-17T06:16:40.597Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/28/50/1a313fb700526b134c71eb8a225d8b83be0385dbb0204337b4379c698cef/jsonpath_python-1.1.5-py3-none-any.whl", hash = "sha256:a60315404d70a65e76c9a782c84e50600480221d94a58af47b7b4d437351cb4b", size = 14090, upload-time = "2026-03-17T06:16:39.152Z" },
+]
+
[[package]]
name = "mccabe"
version = "0.7.0"
@@ -211,11 +220,12 @@ wheels = [
[[package]]
name = "openrouter"
-version = "0.8.1"
+version = "0.9.0"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },
{ name = "httpx" },
+ { name = "jsonpath-python" },
{ name = "pydantic" },
]
@@ -230,6 +240,7 @@ dev = [
requires-dist = [
{ name = "httpcore", specifier = ">=1.0.9" },
{ name = "httpx", specifier = ">=0.28.1" },
+ { name = "jsonpath-python", specifier = ">=1.0.6" },
{ name = "pydantic", specifier = ">=2.11.2" },
]